Config option for Goggles upgrade
This commit is contained in:
parent
c1aeb2e7f6
commit
e219b50589
2 changed files with 11 additions and 6 deletions
|
@ -95,14 +95,17 @@ public class EventHandler
|
|||
@SubscribeEvent
|
||||
public void onAnvil(AnvilUpdateEvent event)
|
||||
{
|
||||
if (event.left.getItem() == ModItems.livingArmourHelmet && event.right.getItem() == Constants.Compat.THAUMCRAFT_GOGGLES && !event.right.isItemDamaged())
|
||||
if (ConfigHandler.thaumcraftGogglesUpgrade)
|
||||
{
|
||||
ItemStack output = event.left.copy();
|
||||
output = NBTHelper.checkNBT(output);
|
||||
output.getTagCompound().setBoolean(Constants.Compat.THAUMCRAFT_HAS_GOGGLES, true);
|
||||
event.cost = 1;
|
||||
if (event.left.getItem() == ModItems.livingArmourHelmet && event.right.getItem() == Constants.Compat.THAUMCRAFT_GOGGLES && !event.right.isItemDamaged())
|
||||
{
|
||||
ItemStack output = event.left.copy();
|
||||
output = NBTHelper.checkNBT(output);
|
||||
output.getTagCompound().setBoolean(Constants.Compat.THAUMCRAFT_HAS_GOGGLES, true);
|
||||
event.cost = 1;
|
||||
|
||||
event.output = output;
|
||||
event.output = output;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue