Check if list is empty after removing current location, fixes #307

This commit is contained in:
Electroblob77
2019-12-16 12:18:46 +00:00
parent 907b94c74f
commit 74345d0c3b
@@ -141,7 +141,8 @@ public class BlockTransportationStone extends Block {
if(locations.isEmpty()) locations.add(here);
else{
locations.remove(here); // Prevents duplicates
locations.set(Math.max(locations.size() - 1, 0), here);
if(locations.isEmpty()) locations.add(here);
else locations.set(Math.max(locations.size() - 1, 0), here);
}
if(!world.isRemote) player.sendStatusMessage(new TextComponentTranslation("tile." + Wizardry.MODID + ":transportation_stone.confirm", Spells.transportation.getNameForTranslationFormatted()), true);
}