Package net.minecraft.client.world
Class ClientWorld
- java.lang.Object
-
- net.minecraftforge.common.capabilities.CapabilityProvider<World>
-
- net.minecraft.world.World
-
- net.minecraft.client.world.ClientWorld
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,BiomeManager.IBiomeReader
,IWorldGenerationBaseReader
,IWorldGenerationReader
,IBiomeReader
,IBlockDisplayReader
,IBlockReader
,ICollisionReader
,IDayTimeReader
,IEntityReader
,IWorld
,IWorldReader
,IWorldWriter
,ICapabilityProvider
,IForgeWorld
public class ClientWorld extends World
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ClientWorld.ClientWorldInfo
-
Field Summary
Fields Modifier and Type Field Description private ClientChunkProvider
chunkSource
private ClientWorld.ClientWorldInfo
clientLevelData
private ClientPlayNetHandler
connection
private DimensionRenderInfo
effects
private it.unimi.dsi.fastutil.ints.Int2ObjectMap<Entity>
entitiesById
private WorldRenderer
levelRenderer
private java.util.Map<java.lang.String,MapData>
mapData
private Minecraft
minecraft
private it.unimi.dsi.fastutil.ints.Int2ObjectMap<PartEntity<?>>
partEntities
private java.util.List<AbstractClientPlayerEntity>
players
private Scoreboard
scoreboard
private int
skyFlashTime
private it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap<ColorResolver,ColorCache>
tintCaches
-
Fields inherited from class net.minecraft.world.World
addend, blockEntitiesToUnload, blockEntityList, captureBlockSnapshots, capturedBlockSnapshots, END, isClientSide, levelData, LOGGER, NETHER, oRainLevel, oThunderLevel, OVERWORLD, pendingBlockEntities, rainLevel, random, randValue, RESOURCE_KEY_CODEC, restoringBlockSnapshots, thunderLevel, tickableBlockEntities, updatingBlockEntities
-
-
Constructor Summary
Constructors Constructor Description ClientWorld(ClientPlayNetHandler p_i242067_1_, ClientWorld.ClientWorldInfo p_i242067_2_, RegistryKey<World> p_i242067_3_, DimensionType p_i242067_4_, int p_i242067_5_, java.util.function.Supplier<IProfiler> p_i242067_6_, WorldRenderer p_i242067_7_, boolean p_i242067_8_, long p_i242067_9_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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_)
private void
addEntity(int p_217424_1_, Entity p_217424_2_)
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
addPlayer(int p_217408_1_, AbstractClientPlayerEntity p_217408_2_)
void
animateTick(int p_73029_1_, int p_73029_2_, int p_73029_3_)
int
calculateBlockTint(BlockPos p_228321_1_, ColorResolver p_228321_2_)
void
clearTintCaches()
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_)
void
destroyBlockProgress(int p_175715_1_, BlockPos p_175715_2_, int p_175715_3_)
void
disconnect()
void
doAnimateTick(int p_184153_1_, int p_184153_2_, int p_184153_3_, int p_184153_4_, java.util.Random p_184153_5_, boolean p_184153_6_, BlockPos.Mutable p_184153_7_)
DimensionRenderInfo
effects()
java.lang.Iterable<Entity>
entitiesForRendering()
CrashReportCategory
fillReportDetails(CrashReport p_72914_1_)
ITickList<Block>
getBlockTicks()
int
getBlockTint(BlockPos p_225525_1_, ColorResolver p_225525_2_)
ClientChunkProvider
getChunkSource()
Vector3d
getCloudColor(float p_228328_1_)
Entity
getEntity(int p_73045_1_)
int
getEntityCount()
int
getFreeMapId()
ClientWorld.ClientWorldInfo
getLevelData()
ITickList<Fluid>
getLiquidTicks()
MapData
getMapData(java.lang.String p_217406_1_)
java.util.Collection<PartEntity<?>>
getPartEntities()
All part entities in this world.RecipeManager
getRecipeManager()
Scoreboard
getScoreboard()
float
getShade(Direction p_230487_1_, boolean p_230487_2_)
float
getSharedSpawnAngle()
BlockPos
getSharedSpawnPos()
Vector3d
getSkyColor(BlockPos p_228318_1_, float p_228318_2_)
float
getSkyDarken(float p_228326_1_)
int
getSkyFlashTime()
float
getStarBrightness(float p_228330_1_)
ITagCollectionSupplier
getTagManager()
Biome
getUncachedNoiseBiome(int p_225604_1_, int p_225604_2_, int p_225604_3_)
void
globalLevelEvent(int p_175669_1_, BlockPos p_175669_2_, int p_175669_3_)
boolean
hasChunk(int p_217354_1_, int p_217354_2_)
void
levelEvent(PlayerEntity p_217378_1_, int p_217378_2_, BlockPos p_217378_3_, int p_217378_4_)
void
onChunkLoaded(int p_228323_1_, int p_228323_2_)
private void
onEntityRemoved(Entity p_217414_1_)
java.util.List<AbstractClientPlayerEntity>
players()
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_)
void
playLocalSound(BlockPos p_184156_1_, SoundEvent p_184156_2_, SoundCategory p_184156_3_, float p_184156_4_, float p_184156_5_, boolean p_184156_6_)
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_)
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
putNonPlayerEntity(int p_217411_1_, Entity p_217411_2_)
void
reAddEntitiesToChunk(Chunk p_217417_1_)
DynamicRegistries
registryAccess()
void
removeAllPendingEntityRemovals()
void
removeEntity(int p_217413_1_)
void
sendBlockUpdated(BlockPos p_184138_1_, BlockState p_184138_2_, BlockState p_184138_3_, int p_184138_4_)
void
sendPacketToServer(IPacket<?> p_184135_1_)
void
setBlocksDirty(BlockPos p_225319_1_, BlockState p_225319_2_, BlockState p_225319_3_)
void
setDayTime(long p_72877_1_)
void
setDefaultSpawnPos(BlockPos p_239136_1_, float p_239136_2_)
void
setGameTime(long p_239134_1_)
void
setKnownState(BlockPos p_195597_1_, BlockState p_195597_2_)
void
setMapData(MapData p_217399_1_)
void
setScoreboard(Scoreboard p_96443_1_)
void
setSectionDirtyWithNeighbors(int p_217427_1_, int p_217427_2_, int p_217427_3_)
void
setSkyFlashTime(int p_225605_1_)
private void
spawnFluidParticle(double p_211834_1_, double p_211834_3_, double p_211834_5_, double p_211834_7_, double p_211834_9_, IParticleData p_211834_11_)
private void
spawnParticle(BlockPos p_211835_1_, IParticleData p_211835_2_, VoxelShape p_211835_3_, double p_211835_4_)
void
tick(java.util.function.BooleanSupplier p_72835_1_)
void
tickEntities()
void
tickNonPassenger(Entity p_217418_1_)
void
tickPassenger(Entity p_217420_1_, Entity p_217420_2_)
private void
tickTime()
java.lang.String
toString()
private void
trySpawnDripParticles(BlockPos p_211530_1_, BlockState p_211530_2_, IParticleData p_211530_3_, boolean p_211530_4_)
void
unload(Chunk p_217409_1_)
private void
updateChunkPos(Entity p_217423_1_)
-
Methods inherited from class net.minecraft.world.World
addAllPendingBlockEntities, addBlockEntity, blockEntityChanged, blockEvent, broadcastEntityEvent, close, destroyBlock, dimension, dimensionType, explode, explode, explode, gatherChunkSourceStats, getBestNeighborSignal, getBiomeManager, getBlockEntity, getBlockRandomPos, getBlockState, getChunk, getChunk, getChunkAt, getChunkForCollisions, getCurrentDifficultyAt, getDayTime, getDirectSignalTo, getEntities, getEntities, getEntitiesOfClass, getFluidState, getGameRules, getGameTime, getHeight, getLightEngine, getLoadedEntitiesOfClass, getMaxEntityRadius, getProfiler, getProfilerSupplier, getRainLevel, getRandom, getSeaLevel, getServer, getSignal, getSkyDarken, getSunAngle, getThunderLevel, getWorldBorder, guardEntityTick, hasNeighborSignal, hasSignal, increaseMaxEntityRadius, isClientSide, isDay, isDebug, isHumidAt, isInSpawnableBounds, isInWorldBounds, isLoaded, isNight, isOutsideBuildHeight, isOutsideBuildHeight, isRaining, isRainingAt, isStateAtPosition, isThundering, loadedAndEntityCanStandOn, loadedAndEntityCanStandOnFace, markAndNotifyBlock, mayInteract, neighborChanged, noSave, onBlockStateChange, playSound, prepareWeather, removeBlock, removeBlockEntity, setBlock, setBlock, setBlockAndUpdate, setBlockEntity, setRainLevel, setSpawnSettings, setThunderLevel, tickBlockEntities, updateNeighborsAt, updateNeighborsAtExceptFromFacing, updateNeighbourForOutputSignal, 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, 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.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
-
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, getBrightness, getChunk, getChunk, getDirectSignal, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getNoiseBiome, hasChunkAt, hasChunksAt, hasChunksAt, isAreaLoaded, isEmptyBlock, isWaterAt
-
Methods inherited from interface net.minecraft.world.IWorldWriter
addFreshEntity, destroyBlock, destroyBlock
-
-
-
-
Field Detail
-
entitiesById
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<Entity> entitiesById
-
connection
private final ClientPlayNetHandler connection
-
levelRenderer
private final WorldRenderer levelRenderer
-
clientLevelData
private final ClientWorld.ClientWorldInfo clientLevelData
-
effects
private final DimensionRenderInfo effects
-
minecraft
private final Minecraft minecraft
-
players
private final java.util.List<AbstractClientPlayerEntity> players
-
scoreboard
private Scoreboard scoreboard
-
mapData
private final java.util.Map<java.lang.String,MapData> mapData
-
skyFlashTime
private int skyFlashTime
-
tintCaches
private final it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap<ColorResolver,ColorCache> tintCaches
-
chunkSource
private final ClientChunkProvider chunkSource
-
partEntities
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<PartEntity<?>> partEntities
-
-
Constructor Detail
-
ClientWorld
public ClientWorld(ClientPlayNetHandler p_i242067_1_, ClientWorld.ClientWorldInfo p_i242067_2_, RegistryKey<World> p_i242067_3_, DimensionType p_i242067_4_, int p_i242067_5_, java.util.function.Supplier<IProfiler> p_i242067_6_, WorldRenderer p_i242067_7_, boolean p_i242067_8_, long p_i242067_9_)
-
-
Method Detail
-
effects
public DimensionRenderInfo effects()
-
tick
public void tick(java.util.function.BooleanSupplier p_72835_1_)
-
tickTime
private void tickTime()
-
setGameTime
public void setGameTime(long p_239134_1_)
-
setDayTime
public void setDayTime(long p_72877_1_)
-
entitiesForRendering
public java.lang.Iterable<Entity> entitiesForRendering()
-
tickEntities
public void tickEntities()
-
tickNonPassenger
public void tickNonPassenger(Entity p_217418_1_)
-
updateChunkPos
private void updateChunkPos(Entity p_217423_1_)
-
unload
public void unload(Chunk p_217409_1_)
-
onChunkLoaded
public void onChunkLoaded(int p_228323_1_, int p_228323_2_)
-
clearTintCaches
public void clearTintCaches()
-
hasChunk
public boolean hasChunk(int p_217354_1_, int p_217354_2_)
-
getEntityCount
public int getEntityCount()
-
addPlayer
public void addPlayer(int p_217408_1_, AbstractClientPlayerEntity p_217408_2_)
-
putNonPlayerEntity
public void putNonPlayerEntity(int p_217411_1_, Entity p_217411_2_)
-
addEntity
private void addEntity(int p_217424_1_, Entity p_217424_2_)
-
removeEntity
public void removeEntity(int p_217413_1_)
-
onEntityRemoved
private void onEntityRemoved(Entity p_217414_1_)
-
reAddEntitiesToChunk
public void reAddEntitiesToChunk(Chunk p_217417_1_)
-
setKnownState
public void setKnownState(BlockPos p_195597_1_, BlockState p_195597_2_)
-
disconnect
public void disconnect()
- Overrides:
disconnect
in classWorld
-
animateTick
public void animateTick(int p_73029_1_, int p_73029_2_, int p_73029_3_)
-
doAnimateTick
public void doAnimateTick(int p_184153_1_, int p_184153_2_, int p_184153_3_, int p_184153_4_, java.util.Random p_184153_5_, boolean p_184153_6_, BlockPos.Mutable p_184153_7_)
-
trySpawnDripParticles
private void trySpawnDripParticles(BlockPos p_211530_1_, BlockState p_211530_2_, IParticleData p_211530_3_, boolean p_211530_4_)
-
spawnParticle
private void spawnParticle(BlockPos p_211835_1_, IParticleData p_211835_2_, VoxelShape p_211835_3_, double p_211835_4_)
-
spawnFluidParticle
private void spawnFluidParticle(double p_211834_1_, double p_211834_3_, double p_211834_5_, double p_211834_7_, double p_211834_9_, IParticleData p_211834_11_)
-
removeAllPendingEntityRemovals
public void removeAllPendingEntityRemovals()
-
fillReportDetails
public CrashReportCategory fillReportDetails(CrashReport p_72914_1_)
- Overrides:
fillReportDetails
in classWorld
-
playSound
public 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 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(BlockPos p_184156_1_, SoundEvent p_184156_2_, SoundCategory p_184156_3_, float p_184156_4_, float p_184156_5_, boolean p_184156_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_)
- Overrides:
playLocalSound
in classWorld
-
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_)
- Overrides:
createFireworks
in classWorld
-
sendPacketToServer
public void sendPacketToServer(IPacket<?> p_184135_1_)
- Overrides:
sendPacketToServer
in classWorld
-
getRecipeManager
public RecipeManager getRecipeManager()
- Specified by:
getRecipeManager
in classWorld
-
setScoreboard
public void setScoreboard(Scoreboard p_96443_1_)
-
getChunkSource
public ClientChunkProvider getChunkSource()
-
getMapData
@Nullable public MapData getMapData(java.lang.String p_217406_1_)
- Specified by:
getMapData
in classWorld
-
setMapData
public void setMapData(MapData p_217399_1_)
- Specified by:
setMapData
in classWorld
-
getFreeMapId
public int getFreeMapId()
- Specified by:
getFreeMapId
in classWorld
-
getScoreboard
public Scoreboard getScoreboard()
- Specified by:
getScoreboard
in classWorld
-
getTagManager
public ITagCollectionSupplier getTagManager()
- Specified by:
getTagManager
in classWorld
-
registryAccess
public DynamicRegistries registryAccess()
-
sendBlockUpdated
public void sendBlockUpdated(BlockPos p_184138_1_, BlockState p_184138_2_, BlockState p_184138_3_, int p_184138_4_)
- Specified by:
sendBlockUpdated
in classWorld
-
setBlocksDirty
public void setBlocksDirty(BlockPos p_225319_1_, BlockState p_225319_2_, BlockState p_225319_3_)
- Overrides:
setBlocksDirty
in classWorld
-
setSectionDirtyWithNeighbors
public void setSectionDirtyWithNeighbors(int p_217427_1_, int p_217427_2_, int p_217427_3_)
-
destroyBlockProgress
public void destroyBlockProgress(int p_175715_1_, BlockPos p_175715_2_, int p_175715_3_)
- Specified by:
destroyBlockProgress
in classWorld
-
globalLevelEvent
public void globalLevelEvent(int p_175669_1_, BlockPos p_175669_2_, int p_175669_3_)
- Overrides:
globalLevelEvent
in classWorld
-
levelEvent
public void levelEvent(@Nullable PlayerEntity p_217378_1_, int p_217378_2_, BlockPos p_217378_3_, int p_217378_4_)
-
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
- Overrides:
addParticle
in classWorld
-
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_)
- Overrides:
addParticle
in classWorld
-
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_)
- Overrides:
addAlwaysVisibleParticle
in classWorld
-
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_)
- Overrides:
addAlwaysVisibleParticle
in classWorld
-
players
public java.util.List<AbstractClientPlayerEntity> players()
-
getUncachedNoiseBiome
public Biome getUncachedNoiseBiome(int p_225604_1_, int p_225604_2_, int p_225604_3_)
-
getSkyDarken
public float getSkyDarken(float p_228326_1_)
-
getCloudColor
public Vector3d getCloudColor(float p_228328_1_)
-
getStarBrightness
public float getStarBrightness(float p_228330_1_)
-
getSkyFlashTime
public int getSkyFlashTime()
-
setSkyFlashTime
public void setSkyFlashTime(int p_225605_1_)
- Overrides:
setSkyFlashTime
in classWorld
-
getShade
public float getShade(Direction p_230487_1_, boolean p_230487_2_)
-
getBlockTint
public int getBlockTint(BlockPos p_225525_1_, ColorResolver p_225525_2_)
-
calculateBlockTint
public int calculateBlockTint(BlockPos p_228321_1_, ColorResolver p_228321_2_)
-
getSharedSpawnPos
public BlockPos getSharedSpawnPos()
-
getSharedSpawnAngle
public float getSharedSpawnAngle()
-
setDefaultSpawnPos
public void setDefaultSpawnPos(BlockPos p_239136_1_, float p_239136_2_)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getLevelData
public ClientWorld.ClientWorldInfo getLevelData()
- Specified by:
getLevelData
in interfaceIWorld
- Overrides:
getLevelData
in classWorld
-
getPartEntities
public java.util.Collection<PartEntity<?>> getPartEntities()
Description copied from interface:IForgeWorld
All part entities in this world. Used when collecting entities in an AABB to fix parts being ignored whose parent entity is in a chunk that does not intersect with the AABB.
-
-