quick fix : Redundant type cast

This commit is contained in:
Alexdoru authored and Jason Mitchell committed 2023-01-28 18:02:41 -08:00
1 parent b34eec4dea
commit 2d13e6185e
84 files changed
+426 -434

No files matched your search

@@ -28,7 +28,7 @@ public class AModLeadBoots extends AModBoolean {
if (baseTag.hasKey("AttributeModifiers")) {
attributes = baseTag.getTagList("AttributeModifiers", 0);
for (int iter = 0; iter < attributes.tagCount(); iter++) {
NBTTagCompound tag = (NBTTagCompound) attributes.getCompoundTagAt(iter);
NBTTagCompound tag = attributes.getCompoundTagAt(iter);
if (tag.getString("AttributeName").equals("generic.knockbackResistance")) attributes.removeTag(iter);
}
} else {
@@ -71,17 +71,17 @@ public class ModButtertouch extends ModBoolean {
if (index == enchant.effectId) {
hasEnchant = true;
enchantTag.setShort("id", (short) index);
enchantTag.setShort("lvl", (short) ((byte) level));
enchantTag.setShort("lvl", (byte) level);
} else {
enchantTag.setShort("id", (short) index);
enchantTag.setShort("lvl", (short) ((byte) lvl));
enchantTag.setShort("lvl", (byte) lvl);
}
tags.appendTag(enchantTag);
}
if (!hasEnchant) {
NBTTagCompound enchantTag = new NBTTagCompound();
enchantTag.setShort("id", (short) enchant.effectId);
enchantTag.setShort("lvl", (short) ((byte) level));
enchantTag.setShort("lvl", (byte) level);
tags.appendTag(enchantTag);
}
tool.stackTagCompound.setTag("ench", tags);
@@ -136,17 +136,17 @@ public class ModLapis extends ItemModTypeFilter {
if (index == enchant.effectId) {
hasEnchant = true;
enchantTag.setShort("id", (short) index);
enchantTag.setShort("lvl", (short) ((byte) level));
enchantTag.setShort("lvl", (byte) level);
} else {
enchantTag.setShort("id", (short) index);
enchantTag.setShort("lvl", (short) ((byte) lvl));
enchantTag.setShort("lvl", (byte) lvl);
}
tags.appendTag(enchantTag);
}
if (!hasEnchant) {
NBTTagCompound enchantTag = new NBTTagCompound();
enchantTag.setShort("id", (short) enchant.effectId);
enchantTag.setShort("lvl", (short) ((byte) level));
enchantTag.setShort("lvl", (byte) level);
tags.appendTag(enchantTag);
}
tool.stackTagCompound.setTag("ench", tags);