From e06b2030fc7c11a03181861ba6c2abb09128fe2d Mon Sep 17 00:00:00 2001 From: Jeremiah Winsley Date: Sat, 22 May 2021 13:44:20 -0400 Subject: [PATCH] prevent crash when using sundial outside of overworld (#210) --- .../naturesaura/blocks/tiles/TileEntityTimeChanger.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityTimeChanger.java b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityTimeChanger.java index 12182a99..f93be670 100644 --- a/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityTimeChanger.java +++ b/src/main/java/de/ellpeck/naturesaura/blocks/tiles/TileEntityTimeChanger.java @@ -19,7 +19,7 @@ import net.minecraft.util.math.BlockPos; import net.minecraft.util.math.MathHelper; import net.minecraft.world.GameRules; import net.minecraft.world.server.ServerWorld; -import net.minecraft.world.storage.ServerWorldInfo; +import net.minecraft.world.storage.IServerWorldInfo; import java.util.List; @@ -48,7 +48,7 @@ public class TileEntityTimeChanger extends TileEntityImpl implements ITickableTi this.sendToClients(); return; } - ((ServerWorldInfo) this.world.getWorldInfo()).setDayTime(current + toAdd); + ((IServerWorldInfo) this.world.getWorldInfo()).setDayTime(current + toAdd); BlockPos spot = IAuraChunk.getHighestSpot(this.world, this.pos, 35, this.pos); IAuraChunk.getAuraChunk(this.world, spot).drainAura(spot, (int) toAdd * 20);