Fixed zombies using the skeleton's arm changes
parent
82465867d9
commit
127e17d470
|
@ -4,8 +4,6 @@ import java.lang.management.ManagementFactory;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.entity.player.Player;
|
||||
import net.minecraft.item.ItemInstance;
|
||||
import net.minecraft.tile.Tile;
|
||||
|
||||
public class WyHelper {
|
||||
|
||||
|
@ -31,11 +29,11 @@ public class WyHelper {
|
|||
|
||||
// player.level.playLevelEvent((Player)null, 1005, (int)player.x, (int)player.y, (int)player.z, 0);
|
||||
|
||||
player.dropItem(new ItemInstance(Tile.REDSTONE_TORCH_LIT, 64), false);
|
||||
player.dropItem(new ItemInstance(Tile.RAIL, 64), false);
|
||||
player.dropItem(new ItemInstance(Tile.GOLDEN_RAIL, 64), false);
|
||||
// player.dropItem(new ItemInstance(Tile.REDSTONE_TORCH_LIT, 64), false);
|
||||
// player.dropItem(new ItemInstance(Tile.RAIL, 64), false);
|
||||
// player.dropItem(new ItemInstance(Tile.GOLDEN_RAIL, 64), false);
|
||||
|
||||
// Skeleton enemy = new Skeleton(player.level);
|
||||
// Zombie enemy = new Zombie(player.level);
|
||||
// enemy.setPositionAndAngles(player.x + 2, player.y, player.z, 0.0f, 0.0f);
|
||||
// player.level.spawnEntity(enemy);
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.spongepowered.asm.mixin.injection.Inject;
|
|||
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
||||
|
||||
import net.minecraft.client.render.entity.model.BipedModel;
|
||||
import net.minecraft.client.render.entity.model.SkeletonModel;
|
||||
import net.minecraft.client.render.entity.model.ZombieModel;
|
||||
|
||||
@Mixin(ZombieModel.class)
|
||||
|
@ -13,10 +14,12 @@ public class SkeletonModelMixin {
|
|||
@Inject(method = "setAngles", at = @At("TAIL"))
|
||||
public void setAngles(float f, float f1, float f2, float f3, float f4, float f5, CallbackInfo ci) {
|
||||
BipedModel model = ((BipedModel) (Object) this);
|
||||
if(model instanceof SkeletonModel) {
|
||||
model.leftArm.yaw = 0.45f;
|
||||
model.rightArm.yaw = -0.2f;
|
||||
model.leftArm.pitch -= 0.05f;
|
||||
model.rightArm.pitch -= 0.05f;
|
||||
model.rightArm.roll += 0.1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue