mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 20:22:36 +00:00
Fixes Issue #945
This commit is contained in:
1 parent
2342d4a5e2
commit
efac2f7a73
10 files changed
+26
-25
No files matched your search
@@ -29,7 +29,6 @@ import tconstruct.api.TConstructAPI;
|
||||
import tconstruct.armor.TinkerArmor;
|
||||
import tconstruct.armor.player.TPlayerHandler;
|
||||
import tconstruct.armor.player.TPlayerStats;
|
||||
import tconstruct.client.TControls;
|
||||
import tconstruct.library.TConstructCreativeTab;
|
||||
import tconstruct.common.TProxyCommon;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
@@ -154,11 +153,6 @@ public class TConstruct
|
||||
MinecraftForge.EVENT_BUS.register(playerTracker);
|
||||
NetworkRegistry.INSTANCE.registerGuiHandler(TConstruct.instance, proxy);
|
||||
|
||||
if (event.getSide() == Side.CLIENT)
|
||||
{
|
||||
FMLCommonHandler.instance().bus().register(new TControls());
|
||||
}
|
||||
|
||||
pulsar.preInit(event);
|
||||
|
||||
if (PHConstruct.addToVillages)
|
||||
|
||||
@@ -5,7 +5,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import tconstruct.armor.player.TPlayerStats;
|
||||
import tconstruct.client.TControls;
|
||||
import tconstruct.client.ArmorControls;
|
||||
import tconstruct.library.modifier.IModifyable;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
@@ -14,7 +14,7 @@ import cpw.mods.fml.common.gameevent.TickEvent;
|
||||
public class ArmorAbilitiesClient
|
||||
{
|
||||
Minecraft mc;
|
||||
TControls controlInstance;
|
||||
ArmorControls controlInstance;
|
||||
|
||||
ItemStack prevFeet;
|
||||
double prevMotionY;
|
||||
@@ -25,7 +25,7 @@ public class ArmorAbilitiesClient
|
||||
float prevMouseSensitivity;
|
||||
boolean sprint;
|
||||
|
||||
public ArmorAbilitiesClient(Minecraft mc, TControls p)
|
||||
public ArmorAbilitiesClient(Minecraft mc, ArmorControls p)
|
||||
{
|
||||
this.mc = mc;
|
||||
this.controlInstance = p;
|
||||
|
||||
@@ -39,7 +39,7 @@ import tconstruct.armor.model.HiddenPlayerModel;
|
||||
import tconstruct.armor.model.WingModel;
|
||||
import tconstruct.armor.player.ArmorExtended;
|
||||
import tconstruct.armor.player.KnapsackInventory;
|
||||
import tconstruct.client.TControls;
|
||||
import tconstruct.client.ArmorControls;
|
||||
import tconstruct.client.TKeyHandler;
|
||||
import tconstruct.client.tabs.InventoryTabArmorExtended;
|
||||
import tconstruct.client.tabs.InventoryTabKnapsack;
|
||||
@@ -148,12 +148,12 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
}
|
||||
|
||||
/* Keybindings */
|
||||
public static TControls controlInstance;
|
||||
public static ArmorControls controlInstance;
|
||||
|
||||
@Override
|
||||
public void registerKeys ()
|
||||
{
|
||||
controlInstance = new TControls();
|
||||
controlInstance = new ArmorControls();
|
||||
uploadKeyBindingsToGame(Minecraft.getMinecraft().gameSettings, controlInstance);
|
||||
|
||||
TabRegistry.registerTab(new InventoryTabVanilla());
|
||||
@@ -191,7 +191,7 @@ public class ArmorProxyClient extends ArmorProxyCommon
|
||||
@SubscribeEvent
|
||||
public void goggleZoom (FOVUpdateEvent event)
|
||||
{
|
||||
if (TControls.zoom)
|
||||
if (ArmorControls.zoom)
|
||||
{
|
||||
ItemStack helmet = event.entity.getCurrentArmor(3);
|
||||
if (helmet != null && helmet.getItem() instanceof TravelGear)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
package tconstruct.armor;
|
||||
|
||||
import net.minecraft.client.Minecraft;
|
||||
import tconstruct.client.TControls;
|
||||
import tconstruct.client.ArmorControls;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.ClientTickEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -11,7 +11,7 @@ public class ArmorTickHandler
|
||||
{
|
||||
Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
TControls controlInstance = ((ArmorProxyClient)TinkerArmor.proxy).controlInstance;
|
||||
ArmorControls controlInstance = ((ArmorProxyClient)TinkerArmor.proxy).controlInstance;
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@SubscribeEvent
|
||||
|
||||
@@ -27,6 +27,7 @@ import tconstruct.armor.items.TravelGear;
|
||||
import tconstruct.armor.items.TravelGlove;
|
||||
import tconstruct.armor.items.TravelWings;
|
||||
import tconstruct.blocks.logic.DryingRackLogic;
|
||||
import tconstruct.client.ArmorControls;
|
||||
import tconstruct.library.TConstructRegistry;
|
||||
import tconstruct.library.accessory.AccessoryCore;
|
||||
import tconstruct.library.armor.ArmorPart;
|
||||
@@ -51,6 +52,7 @@ import cpw.mods.fml.common.event.FMLPostInitializationEvent;
|
||||
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
import cpw.mods.fml.common.registry.GameRegistry.ObjectHolder;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
||||
@ObjectHolder(TConstruct.modID)
|
||||
@Pulse(id = "Tinkers' Armory", description = "Modifyable armors, such as the traveller's gear.")
|
||||
@@ -94,6 +96,11 @@ public class TinkerArmor
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.register(new TinkerArmorEvents());
|
||||
FMLCommonHandler.instance().bus().register(new ArmorAbilities());
|
||||
|
||||
if (event.getSide() == Side.CLIENT)
|
||||
{
|
||||
FMLCommonHandler.instance().bus().register(new ArmorControls());
|
||||
}
|
||||
|
||||
TinkerArmor.dryingRack = new DryingRack().setBlockName("Armor.DryingRack");
|
||||
GameRegistry.registerBlock(TinkerArmor.dryingRack, "Armor.DryingRack");
|
||||
|
||||
@@ -11,7 +11,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import tconstruct.armor.ArmorProxyClient;
|
||||
import tconstruct.client.TControls;
|
||||
import tconstruct.client.ArmorControls;
|
||||
import tconstruct.library.accessory.AccessoryCore;
|
||||
import tconstruct.library.accessory.IAccessoryModel;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -60,6 +60,6 @@ public class TravelBelt extends AccessoryCore implements IAccessoryModel
|
||||
return;
|
||||
|
||||
list.add("\u00a76Ability: Swap Hotbar");
|
||||
list.add("\u00a76Control: "+GameSettings.getKeyDisplayString(TControls.beltSwap.getKeyCode()));
|
||||
list.add("\u00a76Control: "+GameSettings.getKeyDisplayString(ArmorControls.beltSwap.getKeyCode()));
|
||||
}
|
||||
}
|
||||
@@ -175,8 +175,8 @@ public class TravelGear extends ArmorCore
|
||||
switch (armorPart)
|
||||
{
|
||||
case Head:
|
||||
list.add("\u00a76Ability: Zoom with " + GameSettings.getKeyDisplayString(tconstruct.client.TControls.zoomKey.getKeyCode()));
|
||||
list.add("\u00a76Toggle Abilities: " + GameSettings.getKeyDisplayString(tconstruct.client.TControls.toggleGoggles.getKeyCode()));
|
||||
list.add("\u00a76Ability: Zoom with " + GameSettings.getKeyDisplayString(tconstruct.client.ArmorControls.zoomKey.getKeyCode()));
|
||||
list.add("\u00a76Toggle Abilities: " + GameSettings.getKeyDisplayString(tconstruct.client.ArmorControls.toggleGoggles.getKeyCode()));
|
||||
break;
|
||||
case Chest:
|
||||
list.add("\u00a76Ability: Swift Swim");
|
||||
|
||||
+2
-2
@@ -21,7 +21,7 @@ import tconstruct.util.network.DoubleJumpPacket;
|
||||
import tconstruct.util.network.GogglePacket;
|
||||
import cpw.mods.fml.common.gameevent.TickEvent.Type;
|
||||
|
||||
public class TControls extends TKeyHandler
|
||||
public class ArmorControls extends TKeyHandler
|
||||
{
|
||||
public static final String keybindCategory = "tconstruct.keybindings";
|
||||
public static KeyBinding armorKey = new KeyBinding("key.tarmor", 24, keybindCategory);
|
||||
@@ -43,7 +43,7 @@ public class TControls extends TKeyHandler
|
||||
|
||||
// boolean onStilts = false;
|
||||
|
||||
public TControls()
|
||||
public ArmorControls()
|
||||
{
|
||||
super(new KeyBinding[] { armorKey, toggleGoggles, beltSwap, zoomKey }, new boolean[] { false, false, false, false }, getVanillaKeyBindings(), new boolean[] { false, false });
|
||||
/*ClientRegistry.registerKeyBinding(armorKey);
|
||||
@@ -2,7 +2,7 @@ package tconstruct.client.tabs;
|
||||
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.client.TControls;
|
||||
import tconstruct.client.ArmorControls;
|
||||
|
||||
public class InventoryTabArmorExtended extends AbstractTab
|
||||
{
|
||||
@@ -14,7 +14,7 @@ public class InventoryTabArmorExtended extends AbstractTab
|
||||
@Override
|
||||
public void onTabClicked ()
|
||||
{
|
||||
TControls.openArmorGui();
|
||||
ArmorControls.openArmorGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -3,7 +3,7 @@ package tconstruct.client.tabs;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import tconstruct.armor.ArmorProxyClient;
|
||||
import tconstruct.armor.TinkerArmor;
|
||||
import tconstruct.client.TControls;
|
||||
import tconstruct.client.ArmorControls;
|
||||
|
||||
public class InventoryTabKnapsack extends AbstractTab
|
||||
{
|
||||
@@ -15,7 +15,7 @@ public class InventoryTabKnapsack extends AbstractTab
|
||||
@Override
|
||||
public void onTabClicked ()
|
||||
{
|
||||
TControls.openKnapsackGui();
|
||||
ArmorControls.openKnapsackGui();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user