Offset generation bounds by teleportation scale
This commit is contained in:
@@ -151,8 +151,10 @@ public abstract class AbstractDhServerLevel extends AbstractDhLevel implements I
|
||||
|
||||
if (Config.Server.generationBoundsRadius.get() > 0)
|
||||
{
|
||||
double coordinateScale = this.serverLevelWrapper.getDimensionType().getCoordinateScale();
|
||||
if (DhSectionPos.getChebyshevSignedBlockDistance(message.sectionPos, new DhBlockPos2D(
|
||||
Config.Server.generationBoundsX.get(), Config.Server.generationBoundsZ.get()
|
||||
(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"));
|
||||
|
||||
+2
@@ -34,4 +34,6 @@ public interface IDimensionTypeWrapper extends IDhApiDimensionTypeWrapper, IBind
|
||||
|
||||
boolean isTheEnd();
|
||||
|
||||
double getCoordinateScale();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user