mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-02 19:36:41 +00:00
Use a long to refer to the volume of a region to prevent overflow (#1350)
* Use a long to refer to the volume of a region, and rename the method to getVolume * Fixed issues noted in review * Forgot to floor * Fixed review notes * Can use a long here rather than BigDecimal * Improve javadocs * style (cherry picked from commit 328030fd6281e58a4ea1d0cdd0a2e274da90afbe)
This commit is contained in:
@ -27,8 +27,9 @@ public class SelectionPoint2DEvent implements CUIEvent {
|
||||
protected final int id;
|
||||
protected final int blockX;
|
||||
protected final int blockZ;
|
||||
protected final int area;
|
||||
protected final long area;
|
||||
|
||||
@Deprecated
|
||||
public SelectionPoint2DEvent(int id, BlockVector2 pos, int area) {
|
||||
this.id = id;
|
||||
this.blockX = pos.getX();
|
||||
@ -36,6 +37,7 @@ public class SelectionPoint2DEvent implements CUIEvent {
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public SelectionPoint2DEvent(int id, BlockVector3 pos, int area) {
|
||||
this.id = id;
|
||||
this.blockX = pos.getX();
|
||||
@ -43,6 +45,20 @@ public class SelectionPoint2DEvent implements CUIEvent {
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public SelectionPoint2DEvent(int id, BlockVector2 pos, long area) {
|
||||
this.id = id;
|
||||
this.blockX = pos.getX();
|
||||
this.blockZ = pos.getZ();
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public SelectionPoint2DEvent(int id, BlockVector3 pos, long area) {
|
||||
this.id = id;
|
||||
this.blockX = pos.getX();
|
||||
this.blockZ = pos.getZ();
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeId() {
|
||||
return "p2";
|
||||
|
@ -25,14 +25,21 @@ public class SelectionPointEvent implements CUIEvent {
|
||||
|
||||
protected final int id;
|
||||
protected final BlockVector3 pos;
|
||||
protected final int area;
|
||||
protected final long area;
|
||||
|
||||
@Deprecated
|
||||
public SelectionPointEvent(int id, BlockVector3 pos, int area) {
|
||||
this.id = id;
|
||||
this.pos = pos;
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public SelectionPointEvent(int id, BlockVector3 pos, long area) {
|
||||
this.id = id;
|
||||
this.pos = pos;
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getTypeId() {
|
||||
return "p";
|
||||
|
Reference in New Issue
Block a user