Skip to content

Commit

Permalink
Fix for getTravelItemTravelSource (#96)
Browse files Browse the repository at this point in the history
This bug does not currently have any gameplay effect, because the return value of this method is not used to determine teleport range. But we should fix it anyway.
  • Loading branch information
D-Cysteine authored Feb 8, 2023
1 parent 0966121 commit 628af06
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,8 +554,8 @@ public TravelSource getTravelItemTravelSource(EntityPlayer ep) {
return null;
}
ItemStack equipped = ep.getCurrentEquippedItem();
if (equipped.getItem() instanceof ItemTravelStaff) {
if (((ItemTravelStaff) equipped.getItem()).isActive(ep, equipped)) {
if (equipped.getItem() instanceof ItemTeleportStaff) {
if (((ItemTeleportStaff) equipped.getItem()).isActive(ep, equipped)) {
return TravelSource.TELEPORT_STAFF;
}
} else if (equipped.getItem() instanceof IItemOfTravel) {
Expand Down

0 comments on commit 628af06

Please sign in to comment.