mirror of
https://github.com/Sollace/Unicopia.git
synced 2024-11-27 15:17:59 +01:00
Fixed datafixes for the unicopia:charges component
This commit is contained in:
parent
aac9404848
commit
156e17bee5
1 changed files with 2 additions and 2 deletions
|
@ -64,9 +64,9 @@ final class UnicopiaItemStackComponentizations {
|
|||
}
|
||||
|
||||
private static void fixEnergy(ItemStackComponentizationFix.StackData data, Dynamic<?> dynamic, int maximum, int baseline) {
|
||||
data.getAndRemove("energy").getElement("energy").result().ifPresent(energy -> {
|
||||
data.getAndRemove("energy").result().ifPresent(energy -> {
|
||||
data.setComponent("unicopia:charges", dynamic.emptyMap()
|
||||
.set("energy", dynamic.createInt((int)energy))
|
||||
.set("energy", dynamic.createInt(energy.get("energy").asInt(energy.asInt(baseline))))
|
||||
.set("maximum", dynamic.createInt(maximum))
|
||||
.set("baseline", dynamic.createInt(baseline))
|
||||
.set("show_in_tooltip", dynamic.createBoolean(true)));
|
||||
|
|
Loading…
Reference in a new issue