Implemented a workaround for Azanor/Baubles#156

This commit is contained in:
Vasco Lavos committed 2016-10-14 18:14:21 +01:00
1 parent a3dd76f081
commit b692f55237
4 files changed
+9 -4

No files matched your search

@@ -150,9 +150,6 @@ public abstract class ItemBauble extends ItemMod implements IBauble, ICosmeticAt
public void onEquippedOrLoadedIntoWorld(ItemStack stack, EntityLivingBase player) {}
@Override
public void onUnequipped(ItemStack stack, EntityLivingBase player) {}
@Override
public ItemStack getCosmeticItem(ItemStack stack) {
NBTTagCompound cmp = ItemNBTHelper.getCompound(stack, TAG_COSMETIC_ITEM, true);
@@ -43,6 +43,9 @@ public class ItemKnockbackBelt extends ItemBaubleModifier implements IBaubleRend
@Override
void fillModifiers(Multimap<String, AttributeModifier> attributes, ItemStack stack) {
if(stack == null) // workaround for Azanor/Baubles#156
return;
attributes.put(SharedMonsterAttributes.KNOCKBACK_RESISTANCE.getAttributeUnlocalizedName(), new AttributeModifier(getBaubleUUID(stack), "Bauble modifier", 1, 0));
}
@@ -120,6 +120,9 @@ public class ItemAesirRing extends ItemRelicBauble implements IWireframeCoordina
private void fillModifiers(Multimap<String, AttributeModifier> attributes, ItemStack stack) {
if(stack == null) // workaround for Azanor/Baubles#156
return;
attributes.put(SharedMonsterAttributes.MAX_HEALTH.getAttributeUnlocalizedName(), new AttributeModifier(getBaubleUUID(stack), "Bauble modifier", 20, 0));
}
@@ -99,8 +99,10 @@ public class ItemOdinRing extends ItemRelicBauble {
player.getAttributeMap().removeAttributeModifiers(attributes);
}
void fillModifiers(Multimap<String, AttributeModifier> attributes, ItemStack stack) {
if(stack == null) // workaround for Azanor/Baubles#156
return;
attributes.put(SharedMonsterAttributes.MAX_HEALTH.getAttributeUnlocalizedName(), new AttributeModifier(getBaubleUUID(stack), "Bauble modifier", 20, 0));
}