mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-20 04:09:40 +00:00
This fixes Botania creative tab breaking and shouldn't affect the ring itself (#34)
* This fixes creative tab breaking and shouldn't affect the ring itself * Adding change suggest by OneEyeMaker, placed check for tag compound inside of isRingEnabled and isRingBreaking methods. * Forgot that bit. :)
This commit is contained in:
1 parent
5ed33dfa4f
commit
29f0c6af40
1 file changed
+11
-3
@@ -245,11 +245,19 @@ public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeC
|
||||
}
|
||||
|
||||
public static boolean isRingEnabled (final ItemStack stack){
|
||||
return stack.stackTagCompound.getBoolean(TAG_MODE);
|
||||
if (stack.hasTagCompound())
|
||||
{
|
||||
return stack.stackTagCompound.getBoolean(TAG_MODE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean isRingBreakingEnabled (final ItemStack stack){
|
||||
return stack.stackTagCompound.getBoolean(TAG_BREAKING_MODE);
|
||||
if (stack.hasTagCompound())
|
||||
{
|
||||
return stack.stackTagCompound.getBoolean(TAG_BREAKING_MODE);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static void breakOnAllCursors(EntityPlayer player, Item item, ItemStack stack, int x, int y, int z, int side) {
|
||||
@@ -292,7 +300,7 @@ public class ItemLokiRing extends ItemRelicBauble implements IExtendedWireframeC
|
||||
addStringToTooltip(StatCollector.translateToLocal("botaniamisc.lokiDescription"), list);
|
||||
addStringToTooltip(StatCollector.translateToLocal("botaniamisc.lokiDescription2"), list);
|
||||
addStringToTooltip("", list);
|
||||
addStringToTooltip(EnumChatFormatting.WHITE +StatCollector.translateToLocal("botaniamisc.lokiCurrent"), list);
|
||||
addStringToTooltip(EnumChatFormatting.WHITE +StatCollector.translateToLocal("botaniamisc.lokiCurrent"), list);
|
||||
addStringToTooltip(StatCollector.translateToLocal("botaniamisc.lokiState") + ": " + getOnOffString(isRingEnabled(stack)), list);
|
||||
addStringToTooltip(StatCollector.translateToLocal("botaniamisc.breaking") + ": " + getOnOffString(isRingBreakingEnabled(stack)), list);
|
||||
addStringToTooltip("", list);
|
||||
|
||||
Reference in new issue
Block a user