Skip to content

Commit

Permalink
fixed invisible minions
Browse files Browse the repository at this point in the history
  • Loading branch information
sirolf2009 committed Jun 4, 2013
1 parent 854d6f0 commit aa48211
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions common/com/sirolf2009/necromancy/entity/EntityMinion.java
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ public void dataWatcherUpdate() {
dataWatcher.updateObject(24, getBodyPartsNames()[4]);
}
setSaddled(getSaddled());

}

@Override
Expand Down Expand Up @@ -118,7 +117,6 @@ private void updateBodyParts() {
armLeft = getBodyPartFromlocationName("armLeft", dataWatcher.getWatchableObjectString(22));
armRight = getBodyPartFromlocationName("armRight", dataWatcher.getWatchableObjectString(23));
leg = getBodyPartFromlocationName("legs", legType = dataWatcher.getWatchableObjectString(24));

}

public static BodyPart[] getBodyPartFromlocationName(String location, String name) {
Expand Down Expand Up @@ -199,6 +197,7 @@ public void setSaddled(boolean par1) {
@Override
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
super.writeEntityToNBT(par1NBTTagCompound);
updateBodyParts();
par1NBTTagCompound.setString("head", getBodyPartsNames()[0]);
par1NBTTagCompound.setString("body", getBodyPartsNames()[1]);
par1NBTTagCompound.setString("leg", getBodyPartsNames()[2]);
Expand All @@ -210,6 +209,7 @@ public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) {
@Override
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) {
super.readEntityFromNBT(par1NBTTagCompound);
dataWatcherUpdate();
dataWatcher.updateObject(20, par1NBTTagCompound.getString("head"));
dataWatcher.updateObject(21, par1NBTTagCompound.getString("body"));
dataWatcher.updateObject(22, par1NBTTagCompound.getString("armLeft"));
Expand Down Expand Up @@ -242,7 +242,7 @@ public void setBodyPart(String location, BodyPart[] bodypart) {
} else {
System.err.println("Trying to set an impossible body part!");
}
// dataWatcherUpdate();
dataWatcherUpdate();
}

@Override
Expand Down Expand Up @@ -292,7 +292,7 @@ public void setBodyParts(BodyPart[][] bodypart) {
armLeft = bodypart[2];
armRight = bodypart[3];
leg = bodypart[4];
// dataWatcherUpdate();
dataWatcherUpdate();
}

public void setAltar(TileEntityAltar tileEntityAltar) {
Expand Down

0 comments on commit aa48211

Please sign in to comment.