|
|
|
@ -6,7 +6,7 @@ import net.brokenmoon.redcontrol.blocks.CpuBlock;
|
|
|
|
|
import net.brokenmoon.redcontrol.blocks.DriveBlock;
|
|
|
|
|
import net.brokenmoon.redcontrol.blocks.TerminalBlock;
|
|
|
|
|
import net.brokenmoon.redcontrol.blocks.TerminalEntity;
|
|
|
|
|
import net.brokenmoon.redcontrol.item.BasicFloppy;
|
|
|
|
|
import net.brokenmoon.redcontrol.item.FloppyDisk;
|
|
|
|
|
import net.fabricmc.api.ModInitializer;
|
|
|
|
|
|
|
|
|
|
import net.fabricmc.fabric.api.item.v1.FabricItemSettings;
|
|
|
|
@ -46,7 +46,7 @@ public class RedControl implements ModInitializer {
|
|
|
|
|
public static final DriveBlock DRIVE = new DriveBlock(FabricBlockSettings.create().strength(4.0f));
|
|
|
|
|
|
|
|
|
|
//Items
|
|
|
|
|
public static final BasicFloppy BASIC_FLOPPY = new BasicFloppy(new FabricItemSettings().maxCount(1));
|
|
|
|
|
public static final FloppyDisk FLOPPY_ITEM = new FloppyDisk(new FabricItemSettings().maxCount(1));
|
|
|
|
|
|
|
|
|
|
//Block Entities
|
|
|
|
|
public static final BlockEntityType<CpuEntity> CPU_BLOCK_ENTITY = Registry.register(Registries.BLOCK_ENTITY_TYPE, modloc("cpu_block_entity"), FabricBlockEntityTypeBuilder.create(CpuEntity::new, CPU).build());
|
|
|
|
@ -91,7 +91,7 @@ public class RedControl implements ModInitializer {
|
|
|
|
|
Registry.register(Registries.ITEM, modloc("monitor"), new BlockItem(TERMINAL, new FabricItemSettings()));
|
|
|
|
|
Registry.register(Registries.ITEM, modloc("disk_drive"), new BlockItem(DRIVE, new FabricItemSettings()));
|
|
|
|
|
Registry.register(Registries.ITEM, modloc("squeaky_hammer"), SQUEAKY_HAMMER);
|
|
|
|
|
Registry.register(Registries.ITEM, modloc("basic_disk"), BASIC_FLOPPY);
|
|
|
|
|
Registry.register(Registries.ITEM, modloc("floppy_disk"), FLOPPY_ITEM);
|
|
|
|
|
|
|
|
|
|
//Packets
|
|
|
|
|
ServerPlayNetworking.registerGlobalReceiver(RedControlNetworking.CPU_START, ((server, player, handler, buf, responseSender) -> server.execute(() -> {
|
|
|
|
|