FIX
This commit is contained in:
@@ -19,9 +19,6 @@ import net.minecraft.network.chat.MutableComponent;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraftforge.client.event.RenderGuiOverlayEvent;
|
||||
import net.minecraftforge.client.gui.overlay.VanillaGuiOverlay;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import org.lwjgl.glfw.GLFW;
|
||||
|
||||
public final class KeyboardScreen extends Screen {
|
||||
|
||||
@@ -162,7 +162,7 @@ public abstract class AbstractVirtualMachine implements VirtualMachine {
|
||||
return;
|
||||
}
|
||||
|
||||
setBootError(null);
|
||||
setBootError(Component.literal(""));
|
||||
setRunState(VMRunState.LOADING_DEVICES);
|
||||
loadDevicesDelay = 0;
|
||||
}
|
||||
@@ -343,12 +343,14 @@ public abstract class AbstractVirtualMachine implements VirtualMachine {
|
||||
}
|
||||
|
||||
if (!state.board.isRunning()) {
|
||||
|
||||
stopRunnerAndReset();
|
||||
return;
|
||||
}
|
||||
|
||||
if (!consumeEnergy(busController.getEnergyConsumption(), false)) {
|
||||
error(Component.translatable(Constants.COMPUTER_ERROR_NOT_ENOUGH_ENERGY));
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -760,12 +760,15 @@ public final class Terminal {
|
||||
if (shader == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
RenderSystem.depthMask(false);
|
||||
RenderSystem.setShaderTexture(0, LOCATION_FONT_TEXTURE);
|
||||
|
||||
for (final VertexBuffer line : lines) {
|
||||
line.drawWithShader(stack.last().pose(), projectionMatrix, shader);
|
||||
try {
|
||||
line.drawWithShader(stack.last().pose(), projectionMatrix, shader);
|
||||
} catch (Exception e) {
|
||||
System.out.println("ERROR: " + e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
RenderSystem.depthMask(true);
|
||||
@@ -776,13 +779,14 @@ public final class Terminal {
|
||||
return;
|
||||
}
|
||||
|
||||
final BufferBuilder builder = Tesselator.getInstance().getBuilder();
|
||||
|
||||
|
||||
final int mask = dirty.getAndSet(0);
|
||||
for (int row = 0; row < lines.length; row++) {
|
||||
if ((mask & (1 << row)) == 0) {
|
||||
continue;
|
||||
}
|
||||
BufferBuilder builder = Tesselator.getInstance().getBuilder();
|
||||
|
||||
final Matrix4f matrix = Matrix4f.createTranslateMatrix(0, row * CHAR_HEIGHT, 0);
|
||||
|
||||
@@ -797,9 +801,9 @@ public final class Terminal {
|
||||
lines[row] = new VertexBuffer();
|
||||
}
|
||||
|
||||
|
||||
|
||||
lines[row].upload(rb);
|
||||
if (!lines[row].isInvalid() && !rb.isEmpty()) {
|
||||
lines[row].upload(rb);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user