Add in a chunk coord plus method for PS
This commit is contained in:
parent
6d0e2f7669
commit
ac524cd559
@ -206,6 +206,27 @@ public final class PS implements Cloneable, Serializable, Comparable<PS>
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// FIELDS: PLUS
|
||||
// -------------------------------------------- //
|
||||
|
||||
public PS plusChunkCoords(int chunkX, int chunkZ)
|
||||
{
|
||||
PSBuilder builder = this.builder();
|
||||
|
||||
if (builder.chunkX() != null)
|
||||
{
|
||||
builder.chunkX(builder.chunkX() + chunkX);
|
||||
}
|
||||
|
||||
if (builder.chunkZ() != null)
|
||||
{
|
||||
builder.chunkZ(builder.chunkZ() + chunkZ);
|
||||
}
|
||||
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
// -------------------------------------------- //
|
||||
// PRIVATE CONSTRUCTOR
|
||||
// -------------------------------------------- //
|
||||
|
Loading…
Reference in New Issue
Block a user