From 44dc250a2ba6eabc1f0893e9fe03e76a3e403a16 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 25 Oct 2019 14:48:44 -0400 Subject: [PATCH] Various bugfixes --- core/src/io/anuke/mindustry/mod/Mods.java | 1 + core/src/io/anuke/mindustry/ui/dialogs/ModsDialog.java | 1 + .../anuke/mindustry/world/blocks/distribution/Conveyor.java | 4 ++-- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/src/io/anuke/mindustry/mod/Mods.java b/core/src/io/anuke/mindustry/mod/Mods.java index 53d3de8821..d2483681ef 100644 --- a/core/src/io/anuke/mindustry/mod/Mods.java +++ b/core/src/io/anuke/mindustry/mod/Mods.java @@ -277,6 +277,7 @@ public class Mods implements Loadable{ /** Creates all the content found in mod files. */ public void loadContent(){ + for(LoadedMod mod : loaded){ safeRun(mod, () -> { if(mod.root.child("content").exists()){ diff --git a/core/src/io/anuke/mindustry/ui/dialogs/ModsDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/ModsDialog.java index 1da26156c8..30a03fb412 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/ModsDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/ModsDialog.java @@ -96,6 +96,7 @@ public class ModsDialog extends FloatingDialog{ anyDisabled = true; table.row(); table.addImage().growX().height(4f).pad(6f).color(Pal.gray); + table.row(); } table.table(Styles.black6, t -> { diff --git a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java index 32b0841d4e..5465aa3e93 100644 --- a/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java +++ b/core/src/io/anuke/mindustry/world/blocks/distribution/Conveyor.java @@ -413,12 +413,12 @@ public class Conveyor extends Block implements Autotiler{ static long toLong(int value){ byte[] values = Pack.bytes(value, writeByte); - byte itemid = values[0]; + short itemid = content.item(values[0]).id; float x = values[1] / 127f; float y = ((int)values[2] + 128) / 255f; short[] shorts = writeShort; - shorts[0] = (short)itemid; + shorts[0] = itemid; shorts[1] = (short)(x * Short.MAX_VALUE); shorts[2] = (short)((y - 1f) * Short.MAX_VALUE); return Pack.longShorts(shorts);