Skip to content

Commit

Permalink
修复余烬输入仓tooltip
Browse files Browse the repository at this point in the history
  • Loading branch information
warmthdawn committed Jan 15, 2021
1 parent 7db82ad commit 104f149
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@

public class BlockEmberInputHatch extends VariantBlock<EmbersHatchVariant> implements ITileEntityProvider {
public static final PropertyEnum<EmbersHatchVariant> VARIANT = PropertyEnum.create("variant", EmbersHatchVariant.class);
private static final String KEY_EMBER_TOOLTIP = "embers.tooltip.item.ember";

public BlockEmberInputHatch() {
super(Material.ROCK, EmbersHatchVariant.class);
Expand Down Expand Up @@ -73,12 +74,12 @@ public void addInformation(ItemStack stack, World world, List<String> tooltip, I
double ember = tagCompound.getDouble("ember");
double emberCapacity = tagCompound.getDouble("emberCapacity");
DecimalFormat emberFormat = Embers.proxy.getDecimalFormat("embers.decimal_format.ember");
addInformationLocalized(tooltip, emberFormat.format(ember), emberFormat.format(emberCapacity));
addInformationLocalized(tooltip, KEY_EMBER_TOOLTIP, emberFormat.format(ember), emberFormat.format(emberCapacity));
} else if (stack.getMetadata() < EmbersHatchVariant.VAULES.length) {
EmbersHatchVariant variant = EmbersHatchVariant.VAULES[stack.getMetadata()];
double emberCapacity = variant.getEmberMaxStorage();
DecimalFormat emberFormat = Embers.proxy.getDecimalFormat("embers.decimal_format.ember");
addInformationLocalized(tooltip, emberFormat.format(0), emberFormat.format(emberCapacity));
addInformationLocalized(tooltip, KEY_EMBER_TOOLTIP, emberFormat.format(0), emberFormat.format(emberCapacity));
}
}

Expand Down
6 changes: 3 additions & 3 deletions version.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#Sat Jan 16 00:17:43 CST 2021
SAVED_VERSION=0.5.3
BUILD_NUMBER=4
#Sat Jan 16 00:26:26 CST 2021
SAVED_VERSION=0.5.4
BUILD_NUMBER=3

0 comments on commit 104f149

Please sign in to comment.