From 9302d35daa3d87f70235c6dc26f1ddda18340383 Mon Sep 17 00:00:00 2001 From: Astoria Date: Sat, 13 Apr 2024 18:33:21 -0500 Subject: [PATCH] Correct speed and dont reset when stopped --- .../net/brokenmoon/redcontrol/blockentities/CpuEntity.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/brokenmoon/redcontrol/blockentities/CpuEntity.java b/src/main/java/net/brokenmoon/redcontrol/blockentities/CpuEntity.java index cfd258b..1036a4e 100644 --- a/src/main/java/net/brokenmoon/redcontrol/blockentities/CpuEntity.java +++ b/src/main/java/net/brokenmoon/redcontrol/blockentities/CpuEntity.java @@ -45,12 +45,12 @@ public class CpuEntity extends Peripheral implements CpuControl { be.notTicked = false; } if(be.state == CpuState.RUNNING) { - for (int i = 0; i < 1000; i++) + for (int i = 0; i < 500; i++) be.step(); } else{ if (be.state == CpuState.RESET && be.resetTimer > 0){ be.resetTimer--; - } else { + } else if(be.state == CpuState.RESET) { be.core = new Emulator(be.getBus().getRedBus()); } }