Package vazkii.botania.api.internal
Interface ManaNetwork
- All Known Implementing Classes:
DummyManaNetwork,ManaNetworkHandler
public interface ManaNetwork
A basic interface for a world's Mana Network.
-
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.@Nullable ManaCollectorgetClosestCollector(net.minecraft.core.BlockPos pos, net.minecraft.world.level.Level world, int limit) Gets the closest Mana Collector (eg.@Nullable ManaPoolgetClosestPool(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
Gets read-only view of all Mana Collectors (eg. Mana Spreader) in the dimension passed in. -
getAllPoolsInWorld
Gets read-only view of all Mana Pools in the dimension passed in. -
fireManaNetworkEvent
-