Added bisected but not directional support
This commit is contained in:
parent
0a57539d50
commit
53cdc27880
3 changed files with 24 additions and 1 deletions
|
@ -134,6 +134,20 @@ public class LiftBlock implements Comparable<LiftBlock> {
|
|||
this.bisected = null;
|
||||
}
|
||||
|
||||
/* 1.13 liftblock (no dir but bisec) */
|
||||
public LiftBlock(String world, int x, int y, int z, Material mat, String bisected) {
|
||||
this.world = world;
|
||||
this.x = x;
|
||||
this.y = y;
|
||||
this.z = z;
|
||||
this.mat = mat;
|
||||
this.face = null;
|
||||
this.data = 0;
|
||||
this.signLines = null;
|
||||
this.floor = null;
|
||||
this.bisected = bisected;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(@Nonnull LiftBlock lb) {
|
||||
int ret = Integer.compare(y, lb.y);
|
||||
|
|
|
@ -207,6 +207,9 @@ public class V10LiftAPI {
|
|||
} else if (block.getBlockData() instanceof org.bukkit.block.data.Directional) {
|
||||
Bukkit.getLogger().info("Block instanceof Dir 1.13");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getDirection(block));
|
||||
} else if (block.getBlockData() instanceof org.bukkit.block.data.Bisected) {
|
||||
Bukkit.getLogger().info("Block not instanceof Dir 1.13 but instanceof bisected");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getDirection(block), DirectionUtil.getBisected(block));
|
||||
} else {
|
||||
Bukkit.getLogger().info("Block not instanceof Dir 1.13");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type);
|
||||
|
@ -261,6 +264,9 @@ public class V10LiftAPI {
|
|||
} else if (block.getBlockData() instanceof org.bukkit.block.data.Directional) {
|
||||
Bukkit.getLogger().info("Block instanceof Dir 1.13");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getDirection(block));
|
||||
} else if (block.getBlockData() instanceof org.bukkit.block.data.Bisected) {
|
||||
Bukkit.getLogger().info("Block not instanceof Dir 1.13 but instanceof bisected");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getDirection(block), DirectionUtil.getBisected(block));
|
||||
} else {
|
||||
Bukkit.getLogger().info("Block not instanceof Dir 1.13");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type);
|
||||
|
@ -315,6 +321,9 @@ public class V10LiftAPI {
|
|||
} else if (block.getBlockData() instanceof org.bukkit.block.data.Directional) {
|
||||
Bukkit.getLogger().info("Block instanceof Dir 1.13");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getDirection(block));
|
||||
} else if (block.getBlockData() instanceof org.bukkit.block.data.Bisected) {
|
||||
Bukkit.getLogger().info("Block not instanceof Dir 1.13 but instanceof bisected");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type, DirectionUtil.getDirection(block), DirectionUtil.getBisected(block));
|
||||
} else {
|
||||
Bukkit.getLogger().info("Block not instanceof Dir 1.13");
|
||||
lb = new LiftBlock(block.getWorld().getName(), block.getX(), block.getY(), block.getZ(), type);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue