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
|
|
|
|
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
|
2020-11-03 03:22:15 +01:00
|
|
|
index 53fb4f04087c091f3354e74d6b94554601f2cbe0..d86b67a63b37569fc4ca69ec04305a330950b0f2 100644
|
2020-10-04 05:05:33 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
2020-11-03 03:22:15 +01:00
|
|
|
@@ -3380,5 +3380,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
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
|
2020-11-03 10:14:21 +01:00
|
|
|
index f1243b308e44d7c08e007d8ce080c2fc6248753c..4ec0e9220d2fa976dc6dfecd3eedb5b78a0ef8f4 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
|
2020-11-03 10:14:21 +01:00
|
|
|
@@ -1143,5 +1143,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
|
|
|
|
}
|