mirror of
https://github.com/yawaflua/Informatis.git
synced 2025-12-10 12:09:27 +02:00
fixed bug, improve some descriptions
This commit is contained in:
@@ -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));
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user