mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 04:59:05 +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
@@ -4,40 +4,39 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.world.World;
|
||||
import noppes.npcs.entity.data.ModelData;
|
||||
|
||||
public class EntityNpcSlime extends EntityNPCInterface{
|
||||
public EntityNpcSlime(World world)
|
||||
{
|
||||
public class EntityNpcSlime extends EntityNPCInterface {
|
||||
public EntityNpcSlime(World world) {
|
||||
super(world);
|
||||
scaleX = 2f;
|
||||
scaleY = 2f;
|
||||
scaleZ = 2f;
|
||||
display.texture = "customnpcs:textures/entity/slime/Slime.png";
|
||||
width = 0.8f;
|
||||
height = 0.8f;
|
||||
}
|
||||
@Override
|
||||
public void updateHitbox() {
|
||||
width = 0.8f;
|
||||
height = 0.8f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate()
|
||||
{
|
||||
isDead = true;
|
||||
scaleX = 2f;
|
||||
scaleY = 2f;
|
||||
scaleZ = 2f;
|
||||
display.texture = "customnpcs:textures/entity/slime/Slime.png";
|
||||
width = 0.8f;
|
||||
height = 0.8f;
|
||||
}
|
||||
|
||||
if(!worldObj.isRemote){
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
|
||||
writeToNBT(compound);
|
||||
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
|
||||
npc.readFromNBT(compound);
|
||||
ModelData data = npc.modelData;
|
||||
data.setEntityClass(EntityNpcSlime.class);
|
||||
|
||||
|
||||
worldObj.spawnEntityInWorld(npc);
|
||||
}
|
||||
@Override
|
||||
public void updateHitbox() {
|
||||
width = 0.8f;
|
||||
height = 0.8f;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdate() {
|
||||
isDead = true;
|
||||
|
||||
if (!worldObj.isRemote) {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
|
||||
writeToNBT(compound);
|
||||
EntityCustomNpc npc = new EntityCustomNpc(worldObj);
|
||||
npc.readFromNBT(compound);
|
||||
ModelData data = npc.modelData;
|
||||
data.setEntityClass(EntityNpcSlime.class);
|
||||
|
||||
|
||||
worldObj.spawnEntityInWorld(npc);
|
||||
}
|
||||
super.onUpdate();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user