Full Imports and Code Format Optimization

This commit is contained in:
Kam committed 2025-03-12 20:12:01 -04:00
1 parent 250edf099c
commit 6815f579a7
1192 files changed
+60344 -62167

No files matched your search

@@ -13,48 +13,44 @@ import noppes.npcs.entity.data.ModelData;
// EntityAnimal, Item, EntityPlayer, InventoryPlayer,
// ItemStack, World, NBTTagCompound
public class EntityNPCGolem extends EntityNPCInterface
{
public class EntityNPCGolem extends EntityNPCInterface {
public EntityNPCGolem(World world)
{
public EntityNPCGolem(World world) {
super(world);
display.texture = "customnpcs:textures/entity/golem/Iron Golem.png";
width = 1.4f;
height = 2.5f;
width = 1.4f;
height = 2.5f;
}
public void updateHitbox() {
currentAnimation = EnumAnimation.values()[dataWatcher.getWatchableObjectInt(14)];
if(currentAnimation == EnumAnimation.LYING){
width = height = 0.5f;
}
else if (currentAnimation == EnumAnimation.SITTING){
width = 1.4f;
height = 2f;
}
else{
width = 1.4f;
height = 2.5f;
}
}
public void onUpdate()
{
isDead = true;
currentAnimation = EnumAnimation.values()[dataWatcher.getWatchableObjectInt(14)];
if (currentAnimation == EnumAnimation.LYING) {
width = height = 0.5f;
} else if (currentAnimation == EnumAnimation.SITTING) {
width = 1.4f;
height = 2f;
} else {
width = 1.4f;
height = 2.5f;
}
}
if(!worldObj.isRemote){
NBTTagCompound compound = new NBTTagCompound();
public void onUpdate() {
isDead = true;
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
ModelData data = npc.modelData;
data.setEntityClass(EntityNPCGolem.class);
if (!worldObj.isRemote) {
NBTTagCompound compound = new NBTTagCompound();
writeToNBT(compound);
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
npc.readFromNBT(compound);
ModelData data = npc.modelData;
data.setEntityClass(EntityNPCGolem.class);
worldObj.spawnEntityInWorld(npc);
}
worldObj.spawnEntityInWorld(npc);
}
super.onUpdate();
}
}