From 54ec5946b7a3e57188b7dfe68292a05731a34e58 Mon Sep 17 00:00:00 2001 From: MrHell228 Date: Wed, 5 Jun 2024 01:18:55 +0300 Subject: [PATCH 1/3] 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. * From 369d88811f91775f4019d85a56ef47664f9afb19 Mon Sep 17 00:00:00 2001 From: MrHell228 Date: Mon, 23 Sep 2024 19:49:37 +0300 Subject: [PATCH 2/3] Change BlockEntity#setTicking() --- .../org/spongepowered/api/block/entity/BlockEntity.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) 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 90ddcca7bf..8d2ec2f13d 100644 --- a/src/main/java/org/spongepowered/api/block/entity/BlockEntity.java +++ b/src/main/java/org/spongepowered/api/block/entity/BlockEntity.java @@ -82,11 +82,16 @@ public interface BlockEntity extends SerializableDataHolder.Mutable, Locatable { boolean isTicking(); /** - * Sets if this block entity will naturally tick. + * Attempts to set if this block entity will naturally tick. + * + *

This will return false + * if {@link #isRemoved()} returns true + * or {@link #canTick()} returns false

* * @param ticking The ticking state + * @return True if ticking state was successfully set */ - void setTicking(boolean ticking); + boolean setTicking(boolean ticking); /** * Gets the type of {@link BlockEntity} this is. From b016dd98de4da1bce9a7e09864967d1a44a133f8 Mon Sep 17 00:00:00 2001 From: Yeregorix Date: Thu, 19 Sep 2024 17:42:01 +0200 Subject: [PATCH 3/3] Update log4j javadoc url --- build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle.kts b/build.gradle.kts index 95dda334e2..75be8bd5d2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -178,7 +178,7 @@ tasks { options { (this as? StandardJavadocDocletOptions)?.apply { links( - "https://logging.apache.org/log4j/log4j-${libs.versions.log4j.get()}/log4j-api/apidocs/", + "https://logging.apache.org/log4j/2.x/javadoc/log4j-api/", "https://google.github.io/guice/api-docs/${libs.versions.guice.get()}/javadoc/", "https://configurate.aoeu.xyz/${libs.versions.configurate.get()}/apidocs/", "https://www.javadoc.io/doc/com.google.code.gson/gson/${libs.versions.gson.get()}/",