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
|
2024-12-03 22:06:05 +01:00
|
|
|
index 56e4a5316e873c0a6fc3495bbfba6dc503cc9c9c..7609a58979388cb62be7ae94a51cc14774464214 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
|
2024-12-03 19:21:12 +01:00
|
|
|
@@ -4765,5 +4765,9 @@ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess
|
2021-06-11 14:02:28 +02:00
|
|
|
public static int nextEntityId() {
|
|
|
|
return ENTITY_COUNTER.incrementAndGet();
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public boolean isTicking() {
|
2024-11-09 15:41:26 +01:00
|
|
|
+ return ((net.minecraft.server.level.ServerLevel) this.level).isPositionEntityTicking(this.blockPosition());
|
2021-06-11 14:02:28 +02:00
|
|
|
+ }
|
2024-01-20 12:50:16 +01:00
|
|
|
// Paper end - Expose entity id counter
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
2024-11-09 21:17:42 +01:00
|
|
|
index 609c768ba4d22e346acbc9422ce41e3b887fadb1..dbb1a52b1e5871bbb1ccbd300b8edb9aa0f56e49 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
|
2024-11-09 21:17:42 +01:00
|
|
|
@@ -1058,4 +1058,11 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
2021-06-11 14:02:28 +02:00
|
|
|
return getHandle().isInLava();
|
|
|
|
}
|
2024-04-06 22:38:37 +02:00
|
|
|
// Paper end - entity liquid API
|
2021-06-11 14:02:28 +02:00
|
|
|
+
|
2024-04-06 22:38:37 +02:00
|
|
|
+ // Paper start - isTicking API
|
2022-10-11 14:43:10 +02:00
|
|
|
+ @Override
|
2021-06-11 14:02:28 +02:00
|
|
|
+ public boolean isTicking() {
|
|
|
|
+ return getHandle().isTicking();
|
|
|
|
+ }
|
2024-04-06 22:38:37 +02:00
|
|
|
+ // Paper end - isTicking API
|
2021-06-11 14:02:28 +02:00
|
|
|
}
|