Skip to content

Commit

Permalink
✨ Counter the fact that lodestone compass with broken lodestone leads…
Browse files Browse the repository at this point in the history
… no where
  • Loading branch information
fantomitechno committed Jan 3, 2024
1 parent ba94bc9 commit 7b7ecef
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ org.gradle.jvmargs=-Xmx1G
org.gradle.parallel = true

# Mod Properties
version = 0.1.2
version = 0.1.3
# Notes: when debugging, use rc's, so it would become: 0.X.X-rc.X
maven_group = dev.renoux
archives_base_name = enderrelay
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ public InteractionResult use(BlockState state, Level world, BlockPos pos, Player
if (isTeleportCompass(itemStack, world)) {
EnderRelayBlockEntity blentity = (EnderRelayBlockEntity) world.getBlockEntity(pos);
assert itemStack.getTag() != null;
if (!itemStack.getTag().contains("LodestonePos")) {
player.sendSystemMessage(Component.translatable("item.minecraft.lodestone_compass.nowhere"));
return InteractionResult.PASS;
}
BlockPos compassPos = NbtUtils.readBlockPos(itemStack.getTag().getCompound("LodestonePos"));
Component name = itemStack.getHoverName();
if (name.equals(Items.COMPASS.getName(itemStack))) {
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/assets/enderrelay/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@
"block.enderrelay.set_teleport": "Set teleport to %s",
"block.enderrelay.obstructed": "Your lodestone is obstructed or destroyed",
"block.enderrelay.nowhere": "This Ender Relay is leading nowhere",
"block.enderrelay.teleport_to": "This Ender Relay is teleporting you to %s"
"block.enderrelay.teleport_to": "This Ender Relay is teleporting you to %s",
"item.minecraft.lodestone_compass.nowhere": "This Lodestone Compass is leading nowhere"
}

0 comments on commit 7b7ecef

Please sign in to comment.