--- a/io/papermc/paper/entity/activation/ActivationRange.java
+++ b/io/papermc/paper/entity/activation/ActivationRange.java
@@ -48,33 +_,34 @@
 
     private static int checkInactiveWakeup(final Entity entity) {
         final Level world = entity.level();
+        io.papermc.paper.threadedregions.RegionizedWorldData worldData = world.getCurrentWorldData(); // Folia - threaded regions
         final SpigotWorldConfig config = world.spigotConfig;
-        final long inactiveFor = MinecraftServer.currentTick - entity.activatedTick;
+        final long inactiveFor = io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick() - entity.activatedTick; // Folia - threaded regions
         if (entity.activationType == ActivationType.VILLAGER) {
-            if (inactiveFor > config.wakeUpInactiveVillagersEvery && world.wakeupInactiveRemainingVillagers > 0) {
-                world.wakeupInactiveRemainingVillagers--;
+            if (inactiveFor > config.wakeUpInactiveVillagersEvery && worldData.wakeupInactiveRemainingVillagers > 0) { // Folia - threaded regions
+                worldData.wakeupInactiveRemainingVillagers--; // Folia - threaded regions
                 return config.wakeUpInactiveVillagersFor;
             }
         } else if (entity.activationType == ActivationType.ANIMAL) {
-            if (inactiveFor > config.wakeUpInactiveAnimalsEvery && world.wakeupInactiveRemainingAnimals > 0) {
-                world.wakeupInactiveRemainingAnimals--;
+            if (inactiveFor > config.wakeUpInactiveAnimalsEvery && worldData.wakeupInactiveRemainingAnimals > 0) { // Folia - threaded regions
+                worldData.wakeupInactiveRemainingAnimals--; // Folia - threaded regions
                 return config.wakeUpInactiveAnimalsFor;
             }
         } else if (entity.activationType == ActivationType.FLYING_MONSTER) {
-            if (inactiveFor > config.wakeUpInactiveFlyingEvery && world.wakeupInactiveRemainingFlying > 0) {
-                world.wakeupInactiveRemainingFlying--;
+            if (inactiveFor > config.wakeUpInactiveFlyingEvery && worldData.wakeupInactiveRemainingFlying > 0) { // Folia - threaded regions
+                worldData.wakeupInactiveRemainingFlying--; // Folia - threaded regions
                 return config.wakeUpInactiveFlyingFor;
             }
         } else if (entity.activationType == ActivationType.MONSTER || entity.activationType == ActivationType.RAIDER) {
-            if (inactiveFor > config.wakeUpInactiveMonstersEvery && world.wakeupInactiveRemainingMonsters > 0) {
-                world.wakeupInactiveRemainingMonsters--;
+            if (inactiveFor > config.wakeUpInactiveMonstersEvery && worldData.wakeupInactiveRemainingMonsters > 0) { // Folia - threaded regions
+                worldData.wakeupInactiveRemainingMonsters--; // Folia - threaded regions
                 return config.wakeUpInactiveMonstersFor;
             }
         }
         return -1;
     }
 
-    static AABB maxBB = new AABB(0, 0, 0, 0, 0, 0);
+    //static AABB maxBB = new AABB(0, 0, 0, 0, 0, 0); // Folia - threaded regions - replaced by local variable
 
     /**
      * These entities are excluded from Activation range checks.
@@ -122,10 +_,11 @@
         final int waterActivationRange = world.spigotConfig.waterActivationRange;
         final int flyingActivationRange = world.spigotConfig.flyingMonsterActivationRange;
         final int villagerActivationRange = world.spigotConfig.villagerActivationRange;
-        world.wakeupInactiveRemainingAnimals = Math.min(world.wakeupInactiveRemainingAnimals + 1, world.spigotConfig.wakeUpInactiveAnimals);
-        world.wakeupInactiveRemainingVillagers = Math.min(world.wakeupInactiveRemainingVillagers + 1, world.spigotConfig.wakeUpInactiveVillagers);
-        world.wakeupInactiveRemainingMonsters = Math.min(world.wakeupInactiveRemainingMonsters + 1, world.spigotConfig.wakeUpInactiveMonsters);
-        world.wakeupInactiveRemainingFlying = Math.min(world.wakeupInactiveRemainingFlying + 1, world.spigotConfig.wakeUpInactiveFlying);
+        io.papermc.paper.threadedregions.RegionizedWorldData worldData = world.getCurrentWorldData(); // Folia - threaded regions
+        worldData.wakeupInactiveRemainingAnimals = Math.min(worldData.wakeupInactiveRemainingAnimals + 1, world.spigotConfig.wakeUpInactiveAnimals); // Folia - threaded regions
+        worldData.wakeupInactiveRemainingVillagers = Math.min(worldData.wakeupInactiveRemainingVillagers + 1, world.spigotConfig.wakeUpInactiveVillagers); // Folia - threaded regions
+        worldData.wakeupInactiveRemainingMonsters = Math.min(worldData.wakeupInactiveRemainingMonsters + 1, world.spigotConfig.wakeUpInactiveMonsters); // Folia - threaded regions
+        worldData.wakeupInactiveRemainingFlying = Math.min(worldData.wakeupInactiveRemainingFlying + 1, world.spigotConfig.wakeUpInactiveFlying); // Folia - threaded regions
 
         int maxRange = Math.max(monsterActivationRange, animalActivationRange);
         maxRange = Math.max(maxRange, raiderActivationRange);
@@ -135,30 +_,37 @@
         maxRange = Math.max(maxRange, villagerActivationRange);
         maxRange = Math.min((world.spigotConfig.simulationDistance << 4) - 8, maxRange);
 
-        for (final Player player : world.players()) {
-            player.activatedTick = MinecraftServer.currentTick;
+        for (final Player player : world.getLocalPlayers()) { // Folia - region threading
+            player.activatedTick = io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick(); // Folia - region threading
             if (world.spigotConfig.ignoreSpectatorActivation && player.isSpectator()) {
                 continue;
             }
 
             final int worldHeight = world.getHeight();
-            ActivationRange.maxBB = player.getBoundingBox().inflate(maxRange, worldHeight, maxRange);
-            ActivationType.MISC.boundingBox = player.getBoundingBox().inflate(miscActivationRange, worldHeight, miscActivationRange);
-            ActivationType.RAIDER.boundingBox = player.getBoundingBox().inflate(raiderActivationRange, worldHeight, raiderActivationRange);
-            ActivationType.ANIMAL.boundingBox = player.getBoundingBox().inflate(animalActivationRange, worldHeight, animalActivationRange);
-            ActivationType.MONSTER.boundingBox = player.getBoundingBox().inflate(monsterActivationRange, worldHeight, monsterActivationRange);
-            ActivationType.WATER.boundingBox = player.getBoundingBox().inflate(waterActivationRange, worldHeight, waterActivationRange);
-            ActivationType.FLYING_MONSTER.boundingBox = player.getBoundingBox().inflate(flyingActivationRange, worldHeight, flyingActivationRange);
-            ActivationType.VILLAGER.boundingBox = player.getBoundingBox().inflate(villagerActivationRange, worldHeight, villagerActivationRange);
+            final AABB maxBB = player.getBoundingBox().inflate(maxRange, worldHeight, maxRange); // Folia - threaded regions
+            final AABB[] bbByType = new AABB[ActivationType.values().length]; // Folia - threaded regions
+            bbByType[ActivationType.MISC.ordinal()] = player.getBoundingBox().inflate(miscActivationRange, worldHeight, miscActivationRange); // Folia - threaded regions
+            bbByType[ActivationType.RAIDER.ordinal()] = player.getBoundingBox().inflate(raiderActivationRange, worldHeight, raiderActivationRange); // Folia - threaded regions
+            bbByType[ActivationType.ANIMAL.ordinal()] = player.getBoundingBox().inflate(animalActivationRange, worldHeight, animalActivationRange); // Folia - threaded regions
+            bbByType[ActivationType.MONSTER.ordinal()] = player.getBoundingBox().inflate(monsterActivationRange, worldHeight, monsterActivationRange); // Folia - threaded regions
+            bbByType[ActivationType.WATER.ordinal()] = player.getBoundingBox().inflate(waterActivationRange, worldHeight, waterActivationRange); // Folia - threaded regions
+            bbByType[ActivationType.FLYING_MONSTER.ordinal()] = player.getBoundingBox().inflate(flyingActivationRange, worldHeight, flyingActivationRange); // Folia - threaded regions
+            bbByType[ActivationType.VILLAGER.ordinal()] = player.getBoundingBox().inflate(villagerActivationRange, worldHeight, villagerActivationRange); // Folia - threaded regions
 
-            final java.util.List<Entity> entities = world.getEntities((Entity) null, ActivationRange.maxBB, e -> true);
+            final java.util.List<Entity> entities = new java.util.ArrayList<>();  // Folia - region ticking - bypass getEntities thread check, we perform a check on the entities later
+            ((net.minecraft.server.level.ServerLevel)world).moonrise$getEntityLookup().getEntities((Entity)null, maxBB, entities, null); // Folia - region ticking - bypass getEntities thread check, we perform a check on the entities later
             final boolean tickMarkers = world.paperConfig().entities.markers.tick;
             for (final Entity entity : entities) {
+                // Folia start - region ticking
+                if (!ca.spottedleaf.moonrise.common.util.TickThread.isTickThreadFor(entity)) {
+                    continue;
+                }
+                // Folia end - region ticking
                 if (!tickMarkers && entity instanceof net.minecraft.world.entity.Marker) {
                     continue;
                 }
 
-                ActivationRange.activateEntity(entity);
+                ActivationRange.activateEntity(entity, bbByType); // Folia - threaded regions
             }
         }
     }
@@ -168,14 +_,14 @@
      *
      * @param entity
      */
-    private static void activateEntity(final Entity entity) {
-        if (MinecraftServer.currentTick > entity.activatedTick) {
+    private static void activateEntity(final Entity entity, final AABB[] bbByType) { // Folia - threaded regions
+        if (io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick() > entity.activatedTick) { // Folia - threaded regions
             if (entity.defaultActivationState) {
-                entity.activatedTick = MinecraftServer.currentTick;
+                entity.activatedTick = io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick(); // Folia - threaded regions
                 return;
             }
-            if (entity.activationType.boundingBox.intersects(entity.getBoundingBox())) {
-                entity.activatedTick = MinecraftServer.currentTick;
+            if (bbByType[entity.activationType.ordinal()].intersects(entity.getBoundingBox())) { // Folia - threaded regions
+                entity.activatedTick = io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick(); // Folia - threaded regions
             }
         }
     }
@@ -189,6 +_,7 @@
      */
     public static int checkEntityImmunities(final Entity entity) { // return # of ticks to get immunity
         final SpigotWorldConfig config = entity.level().spigotConfig;
+        io.papermc.paper.threadedregions.RegionizedWorldData worldData = entity.level().getCurrentWorldData(); // Folia - threaded regions
         final int inactiveWakeUpImmunity = checkInactiveWakeup(entity);
         if (inactiveWakeUpImmunity > -1) {
             return inactiveWakeUpImmunity;
@@ -196,10 +_,10 @@
         if (entity.getRemainingFireTicks() > 0) {
             return 2;
         }
-        if (entity.activatedImmunityTick >= MinecraftServer.currentTick) {
+        if (entity.activatedImmunityTick >= io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick()) { // Folia - threaded regions
             return 1;
         }
-        final long inactiveFor = MinecraftServer.currentTick - entity.activatedTick;
+        final long inactiveFor = io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick() - entity.activatedTick; // Folia - threaded regions
         if ((entity.activationType != ActivationType.WATER && entity.isInWater() && entity.isPushedByFluid())) {
             return 100;
         }
@@ -296,16 +_,16 @@
             return true;
         }
 
-        boolean isActive = entity.activatedTick >= MinecraftServer.currentTick;
+        boolean isActive = entity.activatedTick >= io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick(); // Folia - threaded regions
         entity.isTemporarilyActive = false;
 
         // Should this entity tick?
         if (!isActive) {
-            if ((MinecraftServer.currentTick - entity.activatedTick - 1) % 20 == 0) {
+            if ((io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick() - entity.activatedTick - 1) % 20 == 0) { // Folia - threaded regions
                 // Check immunities every 20 ticks.
                 final int immunity = checkEntityImmunities(entity);
                 if (immunity >= 0) {
-                    entity.activatedTick = MinecraftServer.currentTick + immunity;
+                    entity.activatedTick = io.papermc.paper.threadedregions.RegionizedServer.getCurrentTick() + immunity; // Folia - threaded regions
                 } else {
                     entity.isTemporarilyActive = true;
                 }
