Skip to content

Commit 41c571c

Browse files
committed
chore: merge block entity tick methods
Merges #2517 Signed-off-by: Gabriel Harris-Rouquette <[email protected]>
2 parents fcfb921 + b016dd9 commit 41c571c

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ tasks {
178178
options {
179179
(this as? StandardJavadocDocletOptions)?.apply {
180180
links(
181-
"https://logging.apache.org/log4j/log4j-${libs.versions.log4j.get()}/log4j-api/apidocs/",
181+
"https://logging.apache.org/log4j/2.x/javadoc/log4j-api/",
182182
"https://google.github.io/guice/api-docs/${libs.versions.guice.get()}/javadoc/",
183183
"https://configurate.aoeu.xyz/${libs.versions.configurate.get()}/apidocs/",
184184
"https://www.javadoc.io/doc/com.google.code.gson/gson/${libs.versions.gson.get()}/",

src/main/java/org/spongepowered/api/block/entity/BlockEntity.java

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,32 @@ public interface BlockEntity extends SerializableDataHolder.Mutable, Locatable {
6767
*/
6868
void remove();
6969

70+
/**
71+
* Returns whether this block entity can tick.
72+
*
73+
* @return True if this block entity can tick
74+
*/
75+
boolean canTick();
76+
77+
/**
78+
* Returns whether this block entity is ticking.
79+
*
80+
* @return True if this block entity is ticking
81+
*/
82+
boolean isTicking();
83+
84+
/**
85+
* Attempts to set if this block entity will naturally tick.
86+
*
87+
* <p>This will return <code>false</code>
88+
* if {@link #isRemoved()} returns <code>true</code>
89+
* or {@link #canTick()} returns <code>false</code></p>
90+
*
91+
* @param ticking The ticking state
92+
* @return True if ticking state was successfully set
93+
*/
94+
boolean setTicking(boolean ticking);
95+
7096
/**
7197
* Gets the type of {@link BlockEntity} this is.
7298
*

0 commit comments

Comments
 (0)