Interface AntiCheatBridge


public interface AntiCheatBridge
Client policy the game managers need but cannot see from the API: the AntiCheat module's placement/rotation/inventory limits and the vanilla MultiPlayerGameMode.carriedIndex field (reached through a mixin accessor). The client installs its implementation at startup; the built-in default is permissive (no limiter, nothing gated) so the managers still function in an un-bootstrapped environment.
  • Method Details

    • placementPolicy

    • isSilentRotationMode

      boolean isSilentRotationMode()
      Whether the AntiCheat rotation mode is SILENT.
    • canClickSlot

      boolean canClickSlot(net.minecraft.world.entity.player.Player player, int containerId)
      Inventory-click gating (AntiCheat click limits).
    • canClickSlotPair

      boolean canClickSlotPair(net.minecraft.world.entity.player.Player player, int containerId)
    • aroundSilentContainerClick

      default void aroundSilentContainerClick(Runnable sendClick)
      Runs a raw container-click send with whatever wire-state fixups the client policy applies around ordinary silent clicks (sprint drop/restore for Grim's MultiActionsC, queued-click flush ordering). Clicks routed through vanilla's handleInventoryMouseClick get this from the client's mixin; a click packet sent directly on the connection bypasses that choke point and must be wrapped here, or Grim cancels it server-side whenever the sprint flag is on the wire.
    • getCarriedIndex

      int getCarriedIndex()
      The slot vanilla believes is selected (carriedIndex), or -1.
    • setCarriedIndex

      void setCarriedIndex(int slot)
      Keeps vanilla's carriedIndex in sync with a silently sent slot.
    • get

      static AntiCheatBridge get()
      The installed implementation (permissive default until install(me.hackware.api.util.AntiCheatBridge)).
    • install

      static void install(AntiCheatBridge bridge)
      Installed once by the client at startup.