Class ClientLevel

All Implemented Interfaces:
AutoCloseable, BiomeManager.NoiseBiomeSource, BlockAndTintGetter, BlockGetter, CollisionGetter, CommonLevelAccessor, EntityGetter, LevelAccessor, LevelHeightAccessor, LevelReader, LevelSimulatedReader, LevelSimulatedRW, LevelTimeAccess, LevelWriter, SignalGetter, IAttachmentHolder, IBlockAndTintGetterExtension, IBlockGetterExtension, ILevelExtension

public class ClientLevel extends Level
  • Field Details Link icon

  • Constructor Details Link icon

  • Method Details Link icon

    • handleBlockChangedAck Link icon

      public void handleBlockChangedAck(int p_233652_)
    • setServerVerifiedBlockState Link icon

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

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

      BlockStatePredictionHandler getBlockStatePredictionHandler()
    • setBlock Link icon

      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 Link icon

      public void queueLightUpdate(Runnable p_194172_)
    • pollLightUpdates Link icon

      public void pollLightUpdates()
    • isLightUpdateQueueEmpty Link icon

      public boolean isLightUpdateQueueEmpty()
    • effects Link icon

      public DimensionSpecialEffects effects()
    • tick Link icon

      public void tick(BooleanSupplier p_104727_)
    • tickTime Link icon

      private void tickTime()
    • setGameTime Link icon

      public void setGameTime(long p_104638_)
    • setDayTime Link icon

      public void setDayTime(long p_104747_)
    • entitiesForRendering Link icon

      public Iterable<Entity> entitiesForRendering()
    • tickEntities Link icon

      public void tickEntities()
    • shouldTickDeath Link icon

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

      public void tickNonPassenger(Entity p_104640_)
    • tickPassenger Link icon

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

      public void unload(LevelChunk p_104666_)
    • onChunkLoaded Link icon

      public void onChunkLoaded(ChunkPos p_171650_)
    • clearTintCaches Link icon

      public void clearTintCaches()
    • hasChunk Link icon

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

      public int getEntityCount()
    • addEntity Link icon

      public void addEntity(Entity p_104741_)
    • removeEntity Link icon

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

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

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

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

      @Nullable private Block getMarkerParticleTarget()
    • doAnimateTick Link icon

      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 Link icon

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

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

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

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

      public void playSeededSound(@Nullable Player p_263381_, double p_263372_, double p_263404_, double p_263365_, Holder<SoundEvent> p_263335_, SoundSource p_263417_, float p_263416_, float p_263349_, long p_263408_)
      Specified by:
      playSeededSound in class Level
    • playSeededSound Link icon

      public void playSeededSound(@Nullable Player p_263514_, Entity p_263536_, Holder<SoundEvent> p_263518_, SoundSource p_263487_, float p_263538_, float p_263524_, long p_263509_)
      Specified by:
      playSeededSound in class Level
    • playLocalSound Link icon

      public void playLocalSound(Entity p_312749_, SoundEvent p_312635_, SoundSource p_312007_, float p_312298_, float p_312772_)
      Overrides:
      playLocalSound in class Level
    • playLocalSound Link icon

      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 Link icon

      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 Link icon

      public void createFireworks(double p_104585_, double p_104586_, double p_104587_, double p_104588_, double p_104589_, double p_104590_, List<FireworkExplosion> p_330281_)
      Overrides:
      createFireworks in class Level
    • sendPacketToServer Link icon

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

      public RecipeManager getRecipeManager()
      Specified by:
      getRecipeManager in class Level
    • tickRateManager Link icon

      public TickRateManager tickRateManager()
      Specified by:
      tickRateManager in class Level
    • getBlockTicks Link icon

      public LevelTickAccess<Block> getBlockTicks()
    • getFluidTicks Link icon

      public LevelTickAccess<Fluid> getFluidTicks()
    • getChunkSource Link icon

      public ClientChunkCache getChunkSource()
    • getMapData Link icon

      @Nullable public MapItemSavedData getMapData(MapId p_323873_)
      Specified by:
      getMapData in class Level
    • overrideMapData Link icon

      public void overrideMapData(MapId p_323577_, MapItemSavedData p_259308_)
    • setMapData Link icon

      public void setMapData(MapId p_324501_, MapItemSavedData p_171671_)
      Specified by:
      setMapData in class Level
    • getFreeMapId Link icon

      public MapId getFreeMapId()
      Specified by:
      getFreeMapId in class Level
    • getScoreboard Link icon

      public Scoreboard getScoreboard()
      Specified by:
      getScoreboard in class Level
    • sendBlockUpdated Link icon

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

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

      public void setSectionDirtyWithNeighbors(int p_104794_, int p_104795_, int p_104796_)
    • destroyBlockProgress Link icon

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

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

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

      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 Link icon

      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 Link icon

      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 Link icon

      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 Link icon

      public List<AbstractClientPlayer> players()
    • getUncachedNoiseBiome Link icon

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

      public float getSkyDarken(float p_104806_)
    • getSkyColor Link icon

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

      public Vec3 getCloudColor(float p_104809_)
    • getStarBrightness Link icon

      public float getStarBrightness(float p_104812_)
    • getSkyFlashTime Link icon

      public int getSkyFlashTime()
    • setSkyFlashTime Link icon

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

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

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

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

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

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

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

      public void gameEvent(Holder<GameEvent> p_316478_, Vec3 p_233640_, GameEvent.Context p_233641_)
    • getAllMapData Link icon

      protected Map<MapId,MapItemSavedData> getAllMapData()
    • addMapData Link icon

      protected void addMapData(Map<MapId,MapItemSavedData> p_171673_)
    • getEntities Link icon

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

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

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

      public void setServerSimulationDistance(int p_194175_)
    • getServerSimulationDistance Link icon

      public int getServerSimulationDistance()
    • enabledFeatures Link icon

      public FeatureFlagSet enabledFeatures()
    • potionBrewing Link icon

      public PotionBrewing potionBrewing()
      Specified by:
      potionBrewing in class Level
    • getPartEntities Link icon

      public Collection<PartEntity<?>> getPartEntities()
      Description copied from interface: ILevelExtension
      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 Link icon

      public ModelDataManager getModelDataManager()
      Description copied from interface: ILevelExtension
      Retrieves the model data manager for the given level. May be null on a server level.

      For model data retrieval, prefer calling IBlockGetterExtension.getModelData(BlockPos) rather than this method, as it works on more than just a level.

    • getModelData Link icon

      public ModelData getModelData(BlockPos pos)
      Description copied from interface: IBlockGetterExtension
      Retrieves model data for a block at the given position.
      Parameters:
      pos - the position to query
      Returns:
      the model data at this position, or ModelData.EMPTY if none exists
    • getShade Link icon

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