mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Merge pull request #370 from thislooksfun/feature/fix-selection-bounds
Fix clamping issue
This commit is contained in:
commit
9cce332879
@ -105,13 +105,13 @@ public class PrimitiveBindings extends Bindings {
|
|||||||
final double radiusX, radiusY, radiusZ;
|
final double radiusX, radiusY, radiusZ;
|
||||||
switch (radii.length) {
|
switch (radii.length) {
|
||||||
case 1:
|
case 1:
|
||||||
radiusX = radiusY = radiusZ = Math.max(1, PrimitiveBindings.parseNumericInput(radii[0]));
|
radiusX = radiusY = radiusZ = PrimitiveBindings.parseNumericInput(radii[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
radiusX = Math.max(1, PrimitiveBindings.parseNumericInput(radii[0]));
|
radiusX = PrimitiveBindings.parseNumericInput(radii[0]);
|
||||||
radiusY = Math.max(1, PrimitiveBindings.parseNumericInput(radii[1]));
|
radiusY = PrimitiveBindings.parseNumericInput(radii[1]);
|
||||||
radiusZ = Math.max(1, PrimitiveBindings.parseNumericInput(radii[2]));
|
radiusZ = PrimitiveBindings.parseNumericInput(radii[2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -135,12 +135,12 @@ public class PrimitiveBindings extends Bindings {
|
|||||||
final double radiusX, radiusZ;
|
final double radiusX, radiusZ;
|
||||||
switch (radii.length) {
|
switch (radii.length) {
|
||||||
case 1:
|
case 1:
|
||||||
radiusX = radiusZ = Math.max(1, PrimitiveBindings.parseNumericInput(radii[0]));
|
radiusX = radiusZ = PrimitiveBindings.parseNumericInput(radii[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
radiusX = Math.max(1, PrimitiveBindings.parseNumericInput(radii[0]));
|
radiusX = PrimitiveBindings.parseNumericInput(radii[0]);
|
||||||
radiusZ = Math.max(1, PrimitiveBindings.parseNumericInput(radii[1]));
|
radiusZ = PrimitiveBindings.parseNumericInput(radii[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -163,13 +163,13 @@ public class PrimitiveBindings extends Bindings {
|
|||||||
final double radiusX, radiusY, radiusZ;
|
final double radiusX, radiusY, radiusZ;
|
||||||
switch (radii.length) {
|
switch (radii.length) {
|
||||||
case 1:
|
case 1:
|
||||||
radiusX = radiusY = radiusZ = Math.max(1, PrimitiveBindings.parseNumericInput(radii[0]));
|
radiusX = radiusY = radiusZ = PrimitiveBindings.parseNumericInput(radii[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 3:
|
case 3:
|
||||||
radiusX = Math.max(1, PrimitiveBindings.parseNumericInput(radii[0]));
|
radiusX = PrimitiveBindings.parseNumericInput(radii[0]);
|
||||||
radiusY = Math.max(1, PrimitiveBindings.parseNumericInput(radii[1]));
|
radiusY = PrimitiveBindings.parseNumericInput(radii[1]);
|
||||||
radiusZ = Math.max(1, PrimitiveBindings.parseNumericInput(radii[2]));
|
radiusZ = PrimitiveBindings.parseNumericInput(radii[2]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@ -192,12 +192,12 @@ public class PrimitiveBindings extends Bindings {
|
|||||||
final double radiusX, radiusZ;
|
final double radiusX, radiusZ;
|
||||||
switch (radii.length) {
|
switch (radii.length) {
|
||||||
case 1:
|
case 1:
|
||||||
radiusX = radiusZ = Math.max(1, parseNumericInput(radii[0]));
|
radiusX = radiusZ = parseNumericInput(radii[0]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 2:
|
case 2:
|
||||||
radiusX = Math.max(1, parseNumericInput(radii[0]));
|
radiusX = parseNumericInput(radii[0]);
|
||||||
radiusZ = Math.max(1, parseNumericInput(radii[1]));
|
radiusZ = parseNumericInput(radii[1]);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Loading…
Reference in New Issue
Block a user