mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2026-04-09 01:06:21 +00:00
make Vector3 immutable by default
This commit is contained in:
@@ -13,10 +13,18 @@ public interface ReadableWorld extends World {
|
||||
return getBlockState(position.getBlockX(), position.getBlockY(), position.getBlockZ());
|
||||
}
|
||||
|
||||
default BlockState getBlockState(Vector3.Mutable position) {
|
||||
return getBlockState(position.getBlockX(), position.getBlockY(), position.getBlockZ());
|
||||
}
|
||||
|
||||
default BlockState getBlockState(Vector3Int position) {
|
||||
return getBlockState(position.getX(), position.getY(), position.getZ());
|
||||
}
|
||||
|
||||
default BlockState getBlockState(Vector3Int.Mutable position) {
|
||||
return getBlockState(position.getX(), position.getY(), position.getZ());
|
||||
}
|
||||
|
||||
BlockEntity getBlockEntity(int x, int y, int z);
|
||||
|
||||
default BlockEntity getBlockEntity(Vector3 position) {
|
||||
|
||||
@@ -12,18 +12,34 @@ public interface WritableWorld extends ReadableWorld {
|
||||
setBlockState(position.getBlockX(), position.getBlockY(), position.getBlockZ(), data, physics);
|
||||
}
|
||||
|
||||
default void setBlockState(Vector3.Mutable position, BlockState data, boolean physics) {
|
||||
setBlockState(position.getBlockX(), position.getBlockY(), position.getBlockZ(), data, physics);
|
||||
}
|
||||
|
||||
default void setBlockState(Vector3Int position, BlockState data, boolean physics) {
|
||||
setBlockState(position.getX(), position.getY(), position.getZ(), data, physics);
|
||||
}
|
||||
|
||||
default void setBlockState(Vector3Int.Mutable position, BlockState data, boolean physics) {
|
||||
setBlockState(position.getX(), position.getY(), position.getZ(), data, physics);
|
||||
}
|
||||
|
||||
default void setBlockState(Vector3 position, BlockState data) {
|
||||
setBlockState(position, data, false);
|
||||
}
|
||||
|
||||
default void setBlockState(Vector3.Mutable position, BlockState data) {
|
||||
setBlockState(position, data, false);
|
||||
}
|
||||
|
||||
default void setBlockState(Vector3Int position, BlockState data) {
|
||||
setBlockState(position, data, false);
|
||||
}
|
||||
|
||||
default void setBlockState(Vector3Int.Mutable position, BlockState data) {
|
||||
setBlockState(position, data, false);
|
||||
}
|
||||
|
||||
default void setBlockState(int x, int y, int z, BlockState data) {
|
||||
setBlockState(x, y, z, data, false);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user