mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-25 04:04:28 +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
@@ -12,50 +12,45 @@ import noppes.npcs.controllers.data.SkinOverlay;
|
||||
import noppes.npcs.entity.EntityCustomNpc;
|
||||
import noppes.npcs.entity.data.ModelData;
|
||||
|
||||
public class EntityNPCEnderman extends EntityNpcEnderchibi
|
||||
{
|
||||
public EntityNPCEnderman(World world)
|
||||
{
|
||||
public class EntityNPCEnderman extends EntityNpcEnderchibi {
|
||||
public EntityNPCEnderman(World world) {
|
||||
super(world);
|
||||
display.texture = "customnpcs:textures/entity/enderman/enderman.png";
|
||||
//display.glowTexture = ;
|
||||
display.skinOverlayData.overlayList.put(0,new SkinOverlay("customnpcs:textures/overlays/ender_eyes.png"));
|
||||
display.skinOverlayData.overlayList.put(0, new SkinOverlay("customnpcs:textures/overlays/ender_eyes.png"));
|
||||
this.width = 0.6F;
|
||||
this.height = 2.9F;
|
||||
}
|
||||
|
||||
public void updateHitbox() {
|
||||
|
||||
if(currentAnimation == EnumAnimation.LYING){
|
||||
width = height = 0.2f;
|
||||
}
|
||||
else if (currentAnimation == EnumAnimation.SITTING){
|
||||
width = 0.6f;
|
||||
height = 2.3f;
|
||||
}
|
||||
else{
|
||||
width = 0.6f;
|
||||
height = 2.9f;
|
||||
}
|
||||
width = (width / 5f) * display.modelSize;
|
||||
height = (height / 5f) * display.modelSize;
|
||||
}
|
||||
if (currentAnimation == EnumAnimation.LYING) {
|
||||
width = height = 0.2f;
|
||||
} else if (currentAnimation == EnumAnimation.SITTING) {
|
||||
width = 0.6f;
|
||||
height = 2.3f;
|
||||
} else {
|
||||
width = 0.6f;
|
||||
height = 2.9f;
|
||||
}
|
||||
width = (width / 5f) * display.modelSize;
|
||||
height = (height / 5f) * display.modelSize;
|
||||
}
|
||||
|
||||
public void onUpdate()
|
||||
{
|
||||
isDead = true;
|
||||
public void onUpdate() {
|
||||
isDead = true;
|
||||
|
||||
if(!worldObj.isRemote){
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
if (!worldObj.isRemote) {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
|
||||
writeToNBT(compound);
|
||||
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
|
||||
npc.readFromNBT(compound);
|
||||
ModelData data = npc.modelData;
|
||||
data.setEntityClass(EntityEnderman.class);
|
||||
writeToNBT(compound);
|
||||
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
|
||||
npc.readFromNBT(compound);
|
||||
ModelData data = npc.modelData;
|
||||
data.setEntityClass(EntityEnderman.class);
|
||||
|
||||
worldObj.spawnEntityInWorld(npc);
|
||||
}
|
||||
worldObj.spawnEntityInWorld(npc);
|
||||
}
|
||||
super.onUpdate();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user