2020-04-16 00:39:53 +02:00
|
|
|
package de.ellpeck.prettypipes.items;
|
|
|
|
|
2021-03-03 00:10:24 +01:00
|
|
|
import de.ellpeck.prettypipes.misc.ItemFilter;
|
2020-04-16 04:42:42 +02:00
|
|
|
import de.ellpeck.prettypipes.pipe.PipeTileEntity;
|
2020-12-04 19:32:16 +01:00
|
|
|
import de.ellpeck.prettypipes.pipe.containers.AbstractPipeContainer;
|
2020-04-16 04:42:42 +02:00
|
|
|
import net.minecraft.entity.player.PlayerEntity;
|
|
|
|
import net.minecraft.entity.player.PlayerInventory;
|
2020-04-16 00:39:53 +02:00
|
|
|
import net.minecraft.item.ItemStack;
|
2020-10-14 23:39:11 +02:00
|
|
|
import net.minecraft.util.math.BlockPos;
|
2020-04-16 00:39:53 +02:00
|
|
|
import net.minecraftforge.items.IItemHandler;
|
|
|
|
|
2020-10-14 22:30:02 +02:00
|
|
|
import java.util.List;
|
2020-12-25 15:23:44 +01:00
|
|
|
import java.util.Stack;
|
2020-10-15 04:46:23 +02:00
|
|
|
import java.util.function.Consumer;
|
2020-10-14 22:30:02 +02:00
|
|
|
|
2020-04-16 00:39:53 +02:00
|
|
|
public interface IModule {
|
|
|
|
|
2020-04-16 04:42:42 +02:00
|
|
|
void tick(ItemStack module, PipeTileEntity tile);
|
2020-04-16 02:48:58 +02:00
|
|
|
|
2020-04-17 22:29:02 +02:00
|
|
|
boolean canNetworkSee(ItemStack module, PipeTileEntity tile);
|
2020-04-16 02:48:58 +02:00
|
|
|
|
2020-04-17 22:29:02 +02:00
|
|
|
boolean canAcceptItem(ItemStack module, PipeTileEntity tile, ItemStack stack);
|
2020-04-16 02:48:58 +02:00
|
|
|
|
2020-04-18 22:30:14 +02:00
|
|
|
int getMaxInsertionAmount(ItemStack module, PipeTileEntity tile, ItemStack stack, IItemHandler destination);
|
|
|
|
|
2020-04-16 04:42:42 +02:00
|
|
|
int getPriority(ItemStack module, PipeTileEntity tile);
|
2020-04-16 02:48:58 +02:00
|
|
|
|
2020-04-16 04:42:42 +02:00
|
|
|
boolean isCompatible(ItemStack module, PipeTileEntity tile, IModule other);
|
2020-04-16 02:48:58 +02:00
|
|
|
|
2020-04-16 04:42:42 +02:00
|
|
|
boolean hasContainer(ItemStack module, PipeTileEntity tile);
|
2020-04-16 02:48:58 +02:00
|
|
|
|
2020-04-16 04:42:42 +02:00
|
|
|
AbstractPipeContainer<?> getContainer(ItemStack module, PipeTileEntity tile, int windowId, PlayerInventory inv, PlayerEntity player, int moduleIndex);
|
2020-04-16 23:40:35 +02:00
|
|
|
|
|
|
|
float getItemSpeedIncrease(ItemStack module, PipeTileEntity tile);
|
2020-05-03 15:51:16 +02:00
|
|
|
|
|
|
|
boolean canPipeWork(ItemStack module, PipeTileEntity tile);
|
2020-10-14 22:30:02 +02:00
|
|
|
|
2020-10-15 04:15:52 +02:00
|
|
|
List<ItemStack> getAllCraftables(ItemStack module, PipeTileEntity tile);
|
2020-10-14 23:39:11 +02:00
|
|
|
|
2021-02-06 00:26:27 +01:00
|
|
|
int getCraftableAmount(ItemStack module, PipeTileEntity tile, Consumer<ItemStack> unavailableConsumer, ItemStack stack, Stack<ItemStack> dependencyChain);
|
2020-10-15 04:15:52 +02:00
|
|
|
|
2021-02-06 00:26:27 +01:00
|
|
|
ItemStack craft(ItemStack module, PipeTileEntity tile, BlockPos destPipe, Consumer<ItemStack> unavailableConsumer, ItemStack stack, Stack<ItemStack> dependencyChain);
|
2020-12-04 19:32:16 +01:00
|
|
|
|
|
|
|
Integer getCustomNextNode(ItemStack module, PipeTileEntity tile, List<BlockPos> nodes, int index);
|
2021-03-03 00:10:24 +01:00
|
|
|
|
|
|
|
ItemFilter getItemFilter(ItemStack module, PipeTileEntity tile);
|
2020-04-16 00:39:53 +02:00
|
|
|
}
|