From 939c640e14f42ff36ed9353fed7e187e9df5daa5 Mon Sep 17 00:00:00 2001 From: simibubi <31564874+simibubi@users.noreply.github.com> Date: Sat, 10 Apr 2021 01:50:13 +0200 Subject: [PATCH] Better address these - Fixed Nixies rendering inconsistently - Fixed belts not showing items under certain conditions - Fixed vertical/sideways belts accepting items from other belts - Spouts can now interact with belts/depots with a mounted funnel --- .../contraptions/relays/belt/BeltTileEntity.java | 13 ++++++++++--- .../logistics/block/redstone/NixieTubeRenderer.java | 6 ++++++ .../behaviour/belt/BeltProcessingBehaviour.java | 8 ++++++-- 3 files changed, 22 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java index 253f54500..1624eb195 100644 --- a/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java +++ b/src/main/java/com/simibubi/create/content/contraptions/relays/belt/BeltTileEntity.java @@ -60,7 +60,6 @@ import net.minecraftforge.fml.DistExecutor; import net.minecraftforge.items.CapabilityItemHandler; import net.minecraftforge.items.IItemHandler; - public class BeltTileEntity extends KineticTileEntity implements LightUpdateListener { public Map passengers; @@ -118,7 +117,8 @@ public class BeltTileEntity extends KineticTileEntity implements LightUpdateList if (light == null && world.isRemote) { initializeLight(); - LightUpdater.getInstance().startListening(getBeltVolume(), this); + LightUpdater.getInstance() + .startListening(getBeltVolume(), this); } getInventory().tick(); @@ -423,6 +423,10 @@ public class BeltTileEntity extends KineticTileEntity implements LightUpdateList private boolean canInsertFrom(Direction side) { if (getSpeed() == 0) return false; + BlockState state = getBlockState(); + if (state.contains(BeltBlock.SLOPE) + && (state.get(BeltBlock.SLOPE) == BeltSlope.SIDEWAYS || state.get(BeltBlock.SLOPE) == BeltSlope.VERTICAL)) + return false; return getMovementFacing() != side.getOpposite(); } @@ -515,7 +519,10 @@ public class BeltTileEntity extends KineticTileEntity implements LightUpdateList @Override public boolean shouldRenderAsTE() { - return isController(); + if (world == null) + return isController(); + BlockState state = getBlockState(); + return state != null && state.contains(BeltBlock.PART) && state.get(BeltBlock.PART) == BeltPart.START; } @Override diff --git a/src/main/java/com/simibubi/create/content/logistics/block/redstone/NixieTubeRenderer.java b/src/main/java/com/simibubi/create/content/logistics/block/redstone/NixieTubeRenderer.java index 34a659bc4..88fe71188 100644 --- a/src/main/java/com/simibubi/create/content/logistics/block/redstone/NixieTubeRenderer.java +++ b/src/main/java/com/simibubi/create/content/logistics/block/redstone/NixieTubeRenderer.java @@ -12,7 +12,9 @@ import com.simibubi.create.foundation.utility.MatrixStacker; import net.minecraft.block.BlockState; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.fonts.TexturedGlyph; import net.minecraft.client.renderer.IRenderTypeBuffer; +import net.minecraft.client.renderer.IRenderTypeBuffer.Impl; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.util.text.Style; @@ -86,6 +88,10 @@ public class NixieTubeRenderer extends SafeTileEntityRenderer