Skip to content

Commit

Permalink
🐛 Error but no crash, better to have no error
Browse files Browse the repository at this point in the history
  • Loading branch information
fantomitechno committed Jan 3, 2024
1 parent 0a6ce66 commit d62feb9
Show file tree
Hide file tree
Showing 2 changed files with 4 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.6
version = 0.1.7
# 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 @@ -122,8 +122,10 @@ public InteractionResult use(BlockState state, Level world, BlockPos pos, Player
} else {
ServerPlayer serverPlayer = (ServerPlayer) player;
EnderRelayBlockEntity blentity = (EnderRelayBlockEntity) world.getBlockEntity(pos);
if (blentity == null)
return InteractionResult.FAIL;
if (serverPlayer.isCrouching()) {
if (!blentity.getName().equals(Component.literal("null")))
if (blentity.getName() == null || !blentity.getName().equals(Component.literal("null")))
serverPlayer.displayClientMessage(Component.translatable("block.enderrelay.teleport_to", blentity.getName()), true);
else
serverPlayer.displayClientMessage(Component.translatable("block.enderrelay.nowhere"), true);
Expand Down

0 comments on commit d62feb9

Please sign in to comment.