diff --git a/src/main/java/net/brokenmoon/redcontrol/RedControl.java b/src/main/java/net/brokenmoon/redcontrol/RedControl.java index b2b80d6..5c39292 100644 --- a/src/main/java/net/brokenmoon/redcontrol/RedControl.java +++ b/src/main/java/net/brokenmoon/redcontrol/RedControl.java @@ -2,6 +2,8 @@ package net.brokenmoon.redcontrol; import net.brokenmoon.redcontrol.blockentities.CpuEntity; import net.brokenmoon.redcontrol.blockentities.MonitorEntity; +import net.brokenmoon.redcontrol.blocks.CpuBlock; +import net.brokenmoon.redcontrol.blocks.MonitorBlock; import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.item.v1.FabricItemSettings; @@ -23,8 +25,8 @@ public class RedControl implements ModInitializer { public static final Logger LOGGER = LoggerFactory.getLogger("redcontrol"); //Blocks - public static final Block CPU = new Block(FabricBlockSettings.create().strength(4.0f)); - public static final Block MONITOR = new Block(FabricBlockSettings.create().strength(4.0f)); + public static final CpuBlock CPU = new CpuBlock(FabricBlockSettings.create().strength(4.0f)); + public static final MonitorBlock MONITOR = new MonitorBlock(FabricBlockSettings.create().strength(4.0f)); //Items //Block Entities diff --git a/src/main/java/net/brokenmoon/redcontrol/api/IRedBusConnectable.java b/src/main/java/net/brokenmoon/redcontrol/api/IRedBusConnectable.java new file mode 100644 index 0000000..6c08e1f --- /dev/null +++ b/src/main/java/net/brokenmoon/redcontrol/api/IRedBusConnectable.java @@ -0,0 +1,4 @@ +package net.brokenmoon.redcontrol.api; + +public interface IRedBusConnectable { +} diff --git a/src/main/java/net/brokenmoon/redcontrol/blockentities/CpuEntity.java b/src/main/java/net/brokenmoon/redcontrol/blockentities/CpuEntity.java index 33ee5ec..84c4b25 100644 --- a/src/main/java/net/brokenmoon/redcontrol/blockentities/CpuEntity.java +++ b/src/main/java/net/brokenmoon/redcontrol/blockentities/CpuEntity.java @@ -4,6 +4,7 @@ import com.simon816.j65el02.Bus; import com.simon816.j65el02.Cpu; import com.simon816.j65el02.device.*; import net.brokenmoon.redcontrol.RedControl; +import net.brokenmoon.redcontrol.api.IRedBusConnectable; import net.minecraft.block.BlockState; import net.minecraft.block.entity.BlockEntity; import net.minecraft.util.math.BlockPos; @@ -15,7 +16,7 @@ import java.util.Timer; import java.util.TimerTask; import java.util.concurrent.Semaphore; -public class CpuEntity extends BlockEntity implements Runnable{ +public class CpuEntity extends BlockEntity implements IRedBusConnectable, Runnable{ static long interruptTimer = 50L; //Adjust as needed to match original clock speed