public class ChunkRegion extends Object implements IWorld
| Modifier and Type | Field and Description |
|---|---|
private BiomeAccess |
biomeAccess |
private TickScheduler<Block> |
blockTickScheduler |
private int |
centerChunkX |
private int |
centerChunkZ |
private List<Chunk> |
chunks |
private Dimension |
dimension |
private ChunkPos |
field_23788 |
private ChunkPos |
field_23789 |
private TickScheduler<Fluid> |
fluidTickScheduler |
private ChunkGeneratorConfig |
generatorSettings |
private LevelProperties |
levelProperties |
private static Logger |
LOGGER |
private Random |
random |
private int |
seaLevel |
private long |
seed |
private int |
width |
private ServerWorld |
world |
| Constructor and Description |
|---|
ChunkRegion(ServerWorld world,
List<Chunk> chunks) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDifficulty, getDimensionHeight, getEntityCollisions, getMoonPhase, getMoonSize, getSkyAngle, getTopPosition, intersectsEntities, playLevelEvent, updateNeighborsgetClosestEntity, getClosestEntity, getClosestEntityIncludingUngeneratedChunks, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getEntities, getEntitiesIncludingUngeneratedChunks, getEntitiesIncludingUngeneratedChunks, getNonSpectatingEntities, getPlayerByUuid, getPlayers, getTargets, isPlayerInRangecontainsFluid, getBiome, getBiomeForNoiseGen, getBrightness, getChunk, getChunk, getColor, getExistingChunk, getLightLevel, getLightLevel, getStrongRedstonePower, isAir, isChunkLoaded, isRegionLoaded, isRegionLoaded, isSkyVisibleAllowingSea, isWatergetBaseLightLevel, getLightLevel, isSkyVisiblecanPlace, doesNotCollide, doesNotCollide, doesNotCollide, doesNotCollide, getBlockCollisions, getCollisions, intersectsEntities, method_27087getHeight, getLuminance, getMaxLightLevel, rayTrace, rayTrace, rayTraceBlockbreakBlockprivate static final Logger LOGGER
private final int centerChunkX
private final int centerChunkZ
private final int width
private final ServerWorld world
private final long seed
private final int seaLevel
private final LevelProperties levelProperties
private final Random random
private final Dimension dimension
private final ChunkGeneratorConfig generatorSettings
private final TickScheduler<Block> blockTickScheduler
private final TickScheduler<Fluid> fluidTickScheduler
private final BiomeAccess biomeAccess
private final ChunkPos field_23788
private final ChunkPos field_23789
public ChunkRegion(ServerWorld world, List<Chunk> chunks)
public int getCenterChunkX()
public int getCenterChunkZ()
public Chunk getChunk(int chunkX, int chunkZ)
@Nullable public Chunk getChunk(int chunkX, int chunkZ, ChunkStatus leastStatus, boolean create)
public boolean isChunkLoaded(int chunkX,
int chunkZ)
isChunkLoaded in interface IWorldisChunkLoaded in interface WorldViewpublic BlockState getBlockState(BlockPos pos)
getBlockState in interface BlockViewpublic FluidState getFluidState(BlockPos pos)
getFluidState in interface BlockView@Nullable public PlayerEntity getClosestPlayer(double x, double y, double z, double maxDistance, Predicate<Entity> targetPredicate)
getClosestPlayer in interface EntityViewpublic int getAmbientDarkness()
getAmbientDarkness in interface WorldViewpublic BiomeAccess getBiomeAccess()
getBiomeAccess in interface WorldViewpublic Biome getGeneratorStoredBiome(int biomeX, int biomeY, int biomeZ)
getGeneratorStoredBiome in interface WorldView@Environment(value=CLIENT) public float getBrightness(Direction direction, boolean shaded)
getBrightness in interface BlockRenderViewpublic LightingProvider getLightingProvider()
getLightingProvider in interface BlockRenderViewpublic boolean breakBlock(BlockPos pos, boolean drop, @Nullable Entity breakingEntity)
breakBlock in interface ModifiableWorld@Nullable public BlockEntity getBlockEntity(BlockPos pos)
getBlockEntity in interface BlockViewpublic boolean setBlockState(BlockPos pos, BlockState state, int flags)
When called on the server, the new block state is stored and propagated to clients and listeners as dictated by the supplied flags. Note that calling this on the client will update the world locally, but may not see the change persisted across loads. It's recommended to check whether this world is client before interacting with the world in this way.
Accepted values of the flags are a bitset combination of the following:
setBlockState in interface ModifiableWorldpos - the target positionstate - the block state to setflags - the bitwise flag combination, as described aboveprivate void markBlockForPostProcessing(BlockPos blockPos)
public boolean spawnEntity(Entity entity)
spawnEntity in interface ModifiableWorldpublic boolean removeBlock(BlockPos pos, boolean move)
removeBlock in interface ModifiableWorldpublic WorldBorder getWorldBorder()
getWorldBorder in interface CollisionView@Deprecated public ServerWorld getWorld()
public LevelProperties getLevelProperties()
getLevelProperties in interface IWorldpublic LocalDifficulty getLocalDifficulty(BlockPos pos)
getLocalDifficulty in interface IWorldpublic ChunkManager getChunkManager()
getChunkManager in interface IWorldpublic TickScheduler<Block> getBlockTickScheduler()
getBlockTickScheduler in interface IWorldpublic TickScheduler<Fluid> getFluidTickScheduler()
getFluidTickScheduler in interface IWorldpublic int getSeaLevel()
getSeaLevel in interface WorldViewpublic int getTopY(Heightmap.Type heightmap, int x, int z)
public void playSound(@Nullable PlayerEntity player, BlockPos pos, SoundEvent sound, SoundCategory category, float volume, float pitch)
public void addParticle(ParticleEffect parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ)
addParticle in interface IWorldpublic void playLevelEvent(@Nullable PlayerEntity player, int eventId, BlockPos pos, int data)
playLevelEvent in interface IWorldpublic Dimension getDimension()
getDimension in interface WorldViewpublic boolean testBlockState(BlockPos pos, Predicate<BlockState> state)
testBlockState in interface TestableWorldpublic <T extends Entity> List<T> getEntities(Class<? extends T> entityClass, Box box, @Nullable Predicate<? super T> predicate)
getEntities in interface EntityViewpublic List<Entity> getEntities(@Nullable Entity except, Box box, @Nullable Predicate<? super Entity> predicate)
getEntities in interface EntityViewpublic List<PlayerEntity> getPlayers()
getPlayers in interface EntityView