mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-22 13:09:53 +00:00
Fix night-vision being activateable without upgrade #1377
This commit is contained in:
1 parent
69496722bb
commit
ab96d8f46f
1 file changed
+6
-5
@@ -158,12 +158,13 @@ public class ArmorControls {
|
||||
if (mc.currentScreen == null) {
|
||||
if (key == ArmorControls.toggleGoggles) {
|
||||
ItemStack goggles = mc.thePlayer.getCurrentArmor(3);
|
||||
if (goggles != null && goggles
|
||||
.getItem() instanceof TravelGear) //TODO: Genericize this
|
||||
if (goggles != null && goggles.getItem() instanceof TravelGear) //TODO: Genericize this
|
||||
{
|
||||
activeGoggles = !activeGoggles;
|
||||
PlayerAbilityHelper.toggleGoggles(mc.thePlayer, activeGoggles);
|
||||
toggleGoggles();
|
||||
if(goggles.hasTagCompound() && goggles.getTagCompound().getCompoundTag(((TravelGear) goggles.getItem()).getBaseTagName()).getBoolean("Night Vision")) {
|
||||
activeGoggles = !activeGoggles;
|
||||
PlayerAbilityHelper.toggleGoggles(mc.thePlayer, activeGoggles);
|
||||
toggleGoggles();
|
||||
}
|
||||
}
|
||||
}
|
||||
if (key == ArmorControls.beltSwap) {
|
||||
|
||||
Reference in new issue
Block a user