Skip to content

Commit

Permalink
Move TabRegistry initialization to TinkerArmor
Browse files Browse the repository at this point in the history
  • Loading branch information
Qowyn committed Sep 23, 2014
1 parent c006610 commit 8d77ab5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
4 changes: 4 additions & 0 deletions src/main/java/tconstruct/armor/TinkerArmor.java
Expand Up @@ -5,7 +5,9 @@
import cpw.mods.fml.common.registry.*;
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
import cpw.mods.fml.relauncher.Side;

import java.util.EnumSet;

import mantle.pulsar.pulse.*;
import net.minecraft.block.Block;
import net.minecraft.init.*;
Expand All @@ -19,6 +21,7 @@
import tconstruct.armor.items.*;
import tconstruct.blocks.logic.DryingRackLogic;
import tconstruct.client.ArmorControls;
import tconstruct.client.tabs.TabRegistry;
import tconstruct.library.TConstructRegistry;
import tconstruct.library.accessory.AccessoryCore;
import tconstruct.library.armor.ArmorPart;
Expand Down Expand Up @@ -75,6 +78,7 @@ public void preInit (FMLPreInitializationEvent event)
if (event.getSide() == Side.CLIENT)
{
FMLCommonHandler.instance().bus().register(new ArmorControls());
MinecraftForge.EVENT_BUS.register(new TabRegistry());
}

TinkerArmor.dryingRack = new DryingRack().setBlockName("Armor.DryingRack");
Expand Down
8 changes: 1 addition & 7 deletions src/main/java/tconstruct/client/ArmorControls.java
Expand Up @@ -3,16 +3,13 @@
import cpw.mods.fml.common.gameevent.TickEvent.Type;
import mantle.common.network.AbstractPacket;
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.potion.Potion;
import net.minecraftforge.common.MinecraftForge;
import tconstruct.TConstruct;
import tconstruct.armor.*;
import tconstruct.armor.items.TravelGear;
import tconstruct.client.tabs.TabRegistry;
import tconstruct.util.network.*;

public class ArmorControls extends TKeyHandler
Expand Down Expand Up @@ -64,10 +61,7 @@ public void keyDown (Type types, KeyBinding kb, boolean tickEnd, boolean isRepea
{
openArmorGui();// mc.thePlayer.username);
}
if (kb == invKey && mc.currentScreen != null && mc.currentScreen.getClass() == GuiInventory.class)// &&// !mc.playerController.isInCreativeMode())
{
MinecraftForge.EVENT_BUS.register(new TabRegistry());
}

if (kb == jumpKey) // Double jump
{
if (mc.thePlayer.capabilities.isCreativeMode)
Expand Down

0 comments on commit 8d77ab5

Please sign in to comment.