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 BiomeManagerbiomeManagerprivate ITickList<Block>blockTicksprivate java.util.List<IChunk>cacheprivate DimensionTypedimensionTypeprivate ChunkPosfirstPosprivate ChunkPoslastPosprivate ServerWorldlevelprivate IWorldInfolevelDataprivate ITickList<Fluid>liquidTicksprivate static org.apache.logging.log4j.LoggerLOGGERprivate java.util.Randomrandomprivate longseedprivate intsizeprivate StructureManagerstructureFeatureManagerprivate intxprivate intz
-
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 booleanaddFreshEntity(Entity p_217376_1_)voidaddParticle(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_)booleandestroyBlock(BlockPos p_241212_1_, boolean p_241212_2_, Entity p_241212_3_, int p_241212_4_)DimensionTypedimensionType()BiomeManagergetBiomeManager()TileEntitygetBlockEntity(BlockPos p_175625_1_)BlockStategetBlockState(BlockPos p_180495_1_)ITickList<Block>getBlockTicks()intgetCenterX()intgetCenterZ()IChunkgetChunk(int p_212866_1_, int p_212866_2_)IChunkgetChunk(int p_217353_1_, int p_217353_2_, ChunkStatus p_217353_3_, boolean p_217353_4_)AbstractChunkProvidergetChunkSource()DifficultyInstancegetCurrentDifficultyAt(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_)FluidStategetFluidState(BlockPos p_204610_1_)intgetHeight(Heightmap.Type p_201676_1_, int p_201676_2_, int p_201676_3_)ServerWorldgetLevel()Deprecated.IWorldInfogetLevelData()WorldLightManagergetLightEngine()ITickList<Fluid>getLiquidTicks()PlayerEntitygetNearestPlayer(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.RandomgetRandom()intgetSeaLevel()longgetSeed()floatgetShade(Direction p_230487_1_, boolean p_230487_2_)intgetSkyDarken()BiomegetUncachedNoiseBiome(int p_225604_1_, int p_225604_2_, int p_225604_3_)WorldBordergetWorldBorder()booleanhasChunk(int p_217354_1_, int p_217354_2_)booleanisClientSide()booleanisStateAtPosition(BlockPos p_217375_1_, java.util.function.Predicate<BlockState> p_217375_2_)voidlevelEvent(PlayerEntity p_217378_1_, int p_217378_2_, BlockPos p_217378_3_, int p_217378_4_)private voidmarkPosForPostprocessing(BlockPos p_201683_1_)java.util.List<PlayerEntity>players()voidplaySound(PlayerEntity p_184133_1_, BlockPos p_184133_2_, SoundEvent p_184133_3_, SoundCategory p_184133_4_, float p_184133_5_, float p_184133_6_)DynamicRegistriesregistryAccess()booleanremoveBlock(BlockPos p_217377_1_, boolean p_217377_2_)booleansetBlock(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:
getChunkin interfaceIWorldReader
-
getChunk
@Nullable public IChunk getChunk(int p_217353_1_, int p_217353_2_, ChunkStatus p_217353_3_, boolean p_217353_4_)
- Specified by:
getChunkin interfaceIWorldReader
-
hasChunk
public boolean hasChunk(int p_217354_1_, int p_217354_2_)- Specified by:
hasChunkin interfaceIWorld- Specified by:
hasChunkin interfaceIWorldReader
-
getBlockState
public BlockState getBlockState(BlockPos p_180495_1_)
- Specified by:
getBlockStatein interfaceIBlockReader
-
getFluidState
public FluidState getFluidState(BlockPos p_204610_1_)
- Specified by:
getFluidStatein 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:
getNearestPlayerin interfaceIEntityReader
-
getSkyDarken
public int getSkyDarken()
- Specified by:
getSkyDarkenin interfaceIWorldReader
-
getBiomeManager
public BiomeManager getBiomeManager()
- Specified by:
getBiomeManagerin interfaceIWorldReader
-
getUncachedNoiseBiome
public Biome getUncachedNoiseBiome(int p_225604_1_, int p_225604_2_, int p_225604_3_)
- Specified by:
getUncachedNoiseBiomein interfaceIWorldReader
-
getShade
public float getShade(Direction p_230487_1_, boolean p_230487_2_)
- Specified by:
getShadein interfaceIBlockDisplayReader
-
getLightEngine
public WorldLightManager getLightEngine()
- Specified by:
getLightEnginein interfaceIBlockDisplayReader
-
destroyBlock
public boolean destroyBlock(BlockPos p_241212_1_, boolean p_241212_2_, @Nullable Entity p_241212_3_, int p_241212_4_)
- Specified by:
destroyBlockin interfaceIWorldWriter
-
getBlockEntity
@Nullable public TileEntity getBlockEntity(BlockPos p_175625_1_)
- Specified by:
getBlockEntityin interfaceIBlockReader
-
setBlock
public boolean setBlock(BlockPos p_241211_1_, BlockState p_241211_2_, int p_241211_3_, int p_241211_4_)
- Specified by:
setBlockin interfaceIWorldWriter
-
markPosForPostprocessing
private void markPosForPostprocessing(BlockPos p_201683_1_)
-
addFreshEntity
public boolean addFreshEntity(Entity p_217376_1_)
- Specified by:
addFreshEntityin interfaceIWorldWriter
-
removeBlock
public boolean removeBlock(BlockPos p_217377_1_, boolean p_217377_2_)
- Specified by:
removeBlockin interfaceIWorldWriter
-
getWorldBorder
public WorldBorder getWorldBorder()
- Specified by:
getWorldBorderin interfaceICollisionReader
-
isClientSide
public boolean isClientSide()
- Specified by:
isClientSidein interfaceIWorldReader
-
getLevel
@Deprecated public ServerWorld getLevel()
Deprecated.- Specified by:
getLevelin interfaceIServerWorld
-
registryAccess
public DynamicRegistries registryAccess()
- Specified by:
registryAccessin interfaceIBiomeReader
-
getLevelData
public IWorldInfo getLevelData()
- Specified by:
getLevelDatain interfaceIWorld
-
getCurrentDifficultyAt
public DifficultyInstance getCurrentDifficultyAt(BlockPos p_175649_1_)
- Specified by:
getCurrentDifficultyAtin interfaceIWorld
-
getChunkSource
public AbstractChunkProvider getChunkSource()
- Specified by:
getChunkSourcein interfaceIWorld
-
getSeed
public long getSeed()
- Specified by:
getSeedin interfaceISeedReader
-
getBlockTicks
public ITickList<Block> getBlockTicks()
- Specified by:
getBlockTicksin interfaceIWorld
-
getLiquidTicks
public ITickList<Fluid> getLiquidTicks()
- Specified by:
getLiquidTicksin interfaceIWorld
-
getSeaLevel
public int getSeaLevel()
- Specified by:
getSeaLevelin interfaceIWorldReader
-
getHeight
public int getHeight(Heightmap.Type p_201676_1_, int p_201676_2_, int p_201676_3_)
- Specified by:
getHeightin 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:
addParticlein interfaceIWorld
-
levelEvent
public void levelEvent(@Nullable PlayerEntity p_217378_1_, int p_217378_2_, BlockPos p_217378_3_, int p_217378_4_)- Specified by:
levelEventin interfaceIWorld
-
dimensionType
public DimensionType dimensionType()
- Specified by:
dimensionTypein interfaceIWorldReader
-
isStateAtPosition
public boolean isStateAtPosition(BlockPos p_217375_1_, java.util.function.Predicate<BlockState> p_217375_2_)
- Specified by:
isStateAtPositionin 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:
getEntitiesOfClassin 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:
getEntitiesin interfaceIEntityReader
-
players
public java.util.List<PlayerEntity> players()
- Specified by:
playersin interfaceIEntityReader
-
startsForFeature
public java.util.stream.Stream<? extends StructureStart<?>> startsForFeature(SectionPos p_241827_1_, Structure<?> p_241827_2_)
- Specified by:
startsForFeaturein interfaceISeedReader
-
-