Class GridLinkables

java.lang.Object
appeng.api.features.GridLinkables

public final class GridLinkables extends Object
A registry for items that can be linked to a specific network using for example the security station's user interface.

This can be used by items like wireless terminals to encode the network security key in their NBT. This security key can then be used to locate the grid for that security key later, when the item wants to interact with the grid.

  • Method Details

    • register

      public static void register(net.minecraft.world.level.ItemLike itemLike, IGridLinkableHandler handler)
      Register a handler to link or unlink stacks of a given item with a network.
      Parameters:
      itemLike - The type of item to register a handler for.
      handler - The handler that handles linking and unlinking for the item stacks.
    • get

      @Nullable public static @Nullable IGridLinkableHandler get(net.minecraft.world.level.ItemLike itemLike)
      Gets the registered handler for a given item.