Interface INetworkItem

All Known Implementing Classes:
WirelessCraftingMonitorNetworkItem, WirelessFluidGridNetworkItem, WirelessGridNetworkItem

public interface INetworkItem
Represents a network item (an item that is connected to the network somehow). You do not implement this on the item itself, use an INetworkItemProvider for that. This is an object used separately from the actual item, since this stores the player that is using it.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    drainEnergy(int energy)
     
    net.minecraft.world.entity.player.Player
     
    boolean
    onOpen(INetwork network)
    Called when the network item is being opened.
  • Method Details

    • getPlayer

      net.minecraft.world.entity.player.Player getPlayer()
      Returns:
      the player using the network item
    • onOpen

      boolean onOpen(INetwork network)
      Called when the network item is being opened.
      Parameters:
      network - the network
      Returns:
      true if the item can be opened, false otherwise
    • drainEnergy

      void drainEnergy(int energy)
      Parameters:
      energy - the energy to extract