Class SimulatedServerLevel

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.Level
net.minecraft.server.level.ServerLevel
com.petrolpark.core.simulation.SimulatedServerLevel
All Implemented Interfaces:
AutoCloseable, 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.ServerLevelAccessor, net.minecraft.world.level.SignalGetter, net.minecraft.world.level.WorldGenLevel, net.neoforged.neoforge.attachment.IAttachmentHolder, net.neoforged.neoforge.common.extensions.IBlockAndTintGetterExtension, net.neoforged.neoforge.common.extensions.IBlockGetterExtension, net.neoforged.neoforge.common.extensions.ILevelExtension, net.neoforged.neoforge.common.extensions.ILevelReaderExtension

@Experimental public class SimulatedServerLevel extends net.minecraft.server.level.ServerLevel
  • Nested Class Summary

    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
  • Field Summary

    Fields inherited from class net.minecraft.server.level.ServerLevel

    END_SPAWN_POINT, noSave, raids, RAIN_DELAY, RAIN_DURATION, THUNDER_DURATION

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

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

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

    ATTACHMENTS_NBT_KEY

    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
    SimulatedServerLevel(net.minecraft.server.MinecraftServer server, Executor dispatcher, net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess levelStorageAccess, net.minecraft.world.level.storage.ServerLevelData serverLevelData, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, net.minecraft.world.level.dimension.LevelStem levelStem, net.minecraft.server.level.progress.ChunkProgressListener progressListener, long biomeZoomSeed)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.entity.Entity
    getEntity(int id)
     
    net.minecraft.world.level.saveddata.maps.MapId
     
    net.minecraft.world.level.saveddata.maps.MapItemSavedData
    getMapData(net.minecraft.world.level.saveddata.maps.MapId mapId)
     
    List<net.minecraft.server.level.ServerPlayer>
     
    void
    playSound(net.minecraft.world.entity.player.Player player, double x, double y, double z, net.minecraft.sounds.SoundEvent soundEvent, net.minecraft.sounds.SoundSource soundSource, float volume, float pitch)
     
    void
    playSound(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.Entity entity, net.minecraft.sounds.SoundEvent soundEvent, net.minecraft.sounds.SoundSource soundSource, float volume, float pitch)
     
    void
    setMapData(net.minecraft.world.level.saveddata.maps.MapId mapId, net.minecraft.world.level.saveddata.maps.MapItemSavedData mapData)
     

    Methods inherited from class net.minecraft.server.level.ServerLevel

    addDuringTeleport, addFreshEntity, addLegacyChunkEntities, addNewPlayer, addRespawnedPlayer, addWithUUID, addWorldGenChunkEntities, areEntitiesLoaded, blockEvent, blockUpdated, broadcastDamageEvent, broadcastEntityEvent, canSleepThroughNights, cleanCapabilityListenerReferences, clearBlockEvents, close, destroyBlockProgress, enabledFeatures, explode, fillReportDetails, findClosestBiome3d, findLightningTargetAround, findNearestMapStructure, gameEvent, gatherChunkSourceStats, getAllEntities, getBlockTicks, getChunkSource, getDataStorage, getDayTimeFraction, getDayTimePerTick, getDragonFight, getDragons, getEntities, getEntities, getEntities, getEntities, getEntity, getEntityOrPart, getFluidTicks, getForcedChunks, getLevel, getLogicalHeight, getPartEntities, getPathTypeCache, getPlayers, getPlayers, getPoiManager, getPortalForcer, getRaidAt, getRaids, getRandomPlayer, getRandomSequence, getRandomSequences, getRecipeManager, getScoreboard, getSeed, getServer, getShade, getStructureManager, getUncachedNoiseBiome, getWatchdogStats, globalLevelEvent, invalidateCapabilities, invalidateCapabilities, isCloseToVillage, isFlat, isHandlingTick, isNaturalSpawningAllowed, isNaturalSpawningAllowed, isPositionEntityTicking, isRaided, isVillage, isVillage, levelEvent, mayInteract, neighborChanged, neighborChanged, noSave, onBlockStateChange, onReputationEvent, onStructureStartsAvailable, playSeededSound, playSeededSound, potionBrewing, registerCapabilityListener, removePlayerImmediately, resetEmptyTime, resetWeatherCycle, save, saveDebugReport, sectionsToVillage, sendBlockUpdated, sendParticles, sendParticles, setChunkForced, setDayTime, setDayTimeFraction, setDayTimePerTick, setDefaultSpawnPos, setDragonFight, setWeatherParameters, shouldTickBlocksAt, startTickingChunk, structureManager, tick, tickChunk, tickCustomSpawners, tickNonPassenger, tickPrecipitation, tickRateManager, tickTime, toString, tryAddFreshEntityWithPassengers, unload, updateNeighborsAt, updateNeighborsAtExceptFromFacing, updateSleepingPlayerList

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

    addAlwaysVisibleParticle, addAlwaysVisibleParticle, addBlockEntityTicker, addDestroyBlockEffect, addFreshBlockEntities, addParticle, addParticle, advanceDaytime, blockEntityChanged, createFireworks, damageSources, destroyBlock, dimension, dimensionType, dimensionTypeRegistration, disconnect, explode, explode, explode, explode, explode, getBiomeManager, getBlockEntity, getBlockRandomPos, getBlockState, getChunk, getChunk, getChunkAt, getChunkForCollisions, getCurrentDifficultyAt, getDayTime, getEntities, getEntities, getEntities, getEntities, getFluidState, getGameRules, getGameTime, getHeight, getLevelData, getLightEngine, getMaxEntityRadius, getProfiler, getProfilerSupplier, getRainLevel, getRandom, getSeaLevel, getSharedSpawnAngle, getSharedSpawnPos, getSkyDarken, getSunAngle, getThunderLevel, getWorldBorder, guardEntityTick, increaseMaxEntityRadius, isClientSide, isDay, isDebug, isFluidAtPosition, isInSpawnableBounds, isInWorldBounds, isLoaded, isNight, isRaining, isRainingAt, isStateAtPosition, isThundering, loadedAndEntityCanStandOn, loadedAndEntityCanStandOnFace, markAndNotifyBlock, neighborShapeChanged, nextSubTickCount, playLocalSound, playLocalSound, playLocalSound, playSeededSound, playSound, playSound, playSound, playSound, prepareWeather, registryAccess, removeBlock, removeBlockEntity, sendPacketToServer, setBlock, setBlock, setBlockAndUpdate, setBlockEntity, setBlocksDirty, setRainLevel, setSkyFlashTime, setSpawnSettings, setThunderLevel, shouldTickBlocksAt, shouldTickDeath, tickBlockEntities, updateNeighbourForOutputSignal, updateSkyBrightness

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

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

    Methods inherited from class java.lang.Object

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

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

    canSeeSky, getBrightness, getLightEngine, getRawBrightness

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

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

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

    collidesWithSuffocatingBlock, findFreePosition, findSupportingBlock, getBlockCollisions, getCollisions, getEntityCollisions, getWorldBorder, 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, getEntities, getEntities, getEntitiesOfClass, getEntitiesOfClass, getNearbyEntities, getNearbyPlayers, getNearestEntity, getNearestEntity, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getPlayerByUUID, hasNearbyAlivePlayer

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

    getData, getExistingData, hasData, removeData, setData

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

    getShade

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

    getAuxLightManager, getAuxLightManager, getModelData

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

    getCapability, getCapability, getCapability, getCapability, getDescription, getDescriptionKey, getModelDataManager

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

    holder, holderOrThrow, isAreaLoaded

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

    addParticle, dayTime, gameEvent, gameEvent, gameEvent, gameEvent, getCurrentDifficultyAt, getDifficulty, getLevelData, getRandom, hasChunk, levelEvent, neighborShapeChanged, nextSubTickCount, playSound, 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, dimensionType, getBiome, getBiomeManager, getBlockStatesIfLoaded, getBlockTint, getChunk, getChunk, getChunk, getChunk, getChunkForCollisions, getHeight, getHeight, getLightLevelDependentMagicValue, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getMinBuildHeight, getNoiseBiome, getPathfindingCostFromLightLevels, getSeaLevel, getSkyDarken, hasChunkAt, hasChunkAt, hasChunksAt, hasChunksAt, hasChunksAt, holderLookup, isClientSide, isEmptyBlock, isWaterAt, registryAccess

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

    isFluidAtPosition, isStateAtPosition

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

    getMoonBrightness, getMoonPhase, getTimeOfDay

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

    destroyBlock, destroyBlock, destroyBlock, removeBlock, setBlock, setBlock

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

    addFreshEntityWithPassengers

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

    getBestNeighborSignal, getControlInputSignal, getDirectSignal, getDirectSignalTo, getSignal, hasNeighborSignal, hasSignal

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

    ensureCanWrite, setCurrentlyGenerating
  • Constructor Details

    • SimulatedServerLevel

      public SimulatedServerLevel(net.minecraft.server.MinecraftServer server, Executor dispatcher, net.minecraft.world.level.storage.LevelStorageSource.LevelStorageAccess levelStorageAccess, net.minecraft.world.level.storage.ServerLevelData serverLevelData, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension, net.minecraft.world.level.dimension.LevelStem levelStem, net.minecraft.server.level.progress.ChunkProgressListener progressListener, long biomeZoomSeed)
  • Method Details

    • players

      public List<net.minecraft.server.level.ServerPlayer> players()
      Specified by:
      players in interface net.minecraft.world.level.EntityGetter
      Overrides:
      players in class net.minecraft.server.level.ServerLevel
    • playSound

      public void playSound(@Nullable net.minecraft.world.entity.player.Player player, double x, double y, double z, @Nonnull net.minecraft.sounds.SoundEvent soundEvent, @Nonnull net.minecraft.sounds.SoundSource soundSource, float volume, float pitch)
      Overrides:
      playSound in class net.minecraft.world.level.Level
    • playSound

      public void playSound(@Nullable net.minecraft.world.entity.player.Player player, @Nonnull net.minecraft.world.entity.Entity entity, @Nonnull net.minecraft.sounds.SoundEvent soundEvent, @Nonnull net.minecraft.sounds.SoundSource soundSource, float volume, float pitch)
      Overrides:
      playSound in class net.minecraft.world.level.Level
    • getEntity

      public net.minecraft.world.entity.Entity getEntity(int id)
      Overrides:
      getEntity in class net.minecraft.server.level.ServerLevel
    • getMapData

      @Nullable public net.minecraft.world.level.saveddata.maps.MapItemSavedData getMapData(@Nonnull net.minecraft.world.level.saveddata.maps.MapId mapId)
      Overrides:
      getMapData in class net.minecraft.server.level.ServerLevel
    • setMapData

      public void setMapData(@Nonnull net.minecraft.world.level.saveddata.maps.MapId mapId, @Nonnull net.minecraft.world.level.saveddata.maps.MapItemSavedData mapData)
      Overrides:
      setMapData in class net.minecraft.server.level.ServerLevel
    • getFreeMapId

      public net.minecraft.world.level.saveddata.maps.MapId getFreeMapId()
      Overrides:
      getFreeMapId in class net.minecraft.server.level.ServerLevel