@Environment(value=CLIENT) public class ClientWorld extends World
| Modifier and Type | Field and Description |
|---|---|
private MinecraftClient |
client |
private it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap<ColorResolver,BiomeColorCache> |
colorCache |
private List<Entity> |
globalEntities |
private int |
lightningTicksLeft |
private Map<String,MapState> |
mapStates |
private ClientPlayNetworkHandler |
netHandler |
private List<AbstractClientPlayerEntity> |
players |
private it.unimi.dsi.fastutil.ints.Int2ObjectMap<Entity> |
regularEntities |
private Scoreboard |
scoreboard |
private WorldRenderer |
worldRenderer |
blockEntities, chunkManager, dimension, isClient, iteratingTickingBlockEntities, lcgBlockSeed, LOGGER, pendingBlockEntities, properties, rainGradient, rainGradientPrev, random, thunderGradient, thunderGradientPrev, tickingBlockEntities, unloadedBlockEntities, unusedIncrement| Constructor and Description |
|---|
ClientWorld(ClientPlayNetworkHandler clientPlayNetworkHandler,
LevelInfo levelInfo,
DimensionType dimensionType,
int chunkLoadDistance,
Supplier<Profiler> supplier,
WorldRenderer worldRenderer) |
| Modifier and Type | Method and Description |
|---|---|
CrashReportSection |
addDetailsToCrashReport(CrashReport report) |
void |
addEntitiesToChunk(WorldChunk chunk) |
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) |
void |
addLightning(LightningEntity lightning) |
private void |
addParticle(BlockPos pos,
BlockState state,
ParticleEffect parameters,
boolean bool) |
private void |
addParticle(BlockPos pos,
ParticleEffect parameters,
VoxelShape shape,
double y) |
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) |
void |
addPlayer(int id,
AbstractClientPlayerEntity player) |
int |
calculateColor(BlockPos pos,
ColorResolver colorResolver) |
void |
checkBlockRerender(BlockPos pos,
BlockState old,
BlockState updated) |
void |
checkChunk(Entity entity) |
void |
disconnect() |
void |
doRandomBlockDisplayTicks(int xCenter,
int yCenter,
int int2) |
void |
finishRemovingEntities() |
private void |
finishRemovingEntity(Entity entity) |
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) |
int |
getLightningTicksLeft() |
MapState |
getMapState(String id) |
int |
getNextMapId() |
List<AbstractClientPlayerEntity> |
getPlayers() |
RecipeManager |
getRecipeManager() |
int |
getRegularEntityCount() |
Scoreboard |
getScoreboard() |
double |
getSkyDarknessHeight() |
RegistryTagManager |
getTagManager() |
boolean |
isChunkLoaded(int chunkX,
int chunkZ) |
Vec3d |
method_23777(BlockPos blockPos,
float float2) |
float |
method_23783(float float2) |
float |
method_23787(float float2) |
void |
playGlobalEvent(int type,
BlockPos pos,
int data) |
void |
playLevelEvent(PlayerEntity player,
int eventId,
BlockPos pos,
int data) |
void |
playSound(BlockPos pos,
SoundEvent sound,
SoundCategory category,
float volume,
float pitch,
boolean useDistance) |
void |
playSound(double x,
double y,
double z,
SoundEvent sound,
SoundCategory category,
float float2,
float float3,
boolean bool) |
void |
playSound(PlayerEntity player,
double x,
double y,
double z,
SoundEvent sound,
SoundCategory category,
float volume,
float pitch) |
void |
playSoundFromEntity(PlayerEntity player,
Entity entity,
SoundEvent sound,
SoundCategory category,
float volume,
float pitch) |
void |
putMapState(MapState mapState) |
void |
randomBlockDisplayTick(int xCenter,
int yCenter,
int zCenter,
int radius,
Random random,
boolean spawnBarrierParticles,
BlockPos.Mutable pos) |
void |
reloadColor() |
void |
removeEntity(int int2) |
void |
resetChunkColor(int int2,
int int3) |
void |
scheduleBlockRenders(int x,
int y,
int z) |
void |
sendPacket(Packet<?> packet) |
void |
setBlockBreakingInfo(int entityId,
BlockPos pos,
int progress) |
void |
setBlockStateWithoutNeighborUpdates(BlockPos blockPos,
BlockState blockState) |
void |
setLightningTicksLeft(int lightningTicksLeft) |
void |
setScoreboard(Scoreboard scoreboard) |
void |
setTimeOfDay(long time) |
void |
tick(BooleanSupplier booleanSupplier) |
void |
tickEntities() |
void |
tickEntity(Entity entity) |
void |
tickPassenger(Entity entity,
Entity passenger) |
void |
unloadBlockEntities(WorldChunk chunk) |
void |
updateListeners(BlockPos pos,
BlockState oldState,
BlockState newState,
int flags) |
addBlockAction, addBlockEntities, addBlockEntity, breakBlock, calculateAmbientDarkness, canPlayerModifyAt, canSetBlock, close, containsBlockWithMaterial, createExplosion, createExplosion, createExplosion, doesAreaContainFireSource, getAmbientDarkness, getBiomeAccess, getBlockEntity, getBlockState, getBlockState, getChunk, getChunk, getDebugString, getDimension, getEmittedRedstonePower, getEntities, getEntities, getEntities, getEntitiesIncludingUngeneratedChunks, getExistingChunk, getFluidState, getGameRules, getGeneratorType, getLevelProperties, getLightingProvider, getLocalDifficulty, getProfiler, getProfilerSupplier, getRainGradient, getRandom, getRandomPosInChunk, getReceivedRedstonePower, getReceivedStrongRedstonePower, getSeaLevel, getSeed, getServer, getSkyAngleRadians, getSpawnPos, getThunderGradient, getTime, getTimeOfDay, getTopNonAirState, getTopY, getWorld, getWorldBorder, getWorldChunk, hasHighHumidity, hasRain, initWeatherGradients, isAreaNotEmpty, isClient, isDay, isDirectionSolid, isEmittingRedstonePower, isHeightInvalid, isHeightInvalid, isNight, isRaining, isReceivingRedstonePower, isSavingDisabled, isThundering, isTopSolid, markDirty, method_24794, method_25953, method_26096, method_26097, method_26372, onBlockChanged, playSound, removeBlock, removeBlockEntity, sendEntityStatus, setBlockEntity, setBlockState, setBlockState, setMobSpawnOptions, setRainGradient, setSpawnPos, setThunderGradient, setTime, testBlockState, tickBlockEntities, tickEntity, tickTime, updateComparators, updateNeighbor, updateNeighborsAlways, updateNeighborsExceptclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDifficulty, getDimensionHeight, getEntityCollisions, getMoonPhase, getMoonSize, getSkyAngle, getTopPosition, intersectsEntities, playLevelEvent, updateNeighborsgetClosestEntity, getClosestEntity, getClosestEntityIncludingUngeneratedChunks, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getEntities, getEntitiesIncludingUngeneratedChunks, getNonSpectatingEntities, getPlayerByUuid, getPlayers, getTargets, isPlayerInRangecontainsFluid, getBiome, getBiomeForNoiseGen, getBrightness, getChunk, getChunk, getLightLevel, getLightLevel, getStrongRedstonePower, isAir, isChunkLoaded, isRegionLoaded, isRegionLoaded, isSkyVisibleAllowingSea, isWatergetBaseLightLevel, getLightLevel, isSkyVisiblecanPlace, doesNotCollide, doesNotCollide, doesNotCollide, doesNotCollide, getBlockCollisions, getCollisions, intersectsEntities, method_27087getHeight, getLuminance, getMaxLightLevel, rayTrace, rayTrace, rayTraceBlockbreakBlock, spawnEntityprivate final it.unimi.dsi.fastutil.ints.Int2ObjectMap<Entity> regularEntities
private final ClientPlayNetworkHandler netHandler
private final WorldRenderer worldRenderer
private final MinecraftClient client
private final List<AbstractClientPlayerEntity> players
private Scoreboard scoreboard
private int lightningTicksLeft
private final it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap<ColorResolver,BiomeColorCache> colorCache
public ClientWorld(ClientPlayNetworkHandler clientPlayNetworkHandler, LevelInfo levelInfo, DimensionType dimensionType, int chunkLoadDistance, Supplier<Profiler> supplier, WorldRenderer worldRenderer)
public void tick(BooleanSupplier booleanSupplier)
public void tickEntities()
public void tickEntity(Entity entity)
public void checkChunk(Entity entity)
public void unloadBlockEntities(WorldChunk chunk)
public void resetChunkColor(int int2,
int int3)
public void reloadColor()
public boolean isChunkLoaded(int chunkX,
int chunkZ)
public int getRegularEntityCount()
public void addLightning(LightningEntity lightning)
public void addPlayer(int id,
AbstractClientPlayerEntity player)
public void addEntity(int id,
Entity entity)
private void addEntityPrivate(int id,
Entity entity)
public void removeEntity(int int2)
private void finishRemovingEntity(Entity entity)
public void addEntitiesToChunk(WorldChunk chunk)
@Nullable public Entity getEntityById(int id)
getEntityById in class Worldpublic void setBlockStateWithoutNeighborUpdates(BlockPos blockPos, BlockState blockState)
public void disconnect()
disconnect in class Worldpublic void doRandomBlockDisplayTicks(int xCenter,
int yCenter,
int int2)
public void randomBlockDisplayTick(int xCenter,
int yCenter,
int zCenter,
int radius,
Random random,
boolean spawnBarrierParticles,
BlockPos.Mutable pos)
private void addParticle(BlockPos pos, BlockState state, ParticleEffect parameters, boolean bool)
private void addParticle(BlockPos pos, ParticleEffect parameters, VoxelShape shape, double y)
private void addParticle(double minX,
double maxX,
double minZ,
double maxZ,
double y,
ParticleEffect parameters)
public void finishRemovingEntities()
public CrashReportSection addDetailsToCrashReport(CrashReport report)
addDetailsToCrashReport in class Worldpublic void playSound(@Nullable PlayerEntity player, double x, double y, double z, SoundEvent sound, SoundCategory category, float volume, float pitch)
public void playSoundFromEntity(@Nullable PlayerEntity player, Entity entity, SoundEvent sound, SoundCategory category, float volume, float pitch)
playSoundFromEntity in class Worldpublic void playSound(BlockPos pos, SoundEvent sound, SoundCategory category, float volume, float pitch, boolean useDistance)
public void playSound(double x,
double y,
double z,
SoundEvent sound,
SoundCategory category,
float float2,
float float3,
boolean bool)
public void addFireworkParticle(double x,
double y,
double z,
double velocityX,
double velocityY,
double velocityZ,
@Nullable
CompoundTag tag)
addFireworkParticle in class Worldpublic void sendPacket(Packet<?> packet)
sendPacket in class Worldpublic RecipeManager getRecipeManager()
getRecipeManager in class Worldpublic void setScoreboard(Scoreboard scoreboard)
public void setTimeOfDay(long time)
setTimeOfDay in class Worldpublic TickScheduler<Block> getBlockTickScheduler()
public TickScheduler<Fluid> getFluidTickScheduler()
public ClientChunkManager getChunkManager()
getChunkManager in interface IWorldgetChunkManager in class World@Nullable public MapState getMapState(String id)
getMapState in class Worldpublic void putMapState(MapState mapState)
putMapState in class Worldpublic int getNextMapId()
getNextMapId in class Worldpublic Scoreboard getScoreboard()
getScoreboard in class Worldpublic RegistryTagManager getTagManager()
getTagManager in class Worldpublic void updateListeners(BlockPos pos, BlockState oldState, BlockState newState, int flags)
updateListeners in class Worldpublic void checkBlockRerender(BlockPos pos, BlockState old, BlockState updated)
checkBlockRerender in class Worldpublic void scheduleBlockRenders(int x,
int y,
int z)
public void setBlockBreakingInfo(int entityId,
BlockPos pos,
int progress)
setBlockBreakingInfo in class Worldpublic void playGlobalEvent(int type,
BlockPos pos,
int data)
playGlobalEvent in class Worldpublic void playLevelEvent(@Nullable PlayerEntity player, int eventId, BlockPos pos, int data)
public void addParticle(ParticleEffect parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ)
addParticle in interface IWorldaddParticle in class Worldpublic void addParticle(ParticleEffect parameters, boolean alwaysSpawn, double x, double y, double z, double velocityX, double velocityY, double velocityZ)
addParticle in class Worldpublic void addImportantParticle(ParticleEffect parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ)
addImportantParticle in class Worldpublic void addImportantParticle(ParticleEffect parameters, boolean alwaysSpawn, double x, double y, double z, double velocityX, double velocityY, double velocityZ)
addImportantParticle in class Worldpublic List<AbstractClientPlayerEntity> getPlayers()
public Biome getGeneratorStoredBiome(int biomeX, int biomeY, int biomeZ)
public float method_23783(float float2)
public Vec3d getCloudsColor(float tickDelta)
public float method_23787(float float2)
public double getSkyDarknessHeight()
public int getLightningTicksLeft()
public void setLightningTicksLeft(int lightningTicksLeft)
setLightningTicksLeft in class Worldpublic float getBrightness(Direction direction, boolean shaded)
public int getColor(BlockPos pos, ColorResolver colorResolver)
public int calculateColor(BlockPos pos, ColorResolver colorResolver)