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
|
2021-02-16 18:08:29 +01:00
|
|
|
index fcb5cf78d1deff3c2593c7470f5501be8fed567b..22f3721ac351acb11ba8475cc7e2d35dc2e78259 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
|
2021-01-11 02:44:06 +01:00
|
|
|
@@ -3387,5 +3387,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-12-21 08:56:22 +01:00
|
|
|
index 582ed13a9ba1748444ce4d624d83a4d7be7006f2..475dc1aa2cba77c13033938e719a66707f358914 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-12-21 08:56:22 +01:00
|
|
|
@@ -1144,5 +1144,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
|
|
|
|
}
|