From 93357caf8454eaec8ee7b0be50eab53b4e627d98 Mon Sep 17 00:00:00 2001 From: Boblet Date: Fri, 5 Jun 2026 10:14:11 +0200 Subject: [PATCH] ough --- changelog | 7 +++++-- src/main/java/com/hbm/module/ParseMSES1.java | 10 ++++------ .../tileentity/machine/TileEntityCargoElevator.java | 4 +++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/changelog b/changelog index a8747ba99..0cee0cf1f 100644 --- a/changelog +++ b/changelog @@ -11,8 +11,11 @@ * Industrial grade and minecraft grade copper ingots now have the "ingot" suffix ## Fixed -* Fixed AUTOCAL's `listen` command failing if the buffer is empty +* AUTOCAL + * Fixed `listen` command failing if the buffer is empty + * Fixed variable substitution failing when there is a trailing $ sign * Fixed things not intended to be used in the blast furnace (scrap, lava) being usable fuels * Fixed blast furnace swallowing container items left behind by fuels, instead fuels with containers will not be accepted at all * Fixed the blast furnace NEI screen listing "0 HE" for every recipe even though it's not an electric machine -* Fixed flue gas not having an inventory texture \ No newline at end of file +* Fixed flue gas not having an inventory texture +* Potentially fixed issue with Angelica where tile entity culling would cause cargo elevators to not render on certain angles \ No newline at end of file diff --git a/src/main/java/com/hbm/module/ParseMSES1.java b/src/main/java/com/hbm/module/ParseMSES1.java index fdb4358b4..fc107435a 100644 --- a/src/main/java/com/hbm/module/ParseMSES1.java +++ b/src/main/java/com/hbm/module/ParseMSES1.java @@ -244,13 +244,11 @@ public class ParseMSES1 implements IParse { if(!statement.contains("$")) return statement; String[] frags = statement.split("\\$"); - if(frags.length % 2 == 0 || frags.length < 3) return statement; - // since var names are enclosed with $ signs, we assume that every evenly numbered fragment is a var name - // example: 5 + $val1$ * $val2$ / (-$val3$) - // equals "5 + ", "val1", "* ", "val2", "/ (-", "val3", ")" - // 1 2 3 4 5 6 7 - for(int i = 1; i < frags.length; i += 2) { + // the initial assumption about frag order doesn't work since String.split() doesn't include leading or trailing ""s. + // therefore, we have to figure out whether a leading "" exists and shift the starting index accordingly + int startingIndex = statement.startsWith("$") ? 0 : 1; + for(int i = startingIndex; i < frags.length; i += 2) { // special case, if we try to substitute $buffer$ then read the literal buffer if(frags[i].equals("buffer")) { frags[i] = ctx.buffer; diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityCargoElevator.java b/src/main/java/com/hbm/tileentity/machine/TileEntityCargoElevator.java index 2c4f35911..b4efadd8b 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityCargoElevator.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityCargoElevator.java @@ -5,6 +5,7 @@ import java.util.List; import com.hbm.blocks.BlockDummyable; import com.hbm.blocks.ModBlocks; import com.hbm.tileentity.TileEntityLoadedBase; +import com.hbm.util.Compat; import io.netty.buffer.ByteBuf; import net.minecraft.entity.Entity; @@ -141,7 +142,8 @@ public class TileEntityCargoElevator extends TileEntityLoadedBase { @Override public AxisAlignedBB getRenderBoundingBox() { - int h = 1 + this.height; + // workaround for angelica, extend AABB to build height by default instead of dynamically scaling + int h = Compat.isModLoaded(Compat.MOD_ANG) ? 256 - yCoord : 1 + this.height; if(bb == null || bb.maxY - bb.minY < h) { bb = AxisAlignedBB.getBoundingBox(