Added void pipes for items and liquids
This commit is contained in:
parent
afdf4d2ddf
commit
343f2b277b
8 changed files with 110 additions and 0 deletions
|
@ -54,6 +54,8 @@ public class mod_BuildCraftTransport extends NetworkMod implements IItemRenderer
|
|||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipePowerGold.shiftedIndex, this);
|
||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeStructureCobblestone.shiftedIndex, this);
|
||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsStipes.shiftedIndex, this);
|
||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsVoid.shiftedIndex, this);
|
||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeLiquidsVoid.shiftedIndex, this);
|
||||
}
|
||||
|
||||
public static void registerTilePipe(Class<? extends TileEntity> clas, String name) {
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
@ -63,6 +63,8 @@ item.PipePowerStone=Stone Conductive Pipe
|
|||
item.PipePowerGold=Golden Conductive Pipe
|
||||
item.PipeItemsStripes=Stripes Transport Pipe
|
||||
item.PipeStructureCobblestone=Cobblestone Structure Pipe
|
||||
item.PipeItemsVoid=Void Transport Pipe
|
||||
item.PipeLiquidsVoid=Void Waterproof Pipe
|
||||
tile.miningWellBlock=Mining Well
|
||||
tile.plainPipeBlock=Mining Pipe
|
||||
tile.autoWorkbenchBlock=Autocrafting Table
|
||||
|
|
|
@ -44,11 +44,13 @@ import net.minecraft.src.buildcraft.transport.pipes.PipeItemsIron;
|
|||
import net.minecraft.src.buildcraft.transport.pipes.PipeItemsObsidian;
|
||||
import net.minecraft.src.buildcraft.transport.pipes.PipeItemsStone;
|
||||
import net.minecraft.src.buildcraft.transport.pipes.PipeItemsStripes;
|
||||
import net.minecraft.src.buildcraft.transport.pipes.PipeItemsVoid;
|
||||
import net.minecraft.src.buildcraft.transport.pipes.PipeItemsWood;
|
||||
import net.minecraft.src.buildcraft.transport.pipes.PipeLiquidsCobblestone;
|
||||
import net.minecraft.src.buildcraft.transport.pipes.PipeLiquidsGold;
|
||||
import net.minecraft.src.buildcraft.transport.pipes.PipeLiquidsIron;
|
||||
import net.minecraft.src.buildcraft.transport.pipes.PipeLiquidsStone;
|
||||
import net.minecraft.src.buildcraft.transport.pipes.PipeLiquidsVoid;
|
||||
import net.minecraft.src.buildcraft.transport.pipes.PipeLiquidsWood;
|
||||
import net.minecraft.src.buildcraft.transport.pipes.PipePowerGold;
|
||||
import net.minecraft.src.buildcraft.transport.pipes.PipePowerStone;
|
||||
|
@ -84,12 +86,14 @@ public class BuildCraftTransport {
|
|||
public static Item pipeItemsGold;
|
||||
public static Item pipeItemsDiamond;
|
||||
public static Item pipeItemsObsidian;
|
||||
public static Item pipeItemsVoid;
|
||||
|
||||
public static Item pipeLiquidsWood;
|
||||
public static Item pipeLiquidsCobblestone;
|
||||
public static Item pipeLiquidsStone;
|
||||
public static Item pipeLiquidsIron;
|
||||
public static Item pipeLiquidsGold;
|
||||
public static Item pipeLiquidsVoid;
|
||||
|
||||
public static Item pipePowerWood;
|
||||
public static Item pipePowerStone;
|
||||
|
@ -240,6 +244,13 @@ public class BuildCraftTransport {
|
|||
pipeItemsStipes = createPipe(DefaultProps.PIPE_ITEMS_STRIPES_ID, PipeItemsStripes.class, "Stripes Transport Pipe",
|
||||
new ItemStack(Item.dyePowder, 1, 0), Block.glass, new ItemStack(Item.dyePowder, 1, 11));
|
||||
|
||||
pipeItemsVoid = createPipe(DefaultProps.PIPE_ITEMS_VOID_ID, PipeItemsVoid.class, "Void Transport Pipe",
|
||||
new ItemStack(Item.dyePowder, 1, 0), Block.glass, Item.redstone);
|
||||
|
||||
pipeLiquidsVoid = createPipe(DefaultProps.PIPE_LIQUIDS_VOID_ID, PipeLiquidsVoid.class, "Void Waterproof Pipe",
|
||||
pipeWaterproof, pipeItemsVoid, null);
|
||||
|
||||
|
||||
// dockingStationBlock = new
|
||||
// BlockDockingStation(Integer.parseInt(dockingStationId.value));
|
||||
// ModLoader.registerBlock(dockingStationBlock);
|
||||
|
|
|
@ -75,6 +75,8 @@ public class DefaultProps {
|
|||
|
||||
public static int PIPE_ITEMS_STRIPES_ID = 4071;
|
||||
public static int PIPE_STRUCTURE_COBBLESTONE_ID = 4072;
|
||||
public static int PIPE_ITEMS_VOID_ID = 19150;
|
||||
public static int PIPE_LIQUIDS_VOID_ID = 19151;
|
||||
|
||||
public static int WOODEN_PIPE_ID = 145; // LEGACY
|
||||
public static int STONE_PIPE_ID = 146; // LEGACY
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
/**
|
||||
* Copyright (c) SpaceToad, 2011
|
||||
* 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 net.minecraft.src.buildcraft.transport;
|
||||
|
||||
public class PipeLogicVoid extends PipeLogic {
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
/**
|
||||
* Copyright (c) SpaceToad, 2011
|
||||
* 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 net.minecraft.src.buildcraft.transport.pipes;
|
||||
|
||||
import net.minecraft.src.TileEntity;
|
||||
import net.minecraft.src.buildcraft.transport.EntityData;
|
||||
import net.minecraft.src.buildcraft.transport.IItemTravelingHook;
|
||||
import net.minecraft.src.buildcraft.transport.Pipe;
|
||||
import net.minecraft.src.buildcraft.transport.PipeLogicVoid;
|
||||
import net.minecraft.src.buildcraft.transport.PipeTransportItems;
|
||||
|
||||
public class PipeItemsVoid extends Pipe implements IItemTravelingHook{
|
||||
|
||||
public PipeItemsVoid(int itemID) {
|
||||
super(new PipeTransportItems(), new PipeLogicVoid(), itemID);
|
||||
((PipeTransportItems) transport).travelHook = this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMainBlockTexture() {
|
||||
return 8 * 16 + 14;
|
||||
}
|
||||
|
||||
//This is called if the void pipe is only connected to one pipe
|
||||
@Override
|
||||
public void drop(PipeTransportItems pipe, EntityData data) {
|
||||
data.item.item.stackSize = 0;
|
||||
}
|
||||
|
||||
//This is called when the void pipe is connected to multiple pipes
|
||||
@Override
|
||||
public void centerReached(PipeTransportItems pipe, EntityData data) {
|
||||
((PipeTransportItems) transport).scheduleRemoval(data.item);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endReached(PipeTransportItems pipe, EntityData data, TileEntity tile) {}
|
||||
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
/**
|
||||
* Copyright (c) SpaceToad, 2011
|
||||
* 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 net.minecraft.src.buildcraft.transport.pipes;
|
||||
|
||||
import net.minecraft.src.buildcraft.api.Orientations;
|
||||
import net.minecraft.src.buildcraft.transport.IPipeTransportLiquidsHook;
|
||||
import net.minecraft.src.buildcraft.transport.Pipe;
|
||||
import net.minecraft.src.buildcraft.transport.PipeLogicVoid;
|
||||
import net.minecraft.src.buildcraft.transport.PipeTransportLiquids;
|
||||
|
||||
public class PipeLiquidsVoid extends Pipe implements IPipeTransportLiquidsHook{
|
||||
|
||||
public PipeLiquidsVoid(int itemID) {
|
||||
super(new PipeTransportLiquids(), new PipeLogicVoid(), itemID);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMainBlockTexture() {
|
||||
return 9 * 16 + 14;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int fill(Orientations from, int quantity, int id, boolean doFill) {
|
||||
return quantity;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue