mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-21 04:32:26 +00:00
Merge branch 'master' of https://github.com/SlimeKnights/TinkersConstruct
This commit is contained in:
commit
7014f265c0
4 files changed
+12
-10
No files matched your search
@@ -5,7 +5,9 @@ import cpw.mods.fml.common.event.*;
|
||||
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.*;
|
||||
@@ -19,6 +21,7 @@ import tconstruct.armor.blocks.DryingRack;
|
||||
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;
|
||||
@@ -75,6 +78,7 @@ public class TinkerArmor
|
||||
if (event.getSide() == Side.CLIENT)
|
||||
{
|
||||
FMLCommonHandler.instance().bus().register(new ArmorControls());
|
||||
MinecraftForge.EVENT_BUS.register(new TabRegistry());
|
||||
}
|
||||
|
||||
TinkerArmor.dryingRack = new DryingRack().setBlockName("Armor.DryingRack");
|
||||
|
||||
@@ -3,16 +3,13 @@ package tconstruct.client;
|
||||
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
|
||||
@@ -64,10 +61,7 @@ public class ArmorControls extends TKeyHandler
|
||||
{
|
||||
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)
|
||||
|
||||
@@ -28,11 +28,12 @@ public abstract class AbstractTab extends GuiButton
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
int yTexPos = this.enabled ? 3 : 32;
|
||||
int ySize = this.enabled ? 28 : 32;
|
||||
int ySize = this.enabled ? 25 : 32;
|
||||
int xOffset = this.id == 2 ? 0 : 1;
|
||||
int yPos = this.yPosition + (this.enabled ? 3 : 0);
|
||||
|
||||
mc.renderEngine.bindTexture(this.texture);
|
||||
this.drawTexturedModalRect(this.xPosition, this.yPosition, xOffset * 28, yTexPos, 28, ySize);
|
||||
this.drawTexturedModalRect(this.xPosition, yPos, xOffset * 28, yTexPos, 28, ySize);
|
||||
|
||||
RenderHelper.enableGUIStandardItemLighting();
|
||||
this.zLevel = 100.0F;
|
||||
|
||||
@@ -3,9 +3,12 @@ package tconstruct.client.tabs;
|
||||
import cpw.mods.fml.client.FMLClientHandler;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.*;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.gui.inventory.GuiInventory;
|
||||
import net.minecraft.network.play.client.C0DPacketCloseWindow;
|
||||
import net.minecraftforge.client.event.GuiScreenEvent;
|
||||
|
||||
public class TabRegistry
|
||||
@@ -42,7 +45,7 @@ public class TabRegistry
|
||||
|
||||
public static void openInventoryGui ()
|
||||
{
|
||||
mc.thePlayer.closeScreen();
|
||||
mc.thePlayer.sendQueue.addToSendQueue(new C0DPacketCloseWindow(mc.thePlayer.openContainer.windowId));
|
||||
GuiInventory inventory = new GuiInventory(mc.thePlayer);
|
||||
mc.displayGuiScreen(inventory);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user