public class FarmlandWaterManager
extends java.lang.Object
コンストラクタと説明 |
---|
FarmlandWaterManager() |
修飾子とタイプ | メソッドと説明 |
---|---|
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 masterChunk,
ChunkPos... additionalChunks)
Adds a custom ticket.
|
static boolean |
hasBlockWaterTicket(IWorldReader 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 masterChunk, ChunkPos... additionalChunks)
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 registeredmasterChunk
- The chunk pos that is controls when the ticket may be unloaded. The ticket should originate from here.additionalChunks
- The chunks in that this ticket wants to operate as well.public 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(IWorldReader world, BlockPos pos)
FarmlandBlock.hasWater(IWorldReader, BlockPos)