Skip to content

Commit

Permalink
Fix NPE in addInformation of Location Chip (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
reobf authored Nov 24, 2024
1 parent 163c1fb commit 8c9645b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/remoteio/common/item/ItemLocationChip.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public ItemLocationChip() {
public void addInformation(ItemStack stack, EntityPlayer player, List<String> list, boolean debug) {
DimensionalCoords coords = ItemLocationChip.getCoordinates(stack);
if (coords != null) {
list.add("Dimension: " + DimensionManager.getProvider(coords.dimensionID).getDimensionName());
if (DimensionManager.getWorld(coords.dimensionID) != null)
list.add("Dimension: " + DimensionManager.getProvider(coords.dimensionID).getDimensionName());
else list.add("Dimension: " + coords.dimensionID);
list.add("X: " + coords.x + " Y: " + coords.y + " Z: " + coords.z);
}
}
Expand Down

0 comments on commit 8c9645b

Please sign in to comment.