fixed bug, improve some descriptions

This commit is contained in:
sharlotte
2021-08-17 21:14:13 +09:00
parent fe12ee44d6
commit cc96e1f9e3
6 changed files with 20 additions and 15 deletions

View File

@@ -150,13 +150,7 @@ public class BarInfo {
strings.set(2, bundle.format("shar-stat.itemCapacity", floatFormat(b.items.total()), floatFormat(cb.storageCapacity * content.items().count(UnlockableContent::unlockedNow))));
numbers.set(2, cb.items.total() / (cb.storageCapacity * content.items().count(UnlockableContent::unlockedNow) * 1f));
}
else if(target instanceof StorageBlock.StorageBuild sb && !sb.canPickup()){
CoreBlock.CoreBuild cb = null /*sb.linkedCore TODO: Replace null with this comment when v130 exists*/;
try { // Backwards compatibility
cb = Version.build <= 129 ? (CoreBlock.CoreBuild) linkedCore.get(sb): null;
} catch (IllegalAccessException e) {
e.printStackTrace();
}
else if(target instanceof StorageBlock.StorageBuild sb && !sb.canPickup() && sb.linkedCore instanceof CoreBlock.CoreBuild cb){
strings.set(2, bundle.format("shar-stat.itemCapacity", floatFormat(sb.items.total()), floatFormat(cb.storageCapacity * content.items().count(UnlockableContent::unlockedNow))));
numbers.set(2, sb.items.total() / (cb.storageCapacity * content.items().count(UnlockableContent::unlockedNow) * 1f));
}

View File

@@ -48,6 +48,13 @@ public class Main extends Mod {
@Override
public void init(){
Core.app.post(() -> {
Mods.ModMeta meta = Vars.mods.locateMod("unitinfo").meta;
meta.displayName = "[#B5FFD9]Unit Infomation[]";
meta.author = "[#B5FFD9]Sharlotte[lightgray]#0018[][]";
meta.description = bundle.get("shar-description");
});
Events.on(ClientLoadEvent.class, e -> {
hud = new HudUi();
settingAdder.init();