Skip to content

Commit

Permalink
Fix #605
Browse files Browse the repository at this point in the history
  • Loading branch information
Corosauce committed Dec 3, 2023
1 parent 0b171cd commit 4e01c67
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/weather2/blockentity/DeflectorBlockEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.world.level.block.state.BlockState;
import weather2.ServerTickHandler;
import weather2.WeatherBlocks;
import weather2.weathersystem.WeatherManagerServer;

public class DeflectorBlockEntity extends BlockEntity {

Expand Down Expand Up @@ -38,6 +39,7 @@ public void init() {
@Override
public void setRemoved() {
super.setRemoved();
ServerTickHandler.getWeatherManagerFor(level).removeDeflector(getBlockPos());
WeatherManagerServer weatherManagerServer = ServerTickHandler.getWeatherManagerFor(level);
if (weatherManagerServer != null) weatherManagerServer.removeDeflector(getBlockPos());
}
}

0 comments on commit 4e01c67

Please sign in to comment.