@Environment(value=CLIENT) public class ClientWorld extends World
Modifier and Type | Class and Description |
---|---|
static class |
ClientWorld.Properties |
Modifier and Type | Field and Description |
---|---|
private ClientChunkManager |
chunkManager |
private MinecraftClient |
client |
private ClientWorld.Properties |
clientWorldProperties |
private it.unimi.dsi.fastutil.objects.Object2ObjectArrayMap<ColorResolver,BiomeColorCache> |
colorCache |
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 SkyProperties |
skyProperties |
private WorldRenderer |
worldRenderer |
blockEntities, CODEC, END, isClient, iteratingTickingBlockEntities, lcgBlockSeed, LOGGER, NETHER, OVERWORLD, pendingBlockEntities, properties, rainGradient, rainGradientPrev, random, thunderGradient, thunderGradientPrev, tickingBlockEntities, unloadedBlockEntities, unusedIncrement
Constructor and Description |
---|
ClientWorld(ClientPlayNetworkHandler networkHandler,
ClientWorld.Properties properties,
RegistryKey<World> registryRef,
DimensionType dimensionType,
int loadDistance,
Supplier<Profiler> profiler,
WorldRenderer worldRenderer,
boolean debugWorld,
long seed) |
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) |
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) |
private void |
checkEntityChunkPos(Entity entity)
Validates if an entity's current position matches its chunk position.
|
void |
disconnect() |
void |
doRandomBlockDisplayTicks(int xCenter,
int yCenter,
int zCenter) |
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) |
ClientWorld.Properties |
getLevelProperties() |
int |
getLightningTicksLeft() |
MapState |
getMapState(String id) |
int |
getNextMapId() |
List<AbstractClientPlayerEntity> |
getPlayers() |
RecipeManager |
getRecipeManager() |
DynamicRegistryManager |
getRegistryManager() |
int |
getRegularEntityCount() |
Scoreboard |
getScoreboard() |
SkyProperties |
getSkyProperties() |
BlockPos |
getSpawnPos() |
TagManager |
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 |
method_29089(long long2) |
float |
method_30671() |
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 volume,
float pitch,
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 entityId) |
void |
resetChunkColor(int int2,
int int3) |
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 |
setTimeOfDay(long long2) |
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) |
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) |
addBlockEntities, addBlockEntity, addSyncedBlockEvent, breakBlock, calculateAmbientDarkness, canPlayerModifyAt, canSetBlock, close, createExplosion, createExplosion, createExplosion, getAmbientDarkness, getBiomeAccess, getBlockEntity, getBlockState, getChunk, getChunk, getDebugString, getDimension, getEmittedRedstonePower, getEntitiesByClass, getEntitiesByType, getEntitiesIncludingUngeneratedChunks, 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, isHeightInvalid, isHeightInvalid, isNight, isRaining, isReceivingRedstonePower, isSavingDisabled, isThundering, isTopSolid, markDirty, method_24794, method_25953, onBlockChanged, playSound, removeBlock, removeBlockEntity, sendEntityStatus, setBlockEntity, setBlockState, setBlockState, setBlockState, setMobSpawnOptions, setRainGradient, setThunderGradient, testBlockState, tickBlockEntities, tickEntity, updateComparators, updateNeighbor, updateNeighborsAlways, updateNeighborsExcept
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDifficulty, getDimensionHeight, getLunarTime, syncWorldEvent, updateNeighbors
getEntityCollisions, getTopPosition, intersectsEntities, method_31081
getClosestEntity, getClosestEntity, getClosestEntityIncludingUngeneratedChunks, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getClosestPlayer, getEntitiesIncludingUngeneratedChunks, getNonSpectatingEntities, getOtherEntities, getPlayerByUuid, getPlayers, getTargets, isPlayerInRange
breakBlock, breakBlock, spawnEntity
getMoonPhase, getMoonSize, getSkyAngle
containsFluid, getBiome, getBiomeForNoiseGen, getBrightness, getChunk, getChunk, getLightLevel, getLightLevel, getStrongRedstonePower, isAir, isChunkLoaded, isRegionLoaded, isRegionLoaded, isSkyVisibleAllowingSea, isWater, method_29556
getBaseLightLevel, getLightLevel, isSkyVisible
canPlace, getBlockCollisions, getBlockCollisions, getCollisions, intersectsEntities, isBlockSpaceEmpty, isSpaceEmpty, isSpaceEmpty, isSpaceEmpty, isSpaceEmpty
getDismountHeight, getDismountHeight, getHeight, getLuminance, getMaxLightLevel, method_29546, raycast, raycast, raycastBlock
private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<Entity> regularEntities
private final ClientPlayNetworkHandler netHandler
private final WorldRenderer worldRenderer
private final ClientWorld.Properties clientWorldProperties
private final SkyProperties skyProperties
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
private final ClientChunkManager chunkManager
public ClientWorld(ClientPlayNetworkHandler networkHandler, ClientWorld.Properties properties, RegistryKey<World> registryRef, DimensionType dimensionType, int loadDistance, Supplier<Profiler> profiler, WorldRenderer worldRenderer, boolean debugWorld, long seed)
public SkyProperties getSkyProperties()
public void tick(BooleanSupplier shouldKeepTicking)
private void tickTime()
public void method_29089(long long2)
public void setTimeOfDay(long long2)
public void tickEntities()
public void tickEntity(Entity entity)
private void checkEntityChunkPos(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 addPlayer(int id, AbstractClientPlayerEntity player)
public void addEntity(int id, Entity entity)
private void addEntityPrivate(int id, Entity entity)
public void removeEntity(int entityId)
private void finishRemovingEntity(Entity entity)
public void addEntitiesToChunk(WorldChunk chunk)
@Nullable public Entity getEntityById(int id)
getEntityById
in class World
public void setBlockStateWithoutNeighborUpdates(BlockPos pos, BlockState state)
public void disconnect()
disconnect
in class World
public void doRandomBlockDisplayTicks(int xCenter, int yCenter, int zCenter)
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 World
public 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 World
public 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 volume, float pitch, boolean bool)
public void addFireworkParticle(double x, double y, double z, double velocityX, double velocityY, double velocityZ, @Nullable CompoundTag tag)
addFireworkParticle
in class World
public void sendPacket(Packet<?> packet)
sendPacket
in class World
public RecipeManager getRecipeManager()
getRecipeManager
in class World
public void setScoreboard(Scoreboard scoreboard)
public TickScheduler<Block> getBlockTickScheduler()
public TickScheduler<Fluid> getFluidTickScheduler()
public ClientChunkManager getChunkManager()
@Nullable public MapState getMapState(String id)
getMapState
in class World
public void putMapState(MapState mapState)
putMapState
in class World
public int getNextMapId()
getNextMapId
in class World
public Scoreboard getScoreboard()
getScoreboard
in class World
public TagManager getTagManager()
getTagManager
in class World
public DynamicRegistryManager getRegistryManager()
public void updateListeners(BlockPos pos, BlockState oldState, BlockState newState, int flags)
updateListeners
in class World
public void scheduleBlockRerenderIfNeeded(BlockPos pos, BlockState old, BlockState updated)
scheduleBlockRerenderIfNeeded
in class World
public void scheduleBlockRenders(int x, int y, int z)
public void setBlockBreakingInfo(int entityId, BlockPos pos, int progress)
setBlockBreakingInfo
in class World
public void syncGlobalEvent(int eventId, BlockPos pos, int data)
syncGlobalEvent
in class World
public void syncWorldEvent(@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 WorldAccess
addParticle
in class World
public void addParticle(ParticleEffect parameters, boolean alwaysSpawn, double x, double y, double z, double velocityX, double velocityY, double velocityZ)
addParticle
in class World
public void addImportantParticle(ParticleEffect parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ)
addImportantParticle
in class World
public void addImportantParticle(ParticleEffect parameters, boolean alwaysSpawn, double x, double y, double z, double velocityX, double velocityY, double velocityZ)
addImportantParticle
in class World
public 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 int getLightningTicksLeft()
public void setLightningTicksLeft(int lightningTicksLeft)
setLightningTicksLeft
in class World
public float getBrightness(Direction direction, boolean shaded)
public int getColor(BlockPos pos, ColorResolver colorResolver)
public int calculateColor(BlockPos pos, ColorResolver colorResolver)
public BlockPos getSpawnPos()
public float method_30671()
public void setSpawnPos(BlockPos pos, float angle)
public ClientWorld.Properties getLevelProperties()
getLevelProperties
in interface WorldAccess
getLevelProperties
in class World