From 3e20c039bb9767045d60fdfe4793e1b8928edd85 Mon Sep 17 00:00:00 2001 From: Calclavia Date: Sat, 22 Feb 2014 19:43:25 +0800 Subject: [PATCH] Fixed tesla electricity reception --- .../electrical/tesla/TileTesla.java | 37 +++++++++++-------- .../fluid/tank/ItemTankRenderer.java | 1 + .../mechanical/fluid/tank/RenderTank.java | 2 +- .../languages/en_US.properties | 6 ++- 4 files changed, 28 insertions(+), 18 deletions(-) diff --git a/electrical/src/main/java/resonantinduction/electrical/tesla/TileTesla.java b/electrical/src/main/java/resonantinduction/electrical/tesla/TileTesla.java index e7d19e15..e8f499c6 100644 --- a/electrical/src/main/java/resonantinduction/electrical/tesla/TileTesla.java +++ b/electrical/src/main/java/resonantinduction/electrical/tesla/TileTesla.java @@ -6,6 +6,7 @@ package resonantinduction.electrical.tesla; import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; +import java.util.EnumSet; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -19,7 +20,6 @@ import net.minecraft.tileentity.TileEntity; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import net.minecraftforge.common.ForgeDirection; -import resonantinduction.core.MultipartUtility; import resonantinduction.core.Reference; import resonantinduction.core.ResonantInduction; import resonantinduction.core.Settings; @@ -34,7 +34,6 @@ import calclavia.lib.network.IPacketReceiver; import calclavia.lib.network.IPacketSender; import calclavia.lib.prefab.tile.TileElectrical; import calclavia.lib.render.EnumColor; -import codechicken.multipart.TMultiPart; import com.google.common.io.ByteArrayDataInput; @@ -111,11 +110,11 @@ public class TileTesla extends TileElectrical implements IMultiBlockStructure getOutputDirections() + { + EnumSet dirs = super.getOutputDirections(); + dirs.remove(ForgeDirection.UP); + return dirs; + } } diff --git a/mechanical/src/main/java/resonantinduction/mechanical/fluid/tank/ItemTankRenderer.java b/mechanical/src/main/java/resonantinduction/mechanical/fluid/tank/ItemTankRenderer.java index 160dd21e..5761df0c 100644 --- a/mechanical/src/main/java/resonantinduction/mechanical/fluid/tank/ItemTankRenderer.java +++ b/mechanical/src/main/java/resonantinduction/mechanical/fluid/tank/ItemTankRenderer.java @@ -50,6 +50,7 @@ public class ItemTankRenderer implements IItemRenderer } FluidStack fluid = null; + if (item.getTagCompound() != null && item.getTagCompound().hasKey("fluid")) { fluid = FluidStack.loadFluidStackFromNBT(item.getTagCompound().getCompoundTag("fluid")); diff --git a/mechanical/src/main/java/resonantinduction/mechanical/fluid/tank/RenderTank.java b/mechanical/src/main/java/resonantinduction/mechanical/fluid/tank/RenderTank.java index 5e257929..77a8fbfb 100644 --- a/mechanical/src/main/java/resonantinduction/mechanical/fluid/tank/RenderTank.java +++ b/mechanical/src/main/java/resonantinduction/mechanical/fluid/tank/RenderTank.java @@ -45,7 +45,7 @@ public class RenderTank extends TileEntitySpecialRenderer GL11.glDisable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_BLEND); GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - bindTexture(RenderFluidHelper.getFluidSheet(fluid)); + RenderUtility.bind(RenderFluidHelper.getFluidSheet(fluid)); // Prevent Z-fighting GL11.glTranslatef((float) x, (float) y + 0.001f, (float) z); int cap = tileEntity instanceof TileTank ? ((TileTank) tileEntity).getInternalTank().getCapacity() : fluid.amount; diff --git a/src/main/resources/assets/resonantinduction/languages/en_US.properties b/src/main/resources/assets/resonantinduction/languages/en_US.properties index 2a92234a..5669477d 100644 --- a/src/main/resources/assets/resonantinduction/languages/en_US.properties +++ b/src/main/resources/assets/resonantinduction/languages/en_US.properties @@ -41,7 +41,7 @@ item.resonantinduction\:hammer.name=Hammer tile.resonantinduction\:cast.name=Metal Caster tile.resonantinduction\:cast.tooltip=Pour molten metal into the cast to form an ingot. tile.resonantinduction\:millstone.name=Millstone -tile.resonantinduction\:millstone.tooltip=Put some rubble in the millstone and start wrenching to grind rubble into dust. +tile.resonantinduction\:millstone.tooltip=Put some rubble in the millstone and start configuring to grind rubble into dust. tile.resonantinduction\:imprinter.name=Imprinter tile.resonantinduction\:engineeringTable.name=Engineering Table tile.resonantinduction\:firebox.0.name=Firebox @@ -74,8 +74,9 @@ tile.resonantinduction\:pump.name=Pump tile.resonantinduction\:grate.name=Grate tile.resonantinduction\:conveyorBelt.name=Conveyor Belt tile.resonantinduction\:tank.name=Tank +tile.resonantinduction\:tank.tooltip=Shift right click to pick up with fluid contained within. tile.resonantinduction\:detector.name=Detector -tile.resonantinduction\:detector.tooltip=Outputs a Redstone signal upon item detection. Wrench to invert imprint filter. +tile.resonantinduction\:detector.tooltip=Outputs a Redstone signal upon item detection. Configure to invert imprint filter. tile.resonantinduction\:manipulator.name=Manipulator tile.resonantinduction\:rejector.name=Rejector @@ -107,6 +108,7 @@ tile.resonantinduction\:filter.name=Filter ### Electrical Module ## Blocks tile.resonantinduction\:tesla.name=Tesla Coil +tile.resonantinduction\:tesla.tooltip=Transfer electricity wirelessly. Link with a configurator for cross-dimension teleportation. item.resonantinduction\:levitator.name=Electromagnetic Levitator tile.resonantinduction\:battery.name=Battery tile.resonantinduction\:armbot.name=Armbot