public class Bounds
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
int |
bottom
The bounds of the region.
|
int |
left
The bounds of the region.
|
int |
right
The bounds of the region.
|
int |
top
The bounds of the region.
|
protected net.minecraft.world.World |
world
The world that the region is in.
|
Constructor and Description |
---|
Bounds()
Initializes a 0x0 region.
|
Bounds(int top,
int left,
int bottom,
int right)
Initializes a region.
|
Modifier and Type | Method and Description |
---|---|
boolean |
canExtend()
Checks if the region can be extended.
|
boolean |
canExtend(int i,
int j,
int k,
int l)
Checks if the region can be extended.
|
void |
extend(net.minecraft.entity.player.ServerPlayerEntity playerEntity,
int i,
int j,
int k,
int l)
Extends the bounds of the region.
|
boolean |
isIn(double x,
double y,
double z)
Checks if a coordinate is in the region.
|
boolean |
isIn(net.minecraft.util.math.vector.Vector3d vec3)
Checks if a vector is in the region.
|
void |
readFromNBT(net.minecraft.nbt.CompoundNBT nbt)
Reads the region from NBT.
|
void |
setWorldObj(net.minecraft.world.World world)
Sets the world that the region is in.
|
void |
writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
Writes the region to NBT.
|
public int top
public int left
public int bottom
public int right
protected net.minecraft.world.World world
public Bounds()
public Bounds(int top, int left, int bottom, int right)
top
- The top of the region.left
- The left side of the region.bottom
- The bottom of the region.right
- The right side of the region.public void writeToNBT(net.minecraft.nbt.CompoundNBT nbt)
nbt
- The NBT tag to write the region to.public void readFromNBT(net.minecraft.nbt.CompoundNBT nbt)
nbt
- The NBT tag to read the region from.public boolean isIn(net.minecraft.util.math.vector.Vector3d vec3)
vec3
- The vector to check.public boolean isIn(double x, double y, double z)
x
- The x component of the coordinate.y
- The y component of the coordinate.z
- The z component of the coordinate.public void setWorldObj(net.minecraft.world.World world)
world
- The world that the region is in.public boolean canExtend()
public boolean canExtend(int i, int j, int k, int l)
i
- The top of the new region.j
- The left side of the new region.k
- The bottom of the new region.l
- The right side of the new region.public void extend(net.minecraft.entity.player.ServerPlayerEntity playerEntity, int i, int j, int k, int l)
playerEntity
- The player extending the bounds.i
- The top of the new region.j
- The left side of the new region.k
- The bottom of the new region.l
- The right side of the new region.