Fix main hand in first person spectator view (fixes #731)
This commit is contained in:
@@ -73,6 +73,7 @@ import net.minecraft.client.recipebook.ClientRecipeBook;
|
||||
//$$ import net.minecraft.stats.RecipeBook;
|
||||
//#endif
|
||||
//#endif
|
||||
import net.minecraft.util.Arm;
|
||||
import net.minecraft.util.Hand;
|
||||
//#endif
|
||||
|
||||
@@ -498,6 +499,17 @@ public class CameraEntity
|
||||
}
|
||||
//#endif
|
||||
|
||||
//#if MC>=10904
|
||||
@Override
|
||||
public Arm getMainArm() {
|
||||
Entity view = this.client.getCameraEntity();
|
||||
if (view != this && view instanceof PlayerEntity) {
|
||||
return ((PlayerEntity) view).getMainArm();
|
||||
}
|
||||
return super.getMainArm();
|
||||
}
|
||||
//#endif
|
||||
|
||||
@Override
|
||||
public float getHandSwingProgress(float renderPartialTicks) {
|
||||
Entity view = this.client.getCameraEntity();
|
||||
|
||||
Reference in New Issue
Block a user