Skip to content

Commit

Permalink
1.0.1
Browse files Browse the repository at this point in the history
Fix efficiency enchantment calculation
Add Simplified Chinese translation (thanks Hambaka!)
  • Loading branch information
Shnupbups committed Aug 28, 2020
1 parent 58be959 commit 3fb1bb7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.9.2+build.206

# Mod Properties
mod_version = 1.0.0
mod_version = 1.0.1
maven_group = com.shnupbups
archives_base_name = tooltip-tool-tips

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public void appendTooltipInject(ItemStack stack, World world, List<Text> tooltip
if(tool instanceof MiningToolItem) {
tooltip.add(new TranslatableText("tooltip.harvest_level").append(new LiteralText(String.valueOf(material.getMiningLevel()))).formatted(Formatting.GRAY));
int efficiency = EnchantmentHelper.get(stack).getOrDefault(Enchantments.EFFICIENCY, 0);
int efficiencyModifier = efficiency>0?(efficiency^2)+1:0;
int efficiencyModifier = efficiency>0?(efficiency*efficiency)+1:0;
MutableText speedText = new TranslatableText("tooltip.harvest_speed").append(new LiteralText(String.valueOf(material.getMiningSpeedMultiplier()+efficiencyModifier))).formatted(Formatting.GRAY);
if(efficiency > 0) {
speedText.append(new LiteralText(" (+"+efficiencyModifier+")").formatted(Formatting.WHITE));
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"schemaVersion": 1,
"id": "tooltiptooltips",
"version": "1.0.0",
"version": "1.0.1",

"name": "Tooltip Tool Tips",
"description": "Adds information about tools to their tooltips",
Expand Down

0 comments on commit 3fb1bb7

Please sign in to comment.