From 58ee6f2df4c830f73d294d56ea8732273ae52f58 Mon Sep 17 00:00:00 2001 From: Adrian Siekierka Date: Wed, 12 Nov 2014 17:07:35 +0100 Subject: [PATCH] Clay Insertion Pipes, add translations for clay transport/sandstone power pipes --- .../assets/buildcraft/lang/en_US.lang | 8 ++- .../textures/blocks/pipeItemsClay.png | Bin 0 -> 786 bytes .../textures/blocks/pipePowerSandstone.png | Bin 0 -> 328 bytes common/buildcraft/BuildCraftTransport.java | 3 + .../transport/PipeIconProvider.java | 1 + .../transport/TransportProxyClient.java | 3 +- .../transport/pipes/PipeItemsClay.java | 67 ++++++++++++++++++ 7 files changed, 79 insertions(+), 3 deletions(-) create mode 100644 buildcraft_resources/assets/buildcraft/textures/blocks/pipeItemsClay.png create mode 100644 buildcraft_resources/assets/buildcraft/textures/blocks/pipePowerSandstone.png create mode 100644 common/buildcraft/transport/pipes/PipeItemsClay.java diff --git a/buildcraft_resources/assets/buildcraft/lang/en_US.lang b/buildcraft_resources/assets/buildcraft/lang/en_US.lang index 6dcd68e7..bb1d4e20 100644 --- a/buildcraft_resources/assets/buildcraft/lang/en_US.lang +++ b/buildcraft_resources/assets/buildcraft/lang/en_US.lang @@ -214,6 +214,7 @@ item.PipeItemsEmerald.name=Emerald Transport Pipe item.PipeItemsLapis.name=Lazuli Transport Pipe item.PipeItemsDaizuli.name=Daizuli Transport Pipe item.PipeItemsEmzuli.name=Emzuli Transport Pipe +item.PipeItemsClay.name=Clay Transport Pipe item.PipeFluidsWood.name=Wooden Fluid Pipe item.PipeFluidsCobblestone.name=Cobblestone Fluid Pipe item.PipeFluidsStone.name=Stone Fluid Pipe @@ -235,6 +236,7 @@ item.PipeItemsVoid.name=Void Transport Pipe item.PipeFluidsVoid.name=Void Fluid Pipe item.PipeItemsSandstone.name=Sandstone Transport Pipe item.PipeFluidsSandstone.name=Sandstone Fluid Pipe +item.PipePowerSandstone.name=Sandstone Kinesis Pipe item.PipeRobotStation.name=Docking Station item.Facade.name=Facade item.FacadePhased.name=Phased Facade @@ -301,12 +303,13 @@ tip.gate.wires.emerald=Red, Blue, Green, Yellow tip.gate.expansions=§9§oInstalled Expansions: tip.PipeFluidsCobblestone=Won't connect to Stone -tip.PipeFluidsEmerald=Extraction pipe, 40 mB/t +tip.PipeFluidsEmerald=Extraction pipe tip.PipeFluidsIron=Valve pipe tip.PipeFluidsSandstone=Only connects to other pipes tip.PipeFluidsStone=Won't connect to Cobblestone tip.PipeFluidsVoid=Destroys fluids tip.PipeFluidsWood=Extraction pipe +tip.PipeItemsClay=Insertion pipe tip.PipeItemsCobblestone=Basic pipe, high drag\nWon't connect to Stone or Quartz tip.PipeItemsDaizuli=Routes painted items tip.PipeItemsDiamond=Sorts items @@ -321,9 +324,10 @@ tip.PipeItemsStone=Basic pipe, medium drag\nWon't connect to Cobblestone or Quar tip.PipeItemsVoid=Destroys items tip.PipeItemsWood=Extraction pipe tip.PipeItemsEmzuli=Gate controlled extraction pipe -tip.PipePowerWood=Power Input Pipe tip.PipePowerEmerald=Power Input Pipe tip.PipePowerIron=Selectable Limiter Pipe +tip.PipePowerSandstone=Only connects to other pipes +tip.PipePowerWood=Power Input Pipe tip.PipeStructureCobblestone=Support pipe tip.tool.add=Add diff --git a/buildcraft_resources/assets/buildcraft/textures/blocks/pipeItemsClay.png b/buildcraft_resources/assets/buildcraft/textures/blocks/pipeItemsClay.png new file mode 100644 index 0000000000000000000000000000000000000000..1c8a2e9dad97dffc5539e7c3309f7c2c5de7a151 GIT binary patch literal 786 zcmV+t1MU2YP)w@0QaqJVKm0h#BSCWXuMH@xjgYeH>9j3K%a zm$oxUafk@kS@!K9#-RJYi>e|2eY0oLts7x&8P%Xp4-Mbs{ z&dclaMAcnljM7?@TC146WoVvOL|-2NmNjK+DYQ~K+6ut=yx?ue-Q9155a{EC7-8sU z%+-8FX<4Uf5^c(SHL-0QAqGyjC#^0HW9mxyxJkxa@ z>$+mZ>VDZ}97fF5JoDl7iHEQM5^PV-nHVFvB%DNsZl>>hocCNVX8rVZNuc8 z)f%h6{Cua&dC_4UNO@6ftSX1D`&rj@)qUIa_Vk`o3r(B0ruz2!rsjISk-{cx&T@0Q z7C~sOi7`gbm$Rfx5h)=`^Kk_zcLQj zjQy1c-%AJqV=G%p4Bd=2i&>tZ*!Lap9P>QmU5_+}cb>eT`SJ8sQ(olp`5UDaL_NpW zNO{2rk2y-lM+3mN?_9q>;iHh>wjE-rPzTMuuUaX=6JQad22`xujSA2flubp37@b QSpWb407*qoM6N<$f@hX=2mk;8 literal 0 HcmV?d00001 diff --git a/buildcraft_resources/assets/buildcraft/textures/blocks/pipePowerSandstone.png b/buildcraft_resources/assets/buildcraft/textures/blocks/pipePowerSandstone.png new file mode 100644 index 0000000000000000000000000000000000000000..97a53dda6029cfbea238e24705793521ba20d14f GIT binary patch literal 328 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPqHxHi#PsG&)dO)G8o-U3d7N?UF9GIt{^ZEIIe&a*? zT|esC+Wv1}f9|M2x|8^YD;H7@u>Sk^_q4->2KDdvADA@E51z7taen>2W0?n*zn{^z z*=Fy~cmEeZ-!6GYq*OAlw&KizPyMqSf#Bie)xQ7t*Zn^C;o)CvHnFfUHnzDUY;t9Z zZI9Wl{wuFeJtCIC0|Y%l^rG>E1J8}^d*zlN`hMPAu#Z(RFmO)W{>tyO5qA8kDG z>CH1Mwl5hWhCK(RdT(4wYLFIBdvu0d{kxxv4EOnY_J<|evZA_pn)Rg^Uo=-Uh{>yZ Q0zJs!>FVdQ&MBb@0K!d$V*mgE literal 0 HcmV?d00001 diff --git a/common/buildcraft/BuildCraftTransport.java b/common/buildcraft/BuildCraftTransport.java index 233f4dfe..d1f5b2b0 100644 --- a/common/buildcraft/BuildCraftTransport.java +++ b/common/buildcraft/BuildCraftTransport.java @@ -89,6 +89,7 @@ import buildcraft.transport.pipes.PipeFluidsSandstone; import buildcraft.transport.pipes.PipeFluidsStone; import buildcraft.transport.pipes.PipeFluidsVoid; import buildcraft.transport.pipes.PipeFluidsWood; +import buildcraft.transport.pipes.PipeItemsClay; import buildcraft.transport.pipes.PipeItemsCobblestone; import buildcraft.transport.pipes.PipeItemsDaizuli; import buildcraft.transport.pipes.PipeItemsDiamond; @@ -181,6 +182,7 @@ public class BuildCraftTransport extends BuildCraftMod { public static Item pipeItemsSandstone; public static Item pipeItemsEmzuli; public static Item pipeItemsStripes; + public static Item pipeItemsClay; public static Item pipeFluidsWood; public static Item pipeFluidsCobblestone; public static Item pipeFluidsStone; @@ -391,6 +393,7 @@ public class BuildCraftTransport extends BuildCraftMod { pipeItemsVoid = buildPipe(PipeItemsVoid.class, "Void Transport Pipe", CreativeTabBuildCraft.PIPES, "dyeBlack", Blocks.glass, "dustRedstone"); pipeItemsEmzuli = buildPipe(PipeItemsEmzuli.class, "Emzuli Transport Pipe", CreativeTabBuildCraft.PIPES, "blockLapis", Blocks.glass, "gemEmerald"); pipeItemsStripes = buildPipe(PipeItemsStripes.class, "Stripes Transport Pipe", CreativeTabBuildCraft.PIPES, "gearGold", Blocks.glass, "gearGold"); + pipeItemsClay = buildPipe(PipeItemsClay.class, "Clay Transport Pipe", CreativeTabBuildCraft.PIPES, Blocks.clay, Blocks.glass, Blocks.clay); pipeFluidsWood = buildPipe(PipeFluidsWood.class, "Wooden Waterproof Pipe", CreativeTabBuildCraft.PIPES, pipeWaterproof, pipeItemsWood); pipeFluidsCobblestone = buildPipe(PipeFluidsCobblestone.class, "Cobblestone Waterproof Pipe", CreativeTabBuildCraft.PIPES, pipeWaterproof, pipeItemsCobblestone); diff --git a/common/buildcraft/transport/PipeIconProvider.java b/common/buildcraft/transport/PipeIconProvider.java index 0e279826..383853f2 100644 --- a/common/buildcraft/transport/PipeIconProvider.java +++ b/common/buildcraft/transport/PipeIconProvider.java @@ -87,6 +87,7 @@ public class PipeIconProvider implements IIconProvider { PipeItemsSandstone("pipeItemsSandstone"), PipeItemsStone("pipeItemsStone"), PipeItemsQuartz("pipeItemsQuartz"), + PipeItemsClay("pipeItemsClay"), PipeItemsVoid("pipeItemsVoid"), // PipeFluidsCobblestone("pipeFluidsCobblestone"), diff --git a/common/buildcraft/transport/TransportProxyClient.java b/common/buildcraft/transport/TransportProxyClient.java index 9dfb36f4..aa4bf778 100644 --- a/common/buildcraft/transport/TransportProxyClient.java +++ b/common/buildcraft/transport/TransportProxyClient.java @@ -54,6 +54,7 @@ public class TransportProxyClient extends TransportProxy { MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsDaizuli, pipeItemRenderer); MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsEmzuli, pipeItemRenderer); MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStripes, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsClay, pipeItemRenderer); MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsWood, pipeItemRenderer); MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsCobblestone, pipeItemRenderer); @@ -71,13 +72,13 @@ public class TransportProxyClient extends TransportProxy { MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerGold, pipeItemRenderer); MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerDiamond, pipeItemRenderer); MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerEmerald, pipeItemRenderer); - MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerSandstone, pipeItemRenderer); MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeStructureCobblestone, pipeItemRenderer); MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsVoid, pipeItemRenderer); MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsVoid, pipeItemRenderer); MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsSandstone, pipeItemRenderer); MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsSandstone, pipeItemRenderer); + MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerSandstone, pipeItemRenderer); MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.facadeItem, facadeItemRenderer); MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.plugItem, plugItemRenderer); diff --git a/common/buildcraft/transport/pipes/PipeItemsClay.java b/common/buildcraft/transport/pipes/PipeItemsClay.java new file mode 100644 index 00000000..3e599f6c --- /dev/null +++ b/common/buildcraft/transport/pipes/PipeItemsClay.java @@ -0,0 +1,67 @@ +/** + * Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team + * http://www.mod-buildcraft.com + * + * BuildCraft is distributed under the terms of the Minecraft Mod Public + * License 1.0, or MMPL. Please check the contents of the license located in + * http://www.mod-buildcraft.com/MMPL-1.0.txt + */ +package buildcraft.transport.pipes; + +import net.minecraft.item.Item; +import net.minecraft.tileentity.TileEntity; +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import net.minecraftforge.common.util.ForgeDirection; +import buildcraft.BuildCraftTransport; +import buildcraft.api.core.IIconProvider; +import buildcraft.api.transport.IPipeTile; +import buildcraft.transport.Pipe; +import buildcraft.transport.PipeIconProvider; +import buildcraft.transport.PipeTransportItems; +import buildcraft.transport.pipes.events.PipeEventItem; + +import java.util.LinkedList; + +public class PipeItemsClay extends Pipe { + + public PipeItemsClay(Item item) { + super(new PipeTransportItems(), item); + + transport.allowBouncing = true; + } + + @Override + @SideOnly(Side.CLIENT) + public IIconProvider getIconProvider() { + return BuildCraftTransport.instance.pipeIconProvider; + } + + @Override + public int getIconIndex(ForgeDirection direction) { + return PipeIconProvider.TYPE.PipeItemsClay.ordinal(); + } + + public void eventHandler(PipeEventItem.FindDest event) { + LinkedList nonPipesList = new LinkedList(); + LinkedList pipesList = new LinkedList(); + event.item.blacklist.add(event.item.input.getOpposite()); + for (ForgeDirection o : event.destinations) { + if (!event.item.blacklist.contains(o) && container.pipe.outputOpen(o)) { + if (container.isPipeConnected(o)) { + TileEntity entity = container.getTile(o); + if (entity instanceof IPipeTile) + pipesList.add(o); + else + nonPipesList.add(o); + } + } + } + event.destinations.clear(); + if (nonPipesList.isEmpty()) { + event.destinations.addAll(pipesList); + } else { + event.destinations.addAll(nonPipesList); + } + } +}