mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-01 08:20:51 +01:00
1e7dd72f15
The game uses 0.95d now
36 lines
1.5 KiB
Diff
36 lines
1.5 KiB
Diff
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
|
|
index e3275f09f48c9e69179fd17901d4294ddb68a435..46637e6913e5f2aae0be6aa67b95f1fe604b021e 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/Entity.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/Entity.java
|
|
@@ -4498,5 +4498,9 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource, S
|
|
public static int nextEntityId() {
|
|
return ENTITY_COUNTER.incrementAndGet();
|
|
}
|
|
+
|
|
+ public boolean isTicking() {
|
|
+ return ((net.minecraft.server.level.ServerChunkCache) level.getChunkSource()).isPositionTicking(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
|
|
index fdf22cb358040738a1b7fabf1cef47a5d33af832..58b591d047e88c00ea09b33ece9f16fde98d3208 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
|
|
@@ -1058,5 +1058,10 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
|
|
public boolean isInLava() {
|
|
return getHandle().isInLava();
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public boolean isTicking() {
|
|
+ return getHandle().isTicking();
|
|
+ }
|
|
// Paper end
|
|
}
|