Renames RelativeBlockVector's right, depth and distance to right, down and out respectively

This commit is contained in:
2021-10-24 22:48:13 +02:00
parent 822f8fb2b5
commit 669767ef89
9 changed files with 82 additions and 71 deletions

View File

@ -189,7 +189,7 @@ public class Gate {
Map<Character, Material> characterMaterialMap = new HashMap<>(this.characterMaterialMap);
for (RelativeBlockVector borderVector : layout.getBorder()) {
int rowIndex = borderVector.getRight();
int lineIndex = borderVector.getDepth();
int lineIndex = borderVector.getDown();
Character key = layout.getLayout()[lineIndex][rowIndex];
Material materialInLayout = characterMaterialMap.get(key);

View File

@ -276,7 +276,7 @@ public class PortalCreator {
BlockFace buttonFacing) {
//Go one block outwards to find the button's location rather than the control block's location
BlockLocation button = topLeft.getRelativeLocation(buttonVector.addToVector(
RelativeBlockVector.Property.DISTANCE, 1), portal.getYaw());
RelativeBlockVector.Property.OUT, 1), portal.getYaw());
Directional buttonData = (Directional) Bukkit.createBlockData(portal.getGate().getPortalButton());
buttonData.setFacing(buttonFacing);

View File

@ -146,7 +146,7 @@ public abstract class Teleporter {
RelativeBlockVector openingEdge = relativeExit;
do {
RelativeBlockVector possibleOpening = new RelativeBlockVector(openingEdge.getRight() + direction,
openingEdge.getDepth(), openingEdge.getDistance());
openingEdge.getDown(), openingEdge.getOut());
if (portal.getGate().getLayout().getExits().contains(possibleOpening)) {
openingEdge = possibleOpening;
} else {