From 4f43020509ab65d17ba645394514ede7c9d52c97 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 20 Jun 2026 16:04:52 -0400 Subject: [PATCH 1/6] Removed accidental debug --- core/src/mindustry/graphics/BlockRenderer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/graphics/BlockRenderer.java b/core/src/mindustry/graphics/BlockRenderer.java index 36b95cb537..2f9daf5931 100644 --- a/core/src/mindustry/graphics/BlockRenderer.java +++ b/core/src/mindustry/graphics/BlockRenderer.java @@ -670,7 +670,7 @@ public class BlockRenderer{ drawDestroyed(); - if(chunksToDraw.size > 0 && !input.keyDown(KeyCode.y)){ + if(chunksToDraw.size > 0){ for(int mlayer = 0; mlayer < BuildingCacheLayer.amount; mlayer++){ int layer = mlayer; From 5a83175d96c07e9be90af3f9e361c7f9d7ad537d Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 20 Jun 2026 16:21:25 -0400 Subject: [PATCH 2/6] Fixed NaN black screen after editor --- core/src/mindustry/editor/MapView.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/src/mindustry/editor/MapView.java b/core/src/mindustry/editor/MapView.java index e030350238..0190b0081d 100644 --- a/core/src/mindustry/editor/MapView.java +++ b/core/src/mindustry/editor/MapView.java @@ -233,6 +233,9 @@ public class MapView extends Element implements GestureListener{ @Override public void draw(){ + //can cause NaN + if(editor.width() == 0 || editor.height() == 0) return; + float ratio = 1f / ((float)editor.width() / editor.height()); float size = Math.min(width, height); float sclwidth = size * zoom; From 7542587558c495e94f9d442896a6e1df20103598 Mon Sep 17 00:00:00 2001 From: Wu Shuwen Date: Sun, 21 Jun 2026 04:34:21 +0800 Subject: [PATCH 3/6] fix: skip unrecognized block IDs in client plan deserialization (#12244) Prevent NullPointerException when a client sends a plan with a block ID the server doesn't recognize (e.g. from a modded client). Skip the plan entry instead of crashing. Fixes #12243 --- core/src/mindustry/io/TypeIO.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/src/mindustry/io/TypeIO.java b/core/src/mindustry/io/TypeIO.java index 5f3f4cfd76..001791450a 100644 --- a/core/src/mindustry/io/TypeIO.java +++ b/core/src/mindustry/io/TypeIO.java @@ -630,6 +630,12 @@ public class TypeIO{ int x = read.us(); int y = read.us(); Block block = Vars.content.block(read.us()); + if(block == null){ + // Skip unrecognised block IDs (e.g. from a modded client) + read.b(); // consume rotation byte + readClientPlanConfig(read); // consume config + continue; + } int rotation = (block.rotate ? read.b() : 0); Object config = readClientPlanConfig(read); BuildPlan plan = new BuildPlan(x, y, rotation, block, config); From 04e74cba01848793e3d05fbe13e620dcb02b0f3a Mon Sep 17 00:00:00 2001 From: ZenthXSin <13437823821@163.com> Date: Sun, 21 Jun 2026 04:35:56 +0800 Subject: [PATCH 4/6] Fix NullPointerException in LogicBlock.updateLinks() when linksVar is null (#12241) Co-authored-by: 488254306 <488254306@qq.com> --- core/src/mindustry/world/blocks/logic/LogicBlock.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/mindustry/world/blocks/logic/LogicBlock.java b/core/src/mindustry/world/blocks/logic/LogicBlock.java index 42b5ef55ee..31c86b1bd2 100644 --- a/core/src/mindustry/world/blocks/logic/LogicBlock.java +++ b/core/src/mindustry/world/blocks/logic/LogicBlock.java @@ -575,6 +575,8 @@ public class LogicBlock extends Block{ } public void updateLinks(){ + if(linksVar == null) return; + int valids = links.count(l -> l.valid); executor.links = new Building[valids]; executor.linkIds.clear(); From dfcfabec6628e89d19d4b02b36700eca6af9c915 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 20 Jun 2026 17:33:11 -0400 Subject: [PATCH 5/6] Crash fix --- core/src/mindustry/core/PerfCounter.java | 1 + core/src/mindustry/editor/data/MapContentView.java | 2 +- core/src/mindustry/mod/DataPatcher.java | 14 +++++++------- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/core/src/mindustry/core/PerfCounter.java b/core/src/mindustry/core/PerfCounter.java index b115b9d575..88300da7c5 100644 --- a/core/src/mindustry/core/PerfCounter.java +++ b/core/src/mindustry/core/PerfCounter.java @@ -22,6 +22,7 @@ public enum PerfCounter{ private long beginTime; private boolean began = false; private WindowedMean mean = new WindowedMean(meanWindow); + // public void begin(){ began = true; diff --git a/core/src/mindustry/editor/data/MapContentView.java b/core/src/mindustry/editor/data/MapContentView.java index e05535436f..224e8b4afb 100644 --- a/core/src/mindustry/editor/data/MapContentView.java +++ b/core/src/mindustry/editor/data/MapContentView.java @@ -82,7 +82,7 @@ public class MapContentView implements AssetView{ list.add().size(h); } - list.button(content.content instanceof UnlockableContent u && (u.uiIcon.found() || u.fullIcon.found()) ? new TextureRegionDrawable(u.uiIcon.found() ? u.uiIcon : u.fullIcon) : + list.button(content.content instanceof UnlockableContent u && u.uiIcon != null && (u.uiIcon.found() || u.fullIcon.found()) ? new TextureRegionDrawable(u.uiIcon.found() ? u.uiIcon : u.fullIcon) : contentIcons.get(content.type, Icon.warning), Styles.graySquarei, iconMed, () -> {}).touchable(Touchable.disabled).size(h); list.button(("[accent]" + content.name + "\n") + "[lightgray]" + Core.bundle.get("content." + content.type), Styles.grayt, () -> { diff --git a/core/src/mindustry/mod/DataPatcher.java b/core/src/mindustry/mod/DataPatcher.java index 2ac173fc97..773ccfdf11 100644 --- a/core/src/mindustry/mod/DataPatcher.java +++ b/core/src/mindustry/mod/DataPatcher.java @@ -197,13 +197,6 @@ public class DataPatcher{ parser.finishParsing(); - for(var errored : dpMod.erroredContent){ - if(errored.minfo.error != null && errored.minfo.asset != null){ - errored.minfo.asset.warnings.add(errored.minfo.error); - } - Vars.content.remove(errored); - } - addedContent.clear(); Seq all = addedContent; @@ -211,6 +204,13 @@ public class DataPatcher{ all.addAll(arr.select(c -> c.minfo.mod == dpMod)); } + for(var errored : dpMod.erroredContent){ + if(errored.minfo.error != null && errored.minfo.asset != null){ + errored.minfo.asset.warnings.add(errored.minfo.error); + } + Vars.content.remove(errored); + } + for(var cont : all){ try{ cont.init(); From aa82a26e1db9eba43fbb100a08a080d446a7f62d Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 20 Jun 2026 17:33:27 -0400 Subject: [PATCH 6/6] Crash fix --- core/src/mindustry/core/PerfCounter.java | 1 - 1 file changed, 1 deletion(-) diff --git a/core/src/mindustry/core/PerfCounter.java b/core/src/mindustry/core/PerfCounter.java index 88300da7c5..b115b9d575 100644 --- a/core/src/mindustry/core/PerfCounter.java +++ b/core/src/mindustry/core/PerfCounter.java @@ -22,7 +22,6 @@ public enum PerfCounter{ private long beginTime; private boolean began = false; private WindowedMean mean = new WindowedMean(meanWindow); - // public void begin(){ began = true;