Package vazkii.botania.common.handler
Class ManaNetworkHandler
java.lang.Object
vazkii.botania.common.handler.ManaNetworkHandler
- All Implemented Interfaces:
ManaNetwork
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclear()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.voidfireManaNetworkEvent(ManaReceiver thing, ManaBlockType type, ManaNetworkAction action) 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.getClosestCollector(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world, int limit) Gets the closest Mana Collector (eg.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.booleanisCollectorIn(net.minecraft.world.level.Level level, ManaCollector collector) booleanvoidonNetworkEvent(ManaReceiver thing, ManaBlockType type, ManaNetworkAction action)
-
Field Details
-
instance
-
-
Constructor Details
-
ManaNetworkHandler
public ManaNetworkHandler()
-
-
Method Details
-
onNetworkEvent
-
clear
public void clear()Description copied from interface:ManaNetworkClears the entire Mana Network of all it's contents, you probably don't want to call this unless you have a very good reason.- Specified by:
clearin interfaceManaNetwork
-
getClosestPool
public ManaPool getClosestPool(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world, int limit) Description copied from interface:ManaNetworkGets 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.- Specified by:
getClosestPoolin interfaceManaNetwork- Parameters:
limit- The maximum distance the closest block can be, if the closest block is farther away than that, null will be returned instead.
-
getClosestCollector
public ManaCollector getClosestCollector(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world, int limit) Description copied from interface:ManaNetworkGets 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.- Specified by:
getClosestCollectorin interfaceManaNetwork- Parameters:
limit- The maximum distance the closest block can be, if the closest block is farther away than that, null will be returned instead.
-
isCollectorIn
-
isPoolIn
-
getAllCollectorsInWorld
Description copied from interface:ManaNetworkGets read-only view of all Mana Collectors (eg. Mana Spreader) in the dimension passed in.- Specified by:
getAllCollectorsInWorldin interfaceManaNetwork
-
getAllPoolsInWorld
Description copied from interface:ManaNetworkGets read-only view of all Mana Pools in the dimension passed in.- Specified by:
getAllPoolsInWorldin interfaceManaNetwork
-
fireManaNetworkEvent
- Specified by:
fireManaNetworkEventin interfaceManaNetwork
-