From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Sat, 3 Oct 2020 21:39:16 -0500 Subject: [PATCH] Entity#isTicking diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java index b8f49e7b8727c757950a74c834eed4871de0e4ce..a0718a0cc2ed15a5350b1ee77747d93c6a92048d 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java @@ -4438,5 +4438,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public static int nextEntityId() { return ENTITY_COUNTER.incrementAndGet(); } + + public boolean isTicking() { + return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this); + } // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java index 4002311a4f8a0b137f743a0a1ded52587719765b..702987ef563db2e0819771e8c3be822e4644ee3f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -1336,5 +1336,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { public boolean isInLava() { return getHandle().isInLava(); } + + @Override + public boolean isTicking() { + return getHandle().isTicking(); + } // Paper end }