mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-20 12:19:59 +00:00
Full Imports and Code Format Optimization
This commit is contained in:
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();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user