Class FakeClientLevel

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.Level
net.minecraft.client.multiplayer.ClientLevel
net.nikdo53.tinymultiblocklib.client.FakeClientLevel
All Implemented Interfaces:
AutoCloseable, net.minecraft.client.multiplayer.CacheSlot.Cleaner<net.minecraft.client.multiplayer.ClientLevel>, net.minecraft.client.renderer.block.BlockAndTintGetter, net.minecraft.world.level.biome.BiomeManager.NoiseBiomeSource, net.minecraft.world.level.BlockAndLightGetter, 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.LevelWriter, net.minecraft.world.level.ScheduledTickAccess, net.minecraft.world.level.SignalGetter, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IBlockGetterExtension, net.neoforged.neoforge.common.extensions.ILevelExtension, net.neoforged.neoforge.common.extensions.ILevelReaderExtension

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

    Nested classes/interfaces inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    net.neoforged.neoforge.attachment.AttachmentHolder.AsField

    Nested classes/interfaces inherited from interface net.minecraft.world.level.BlockGetter

    net.minecraft.world.level.BlockGetter.BlockStepVisitor
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
    static @Nullable FakeClientLevel
     

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

    DEFAULT_QUIT_MESSAGE

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

    addend, blockEntityTickers, captureBlockSnapshots, capturedBlockSnapshots, END, 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, restoringBlockSnapshots, SHORT_PARTICLE_CLIP_RANGE, thunderLevel

    Fields inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    ATTACHMENTS_NBT_KEY

    Fields inherited from interface net.minecraft.client.renderer.block.BlockAndTintGetter

    EMPTY

    Fields inherited from interface net.neoforged.neoforge.common.extensions.ILevelExtension

    TRANSLATION_PREFIX

    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
    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
    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
    setRainLevel(float strength)
     
    void
    setRespawnData(net.minecraft.world.level.storage.LevelData.RespawnData respawnData)
     
    void
    setSectionDirtyWithNeighbors(int sectionX, int sectionY, int sectionZ)
     
    void
    setSectionRangeDirty(int minSectionX, int minSectionY, int minSectionZ, int maxSectionX, int maxSectionY, int maxSectionZ)
     
    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 spawnEnemies)
     
    void
    setThunderLevel(float strength)
     
    void
    setTimeFromServer(long gameTime)
     
    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, addBreakingBlockEffect, addBreakingBlockEffect, addDestroyBlockEffect, addParticle, addParticle, calculateBlockTint, cardinalLighting, clockManager, createFireworks, disconnect, doAnimateTick, dragonParts, enabledFeatures, endFlashState, entitiesForRendering, environmentAttributes, explode, fillReportDetails, fuelValues, gatherChunkSourceStats, getAllMapData, getBlockTicks, getBlockTint, getChunkSource, getClientLeafTintColor, getEntities, getEntity, getEntityCount, getFluidTicks, getGloballyRenderedBlockEntities, getLevelData, getMapData, getModelData, getModelDataManager, getPushableEntities, getRespawnData, getScoreboard, getSeaLevel, getServerSimulationDistance, getUncachedNoiseBiome, getWorldBorder, hasChunk, isTickingEntity, levelEvent, onBlockEntityAdded, onSectionBecomingNonEmpty, playLocalSound, playLocalSound, playPlayerSound, playSeededSound, playSeededSound, potionBrewing, recipeAccess, registerForCleaning, removeEntity, shouldTickDeath, tickRateManager, toString, trackExplosionEffects, update

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

    addBlockEntityTicker, addFreshBlockEntities, blockEntityChanged, blockEvent, broadcastDamageEvent, broadcastEntityEvent, canHaveWeather, close, damageSources, destroyBlock, dimension, dimensionType, dimensionTypeRegistration, explode, explode, explode, explode, getBiomeManager, getBlockEntity, getBlockRandomPos, getChunk, getChunk, getChunkAt, getChunkForCollisions, getDefaultClockTime, getEntities, getEntities, getEntities, getEntities, getEntity, getEntityInAnyDimension, getFluidState, getHeight, getLightEngine, getMaxEntityRadius, getOverworldClockTime, getPlayerInAnyDimension, getRainLevel, getRandom, getServer, getSkyDarken, getThunderLevel, getWorldBorderAdjustedRespawnData, guardEntityTick, hasEntities, increaseMaxEntityRadius, isBrightOutside, isClientSide, isDarkOutside, isDebug, isFluidAtPosition, isInSpawnableBounds, isInValidBounds, isInWorldBounds, isLoaded, isRaining, isRainingAt, isStateAtPosition, isThundering, loadedAndEntityCanStandOn, loadedAndEntityCanStandOnFace, markAndNotifyBlock, mayInteract, neighborChanged, neighborChanged, neighborShapeChanged, nextSubTickCount, noSave, palettedContainerFactory, playLocalSound, playSeededSound, playSound, playSound, playSound, playSound, playSound, precipitationAt, registryAccess, removeBlock, removeBlockEntity, setBlock, setBlockAndUpdate, shouldTickBlocksAt, shouldTickBlocksAt, tickBlockEntities, updateNeighborsAt, updateNeighborsAtExceptFromFacing, updateNeighbourForOutputSignal, updatePOIOnBlockStateChange, updateSkyBrightness

    Methods inherited from class net.neoforged.neoforge.attachment.AttachmentHolder

    deserializeAttachments, getData, getExistingDataOrNull, hasAttachments, hasData, removeData, serializeAttachments, setData

    Methods inherited from class Object

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

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

    canSeeSky, getBrightness, getLightEngine, getRawBrightness

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

    clip, clipWithInteractionOverride, getBlockEntity, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getFluidState, getLightEmission, isBlockInLine

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

    clipIncludingBorder, collidesWithSuffocatingBlock, findFreePosition, findSupportingBlock, getBlockAndLiquidCollisions, getBlockCollisions, getCollisions, getPreMoveCollisions, isUnobstructed, isUnobstructed, noBlockCollision, noBlockCollision, noBorderCollision, noCollision, noCollision, noCollision, noCollision, noEntityCollision

    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, getNearestPlayer, getNearestPlayer, getNearestPlayer, getPlayerByUUID, hasNearbyAlivePlayer

    Methods inherited from interface net.neoforged.neoforge.attachment.IAttachmentHolder

    getData, getExistingData, getExistingData, getExistingDataOrNull, hasData, removeData, setData, syncData, syncData

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IBlockGetterExtension

    getAuxLightManager, getAuxLightManager

    Methods inherited from interface net.neoforged.neoforge.common.extensions.ILevelExtension

    getCapability, getCapability, getCapability, getCapability, getDescription, getDescriptionKey, invalidateCapabilities, invalidateCapabilities

    Methods inherited from interface net.neoforged.neoforge.common.extensions.ILevelReaderExtension

    holder, holderOrThrow, isAreaLoaded

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

    createTick, createTick, gameEvent, gameEvent, gameEvent, gameEvent, getDifficulty, getGameTime, levelEvent, playSound, updateNeighborsAt

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

    getMaxSectionY, getMaxY, getMinSectionY, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isInsideBuildHeight, isInsideBuildHeight, isOutsideBuildHeight, isOutsideBuildHeight

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

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

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

    addFreshEntity, destroyBlock, destroyBlock

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

    scheduleTick, scheduleTick, scheduleTick, scheduleTick

    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
    • 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
    • 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
    • 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
    • setSkyFlashTime

      public void setSkyFlashTime(int timeFlash)
      Overrides:
      setSkyFlashTime 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
    • setTimeFromServer

      public void setTimeFromServer(long gameTime)
      Overrides:
      setTimeFromServer in class net.minecraft.client.multiplayer.ClientLevel
    • setRespawnData

      public void setRespawnData(net.minecraft.world.level.storage.LevelData.RespawnData respawnData)
      Overrides:
      setRespawnData in class net.minecraft.client.multiplayer.ClientLevel
    • setSectionRangeDirty

      public void setSectionRangeDirty(int minSectionX, int minSectionY, int minSectionZ, int maxSectionX, int maxSectionY, int maxSectionZ)
      Overrides:
      setSectionRangeDirty in class net.minecraft.client.multiplayer.ClientLevel
    • setSpawnSettings

      public void setSpawnSettings(boolean spawnEnemies)
      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