mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-24 05:54:27 +00:00
#529 Using travel anchor with an empty hand causes crash
This commit is contained in:
1 parent
018b748c95
commit
b06966ee4a
1 file changed
+3
@@ -236,6 +236,9 @@ public class TravelController {
|
||||
}
|
||||
|
||||
public int getRequiredPower(EntityPlayer player, TravelSource source, BlockCoord coord) {
|
||||
if(!ItemTravelStaff.isEquipped(player)) {
|
||||
return 0;
|
||||
}
|
||||
int requiredPower;
|
||||
ItemStack staff = player.getCurrentEquippedItem();
|
||||
requiredPower = (int) (getDistance(player, coord) * source.powerCostPerBlockTraveledRF);
|
||||
|
||||
Reference in new issue
Block a user