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
|
|
|
|
index ebdbbeb1b55b428dde3ab1c9691cb153c6c2fe76..28e2d3f0a5e2ab084175bf0bba88816f80089799 100644
|
|
|
|
--- a/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/Entity.java
|
|
|
|
@@ -3379,5 +3379,9 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
|
|
|
|
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-10-17 12:39:45 +02:00
|
|
|
index c08fe368409137c33501aaca369e99a0924f0339..0f419d3e0621c71d43f85aa852bc3fc5405f1cf6 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-10-17 12:39:45 +02:00
|
|
|
@@ -1131,5 +1131,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
|
|
|
|
}
|