Interface ManaNetwork

All Known Implementing Classes:
DummyManaNetwork, ManaNetworkHandler

public interface ManaNetwork
A basic interface for a world's Mana Network.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears the entire Mana Network of all it's contents, you probably don't want to call this unless you have a very good reason.
    void
     
    getAllCollectorsInWorld(net.minecraft.world.level.Level world)
    Gets read-only view of all Mana Collectors (eg.
    getAllPoolsInWorld(net.minecraft.world.level.Level world)
    Gets read-only view of all Mana Pools in the dimension passed in.
    @Nullable ManaCollector
    getClosestCollector(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world, int limit)
    Gets the closest Mana Collector (eg.
    @Nullable ManaPool
    getClosestPool(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world, int limit)
    Gets the closest Mana Pool in the network to the Chunk Coordinates passed in, in the given dimension.
    Note that this function *can* get performance intensive, it's reccomended you call it sparingly and take cache of the value returned.
  • Method Details

    • clear

      void clear()
      Clears the entire Mana Network of all it's contents, you probably don't want to call this unless you have a very good reason.
    • getClosestCollector

      @Nullable @Nullable ManaCollector getClosestCollector(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world, int limit)
      Gets the closest Mana Collector (eg. Mana Spreader) in the network to the Chunk Coordinates passed in, in the given dimension.
      Note that this function *can* get performance intensive, it's reccomended you call it sparingly and take cache of the value returned.
      Parameters:
      limit - The maximum distance the closest block can be, if the closest block is farther away than that, null will be returned instead.
    • getClosestPool

      @Nullable @Nullable ManaPool getClosestPool(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world, int limit)
      Gets the closest Mana Pool in the network to the Chunk Coordinates passed in, in the given dimension.
      Note that this function *can* get performance intensive, it's reccomended you call it sparingly and take cache of the value returned.
      Parameters:
      limit - The maximum distance the closest block can be, if the closest block is farther away than that, null will be returned instead.
    • getAllCollectorsInWorld

      Set<ManaCollector> getAllCollectorsInWorld(net.minecraft.world.level.Level world)
      Gets read-only view of all Mana Collectors (eg. Mana Spreader) in the dimension passed in.
    • getAllPoolsInWorld

      Set<ManaPool> getAllPoolsInWorld(net.minecraft.world.level.Level world)
      Gets read-only view of all Mana Pools in the dimension passed in.
    • fireManaNetworkEvent

      void fireManaNetworkEvent(ManaReceiver thing, ManaBlockType type, ManaNetworkAction action)