Fix accidental call to Math#floor over an int

This commit is contained in:
Christian Koop 2021-04-13 17:33:07 +02:00 committed by Brianna
parent e5f4869204
commit 036882c069

View File

@ -77,7 +77,7 @@ public class ModuleAutoSmelter extends Module {
blockmeta.setDisplayName(plugin.getLocale().getMessage("interface.hopper.smelttitle").getMessage());
ArrayList<String> loreblock = new ArrayList<>();
String[] parts = plugin.getLocale().getMessage("interface.hopper.smeltlore").processPlaceholder("timeleft",
getTime(hopper) == -9999 ? "\u221E" : (int) Math.floor(getTime(hopper) / 20)).processPlaceholder("enabled",
getTime(hopper) == -9999 ? "\u221E" : (int) Math.floor(getTime(hopper) / 20.0)).processPlaceholder("enabled",
isEnabled(hopper) ? EpicHoppers.getInstance().getLocale().getMessage("general.word.enabled").getMessage()
: EpicHoppers.getInstance().getLocale().getMessage("general.word.disabled").getMessage()).getMessage().split("\\|");
for (String line : parts) {
@ -112,7 +112,7 @@ public class ModuleAutoSmelter extends Module {
@Override
public String getDescription() {
return plugin.getLocale().getMessage("interface.hopper.autosmelt")
.processPlaceholder("ticks", (int) Math.floor(timeOut / 20)).getMessage();
.processPlaceholder("ticks", (int) Math.floor(timeOut / 20.0)).getMessage();
}
private int getTime(Hopper hopper) {