buildcraft.api.transport.IPipeTile Java Examples
The following examples show how to use
buildcraft.api.transport.IPipeTile.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: AdjacentInventoryHelper.java From BigReactors with MIT License | 6 votes |
/** * @param te The new tile entity for this helper to cache. * @return True if this helper's wrapped inventory changed, false otherwise. */ public boolean set(TileEntity te) { if(entity == te) { return false; } if(te == null) { duct = null; pipe = null; inv = null; } else if(ModHelperBase.useCofh && te instanceof IItemDuct) { setDuct((IItemDuct)te); } else if(ModHelperBase.useBuildcraftTransport && te instanceof IPipeTile) { setPipe((IPipeTile)te); } else if(te instanceof IInventory) { setInv(te); } entity = te; return true; }
Example #2
Source File: ModInteractionUtilImplementation.java From PneumaticCraft with GNU General Public License v3.0 | 5 votes |
@Override @Optional.Method(modid = ModIds.BUILDCRAFT) public ItemStack exportStackToBCPipe(TileEntity te, ItemStack stack, ForgeDirection side){ if(isBCPipe(te)) { int amount = ((IPipeTile)te).injectItem(stack, true, side); stack.stackSize -= amount; if(stack.stackSize <= 0) stack = null; } return stack; }
Example #3
Source File: AdapterPipe.java From OpenPeripheral-Integration with MIT License | 4 votes |
@Override public Class<?> getTargetClass() { return IPipeTile.class; }
Example #4
Source File: AdapterPipe.java From OpenPeripheral-Integration with MIT License | 4 votes |
private static IPipe getPipe(IPipeTile target) { IPipe pipe = target.getPipe(); Preconditions.checkNotNull(pipe, "Invalid pipe"); return pipe; }
Example #5
Source File: AdapterPipe.java From OpenPeripheral-Integration with MIT License | 4 votes |
@ScriptCallable(description = "Checks if this pipe has a gate", returnTypes = ReturnType.BOOLEAN) public boolean hasGate(IPipeTile target, @Arg(name = "side") ForgeDirection side) { return getPipe(target).hasGate(side); }
Example #6
Source File: AdapterPipe.java From OpenPeripheral-Integration with MIT License | 4 votes |
@ScriptCallable(description = "Checks if a wire is on the pipe", returnTypes = ReturnType.BOOLEAN) public boolean isWired(IPipeTile target, @Arg(name = "wire", description = "The colour of the wire") PipeWire wire) { return getPipe(target).isWired(wire); }
Example #7
Source File: AdapterPipe.java From OpenPeripheral-Integration with MIT License | 4 votes |
@ScriptCallable(description = "Checks if a wire on the pipe is active", returnTypes = ReturnType.BOOLEAN) public boolean isWireActive(IPipeTile target, @Arg(name = "wire", description = "The colour of the wire") PipeWire wire) { return getPipe(target).isWireActive(wire); }
Example #8
Source File: AdapterPipe.java From OpenPeripheral-Integration with MIT License | 4 votes |
@ScriptCallable(description = "Get type of pipe", returnTypes = ReturnType.STRING) public PipeType getPipeType(IPipeTile target) { return target.getPipeType(); }
Example #9
Source File: AdapterPipe.java From OpenPeripheral-Integration with MIT License | 4 votes |
@ScriptCallable(description = "Get type of pipe", returnTypes = ReturnType.BOOLEAN) public boolean isPipeConnected(IPipeTile target, @Arg(name = "side") ForgeDirection side) { return target.isPipeConnected(side); }
Example #10
Source File: ModInteractionUtilImplementation.java From PneumaticCraft with GNU General Public License v3.0 | 4 votes |
@Override @Optional.Method(modid = ModIds.BUILDCRAFT) public boolean isBCPipe(TileEntity te){ return te instanceof IPipeTile && ((IPipeTile)te).getPipeType() == IPipeTile.PipeType.ITEM; }
Example #11
Source File: AdjacentInventoryHelper.java From BigReactors with MIT License | 4 votes |
private void setPipe(IPipeTile pipe) { this.pipe = pipe; this.duct = null; this.inv = null; }