Added Daizuli Pipe
The Daizuli Pipe is similar to a Iron Pipe, except it only routes matching colored itemstacks that have been painted by a Lapis Pipe. The color can be set via Gate Action or via shift-click with a Wrench.
After Width: | Height: | Size: 274 B |
After Width: | Height: | Size: 316 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 319 B |
After Width: | Height: | Size: 316 B |
After Width: | Height: | Size: 314 B |
After Width: | Height: | Size: 317 B |
After Width: | Height: | Size: 318 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 319 B |
After Width: | Height: | Size: 320 B |
After Width: | Height: | Size: 317 B |
After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 317 B After Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 317 B After Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 317 B After Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 319 B After Width: | Height: | Size: 319 B |
Before Width: | Height: | Size: 321 B After Width: | Height: | Size: 321 B |
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 320 B After Width: | Height: | Size: 320 B |
Before Width: | Height: | Size: 317 B After Width: | Height: | Size: 317 B |
Before Width: | Height: | Size: 318 B After Width: | Height: | Size: 318 B |
|
@ -49,6 +49,7 @@ import buildcraft.transport.pipes.PipeFluidsStone;
|
|||
import buildcraft.transport.pipes.PipeFluidsVoid;
|
||||
import buildcraft.transport.pipes.PipeFluidsWood;
|
||||
import buildcraft.transport.pipes.PipeItemsCobblestone;
|
||||
import buildcraft.transport.pipes.PipeItemsDaizuli;
|
||||
import buildcraft.transport.pipes.PipeItemsDiamond;
|
||||
import buildcraft.transport.pipes.PipeItemsEmerald;
|
||||
import buildcraft.transport.pipes.PipeItemsGold;
|
||||
|
@ -95,6 +96,7 @@ import java.util.logging.Level;
|
|||
import java.util.logging.Logger;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.Configuration;
|
||||
|
@ -123,6 +125,7 @@ public class BuildCraftTransport {
|
|||
public static Item pipeItemsDiamond;
|
||||
public static Item pipeItemsObsidian;
|
||||
public static Item pipeItemsLapis;
|
||||
public static Item pipeItemsDaizuli;
|
||||
public static Item pipeItemsVoid;
|
||||
public static Item pipeItemsSandstone;
|
||||
public static Item pipeFluidsWood;
|
||||
|
@ -266,7 +269,7 @@ public class BuildCraftTransport {
|
|||
pipeWaterproof.setCreativeTab(CreativeTabBuildCraft.tabBuildCraft);
|
||||
LanguageRegistry.addName(pipeWaterproof, "Pipe Waterproof");
|
||||
genericPipeBlock = new BlockGenericPipe(genericPipeId.getInt());
|
||||
GameRegistry.registerBlock(genericPipeBlock);
|
||||
CoreProxy.proxy.registerBlock(genericPipeBlock.setUnlocalizedName("pipeBlock"), ItemBlock.class);
|
||||
|
||||
// Fixing retro-compatiblity
|
||||
pipeItemsWood = buildPipe(DefaultProps.PIPE_ITEMS_WOOD_ID, PipeItemsWood.class, "Wooden Transport Pipe", "plankWood", Block.glass, "plankWood");
|
||||
|
@ -278,7 +281,8 @@ public class BuildCraftTransport {
|
|||
pipeItemsGold = buildPipe(DefaultProps.PIPE_ITEMS_GOLD_ID, PipeItemsGold.class, "Golden Transport Pipe", Item.ingotGold, Block.glass, Item.ingotGold);
|
||||
pipeItemsDiamond = buildPipe(DefaultProps.PIPE_ITEMS_DIAMOND_ID, PipeItemsDiamond.class, "Diamond Transport Pipe", Item.diamond, Block.glass, Item.diamond);
|
||||
pipeItemsObsidian = buildPipe(DefaultProps.PIPE_ITEMS_OBSIDIAN_ID, PipeItemsObsidian.class, "Obsidian Transport Pipe", Block.obsidian, Block.glass, Block.obsidian);
|
||||
pipeItemsLapis = buildPipe(DefaultProps.PIPE_ITEMS_LAPIS_ID, PipeItemsLapis.class, "Lapis Transport Pipe", Block.blockLapis, Block.glass, Block.blockLapis);
|
||||
pipeItemsLapis = buildPipe(DefaultProps.PIPE_ITEMS_LAPIS_ID, PipeItemsLapis.class, "Lapis Transport Pipe", Block.blockLapis, Block.glass, Block.blockLapis);
|
||||
pipeItemsDaizuli = buildPipe(DefaultProps.PIPE_ITEMS_DAIZULI_ID, PipeItemsDaizuli.class, "Daizuli Transport Pipe", Block.blockLapis, Block.glass, Item.diamond);
|
||||
pipeItemsSandstone = buildPipe(DefaultProps.PIPE_ITEMS_SANDSTONE_ID, PipeItemsSandstone.class, "Sandstone Transport Pipe", Block.sandStone, Block.glass, Block.sandStone);
|
||||
pipeItemsVoid = buildPipe(DefaultProps.PIPE_ITEMS_VOID_ID, PipeItemsVoid.class, "Void Transport Pipe", "dyeBlack", Block.glass, Item.redstone);
|
||||
|
||||
|
@ -402,8 +406,8 @@ public class BuildCraftTransport {
|
|||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent evt) {
|
||||
ItemFacade.initialize();
|
||||
|
||||
for(EnumColor color : EnumColor.VALUES){
|
||||
|
||||
for (EnumColor color : EnumColor.VALUES) {
|
||||
actionPipeColor[color.ordinal()] = new ActionPipeColor(-1, color);
|
||||
}
|
||||
}
|
||||
|
@ -423,9 +427,9 @@ public class BuildCraftTransport {
|
|||
}
|
||||
|
||||
CoreProxy.proxy.addCraftingRecipe(new ItemStack(filteredBufferBlock, 1),
|
||||
new Object[] { "wdw", "wcw", "wpw", Character.valueOf('w'), "plankWood", Character.valueOf('d'),
|
||||
BuildCraftTransport.pipeItemsDiamond, Character.valueOf('c'), Block.chest, Character.valueOf('p'),
|
||||
Block.pistonBase });
|
||||
new Object[]{"wdw", "wcw", "wpw", Character.valueOf('w'), "plankWood", Character.valueOf('d'),
|
||||
BuildCraftTransport.pipeItemsDiamond, Character.valueOf('c'), Block.chest, Character.valueOf('p'),
|
||||
Block.pistonBase});
|
||||
|
||||
//Facade turning helper
|
||||
GameRegistry.addRecipe(facadeItem.new FacadeRecipe());
|
||||
|
|
|
@ -62,6 +62,7 @@ public class DefaultProps {
|
|||
public static int PIPE_ITEMS_EMERALD_ID = 19167;
|
||||
public static int PIPE_ITEMS_QUARTZ_ID = 19168;
|
||||
public static int PIPE_ITEMS_LAPIS_ID = 19169;
|
||||
public static int PIPE_ITEMS_DAIZULI_ID = 19170;
|
||||
|
||||
public static int PIPE_LIQUIDS_WOOD_ID = 19180;
|
||||
public static int PIPE_LIQUIDS_COBBLESTONE_ID = 19181;
|
||||
|
@ -73,6 +74,7 @@ public class DefaultProps {
|
|||
public static int PIPE_LIQUIDS_EMERALD_ID = 19187;
|
||||
public static int PIPE_LIQUIDS_QUARTZ_ID = 19188;
|
||||
public static int PIPE_LIQUIDS_LAPIS_ID = 19189;
|
||||
public static int PIPE_LIQUIDS_DIAZULI_ID = 19110;
|
||||
|
||||
public static int PIPE_POWER_WOOD_ID = 19200;
|
||||
public static int PIPE_POWER_COBBLESTONE_ID = 19201;
|
||||
|
@ -84,6 +86,7 @@ public class DefaultProps {
|
|||
public static int PIPE_POWER_EMERALD_ID = 19207;
|
||||
public static int PIPE_POWER_QUARTZ_ID = 19208;
|
||||
public static int PIPE_POWER_LAPIS_ID = 19209;
|
||||
public static int PIPE_POWER_DIAZULI_ID = 19210;
|
||||
|
||||
public static int PIPE_ITEMS_VOID_ID = 19220;
|
||||
public static int PIPE_LIQUIDS_VOID_ID = 19221;
|
||||
|
|
|
@ -15,7 +15,7 @@ import net.minecraftforge.common.ForgeDirection;
|
|||
|
||||
public interface IPipeTransportItemsHook {
|
||||
|
||||
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, IPipedItem item);
|
||||
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, EntityData data);
|
||||
|
||||
public void entityEntered(IPipedItem item, ForgeDirection orientation);
|
||||
|
||||
|
|
|
@ -22,22 +22,40 @@ public class PipeIconProvider implements IIconProvider {
|
|||
PipeItemsDiamond_West("pipeItemsDiamond_west"),
|
||||
PipeItemsDiamond_East("pipeItemsDiamond_east"),
|
||||
//
|
||||
PipeItemsLapis_Black("pipeItemsLapisBlack"),
|
||||
PipeItemsLapis_Red("pipeItemsLapisRed"),
|
||||
PipeItemsLapis_Green("pipeItemsLapisGreen"),
|
||||
PipeItemsLapis_Brown("pipeItemsLapisBrown"),
|
||||
PipeItemsLapis_Blue("pipeItemsLapisBlue"),
|
||||
PipeItemsLapis_Purple("pipeItemsLapisPurple"),
|
||||
PipeItemsLapis_Cyan("pipeItemsLapisCyan"),
|
||||
PipeItemsLapis_LightGray("pipeItemsLapisLightGray"),
|
||||
PipeItemsLapis_Gray("pipeItemsLapisGray"),
|
||||
PipeItemsLapis_Pink("pipeItemsLapisPink"),
|
||||
PipeItemsLapis_Lime("pipeItemsLapisLime"),
|
||||
PipeItemsLapis_Yellow("pipeItemsLapisYellow"),
|
||||
PipeItemsLapis_LightBlue("pipeItemsLapisLightBlue"),
|
||||
PipeItemsLapis_Magenta("pipeItemsLapisMagenta"),
|
||||
PipeItemsLapis_Orange("pipeItemsLapisOrange"),
|
||||
PipeItemsLapis_White("pipeItemsLapisWhite"),
|
||||
PipeItemsLapis_Black("pipeItemsLapis_black"),
|
||||
PipeItemsLapis_Red("pipeItemsLapis_red"),
|
||||
PipeItemsLapis_Green("pipeItemsLapis_green"),
|
||||
PipeItemsLapis_Brown("pipeItemsLapis_brown"),
|
||||
PipeItemsLapis_Blue("pipeItemsLapis_blue"),
|
||||
PipeItemsLapis_Purple("pipeItemsLapis_purple"),
|
||||
PipeItemsLapis_Cyan("pipeItemsLapis_cyan"),
|
||||
PipeItemsLapis_LightGray("pipeItemsLapis_lightgray"),
|
||||
PipeItemsLapis_Gray("pipeItemsLapis_gray"),
|
||||
PipeItemsLapis_Pink("pipeItemsLapis_pink"),
|
||||
PipeItemsLapis_Lime("pipeItemsLapis_lime"),
|
||||
PipeItemsLapis_Yellow("pipeItemsLapis_yellow"),
|
||||
PipeItemsLapis_LightBlue("pipeItemsLapis_lightblue"),
|
||||
PipeItemsLapis_Magenta("pipeItemsLapis_magenta"),
|
||||
PipeItemsLapis_Orange("pipeItemsLapis_orange"),
|
||||
PipeItemsLapis_White("pipeItemsLapis_white"),
|
||||
//
|
||||
PipeItemsDaizuli_Black("pipeItemsDaizuli_black"),
|
||||
PipeItemsDaizuli_Red("pipeItemsDaizuli_red"),
|
||||
PipeItemsDaizuli_Green("pipeItemsDaizuli_green"),
|
||||
PipeItemsDaizuli_Brown("pipeItemsDaizuli_brown"),
|
||||
PipeItemsDaizuli_Blue("pipeItemsDaizuli_blue"),
|
||||
PipeItemsDaizuli_Purple("pipeItemsDaizuli_purple"),
|
||||
PipeItemsDaizuli_Cyan("pipeItemsDaizuli_cyan"),
|
||||
PipeItemsDaizuli_LightGray("pipeItemsDaizuli_lightgray"),
|
||||
PipeItemsDaizuli_Gray("pipeItemsDaizuli_gray"),
|
||||
PipeItemsDaizuli_Pink("pipeItemsDaizuli_pink"),
|
||||
PipeItemsDaizuli_Lime("pipeItemsDaizuli_lime"),
|
||||
PipeItemsDaizuli_Yellow("pipeItemsDaizuli_yellow"),
|
||||
PipeItemsDaizuli_LightBlue("pipeItemsDaizuli_lightblue"),
|
||||
PipeItemsDaizuli_Magenta("pipeItemsDaizuli_magenta"),
|
||||
PipeItemsDaizuli_Orange("pipeItemsDaizuli_orange"),
|
||||
PipeItemsDaizuli_White("pipeItemsDaizuli_white"),
|
||||
PipeAllDaizuli_Solid("pipeAllDaizuli_solid"),
|
||||
//
|
||||
PipeItemsWood_Standard("pipeItemsWood_standard"),
|
||||
PipeAllWood_Solid("pipeAllWood_solid"),
|
||||
|
|
|
@ -233,7 +233,7 @@ public class PipeTransportItems extends PipeTransport {
|
|||
|
||||
if (this.container.pipe instanceof IPipeTransportItemsHook) {
|
||||
Position pos = new Position(container.xCoord, container.yCoord, container.zCoord, data.input);
|
||||
result = ((IPipeTransportItemsHook) this.container.pipe).filterPossibleMovements(result, pos, data.item);
|
||||
result = ((IPipeTransportItemsHook) this.container.pipe).filterPossibleMovements(result, pos, data);
|
||||
}
|
||||
|
||||
return result;
|
||||
|
|
|
@ -38,6 +38,7 @@ public class TransportProxyClient extends TransportProxy {
|
|||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsObsidian.itemID, pipeItemRenderer);
|
||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsEmerald.itemID, pipeItemRenderer);
|
||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsLapis.itemID, pipeItemRenderer);
|
||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeItemsDaizuli.itemID, pipeItemRenderer);
|
||||
|
||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsWood.itemID, pipeItemRenderer);
|
||||
MinecraftForgeClient.registerItemRenderer(BuildCraftTransport.pipeFluidsCobblestone.itemID, pipeItemRenderer);
|
||||
|
|
188
common/buildcraft/transport/pipes/PipeItemsDaizuli.java
Normal file
|
@ -0,0 +1,188 @@
|
|||
/**
|
||||
* BuildCraft is open-source. It is distributed under the terms of the
|
||||
* BuildCraft Open Source License. It grants rights to read, modify, compile or
|
||||
* run the code. It does *NOT* grant the right to redistribute this software or
|
||||
* its modifications in any form, binary or source, except if expressively
|
||||
* granted by the copyright holder.
|
||||
*/
|
||||
package buildcraft.transport.pipes;
|
||||
|
||||
import buildcraft.BuildCraftTransport;
|
||||
import buildcraft.api.core.IIconProvider;
|
||||
import buildcraft.api.core.Position;
|
||||
import buildcraft.api.gates.IAction;
|
||||
import buildcraft.api.tools.IToolWrench;
|
||||
import buildcraft.core.network.TileNetworkData;
|
||||
import buildcraft.core.utils.EnumColor;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import buildcraft.transport.EntityData;
|
||||
import buildcraft.transport.IPipeTransportItemsHook;
|
||||
import buildcraft.transport.IPipedItem;
|
||||
import buildcraft.transport.Pipe;
|
||||
import buildcraft.transport.PipeIconProvider;
|
||||
import buildcraft.transport.PipeTransportItems;
|
||||
import buildcraft.transport.TileGenericPipe;
|
||||
import buildcraft.transport.triggers.ActionPipeColor;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraftforge.common.ForgeDirection;
|
||||
|
||||
public class PipeItemsDaizuli extends Pipe<PipeTransportItems> implements IPipeTransportItemsHook {
|
||||
|
||||
private int standardIconIndex = PipeIconProvider.TYPE.PipeItemsDaizuli_Black.ordinal();
|
||||
private int solidIconIndex = PipeIconProvider.TYPE.PipeAllDaizuli_Solid.ordinal();
|
||||
@TileNetworkData
|
||||
private int color = EnumColor.WHITE.ordinal();
|
||||
private PipeLogicIron logic = new PipeLogicIron(this) {
|
||||
@Override
|
||||
protected boolean isValidFacing(ForgeDirection facing) {
|
||||
TileEntity tile = pipe.container.getTile(facing);
|
||||
if (tile instanceof TileGenericPipe) {
|
||||
Pipe otherPipe = ((TileGenericPipe) tile).pipe;
|
||||
if (otherPipe instanceof PipeItemsWood)
|
||||
return false;
|
||||
if (otherPipe.transport instanceof PipeTransportItems)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
if (tile instanceof IInventory)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
public PipeItemsDaizuli(int itemID) {
|
||||
super(new PipeTransportItems(), itemID);
|
||||
|
||||
transport.allowBouncing = true;
|
||||
}
|
||||
|
||||
public EnumColor getColor() {
|
||||
return EnumColor.fromId(color);
|
||||
}
|
||||
|
||||
public void setColor(EnumColor c) {
|
||||
if (color != c.ordinal()) {
|
||||
this.color = c.ordinal();
|
||||
container.scheduleRenderUpdate();
|
||||
container.markBlockForUpdate();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean blockActivated(EntityPlayer player) {
|
||||
Item equipped = player.getCurrentEquippedItem() != null ? player.getCurrentEquippedItem().getItem() : null;
|
||||
if (player.isSneaking() && equipped instanceof IToolWrench && ((IToolWrench) equipped).canWrench(player, container.xCoord, container.yCoord, container.zCoord)) {
|
||||
setColor(getColor().getNext());
|
||||
((IToolWrench) equipped).wrenchUsed(player, container.xCoord, container.yCoord, container.zCoord);
|
||||
return true;
|
||||
}
|
||||
|
||||
return logic.blockActivated(player);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onNeighborBlockChange(int blockId) {
|
||||
logic.onNeighborBlockChange(blockId);
|
||||
super.onNeighborBlockChange(blockId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onBlockPlaced() {
|
||||
logic.onBlockPlaced();
|
||||
super.onBlockPlaced();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void initialize() {
|
||||
logic.initialize();
|
||||
super.initialize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getIconIndex(ForgeDirection direction) {
|
||||
if (container != null && container.getBlockMetadata() == direction.ordinal())
|
||||
return solidIconIndex;
|
||||
return standardIconIndex + color;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public IIconProvider getIconProvider() {
|
||||
return BuildCraftTransport.instance.pipeIconProvider;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canConnectRedstone() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, EntityData data) {
|
||||
LinkedList<ForgeDirection> newMovements = new LinkedList<ForgeDirection>();
|
||||
EnumColor c = getColor();
|
||||
for (ForgeDirection dir : possibleOrientations) {
|
||||
if (data.color == c) {
|
||||
if (dir.ordinal() == container.getBlockMetadata())
|
||||
newMovements.add(dir);
|
||||
} else if (dir.ordinal() != container.getBlockMetadata()) {
|
||||
newMovements.add(dir);
|
||||
}
|
||||
}
|
||||
return newMovements;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void entityEntered(IPipedItem item, ForgeDirection orientation) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readjustSpeed(IPipedItem item) {
|
||||
if (item.getSpeed() > Utils.pipeNormalSpeed) {
|
||||
item.setSpeed(item.getSpeed() - Utils.pipeNormalSpeed / 4.0F);
|
||||
}
|
||||
|
||||
if (item.getSpeed() < Utils.pipeNormalSpeed) {
|
||||
item.setSpeed(Utils.pipeNormalSpeed);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void actionsActivated(Map<IAction, Boolean> actions) {
|
||||
super.actionsActivated(actions);
|
||||
|
||||
for (Map.Entry<IAction, Boolean> action : actions.entrySet()) {
|
||||
if (action.getKey() instanceof ActionPipeColor && action.getValue() != null && action.getValue()) {
|
||||
setColor(((ActionPipeColor) action.getKey()).color);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinkedList<IAction> getActions() {
|
||||
LinkedList<IAction> result = super.getActions();
|
||||
result.addAll(Arrays.asList(BuildCraftTransport.actionPipeColor));
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void writeToNBT(NBTTagCompound data) {
|
||||
super.writeToNBT(data);
|
||||
data.setByte("color", (byte) color);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void readFromNBT(NBTTagCompound data) {
|
||||
super.readFromNBT(data);
|
||||
color = data.getByte("color");
|
||||
}
|
||||
}
|
|
@ -16,6 +16,7 @@ import buildcraft.core.inventory.SimpleInventory;
|
|||
import buildcraft.core.network.IClientState;
|
||||
import buildcraft.core.proxy.CoreProxy;
|
||||
import buildcraft.transport.BlockGenericPipe;
|
||||
import buildcraft.transport.EntityData;
|
||||
import buildcraft.transport.IPipeTransportItemsHook;
|
||||
import buildcraft.transport.Pipe;
|
||||
import buildcraft.transport.PipeIconProvider;
|
||||
|
@ -89,7 +90,7 @@ public class PipeItemsDiamond extends Pipe<PipeTransportItems> implements IPipeT
|
|||
}
|
||||
|
||||
@Override
|
||||
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, IPipedItem item) {
|
||||
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, EntityData data) {
|
||||
LinkedList<ForgeDirection> filteredOrientations = new LinkedList<ForgeDirection>();
|
||||
LinkedList<ForgeDirection> defaultOrientations = new LinkedList<ForgeDirection>();
|
||||
|
||||
|
@ -107,10 +108,10 @@ public class PipeItemsDiamond extends Pipe<PipeTransportItems> implements IPipeT
|
|||
foundFilter = true;
|
||||
}
|
||||
|
||||
if (stack != null && stack.itemID == item.getItemStack().itemID)
|
||||
if ((Item.itemsList[item.getItemStack().itemID].isDamageable())) {
|
||||
if (stack != null && stack.itemID == data.item.getItemStack().itemID)
|
||||
if ((Item.itemsList[data.item.getItemStack().itemID].isDamageable())) {
|
||||
filteredOrientations.add(dir);
|
||||
} else if (stack.getItemDamage() == item.getItemStack().getItemDamage()) {
|
||||
} else if (stack.getItemDamage() == data.item.getItemStack().getItemDamage()) {
|
||||
filteredOrientations.add(dir);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,6 +12,7 @@ import buildcraft.api.core.IIconProvider;
|
|||
import buildcraft.api.core.Position;
|
||||
import buildcraft.transport.IPipedItem;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import buildcraft.transport.EntityData;
|
||||
import buildcraft.transport.IPipeTransportItemsHook;
|
||||
import buildcraft.transport.Pipe;
|
||||
import buildcraft.transport.PipeIconProvider;
|
||||
|
@ -39,7 +40,7 @@ public class PipeItemsGold extends Pipe implements IPipeTransportItemsHook {
|
|||
}
|
||||
|
||||
@Override
|
||||
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, IPipedItem item) {
|
||||
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, EntityData data) {
|
||||
return possibleOrientations;
|
||||
}
|
||||
|
||||
|
|
|
@ -48,7 +48,7 @@ public class PipeItemsLapis extends Pipe<PipeTransportItems> implements IItemTra
|
|||
|
||||
@Override
|
||||
public int getIconIndex(ForgeDirection direction) {
|
||||
if (direction == ForgeDirection.UNKNOWN)
|
||||
if (container == null)
|
||||
return PipeIconProvider.TYPE.PipeItemsLapis_White.ordinal();
|
||||
return PipeIconProvider.TYPE.PipeItemsLapis_Black.ordinal() + container.getBlockMetadata();
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ public class PipeItemsLapis extends Pipe<PipeTransportItems> implements IItemTra
|
|||
}
|
||||
|
||||
@Override
|
||||
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, IPipedItem item) {
|
||||
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, EntityData data) {
|
||||
return possibleOrientations;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ import buildcraft.api.core.IIconProvider;
|
|||
import buildcraft.api.core.Position;
|
||||
import buildcraft.transport.IPipedItem;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import buildcraft.transport.EntityData;
|
||||
import buildcraft.transport.IPipeTransportItemsHook;
|
||||
import buildcraft.transport.Pipe;
|
||||
import buildcraft.transport.PipeIconProvider;
|
||||
|
@ -51,7 +52,7 @@ public class PipeItemsQuartz extends Pipe implements IPipeTransportItemsHook {
|
|||
}
|
||||
|
||||
@Override
|
||||
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, IPipedItem item) {
|
||||
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, EntityData data) {
|
||||
return possibleOrientations;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ import buildcraft.api.core.IIconProvider;
|
|||
import buildcraft.api.core.Position;
|
||||
import buildcraft.transport.IPipedItem;
|
||||
import buildcraft.core.utils.Utils;
|
||||
import buildcraft.transport.EntityData;
|
||||
import buildcraft.transport.IPipeTransportItemsHook;
|
||||
import buildcraft.transport.Pipe;
|
||||
import buildcraft.transport.PipeIconProvider;
|
||||
|
@ -50,7 +51,7 @@ public class PipeItemsStone extends Pipe implements IPipeTransportItemsHook {
|
|||
}
|
||||
|
||||
@Override
|
||||
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, IPipedItem item) {
|
||||
public LinkedList<ForgeDirection> filterPossibleMovements(LinkedList<ForgeDirection> possibleOrientations, Position pos, EntityData data) {
|
||||
return possibleOrientations;
|
||||
}
|
||||
|
||||
|
|