Skip to content

Commit 37ba73d

Browse files
committed
Add remove checks
1 parent 681f4c4 commit 37ba73d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

src/mixins/java/org/spongepowered/common/mixin/api/minecraft/world/level/block/entity/BlockEntityMixin_API.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,15 @@ public boolean canTick() {
160160

161161
@Override
162162
public boolean isTicking() {
163-
return this.canTick() && this.api$isTicking;
163+
return !this.remove && this.canTick() && this.api$isTicking;
164164
}
165165

166166
@Override
167-
public void setTicking(boolean ticking) {
167+
public void setTicking(final boolean ticking) {
168+
if (this.remove) {
169+
throw new IllegalArgumentException("BlockEntity is removed");
170+
}
171+
168172
if (!this.canTick()) {
169173
throw new IllegalStateException("BlockEntity cannot tick");
170174
}

0 commit comments

Comments
 (0)