Skip to content

Commit

Permalink
replace hard coded strings part 3
Browse files Browse the repository at this point in the history
  • Loading branch information
strubium committed Feb 19, 2024
1 parent 7e8b8c8 commit 5e530a1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ private static int getChestContents(World world, BlockPos pos, List<ItemStack> s
}
}
} catch(RuntimeException e) {
throw new RuntimeException("Getting the contents of a " + world.getBlockState(pos).getBlock().getRegistryName() + " (" + te.getClass().getName() + ")", e);
throw new RuntimeException("{*theoneprobe.probe.get_contents*} " + world.getBlockState(pos).getBlock().getRegistryName() + " (" + te.getClass().getName() + ")", e);
}
return maxSlots;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ public void addProbeEntityInfo(ProbeMode mode, IProbeInfo probeInfo, EntityPlaye
if (ownerId != null) {
String username = UsernameCache.getLastKnownUsername(ownerId);
if (username == null) {
probeInfo.text(WARNING + "Unknown owner");
probeInfo.text(WARNING + "{*theoneprobe.probe.unknown_owner_indicator*}");
} else {
probeInfo.text(LABEL + "{*theoneprobe.probe.owned_by_indicator*} " + INFO + username);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ static void showHarvestLevel(IProbeInfo probeInfo, IBlockState blockState, Block
} else {
harvestName = harvestLevels[harvestLevel];
}
probeInfo.text(LABEL + "Tool: " + INFO + harvestTool + " (level " + harvestName + ")");
probeInfo.text(LABEL + "{*theoneprobe.probe.tool_indicator*} " + INFO + harvestTool + " (level " + harvestName + ")");
}
}

Expand All @@ -66,9 +66,9 @@ static void showCanBeHarvested(IProbeInfo probeInfo, World world, BlockPos pos,

boolean harvestable = block.canHarvestBlock(world, pos, player) && world.getBlockState(pos).getBlockHardness(world, pos) >= 0;
if (harvestable) {
probeInfo.text(OK + "Harvestable");
probeInfo.text(OK + "{*theoneprobe.probe.harvestable_indicator*}");
} else {
probeInfo.text(WARNING + "Not harvestable");
probeInfo.text(WARNING + "{*theoneprobe.probe.not_harvestable_indicator*}");
}
}

Expand Down
5 changes: 5 additions & 0 deletions src/main/resources/assets/theoneprobe/lang/en_us.lang
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,16 @@ item.theoneprobe.creativeprobe.name=The Creative Probe
theoneprobe.probe.enchanting_power=Enchanting Power:
theoneprobe.probe.tnt_fuse=TNT Fuse:

theoneprobe.probe.get_contents=Getting the contents of a
theoneprobe.probe.harvestable_indicator=Harvestable
theoneprobe.probe.not_harvestable_indicator=Not Harvestable
theoneprobe.probe.fuel_indicator=Fuel:
theoneprobe.probe.time_indicator=Time:
theoneprobe.probe.tool_indicator=Tool:
theoneprobe.probe.growing_time_indicator=Growing Time:
theoneprobe.probe.health_indicator=Health:
theoneprobe.probe.rotation_indicator=Rotation:
theoneprobe.probe.unknown_owner_indicator=Unknown owner
theoneprobe.probe.owned_by_indicator=Owned by:
theoneprobe.probe.jump_height_indicator=Jump height:
theoneprobe.probe.speed_indicator=Speed:
Expand Down

0 comments on commit 5e530a1

Please sign in to comment.