Skip to content

Commit 5a9f5fc

Browse files
committed
fix #13
1 parent 7123661 commit 5a9f5fc

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Xplat/src/main/java/io/github/lounode/extrabotany/common/block/flower/generating/ResoncundBlockEntity.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,9 @@ public void readFromPacketNBT(CompoundTag cmp) {
150150

151151
@SubscribeEventWrapper
152152
public void onPlayLevelSound(PlayLevelSoundEventWrapper.AtPosition event) {
153+
if (getLevel() == null) {
154+
return;
155+
}
153156
if (getLevel().isClientSide()) {
154157
EventsWrapper.unregister(this);
155158
return;
@@ -170,6 +173,9 @@ public void onPlayLevelSound(PlayLevelSoundEventWrapper.AtPosition event) {
170173

171174
@SubscribeEventWrapper
172175
public void onPlayLevelSound(PlayLevelSoundEventWrapper.AtEntity event) {
176+
if (getLevel() == null) {
177+
return;
178+
}
173179
if (getLevel().isClientSide()) {
174180
EventsWrapper.unregister(this);
175181
return;

0 commit comments

Comments
 (0)