Should be division instead of multiplication

This commit is contained in:
s809
2025-02-26 23:16:58 +05:00
parent cc4733b052
commit 2483671e5e
2 changed files with 4 additions and 4 deletions
@@ -113,8 +113,8 @@ public class RemoteWorldRetrievalQueue extends AbstractFullDataNetworkRequestQue
if (this.networkState.sessionConfig.getGenerationBoundsRadius() > 0)
{
if (DhSectionPos.getChebyshevSignedBlockDistance(sectionPos, new DhBlockPos2D(
this.networkState.sessionConfig.getGenerationBoundsX(),
this.networkState.sessionConfig.getGenerationBoundsZ()
(int) (this.networkState.sessionConfig.getGenerationBoundsX() / this.level.levelWrapper.getDimensionType().getCoordinateScale()),
(int) (this.networkState.sessionConfig.getGenerationBoundsZ() / this.level.levelWrapper.getDimensionType().getCoordinateScale())
)) > this.networkState.sessionConfig.getGenerationBoundsRadius())
{
return false;
@@ -153,8 +153,8 @@ public abstract class AbstractDhServerLevel extends AbstractDhLevel implements I
{
double coordinateScale = this.serverLevelWrapper.getDimensionType().getCoordinateScale();
if (DhSectionPos.getChebyshevSignedBlockDistance(message.sectionPos, new DhBlockPos2D(
(int) (Config.Server.generationBoundsX.get() * coordinateScale),
(int) (Config.Server.generationBoundsZ.get() * coordinateScale)
(int) (Config.Server.generationBoundsX.get() / coordinateScale),
(int) (Config.Server.generationBoundsZ.get() / coordinateScale)
)) > Config.Server.generationBoundsRadius.get())
{
message.sendResponse(new RequestOutOfRangeException("Section out of allowed bounds"));