Class ClientLevel

All Implemented Interfaces:
AutoCloseable, BiomeManager.NoiseBiomeSource, BlockAndTintGetter, BlockGetter, CollisionGetter, CommonLevelAccessor, EntityGetter, LevelAccessor, LevelHeightAccessor, LevelReader, LevelSimulatedReader, LevelSimulatedRW, LevelTimeAccess, LevelWriter, IForgeBlockAndTintGetter, ICapabilityProvider, ICapabilityProviderImpl<Level>, IForgeBlockGetter, IForgeLevel

public class ClientLevel extends Level
  • Field Details

  • Constructor Details

  • Method Details

    • handleBlockChangedAck

      public void handleBlockChangedAck(int p_233652_)
    • setServerVerifiedBlockState

      public void setServerVerifiedBlockState(BlockPos p_233654_, BlockState p_233655_, int p_233656_)
    • syncBlockState

      public void syncBlockState(BlockPos p_233648_, BlockState p_233649_, Vec3 p_233650_)
    • getBlockStatePredictionHandler

      BlockStatePredictionHandler getBlockStatePredictionHandler()
    • setBlock

      public boolean setBlock(BlockPos p_233643_, BlockState p_233644_, int p_233645_, int p_233646_)
      Specified by:
      setBlock in interface LevelWriter
      Overrides:
      setBlock in class Level
    • queueLightUpdate

      public void queueLightUpdate(Runnable p_194172_)
    • pollLightUpdates

      public void pollLightUpdates()
    • isLightUpdateQueueEmpty

      public boolean isLightUpdateQueueEmpty()
    • effects

      public DimensionSpecialEffects effects()
    • tick

      public void tick(BooleanSupplier p_104727_)
    • tickTime

      private void tickTime()
    • setGameTime

      public void setGameTime(long p_104638_)
    • setDayTime

      public void setDayTime(long p_104747_)
    • entitiesForRendering

      public Iterable<Entity> entitiesForRendering()
    • tickEntities

      public void tickEntities()
    • shouldTickDeath

      public boolean shouldTickDeath(Entity p_194185_)
      Overrides:
      shouldTickDeath in class Level
    • tickNonPassenger

      public void tickNonPassenger(Entity p_104640_)
    • tickPassenger

      private void tickPassenger(Entity p_104642_, Entity p_104643_)
    • unload

      public void unload(LevelChunk p_104666_)
    • onChunkLoaded

      public void onChunkLoaded(ChunkPos p_171650_)
    • clearTintCaches

      public void clearTintCaches()
    • hasChunk

      public boolean hasChunk(int p_104737_, int p_104738_)
    • getEntityCount

      public int getEntityCount()
    • addPlayer

      public void addPlayer(int p_104631_, AbstractClientPlayer p_104632_)
    • putNonPlayerEntity

      public void putNonPlayerEntity(int p_104628_, Entity p_104629_)
    • addEntity

      private void addEntity(int p_104740_, Entity p_104741_)
    • removeEntity

      public void removeEntity(int p_171643_, Entity.RemovalReason p_171644_)
    • getEntity

      @Nullable public Entity getEntity(int p_104609_)
      Specified by:
      getEntity in class Level
    • disconnect

      public void disconnect()
      Overrides:
      disconnect in class Level
    • animateTick

      public void animateTick(int p_104785_, int p_104786_, int p_104787_)
    • getMarkerParticleTarget

      @Nullable private Block getMarkerParticleTarget()
    • doAnimateTick

      public void doAnimateTick(int p_233613_, int p_233614_, int p_233615_, int p_233616_, RandomSource p_233617_, @Nullable Block p_233618_, BlockPos.MutableBlockPos p_233619_)
    • trySpawnDripParticles

      private void trySpawnDripParticles(BlockPos p_104690_, BlockState p_104691_, ParticleOptions p_104692_, boolean p_104693_)
    • spawnParticle

      private void spawnParticle(BlockPos p_104695_, ParticleOptions p_104696_, VoxelShape p_104697_, double p_104698_)
    • spawnFluidParticle

      private void spawnFluidParticle(double p_104593_, double p_104594_, double p_104595_, double p_104596_, double p_104597_, ParticleOptions p_104598_)
    • fillReportDetails

      public CrashReportCategory fillReportDetails(CrashReport p_104729_)
      Overrides:
      fillReportDetails in class Level
    • playSeededSound

      public void playSeededSound(@Nullable Player p_233621_, double p_233622_, double p_233623_, double p_233624_, SoundEvent p_233625_, SoundSource p_233626_, float p_233627_, float p_233628_, long p_233629_)
      Specified by:
      playSeededSound in class Level
    • playSeededSound

      public void playSeededSound(@Nullable Player p_233631_, Entity p_233632_, SoundEvent p_233633_, SoundSource p_233634_, float p_233635_, float p_233636_, long p_233637_)
      Specified by:
      playSeededSound in class Level
    • playLocalSound

      public void playLocalSound(BlockPos p_104678_, SoundEvent p_104679_, SoundSource p_104680_, float p_104681_, float p_104682_, boolean p_104683_)
    • playLocalSound

      public void playLocalSound(double p_104600_, double p_104601_, double p_104602_, SoundEvent p_104603_, SoundSource p_104604_, float p_104605_, float p_104606_, boolean p_104607_)
      Overrides:
      playLocalSound in class Level
    • playSound

      private void playSound(double p_233603_, double p_233604_, double p_233605_, SoundEvent p_233606_, SoundSource p_233607_, float p_233608_, float p_233609_, boolean p_233610_, long p_233611_)
    • createFireworks

      public void createFireworks(double p_104585_, double p_104586_, double p_104587_, double p_104588_, double p_104589_, double p_104590_, @Nullable CompoundTag p_104591_)
      Overrides:
      createFireworks in class Level
    • sendPacketToServer

      public void sendPacketToServer(Packet<?> p_104734_)
      Overrides:
      sendPacketToServer in class Level
    • getRecipeManager

      public RecipeManager getRecipeManager()
      Specified by:
      getRecipeManager in class Level
    • setScoreboard

      public void setScoreboard(Scoreboard p_104670_)
    • getBlockTicks

      public LevelTickAccess<Block> getBlockTicks()
    • getFluidTicks

      public LevelTickAccess<Fluid> getFluidTicks()
    • getChunkSource

      public ClientChunkCache getChunkSource()
    • getMapData

      @Nullable public MapItemSavedData getMapData(String p_104725_)
      Specified by:
      getMapData in class Level
    • setMapData

      public void setMapData(String p_171670_, MapItemSavedData p_171671_)
      Specified by:
      setMapData in class Level
    • getFreeMapId

      public int getFreeMapId()
      Specified by:
      getFreeMapId in class Level
    • getScoreboard

      public Scoreboard getScoreboard()
      Specified by:
      getScoreboard in class Level
    • registryAccess

      public RegistryAccess registryAccess()
    • sendBlockUpdated

      public void sendBlockUpdated(BlockPos p_104685_, BlockState p_104686_, BlockState p_104687_, int p_104688_)
      Specified by:
      sendBlockUpdated in class Level
    • setBlocksDirty

      public void setBlocksDirty(BlockPos p_104759_, BlockState p_104760_, BlockState p_104761_)
      Overrides:
      setBlocksDirty in class Level
    • setSectionDirtyWithNeighbors

      public void setSectionDirtyWithNeighbors(int p_104794_, int p_104795_, int p_104796_)
    • setLightReady

      public void setLightReady(int p_197406_, int p_197407_)
    • destroyBlockProgress

      public void destroyBlockProgress(int p_104634_, BlockPos p_104635_, int p_104636_)
      Specified by:
      destroyBlockProgress in class Level
    • globalLevelEvent

      public void globalLevelEvent(int p_104743_, BlockPos p_104744_, int p_104745_)
      Overrides:
      globalLevelEvent in class Level
    • levelEvent

      public void levelEvent(@Nullable Player p_104654_, int p_104655_, BlockPos p_104656_, int p_104657_)
    • addParticle

      public void addParticle(ParticleOptions p_104706_, double p_104707_, double p_104708_, double p_104709_, double p_104710_, double p_104711_, double p_104712_)
      Specified by:
      addParticle in interface LevelAccessor
      Overrides:
      addParticle in class Level
    • addParticle

      public void addParticle(ParticleOptions p_104714_, boolean p_104715_, double p_104716_, double p_104717_, double p_104718_, double p_104719_, double p_104720_, double p_104721_)
      Overrides:
      addParticle in class Level
    • addAlwaysVisibleParticle

      public void addAlwaysVisibleParticle(ParticleOptions p_104766_, double p_104767_, double p_104768_, double p_104769_, double p_104770_, double p_104771_, double p_104772_)
      Overrides:
      addAlwaysVisibleParticle in class Level
    • addAlwaysVisibleParticle

      public void addAlwaysVisibleParticle(ParticleOptions p_104774_, boolean p_104775_, double p_104776_, double p_104777_, double p_104778_, double p_104779_, double p_104780_, double p_104781_)
      Overrides:
      addAlwaysVisibleParticle in class Level
    • players

      public List<AbstractClientPlayer> players()
    • getUncachedNoiseBiome

      public Holder<Biome> getUncachedNoiseBiome(int p_205516_, int p_205517_, int p_205518_)
    • getSkyDarken

      public float getSkyDarken(float p_104806_)
    • getSkyColor

      public Vec3 getSkyColor(Vec3 p_171661_, float p_171662_)
    • getCloudColor

      public Vec3 getCloudColor(float p_104809_)
    • getStarBrightness

      public float getStarBrightness(float p_104812_)
    • getSkyFlashTime

      public int getSkyFlashTime()
    • setSkyFlashTime

      public void setSkyFlashTime(int p_104783_)
      Overrides:
      setSkyFlashTime in class Level
    • getShade

      public float getShade(Direction p_104703_, boolean p_104704_)
    • getBlockTint

      public int getBlockTint(BlockPos p_104700_, ColorResolver p_104701_)
    • calculateBlockTint

      public int calculateBlockTint(BlockPos p_104763_, ColorResolver p_104764_)
    • setDefaultSpawnPos

      public void setDefaultSpawnPos(BlockPos p_104753_, float p_104754_)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getLevelData

      public ClientLevel.ClientLevelData getLevelData()
      Specified by:
      getLevelData in interface LevelAccessor
      Overrides:
      getLevelData in class Level
    • gameEvent

      public void gameEvent(GameEvent p_233639_, Vec3 p_233640_, GameEvent.Context p_233641_)
    • getAllMapData

      protected Map<String,MapItemSavedData> getAllMapData()
    • addMapData

      protected void addMapData(Map<String,MapItemSavedData> p_171673_)
    • getEntities

      protected LevelEntityGetter<Entity> getEntities()
      Specified by:
      getEntities in class Level
    • gatherChunkSourceStats

      public String gatherChunkSourceStats()
      Specified by:
      gatherChunkSourceStats in class Level
    • addDestroyBlockEffect

      public void addDestroyBlockEffect(BlockPos p_171667_, BlockState p_171668_)
      Overrides:
      addDestroyBlockEffect in class Level
    • setServerSimulationDistance

      public void setServerSimulationDistance(int p_194175_)
    • getServerSimulationDistance

      public int getServerSimulationDistance()
    • getPartEntities

      public Collection<PartEntity<?>> getPartEntities()
      Description copied from interface: IForgeLevel
      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.
    • getModelDataManager

      public ModelDataManager getModelDataManager()
      Description copied from interface: IForgeBlockGetter
      Retrieves the model data manager for this level. This will be null on a server level.
    • getShade

      public float getShade(float normalX, float normalY, float normalZ, boolean shade)
      Description copied from interface: IForgeBlockAndTintGetter
      Computes the shade for a given normal. Alternate version of the vanilla method taking in a Direction.