Class TrinketsInventoryHook
java.lang.Object
com.breakinblocks.graveless.integration.trinkets.TrinketsInventoryHook
- All Implemented Interfaces:
InventoryHook
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncapture(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.damagesource.DamageSource source) dropEntry(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack stack) voidfinishDrops(net.minecraft.server.level.ServerPlayer player) id()voidprepareDrops(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.damagesource.DamageSource source) net.minecraft.world.item.ItemStackrestore(net.minecraft.server.level.ServerPlayer player, CapturedEntry entry) Restores into the original destination, leaving fallback until all original slots are tried.net.minecraft.world.item.ItemStackrestoreFallback(net.minecraft.server.level.ServerPlayer player, CapturedEntry entry) Tries alternative hook destinations with the same live-remainder contract as restore.
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
TrinketsInventoryHook
public TrinketsInventoryHook()
-
-
Method Details
-
id
- Specified by:
idin interfaceInventoryHook
-
prepareDrops
public void prepareDrops(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.damagesource.DamageSource source) - Specified by:
prepareDropsin interfaceInventoryHook
-
capture
public List<CapturedEntry> capture(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.damagesource.DamageSource source) - Specified by:
capturein interfaceInventoryHook
-
dropEntry
public CapturedEntry dropEntry(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.item.ItemStack stack) - Specified by:
dropEntryin interfaceInventoryHook
-
finishDrops
public void finishDrops(net.minecraft.server.level.ServerPlayer player) - Specified by:
finishDropsin interfaceInventoryHook
-
restore
public net.minecraft.world.item.ItemStack restore(net.minecraft.server.level.ServerPlayer player, CapturedEntry entry) Description copied from interface:InventoryHookRestores into the original destination, leaving fallback until all original slots are tried. The entry stack is the live remainder: shrink it as transfers succeed, including before invoking callbacks that may throw. Never install that mutable remainder in an inventory; insert a copy. On failure the engine retains the remainder and retries it on a later claim.- Specified by:
restorein interfaceInventoryHook
-
restoreFallback
public net.minecraft.world.item.ItemStack restoreFallback(net.minecraft.server.level.ServerPlayer player, CapturedEntry entry) Description copied from interface:InventoryHookTries alternative hook destinations with the same live-remainder contract as restore.- Specified by:
restoreFallbackin interfaceInventoryHook
-