Class CuriosInventoryHook

java.lang.Object
com.breakinblocks.graveless.integration.curios.CuriosInventoryHook
All Implemented Interfaces:
InventoryHook

public class CuriosInventoryHook extends Object implements InventoryHook
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    capture(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.damagesource.DamageSource source)
     
    void
    finishDrops(net.minecraft.server.level.ServerPlayer player)
    Releases temporary slot metadata after death drops have been handled.
    id()
     
    void
    prepareDrops(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.damagesource.DamageSource source)
     
    net.minecraft.world.item.ItemStack
    restore(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.ItemStack
    restoreFallback(net.minecraft.server.level.ServerPlayer player, CapturedEntry entry)
    Tries alternative hook destinations with the same live-remainder contract as restore.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.breakinblocks.graveless.capture.InventoryHook

    dropEntry
  • Field Details

  • Constructor Details

    • CuriosInventoryHook

      public CuriosInventoryHook()
  • Method Details

    • id

      public String id()
      Specified by:
      id in interface InventoryHook
    • prepareDrops

      public void prepareDrops(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.damagesource.DamageSource source)
      Specified by:
      prepareDrops in interface InventoryHook
    • finishDrops

      public void finishDrops(net.minecraft.server.level.ServerPlayer player)
      Description copied from interface: InventoryHook
      Releases temporary slot metadata after death drops have been handled.
      Specified by:
      finishDrops in interface InventoryHook
    • capture

      public List<CapturedEntry> capture(net.minecraft.server.level.ServerPlayer player, net.minecraft.world.damagesource.DamageSource source)
      Specified by:
      capture in interface InventoryHook
    • restore

      public net.minecraft.world.item.ItemStack restore(net.minecraft.server.level.ServerPlayer player, CapturedEntry entry)
      Description copied from interface: InventoryHook
      Restores 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:
      restore in interface InventoryHook
    • restoreFallback

      public net.minecraft.world.item.ItemStack restoreFallback(net.minecraft.server.level.ServerPlayer player, CapturedEntry entry)
      Description copied from interface: InventoryHook
      Tries alternative hook destinations with the same live-remainder contract as restore.
      Specified by:
      restoreFallback in interface InventoryHook