public class FarmlandWaterManager
extends java.lang.Object
| Constructor and Description |
|---|
FarmlandWaterManager() |
| Modifier and Type | Method and Description |
|---|---|
static AABBTicket |
addAABBTicket(World world,
AxisAlignedBB aabb)
Convenience method to add a ticket that is backed by an AABB.
|
static <T extends SimpleTicket<Vec3d>> |
addCustomTicket(World world,
T ticket,
ChunkPos... chunkPoses)
Adds a custom ticket.
|
static boolean |
hasBlockWaterTicket(IWorldReaderBase world,
BlockPos pos)
Tests if a block is in a region that is watered by blocks.
|
public static <T extends SimpleTicket<Vec3d>> T addCustomTicket(World world, T ticket, ChunkPos... chunkPoses)
addAABBTicket(World, AxisAlignedBB) if you just need a ticket that can water a certain area.
SimpleTicket.invalidate(). Also call this
when the region this is unloaded (e.g. your TE is unloaded or the block is removed), and validate once it is loadedworld - The world where the region should be marked. Only server-side worlds are allowedticket - Your ticket you want to have registeredchunkPoses - The chunkPoses where the ticket is locatedpublic static AABBTicket addAABBTicket(World world, AxisAlignedBB aabb)
SimpleTicket.invalidate(). Also call this
when the region this is unloaded (e.g. your TE is unloaded or the block is removed), and validate once it is loaded
world - The world where the region should be marked. Only server-side worlds are allowedaabb - The region where blocks should be wateredpublic static boolean hasBlockWaterTicket(IWorldReaderBase world, BlockPos pos)
net.minecraft.block.BlockFarmland#hasWater(World, BlockPos)