mirror of
https://github.com/Ellpeck/NaturesAura.git
synced 2024-11-22 11:53:29 +01:00
prevent crash when using sundial outside of overworld (#210)
This commit is contained in:
parent
7135de5960
commit
e06b2030fc
1 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.world.GameRules;
|
import net.minecraft.world.GameRules;
|
||||||
import net.minecraft.world.server.ServerWorld;
|
import net.minecraft.world.server.ServerWorld;
|
||||||
import net.minecraft.world.storage.ServerWorldInfo;
|
import net.minecraft.world.storage.IServerWorldInfo;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ public class TileEntityTimeChanger extends TileEntityImpl implements ITickableTi
|
||||||
this.sendToClients();
|
this.sendToClients();
|
||||||
return;
|
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);
|
BlockPos spot = IAuraChunk.getHighestSpot(this.world, this.pos, 35, this.pos);
|
||||||
IAuraChunk.getAuraChunk(this.world, spot).drainAura(spot, (int) toAdd * 20);
|
IAuraChunk.getAuraChunk(this.world, spot).drainAura(spot, (int) toAdd * 20);
|
||||||
|
|
Loading…
Reference in a new issue