From 54ec5946b7a3e57188b7dfe68292a05731a34e58 Mon Sep 17 00:00:00 2001 From: MrHell228 Date: Wed, 5 Jun 2024 01:18:55 +0300 Subject: [PATCH] Add BlockEntity tick methods --- .../api/block/entity/BlockEntity.java | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/main/java/org/spongepowered/api/block/entity/BlockEntity.java b/src/main/java/org/spongepowered/api/block/entity/BlockEntity.java index bc74a110b3..90ddcca7bf 100644 --- a/src/main/java/org/spongepowered/api/block/entity/BlockEntity.java +++ b/src/main/java/org/spongepowered/api/block/entity/BlockEntity.java @@ -67,6 +67,27 @@ public interface BlockEntity extends SerializableDataHolder.Mutable, Locatable { */ void remove(); + /** + * Returns whether this block entity can tick. + * + * @return True if this block entity can tick + */ + boolean canTick(); + + /** + * Returns whether this block entity is ticking. + * + * @return True if this block entity is ticking + */ + boolean isTicking(); + + /** + * Sets if this block entity will naturally tick. + * + * @param ticking The ticking state + */ + void setTicking(boolean ticking); + /** * Gets the type of {@link BlockEntity} this is. *