Package net.minecraft.world.gen
Class WorldGenRegion
- java.lang.Object
-
- net.minecraft.world.gen.WorldGenRegion
-
- All Implemented Interfaces:
BiomeManager.IBiomeReader
,IWorldGenerationBaseReader
,IWorldGenerationReader
,IBiomeReader
,IBlockDisplayReader
,IBlockReader
,ICollisionReader
,IDayTimeReader
,IEntityReader
,ISeedReader
,IServerWorld
,IWorld
,IWorldReader
,IWorldWriter
public class WorldGenRegion extends java.lang.Object implements ISeedReader
-
-
Field Summary
Fields Modifier and Type Field Description private BiomeManager
biomeManager
private ITickList<Block>
blockTicks
private java.util.List<IChunk>
cache
private DimensionType
dimensionType
private ChunkPos
firstPos
private ChunkPos
lastPos
private ServerWorld
level
private IWorldInfo
levelData
private ITickList<Fluid>
liquidTicks
private static org.apache.logging.log4j.Logger
LOGGER
private java.util.Random
random
private long
seed
private int
size
private StructureManager
structureFeatureManager
private int
x
private int
z
-
Constructor Summary
Constructors Constructor Description WorldGenRegion(ServerWorld p_i50698_1_, java.util.List<IChunk> p_i50698_2_)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
addFreshEntity(Entity p_217376_1_)
void
addParticle(IParticleData p_195594_1_, double p_195594_2_, double p_195594_4_, double p_195594_6_, double p_195594_8_, double p_195594_10_, double p_195594_12_)
boolean
destroyBlock(BlockPos p_241212_1_, boolean p_241212_2_, Entity p_241212_3_, int p_241212_4_)
DimensionType
dimensionType()
BiomeManager
getBiomeManager()
TileEntity
getBlockEntity(BlockPos p_175625_1_)
BlockState
getBlockState(BlockPos p_180495_1_)
ITickList<Block>
getBlockTicks()
int
getCenterX()
int
getCenterZ()
IChunk
getChunk(int p_212866_1_, int p_212866_2_)
IChunk
getChunk(int p_217353_1_, int p_217353_2_, ChunkStatus p_217353_3_, boolean p_217353_4_)
AbstractChunkProvider
getChunkSource()
DifficultyInstance
getCurrentDifficultyAt(BlockPos p_175649_1_)
java.util.List<Entity>
getEntities(Entity p_175674_1_, AxisAlignedBB p_175674_2_, java.util.function.Predicate<? super Entity> p_175674_3_)
<T extends Entity>
java.util.List<T>getEntitiesOfClass(java.lang.Class<? extends T> p_175647_1_, AxisAlignedBB p_175647_2_, java.util.function.Predicate<? super T> p_175647_3_)
FluidState
getFluidState(BlockPos p_204610_1_)
int
getHeight(Heightmap.Type p_201676_1_, int p_201676_2_, int p_201676_3_)
ServerWorld
getLevel()
Deprecated.IWorldInfo
getLevelData()
WorldLightManager
getLightEngine()
ITickList<Fluid>
getLiquidTicks()
PlayerEntity
getNearestPlayer(double p_190525_1_, double p_190525_3_, double p_190525_5_, double p_190525_7_, java.util.function.Predicate<Entity> p_190525_9_)
java.util.Random
getRandom()
int
getSeaLevel()
long
getSeed()
float
getShade(Direction p_230487_1_, boolean p_230487_2_)
int
getSkyDarken()
Biome
getUncachedNoiseBiome(int p_225604_1_, int p_225604_2_, int p_225604_3_)
WorldBorder
getWorldBorder()
boolean
hasChunk(int p_217354_1_, int p_217354_2_)
boolean
isClientSide()
boolean
isStateAtPosition(BlockPos p_217375_1_, java.util.function.Predicate<BlockState> p_217375_2_)
void
levelEvent(PlayerEntity p_217378_1_, int p_217378_2_, BlockPos p_217378_3_, int p_217378_4_)
private void
markPosForPostprocessing(BlockPos p_201683_1_)
java.util.List<PlayerEntity>
players()
void
playSound(PlayerEntity p_184133_1_, BlockPos p_184133_2_, SoundEvent p_184133_3_, SoundCategory p_184133_4_, float p_184133_5_, float p_184133_6_)
DynamicRegistries
registryAccess()
boolean
removeBlock(BlockPos p_217377_1_, boolean p_217377_2_)
boolean
setBlock(BlockPos p_241211_1_, BlockState p_241211_2_, int p_241211_3_, int p_241211_4_)
java.util.stream.Stream<? extends StructureStart<?>>
startsForFeature(SectionPos p_241827_1_, Structure<?> p_241827_2_)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.world.IBiomeReader
getBiomeName, getEntityCollisions, getHeightmapPos, isUnobstructed
-
Methods inherited from interface net.minecraft.world.IBlockDisplayReader
canSeeSky, getBrightness, getRawBrightness
-
Methods inherited from interface net.minecraft.world.IBlockReader
clip, clipWithInteractionOverride, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, getMaxBuildHeight, getMaxLightLevel
-
Methods inherited from interface net.minecraft.world.ICollisionReader
getBlockCollisions, getBlockCollisions, getCollisions, getEntityCollisions, isUnobstructed, isUnobstructed, isUnobstructed, noBlockCollision, noCollision, noCollision, noCollision, noCollision
-
Methods inherited from interface net.minecraft.world.IDayTimeReader
getMoonBrightness, getMoonPhase, getTimeOfDay
-
Methods inherited from interface net.minecraft.world.IEntityReader
getEntities, getEntitiesOfClass, getLoadedEntitiesOfClass, getLoadedEntitiesOfClass, getNearbyEntities, getNearbyPlayers, getNearestEntity, getNearestEntity, getNearestLoadedEntity, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getPlayerByUUID, hasNearbyAlivePlayer
-
Methods inherited from interface net.minecraft.world.IServerWorld
addFreshEntityWithPassengers
-
Methods inherited from interface net.minecraft.world.IWorld
blockUpdated, dayTime, getDifficulty, getHeight, levelEvent
-
Methods inherited from interface net.minecraft.world.IWorldReader
canSeeSkyFromBelowWater, containsAnyLiquid, getBiome, getBlockStatesIfLoaded, getBlockTint, getBrightness, getChunk, getChunk, getChunkForCollisions, getDirectSignal, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getNoiseBiome, hasChunkAt, hasChunksAt, hasChunksAt, isAreaLoaded, isEmptyBlock, isWaterAt
-
Methods inherited from interface net.minecraft.world.IWorldWriter
destroyBlock, destroyBlock, setBlock
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
cache
private final java.util.List<IChunk> cache
-
x
private final int x
-
z
private final int z
-
size
private final int size
-
level
private final ServerWorld level
-
seed
private final long seed
-
levelData
private final IWorldInfo levelData
-
random
private final java.util.Random random
-
dimensionType
private final DimensionType dimensionType
-
biomeManager
private final BiomeManager biomeManager
-
firstPos
private final ChunkPos firstPos
-
lastPos
private final ChunkPos lastPos
-
structureFeatureManager
private final StructureManager structureFeatureManager
-
-
Constructor Detail
-
WorldGenRegion
public WorldGenRegion(ServerWorld p_i50698_1_, java.util.List<IChunk> p_i50698_2_)
-
-
Method Detail
-
getCenterX
public int getCenterX()
-
getCenterZ
public int getCenterZ()
-
getChunk
public IChunk getChunk(int p_212866_1_, int p_212866_2_)
- Specified by:
getChunk
in interfaceIWorldReader
-
getChunk
@Nullable public IChunk getChunk(int p_217353_1_, int p_217353_2_, ChunkStatus p_217353_3_, boolean p_217353_4_)
- Specified by:
getChunk
in interfaceIWorldReader
-
hasChunk
public boolean hasChunk(int p_217354_1_, int p_217354_2_)
- Specified by:
hasChunk
in interfaceIWorld
- Specified by:
hasChunk
in interfaceIWorldReader
-
getBlockState
public BlockState getBlockState(BlockPos p_180495_1_)
- Specified by:
getBlockState
in interfaceIBlockReader
-
getFluidState
public FluidState getFluidState(BlockPos p_204610_1_)
- Specified by:
getFluidState
in interfaceIBlockReader
-
getNearestPlayer
@Nullable public PlayerEntity getNearestPlayer(double p_190525_1_, double p_190525_3_, double p_190525_5_, double p_190525_7_, java.util.function.Predicate<Entity> p_190525_9_)
- Specified by:
getNearestPlayer
in interfaceIEntityReader
-
getSkyDarken
public int getSkyDarken()
- Specified by:
getSkyDarken
in interfaceIWorldReader
-
getBiomeManager
public BiomeManager getBiomeManager()
- Specified by:
getBiomeManager
in interfaceIWorldReader
-
getUncachedNoiseBiome
public Biome getUncachedNoiseBiome(int p_225604_1_, int p_225604_2_, int p_225604_3_)
- Specified by:
getUncachedNoiseBiome
in interfaceIWorldReader
-
getShade
public float getShade(Direction p_230487_1_, boolean p_230487_2_)
- Specified by:
getShade
in interfaceIBlockDisplayReader
-
getLightEngine
public WorldLightManager getLightEngine()
- Specified by:
getLightEngine
in interfaceIBlockDisplayReader
-
destroyBlock
public boolean destroyBlock(BlockPos p_241212_1_, boolean p_241212_2_, @Nullable Entity p_241212_3_, int p_241212_4_)
- Specified by:
destroyBlock
in interfaceIWorldWriter
-
getBlockEntity
@Nullable public TileEntity getBlockEntity(BlockPos p_175625_1_)
- Specified by:
getBlockEntity
in interfaceIBlockReader
-
setBlock
public boolean setBlock(BlockPos p_241211_1_, BlockState p_241211_2_, int p_241211_3_, int p_241211_4_)
- Specified by:
setBlock
in interfaceIWorldWriter
-
markPosForPostprocessing
private void markPosForPostprocessing(BlockPos p_201683_1_)
-
addFreshEntity
public boolean addFreshEntity(Entity p_217376_1_)
- Specified by:
addFreshEntity
in interfaceIWorldWriter
-
removeBlock
public boolean removeBlock(BlockPos p_217377_1_, boolean p_217377_2_)
- Specified by:
removeBlock
in interfaceIWorldWriter
-
getWorldBorder
public WorldBorder getWorldBorder()
- Specified by:
getWorldBorder
in interfaceICollisionReader
-
isClientSide
public boolean isClientSide()
- Specified by:
isClientSide
in interfaceIWorldReader
-
getLevel
@Deprecated public ServerWorld getLevel()
Deprecated.- Specified by:
getLevel
in interfaceIServerWorld
-
registryAccess
public DynamicRegistries registryAccess()
- Specified by:
registryAccess
in interfaceIBiomeReader
-
getLevelData
public IWorldInfo getLevelData()
- Specified by:
getLevelData
in interfaceIWorld
-
getCurrentDifficultyAt
public DifficultyInstance getCurrentDifficultyAt(BlockPos p_175649_1_)
- Specified by:
getCurrentDifficultyAt
in interfaceIWorld
-
getChunkSource
public AbstractChunkProvider getChunkSource()
- Specified by:
getChunkSource
in interfaceIWorld
-
getSeed
public long getSeed()
- Specified by:
getSeed
in interfaceISeedReader
-
getBlockTicks
public ITickList<Block> getBlockTicks()
- Specified by:
getBlockTicks
in interfaceIWorld
-
getLiquidTicks
public ITickList<Fluid> getLiquidTicks()
- Specified by:
getLiquidTicks
in interfaceIWorld
-
getSeaLevel
public int getSeaLevel()
- Specified by:
getSeaLevel
in interfaceIWorldReader
-
getHeight
public int getHeight(Heightmap.Type p_201676_1_, int p_201676_2_, int p_201676_3_)
- Specified by:
getHeight
in interfaceIWorldReader
-
playSound
public void playSound(@Nullable PlayerEntity p_184133_1_, BlockPos p_184133_2_, SoundEvent p_184133_3_, SoundCategory p_184133_4_, float p_184133_5_, float p_184133_6_)
-
addParticle
public void addParticle(IParticleData p_195594_1_, double p_195594_2_, double p_195594_4_, double p_195594_6_, double p_195594_8_, double p_195594_10_, double p_195594_12_)
- Specified by:
addParticle
in interfaceIWorld
-
levelEvent
public void levelEvent(@Nullable PlayerEntity p_217378_1_, int p_217378_2_, BlockPos p_217378_3_, int p_217378_4_)
- Specified by:
levelEvent
in interfaceIWorld
-
dimensionType
public DimensionType dimensionType()
- Specified by:
dimensionType
in interfaceIWorldReader
-
isStateAtPosition
public boolean isStateAtPosition(BlockPos p_217375_1_, java.util.function.Predicate<BlockState> p_217375_2_)
- Specified by:
isStateAtPosition
in interfaceIWorldGenerationBaseReader
-
getEntitiesOfClass
public <T extends Entity> java.util.List<T> getEntitiesOfClass(java.lang.Class<? extends T> p_175647_1_, AxisAlignedBB p_175647_2_, @Nullable java.util.function.Predicate<? super T> p_175647_3_)
- Specified by:
getEntitiesOfClass
in interfaceIEntityReader
-
getEntities
public java.util.List<Entity> getEntities(@Nullable Entity p_175674_1_, AxisAlignedBB p_175674_2_, @Nullable java.util.function.Predicate<? super Entity> p_175674_3_)
- Specified by:
getEntities
in interfaceIEntityReader
-
players
public java.util.List<PlayerEntity> players()
- Specified by:
players
in interfaceIEntityReader
-
startsForFeature
public java.util.stream.Stream<? extends StructureStart<?>> startsForFeature(SectionPos p_241827_1_, Structure<?> p_241827_2_)
- Specified by:
startsForFeature
in interfaceISeedReader
-
-