Package net.minecraft.client.world
Class ClientWorld
java.lang.Object
net.minecraft.world.World
net.minecraft.client.world.ClientWorld
- All Implemented Interfaces:
AutoCloseable
,class_5423
,BiomeAccess.Storage
,BlockRenderView
,BlockView
,CollisionView
,EntityView
,HeightLimitView
,LunarWorldView
,ModifiableTestableWorld
,ModifiableWorld
,TestableWorld
,WorldAccess
,WorldView
@Environment(CLIENT) public class ClientWorld extends World
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
ClientWorld.EntityLoader
static class
ClientWorld.Properties
-
Field Summary
Fields Modifier and Type Field Description private ClientChunkManager
chunkManager
private MinecraftClient
client
private ClientWorld.Properties
clientWorldProperties
private Object2ObjectArrayMap<ColorResolver,BiomeColorCache>
colorCache
private EntityList
entityList
private class_5582<Entity>
field_27734
private int
lightningTicksLeft
private Map<String,MapState>
mapStates
private ClientPlayNetworkHandler
netHandler
private List<AbstractClientPlayerEntity>
players
private Scoreboard
scoreboard
private SkyProperties
skyProperties
private WorldRenderer
worldRenderer
Fields inherited from class net.minecraft.world.World
blockEntityTickers, CODEC, END, isClient, lcgBlockSeed, LOGGER, NETHER, OVERWORLD, properties, rainGradient, rainGradientPrev, random, thunderGradient, thunderGradientPrev, unusedIncrement
-
Constructor Summary
Constructors Constructor Description ClientWorld(ClientPlayNetworkHandler networkHandler, ClientWorld.Properties properties, RegistryKey<World> registryRef, DimensionType dimensionType, int loadDistance, Supplier<Profiler> profiler, WorldRenderer worldRenderer, boolean debugWorld, long seed)
-
Method Summary
Modifier and Type Method Description void
addBlockBreakParticles(BlockPos pos, BlockState state)
CrashReportSection
addDetailsToCrashReport(CrashReport report)
void
addEntity(int id, Entity entity)
private void
addEntityPrivate(int id, Entity entity)
void
addFireworkParticle(double x, double y, double z, double velocityX, double velocityY, double velocityZ, CompoundTag tag)
void
addImportantParticle(ParticleEffect parameters, boolean alwaysSpawn, double x, double y, double z, double velocityX, double velocityY, double velocityZ)
void
addImportantParticle(ParticleEffect parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ)
private void
addParticle(double minX, double maxX, double minZ, double maxZ, double y, ParticleEffect parameters)
void
addParticle(ParticleEffect parameters, boolean alwaysSpawn, double x, double y, double z, double velocityX, double velocityY, double velocityZ)
void
addParticle(ParticleEffect parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ)
private void
addParticle(BlockPos pos, BlockState state, ParticleEffect parameters, boolean bool)
private void
addParticle(BlockPos pos, ParticleEffect parameters, VoxelShape shape, double y)
void
addPlayer(int id, AbstractClientPlayerEntity player)
String
asString()
int
calculateColor(BlockPos pos, ColorResolver colorResolver)
void
disconnect()
void
doRandomBlockDisplayTicks(int xCenter, int yCenter, int zCenter)
void
emitGameEvent(Entity entity, GameEvent event, BlockPos pos)
TickScheduler<Block>
getBlockTickScheduler()
float
getBrightness(Direction direction, boolean shaded)
ClientChunkManager
getChunkManager()
Vec3d
getCloudsColor(float tickDelta)
int
getColor(BlockPos pos, ColorResolver colorResolver)
Iterable<Entity>
getEntities()
Entity
getEntityById(int id)
TickScheduler<Fluid>
getFluidTickScheduler()
Biome
getGeneratorStoredBiome(int biomeX, int biomeY, int biomeZ)
ClientWorld.Properties
getLevelProperties()
int
getLightningTicksLeft()
MapState
getMapState(String id)
int
getNextMapId()
List<AbstractClientPlayerEntity>
getPlayers()
RecipeManager
getRecipeManager()
DynamicRegistryManager
getRegistryManager()
int
getRegularEntityCount()
Scoreboard
getScoreboard()
SkyProperties
getSkyProperties()
float
getSpawnAngle()
BlockPos
getSpawnPos()
TagManager
getTagManager()
boolean
isChunkLoaded(int chunkX, int chunkZ)
Vec3d
method_23777(Vec3d vec3d, float float2)
float
method_23783(float float2)
float
method_23787(float float2)
protected class_5577<Entity>
method_31592()
void
playSound(double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch, boolean bool)
void
playSound(PlayerEntity player, double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch)
void
playSound(BlockPos pos, SoundEvent sound, SoundCategory category, float volume, float pitch, boolean useDistance)
void
playSoundFromEntity(PlayerEntity player, Entity entity, SoundEvent sound, SoundCategory category, float volume, float pitch)
void
putMapState(String string, MapState mapState)
void
randomBlockDisplayTick(int xCenter, int yCenter, int zCenter, int radius, Random random, boolean spawnBarrierParticles, BlockPos.Mutable pos)
void
reloadColor()
void
removeEntity(int entityId, Entity.RemovalReason removalReason)
void
resetChunkColor(ChunkPos chunkPos)
void
scheduleBlockRenders(int x, int y, int z)
void
scheduleBlockRerenderIfNeeded(BlockPos pos, BlockState old, BlockState updated)
void
sendPacket(Packet<?> packet)
void
setBlockBreakingInfo(int entityId, BlockPos pos, int progress)
void
setBlockStateWithoutNeighborUpdates(BlockPos pos, BlockState state)
void
setLightningTicksLeft(int lightningTicksLeft)
void
setScoreboard(Scoreboard scoreboard)
void
setSpawnPos(BlockPos pos, float angle)
void
setTime(long time)
void
setTimeOfDay(long timeOfDay)
void
syncGlobalEvent(int eventId, BlockPos pos, int data)
void
syncWorldEvent(PlayerEntity player, int eventId, BlockPos pos, int data)
void
tick(BooleanSupplier shouldKeepTicking)
void
tickEntities()
void
tickEntity(Entity entity)
private void
tickPassenger(Entity entity, Entity passenger)
private void
tickTime()
String
toString()
void
unloadBlockEntities(WorldChunk chunk)
void
updateListeners(BlockPos pos, BlockState oldState, BlockState newState, int flags)
Methods inherited from class net.minecraft.world.World
addBlockEntity, addBlockEntityTicker, addSyncedBlockEvent, breakBlock, calculateAmbientDarkness, canPlayerModifyAt, canSetBlock, close, createExplosion, createExplosion, createExplosion, getAmbientDarkness, getBiomeAccess, getBlockEntity, getBlockState, getChunk, getChunk, getDimension, getEmittedRedstonePower, getEntitiesByType, getExistingChunk, getFluidState, getGameRules, getLightingProvider, getLocalDifficulty, getOtherEntities, getProfiler, getProfilerSupplier, getRainGradient, getRandom, getRandomPosInChunk, getReceivedRedstonePower, getReceivedStrongRedstonePower, getRegistryKey, getSeaLevel, getServer, getSkyAngleRadians, getThunderGradient, getTime, getTimeOfDay, getTopY, getWorldBorder, getWorldChunk, hasHighHumidity, hasRain, initWeatherGradients, isClient, isDay, isDebugWorld, isDirectionSolid, isEmittingRedstonePower, isInBuildLimit, isNight, isRaining, isReceivingRedstonePower, isSavingDisabled, isThundering, isTopSolid, isValid, markDirty, method_32886, onBlockChanged, playSound, removeBlock, removeBlockEntity, sendEntityStatus, setBlockState, setBlockState, setBlockState, setMobSpawnOptions, setRainGradient, setThunderGradient, testBlockState, tickBlockEntities, tickEntity, updateComparators, updateNeighbor, updateNeighborsAlways, updateNeighborsExcept
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.world.biome.source.BiomeAccess.Storage
method_31609
Methods inherited from interface net.minecraft.world.BlockRenderView
getBaseLightLevel, getLightLevel, isSkyVisible
Methods inherited from interface net.minecraft.world.BlockView
getDismountHeight, getDismountHeight, getLuminance, getMaxLightLevel, getStatesInBox, raycast, raycast, raycastBlock
Methods inherited from interface net.minecraft.class_5423
getBiomeKey, getEntityCollisions, getTopPosition, intersectsEntities
Methods inherited from interface net.minecraft.world.CollisionView
canPlace, getBlockCollisions, getBlockCollisions, getCollisions, getEntityCollisions, intersectsEntities, intersectsEntities, isBlockSpaceEmpty, isSpaceEmpty, isSpaceEmpty, isSpaceEmpty, isSpaceEmpty
Methods inherited from interface net.minecraft.world.EntityView
getClosestEntity, getClosestEntity, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getEntitiesByClass, getNonSpectatingEntities, getOtherEntities, getPlayerByUuid, getPlayers, getTargets, isPlayerInRange
Methods inherited from interface net.minecraft.world.HeightLimitView
getSection, getSectionIndex, getSectionIndexFromSection, getTopHeightLimit, getTopSectionLimit, isOutOfHeightLimit, isOutOfHeightLimit, method_32890, method_32891
Methods inherited from interface net.minecraft.world.LunarWorldView
getMoonPhase, getMoonSize, getSkyAngle
Methods inherited from interface net.minecraft.world.ModifiableWorld
breakBlock, breakBlock, spawnEntity
Methods inherited from interface net.minecraft.world.WorldAccess
emitGameEvent, emitGameEvent, getDifficulty, getLunarTime, syncWorldEvent, updateNeighbors
Methods inherited from interface net.minecraft.world.WorldView
containsFluid, getBiome, getBiomeForNoiseGen, getBottomSectionLimit, getBrightness, getChunk, getChunk, getLightLevel, getLightLevel, getSectionCount, getStrongRedstonePower, isAir, isChunkLoaded, isRegionLoaded, isRegionLoaded, isSkyVisibleAllowingSea, isWater, method_29556
-
Field Details
-
entityList
-
field_27734
-
netHandler
-
worldRenderer
-
clientWorldProperties
-
skyProperties
-
client
-
players
-
scoreboard
-
mapStates
-
lightningTicksLeft
private int lightningTicksLeft -
colorCache
-
chunkManager
-
-
Constructor Details
-
ClientWorld
public ClientWorld(ClientPlayNetworkHandler networkHandler, ClientWorld.Properties properties, RegistryKey<World> registryRef, DimensionType dimensionType, int loadDistance, Supplier<Profiler> profiler, WorldRenderer worldRenderer, boolean debugWorld, long seed)
-
-
Method Details
-
getSkyProperties
-
tick
-
tickTime
private void tickTime() -
setTime
public void setTime(long time) -
setTimeOfDay
public void setTimeOfDay(long timeOfDay) -
getEntities
-
tickEntities
public void tickEntities() -
tickEntity
-
tickPassenger
-
unloadBlockEntities
-
resetChunkColor
-
reloadColor
public void reloadColor() -
isChunkLoaded
public boolean isChunkLoaded(int chunkX, int chunkZ) -
getRegularEntityCount
public int getRegularEntityCount() -
addPlayer
-
addEntity
-
addEntityPrivate
-
removeEntity
-
getEntityById
- Specified by:
getEntityById
in classWorld
-
setBlockStateWithoutNeighborUpdates
-
disconnect
public void disconnect()- Overrides:
disconnect
in classWorld
-
doRandomBlockDisplayTicks
public void doRandomBlockDisplayTicks(int xCenter, int yCenter, int zCenter) -
randomBlockDisplayTick
public void randomBlockDisplayTick(int xCenter, int yCenter, int zCenter, int radius, Random random, boolean spawnBarrierParticles, BlockPos.Mutable pos) -
addParticle
-
addParticle
-
addParticle
private void addParticle(double minX, double maxX, double minZ, double maxZ, double y, ParticleEffect parameters) -
addDetailsToCrashReport
- Overrides:
addDetailsToCrashReport
in classWorld
-
playSound
public void playSound(@Nullable PlayerEntity player, double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch) -
playSoundFromEntity
public void playSoundFromEntity(@Nullable PlayerEntity player, Entity entity, SoundEvent sound, SoundCategory category, float volume, float pitch)- Specified by:
playSoundFromEntity
in classWorld
-
playSound
public void playSound(BlockPos pos, SoundEvent sound, SoundCategory category, float volume, float pitch, boolean useDistance) -
playSound
public void playSound(double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch, boolean bool) -
addFireworkParticle
public void addFireworkParticle(double x, double y, double z, double velocityX, double velocityY, double velocityZ, @Nullable CompoundTag tag)- Overrides:
addFireworkParticle
in classWorld
-
sendPacket
- Overrides:
sendPacket
in classWorld
-
getRecipeManager
- Specified by:
getRecipeManager
in classWorld
-
setScoreboard
-
getBlockTickScheduler
-
getFluidTickScheduler
-
getChunkManager
-
getMapState
- Specified by:
getMapState
in classWorld
-
putMapState
- Specified by:
putMapState
in classWorld
-
getNextMapId
public int getNextMapId()- Specified by:
getNextMapId
in classWorld
-
getScoreboard
- Specified by:
getScoreboard
in classWorld
-
getTagManager
- Specified by:
getTagManager
in classWorld
-
getRegistryManager
-
updateListeners
- Specified by:
updateListeners
in classWorld
-
scheduleBlockRerenderIfNeeded
- Overrides:
scheduleBlockRerenderIfNeeded
in classWorld
-
scheduleBlockRenders
public void scheduleBlockRenders(int x, int y, int z) -
setBlockBreakingInfo
- Specified by:
setBlockBreakingInfo
in classWorld
-
syncGlobalEvent
- Overrides:
syncGlobalEvent
in classWorld
-
syncWorldEvent
-
addParticle
public void addParticle(ParticleEffect parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ)- Specified by:
addParticle
in interfaceWorldAccess
- Overrides:
addParticle
in classWorld
-
addParticle
public void addParticle(ParticleEffect parameters, boolean alwaysSpawn, double x, double y, double z, double velocityX, double velocityY, double velocityZ)- Overrides:
addParticle
in classWorld
-
addImportantParticle
public void addImportantParticle(ParticleEffect parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ)- Overrides:
addImportantParticle
in classWorld
-
addImportantParticle
public void addImportantParticle(ParticleEffect parameters, boolean alwaysSpawn, double x, double y, double z, double velocityX, double velocityY, double velocityZ)- Overrides:
addImportantParticle
in classWorld
-
getPlayers
-
getGeneratorStoredBiome
-
method_23783
public float method_23783(float float2) -
method_23777
-
getCloudsColor
-
method_23787
public float method_23787(float float2) -
getLightningTicksLeft
public int getLightningTicksLeft() -
setLightningTicksLeft
public void setLightningTicksLeft(int lightningTicksLeft)- Overrides:
setLightningTicksLeft
in classWorld
-
getBrightness
-
getColor
-
calculateColor
-
getSpawnPos
-
getSpawnAngle
public float getSpawnAngle() -
setSpawnPos
-
toString
-
getLevelProperties
- Specified by:
getLevelProperties
in interfaceWorldAccess
- Overrides:
getLevelProperties
in classWorld
-
emitGameEvent
-
method_31592
- Specified by:
method_31592
in classWorld
-
asString
-
addBlockBreakParticles
- Overrides:
addBlockBreakParticles
in classWorld
-