Skip to content

Commit 5e2393c

Browse files
committed
chore: merge earlier api additions
Signed-off-by: Gabriel Harris-Rouquette <[email protected]>
2 parents c8b38af + 41c571c commit 5e2393c

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

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)