Skip to content

Commit 913f366

Browse files
committed
Removed unused argument for Division.updateLocation method
Refer to this.anchorEntity when spawning the Anchor Entity.
1 parent 2444092 commit 913f366

File tree

6 files changed

+5
-5
lines changed

6 files changed

+5
-5
lines changed
Binary file not shown.
Binary file not shown.
2 Bytes
Binary file not shown.
-18.1 KB
Binary file not shown.

src/main/java/dev/arctic/interactivemenuapi/objects/Division.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public Division(Menu ownerMenu, Location initialLocation, Vector offset, Animati
3434

3535
public void updateLocation(Location rootMenuLocation) {
3636
float yaw = rootMenuLocation.getYaw();
37-
Vector adjustedOffset = getAdjustedOffset(rootMenuLocation, offset, yaw);
37+
Vector adjustedOffset = getAdjustedOffset(offset, yaw);
3838

3939
Location newLocation = rootMenuLocation.clone().add(adjustedOffset);
4040

@@ -51,7 +51,7 @@ public void updateLocation(Location rootMenuLocation) {
5151
}
5252
}
5353

54-
private Vector getAdjustedOffset(Location anchorLocation, Vector offset, float yaw) {
54+
private Vector getAdjustedOffset(Vector offset, float yaw) {
5555
yaw = (yaw % 360 + 360) % 360;
5656

5757
double x = offset.getX();

src/main/java/dev/arctic/interactivemenuapi/objects/Menu.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@ public void initializeMenu() {
5353

5454
public void createAnchor(Vector spawnOffset) {
5555
if (rootLocation.getWorld() == null) return;
56-
anchorEntity = rootLocation.getWorld().spawn(rootLocation.add(spawnOffset), Interaction.class, interaction -> {
57-
interaction.setInteractionWidth(0f);
58-
interaction.setInteractionHeight(0f);
56+
this.anchorEntity = rootLocation.getWorld().spawn(rootLocation.add(spawnOffset), Interaction.class, interaction -> {
57+
interaction.setInteractionWidth(0.1f);
58+
interaction.setInteractionHeight(0.1f);
5959
interaction.setResponsive(false);
6060
});
6161
}

0 commit comments

Comments
 (0)