Class FakeLevel
java.lang.Object
net.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.Level>
net.minecraft.world.level.Level
com.ldtteam.structurize.client.fakelevel.FakeLevel
- 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.SignalGetter,net.minecraftforge.client.extensions.IForgeBlockAndTintGetter,net.minecraftforge.common.capabilities.ICapabilityProvider,net.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.Level>,net.minecraftforge.common.extensions.IForgeBlockGetter,net.minecraftforge.common.extensions.IForgeLevel
- Direct Known Subclasses:
BlueprintBlockAccess,SingleBlockFakeLevel
public class FakeLevel
extends net.minecraft.world.level.Level
As much as general fake level. Features:
- static access to given data
- immutability - disables all external changes (but levelSource can be mutable)
- most of dimension related things is delegated to current client level (class instances can travel accross dimensions)
- biome info is also delegated from client level
- light control - manual or delegated from client level
- primitive chunk and entity management
- basic heightmap support (not fully working yet)
- Few unsafe NPEs methods :)
Porting info:
- uncomment last method section
- fix compile errors
- add override for remaining methods and sort/implement them accordingly
- comment last method section
TODO: extend from client level
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.level.Level
net.minecraft.world.level.Level.ExplosionInteractionNested classes/interfaces inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
net.minecraftforge.common.capabilities.CapabilityProvider.AsField<B extends net.minecraftforge.common.capabilities.ICapabilityProviderImpl<B>> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Map<net.minecraft.core.BlockPos,net.minecraft.world.level.block.entity.BlockEntity> protected final FakeChunkSourceprotected FakeLevelEntityGetterAdapterprotected IFakeLevelBlockGetterprotected final FakeLevelLightEngineprotected final IFakeLevelLightProviderprotected final booleanprotected net.minecraft.world.level.Levelprotected final net.minecraft.world.scores.Scoreboardprotected net.minecraft.core.BlockPosCurrent rendering worldPos so we can use client level real infoFields 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_DAYFields inherited from interface net.minecraft.world.level.SignalGetter
DIRECTIONS -
Constructor Summary
ConstructorsConstructorDescriptionFakeLevel(IFakeLevelBlockGetter levelSource, IFakeLevelLightProvider lightProvider, @Nullable net.minecraft.world.scores.Scoreboard scoreboard, boolean overrideBeLevel) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddBlockEntityTicker(net.minecraft.world.level.block.entity.TickingBlockEntity p_151526_) voidaddFreshBlockEntities(Collection<net.minecraft.world.level.block.entity.BlockEntity> beList) voidblockEvent(net.minecraft.core.BlockPos p_46582_, net.minecraft.world.level.block.Block p_46583_, int p_46584_, int p_46585_) protected static net.minecraft.client.multiplayer.ClientLevelvoidclose()net.minecraft.world.damagesource.DamageSourcesbooleandestroyBlock(net.minecraft.core.BlockPos p_46626_, boolean p_46627_, net.minecraft.world.entity.Entity p_46628_, int p_46629_) voiddestroyBlockProgress(int p_46506_, net.minecraft.core.BlockPos p_46507_, int p_46508_) net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level>net.minecraft.world.level.dimension.DimensionTypenet.minecraft.core.Holder<net.minecraft.world.level.dimension.DimensionType>net.minecraft.world.flag.FeatureFlagSetnet.minecraft.world.level.Explosionexplode(net.minecraft.world.entity.Entity p_256233_, net.minecraft.world.damagesource.DamageSource p_255861_, net.minecraft.world.level.ExplosionDamageCalculator p_255867_, double p_256447_, double p_255732_, double p_255717_, float p_256013_, boolean p_256228_, net.minecraft.world.level.Level.ExplosionInteraction p_255784_, boolean p_256377_) net.minecraft.CrashReportCategoryfillReportDetails(net.minecraft.CrashReport report) voidgameEvent(net.minecraft.world.level.gameevent.GameEvent p_220404_, net.minecraft.world.phys.Vec3 p_220405_, net.minecraft.world.level.gameevent.GameEvent.Context p_220406_) net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>getBiome(net.minecraft.core.BlockPos pos) net.minecraft.world.level.biome.BiomeManager@Nullable net.minecraft.world.level.block.entity.BlockEntitygetBlockEntity(net.minecraft.core.BlockPos pos) net.minecraft.world.level.block.state.BlockStategetBlockState(net.minecraft.core.BlockPos pos) net.minecraft.world.ticks.LevelTickAccess<net.minecraft.world.level.block.Block>intgetBrightness(net.minecraft.world.level.LightLayer lightType, net.minecraft.core.BlockPos pos) <T> @NotNull net.minecraftforge.common.util.LazyOptional<T>getCapability(@NotNull net.minecraftforge.common.capabilities.Capability<T> cap, @Nullable net.minecraft.core.Direction side) net.minecraft.world.level.chunk.ChunkAccessgetChunk(int x, int z, net.minecraft.world.level.chunk.ChunkStatus requiredStatus, boolean nonnull) net.minecraft.world.level.chunk.ChunkSourceprotected net.minecraft.world.level.entity.LevelEntityGetter<net.minecraft.world.entity.Entity>net.minecraft.world.entity.EntitygetEntity(int id) @Nullable net.minecraft.world.level.block.entity.BlockEntitygetExistingBlockEntity(net.minecraft.core.BlockPos pos) net.minecraft.world.level.material.FluidStategetFluidState(net.minecraft.core.BlockPos pos) net.minecraft.world.ticks.LevelTickAccess<net.minecraft.world.level.material.Fluid>intintintgetHeight(net.minecraft.world.level.levelgen.Heightmap.Types heightmapType, int x, int z) net.minecraft.world.level.lighting.LevelLightEnginenet.minecraft.world.level.saveddata.maps.MapItemSavedDatagetMapData(String p_46650_) intnet.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>getNoiseBiome(int x, int y, int z) net.minecraft.util.profiling.ProfilerFillerSupplier<net.minecraft.util.profiling.ProfilerFiller>floatgetRainLevel(float delta) intgetRawBrightness(net.minecraft.core.BlockPos pos, int amount) net.minecraft.world.item.crafting.RecipeManagernet.minecraft.world.scores.ScoreboardintfloatgetShade(net.minecraft.core.Direction p_104703_, boolean p_104704_) intfloatgetThunderLevel(float delta) net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome>getUncachedNoiseBiome(int x, int y, int z) net.minecraft.world.level.border.WorldBordernet.minecraft.core.BlockPosbooleanhasChunk(int chunkX, int chunkZ) voidbooleanisDay()booleanisInWorldBounds(net.minecraft.core.BlockPos pos) booleanisLoaded(net.minecraft.core.BlockPos pos) booleanisRainingAt(net.minecraft.core.BlockPos position) voidlevelEvent(net.minecraft.world.entity.player.Player p_46771_, int p_46772_, net.minecraft.core.BlockPos p_46773_, int p_46774_) voidmarkAndNotifyBlock(net.minecraft.core.BlockPos p_46605_, net.minecraft.world.level.chunk.LevelChunk levelchunk, net.minecraft.world.level.block.state.BlockState blockstate, net.minecraft.world.level.block.state.BlockState p_46606_, int p_46607_, int p_46608_) booleanmayInteract(net.minecraft.world.entity.player.Player p_46557_, net.minecraft.core.BlockPos p_46558_) voidneighborShapeChanged(net.minecraft.core.Direction p_220385_, net.minecraft.world.level.block.state.BlockState p_220386_, net.minecraft.core.BlockPos p_220387_, net.minecraft.core.BlockPos p_220388_, int p_220389_, int p_220390_) booleannoSave()List<net.minecraft.client.player.AbstractClientPlayer>players()voidplaySeededSound(net.minecraft.world.entity.player.Player p_262953_, double p_263004_, double p_263398_, double p_263376_, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> p_263359_, net.minecraft.sounds.SoundSource p_263020_, float p_263055_, float p_262914_, long p_262991_) voidplaySeededSound(net.minecraft.world.entity.player.Player p_220372_, net.minecraft.world.entity.Entity p_220373_, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> p_263500_, net.minecraft.sounds.SoundSource p_220375_, float p_220376_, float p_220377_, long p_220378_) net.minecraft.world.level.Levelnet.minecraft.core.RegistryAccessbooleanremoveBlock(net.minecraft.core.BlockPos p_46623_, boolean p_46624_) voidvoidsendBlockUpdated(net.minecraft.core.BlockPos p_46612_, net.minecraft.world.level.block.state.BlockState p_46613_, net.minecraft.world.level.block.state.BlockState p_46614_, int p_46615_) booleansetBlock(net.minecraft.core.BlockPos p_46605_, net.minecraft.world.level.block.state.BlockState p_46606_, int p_46607_, int p_46608_) voidsetBlockEntities(Map<net.minecraft.core.BlockPos, net.minecraft.world.level.block.entity.BlockEntity> blockEntities) For better block entity handling in chunk methods.voidsetEntities(Collection<? extends net.minecraft.world.entity.Entity> entities) voidsetLevelSource(IFakeLevelBlockGetter levelSource) voidsetMapData(String p_151533_, net.minecraft.world.level.saveddata.maps.MapItemSavedData p_151534_) voidsetRainLevel(float p_46735_) voidsetRealLevel(net.minecraft.world.level.Level realLevel) voidsetSpawnSettings(boolean p_46704_, boolean p_46705_) voidsetThunderLevel(float p_46708_) voidsetWorldPos(net.minecraft.core.BlockPos worldPos) booleanshouldTickBlocksAt(long p_186456_) booleanshouldTickDeath(net.minecraft.world.entity.Entity p_186458_) protected voidvoidupdateNeighborsAt(net.minecraft.core.BlockPos p_46673_, net.minecraft.world.level.block.Block p_46674_) voidMethods inherited from class net.minecraft.world.level.Level
addAlwaysVisibleParticle, addAlwaysVisibleParticle, addDestroyBlockEffect, addParticle, addParticle, blockEntityChanged, broadcastDamageEvent, broadcastEntityEvent, createFireworks, dimensionTypeId, disconnect, explode, explode, explode, explode, getBlockRandomPos, getChunk, getChunkAt, getChunkForCollisions, getCurrentDifficultyAt, getDayTime, getEntities, getEntities, getEntities, getEntities, getGameRules, getGameTime, getLevelData, getMaxEntityRadius, getRandom, getServer, getSharedSpawnAngle, getSharedSpawnPos, getSunAngle, globalLevelEvent, guardEntityTick, increaseMaxEntityRadius, isClientSide, isDebug, isFluidAtPosition, isInSpawnableBounds, isNight, isRaining, isStateAtPosition, isThundering, loadedAndEntityCanStandOn, loadedAndEntityCanStandOnFace, neighborChanged, neighborChanged, nextSubTickCount, onBlockStateChange, playLocalSound, playLocalSound, playSeededSound, playSound, playSound, playSound, playSound, prepareWeather, removeBlockEntity, sendPacketToServer, setBlock, setBlockAndUpdate, setBlockEntity, setBlocksDirty, setSkyFlashTime, shouldTickBlocksAt, updateNeighborsAtExceptFromFacing, updateNeighbourForOutputSignalMethods inherited from class net.minecraftforge.common.capabilities.CapabilityProvider
areCapsCompatible, areCapsCompatible, deserializeCaps, gatherCapabilities, gatherCapabilities, gatherCapabilities, getCapabilities, serializeCapsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.world.level.BlockAndTintGetter
canSeeSkyMethods inherited from interface net.minecraft.world.level.BlockGetter
clip, clipWithInteractionOverride, getBlockFloorHeight, getBlockFloorHeight, getBlockStates, getLightEmission, getMaxLightLevel, isBlockInLineMethods inherited from interface net.minecraft.world.level.CollisionGetter
collidesWithSuffocatingBlock, findFreePosition, findSupportingBlock, getBlockCollisions, getCollisions, getEntityCollisions, isUnobstructed, isUnobstructed, isUnobstructed, noCollision, noCollision, noCollisionMethods inherited from interface net.minecraft.world.level.CommonLevelAccessor
getBlockEntity, getEntityCollisions, getHeightmapPos, isUnobstructedMethods inherited from interface net.minecraft.world.level.EntityGetter
getEntities, getEntitiesOfClass, getEntitiesOfClass, getNearbyEntities, getNearbyPlayers, getNearestEntity, getNearestEntity, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getNearestPlayer, getPlayerByUUID, hasNearbyAlivePlayerMethods inherited from interface net.minecraftforge.common.capabilities.ICapabilityProvider
getCapabilityMethods inherited from interface net.minecraftforge.client.extensions.IForgeBlockAndTintGetter
getShadeMethods inherited from interface net.minecraftforge.common.extensions.IForgeBlockGetter
getModelDataManagerMethods inherited from interface net.minecraftforge.common.extensions.IForgeLevel
getPartEntitiesMethods inherited from interface net.minecraft.world.level.LevelAccessor
blockUpdated, dayTime, gameEvent, gameEvent, gameEvent, getDifficulty, levelEvent, playSound, scheduleTick, scheduleTick, scheduleTick, scheduleTickMethods inherited from interface net.minecraft.world.level.LevelHeightAccessor
getMaxBuildHeight, getMaxSection, getMinSection, getSectionIndex, getSectionIndexFromSectionY, getSectionsCount, getSectionYFromSectionIndex, isOutsideBuildHeight, isOutsideBuildHeightMethods inherited from interface net.minecraft.world.level.LevelReader
canSeeSkyFromBelowWater, containsAnyLiquid, getBlockStatesIfLoaded, getBlockTint, getChunk, getChunk, getLightLevelDependentMagicValue, getMaxLocalRawBrightness, getMaxLocalRawBrightness, getPathfindingCostFromLightLevels, hasChunkAt, hasChunkAt, hasChunksAt, hasChunksAt, hasChunksAt, holderLookup, isAreaLoaded, isEmptyBlock, isWaterAtMethods inherited from interface net.minecraft.world.level.LevelTimeAccess
getMoonBrightness, getMoonPhase, getTimeOfDayMethods inherited from interface net.minecraft.world.level.LevelWriter
addFreshEntity, destroyBlock, destroyBlockMethods inherited from interface net.minecraft.world.level.SignalGetter
getBestNeighborSignal, getControlInputSignal, getDirectSignal, getDirectSignalTo, getSignal, hasNeighborSignal, hasSignal
-
Field Details
-
levelSource
-
lightProvider
-
realLevel
protected net.minecraft.world.level.Level realLevel -
scoreboard
protected final net.minecraft.world.scores.Scoreboard scoreboard -
overrideBeLevel
protected final boolean overrideBeLevel -
chunkSource
-
lightEngine
-
levelEntityGetter
-
blockEntities
protected Map<net.minecraft.core.BlockPos,net.minecraft.world.level.block.entity.BlockEntity> blockEntities -
worldPos
protected net.minecraft.core.BlockPos worldPosCurrent rendering worldPos so we can use client level real info
-
-
Constructor Details
-
FakeLevel
public FakeLevel(IFakeLevelBlockGetter levelSource, IFakeLevelLightProvider lightProvider, @Nullable @Nullable net.minecraft.world.scores.Scoreboard scoreboard, boolean overrideBeLevel) - Parameters:
levelSource- data source, also try to set block entities/entities collectionslightProvider- light sourcescoreboard- if null client level is used insteadoverrideBeLevel- if true all block entities will have set level to this instance- See Also:
-
-
Method Details
-
clientLevel
protected static net.minecraft.client.multiplayer.ClientLevel clientLevel() -
setRealLevel
public void setRealLevel(net.minecraft.world.level.Level realLevel) -
realLevel
public net.minecraft.world.level.Level realLevel() -
setLevelSource
- Parameters:
levelSource- new data source
-
getLevelSource
- Returns:
- current data source
-
setWorldPos
public void setWorldPos(net.minecraft.core.BlockPos worldPos) - Parameters:
worldPos- where is fake level anchor when querying current client level data
-
getWorldPos
public net.minecraft.core.BlockPos getWorldPos()- Returns:
- anchor in vanilla client level
-
setBlockEntities
public void setBlockEntities(Map<net.minecraft.core.BlockPos, net.minecraft.world.level.block.entity.BlockEntity> blockEntities) For better block entity handling in chunk methods. If set thenlevelSource.getBlockEntity(BlockPos)is not used. Reset with empty collection- Parameters:
blockEntities- all block entities, should be data equivalent to levelSource
-
setEntities
- Parameters:
entities- all entities, their level should be this fake level instance. Reset with empty collection
-
dimension
public net.minecraft.resources.ResourceKey<net.minecraft.world.level.Level> dimension()- Overrides:
dimensionin classnet.minecraft.world.level.Level
-
registryAccess
public net.minecraft.core.RegistryAccess registryAccess()- Specified by:
registryAccessin interfacenet.minecraft.world.level.LevelReader- Overrides:
registryAccessin classnet.minecraft.world.level.Level
-
damageSources
public net.minecraft.world.damagesource.DamageSources damageSources()- Overrides:
damageSourcesin classnet.minecraft.world.level.Level
-
getProfiler
public net.minecraft.util.profiling.ProfilerFiller getProfiler()- Overrides:
getProfilerin classnet.minecraft.world.level.Level
-
getProfilerSupplier
- Overrides:
getProfilerSupplierin classnet.minecraft.world.level.Level
-
dimensionType
public net.minecraft.world.level.dimension.DimensionType dimensionType()- Specified by:
dimensionTypein interfacenet.minecraft.world.level.LevelReader- Overrides:
dimensionTypein classnet.minecraft.world.level.Level
-
dimensionTypeRegistration
public net.minecraft.core.Holder<net.minecraft.world.level.dimension.DimensionType> dimensionTypeRegistration()- Overrides:
dimensionTypeRegistrationin classnet.minecraft.world.level.Level
-
getWorldBorder
public net.minecraft.world.level.border.WorldBorder getWorldBorder()- Specified by:
getWorldBorderin interfacenet.minecraft.world.level.CollisionGetter- Overrides:
getWorldBorderin classnet.minecraft.world.level.Level
-
getBlockEntity
@Nullable public @Nullable net.minecraft.world.level.block.entity.BlockEntity getBlockEntity(net.minecraft.core.BlockPos pos) - Specified by:
getBlockEntityin interfacenet.minecraft.world.level.BlockGetter- Overrides:
getBlockEntityin classnet.minecraft.world.level.Level
-
getExistingBlockEntity
@Nullable public @Nullable net.minecraft.world.level.block.entity.BlockEntity getExistingBlockEntity(net.minecraft.core.BlockPos pos) -
getBlockState
public net.minecraft.world.level.block.state.BlockState getBlockState(net.minecraft.core.BlockPos pos) - Specified by:
getBlockStatein interfacenet.minecraft.world.level.BlockGetter- Overrides:
getBlockStatein classnet.minecraft.world.level.Level
-
getChunk
public net.minecraft.world.level.chunk.ChunkAccess getChunk(int x, int z, net.minecraft.world.level.chunk.ChunkStatus requiredStatus, boolean nonnull) - Specified by:
getChunkin interfacenet.minecraft.world.level.LevelReader- Overrides:
getChunkin classnet.minecraft.world.level.Level
-
hasChunk
public boolean hasChunk(int chunkX, int chunkZ) -
getBrightness
public int getBrightness(net.minecraft.world.level.LightLayer lightType, net.minecraft.core.BlockPos pos) -
getRawBrightness
public int getRawBrightness(net.minecraft.core.BlockPos pos, int amount) -
getSkyDarken
public int getSkyDarken()- Specified by:
getSkyDarkenin interfacenet.minecraft.world.level.LevelReader- Overrides:
getSkyDarkenin classnet.minecraft.world.level.Level
-
isDay
public boolean isDay()- Overrides:
isDayin classnet.minecraft.world.level.Level
-
getScoreboard
public net.minecraft.world.scores.Scoreboard getScoreboard()- Specified by:
getScoreboardin classnet.minecraft.world.level.Level
-
getFluidState
public net.minecraft.world.level.material.FluidState getFluidState(net.minecraft.core.BlockPos pos) - Specified by:
getFluidStatein interfacenet.minecraft.world.level.BlockGetter- Overrides:
getFluidStatein classnet.minecraft.world.level.Level
-
getHeight
public int getHeight() -
getMinBuildHeight
public int getMinBuildHeight() -
isInWorldBounds
public boolean isInWorldBounds(net.minecraft.core.BlockPos pos) - Overrides:
isInWorldBoundsin classnet.minecraft.world.level.Level
-
fillReportDetails
public net.minecraft.CrashReportCategory fillReportDetails(net.minecraft.CrashReport report) - Overrides:
fillReportDetailsin classnet.minecraft.world.level.Level
-
getEntities
protected net.minecraft.world.level.entity.LevelEntityGetter<net.minecraft.world.entity.Entity> getEntities()- Specified by:
getEntitiesin classnet.minecraft.world.level.Level
-
getEntity
@Nullable public net.minecraft.world.entity.Entity getEntity(int id) - Specified by:
getEntityin classnet.minecraft.world.level.Level
-
players
-
getHeight
public int getHeight(net.minecraft.world.level.levelgen.Heightmap.Types heightmapType, int x, int z) - Specified by:
getHeightin interfacenet.minecraft.world.level.LevelReader- Overrides:
getHeightin classnet.minecraft.world.level.Level
-
getChunkSource
public net.minecraft.world.level.chunk.ChunkSource getChunkSource() -
getLightEngine
public net.minecraft.world.level.lighting.LevelLightEngine getLightEngine()- Specified by:
getLightEnginein interfacenet.minecraft.world.level.BlockAndTintGetter- Overrides:
getLightEnginein classnet.minecraft.world.level.Level
-
gatherChunkSourceStats
- Specified by:
gatherChunkSourceStatsin classnet.minecraft.world.level.Level
-
getShade
public float getShade(net.minecraft.core.Direction p_104703_, boolean p_104704_) -
getBiome
public net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> getBiome(net.minecraft.core.BlockPos pos) -
getBiomeManager
public net.minecraft.world.level.biome.BiomeManager getBiomeManager()- Specified by:
getBiomeManagerin interfacenet.minecraft.world.level.LevelReader- Overrides:
getBiomeManagerin classnet.minecraft.world.level.Level
-
getRecipeManager
public net.minecraft.world.item.crafting.RecipeManager getRecipeManager()- Specified by:
getRecipeManagerin classnet.minecraft.world.level.Level
-
enabledFeatures
public net.minecraft.world.flag.FeatureFlagSet enabledFeatures() -
getUncachedNoiseBiome
public net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> getUncachedNoiseBiome(int x, int y, int z) -
getNoiseBiome
public net.minecraft.core.Holder<net.minecraft.world.level.biome.Biome> getNoiseBiome(int x, int y, int z) -
explode
public net.minecraft.world.level.Explosion explode(@Nullable net.minecraft.world.entity.Entity p_256233_, @Nullable net.minecraft.world.damagesource.DamageSource p_255861_, @Nullable net.minecraft.world.level.ExplosionDamageCalculator p_255867_, double p_256447_, double p_255732_, double p_255717_, float p_256013_, boolean p_256228_, net.minecraft.world.level.Level.ExplosionInteraction p_255784_, boolean p_256377_) - Overrides:
explodein classnet.minecraft.world.level.Level
-
isLoaded
public boolean isLoaded(net.minecraft.core.BlockPos pos) - Overrides:
isLoadedin classnet.minecraft.world.level.Level
-
getRainLevel
public float getRainLevel(float delta) - Overrides:
getRainLevelin classnet.minecraft.world.level.Level
-
getThunderLevel
public float getThunderLevel(float delta) - Overrides:
getThunderLevelin classnet.minecraft.world.level.Level
-
isRainingAt
public boolean isRainingAt(net.minecraft.core.BlockPos position) - Overrides:
isRainingAtin classnet.minecraft.world.level.Level
-
noSave
public boolean noSave()- Overrides:
noSavein classnet.minecraft.world.level.Level
-
getSeaLevel
public int getSeaLevel()- Specified by:
getSeaLevelin interfacenet.minecraft.world.level.LevelReader- Overrides:
getSeaLevelin classnet.minecraft.world.level.Level
-
destroyBlockProgress
public void destroyBlockProgress(int p_46506_, net.minecraft.core.BlockPos p_46507_, int p_46508_) - Specified by:
destroyBlockProgressin classnet.minecraft.world.level.Level
-
getFreeMapId
public int getFreeMapId()- Specified by:
getFreeMapIdin classnet.minecraft.world.level.Level
-
getMapData
@Nullable public net.minecraft.world.level.saveddata.maps.MapItemSavedData getMapData(String p_46650_) - Specified by:
getMapDatain classnet.minecraft.world.level.Level
-
playSeededSound
public void playSeededSound(@Nullable net.minecraft.world.entity.player.Player p_220372_, net.minecraft.world.entity.Entity p_220373_, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> p_263500_, net.minecraft.sounds.SoundSource p_220375_, float p_220376_, float p_220377_, long p_220378_) - Specified by:
playSeededSoundin classnet.minecraft.world.level.Level
-
playSeededSound
public void playSeededSound(@Nullable net.minecraft.world.entity.player.Player p_262953_, double p_263004_, double p_263398_, double p_263376_, net.minecraft.core.Holder<net.minecraft.sounds.SoundEvent> p_263359_, net.minecraft.sounds.SoundSource p_263020_, float p_263055_, float p_262914_, long p_262991_) - Specified by:
playSeededSoundin classnet.minecraft.world.level.Level
-
sendBlockUpdated
public void sendBlockUpdated(net.minecraft.core.BlockPos p_46612_, net.minecraft.world.level.block.state.BlockState p_46613_, net.minecraft.world.level.block.state.BlockState p_46614_, int p_46615_) - Specified by:
sendBlockUpdatedin classnet.minecraft.world.level.Level
-
setMapData
public void setMapData(String p_151533_, net.minecraft.world.level.saveddata.maps.MapItemSavedData p_151534_) - Specified by:
setMapDatain classnet.minecraft.world.level.Level
-
gameEvent
public void gameEvent(net.minecraft.world.level.gameevent.GameEvent p_220404_, net.minecraft.world.phys.Vec3 p_220405_, net.minecraft.world.level.gameevent.GameEvent.Context p_220406_) -
getBlockTicks
public net.minecraft.world.ticks.LevelTickAccess<net.minecraft.world.level.block.Block> getBlockTicks() -
getFluidTicks
public net.minecraft.world.ticks.LevelTickAccess<net.minecraft.world.level.material.Fluid> getFluidTicks() -
levelEvent
public void levelEvent(@Nullable net.minecraft.world.entity.player.Player p_46771_, int p_46772_, net.minecraft.core.BlockPos p_46773_, int p_46774_) -
addBlockEntityTicker
public void addBlockEntityTicker(net.minecraft.world.level.block.entity.TickingBlockEntity p_151526_) - Overrides:
addBlockEntityTickerin classnet.minecraft.world.level.Level
-
addFreshBlockEntities
public void addFreshBlockEntities(Collection<net.minecraft.world.level.block.entity.BlockEntity> beList) - Overrides:
addFreshBlockEntitiesin classnet.minecraft.world.level.Level
-
blockEvent
public void blockEvent(net.minecraft.core.BlockPos p_46582_, net.minecraft.world.level.block.Block p_46583_, int p_46584_, int p_46585_) - Overrides:
blockEventin classnet.minecraft.world.level.Level
-
close
- Specified by:
closein interfaceAutoCloseable- Overrides:
closein classnet.minecraft.world.level.Level- Throws:
IOException
-
destroyBlock
public boolean destroyBlock(net.minecraft.core.BlockPos p_46626_, boolean p_46627_, @Nullable net.minecraft.world.entity.Entity p_46628_, int p_46629_) - Specified by:
destroyBlockin interfacenet.minecraft.world.level.LevelWriter- Overrides:
destroyBlockin classnet.minecraft.world.level.Level
-
markAndNotifyBlock
public void markAndNotifyBlock(net.minecraft.core.BlockPos p_46605_, @Nullable net.minecraft.world.level.chunk.LevelChunk levelchunk, net.minecraft.world.level.block.state.BlockState blockstate, net.minecraft.world.level.block.state.BlockState p_46606_, int p_46607_, int p_46608_) - Overrides:
markAndNotifyBlockin classnet.minecraft.world.level.Level
-
mayInteract
public boolean mayInteract(net.minecraft.world.entity.player.Player p_46557_, net.minecraft.core.BlockPos p_46558_) - Overrides:
mayInteractin classnet.minecraft.world.level.Level
-
neighborShapeChanged
public void neighborShapeChanged(net.minecraft.core.Direction p_220385_, net.minecraft.world.level.block.state.BlockState p_220386_, net.minecraft.core.BlockPos p_220387_, net.minecraft.core.BlockPos p_220388_, int p_220389_, int p_220390_) - Specified by:
neighborShapeChangedin interfacenet.minecraft.world.level.LevelAccessor- Overrides:
neighborShapeChangedin classnet.minecraft.world.level.Level
-
removeBlock
public boolean removeBlock(net.minecraft.core.BlockPos p_46623_, boolean p_46624_) - Specified by:
removeBlockin interfacenet.minecraft.world.level.LevelWriter- Overrides:
removeBlockin classnet.minecraft.world.level.Level
-
setBlock
public boolean setBlock(net.minecraft.core.BlockPos p_46605_, net.minecraft.world.level.block.state.BlockState p_46606_, int p_46607_, int p_46608_) - Specified by:
setBlockin interfacenet.minecraft.world.level.LevelWriter- Overrides:
setBlockin classnet.minecraft.world.level.Level
-
setRainLevel
public void setRainLevel(float p_46735_) - Overrides:
setRainLevelin classnet.minecraft.world.level.Level
-
setSpawnSettings
public void setSpawnSettings(boolean p_46704_, boolean p_46705_) - Overrides:
setSpawnSettingsin classnet.minecraft.world.level.Level
-
setThunderLevel
public void setThunderLevel(float p_46708_) - Overrides:
setThunderLevelin classnet.minecraft.world.level.Level
-
shouldTickBlocksAt
public boolean shouldTickBlocksAt(long p_186456_) - Overrides:
shouldTickBlocksAtin classnet.minecraft.world.level.Level
-
shouldTickDeath
public boolean shouldTickDeath(net.minecraft.world.entity.Entity p_186458_) - Overrides:
shouldTickDeathin classnet.minecraft.world.level.Level
-
tickBlockEntities
protected void tickBlockEntities()- Overrides:
tickBlockEntitiesin classnet.minecraft.world.level.Level
-
updateNeighborsAt
public void updateNeighborsAt(net.minecraft.core.BlockPos p_46673_, net.minecraft.world.level.block.Block p_46674_) - Overrides:
updateNeighborsAtin classnet.minecraft.world.level.Level
-
updateSkyBrightness
public void updateSkyBrightness()- Overrides:
updateSkyBrightnessin classnet.minecraft.world.level.Level
-
getCapability
@NotNull public <T> @NotNull net.minecraftforge.common.util.LazyOptional<T> getCapability(@NotNull @NotNull net.minecraftforge.common.capabilities.Capability<T> cap, @Nullable @Nullable net.minecraft.core.Direction side) - Specified by:
getCapabilityin interfacenet.minecraftforge.common.capabilities.ICapabilityProvider- Overrides:
getCapabilityin classnet.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.Level>
-
invalidateCaps
public void invalidateCaps()- Specified by:
invalidateCapsin interfacenet.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.Level>- Overrides:
invalidateCapsin classnet.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.Level>
-
reviveCaps
public void reviveCaps()- Specified by:
reviveCapsin interfacenet.minecraftforge.common.capabilities.ICapabilityProviderImpl<net.minecraft.world.level.Level>- Overrides:
reviveCapsin classnet.minecraftforge.common.capabilities.CapabilityProvider<net.minecraft.world.level.Level>
-