2020-10-04 05:05:33 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
|
|
Date: Sat, 3 Oct 2020 21:39:16 -0500
|
|
|
|
Subject: [PATCH] Entity#isTicking
|
|
|
|
|
|
|
|
|
2021-03-16 08:19:45 +01:00
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
|
|
index 646f06d5a7c67cc2bef83840bdfe3b102f1f3d5a..e45af93ddb67361a5b67a79f4bc9b66bbdb3a14b 100644
|
|
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
|
|
@@ -3472,5 +3472,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, ne
|
2020-10-04 05:05:33 +02:00
|
|
|
public static int nextEntityId() {
|
|
|
|
return entityCount.incrementAndGet();
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean isTicking() {
|
|
|
|
+ return ((ChunkProviderServer) world.getChunkProvider()).isInEntityTickingChunk(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
|
2021-03-16 08:19:45 +01:00
|
|
|
index e0ab4c96544483e43c7f5e5f5965f74a207437d5..c064c510442d615beeacf9899d9b7f0e10ce7575 100644
|
2020-10-04 05:05:33 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
2021-03-16 08:19:45 +01:00
|
|
|
@@ -1157,5 +1157,9 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
2020-10-04 05:05:33 +02:00
|
|
|
public boolean isInLava() {
|
|
|
|
return getHandle().isInLava();
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean isTicking() {
|
|
|
|
+ return getHandle().isTicking();
|
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
}
|