Class World

    • Field Detail

      • LOGGER

        protected static final org.apache.logging.log4j.Logger LOGGER
      • RESOURCE_KEY_CODEC

        public static final com.mojang.serialization.Codec<RegistryKey<World>> RESOURCE_KEY_CODEC
      • DIRECTIONS

        private static final Direction[] DIRECTIONS
      • blockEntityList

        public final java.util.List<TileEntity> blockEntityList
      • tickableBlockEntities

        public final java.util.List<TileEntity> tickableBlockEntities
      • pendingBlockEntities

        protected final java.util.List<TileEntity> pendingBlockEntities
      • blockEntitiesToUnload

        protected final java.util.Set<TileEntity> blockEntitiesToUnload
      • thread

        private final java.lang.Thread thread
      • isDebug

        private final boolean isDebug
      • skyDarken

        private int skyDarken
      • randValue

        protected int randValue
      • oRainLevel

        public float oRainLevel
      • rainLevel

        public float rainLevel
      • oThunderLevel

        public float oThunderLevel
      • thunderLevel

        public float thunderLevel
      • random

        public final java.util.Random random
      • profiler

        private final java.util.function.Supplier<IProfiler> profiler
      • isClientSide

        public final boolean isClientSide
      • updatingBlockEntities

        protected boolean updatingBlockEntities
      • restoringBlockSnapshots

        public boolean restoringBlockSnapshots
      • captureBlockSnapshots

        public boolean captureBlockSnapshots
      • capturedBlockSnapshots

        public java.util.ArrayList<BlockSnapshot> capturedBlockSnapshots
      • maxEntityRadius

        private double maxEntityRadius
    • Method Detail

      • isInWorldBounds

        public static boolean isInWorldBounds​(BlockPos p_175701_0_)
      • isInSpawnableBounds

        public static boolean isInSpawnableBounds​(BlockPos p_234935_0_)
      • isInWorldBoundsHorizontal

        private static boolean isInWorldBoundsHorizontal​(BlockPos p_234934_0_)
      • isOutsideSpawnableHeight

        private static boolean isOutsideSpawnableHeight​(int p_234933_0_)
      • isOutsideBuildHeight

        public static boolean isOutsideBuildHeight​(BlockPos p_189509_0_)
      • isOutsideBuildHeight

        public static boolean isOutsideBuildHeight​(int p_217405_0_)
      • markAndNotifyBlock

        public void markAndNotifyBlock​(BlockPos p_241211_1_,
                                       @Nullable
                                       Chunk chunk,
                                       BlockState blockstate,
                                       BlockState p_241211_2_,
                                       int p_241211_3_,
                                       int p_241211_4_)
      • destroyBlock

        public boolean destroyBlock​(BlockPos p_241212_1_,
                                    boolean p_241212_2_,
                                    @Nullable
                                    Entity p_241212_3_,
                                    int p_241212_4_)
        Specified by:
        destroyBlock in interface IWorldWriter
      • setBlockAndUpdate

        public boolean setBlockAndUpdate​(BlockPos p_175656_1_,
                                         BlockState p_175656_2_)
      • sendBlockUpdated

        public abstract void sendBlockUpdated​(BlockPos p_184138_1_,
                                              BlockState p_184138_2_,
                                              BlockState p_184138_3_,
                                              int p_184138_4_)
      • updateNeighborsAt

        public void updateNeighborsAt​(BlockPos p_195593_1_,
                                      Block p_195593_2_)
      • updateNeighborsAtExceptFromFacing

        public void updateNeighborsAtExceptFromFacing​(BlockPos p_175695_1_,
                                                      Block p_175695_2_,
                                                      Direction p_175695_3_)
      • neighborChanged

        public void neighborChanged​(BlockPos p_190524_1_,
                                    Block p_190524_2_,
                                    BlockPos p_190524_3_)
      • isDay

        public boolean isDay()
      • isNight

        public boolean isNight()
      • playSound

        public abstract void playSound​(@Nullable
                                       PlayerEntity p_184148_1_,
                                       double p_184148_2_,
                                       double p_184148_4_,
                                       double p_184148_6_,
                                       SoundEvent p_184148_8_,
                                       SoundCategory p_184148_9_,
                                       float p_184148_10_,
                                       float p_184148_11_)
      • playLocalSound

        public void playLocalSound​(double p_184134_1_,
                                   double p_184134_3_,
                                   double p_184134_5_,
                                   SoundEvent p_184134_7_,
                                   SoundCategory p_184134_8_,
                                   float p_184134_9_,
                                   float p_184134_10_,
                                   boolean p_184134_11_)
      • addParticle

        public void addParticle​(IParticleData p_195594_1_,
                                double p_195594_2_,
                                double p_195594_4_,
                                double p_195594_6_,
                                double p_195594_8_,
                                double p_195594_10_,
                                double p_195594_12_)
        Specified by:
        addParticle in interface IWorld
      • addParticle

        public void addParticle​(IParticleData p_195590_1_,
                                boolean p_195590_2_,
                                double p_195590_3_,
                                double p_195590_5_,
                                double p_195590_7_,
                                double p_195590_9_,
                                double p_195590_11_,
                                double p_195590_13_)
      • addAlwaysVisibleParticle

        public void addAlwaysVisibleParticle​(IParticleData p_195589_1_,
                                             double p_195589_2_,
                                             double p_195589_4_,
                                             double p_195589_6_,
                                             double p_195589_8_,
                                             double p_195589_10_,
                                             double p_195589_12_)
      • addAlwaysVisibleParticle

        public void addAlwaysVisibleParticle​(IParticleData p_217404_1_,
                                             boolean p_217404_2_,
                                             double p_217404_3_,
                                             double p_217404_5_,
                                             double p_217404_7_,
                                             double p_217404_9_,
                                             double p_217404_11_,
                                             double p_217404_13_)
      • getSunAngle

        public float getSunAngle​(float p_72929_1_)
      • addBlockEntity

        public boolean addBlockEntity​(TileEntity p_175700_1_)
      • addAllPendingBlockEntities

        public void addAllPendingBlockEntities​(java.util.Collection<TileEntity> p_147448_1_)
      • tickBlockEntities

        public void tickBlockEntities()
      • guardEntityTick

        public void guardEntityTick​(java.util.function.Consumer<Entity> p_217390_1_,
                                    Entity p_217390_2_)
      • explode

        public Explosion explode​(@Nullable
                                 Entity p_217385_1_,
                                 double p_217385_2_,
                                 double p_217385_4_,
                                 double p_217385_6_,
                                 float p_217385_8_,
                                 Explosion.Mode p_217385_9_)
      • explode

        public Explosion explode​(@Nullable
                                 Entity p_217398_1_,
                                 double p_217398_2_,
                                 double p_217398_4_,
                                 double p_217398_6_,
                                 float p_217398_8_,
                                 boolean p_217398_9_,
                                 Explosion.Mode p_217398_10_)
      • explode

        public Explosion explode​(@Nullable
                                 Entity p_230546_1_,
                                 @Nullable
                                 DamageSource p_230546_2_,
                                 @Nullable
                                 ExplosionContext p_230546_3_,
                                 double p_230546_4_,
                                 double p_230546_6_,
                                 double p_230546_8_,
                                 float p_230546_10_,
                                 boolean p_230546_11_,
                                 Explosion.Mode p_230546_12_)
      • gatherChunkSourceStats

        public java.lang.String gatherChunkSourceStats()
      • getPendingBlockEntityAt

        @Nullable
        private TileEntity getPendingBlockEntityAt​(BlockPos p_189508_1_)
      • setBlockEntity

        public void setBlockEntity​(BlockPos p_175690_1_,
                                   @Nullable
                                   TileEntity p_175690_2_)
      • removeBlockEntity

        public void removeBlockEntity​(BlockPos p_175713_1_)
      • isLoaded

        public boolean isLoaded​(BlockPos p_195588_1_)
      • loadedAndEntityCanStandOnFace

        public boolean loadedAndEntityCanStandOnFace​(BlockPos p_234929_1_,
                                                     Entity p_234929_2_,
                                                     Direction p_234929_3_)
      • loadedAndEntityCanStandOn

        public boolean loadedAndEntityCanStandOn​(BlockPos p_217400_1_,
                                                 Entity p_217400_2_)
      • updateSkyBrightness

        public void updateSkyBrightness()
      • setSpawnSettings

        public void setSpawnSettings​(boolean p_72891_1_,
                                     boolean p_72891_2_)
      • prepareWeather

        protected void prepareWeather()
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Throws:
        java.io.IOException
      • getEntities

        public <T extends Entity> java.util.List<T> getEntities​(@Nullable
                                                                EntityType<T> p_217394_1_,
                                                                AxisAlignedBB p_217394_2_,
                                                                java.util.function.Predicate<? super T> p_217394_3_)
      • getEntitiesOfClass

        public <T extends Entity> java.util.List<T> getEntitiesOfClass​(java.lang.Class<? extends T> p_175647_1_,
                                                                       AxisAlignedBB p_175647_2_,
                                                                       @Nullable
                                                                       java.util.function.Predicate<? super T> p_175647_3_)
        Specified by:
        getEntitiesOfClass in interface IEntityReader
      • getLoadedEntitiesOfClass

        public <T extends Entity> java.util.List<T> getLoadedEntitiesOfClass​(java.lang.Class<? extends T> p_225316_1_,
                                                                             AxisAlignedBB p_225316_2_,
                                                                             @Nullable
                                                                             java.util.function.Predicate<? super T> p_225316_3_)
        Specified by:
        getLoadedEntitiesOfClass in interface IEntityReader
      • getEntity

        @Nullable
        public abstract Entity getEntity​(int p_73045_1_)
      • blockEntityChanged

        public void blockEntityChanged​(BlockPos p_175646_1_,
                                       TileEntity p_175646_2_)
      • getDirectSignalTo

        public int getDirectSignalTo​(BlockPos p_175676_1_)
      • hasSignal

        public boolean hasSignal​(BlockPos p_175709_1_,
                                 Direction p_175709_2_)
      • hasNeighborSignal

        public boolean hasNeighborSignal​(BlockPos p_175640_1_)
      • getBestNeighborSignal

        public int getBestNeighborSignal​(BlockPos p_175687_1_)
      • disconnect

        public void disconnect()
      • getGameTime

        public long getGameTime()
      • getDayTime

        public long getDayTime()
      • broadcastEntityEvent

        public void broadcastEntityEvent​(Entity p_72960_1_,
                                         byte p_72960_2_)
      • blockEvent

        public void blockEvent​(BlockPos p_175641_1_,
                               Block p_175641_2_,
                               int p_175641_3_,
                               int p_175641_4_)
      • getGameRules

        public GameRules getGameRules()
      • getThunderLevel

        public float getThunderLevel​(float p_72819_1_)
      • setThunderLevel

        public void setThunderLevel​(float p_147442_1_)
      • getRainLevel

        public float getRainLevel​(float p_72867_1_)
      • setRainLevel

        public void setRainLevel​(float p_72894_1_)
      • isThundering

        public boolean isThundering()
      • isRaining

        public boolean isRaining()
      • isRainingAt

        public boolean isRainingAt​(BlockPos p_175727_1_)
      • isHumidAt

        public boolean isHumidAt​(BlockPos p_180502_1_)
      • getMapData

        @Nullable
        public abstract MapData getMapData​(java.lang.String p_217406_1_)
      • setMapData

        public abstract void setMapData​(MapData p_217399_1_)
      • getFreeMapId

        public abstract int getFreeMapId()
      • globalLevelEvent

        public void globalLevelEvent​(int p_175669_1_,
                                     BlockPos p_175669_2_,
                                     int p_175669_3_)
      • destroyBlockProgress

        public abstract void destroyBlockProgress​(int p_175715_1_,
                                                  BlockPos p_175715_2_,
                                                  int p_175715_3_)
      • createFireworks

        public void createFireworks​(double p_92088_1_,
                                    double p_92088_3_,
                                    double p_92088_5_,
                                    double p_92088_7_,
                                    double p_92088_9_,
                                    double p_92088_11_,
                                    @Nullable
                                    CompoundNBT p_92088_13_)
      • getScoreboard

        public abstract Scoreboard getScoreboard()
      • updateNeighbourForOutputSignal

        public void updateNeighbourForOutputSignal​(BlockPos p_175666_1_,
                                                   Block p_175666_2_)
      • setSkyFlashTime

        public void setSkyFlashTime​(int p_225605_1_)
      • sendPacketToServer

        public void sendPacketToServer​(IPacket<?> p_184135_1_)
      • getRandom

        public java.util.Random getRandom()
        Specified by:
        getRandom in interface IWorld
      • getRecipeManager

        public abstract RecipeManager getRecipeManager()
      • getBlockRandomPos

        public BlockPos getBlockRandomPos​(int p_217383_1_,
                                          int p_217383_2_,
                                          int p_217383_3_,
                                          int p_217383_4_)
      • noSave

        public boolean noSave()
      • getProfiler

        public IProfiler getProfiler()
      • getProfilerSupplier

        public java.util.function.Supplier<IProfiler> getProfilerSupplier()
      • getMaxEntityRadius

        public double getMaxEntityRadius()
        Description copied from interface: IForgeWorld
        The maximum radius to scan for entities when trying to check bounding boxes. Vanilla's default is 2.0D But mods that add larger entities may increase this.
        Specified by:
        getMaxEntityRadius in interface IForgeWorld
      • increaseMaxEntityRadius

        public double increaseMaxEntityRadius​(double value)
        Description copied from interface: IForgeWorld
        Increases the max entity radius, this is safe to call with any value. The setter will verify the input value is larger then the current setting.
        Specified by:
        increaseMaxEntityRadius in interface IForgeWorld
        Parameters:
        value - New max radius to set.
        Returns:
        The new max radius
      • isDebug

        public final boolean isDebug()