Class FakeClientLevel

java.lang.Object
net.minecraft.world.level.Level
net.minecraft.client.multiplayer.ClientLevel
net.nikdo53.tinymultiblocklib.client.FakeClientLevel
All Implemented Interfaces:
AutoCloseable, net.fabricmc.fabric.api.attachment.v1.AttachmentTarget, net.fabricmc.fabric.api.blockview.v2.FabricBlockView, net.minecraft.world.level.biome.BiomeManager.NoiseBiomeSource, net.minecraft.world.level.BlockAndTintGetter, net.minecraft.world.level.BlockGetter, net.minecraft.world.level.CollisionGetter, net.minecraft.world.level.CommonLevelAccessor, net.minecraft.world.level.EntityGetter, net.minecraft.world.level.LevelAccessor, net.minecraft.world.level.LevelHeightAccessor, net.minecraft.world.level.LevelReader, net.minecraft.world.level.LevelSimulatedReader, net.minecraft.world.level.LevelSimulatedRW, net.minecraft.world.level.LevelTimeAccess, net.minecraft.world.level.LevelWriter, net.minecraft.world.level.SignalGetter

public class FakeClientLevel extends net.minecraft.client.multiplayer.ClientLevel
  • Nested Class Summary

    Nested classes/interfaces inherited from class net.minecraft.client.multiplayer.ClientLevel

    net.minecraft.client.multiplayer.ClientLevel.ClientLevelData

    Nested classes/interfaces inherited from class net.minecraft.world.level.Level

    net.minecraft.world.level.Level.ExplosionInteraction
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    static @Nullable FakeClientLevel
     

    Fields inherited from class net.minecraft.world.level.Level

    addend, blockEntityTickers, END, isClientSide, levelData, LONG_PARTICLE_CLIP_RANGE, MAX_BRIGHTNESS, MAX_ENTITY_SPAWN_Y, MAX_LEVEL_SIZE, MIN_ENTITY_SPAWN_Y, neighborUpdater, NETHER, oRainLevel, oThunderLevel, OVERWORLD, rainLevel, random, randValue, RESOURCE_KEY_CODEC, SHORT_PARTICLE_CLIP_RANGE, thunderLevel, TICKS_PER_DAY

    Fields inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget

    NBT_ATTACHMENT_KEY

    Fields inherited from interface net.minecraft.world.level.SignalGetter

    DIRECTIONS
  • Constructor Summary

    Constructors
    Constructor
    Description
    FakeClientLevel(net.minecraft.client.multiplayer.ClientLevel level)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addEntity(net.minecraft.world.entity.Entity entity)
     
    protected void
    addMapData(Map<net.minecraft.world.level.saveddata.maps.MapId,net.minecraft.world.level.saveddata.maps.MapItemSavedData> map)
     
    void
    animateTick(int posX, int posY, int posZ)
     
    void
     
    void
    destroyBlockProgress(int breakerId, net.minecraft.core.BlockPos pos, int progress)
     
    void
     
    void
    gameEvent(net.minecraft.core.Holder<net.minecraft.world.level.gameevent.GameEvent> gameEvent, net.minecraft.world.phys.Vec3 pos, net.minecraft.world.level.gameevent.GameEvent.Context context)
     
    net.minecraft.world.level.block.state.BlockState
    getBlockState(net.minecraft.core.BlockPos pos)
     
     
    void
    globalLevelEvent(int id, net.minecraft.core.BlockPos pos, int data)
     
    void
    handleBlockChangedAck(int sequence)
     
    void
    levelEvent(@Nullable net.minecraft.world.entity.player.Player player, int type, net.minecraft.core.BlockPos pos, int data)
     
    void
    onChunkLoaded(net.minecraft.world.level.ChunkPos chunkPos)
     
    void
    overrideMapData(net.minecraft.world.level.saveddata.maps.MapId mapId, net.minecraft.world.level.saveddata.maps.MapItemSavedData mapData)
     
    List<net.minecraft.client.player.AbstractClientPlayer>
     
    void
     
    void
     
    void
    sendBlockUpdated(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState oldState, net.minecraft.world.level.block.state.BlockState newState, int flags)
     
    void
    sendPacketToServer(net.minecraft.network.protocol.Packet<?> packet)
     
    boolean
    setBlock(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, int flags, int recursionLeft)
     
    void
    setBlockEntity(net.minecraft.world.level.block.entity.BlockEntity blockEntity)
     
    void
    setBlocksDirty(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState oldState, net.minecraft.world.level.block.state.BlockState newState)
     
    void
    setClientSide(boolean isClientSide)
     
    void
    setDayTime(long time)
     
    void
    setDefaultSpawnPos(net.minecraft.core.BlockPos spawnPos, float spawnAngle)
     
    void
    setGameTime(long time)
     
    void
    setMapData(net.minecraft.world.level.saveddata.maps.MapId mapId, net.minecraft.world.level.saveddata.maps.MapItemSavedData mapData)
     
    void
    setRainLevel(float strength)
     
    void
    setSectionDirtyWithNeighbors(int sectionX, int sectionY, int sectionZ)
     
    void
    setServerSimulationDistance(int serverSimulationDistance)
     
    void
    setServerVerifiedBlockState(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, int flags)
     
    void
    setSkyFlashTime(int timeFlash)
     
    void
    setSpawnSettings(boolean hostile, boolean peaceful)
     
    void
    setThunderLevel(float strength)
     
    void
    syncBlockState(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.phys.Vec3 playerPos)
     
    void
    tick(BooleanSupplier hasTimeLeft)
     
    void
     
    void
    tickNonPassenger(net.minecraft.world.entity.Entity p_entity)
     
    void
    unload(net.minecraft.world.level.chunk.LevelChunk chunk)
     

    Methods inherited from class net.minecraft.client.multiplayer.ClientLevel

    addAlwaysVisibleParticle, addAlwaysVisibleParticle, addDestroyBlockEffect, addParticle, addParticle, calculateBlockTint, createFireworks, doAnimateTick, effects, enabledFeatures, entitiesForRendering, fillReportDetails, gatherChunkSourceStats, getAllMapData, getBlockTicks, getBlockTint, getChunkSource, getCloudColor, getEntities, getEntity, getEntityCount, getFluidTicks, getFreeMapId, getLevelData, getMapData, getRecipeManager, getScoreboard, getServerSimulationDistance, getShade, getSkyColor, getSkyDarken, getSkyFlashTime, getStarBrightness, getUncachedNoiseBiome, hasChunk, isLightUpdateQueueEmpty, playLocalSound, playLocalSound, playSeededSound, playSeededSound, potionBrewing, removeEntity, shouldTickDeath, tickRateManager, toString

    Methods inherited from class net.minecraft.world.level.Level

    addBlockEntityTicker, blockEntityChanged, blockEvent, broadcastDamageEvent, broadcastEntityEvent, close, damageSources, destroyBlock, dimension, dimensionType, dimensionTypeRegistration, explode, explode, explode, explode, explode, explode, getBiomeManager, getBlockEntity, getBlockRandomPos, getChunk, getChunk, getChunkAt, getChunkForCollisions, getCurrentDifficultyAt, getDayTime, getEntities, getEntities, getEntities, getEntities, getFluidState, getGameRules, getGameTime, getHeight, getLightEngine, getProfiler, getProfilerSupplier, getRainLevel, getRandom, getSeaLevel, getServer, getSharedSpawnAngle, getSharedSpawnPos, getSkyDarken, getSunAngle, getThunderLevel, getWorldBorder, guardEntityTick, isClientSide, isDay, isDebug, isFluidAtPosition, isInSpawnableBounds, isInWorldBounds, isLoaded, isNight, isRaining, isRainingAt, isStateAtPosition, isThundering, loadedAndEntityCanStandOn, loadedAndEntityCanStandOnFace, mayInteract, neighborChanged, neighborChanged, neighborShapeChanged, nextSubTickCount, noSave, onBlockStateChange, playLocalSound, playSeededSound, playSound, playSound, playSound, playSound, playSound, playSound, prepareWeather, registryAccess, removeBlock, removeBlockEntity, setBlock, setBlockAndUpdate, shouldTickBlocksAt, shouldTickBlocksAt, tickBlockEntities, updateNeighborsAt, updateNeighborsAtExceptFromFacing, updateNeighbourForOutputSignal, updateSkyBrightness

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.fabricmc.fabric.api.attachment.v1.AttachmentTarget

    getAttached, getAttachedOrCreate, getAttachedOrCreate, getAttachedOrElse, getAttachedOrGet, getAttachedOrSet, getAttachedOrThrow, hasAttached, modifyAttached, removeAttached, setAttached

    Methods inherited from interface net.minecraft.world.level.BlockAndTintGetter

    canSeeSky, getBrightness, getRawBrightness

    Methods inherited from interface net.minecraft.world.level.BlockGetter

    clip, clipWithInteractionOverride, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, getMaxLightLevel, isBlockInLine

    Methods inherited from interface net.minecraft.world.level.CollisionGetter

    collidesWithSuffocatingBlock, findFreePosition, findSupportingBlock, getBlockCollisions, getCollisions, getEntityCollisions, isUnobstructed, isUnobstructed, isUnobstructed, noBlockCollision, noCollision, noCollision, noCollision

    Methods inherited from interface net.minecraft.world.level.CommonLevelAccessor

    getBlockEntity, getEntityCollisions, getHeightmapPos, isUnobstructed

    Methods inherited from interface net.minecraft.world.level.EntityGetter

    getEntities, getEntitiesOfClass, getEntitiesOfClass, getNearbyEntities, getNearbyPlayers, getNearestEntity, getNearestEntity, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getPlayerByUUID, hasNearbyAlivePlayer

    Methods inherited from interface net.fabricmc.fabric.api.blockview.v2.FabricBlockView

    getBiomeFabric, getBlockEntityRenderData, hasBiomes

    Methods inherited from interface net.minecraft.world.level.LevelAccessor

    blockUpdated, dayTime, gameEvent, gameEvent, gameEvent, gameEvent, getDifficulty, levelEvent, playSound, scheduleTick, scheduleTick, scheduleTick, scheduleTick

    Methods inherited from interface net.minecraft.world.level.LevelHeightAccessor

    getMaxBuildHeight, getMaxSection, getMinSection, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isOutsideBuildHeight, isOutsideBuildHeight

    Methods inherited from interface net.minecraft.world.level.LevelReader

    canSeeSkyFromBelowWater, containsAnyLiquid, getBiome, getBlockStatesIfLoaded, getChunk, getChunk, getHeight, getLightLevelDependentMagicValue, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getMinBuildHeight, getNoiseBiome, getPathfindingCostFromLightLevels, hasChunkAt, hasChunkAt, hasChunksAt, hasChunksAt, hasChunksAt, holderLookup, isEmptyBlock, isWaterAt

    Methods inherited from interface net.minecraft.world.level.LevelTimeAccess

    getMoonBrightness, getMoonPhase, getTimeOfDay

    Methods inherited from interface net.minecraft.world.level.LevelWriter

    addFreshEntity, destroyBlock, destroyBlock

    Methods inherited from interface net.minecraft.world.level.SignalGetter

    getBestNeighborSignal, getControlInputSignal, getDirectSignal, getDirectSignalTo, getSignal, hasNeighborSignal, hasSignal
  • Field Details

  • Constructor Details

    • FakeClientLevel

      public FakeClientLevel(net.minecraft.client.multiplayer.ClientLevel level)
  • Method Details

    • setClientSide

      public void setClientSide(boolean isClientSide)
    • getOrThrow

      public static FakeClientLevel getOrThrow()
    • getBlockState

      public net.minecraft.world.level.block.state.BlockState getBlockState(net.minecraft.core.BlockPos pos)
      Specified by:
      getBlockState in interface net.minecraft.world.level.BlockGetter
      Overrides:
      getBlockState in class net.minecraft.world.level.Level
    • setBlock

      public boolean setBlock(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, int flags, int recursionLeft)
      Specified by:
      setBlock in interface net.minecraft.world.level.LevelWriter
      Overrides:
      setBlock in class net.minecraft.client.multiplayer.ClientLevel
    • sendPacketToServer

      public void sendPacketToServer(net.minecraft.network.protocol.Packet<?> packet)
      Overrides:
      sendPacketToServer in class net.minecraft.client.multiplayer.ClientLevel
    • syncBlockState

      public void syncBlockState(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, net.minecraft.world.phys.Vec3 playerPos)
      Overrides:
      syncBlockState in class net.minecraft.client.multiplayer.ClientLevel
    • pollLightUpdates

      public void pollLightUpdates()
      Overrides:
      pollLightUpdates in class net.minecraft.client.multiplayer.ClientLevel
    • queueLightUpdate

      public void queueLightUpdate(Runnable task)
      Overrides:
      queueLightUpdate in class net.minecraft.client.multiplayer.ClientLevel
    • handleBlockChangedAck

      public void handleBlockChangedAck(int sequence)
      Overrides:
      handleBlockChangedAck in class net.minecraft.client.multiplayer.ClientLevel
    • setDayTime

      public void setDayTime(long time)
      Overrides:
      setDayTime in class net.minecraft.client.multiplayer.ClientLevel
    • setGameTime

      public void setGameTime(long time)
      Overrides:
      setGameTime in class net.minecraft.client.multiplayer.ClientLevel
    • tick

      public void tick(BooleanSupplier hasTimeLeft)
      Overrides:
      tick in class net.minecraft.client.multiplayer.ClientLevel
    • tickEntities

      public void tickEntities()
      Overrides:
      tickEntities in class net.minecraft.client.multiplayer.ClientLevel
    • tickNonPassenger

      public void tickNonPassenger(net.minecraft.world.entity.Entity p_entity)
      Overrides:
      tickNonPassenger in class net.minecraft.client.multiplayer.ClientLevel
    • unload

      public void unload(net.minecraft.world.level.chunk.LevelChunk chunk)
      Overrides:
      unload in class net.minecraft.client.multiplayer.ClientLevel
    • onChunkLoaded

      public void onChunkLoaded(net.minecraft.world.level.ChunkPos chunkPos)
      Overrides:
      onChunkLoaded in class net.minecraft.client.multiplayer.ClientLevel
    • clearTintCaches

      public void clearTintCaches()
      Overrides:
      clearTintCaches in class net.minecraft.client.multiplayer.ClientLevel
    • addEntity

      public void addEntity(net.minecraft.world.entity.Entity entity)
      Overrides:
      addEntity in class net.minecraft.client.multiplayer.ClientLevel
    • disconnect

      public void disconnect()
      Overrides:
      disconnect in class net.minecraft.client.multiplayer.ClientLevel
    • animateTick

      public void animateTick(int posX, int posY, int posZ)
      Overrides:
      animateTick in class net.minecraft.client.multiplayer.ClientLevel
    • overrideMapData

      public void overrideMapData(net.minecraft.world.level.saveddata.maps.MapId mapId, net.minecraft.world.level.saveddata.maps.MapItemSavedData mapData)
      Overrides:
      overrideMapData in class net.minecraft.client.multiplayer.ClientLevel
    • setMapData

      public void setMapData(net.minecraft.world.level.saveddata.maps.MapId mapId, net.minecraft.world.level.saveddata.maps.MapItemSavedData mapData)
      Overrides:
      setMapData in class net.minecraft.client.multiplayer.ClientLevel
    • sendBlockUpdated

      public void sendBlockUpdated(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState oldState, net.minecraft.world.level.block.state.BlockState newState, int flags)
      Overrides:
      sendBlockUpdated in class net.minecraft.client.multiplayer.ClientLevel
    • setSectionDirtyWithNeighbors

      public void setSectionDirtyWithNeighbors(int sectionX, int sectionY, int sectionZ)
      Overrides:
      setSectionDirtyWithNeighbors in class net.minecraft.client.multiplayer.ClientLevel
    • setBlocksDirty

      public void setBlocksDirty(net.minecraft.core.BlockPos blockPos, net.minecraft.world.level.block.state.BlockState oldState, net.minecraft.world.level.block.state.BlockState newState)
      Overrides:
      setBlocksDirty in class net.minecraft.client.multiplayer.ClientLevel
    • destroyBlockProgress

      public void destroyBlockProgress(int breakerId, net.minecraft.core.BlockPos pos, int progress)
      Overrides:
      destroyBlockProgress in class net.minecraft.client.multiplayer.ClientLevel
    • globalLevelEvent

      public void globalLevelEvent(int id, net.minecraft.core.BlockPos pos, int data)
      Overrides:
      globalLevelEvent in class net.minecraft.client.multiplayer.ClientLevel
    • levelEvent

      public void levelEvent(@Nullable @Nullable net.minecraft.world.entity.player.Player player, int type, net.minecraft.core.BlockPos pos, int data)
      Specified by:
      levelEvent in interface net.minecraft.world.level.LevelAccessor
      Overrides:
      levelEvent in class net.minecraft.client.multiplayer.ClientLevel
    • setSkyFlashTime

      public void setSkyFlashTime(int timeFlash)
      Overrides:
      setSkyFlashTime in class net.minecraft.client.multiplayer.ClientLevel
    • setDefaultSpawnPos

      public void setDefaultSpawnPos(net.minecraft.core.BlockPos spawnPos, float spawnAngle)
      Overrides:
      setDefaultSpawnPos in class net.minecraft.client.multiplayer.ClientLevel
    • gameEvent

      public void gameEvent(net.minecraft.core.Holder<net.minecraft.world.level.gameevent.GameEvent> gameEvent, net.minecraft.world.phys.Vec3 pos, net.minecraft.world.level.gameevent.GameEvent.Context context)
      Specified by:
      gameEvent in interface net.minecraft.world.level.LevelAccessor
      Overrides:
      gameEvent in class net.minecraft.client.multiplayer.ClientLevel
    • addMapData

      protected void addMapData(Map<net.minecraft.world.level.saveddata.maps.MapId,net.minecraft.world.level.saveddata.maps.MapItemSavedData> map)
      Overrides:
      addMapData in class net.minecraft.client.multiplayer.ClientLevel
    • setServerSimulationDistance

      public void setServerSimulationDistance(int serverSimulationDistance)
      Overrides:
      setServerSimulationDistance in class net.minecraft.client.multiplayer.ClientLevel
    • setServerVerifiedBlockState

      public void setServerVerifiedBlockState(net.minecraft.core.BlockPos pos, net.minecraft.world.level.block.state.BlockState state, int flags)
      Overrides:
      setServerVerifiedBlockState in class net.minecraft.client.multiplayer.ClientLevel
    • players

      public List<net.minecraft.client.player.AbstractClientPlayer> players()
      Specified by:
      players in interface net.minecraft.world.level.EntityGetter
      Overrides:
      players in class net.minecraft.client.multiplayer.ClientLevel
    • setRainLevel

      public void setRainLevel(float strength)
      Overrides:
      setRainLevel in class net.minecraft.world.level.Level
    • setThunderLevel

      public void setThunderLevel(float strength)
      Overrides:
      setThunderLevel in class net.minecraft.world.level.Level
    • setSpawnSettings

      public void setSpawnSettings(boolean hostile, boolean peaceful)
      Overrides:
      setSpawnSettings in class net.minecraft.world.level.Level
    • setBlockEntity

      public void setBlockEntity(net.minecraft.world.level.block.entity.BlockEntity blockEntity)
      Overrides:
      setBlockEntity in class net.minecraft.world.level.Level