diff --git a/CHANGELOG.md b/CHANGELOG.md index f450a63b..ca8250b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ - fix Dyson Sphere Casing recipe - fix lang issues - add Atomic Casing recipe +- fix dyson crash on fabric 0.0.2.a: - fix fabric diff --git a/common/src/main/java/argent_matter/gcys/api/capability/IDysonSystem.java b/common/src/main/java/argent_matter/gcys/api/capability/IDysonSystem.java index cffb95c6..7e0ea6fc 100644 --- a/common/src/main/java/argent_matter/gcys/api/capability/IDysonSystem.java +++ b/common/src/main/java/argent_matter/gcys/api/capability/IDysonSystem.java @@ -35,5 +35,5 @@ public interface IDysonSystem { void tick(); - void setDirty(); + void setChanged(); } diff --git a/common/src/main/java/argent_matter/gcys/api/space/dyson/DysonSphere.java b/common/src/main/java/argent_matter/gcys/api/space/dyson/DysonSphere.java index a040fe95..4d55f8f7 100644 --- a/common/src/main/java/argent_matter/gcys/api/space/dyson/DysonSphere.java +++ b/common/src/main/java/argent_matter/gcys/api/space/dyson/DysonSphere.java @@ -40,7 +40,7 @@ public void tick(ServerLevel level) { } timeNeededMaintenance++; - this.system.setDirty(); + this.system.setChanged(); return; } @@ -59,13 +59,13 @@ public float getCollapseChance() { public void needsMaintenance() { this.needsMaintenance = true; this.timeNeededMaintenance++; - this.system.setDirty(); + this.system.setChanged(); } public void fixMaintenance() { this.needsMaintenance = false; this.timeNeededMaintenance = 0; - this.system.setDirty(); + this.system.setChanged(); } public void setCollapsed() { @@ -75,7 +75,7 @@ public void setCollapsed() { private boolean calculateTime(int timeSinceLastTick) { setTimeActive(timeSinceLastTick + getTimeActive()); - this.system.setDirty(); + this.system.setChanged(); var value = getTimeActive() - MINIMUM_MAINTENANCE_TIME; if (value > 0) { setTimeActive(value); @@ -86,7 +86,7 @@ private boolean calculateTime(int timeSinceLastTick) { public void setControllerPos(BlockPos controllerPos) { this.controllerPos = controllerPos; - this.system.setDirty(); + this.system.setChanged(); } public void save(CompoundTag tag) { diff --git a/common/src/main/java/argent_matter/gcys/api/space/dyson/DysonSystemSavedData.java b/common/src/main/java/argent_matter/gcys/api/space/dyson/DysonSystemSavedData.java index b3124aa6..7135310a 100644 --- a/common/src/main/java/argent_matter/gcys/api/space/dyson/DysonSystemSavedData.java +++ b/common/src/main/java/argent_matter/gcys/api/space/dyson/DysonSystemSavedData.java @@ -154,6 +154,11 @@ public void tick() { } } + @Override + public void setChanged() { + this.setDirty(); + } + public void load(CompoundTag arg) { if (arg.contains("dysonSphere", Tag.TAG_COMPOUND)) { this.currentActiveSunBlock = DysonSphere.load(arg.getCompound("dysonSphere"), this); diff --git a/common/src/main/java/argent_matter/gcys/data/lang/LangHandler.java b/common/src/main/java/argent_matter/gcys/data/lang/LangHandler.java index 2bde8c83..63b94647 100644 --- a/common/src/main/java/argent_matter/gcys/data/lang/LangHandler.java +++ b/common/src/main/java/argent_matter/gcys/data/lang/LangHandler.java @@ -53,8 +53,6 @@ public static void init(RegistrateLangProvider provider) { provider.add("metaitem.planet_id_circuit.id", "Currently selected planet: "); provider.add("metaitem.planet_id_circuit.station", "To in-orbit space station (ID: %s)"); - // materials - // machines provider.add("gcys.machine.satellite_jammer.jammed", "Jammed %s"); provider.add("gcys.machine.satellite_jammer.position", "At %s"); @@ -71,6 +69,7 @@ public static void init(RegistrateLangProvider provider) { provider.add("key.startRocket", "Start RocketEntity"); provider.add("key.categories.gcys", "Gregicality Space"); + // GUIs provider.add("menu.gcys.dyson_sphere.needs_maintenance", "DYSON SPHERE REQUIRES MAINTENANCE"); provider.add("menu.gcys.dyson_sphere.time_since_needed_maintenance", "Time since last maintenance: %s seconds"); provider.add("menu.gcys.dyson_sphere.implosion_chance", "Chance of implosion: %.2f%%");