Package at.petrak.hexcasting.api.item
Interface MediaHolderItem
- All Known Subinterfaces:
HexHolderItem
- All Known Implementing Classes:
ItemAncientCypher,ItemArtifact,ItemCreativeUnlocker,ItemCypher,ItemMediaBattery,ItemMediaHolder,ItemPackagedHex,ItemTrinket
@OverrideOnly
public interface MediaHolderItem
Items which can store Media can implement this interface.
On both the Forge and Fabric sides, the registry will be scanned for all items which implement this interface, and the appropriate cap/CC will be attached.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanProvideMedia(net.minecraft.world.item.ItemStack stack) booleancanRecharge(net.minecraft.world.item.ItemStack stack) default intgetConsumptionPriority(net.minecraft.world.item.ItemStack stack) longgetMaxMedia(net.minecraft.world.item.ItemStack stack) longgetMedia(net.minecraft.world.item.ItemStack stack) default floatgetMediaFullness(net.minecraft.world.item.ItemStack stack) default longinsertMedia(net.minecraft.world.item.ItemStack stack, long amount, boolean simulate) voidsetMedia(net.minecraft.world.item.ItemStack stack, long media) default longwithdrawMedia(net.minecraft.world.item.ItemStack stack, long cost, boolean simulate)
-
Method Details
-
getMedia
long getMedia(net.minecraft.world.item.ItemStack stack) -
getMaxMedia
long getMaxMedia(net.minecraft.world.item.ItemStack stack) -
setMedia
void setMedia(net.minecraft.world.item.ItemStack stack, long media) -
canProvideMedia
boolean canProvideMedia(net.minecraft.world.item.ItemStack stack) -
canRecharge
boolean canRecharge(net.minecraft.world.item.ItemStack stack) -
getMediaFullness
default float getMediaFullness(net.minecraft.world.item.ItemStack stack) -
withdrawMedia
default long withdrawMedia(net.minecraft.world.item.ItemStack stack, long cost, boolean simulate) -
insertMedia
default long insertMedia(net.minecraft.world.item.ItemStack stack, long amount, boolean simulate) -
getConsumptionPriority
default int getConsumptionPriority(net.minecraft.world.item.ItemStack stack)
-