Fix client having NBT that the server doesn't

This was reported months ago but I forgot because it was in the WRONG PLACE.
This commit is contained in:
Nicholas Ignoffo 2016-09-06 18:55:32 -07:00
parent 137975331c
commit 09b331fdbe
31 changed files with 66 additions and 61 deletions

View file

@ -51,7 +51,8 @@ public class ItemSigilBase extends ItemSigil implements IVariantProvider
if (TextHelper.canTranslate(tooltipBase + "desc"))
tooltip.addAll(Arrays.asList(TextHelper.cutLongString(TextHelper.localizeEffect(tooltipBase + "desc"))));
NBTHelper.checkNBT(stack);
if (!stack.hasTagCompound())
return;
if (!Strings.isNullOrEmpty(getOwnerName(stack)))
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.currentOwner", PlayerHelper.getUsernameFromStack(stack)));

View file

@ -75,6 +75,9 @@ public class ItemSigilHolding extends ItemSigilBase implements IKeybindable, IAl
super.addInformation(stack, player, tooltip, advanced);
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic.sigil.holding.press", KeyBindingBloodMagic.KeyBindings.OPEN_HOLDING.getKey().getDisplayName()));
if (!stack.hasTagCompound())
return;
ItemStack[] inv = getInternalInventory(stack);
if (inv == null)

View file

@ -33,7 +33,8 @@ public class ItemSigilTeleposition extends ItemSigilBase
{
super.addInformation(stack, player, tooltip, advanced);
stack = NBTHelper.checkNBT(stack);
if (!stack.hasTagCompound())
return;
NBTTagCompound tag = stack.getTagCompound();
if (tag != null && stack.getTagCompound().hasKey(Constants.NBT.DIMENSION_ID) && stack.getTagCompound().hasKey(Constants.NBT.X_COORD) && stack.getTagCompound().hasKey(Constants.NBT.Y_COORD) && stack.getTagCompound().hasKey(Constants.NBT.Z_COORD))

View file

@ -43,8 +43,9 @@ public class ItemSigilToggleableBase extends ItemSigilToggleable implements IMes
@SideOnly(Side.CLIENT)
public void addInformation(ItemStack stack, EntityPlayer player, List<String> tooltip, boolean advanced)
{
NBTHelper.checkNBT(stack);
super.addInformation(stack, player, tooltip, advanced);
if (!stack.hasTagCompound())
return;
tooltip.add(TextHelper.localizeEffect("tooltip.BloodMagic." + (getActivated(stack) ? "activated" : "deactivated")));
if (!Strings.isNullOrEmpty(getOwnerName(stack)))

View file

@ -39,7 +39,8 @@ public class ItemSigilTransposition extends ItemSigilBase
{
super.addInformation(stack, player, tooltip, advanced);
stack = NBTHelper.checkNBT(stack);
if (!stack.hasTagCompound())
return;
NBTTagCompound tag = stack.getTagCompound();
if (tag.hasKey(Constants.NBT.CONTAINED_BLOCK_NAME) && tag.hasKey(Constants.NBT.CONTAINED_BLOCK_META))