Class CustomLevel

java.lang.Object
net.neoforged.neoforge.attachment.AttachmentHolder
net.minecraft.world.level.Level
net.minecraft.server.level.ServerLevel
de.luckymcdev.foundryengine.common.world.level.runtime.RuntimeLevel
de.luckymcdev.foundryengine.common.world.level.test.CustomLevel
All Implemented Interfaces:
AutoCloseable, net.minecraft.server.level.ServerEntityGetter, 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.ServerLevelAccessor, net.minecraft.world.level.SignalGetter, net.minecraft.world.level.WorldGenLevel, 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 CustomLevel extends RuntimeLevel
  • Nested Class Summary

    Nested classes/interfaces inherited from class RuntimeLevel

    RuntimeLevel.Constructor, RuntimeLevel.Style

    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 inherited from class RuntimeLevel

    style

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

    END_SPAWN_POINT, noSave, raids, RAIN_DELAY, RAIN_DURATION, THUNDER_DURATION, tickTime

    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.neoforged.neoforge.common.extensions.ILevelExtension

    TRANSLATION_PREFIX

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

    DIRECTIONS
  • Constructor Summary

    Constructors
    Constructor
    Description
    CustomLevel(net.minecraft.server.MinecraftServer server, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> registryKey, RuntimeLevelConfig config, RuntimeLevel.Style style)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    long
     
    @NonNull net.minecraft.world.item.crafting.RecipeManager
     
    void
    tick(@NonNull BooleanSupplier shouldKeepTicking)
     

    Methods inherited from class RuntimeLevel

    clockManager, getGameRules, isFlat, save, tickTime

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

    addDuringTeleport, addFreshEntity, addLegacyChunkEntities, addNewPlayer, addRespawnedPlayer, addWithUUID, addWorldGenChunkEntities, anyPlayerCloseEnoughForSpawning, anyPlayerCloseEnoughForSpawning, areEntitiesActuallyLoadedAndTicking, areEntitiesLoaded, blockEvent, broadcastDamageEvent, broadcastEntityEvent, canSleepThroughNights, canSpawnEntitiesInChunk, canSpreadFireAround, cleanCapabilityListenerReferences, clearBlockEvents, close, debugSynchronizers, destroyBlockProgress, dragonParts, enabledFeatures, environmentAttributes, explode, fillReportDetails, findClosestBiome3d, findLightningTargetAround, findNearestMapStructure, fuelValues, gameEvent, gatherChunkSourceStats, getAllEntities, getBlockTicks, getChunkSource, getCurrentDifficultyAt, getDataStorage, getDragonFight, getDragons, getEntities, getEntities, getEntities, getEntities, getEntity, getEntityInAnyDimension, getEntityOrPart, getFluidTicks, getForceLoadedChunks, getFreeMapId, getLevel, getLogicalHeight, getMapData, getMoonBrightness, getPathTypeCache, getPlayerInAnyDimension, getPlayers, getPlayers, getPoiManager, getPortalForcer, getRaidAt, getRaids, getRandomPlayer, getRespawnData, getScoreboard, getSeaLevel, getSeedOverride, getServer, getStructureManager, getUncachedNoiseBiome, getWatchdogStats, getWaypointManager, getWeatherData, getWorldBorder, globalLevelEvent, invalidateCapabilities, invalidateCapabilities, isAllowedToEnterPortal, isCloseToVillage, isCommandBlockEnabled, isHandlingTick, isPositionEntityTicking, isPositionTickingWithEntitiesLoaded, isPvpAllowed, isRaided, isSpawnerBlockEnabled, isSpawningMonsters, isVillage, isVillage, levelEvent, mayInteract, neighborChanged, neighborChanged, noSave, onBlockEntityAdded, onReputationEvent, onStructureStartsAvailable, players, playSeededSound, playSeededSound, potionBrewing, registerCapabilityListener, removePlayerImmediately, resetEmptyTime, resetWeatherCycle, saveDebugReport, sectionsToVillage, sendBlockUpdated, sendParticles, sendParticles, sendParticles, setChunkForced, setDragonFight, setEnvironmentAttributes, setMapData, setRespawnData, shouldTickBlocksAt, startTickingChunk, structureManager, syncData, tickChunk, tickCustomSpawners, tickNonPassenger, tickPrecipitation, tickRateManager, tickThunder, toString, tryAddFreshEntityWithPassengers, unload, updateNeighborsAt, updateNeighborsAt, updateNeighborsAtExceptFromFacing, updateNeighboursOnBlockSet, updatePOIOnBlockStateChange, updateSleepingPlayerList, waitForEntities

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

    addAlwaysVisibleParticle, addAlwaysVisibleParticle, addBlockEntityTicker, addDestroyBlockEffect, addFreshBlockEntities, addParticle, addParticle, blockEntityChanged, canHaveWeather, createFireworks, damageSources, destroyBlock, dimension, dimensionType, dimensionTypeRegistration, explode, explode, explode, explode, getBiomeManager, getBlockEntity, getBlockRandomPos, getBlockState, getChunk, getChunk, getChunkAt, getChunkForCollisions, getClientLeafTintColor, getDefaultClockTime, getEntities, getEntities, getEntities, getEntities, getEntity, getFluidState, getHeight, getLevelData, getLightEngine, getMaxEntityRadius, getOverworldClockTime, getPushableEntities, getRainLevel, getRandom, getSkyDarken, getThunderLevel, getWorldBorderAdjustedRespawnData, guardEntityTick, hasEntities, increaseMaxEntityRadius, isBrightOutside, isClientSide, isDarkOutside, isDebug, isFluidAtPosition, isInSpawnableBounds, isInValidBounds, isInWorldBounds, isLoaded, isRaining, isRainingAt, isStateAtPosition, isThundering, loadedAndEntityCanStandOn, loadedAndEntityCanStandOnFace, markAndNotifyBlock, neighborShapeChanged, nextSubTickCount, palettedContainerFactory, playLocalSound, playLocalSound, playLocalSound, playPlayerSound, playSeededSound, playSound, playSound, playSound, playSound, playSound, precipitationAt, 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, 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, getBlockState, 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, getEntities, getEntities, getEntitiesOfClass, getEntitiesOfClass, getEntityCollisions, getNearestPlayer, getNearestPlayer, getNearestPlayer, getPlayerByUUID, hasNearbyAlivePlayer, isUnobstructed

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

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

    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, createTick, createTick, gameEvent, gameEvent, gameEvent, gameEvent, getDifficulty, getGameTime, getLevelData, getRandom, hasChunk, levelEvent, neighborShapeChanged, nextSubTickCount, playSound, playSound

    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, dimensionType, getBiome, getBiomeManager, getBlockStatesIfLoaded, getChunk, getChunk, getChunk, getChunk, getChunkForCollisions, getEffectiveSkyBrightness, getHeight, getHeight, getHeight, getLightLevelDependentMagicValue, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getMinY, getNoiseBiome, getPathfindingCostFromLightLevels, 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.LevelWriter

    destroyBlock, destroyBlock, destroyBlock, removeBlock, setBlock, setBlock

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

    scheduleTick, scheduleTick, scheduleTick, scheduleTick

    Methods inherited from interface net.minecraft.server.level.ServerEntityGetter

    getNearbyEntities, getNearbyPlayers, getNearestEntity, getNearestEntity, getNearestEntity, getNearestPlayer, getNearestPlayer, getNearestPlayer

    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

    • CustomLevel

      public CustomLevel(net.minecraft.server.MinecraftServer server, net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> registryKey, RuntimeLevelConfig config, RuntimeLevel.Style style)
  • Method Details

    • tick

      public void tick(@NonNull BooleanSupplier shouldKeepTicking)
      Overrides:
      tick in class net.minecraft.server.level.ServerLevel
    • recipeAccess

      public @NonNull net.minecraft.world.item.crafting.RecipeManager recipeAccess()
      Overrides:
      recipeAccess in class net.minecraft.server.level.ServerLevel
    • getSeed

      public long getSeed()
      Specified by:
      getSeed in interface net.minecraft.world.level.WorldGenLevel
      Overrides:
      getSeed in class RuntimeLevel