Skip to content

Commit

Permalink
chore: merge earlier api additions
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Harris-Rouquette <[email protected]>
  • Loading branch information
gabizou committed Sep 28, 2024
2 parents c8b38af + 41c571c commit 5e2393c
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions src/main/java/org/spongepowered/api/block/entity/BlockEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,32 @@ 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();

/**
* Attempts to set if this block entity will naturally tick.
*
* <p>This will return <code>false</code>
* if {@link #isRemoved()} returns <code>true</code>
* or {@link #canTick()} returns <code>false</code></p>
*
* @param ticking The ticking state
* @return True if ticking state was successfully set
*/
boolean setTicking(boolean ticking);

/**
* Gets the type of {@link BlockEntity} this is.
*
Expand Down

0 comments on commit 5e2393c

Please sign in to comment.