mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-24 00:26:16 +02:00
small important fix
This commit is contained in:
parent
239dbed5e0
commit
a411311bb6
2 changed files with 3 additions and 5 deletions
|
|
@ -25,6 +25,7 @@ import java.util.HashSet;
|
|||
import java.util.List;
|
||||
import java.util.function.Consumer;
|
||||
|
||||
@SuppressWarnings("UnstableApiUsage")
|
||||
public class UnitRepairElementListGui extends
|
||||
SettingGuiListConfigGui<ItemType, DoubleSettingGui.DoubleSettingFactory> implements ElementMappedToListGui {
|
||||
|
||||
|
|
@ -80,8 +81,6 @@ public class UnitRepairElementListGui extends
|
|||
return;
|
||||
}
|
||||
|
||||
String materialName = type.getKey().getKey().toLowerCase();
|
||||
|
||||
// Add new material
|
||||
ConfigHolder.UNIT_REPAIR_HOLDER.getConfig().set(parentType.getKey() + "." + type.getKey(), 0.25);
|
||||
|
||||
|
|
@ -93,9 +92,8 @@ public class UnitRepairElementListGui extends
|
|||
updateValueForGeneric(type, true);
|
||||
this.parentGui.updateValueForGeneric(this.parentType, true);
|
||||
|
||||
|
||||
// Display material edit setting
|
||||
this.factoryMap.get(materialName).create().show(player);
|
||||
this.factoryMap.get(type).create().show(player);
|
||||
},
|
||||
true
|
||||
).show(event.getWhoClicked());
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ public class DoubleSettingGui extends AbstractSettingGui {
|
|||
section = this.config.getConfig();
|
||||
|
||||
if (section.isDouble(alternativePath)) {
|
||||
return BigDecimal.valueOf(section.getDouble(this.configPath)).setScale(2, RoundingMode.HALF_UP);
|
||||
return BigDecimal.valueOf(section.getDouble(alternativePath)).setScale(2, RoundingMode.HALF_UP);
|
||||
}
|
||||
}
|
||||
return this.defaultVal;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue