Skip to content

Commit 54ec594

Browse files
committed
Add BlockEntity tick methods
1 parent 289329a commit 54ec594

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,27 @@ 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+
* Sets if this block entity will naturally tick.
86+
*
87+
* @param ticking The ticking state
88+
*/
89+
void setTicking(boolean ticking);
90+
7091
/**
7192
* Gets the type of {@link BlockEntity} this is.
7293
*

0 commit comments

Comments
 (0)