Package net.minecraft.world
Class World
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<World>
-
- net.minecraft.world.World
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,BiomeManager.IBiomeReader
,IWorldGenerationBaseReader
,IWorldGenerationReader
,IBiomeReader
,IBlockDisplayReader
,IBlockReader
,ICollisionReader
,IDayTimeReader
,IEntityReader
,IWorld
,IWorldReader
,IWorldWriter
,ICapabilityProvider
,IForgeWorld
- Direct Known Subclasses:
ClientWorld
,ServerWorld
public abstract class World extends CapabilityProvider<World> implements IWorld, java.lang.AutoCloseable, IForgeWorld
-
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description protected
World(ISpawnWorldInfo p_i241925_1_, RegistryKey<World> p_i241925_2_, DimensionType p_i241925_3_, java.util.function.Supplier<IProfiler> p_i241925_4_, boolean p_i241925_5_, boolean p_i241925_6_, long p_i241925_7_)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addAllPendingBlockEntities(java.util.Collection<TileEntity> p_147448_1_)
void
addAlwaysVisibleParticle(IParticleData p_217404_1_, boolean p_217404_2_, double p_217404_3_, double p_217404_5_, double p_217404_7_, double p_217404_9_, double p_217404_11_, double p_217404_13_)
void
addAlwaysVisibleParticle(IParticleData p_195589_1_, double p_195589_2_, double p_195589_4_, double p_195589_6_, double p_195589_8_, double p_195589_10_, double p_195589_12_)
boolean
addBlockEntity(TileEntity p_175700_1_)
void
addParticle(IParticleData p_195590_1_, boolean p_195590_2_, double p_195590_3_, double p_195590_5_, double p_195590_7_, double p_195590_9_, double p_195590_11_, double p_195590_13_)
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_)
void
blockEntityChanged(BlockPos p_175646_1_, TileEntity p_175646_2_)
void
blockEvent(BlockPos p_175641_1_, Block p_175641_2_, int p_175641_3_, int p_175641_4_)
void
broadcastEntityEvent(Entity p_72960_1_, byte p_72960_2_)
void
close()
void
createFireworks(double p_92088_1_, double p_92088_3_, double p_92088_5_, double p_92088_7_, double p_92088_9_, double p_92088_11_, CompoundNBT p_92088_13_)
boolean
destroyBlock(BlockPos p_241212_1_, boolean p_241212_2_, Entity p_241212_3_, int p_241212_4_)
abstract void
destroyBlockProgress(int p_175715_1_, BlockPos p_175715_2_, int p_175715_3_)
RegistryKey<World>
dimension()
DimensionType
dimensionType()
void
disconnect()
Explosion
explode(Entity p_217398_1_, double p_217398_2_, double p_217398_4_, double p_217398_6_, float p_217398_8_, boolean p_217398_9_, Explosion.Mode p_217398_10_)
Explosion
explode(Entity p_217385_1_, double p_217385_2_, double p_217385_4_, double p_217385_6_, float p_217385_8_, Explosion.Mode p_217385_9_)
Explosion
explode(Entity p_230546_1_, DamageSource p_230546_2_, ExplosionContext p_230546_3_, double p_230546_4_, double p_230546_6_, double p_230546_8_, float p_230546_10_, boolean p_230546_11_, Explosion.Mode p_230546_12_)
CrashReportCategory
fillReportDetails(CrashReport p_72914_1_)
java.lang.String
gatherChunkSourceStats()
int
getBestNeighborSignal(BlockPos p_175687_1_)
BiomeManager
getBiomeManager()
TileEntity
getBlockEntity(BlockPos p_175625_1_)
BlockPos
getBlockRandomPos(int p_217383_1_, int p_217383_2_, int p_217383_3_, int p_217383_4_)
BlockState
getBlockState(BlockPos p_180495_1_)
Chunk
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_)
Chunk
getChunkAt(BlockPos p_175726_1_)
IBlockReader
getChunkForCollisions(int p_225522_1_, int p_225522_2_)
DifficultyInstance
getCurrentDifficultyAt(BlockPos p_175649_1_)
long
getDayTime()
int
getDirectSignalTo(BlockPos p_175676_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>getEntities(EntityType<T> p_217394_1_, AxisAlignedBB p_217394_2_, java.util.function.Predicate<? super T> p_217394_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_)
abstract Entity
getEntity(int p_73045_1_)
FluidState
getFluidState(BlockPos p_204610_1_)
abstract int
getFreeMapId()
GameRules
getGameRules()
long
getGameTime()
int
getHeight(Heightmap.Type p_201676_1_, int p_201676_2_, int p_201676_3_)
IWorldInfo
getLevelData()
WorldLightManager
getLightEngine()
<T extends Entity>
java.util.List<T>getLoadedEntitiesOfClass(java.lang.Class<? extends T> p_225316_1_, AxisAlignedBB p_225316_2_, java.util.function.Predicate<? super T> p_225316_3_)
abstract MapData
getMapData(java.lang.String p_217406_1_)
double
getMaxEntityRadius()
The maximum radius to scan for entities when trying to check bounding boxes.private TileEntity
getPendingBlockEntityAt(BlockPos p_189508_1_)
IProfiler
getProfiler()
java.util.function.Supplier<IProfiler>
getProfilerSupplier()
float
getRainLevel(float p_72867_1_)
java.util.Random
getRandom()
abstract RecipeManager
getRecipeManager()
abstract Scoreboard
getScoreboard()
int
getSeaLevel()
MinecraftServer
getServer()
int
getSignal(BlockPos p_175651_1_, Direction p_175651_2_)
int
getSkyDarken()
float
getSunAngle(float p_72929_1_)
abstract ITagCollectionSupplier
getTagManager()
float
getThunderLevel(float p_72819_1_)
WorldBorder
getWorldBorder()
void
globalLevelEvent(int p_175669_1_, BlockPos p_175669_2_, int p_175669_3_)
void
guardEntityTick(java.util.function.Consumer<Entity> p_217390_1_, Entity p_217390_2_)
boolean
hasNeighborSignal(BlockPos p_175640_1_)
boolean
hasSignal(BlockPos p_175709_1_, Direction p_175709_2_)
double
increaseMaxEntityRadius(double value)
Increases the max entity radius, this is safe to call with any value.boolean
isClientSide()
boolean
isDay()
boolean
isDebug()
boolean
isHumidAt(BlockPos p_180502_1_)
static boolean
isInSpawnableBounds(BlockPos p_234935_0_)
static boolean
isInWorldBounds(BlockPos p_175701_0_)
private static boolean
isInWorldBoundsHorizontal(BlockPos p_234934_0_)
boolean
isLoaded(BlockPos p_195588_1_)
boolean
isNight()
static boolean
isOutsideBuildHeight(int p_217405_0_)
static boolean
isOutsideBuildHeight(BlockPos p_189509_0_)
private static boolean
isOutsideSpawnableHeight(int p_234933_0_)
boolean
isRaining()
boolean
isRainingAt(BlockPos p_175727_1_)
boolean
isStateAtPosition(BlockPos p_217375_1_, java.util.function.Predicate<BlockState> p_217375_2_)
boolean
isThundering()
boolean
loadedAndEntityCanStandOn(BlockPos p_217400_1_, Entity p_217400_2_)
boolean
loadedAndEntityCanStandOnFace(BlockPos p_234929_1_, Entity p_234929_2_, Direction p_234929_3_)
void
markAndNotifyBlock(BlockPos p_241211_1_, Chunk chunk, BlockState blockstate, BlockState p_241211_2_, int p_241211_3_, int p_241211_4_)
boolean
mayInteract(PlayerEntity p_175660_1_, BlockPos p_175660_2_)
void
neighborChanged(BlockPos p_190524_1_, Block p_190524_2_, BlockPos p_190524_3_)
boolean
noSave()
void
onBlockStateChange(BlockPos p_217393_1_, BlockState p_217393_2_, BlockState p_217393_3_)
void
playLocalSound(double p_184134_1_, double p_184134_3_, double p_184134_5_, SoundEvent p_184134_7_, SoundCategory p_184134_8_, float p_184134_9_, float p_184134_10_, boolean p_184134_11_)
abstract void
playSound(PlayerEntity p_184148_1_, double p_184148_2_, double p_184148_4_, double p_184148_6_, SoundEvent p_184148_8_, SoundCategory p_184148_9_, float p_184148_10_, float p_184148_11_)
abstract void
playSound(PlayerEntity p_217384_1_, Entity p_217384_2_, SoundEvent p_217384_3_, SoundCategory p_217384_4_, float p_217384_5_, float p_217384_6_)
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_)
protected void
prepareWeather()
boolean
removeBlock(BlockPos p_217377_1_, boolean p_217377_2_)
void
removeBlockEntity(BlockPos p_175713_1_)
abstract void
sendBlockUpdated(BlockPos p_184138_1_, BlockState p_184138_2_, BlockState p_184138_3_, int p_184138_4_)
void
sendPacketToServer(IPacket<?> p_184135_1_)
boolean
setBlock(BlockPos p_180501_1_, BlockState p_180501_2_, int p_180501_3_)
boolean
setBlock(BlockPos p_241211_1_, BlockState p_241211_2_, int p_241211_3_, int p_241211_4_)
boolean
setBlockAndUpdate(BlockPos p_175656_1_, BlockState p_175656_2_)
void
setBlockEntity(BlockPos p_175690_1_, TileEntity p_175690_2_)
void
setBlocksDirty(BlockPos p_225319_1_, BlockState p_225319_2_, BlockState p_225319_3_)
abstract void
setMapData(MapData p_217399_1_)
void
setRainLevel(float p_72894_1_)
void
setSkyFlashTime(int p_225605_1_)
void
setSpawnSettings(boolean p_72891_1_, boolean p_72891_2_)
void
setThunderLevel(float p_147442_1_)
void
tickBlockEntities()
void
updateNeighborsAt(BlockPos p_195593_1_, Block p_195593_2_)
void
updateNeighborsAtExceptFromFacing(BlockPos p_175695_1_, Block p_175695_2_, Direction p_175695_3_)
void
updateNeighbourForOutputSignal(BlockPos p_175666_1_, Block p_175666_2_)
void
updateSkyBrightness()
-
Methods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, getCapability, invalidateCaps, reviveCaps, serializeCaps
-
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, registryAccess
-
Methods inherited from interface net.minecraft.world.IBlockDisplayReader
canSeeSky, getBrightness, getRawBrightness, getShade
-
Methods inherited from interface net.minecraft.world.IBlockReader
clip, clipWithInteractionOverride, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, getMaxBuildHeight, getMaxLightLevel
-
Methods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapability, getCapability
-
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, getNearbyEntities, getNearbyPlayers, getNearestEntity, getNearestEntity, getNearestLoadedEntity, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getPlayerByUUID, hasNearbyAlivePlayer, players
-
Methods inherited from interface net.minecraftforge.common.extensions.IForgeWorld
getPartEntities
-
Methods inherited from interface net.minecraft.world.IWorld
blockUpdated, dayTime, getBlockTicks, getChunkSource, getDifficulty, getHeight, getLiquidTicks, hasChunk, levelEvent, levelEvent
-
Methods inherited from interface net.minecraft.world.IWorldReader
canSeeSkyFromBelowWater, containsAnyLiquid, getBiome, getBlockStatesIfLoaded, getBlockTint, getBrightness, getChunk, getChunk, getDirectSignal, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getNoiseBiome, getUncachedNoiseBiome, hasChunkAt, hasChunksAt, hasChunksAt, isAreaLoaded, isEmptyBlock, isWaterAt
-
Methods inherited from interface net.minecraft.world.IWorldWriter
addFreshEntity, destroyBlock, destroyBlock
-
-
-
-
Field Detail
-
LOGGER
protected static final org.apache.logging.log4j.Logger LOGGER
-
RESOURCE_KEY_CODEC
public static final com.mojang.serialization.Codec<RegistryKey<World>> RESOURCE_KEY_CODEC
-
OVERWORLD
public static final RegistryKey<World> OVERWORLD
-
NETHER
public static final RegistryKey<World> NETHER
-
END
public static final RegistryKey<World> END
-
DIRECTIONS
private static final Direction[] DIRECTIONS
-
blockEntityList
public final java.util.List<TileEntity> blockEntityList
-
tickableBlockEntities
public final java.util.List<TileEntity> tickableBlockEntities
-
pendingBlockEntities
protected final java.util.List<TileEntity> pendingBlockEntities
-
blockEntitiesToUnload
protected final java.util.Set<TileEntity> blockEntitiesToUnload
-
thread
private final java.lang.Thread thread
-
isDebug
private final boolean isDebug
-
skyDarken
private int skyDarken
-
randValue
protected int randValue
-
addend
protected final int addend
- See Also:
- Constant Field Values
-
oRainLevel
public float oRainLevel
-
rainLevel
public float rainLevel
-
oThunderLevel
public float oThunderLevel
-
thunderLevel
public float thunderLevel
-
random
public final java.util.Random random
-
dimensionType
private final DimensionType dimensionType
-
levelData
protected final ISpawnWorldInfo levelData
-
profiler
private final java.util.function.Supplier<IProfiler> profiler
-
isClientSide
public final boolean isClientSide
-
updatingBlockEntities
protected boolean updatingBlockEntities
-
worldBorder
private final WorldBorder worldBorder
-
biomeManager
private final BiomeManager biomeManager
-
dimension
private final RegistryKey<World> dimension
-
restoringBlockSnapshots
public boolean restoringBlockSnapshots
-
captureBlockSnapshots
public boolean captureBlockSnapshots
-
capturedBlockSnapshots
public java.util.ArrayList<BlockSnapshot> capturedBlockSnapshots
-
maxEntityRadius
private double maxEntityRadius
-
-
Constructor Detail
-
World
protected World(ISpawnWorldInfo p_i241925_1_, RegistryKey<World> p_i241925_2_, DimensionType p_i241925_3_, java.util.function.Supplier<IProfiler> p_i241925_4_, boolean p_i241925_5_, boolean p_i241925_6_, long p_i241925_7_)
-
-
Method Detail
-
isClientSide
public boolean isClientSide()
- Specified by:
isClientSide
in interfaceIWorldReader
-
getServer
@Nullable public MinecraftServer getServer()
-
isInWorldBounds
public static boolean isInWorldBounds(BlockPos p_175701_0_)
-
isInSpawnableBounds
public static boolean isInSpawnableBounds(BlockPos p_234935_0_)
-
isInWorldBoundsHorizontal
private static boolean isInWorldBoundsHorizontal(BlockPos p_234934_0_)
-
isOutsideSpawnableHeight
private static boolean isOutsideSpawnableHeight(int p_234933_0_)
-
isOutsideBuildHeight
public static boolean isOutsideBuildHeight(BlockPos p_189509_0_)
-
isOutsideBuildHeight
public static boolean isOutsideBuildHeight(int p_217405_0_)
-
getChunk
public Chunk getChunk(int p_212866_1_, int p_212866_2_)
- Specified by:
getChunk
in interfaceIWorldReader
-
getChunk
public IChunk getChunk(int p_217353_1_, int p_217353_2_, ChunkStatus p_217353_3_, boolean p_217353_4_)
- Specified by:
getChunk
in interfaceIWorldReader
-
setBlock
public boolean setBlock(BlockPos p_180501_1_, BlockState p_180501_2_, int p_180501_3_)
- Specified by:
setBlock
in interfaceIWorldWriter
-
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
-
markAndNotifyBlock
public void markAndNotifyBlock(BlockPos p_241211_1_, @Nullable Chunk chunk, BlockState blockstate, BlockState p_241211_2_, int p_241211_3_, int p_241211_4_)
-
onBlockStateChange
public void onBlockStateChange(BlockPos p_217393_1_, BlockState p_217393_2_, BlockState p_217393_3_)
-
removeBlock
public boolean removeBlock(BlockPos p_217377_1_, boolean p_217377_2_)
- Specified by:
removeBlock
in interfaceIWorldWriter
-
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
-
setBlockAndUpdate
public boolean setBlockAndUpdate(BlockPos p_175656_1_, BlockState p_175656_2_)
-
sendBlockUpdated
public abstract void sendBlockUpdated(BlockPos p_184138_1_, BlockState p_184138_2_, BlockState p_184138_3_, int p_184138_4_)
-
setBlocksDirty
public void setBlocksDirty(BlockPos p_225319_1_, BlockState p_225319_2_, BlockState p_225319_3_)
-
updateNeighborsAtExceptFromFacing
public void updateNeighborsAtExceptFromFacing(BlockPos p_175695_1_, Block p_175695_2_, Direction p_175695_3_)
-
neighborChanged
public void neighborChanged(BlockPos p_190524_1_, Block p_190524_2_, BlockPos p_190524_3_)
-
getHeight
public int getHeight(Heightmap.Type p_201676_1_, int p_201676_2_, int p_201676_3_)
- Specified by:
getHeight
in interfaceIWorldReader
-
getLightEngine
public WorldLightManager getLightEngine()
- Specified by:
getLightEngine
in interfaceIBlockDisplayReader
-
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
-
isDay
public boolean isDay()
-
isNight
public boolean isNight()
-
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_)
-
playSound
public abstract void playSound(@Nullable PlayerEntity p_184148_1_, double p_184148_2_, double p_184148_4_, double p_184148_6_, SoundEvent p_184148_8_, SoundCategory p_184148_9_, float p_184148_10_, float p_184148_11_)
-
playSound
public abstract void playSound(@Nullable PlayerEntity p_217384_1_, Entity p_217384_2_, SoundEvent p_217384_3_, SoundCategory p_217384_4_, float p_217384_5_, float p_217384_6_)
-
playLocalSound
public void playLocalSound(double p_184134_1_, double p_184134_3_, double p_184134_5_, SoundEvent p_184134_7_, SoundCategory p_184134_8_, float p_184134_9_, float p_184134_10_, boolean p_184134_11_)
-
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
-
addParticle
public void addParticle(IParticleData p_195590_1_, boolean p_195590_2_, double p_195590_3_, double p_195590_5_, double p_195590_7_, double p_195590_9_, double p_195590_11_, double p_195590_13_)
-
addAlwaysVisibleParticle
public void addAlwaysVisibleParticle(IParticleData p_195589_1_, double p_195589_2_, double p_195589_4_, double p_195589_6_, double p_195589_8_, double p_195589_10_, double p_195589_12_)
-
addAlwaysVisibleParticle
public void addAlwaysVisibleParticle(IParticleData p_217404_1_, boolean p_217404_2_, double p_217404_3_, double p_217404_5_, double p_217404_7_, double p_217404_9_, double p_217404_11_, double p_217404_13_)
-
getSunAngle
public float getSunAngle(float p_72929_1_)
-
addBlockEntity
public boolean addBlockEntity(TileEntity p_175700_1_)
-
addAllPendingBlockEntities
public void addAllPendingBlockEntities(java.util.Collection<TileEntity> p_147448_1_)
-
tickBlockEntities
public void tickBlockEntities()
-
guardEntityTick
public void guardEntityTick(java.util.function.Consumer<Entity> p_217390_1_, Entity p_217390_2_)
-
explode
public Explosion explode(@Nullable Entity p_217385_1_, double p_217385_2_, double p_217385_4_, double p_217385_6_, float p_217385_8_, Explosion.Mode p_217385_9_)
-
explode
public Explosion explode(@Nullable Entity p_217398_1_, double p_217398_2_, double p_217398_4_, double p_217398_6_, float p_217398_8_, boolean p_217398_9_, Explosion.Mode p_217398_10_)
-
explode
public Explosion explode(@Nullable Entity p_230546_1_, @Nullable DamageSource p_230546_2_, @Nullable ExplosionContext p_230546_3_, double p_230546_4_, double p_230546_6_, double p_230546_8_, float p_230546_10_, boolean p_230546_11_, Explosion.Mode p_230546_12_)
-
gatherChunkSourceStats
public java.lang.String gatherChunkSourceStats()
-
getBlockEntity
@Nullable public TileEntity getBlockEntity(BlockPos p_175625_1_)
- Specified by:
getBlockEntity
in interfaceIBlockReader
-
getPendingBlockEntityAt
@Nullable private TileEntity getPendingBlockEntityAt(BlockPos p_189508_1_)
-
setBlockEntity
public void setBlockEntity(BlockPos p_175690_1_, @Nullable TileEntity p_175690_2_)
-
removeBlockEntity
public void removeBlockEntity(BlockPos p_175713_1_)
-
isLoaded
public boolean isLoaded(BlockPos p_195588_1_)
-
loadedAndEntityCanStandOnFace
public boolean loadedAndEntityCanStandOnFace(BlockPos p_234929_1_, Entity p_234929_2_, Direction p_234929_3_)
-
loadedAndEntityCanStandOn
public boolean loadedAndEntityCanStandOn(BlockPos p_217400_1_, Entity p_217400_2_)
-
updateSkyBrightness
public void updateSkyBrightness()
-
setSpawnSettings
public void setSpawnSettings(boolean p_72891_1_, boolean p_72891_2_)
-
prepareWeather
protected void prepareWeather()
-
close
public void close() throws java.io.IOException
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Throws:
java.io.IOException
-
getChunkForCollisions
@Nullable public IBlockReader getChunkForCollisions(int p_225522_1_, int p_225522_2_)
- Specified by:
getChunkForCollisions
in interfaceICollisionReader
- Specified by:
getChunkForCollisions
in interfaceIWorldReader
-
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
-
getEntities
public <T extends Entity> java.util.List<T> getEntities(@Nullable EntityType<T> p_217394_1_, AxisAlignedBB p_217394_2_, java.util.function.Predicate<? super T> p_217394_3_)
-
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
-
getLoadedEntitiesOfClass
public <T extends Entity> java.util.List<T> getLoadedEntitiesOfClass(java.lang.Class<? extends T> p_225316_1_, AxisAlignedBB p_225316_2_, @Nullable java.util.function.Predicate<? super T> p_225316_3_)
- Specified by:
getLoadedEntitiesOfClass
in interfaceIEntityReader
-
getEntity
@Nullable public abstract Entity getEntity(int p_73045_1_)
-
blockEntityChanged
public void blockEntityChanged(BlockPos p_175646_1_, TileEntity p_175646_2_)
-
getSeaLevel
public int getSeaLevel()
- Specified by:
getSeaLevel
in interfaceIWorldReader
-
getDirectSignalTo
public int getDirectSignalTo(BlockPos p_175676_1_)
-
hasNeighborSignal
public boolean hasNeighborSignal(BlockPos p_175640_1_)
-
getBestNeighborSignal
public int getBestNeighborSignal(BlockPos p_175687_1_)
-
disconnect
public void disconnect()
-
getGameTime
public long getGameTime()
-
getDayTime
public long getDayTime()
-
mayInteract
public boolean mayInteract(PlayerEntity p_175660_1_, BlockPos p_175660_2_)
-
broadcastEntityEvent
public void broadcastEntityEvent(Entity p_72960_1_, byte p_72960_2_)
-
blockEvent
public void blockEvent(BlockPos p_175641_1_, Block p_175641_2_, int p_175641_3_, int p_175641_4_)
-
getLevelData
public IWorldInfo getLevelData()
- Specified by:
getLevelData
in interfaceIWorld
-
getGameRules
public GameRules getGameRules()
-
getThunderLevel
public float getThunderLevel(float p_72819_1_)
-
setThunderLevel
public void setThunderLevel(float p_147442_1_)
-
getRainLevel
public float getRainLevel(float p_72867_1_)
-
setRainLevel
public void setRainLevel(float p_72894_1_)
-
isThundering
public boolean isThundering()
-
isRaining
public boolean isRaining()
-
isRainingAt
public boolean isRainingAt(BlockPos p_175727_1_)
-
isHumidAt
public boolean isHumidAt(BlockPos p_180502_1_)
-
getMapData
@Nullable public abstract MapData getMapData(java.lang.String p_217406_1_)
-
setMapData
public abstract void setMapData(MapData p_217399_1_)
-
getFreeMapId
public abstract int getFreeMapId()
-
globalLevelEvent
public void globalLevelEvent(int p_175669_1_, BlockPos p_175669_2_, int p_175669_3_)
-
fillReportDetails
public CrashReportCategory fillReportDetails(CrashReport p_72914_1_)
-
destroyBlockProgress
public abstract void destroyBlockProgress(int p_175715_1_, BlockPos p_175715_2_, int p_175715_3_)
-
createFireworks
public void createFireworks(double p_92088_1_, double p_92088_3_, double p_92088_5_, double p_92088_7_, double p_92088_9_, double p_92088_11_, @Nullable CompoundNBT p_92088_13_)
-
getScoreboard
public abstract Scoreboard getScoreboard()
-
updateNeighbourForOutputSignal
public void updateNeighbourForOutputSignal(BlockPos p_175666_1_, Block p_175666_2_)
-
getCurrentDifficultyAt
public DifficultyInstance getCurrentDifficultyAt(BlockPos p_175649_1_)
- Specified by:
getCurrentDifficultyAt
in interfaceIWorld
-
getSkyDarken
public int getSkyDarken()
- Specified by:
getSkyDarken
in interfaceIWorldReader
-
setSkyFlashTime
public void setSkyFlashTime(int p_225605_1_)
-
getWorldBorder
public WorldBorder getWorldBorder()
- Specified by:
getWorldBorder
in interfaceICollisionReader
-
sendPacketToServer
public void sendPacketToServer(IPacket<?> p_184135_1_)
-
dimensionType
public DimensionType dimensionType()
- Specified by:
dimensionType
in interfaceIWorldReader
-
dimension
public RegistryKey<World> dimension()
-
isStateAtPosition
public boolean isStateAtPosition(BlockPos p_217375_1_, java.util.function.Predicate<BlockState> p_217375_2_)
- Specified by:
isStateAtPosition
in interfaceIWorldGenerationBaseReader
-
getRecipeManager
public abstract RecipeManager getRecipeManager()
-
getTagManager
public abstract ITagCollectionSupplier getTagManager()
-
getBlockRandomPos
public BlockPos getBlockRandomPos(int p_217383_1_, int p_217383_2_, int p_217383_3_, int p_217383_4_)
-
noSave
public boolean noSave()
-
getProfiler
public IProfiler getProfiler()
-
getProfilerSupplier
public java.util.function.Supplier<IProfiler> getProfilerSupplier()
-
getBiomeManager
public BiomeManager getBiomeManager()
- Specified by:
getBiomeManager
in interfaceIWorldReader
-
getMaxEntityRadius
public double getMaxEntityRadius()
Description copied from interface:IForgeWorld
The maximum radius to scan for entities when trying to check bounding boxes. Vanilla's default is 2.0D But mods that add larger entities may increase this.- Specified by:
getMaxEntityRadius
in interfaceIForgeWorld
-
increaseMaxEntityRadius
public double increaseMaxEntityRadius(double value)
Description copied from interface:IForgeWorld
Increases the max entity radius, this is safe to call with any value. The setter will verify the input value is larger then the current setting.- Specified by:
increaseMaxEntityRadius
in interfaceIForgeWorld
- Parameters:
value
- New max radius to set.- Returns:
- The new max radius
-
isDebug
public final boolean isDebug()
-
-