public interface IFlowItems extends IInjectable
Modifier and Type | Method and Description |
---|---|
void |
insertItemsForce(net.minecraft.item.ItemStack stack,
net.minecraft.util.EnumFacing from,
net.minecraft.item.EnumDyeColor colour,
double speed)
Inserts an item directly into the centre of this pipe, going in the given direction.
|
void |
sendPhantomItem(net.minecraft.item.ItemStack stack,
net.minecraft.util.EnumFacing from,
net.minecraft.util.EnumFacing to,
net.minecraft.item.EnumDyeColor colour)
Sends a phantom (fake) item from the given facing, to the other facing.
|
default int |
tryExtractItems(int count,
net.minecraft.util.EnumFacing from,
net.minecraft.item.EnumDyeColor colour,
IStackFilter filter)
Deprecated.
Use the version below with a simulate paramater.
|
int |
tryExtractItems(int count,
net.minecraft.util.EnumFacing from,
net.minecraft.item.EnumDyeColor colour,
IStackFilter filter,
boolean simulate)
Attempts to extract items from the inventory connected to this pipe on the given side.
|
canInjectItems, injectItem
@Deprecated default int tryExtractItems(int count, net.minecraft.util.EnumFacing from, @Nullable net.minecraft.item.EnumDyeColor colour, IStackFilter filter)
int tryExtractItems(int count, net.minecraft.util.EnumFacing from, @Nullable net.minecraft.item.EnumDyeColor colour, IStackFilter filter, boolean simulate)
count
- The maximum number of items to extractfrom
- The direction to extract from.colour
- The colour that extracted items should be painted.filter
- The filter to determine what can be extracted.simulate
- If true then only simulate the extraction.void insertItemsForce(@Nonnull net.minecraft.item.ItemStack stack, net.minecraft.util.EnumFacing from, @Nullable net.minecraft.item.EnumDyeColor colour, double speed)
PipeBehaviour
, as otherwise it can lead to problems. (For example crashing if a pipe
contains an item that the pipe behaviour doesn't expect).stack
- ItemStack offered for addition. Do not manipulate this!from
- Orientation the ItemStack should pretend to be coming from.colour
- The colour of the item to be added to the pipe, or null for no colour.speed
- The speed of the item to be added (in blocks per tick) or <=0
if a default should be
used.void sendPhantomItem(@Nonnull net.minecraft.item.ItemStack stack, @Nullable net.minecraft.util.EnumFacing from, @Nullable net.minecraft.util.EnumFacing to, @Nullable net.minecraft.item.EnumDyeColor colour)