From 9ca86b29374e69fc5c74fb7a53c2d5f2826f7109 Mon Sep 17 00:00:00 2001 From: Michael Hillcox Date: Sun, 29 Nov 2020 14:28:30 +0000 Subject: [PATCH] Fixed the teleporter cost being 3 times to much --- .../common/items/useables/TeleportStaffItem.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/de/ellpeck/actuallyadditions/common/items/useables/TeleportStaffItem.java b/src/main/java/de/ellpeck/actuallyadditions/common/items/useables/TeleportStaffItem.java index e06f0d8d9..ff9ea6736 100644 --- a/src/main/java/de/ellpeck/actuallyadditions/common/items/useables/TeleportStaffItem.java +++ b/src/main/java/de/ellpeck/actuallyadditions/common/items/useables/TeleportStaffItem.java @@ -37,7 +37,7 @@ public class TeleportStaffItem extends CrystalFluxItem { Vector3f centerOfHit = new Vector3f(toPos.getX(), toPos.getY(), toPos.getZ()); centerOfHit.add(.5f, (blockTrace.getFace().getAxis() == Direction.Axis.Y ? .5f : 0), .5f); - int energyCost = BASE_COST_PER_USE + (int) (BASE_COST_PER_USE * player.getDistanceSq(toPos.getX(), toPos.getY(), toPos.getZ())); + int energyCost = BASE_COST_PER_USE + (int) (BASE_COST_PER_USE * (player.getDistanceSq(toPos.getX(), toPos.getY(), toPos.getZ()) / 100)); boolean canUse = stack.getCapability(CapabilityEnergy.ENERGY).map(e -> e.getEnergyStored() >= energyCost).orElse(false); if (!canUse) {