mirror of
https://github.com/GTNewHorizons/Electro-Magic-Tools.git
synced 2026-11-26 06:43:01 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
43c4963f3a | ||
|
|
2690cd2cd8 | ||
|
|
92b3fb8388 |
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
||||
// Add your dependencies here
|
||||
|
||||
dependencies {
|
||||
compile 'com.github.GTNewHorizons:GT5-Unofficial:5.09.41.161:dev'
|
||||
compile 'com.github.GTNewHorizons:GT5-Unofficial:5.09.41.195:dev'
|
||||
compile 'com.github.GTNewHorizons:Baubles:1.0.1.14:dev'
|
||||
|
||||
compile 'net.industrial-craft:industrialcraft-2:2.2.828-experimental:dev'
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package emt.client;
|
||||
|
||||
import cpw.mods.fml.client.registry.ClientRegistry;
|
||||
import emt.EMT;
|
||||
import emt.util.EMTTextHelper;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import org.lwjgl.input.Keyboard;
|
||||
@@ -9,7 +10,7 @@ public class EMTKeys {
|
||||
public static KeyBinding keyUnequip;
|
||||
|
||||
public static void registerKeys() {
|
||||
keyUnequip = new KeyBinding(EMTTextHelper.localize("gui.EMT.key.unequip"), Keyboard.KEY_Z, "EMT");
|
||||
keyUnequip = new KeyBinding(EMTTextHelper.localize("gui.EMT.key.unequip"), Keyboard.KEY_NONE, EMT.NAME);
|
||||
ClientRegistry.registerKeyBinding(keyUnequip);
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,7 @@ public class EMT_RecipeAdder {
|
||||
1,
|
||||
E,
|
||||
false,
|
||||
false)
|
||||
true)
|
||||
.setSlotOverlay(false, false, EMT_UITextures.OVERLAY_SLOT_FUSION_CRAFTING);
|
||||
|
||||
public static void addFusionCraftingRecipe(
|
||||
|
||||
@@ -4,6 +4,7 @@ import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import emt.EMT;
|
||||
import emt.init.EMTItems;
|
||||
import emt.util.EMTConfigHandler;
|
||||
import emt.util.EMTTextHelper;
|
||||
import ic2.api.item.ElectricItem;
|
||||
@@ -29,6 +30,7 @@ import thaumcraft.api.IRunicArmor;
|
||||
import thaumcraft.api.IVisDiscountGear;
|
||||
import thaumcraft.api.aspects.Aspect;
|
||||
import thaumcraft.common.Thaumcraft;
|
||||
import thaumcraft.common.items.armor.Hover;
|
||||
|
||||
public class ItemElectricBootsTraveller extends ItemArmor
|
||||
implements IRunicArmor, IElectricItem, IVisDiscountGear, IMetalArmor, ISpecialArmor {
|
||||
@@ -37,7 +39,8 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
public int energyPerDamage = 1000;
|
||||
public int visDiscount = 2;
|
||||
public float speedBonus = 0.055F;
|
||||
public float jumpBonus = 0.3F;
|
||||
// constant from Thaumcraft's EventHandlerEntity#playerJumps for basic Traveller Boots
|
||||
public float jumpBonus = 0.2750000059604645F;
|
||||
public double transferLimit = 100;
|
||||
|
||||
public ItemElectricBootsTraveller(ArmorMaterial material, int par3, int par4) {
|
||||
@@ -117,19 +120,29 @@ public class ItemElectricBootsTraveller extends ItemArmor
|
||||
|
||||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
if ((!player.capabilities.isFlying) && (player.moveForward > 0.0F)) {
|
||||
if ((player.worldObj.isRemote) && (!player.isSneaking())) {
|
||||
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(
|
||||
Integer.valueOf(player.getEntityId()))) {
|
||||
Thaumcraft.instance.entityEventHandler.prevStep.put(
|
||||
Integer.valueOf(player.getEntityId()), Float.valueOf(player.stepHeight));
|
||||
if (!player.capabilities.isFlying && player.moveForward > 0.0F) {
|
||||
if (player.worldObj.isRemote && !player.isSneaking()) {
|
||||
if (!Thaumcraft.instance.entityEventHandler.prevStep.containsKey(player.getEntityId())) {
|
||||
Thaumcraft.instance.entityEventHandler.prevStep.put(player.getEntityId(), player.stepHeight);
|
||||
}
|
||||
player.stepHeight = 1.0F;
|
||||
}
|
||||
|
||||
if (((player.onGround || player.capabilities.isFlying) && player.moveForward > 0F)) {
|
||||
player.moveFlying(0F, 1F, speedBonus);
|
||||
player.jumpMovementFactor = jumpBonus;
|
||||
if (player.onGround) {
|
||||
float bonus = speedBonus;
|
||||
if (player.isInWater()) {
|
||||
bonus /= 4.0F;
|
||||
}
|
||||
|
||||
player.moveFlying(0.0F, 1.0F, bonus);
|
||||
} else if (Hover.getHover(player.getEntityId())) {
|
||||
// Base ItemBootsTraveller jumpBonus equals to jumpBonus of Electric Boots,
|
||||
// so any other boots factor can be calculated via proportion method
|
||||
player.jumpMovementFactor =
|
||||
0.03F / ((ItemElectricBootsTraveller) EMTItems.electricBootsTraveller).jumpBonus * jumpBonus;
|
||||
} else {
|
||||
player.jumpMovementFactor =
|
||||
0.05F / ((ItemElectricBootsTraveller) EMTItems.electricBootsTraveller).jumpBonus * jumpBonus;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
package emt.nei;
|
||||
|
||||
import static emt.nei.NEI_Config.isAdded;
|
||||
|
||||
import codechicken.nei.recipe.GuiCraftingRecipe;
|
||||
import codechicken.nei.recipe.GuiUsageRecipe;
|
||||
import codechicken.nei.recipe.TemplateRecipeHandler;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import gregtech.api.enums.GT_Values;
|
||||
import gregtech.api.util.GT_Recipe;
|
||||
import gregtech.nei.GT_NEI_DefaultHandler;
|
||||
|
||||
public class FusionCraftingHandler extends GT_NEI_DefaultHandler {
|
||||
// TODO: BETTER GUI <3
|
||||
public FusionCraftingHandler(GT_Recipe.GT_Recipe_Map aRecipeMap) {
|
||||
super(aRecipeMap);
|
||||
if (!isAdded) {
|
||||
FMLInterModComms.sendRuntimeMessage(
|
||||
GT_Values.GT,
|
||||
"NEIPlugins",
|
||||
"register-crafting-handler",
|
||||
"emt@" + this.getRecipeName() + "@" + this.getOverlayIdentifier());
|
||||
GuiCraftingRecipe.craftinghandlers.add(this);
|
||||
GuiUsageRecipe.usagehandlers.add(this);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public TemplateRecipeHandler newInstance() {
|
||||
return new FusionCraftingHandler(this.mRecipeMap);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,6 @@ package emt.nei;
|
||||
import codechicken.nei.api.IConfigureNEI;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
import emt.EMT;
|
||||
import emt.gthandler.common.loader.EMT_RecipeAdder;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public class NEI_Config implements IConfigureNEI {
|
||||
@@ -13,7 +12,6 @@ public class NEI_Config implements IConfigureNEI {
|
||||
@Override
|
||||
public void loadConfig() {
|
||||
NEI_Config.isAdded = false;
|
||||
new FusionCraftingHandler(EMT_RecipeAdder.sFusionCraftingRecipes);
|
||||
NEI_Config.isAdded = true;
|
||||
}
|
||||
|
||||
@@ -28,7 +26,7 @@ public class NEI_Config implements IConfigureNEI {
|
||||
}
|
||||
|
||||
public static void Init() {
|
||||
sendHandler("emt.nei.FusionCraftingHandler", "gregtech:gt.blockmachines:5001");
|
||||
sendHandler("emt.recipe.fusioncrafting", "gregtech:gt.blockmachines:5001");
|
||||
sendCatalyst("emt.recipe.fusioncrafting", "gregtech:gt.blockmachines:5001");
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public class EMTClientEventHandler {
|
||||
|
||||
@SubscribeEvent
|
||||
public void clientTick(ClientTickEvent e) {
|
||||
if (EMTKeys.keyUnequip.getIsKeyPressed()) {
|
||||
if (EMTKeys.keyUnequip.isPressed()) {
|
||||
EMT.INSTANCE.sendToServer(new PacketEMTKeys());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user