2021-06-11 14:02:28 +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/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java
|
2023-06-08 01:44:11 +02:00
|
|
|
index d223777615fb3636784b33a1f562b7c8a6dff102..a4926cdfeac99b78ca2551a8d0e6f1fab9ca985b 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
2023-06-08 01:44:11 +02:00
|
|
|
@@ -4341,5 +4341,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource {
|
2021-06-11 14:02:28 +02:00
|
|
|
public static int nextEntityId() {
|
|
|
|
return ENTITY_COUNTER.incrementAndGet();
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean isTicking() {
|
2022-10-11 14:43:10 +02:00
|
|
|
+ return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(this);
|
2021-06-11 14:02:28 +02:00
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
2023-06-08 01:44:11 +02:00
|
|
|
index 7fb674cea2953b10c26f1a2c3b3369ab7767324b..2b936e32a67c108df9a7f6b335357a25bad6d291 100644
|
2021-06-11 14:02:28 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
2023-03-14 21:25:13 +01:00
|
|
|
@@ -1343,5 +1343,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
2021-06-11 14:02:28 +02:00
|
|
|
public boolean isInLava() {
|
|
|
|
return getHandle().isInLava();
|
|
|
|
}
|
|
|
|
+
|
2022-10-11 14:43:10 +02:00
|
|
|
+ @Override
|
2021-06-11 14:02:28 +02:00
|
|
|
+ public boolean isTicking() {
|
|
|
|
+ return getHandle().isTicking();
|
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
}
|