Class ServerWorld

    • Field Detail

      • END_SPAWN_POINT

        public static final BlockPos END_SPAWN_POINT
      • LOGGER

        private static final org.apache.logging.log4j.Logger LOGGER
      • entitiesById

        private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<Entity> entitiesById
      • entitiesByUuid

        private final java.util.Map<java.util.UUID,​Entity> entitiesByUuid
      • toAddAfterTick

        private final java.util.Queue<Entity> toAddAfterTick
      • tickingEntities

        boolean tickingEntities
      • noSave

        public boolean noSave
      • allPlayersSleeping

        private boolean allPlayersSleeping
      • emptyTime

        private int emptyTime
      • portalForcer

        private final Teleporter portalForcer
      • navigations

        private final java.util.Set<PathNavigator> navigations
      • blockEvents

        private final it.unimi.dsi.fastutil.objects.ObjectLinkedOpenHashSet<BlockEventData> blockEvents
      • handlingTick

        private boolean handlingTick
      • customSpawners

        private final java.util.List<ISpecialSpawner> customSpawners
      • structureFeatureManager

        private final StructureManager structureFeatureManager
      • tickTime

        private final boolean tickTime
      • partEntities

        private final it.unimi.dsi.fastutil.ints.Int2ObjectMap<PartEntity<?>> partEntities
    • Method Detail

      • setWeatherParameters

        public void setWeatherParameters​(int p_241113_1_,
                                         int p_241113_2_,
                                         boolean p_241113_3_,
                                         boolean p_241113_4_)
      • tick

        public void tick​(java.util.function.BooleanSupplier p_72835_1_)
      • tickTime

        protected void tickTime()
      • setDayTime

        public void setDayTime​(long p_241114_1_)
      • tickCustomSpawners

        public void tickCustomSpawners​(boolean p_241123_1_,
                                       boolean p_241123_2_)
      • wakeUpAllPlayers

        private void wakeUpAllPlayers()
      • tickChunk

        public void tickChunk​(Chunk p_217441_1_,
                              int p_217441_2_)
      • findLightingTargetAround

        protected BlockPos findLightingTargetAround​(BlockPos p_175736_1_)
      • isHandlingTick

        public boolean isHandlingTick()
      • updateSleepingPlayerList

        public void updateSleepingPlayerList()
      • stopWeather

        private void stopWeather()
      • resetEmptyTime

        public void resetEmptyTime()
      • tickNonPassenger

        public void tickNonPassenger​(Entity p_217479_1_)
      • tickPassenger

        public void tickPassenger​(Entity p_217459_1_,
                                  Entity p_217459_2_)
      • updateChunkPos

        public void updateChunkPos​(Entity p_217464_1_)
      • save

        public void save​(@Nullable
                         IProgressUpdate p_217445_1_,
                         boolean p_217445_2_,
                         boolean p_217445_3_)
      • saveLevelData

        private void saveLevelData()
      • getEntities

        public java.util.List<Entity> getEntities​(@Nullable
                                                  EntityType<?> p_217482_1_,
                                                  java.util.function.Predicate<? super Entity> p_217482_2_)
      • addWithUUID

        public boolean addWithUUID​(Entity p_217470_1_)
      • addFromAnotherDimension

        public void addFromAnotherDimension​(Entity p_217460_1_)
      • addDuringCommandTeleport

        public void addDuringCommandTeleport​(ServerPlayerEntity p_217446_1_)
      • addDuringPortalTeleport

        public void addDuringPortalTeleport​(ServerPlayerEntity p_217447_1_)
      • addEntity

        private boolean addEntity​(Entity p_72838_1_)
      • loadFromChunk

        public boolean loadFromChunk​(Entity p_217440_1_)
      • isUUIDUsed

        private boolean isUUIDUsed​(Entity p_217478_1_)
      • findAddedOrPendingEntity

        @Nullable
        private Entity findAddedOrPendingEntity​(java.util.UUID p_242105_1_)
      • tryAddFreshEntityWithPassengers

        public boolean tryAddFreshEntityWithPassengers​(Entity p_242106_1_)
      • unload

        public void unload​(Chunk p_217466_1_)
      • onEntityRemoved

        @Deprecated
        public void onEntityRemoved​(Entity p_217484_1_)
        Deprecated.
      • removeEntityComplete

        public void removeEntityComplete​(Entity p_217484_1_,
                                         boolean keepData)
      • add

        private void add​(Entity p_217465_1_)
      • despawn

        public void despawn​(Entity p_217467_1_)
      • removeEntity

        public void removeEntity​(Entity p_217467_1_,
                                 boolean keepData)
      • removeFromChunk

        private void removeFromChunk​(Entity p_217454_1_)
      • removePlayerImmediately

        public void removePlayerImmediately​(ServerPlayerEntity p_217434_1_)
      • removePlayer

        public void removePlayer​(ServerPlayerEntity p_217434_1_,
                                 boolean keepData)
      • destroyBlockProgress

        public void destroyBlockProgress​(int p_175715_1_,
                                         BlockPos p_175715_2_,
                                         int p_175715_3_)
        Specified by:
        destroyBlockProgress in class World
      • playSound

        public 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_)
        Specified by:
        playSound in class World
      • globalLevelEvent

        public void globalLevelEvent​(int p_175669_1_,
                                     BlockPos p_175669_2_,
                                     int p_175669_3_)
        Overrides:
        globalLevelEvent in class World
      • levelEvent

        public void levelEvent​(@Nullable
                               PlayerEntity p_217378_1_,
                               int p_217378_2_,
                               BlockPos p_217378_3_,
                               int p_217378_4_)
        Specified by:
        levelEvent in interface IWorld
      • blockEvent

        public void blockEvent​(BlockPos p_175641_1_,
                               Block p_175641_2_,
                               int p_175641_3_,
                               int p_175641_4_)
        Overrides:
        blockEvent in class World
      • runBlockEvents

        private void runBlockEvents()
      • doBlockEvent

        private boolean doBlockEvent​(BlockEventData p_147485_1_)
      • getPortalForcer

        public Teleporter getPortalForcer()
      • sendParticles

        public <T extends IParticleData> int sendParticles​(T p_195598_1_,
                                                           double p_195598_2_,
                                                           double p_195598_4_,
                                                           double p_195598_6_,
                                                           int p_195598_8_,
                                                           double p_195598_9_,
                                                           double p_195598_11_,
                                                           double p_195598_13_,
                                                           double p_195598_15_)
      • sendParticles

        public <T extends IParticleData> boolean sendParticles​(ServerPlayerEntity p_195600_1_,
                                                               T p_195600_2_,
                                                               boolean p_195600_3_,
                                                               double p_195600_4_,
                                                               double p_195600_6_,
                                                               double p_195600_8_,
                                                               int p_195600_10_,
                                                               double p_195600_11_,
                                                               double p_195600_13_,
                                                               double p_195600_15_,
                                                               double p_195600_17_)
      • sendParticles

        private boolean sendParticles​(ServerPlayerEntity p_195601_1_,
                                      boolean p_195601_2_,
                                      double p_195601_3_,
                                      double p_195601_5_,
                                      double p_195601_7_,
                                      IPacket<?> p_195601_9_)
      • getEntity

        @Nullable
        public Entity getEntity​(int p_73045_1_)
        Specified by:
        getEntity in class World
      • getEntity

        @Nullable
        public Entity getEntity​(java.util.UUID p_217461_1_)
      • findNearestMapFeature

        @Nullable
        public BlockPos findNearestMapFeature​(Structure<?> p_241117_1_,
                                              BlockPos p_241117_2_,
                                              int p_241117_3_,
                                              boolean p_241117_4_)
      • findNearestBiome

        @Nullable
        public BlockPos findNearestBiome​(Biome p_241116_1_,
                                         BlockPos p_241116_2_,
                                         int p_241116_3_,
                                         int p_241116_4_)
      • noSave

        public boolean noSave()
        Overrides:
        noSave in class World
      • getMapData

        @Nullable
        public MapData getMapData​(java.lang.String p_217406_1_)
        Specified by:
        getMapData in class World
      • getFreeMapId

        public int getFreeMapId()
        Specified by:
        getFreeMapId in class World
      • setDefaultSpawnPos

        public void setDefaultSpawnPos​(BlockPos p_241124_1_,
                                       float p_241124_2_)
      • getSharedSpawnPos

        public BlockPos getSharedSpawnPos()
      • getSharedSpawnAngle

        public float getSharedSpawnAngle()
      • getForcedChunks

        public it.unimi.dsi.fastutil.longs.LongSet getForcedChunks()
      • setChunkForced

        public boolean setChunkForced​(int p_217458_1_,
                                      int p_217458_2_,
                                      boolean p_217458_3_)
      • isVillage

        public boolean isVillage​(BlockPos p_217483_1_)
      • isVillage

        public boolean isVillage​(SectionPos p_222887_1_)
      • isCloseToVillage

        public boolean isCloseToVillage​(BlockPos p_241119_1_,
                                        int p_241119_2_)
      • sectionsToVillage

        public int sectionsToVillage​(SectionPos p_217486_1_)
      • getRaidAt

        @Nullable
        public Raid getRaidAt​(BlockPos p_217475_1_)
      • isRaided

        public boolean isRaided​(BlockPos p_217455_1_)
      • saveDebugReport

        public void saveDebugReport​(java.nio.file.Path p_225322_1_)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • dumpEntities

        private static void dumpEntities​(java.io.Writer p_225320_0_,
                                         java.lang.Iterable<Entity> p_225320_1_)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • dumpBlockEntities

        private void dumpBlockEntities​(java.io.Writer p_225321_1_)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • getAllEntities

        public java.lang.Iterable<Entity> getAllEntities()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • isFlat

        public boolean isFlat()
      • getWatchdogStats

        public java.lang.String getWatchdogStats()
      • getTypeCount

        private static <T> java.lang.String getTypeCount​(java.util.Collection<T> p_244524_0_,
                                                         java.util.function.Function<T,​ResourceLocation> p_244524_1_)
      • makeObsidianPlatform

        public static void makeObsidianPlatform​(ServerWorld p_241121_0_)
      • initCapabilities

        protected void initCapabilities()
      • getEntities

        public java.util.stream.Stream<Entity> getEntities()
      • getPartEntities

        public java.util.Collection<PartEntity<?>> getPartEntities()
        Description copied from interface: IForgeWorld
        All part entities in this world. Used when collecting entities in an AABB to fix parts being ignored whose parent entity is in a chunk that does not intersect with the AABB.
        Specified by:
        getPartEntities in interface IForgeWorld