1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-10-31 05:33:00 +00:00

Merge branch 'mc-1.20.x' into mc-1.21.x

This commit is contained in:
Jonathan Coates
2024-11-23 09:16:48 +00:00
12 changed files with 22 additions and 44 deletions

View File

@@ -178,7 +178,7 @@ public class MonitorBlockEntityRenderer implements BlockEntityRenderer<MonitorBl
var size = DirectFixedWidthFontRenderer.getVertexCount(terminal);
// In an ideal world we could upload these both into one buffer. However, we can't render VBOs with
// and starting and ending offset, and so need to use two buffers instead.
// a starting and ending offset, and so need to use two buffers instead.
renderToBuffer(backgroundBuffer, size, sink ->
DirectFixedWidthFontRenderer.drawTerminalBackground(sink, 0, 0, terminal, yMargin, yMargin, xMargin, xMargin));
@@ -216,10 +216,10 @@ public class MonitorBlockEntityRenderer implements BlockEntityRenderer<MonitorBl
foregroundBuffer.bind();
foregroundBuffer.drawWithShader(
modelView, RenderSystem.getProjectionMatrix(), RenderTypes.getTerminalShader(),
// As mentioned in the above comment, render the extra cursor quad if it is visible this frame. Each
// // quad has an index count of 6.
// Skip the cursor quad if it is not visible this frame.
FixedWidthFontRenderer.isCursorVisible(terminal) && FrameInfo.getGlobalCursorBlink()
? foregroundBuffer.getIndexCount() + 6 : foregroundBuffer.getIndexCount()
? foregroundBuffer.getIndexCount()
: foregroundBuffer.getIndexCount() - RenderTypes.TERMINAL.mode().indexCount(4)
);
// Clear state

View File

@@ -121,7 +121,7 @@ public final class CustomLecternBlockEntity extends BlockEntity implements MenuP
@Override
public CompoundTag getUpdateTag(HolderLookup.Provider registries) {
var tag = super.getUpdateTag(registries);
tag.put(NBT_ITEM, item.save(registries));
if (!item.isEmpty()) tag.put(NBT_ITEM, item.save(registries));
return tag;
}

View File

@@ -485,7 +485,7 @@ public class MonitorBlockEntity extends BlockEntity {
var monitor = getLoadedMonitor(x, y).getMonitor();
if (monitor == null) continue;
computers.forEach(fun);
monitor.computers.forEach(fun);
}
}
}

View File

@@ -16,6 +16,7 @@
"block.computercraft.monitor_advanced": "Erweiterter Monitor",
"block.computercraft.monitor_normal": "Monitor",
"block.computercraft.printer": "Drucker",
"block.computercraft.redstone_relay": "Redstone Relais",
"block.computercraft.speaker": "Lautsprecher",
"block.computercraft.turtle_advanced": "Erweiterte Turtle",
"block.computercraft.turtle_advanced.upgraded": "Erweiterte Turtle (%s)",