Skip to content

Commit

Permalink
Fix white present in nametag removal recipe
Browse files Browse the repository at this point in the history
  • Loading branch information
copygirl committed Dec 8, 2014
1 parent 1947b69 commit 00fbdf3
Showing 1 changed file with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,11 @@ public void updateEntity() {
@Override
public void onBlockPlaced(EntityLivingBase player, ItemStack stack) {
super.onBlockPlaced(player, stack);
NBTTagCompound compound = stack.getTagCompound();
colorInner = ((compound != null) ? compound.getByte(TAG_COLOR_INNER) : 14);
colorOuter = ((compound != null) ? compound.getByte(TAG_COLOR_OUTER) : 0);
skojanzaMode = ((compound != null) ? compound.getBoolean(TAG_SKOJANZA_MODE) : false);
nameTag = (((compound != null) && compound.hasKey(TAG_NAMETAG))
? compound.getString(TAG_NAMETAG) : null);
color = (((compound != null) && compound.hasKey("color"))
? compound.getInteger("color") : -1);
colorInner = StackUtils.get(stack, (byte)14, TAG_COLOR_INNER);
colorOuter = StackUtils.get(stack, (byte)0, TAG_COLOR_OUTER);
skojanzaMode = (StackUtils.get(stack, (byte)0, TAG_SKOJANZA_MODE) > 0);
nameTag = StackUtils.get(stack, (String)null, TAG_NAMETAG);
color = StackUtils.get(stack, -1, "color");
worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, colorInner, SetBlockFlag.SEND_TO_CLIENT);
}

Expand Down Expand Up @@ -153,11 +150,10 @@ public void dropContents() { }
@SideOnly(Side.CLIENT)
public void onBlockRenderAsItem(ItemStack stack) {
NBTTagCompound compound = stack.getTagCompound();
colorInner = ((compound != null) ? compound.getByte(TAG_COLOR_INNER) : 14);
colorOuter = ((compound != null) ? compound.getByte(TAG_COLOR_OUTER) : 0);
skojanzaMode = ((compound != null) ? compound.getBoolean(TAG_SKOJANZA_MODE) : false);
nameTag = (((compound != null) && compound.hasKey(TAG_NAMETAG))
? compound.getString(TAG_NAMETAG) : null);
colorInner = StackUtils.get(stack, (byte)14, TAG_COLOR_INNER);
colorOuter = StackUtils.get(stack, (byte)0, TAG_COLOR_OUTER);
skojanzaMode = (StackUtils.get(stack, (byte)0, TAG_SKOJANZA_MODE) > 0);
nameTag = StackUtils.get(stack, (String)null, TAG_NAMETAG);
}

// Tile entity synchronization
Expand Down

0 comments on commit 00fbdf3

Please sign in to comment.