Use double instead of int for cyl radius

This commit is contained in:
Jesse Boyd 2017-08-24 20:56:38 +10:00
parent 55790601d3
commit 70e1e00e23
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F

View File

@ -190,7 +190,7 @@ public class GenerationCommands extends MethodCommands {
fp.checkConfirmationRadius(getArguments(context), (int) max); fp.checkConfirmationRadius(getArguments(context), (int) max);
height = Math.min(256, height); height = Math.min(256, height);
Vector pos = session.getPlacementPosition(player); Vector pos = session.getPlacementPosition(player);
int affected = editSession.makeHollowCylinder(pos, pattern, radius.getBlockX(), radius.getBlockZ(), height, thickness - 1); int affected = editSession.makeHollowCylinder(pos, pattern, radius.getX(), radius.getZ(), height, thickness - 1);
BBC.VISITOR_BLOCK.send(fp, affected); BBC.VISITOR_BLOCK.send(fp, affected);
} }
@ -215,7 +215,7 @@ public class GenerationCommands extends MethodCommands {
fp.checkConfirmationRadius(getArguments(context), (int) max); fp.checkConfirmationRadius(getArguments(context), (int) max);
height = Math.min(256, height); height = Math.min(256, height);
Vector pos = session.getPlacementPosition(player); Vector pos = session.getPlacementPosition(player);
int affected = editSession.makeCylinder(pos, pattern, radius.getBlockX(), radius.getBlockZ(), height, !hollow); int affected = editSession.makeCylinder(pos, pattern, radius.getX(), radius.getZ(), height, !hollow);
BBC.VISITOR_BLOCK.send(fp, affected); BBC.VISITOR_BLOCK.send(fp, affected);
} }
@ -259,10 +259,10 @@ public class GenerationCommands extends MethodCommands {
Vector pos = session.getPlacementPosition(player); Vector pos = session.getPlacementPosition(player);
if (raised) { if (raised) {
pos = pos.add(0, radius.getBlockY(), 0); pos = pos.add(0, radius.getY(), 0);
} }
int affected = editSession.makeSphere(pos, pattern, radius.getBlockX(), radius.getBlockY(), radius.getBlockZ(), !hollow); int affected = editSession.makeSphere(pos, pattern, radius.getX(), radius.getY(), radius.getZ(), !hollow);
player.findFreePosition(); player.findFreePosition();
BBC.VISITOR_BLOCK.send(fp, affected); BBC.VISITOR_BLOCK.send(fp, affected);
} }