Class VanillaInventoryHook
java.lang.Object
com.breakinblocks.graveless.capture.VanillaInventoryHook
- 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) id()pendingSlots(net.minecraft.world.entity.player.Inventory inventory) 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.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface InventoryHook
dropEntry, finishDrops, prepareDrops, restoreFallback
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
VanillaInventoryHook
public VanillaInventoryHook()
-
-
Method Details
-
id
- Specified by:
idin interfaceInventoryHook
-
capture
public List<CapturedEntry> capture(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.damagesource.DamageSource source) - Specified by:
capturein interfaceInventoryHook
-
pendingSlots
-
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
-