From edff518b724c24e9c23d1b22fea82d1aa224abf0 Mon Sep 17 00:00:00 2001 From: Calclavia Date: Wed, 12 Mar 2014 18:50:04 +0800 Subject: [PATCH] Fixed IMechanicalNode dependent on MechanicalNode --- .../electrical/generator/TileGenerator.java | 1 - .../electrical/multimeter/GuiMultimeter.java | 6 +++--- .../mechanical/energy/gear/PartGear.java | 3 ++- .../mechanical/energy/gear/PartGearShaft.java | 3 ++- .../mechanical/energy/grid/MechanicalNode.java | 4 ++-- .../mechanical/energy/turbine/TileMechanicalTurbine.java | 5 +++-- .../mechanical/process/grinder/TileGrindingWheel.java | 4 ++-- .../mechanical/process/purifier/TileMixer.java | 4 ++-- src/main/java/resonantinduction/api/IMechanicalNode.java | 8 +++++--- src/main/resources/assets/resonantinduction/languages | 2 +- 10 files changed, 22 insertions(+), 18 deletions(-) diff --git a/electrical/src/main/java/resonantinduction/electrical/generator/TileGenerator.java b/electrical/src/main/java/resonantinduction/electrical/generator/TileGenerator.java index f96b20f86..d7f98195a 100644 --- a/electrical/src/main/java/resonantinduction/electrical/generator/TileGenerator.java +++ b/electrical/src/main/java/resonantinduction/electrical/generator/TileGenerator.java @@ -8,7 +8,6 @@ import resonantinduction.api.IMechanicalNode; import resonantinduction.core.grid.INode; import resonantinduction.core.grid.INodeProvider; import resonantinduction.core.grid.NodeRegistry; -import resonantinduction.mechanical.energy.grid.MechanicalNode; import universalelectricity.api.energy.EnergyStorageHandler; import calclavia.lib.prefab.tile.IRotatable; import calclavia.lib.prefab.tile.TileElectrical; diff --git a/electrical/src/main/java/resonantinduction/electrical/multimeter/GuiMultimeter.java b/electrical/src/main/java/resonantinduction/electrical/multimeter/GuiMultimeter.java index eb06ff955..1728232d7 100644 --- a/electrical/src/main/java/resonantinduction/electrical/multimeter/GuiMultimeter.java +++ b/electrical/src/main/java/resonantinduction/electrical/multimeter/GuiMultimeter.java @@ -36,8 +36,8 @@ public class GuiMultimeter extends GuiContainerBase { super.initGui(); this.buttonList.add(new GuiButton(0, this.width / 2 + 20, this.height / 2 - 23, 50, 20, LanguageUtility.getLocal("gui.resonantinduction.multimeter.toggle"))); - this.buttonList.add(new GuiButton(1, this.width / 2 - 80, this.height / 2 - 75, 100, 20, "Toggle Detection")); - this.buttonList.add(new GuiButton(2, this.width / 2 - 80, this.height / 2 + 0, 80, 20, "Toggle Graph")); + this.buttonList.add(new GuiButton(1, this.width / 2 - 80, this.height / 2 - 75, 100, 20, LanguageUtility.getLocal("gui.resonantinduction.multimeter.toggleDetection"))); + this.buttonList.add(new GuiButton(2, this.width / 2 - 80, this.height / 2 + 0, 80, 20, LanguageUtility.getLocal("gui.resonantinduction.multimeter.toggleGraph"))); this.textFieldLimit = new GuiTextField(fontRenderer, 9, 90, 90, 12); this.textFieldLimit.setMaxStringLength(8); this.textFieldLimit.setText("" + this.multimeter.redstoneTriggerLimit); @@ -92,7 +92,7 @@ public class GuiMultimeter extends GuiContainerBase this.fontRenderer.drawString(s, this.xSize / 2 - this.fontRenderer.getStringWidth(s) / 2, 6, 4210752); this.fontRenderer.drawString(EnumColor.INDIGO + "Detection Type", 9, 20, 4210752); this.fontRenderer.drawString(multimeter.getNetwork().getDisplay(multimeter.detectType), 9, 60, 4210752); - this.fontRenderer.drawString("Logic: " + EnumColor.RED + LanguageUtility.getLocal("gui.resonantinduction.multimeter." + this.multimeter.getMode().display), 9, 75, 4210752); + this.fontRenderer.drawString(LanguageUtility.getLocal("gui.resonantinduction.multimeter.logic")+" " + EnumColor.RED + LanguageUtility.getLocal("gui.resonantinduction.multimeter." + this.multimeter.getMode().display), 9, 75, 4210752); this.fontRenderer.drawString(graphName, 95, 115, 4210752); this.textFieldLimit.drawTextBox(); } diff --git a/mechanical/src/main/java/resonantinduction/mechanical/energy/gear/PartGear.java b/mechanical/src/main/java/resonantinduction/mechanical/energy/gear/PartGear.java index 305752a27..824c16e16 100644 --- a/mechanical/src/main/java/resonantinduction/mechanical/energy/gear/PartGear.java +++ b/mechanical/src/main/java/resonantinduction/mechanical/energy/gear/PartGear.java @@ -11,6 +11,7 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; +import resonantinduction.api.IMechanicalNode; import resonantinduction.core.Reference; import resonantinduction.core.grid.INode; import resonantinduction.core.grid.INodeProvider; @@ -317,7 +318,7 @@ public class PartGear extends PartMechanical implements IMultiBlockStructure 0 || dir.offsetZ < 0 || dir.offsetY < 0); } diff --git a/mechanical/src/main/java/resonantinduction/mechanical/process/purifier/TileMixer.java b/mechanical/src/main/java/resonantinduction/mechanical/process/purifier/TileMixer.java index 1ccd68b57..fdd3a2330 100644 --- a/mechanical/src/main/java/resonantinduction/mechanical/process/purifier/TileMixer.java +++ b/mechanical/src/main/java/resonantinduction/mechanical/process/purifier/TileMixer.java @@ -12,13 +12,13 @@ import net.minecraft.inventory.IInventory; import net.minecraft.item.ItemStack; import net.minecraft.util.AxisAlignedBB; import net.minecraftforge.common.ForgeDirection; +import resonantinduction.api.IMechanicalNode; import resonantinduction.api.recipe.MachineRecipes; import resonantinduction.api.recipe.MachineRecipes.RecipeType; import resonantinduction.archaic.filter.Timer; import resonantinduction.core.Reference; import resonantinduction.core.resource.ResourceGenerator; import resonantinduction.core.resource.fluid.BlockFluidMixture; -import resonantinduction.mechanical.energy.grid.MechanicalNode; import resonantinduction.mechanical.energy.grid.TileMechanical; import universalelectricity.api.vector.Vector3; import calclavia.lib.utility.inventory.InventoryUtility; @@ -38,7 +38,7 @@ public class TileMixer extends TileMechanical implements IInventory mechanicalNode = new PacketMechanicalNode(this) { @Override - public boolean inverseRotation(ForgeDirection dir, MechanicalNode with) + public boolean inverseRotation(ForgeDirection dir, IMechanicalNode with) { return dir == ForgeDirection.DOWN; } diff --git a/src/main/java/resonantinduction/api/IMechanicalNode.java b/src/main/java/resonantinduction/api/IMechanicalNode.java index 7e0e5337a..96927d77a 100644 --- a/src/main/java/resonantinduction/api/IMechanicalNode.java +++ b/src/main/java/resonantinduction/api/IMechanicalNode.java @@ -1,7 +1,7 @@ package resonantinduction.api; -import resonantinduction.mechanical.energy.grid.MechanicalNode; import net.minecraftforge.common.ForgeDirection; +import universalelectricity.api.vector.Vector3; public interface IMechanicalNode extends IEnergyNode { @@ -11,9 +11,11 @@ public interface IMechanicalNode extends IEnergyNode public void apply(double torque, double angularVelocity); - public float getRatio(ForgeDirection dir, MechanicalNode with); + public float getRatio(ForgeDirection dir, IMechanicalNode with); - public boolean inverseRotation(ForgeDirection dir, MechanicalNode with); + public boolean inverseRotation(ForgeDirection dir, IMechanicalNode with); public IMechanicalNode setLoad(double load); + + public Vector3 position(); } diff --git a/src/main/resources/assets/resonantinduction/languages b/src/main/resources/assets/resonantinduction/languages index b844cd552..2e44e1e10 160000 --- a/src/main/resources/assets/resonantinduction/languages +++ b/src/main/resources/assets/resonantinduction/languages @@ -1 +1 @@ -Subproject commit b844cd552de8c92eff809688b259c3b3a0600980 +Subproject commit 2e44e1e10066c5e30f5e707fffbf70f159c50cca