|
|
|
@ -49,12 +49,6 @@ public class CpuBlock extends NetworkCarrier {
|
|
|
|
|
public ActionResult onUse(BlockState state, World world, BlockPos pos, PlayerEntity player, Hand hand, BlockHitResult hit) {
|
|
|
|
|
super.onUse(state,world,pos,player,hand,hit);
|
|
|
|
|
if (!world.isClient) {
|
|
|
|
|
CpuEntity peripheral = (CpuEntity) world.getBlockEntity(pos);
|
|
|
|
|
player.sendMessage(Text.literal("Cpu Debug: "), false);
|
|
|
|
|
player.sendMessage(Text.literal(" " + Integer.toHexString(peripheral.getBus().hashCode())), false);
|
|
|
|
|
player.sendMessage(Text.literal(" " + Integer.toHexString(peripheral.core.cpu.getBus().getRedBus().hashCode())), false);
|
|
|
|
|
player.sendMessage(Text.literal(" " + Integer.toHexString(peripheral.i)), false);
|
|
|
|
|
player.sendMessage(Text.literal(" " + peripheral.core.isWaitingOnInterrupt()), false);
|
|
|
|
|
PacketByteBuf byteBuf = PacketByteBufs.create();
|
|
|
|
|
byteBuf.writeBlockPos(pos);
|
|
|
|
|
ServerPlayNetworking.send((ServerPlayerEntity) player, RedControlNetworking.CPUGUI_PACKET_ID,byteBuf);
|
|
|
|
|