public class CuriosUtils
extends java.lang.Object
| Constructor and Description |
|---|
CuriosUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
chargeItems(net.minecraft.entity.player.PlayerEntity player,
PneumaticEnergyStorage energyStorage,
int maxTransfer)
Supply Forge Energy from the given energy storage to all Curio items the player has.
|
static org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.Integer> |
findStack(net.minecraft.entity.player.PlayerEntity player,
java.util.function.Predicate<net.minecraft.item.ItemStack> predicate)
Try to find a curio item on the player matching the given predicate
|
static net.minecraft.item.ItemStack |
getStack(net.minecraft.entity.player.PlayerEntity player,
java.lang.String invId,
int slot)
Get the curio item in the given curios inventory at the given slot
|
static net.minecraftforge.items.IItemHandler |
makeCombinedInvWrapper(net.minecraft.entity.player.PlayerEntity player) |
public static void chargeItems(net.minecraft.entity.player.PlayerEntity player,
PneumaticEnergyStorage energyStorage,
int maxTransfer)
player - the playerenergyStorage - source energy storagemaxTransfer - max amount to transfer per itempublic static net.minecraft.item.ItemStack getStack(net.minecraft.entity.player.PlayerEntity player,
java.lang.String invId,
int slot)
player - the playerinvId - id of the curios inventory in questionslot - slot in the given curios inventorypublic static org.apache.commons.lang3.tuple.Pair<java.lang.String,java.lang.Integer> findStack(net.minecraft.entity.player.PlayerEntity player,
java.util.function.Predicate<net.minecraft.item.ItemStack> predicate)
player - the playerpredicate - an itemstack matching predicatepublic static net.minecraftforge.items.IItemHandler makeCombinedInvWrapper(@Nonnull
net.minecraft.entity.player.PlayerEntity player)