From 8a6be0ce81d935551ab2ebc9c4e7d41b88297957 Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Sun, 3 Nov 2024 02:40:23 -0500 Subject: Update to current --- src/main/java/net/cshift/mc/sparkt/SparktInit.java | 32 +++++++++ .../java/net/cshift/mc/sparkt/block/Blocks.java | 50 +++++++++++++ .../net/cshift/mc/sparkt/block/DriverElectric.java | 31 ++++++++ .../cshift/mc/sparkt/block/DriverMechanical.java | 32 +++++++++ .../net/cshift/mc/sparkt/block/MachineBlock.java | 67 ++++++++++++++++++ .../net/cshift/mc/sparkt/block/MachineFrame.java | 17 +++++ .../net/cshift/mc/sparkt/block/MachineFurnace.java | 23 ++++++ .../net/cshift/mc/sparkt/block/MachineGrinder.java | 23 ++++++ src/main/java/net/cshift/mc/sparkt/block/Wire.java | 44 ++++++++++++ .../mc/sparkt/block/entity/BlockEntityTypes.java | 36 ++++++++++ .../sparkt/block/entity/MachineDriverEntity.java | 60 ++++++++++++++++ .../mc/sparkt/block/entity/MachineNodeEntity.java | 59 ++++++++++++++++ .../cshift/mc/sparkt/block/entity/WireEntity.java | 82 ++++++++++++++++++++++ .../net/cshift/mc/sparkt/item/HeatingElement.java | 11 +++ .../net/cshift/mc/sparkt/item/IngotTungsten.java | 11 +++ src/main/java/net/cshift/mc/sparkt/item/Items.java | 20 ++++++ .../net/cshift/mc/sparkt/item/RawTungsten.java | 11 +++ .../mc/sparkt/netcode/ClientRenderNetwork.java | 5 ++ .../net/cshift/mc/sparkt/netcode/NetConstants.java | 10 +++ .../mc/sparkt/netcode/ServerRenderNetwork.java | 10 +++ .../mc/sparkt/netcode/payload/DeliveryPayload.java | 22 ++++++ .../mc/sparkt/netcode/payload/ProgressPayload.java | 19 +++++ .../mc/sparkt/netcode/payload/TransitPayload.java | 25 +++++++ src/main/java/net/cshift/sparkt/SparktInit.java | 22 ------ src/main/java/net/cshift/sparkt/block/Blocks.java | 32 --------- .../net/cshift/sparkt/block/DriverMechanical.java | 9 --- .../java/net/cshift/sparkt/block/MachineBlock.java | 28 -------- .../net/cshift/sparkt/block/MachineFurnace.java | 9 --- .../net/cshift/sparkt/block/MachineGrinder.java | 9 --- src/main/java/net/cshift/sparkt/block/Wire.java | 11 --- .../sparkt/block/entity/BlockEntityTypes.java | 22 ------ .../sparkt/block/entity/MachineFurnaceEntity.java | 61 ---------------- .../cshift/sparkt/block/entity/MachineNode.java | 59 ---------------- 33 files changed, 700 insertions(+), 262 deletions(-) create mode 100644 src/main/java/net/cshift/mc/sparkt/SparktInit.java create mode 100644 src/main/java/net/cshift/mc/sparkt/block/Blocks.java create mode 100644 src/main/java/net/cshift/mc/sparkt/block/DriverElectric.java create mode 100644 src/main/java/net/cshift/mc/sparkt/block/DriverMechanical.java create mode 100644 src/main/java/net/cshift/mc/sparkt/block/MachineBlock.java create mode 100644 src/main/java/net/cshift/mc/sparkt/block/MachineFrame.java create mode 100644 src/main/java/net/cshift/mc/sparkt/block/MachineFurnace.java create mode 100644 src/main/java/net/cshift/mc/sparkt/block/MachineGrinder.java create mode 100644 src/main/java/net/cshift/mc/sparkt/block/Wire.java create mode 100644 src/main/java/net/cshift/mc/sparkt/block/entity/BlockEntityTypes.java create mode 100644 src/main/java/net/cshift/mc/sparkt/block/entity/MachineDriverEntity.java create mode 100644 src/main/java/net/cshift/mc/sparkt/block/entity/MachineNodeEntity.java create mode 100644 src/main/java/net/cshift/mc/sparkt/block/entity/WireEntity.java create mode 100644 src/main/java/net/cshift/mc/sparkt/item/HeatingElement.java create mode 100644 src/main/java/net/cshift/mc/sparkt/item/IngotTungsten.java create mode 100644 src/main/java/net/cshift/mc/sparkt/item/Items.java create mode 100644 src/main/java/net/cshift/mc/sparkt/item/RawTungsten.java create mode 100644 src/main/java/net/cshift/mc/sparkt/netcode/ClientRenderNetwork.java create mode 100644 src/main/java/net/cshift/mc/sparkt/netcode/NetConstants.java create mode 100644 src/main/java/net/cshift/mc/sparkt/netcode/ServerRenderNetwork.java create mode 100644 src/main/java/net/cshift/mc/sparkt/netcode/payload/DeliveryPayload.java create mode 100644 src/main/java/net/cshift/mc/sparkt/netcode/payload/ProgressPayload.java create mode 100644 src/main/java/net/cshift/mc/sparkt/netcode/payload/TransitPayload.java delete mode 100644 src/main/java/net/cshift/sparkt/SparktInit.java delete mode 100644 src/main/java/net/cshift/sparkt/block/Blocks.java delete mode 100644 src/main/java/net/cshift/sparkt/block/DriverMechanical.java delete mode 100644 src/main/java/net/cshift/sparkt/block/MachineBlock.java delete mode 100644 src/main/java/net/cshift/sparkt/block/MachineFurnace.java delete mode 100644 src/main/java/net/cshift/sparkt/block/MachineGrinder.java delete mode 100644 src/main/java/net/cshift/sparkt/block/Wire.java delete mode 100644 src/main/java/net/cshift/sparkt/block/entity/BlockEntityTypes.java delete mode 100644 src/main/java/net/cshift/sparkt/block/entity/MachineFurnaceEntity.java delete mode 100644 src/main/java/net/cshift/sparkt/block/entity/MachineNode.java (limited to 'src/main/java/net/cshift') diff --git a/src/main/java/net/cshift/mc/sparkt/SparktInit.java b/src/main/java/net/cshift/mc/sparkt/SparktInit.java new file mode 100644 index 0000000..f35c094 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/SparktInit.java @@ -0,0 +1,32 @@ +package net.cshift.mc.sparkt; + +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; + +import net.cshift.mc.sparkt.block.Blocks; +import net.cshift.mc.sparkt.block.entity.BlockEntityTypes; +import net.cshift.mc.sparkt.item.Items; +import net.cshift.mc.sparkt.netcode.payload.DeliveryPayload; +import net.cshift.mc.sparkt.netcode.payload.TransitPayload; +import net.fabricmc.api.ModInitializer; +import net.fabricmc.fabric.api.networking.v1.PayloadTypeRegistry; + +public class SparktInit implements ModInitializer { + + public static final Logger LOG = LogManager.getFormatterLogger("Sparkt/Init"); + public static final String MODID = "sparkt"; + + @Override + public void onInitialize() { + LOG.info("Preparing to spark a reaction!"); + Blocks.register(); + Items.register(); + BlockEntityTypes.register(); + + PayloadTypeRegistry.playS2C().register(DeliveryPayload.ID, DeliveryPayload.CODEC); + // PayloadTypeRegistry.playS2C().register(ProgressPayload.ID, ProgressPayload.CODEC); + PayloadTypeRegistry.playS2C().register(TransitPayload.ID, TransitPayload.CODEC); + } + + +} diff --git a/src/main/java/net/cshift/mc/sparkt/block/Blocks.java b/src/main/java/net/cshift/mc/sparkt/block/Blocks.java new file mode 100644 index 0000000..e7cdd47 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/block/Blocks.java @@ -0,0 +1,50 @@ +package net.cshift.mc.sparkt.block; + +import net.cshift.mc.sparkt.SparktInit; +import net.minecraft.block.Block; +import net.minecraft.block.ExperienceDroppingBlock; +import net.minecraft.block.AbstractBlock.Settings; +import net.minecraft.item.BlockItem; +import net.minecraft.item.Item; +import net.minecraft.util.Identifier; +import net.minecraft.util.math.intprovider.ConstantIntProvider; +import net.minecraft.registry.*; + +public class Blocks { + + public static final Block MACHINE_FRAME = new MachineFrame(Settings.create().strength(1, 1)); + public static final Block MACHINE_FURNACE = new MachineFurnace(Settings.create().strength(1, 1)); + public static final Block DRIVER_MECHANICAL = new DriverMechanical(Settings.create().strength(1, 1)); + public static final Block DRIVER_ELECTRIC = new DriverElectric(Settings.create().strength(1, 1)); + public static final Block MACHINE_GRINDER = new MachineGrinder(Settings.create().strength(1, 1)); + public static final Block WIRE = new Wire(Settings.create().strength(1, 1)); + + public static final Block ORE_TUNGSTEN = new ExperienceDroppingBlock(ConstantIntProvider.create(0), Settings.create().requiresTool().strength(3.0f, 3.0f)); + public static final Block ORE_DEEPSLATE_TUNGSTEN = new ExperienceDroppingBlock(ConstantIntProvider.create(0), Settings.create().requiresTool().strength(3.0f, 3.0f)); + + public static void register() { + Registry.register(Registries.BLOCK, Identifier.of(SparktInit.MODID, "machine_frame"), MACHINE_FRAME); + Registry.register(Registries.ITEM, Identifier.of(SparktInit.MODID, "machine_frame"), new BlockItem(MACHINE_FRAME, new Item.Settings())); + + Registry.register(Registries.BLOCK, Identifier.of(SparktInit.MODID, "machine_furnace"), MACHINE_FURNACE); + Registry.register(Registries.ITEM, Identifier.of(SparktInit.MODID, "machine_furnace"), new BlockItem(MACHINE_FURNACE, new Item.Settings())); + + Registry.register(Registries.BLOCK, Identifier.of(SparktInit.MODID, "machine_grinder"), MACHINE_GRINDER); + Registry.register(Registries.ITEM, Identifier.of(SparktInit.MODID, "machine_grinder"), new BlockItem(MACHINE_GRINDER, new Item.Settings())); + + Registry.register(Registries.BLOCK, Identifier.of(SparktInit.MODID, "driver_mechanical"), DRIVER_MECHANICAL); + Registry.register(Registries.ITEM, Identifier.of(SparktInit.MODID, "driver_mechanical"), new BlockItem(DRIVER_MECHANICAL, new Item.Settings())); + + Registry.register(Registries.BLOCK, Identifier.of(SparktInit.MODID, "driver_electric"), DRIVER_ELECTRIC); + Registry.register(Registries.ITEM, Identifier.of(SparktInit.MODID, "driver_electric"), new BlockItem(DRIVER_ELECTRIC, new Item.Settings())); + + Registry.register(Registries.BLOCK, Identifier.of(SparktInit.MODID, "ore_tungsten"), ORE_TUNGSTEN); + Registry.register(Registries.ITEM, Identifier.of(SparktInit.MODID, "ore_tungsten"), new BlockItem(ORE_TUNGSTEN, new Item.Settings())); + + Registry.register(Registries.BLOCK, Identifier.of(SparktInit.MODID, "ore_deepslate_tungsten"), ORE_DEEPSLATE_TUNGSTEN); + Registry.register(Registries.ITEM, Identifier.of(SparktInit.MODID, "ore_deepslate_tungsten"), new BlockItem(ORE_DEEPSLATE_TUNGSTEN, new Item.Settings())); + + Registry.register(Registries.BLOCK, Identifier.of(SparktInit.MODID, "wire"), WIRE); + Registry.register(Registries.ITEM, Identifier.of(SparktInit.MODID, "wire"), new BlockItem(WIRE, new Item.Settings())); + } +} diff --git a/src/main/java/net/cshift/mc/sparkt/block/DriverElectric.java b/src/main/java/net/cshift/mc/sparkt/block/DriverElectric.java new file mode 100644 index 0000000..31ed63b --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/block/DriverElectric.java @@ -0,0 +1,31 @@ +package net.cshift.mc.sparkt.block; + +import com.mojang.serialization.MapCodec; + +import net.cshift.mc.sparkt.block.entity.MachineDriverEntity; +import net.minecraft.block.BlockState; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.util.math.BlockPos; + +public class DriverElectric extends MachineBlock{ + public static final MapCodec CODEC = createCodec(DriverElectric::new); + + public MapCodec getCodec() { + return CODEC; + } + + public DriverElectric(Settings settings) { + super(settings); + } + + @Override + public BlockEntity createBlockEntity(BlockPos var1, BlockState var2) { + return new MachineDriverEntity(var1, var2); + } + + @Override + public BlockState getPlacementState(ItemPlacementContext ctx) { + return (BlockState)this.getDefaultState().with(FACING, ctx.getPlayerLookDirection().getOpposite()); + } +} \ No newline at end of file diff --git a/src/main/java/net/cshift/mc/sparkt/block/DriverMechanical.java b/src/main/java/net/cshift/mc/sparkt/block/DriverMechanical.java new file mode 100644 index 0000000..c1f5954 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/block/DriverMechanical.java @@ -0,0 +1,32 @@ +package net.cshift.mc.sparkt.block; + +import com.mojang.serialization.MapCodec; + +import net.cshift.mc.sparkt.block.entity.MachineDriverEntity; +import net.minecraft.block.BlockState; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.util.math.BlockPos; + +public class DriverMechanical extends MachineBlock{ + + public static final MapCodec CODEC = createCodec(DriverMechanical::new); + + public MapCodec getCodec() { + return CODEC; + } + + public DriverMechanical(Settings settings) { + super(settings); + } + + @Override + public BlockEntity createBlockEntity(BlockPos var1, BlockState var2) { + return new MachineDriverEntity(var1, var2); + } + + @Override + public BlockState getPlacementState(ItemPlacementContext ctx) { + return (BlockState)this.getDefaultState().with(FACING, ctx.getPlayerLookDirection().getOpposite()); + } +} diff --git a/src/main/java/net/cshift/mc/sparkt/block/MachineBlock.java b/src/main/java/net/cshift/mc/sparkt/block/MachineBlock.java new file mode 100644 index 0000000..92e95f2 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/block/MachineBlock.java @@ -0,0 +1,67 @@ +package net.cshift.mc.sparkt.block; + +import com.mojang.serialization.MapCodec; + +import net.cshift.mc.sparkt.block.entity.MachineNodeEntity; +import net.minecraft.block.AbstractBlock; +import net.minecraft.block.Block; +import net.minecraft.block.BlockRenderType; +import net.minecraft.block.BlockState; +import net.minecraft.block.BlockWithEntity; +import net.minecraft.block.FacingBlock; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.entity.LivingEntity; +import net.minecraft.item.ItemPlacementContext; +import net.minecraft.item.ItemStack; +import net.minecraft.state.StateManager; +import net.minecraft.state.property.*; +import net.minecraft.util.math.BlockPos; +import net.minecraft.util.math.Direction; +import net.minecraft.world.World; + +public abstract class MachineBlock extends BlockWithEntity { + public static final DirectionProperty FACING; + public static final BooleanProperty ACTIVE; + + public MachineBlock(AbstractBlock.Settings settings) { + super(settings); + this.setDefaultState( + this.stateManager + .getDefaultState() + .with(FACING, Direction.NORTH) + .with(ACTIVE, false) + ); + } + + @Override + public BlockRenderType getRenderType(BlockState state) { + return BlockRenderType.MODEL; + } + + @Override + public BlockEntity createBlockEntity(BlockPos var1, BlockState var2) { + return new MachineNodeEntity(var1, var2); + } + + @Override + public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) { + super.onPlaced(world, pos, state, placer, itemStack); + } + + public BlockState getPlacementState(ItemPlacementContext ctx) { + return (BlockState)this.getDefaultState().with(FACING, ctx.getHorizontalPlayerFacing().getOpposite()); + } + + @Override + protected void appendProperties(StateManager.Builder builder) { + super.appendProperties(builder); + builder.add(new Property[]{FACING, ACTIVE}); + } + + protected abstract MapCodec getCodec(); + + static { + FACING = FacingBlock.FACING; + ACTIVE = Properties.LIT; + } +} diff --git a/src/main/java/net/cshift/mc/sparkt/block/MachineFrame.java b/src/main/java/net/cshift/mc/sparkt/block/MachineFrame.java new file mode 100644 index 0000000..10f6314 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/block/MachineFrame.java @@ -0,0 +1,17 @@ +package net.cshift.mc.sparkt.block; + +import com.mojang.serialization.MapCodec; + +import net.minecraft.block.AbstractBlock; + +public class MachineFrame extends MachineBlock{ + public static final MapCodec CODEC = createCodec(MachineFrame::new); + + public MapCodec getCodec() { + return CODEC; + } + + public MachineFrame(AbstractBlock.Settings settings) { + super(settings); + } +} diff --git a/src/main/java/net/cshift/mc/sparkt/block/MachineFurnace.java b/src/main/java/net/cshift/mc/sparkt/block/MachineFurnace.java new file mode 100644 index 0000000..0ae61e0 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/block/MachineFurnace.java @@ -0,0 +1,23 @@ +package net.cshift.mc.sparkt.block; + +import com.mojang.serialization.MapCodec; + +import net.minecraft.util.math.Direction; + +public class MachineFurnace extends MachineBlock{ + public static final MapCodec CODEC = createCodec(MachineFurnace::new); + + public MapCodec getCodec() { + return CODEC; + } + + public MachineFurnace(Settings settings) { + super(settings); + this.setDefaultState( + this.stateManager + .getDefaultState() + .with(FACING, Direction.NORTH) + .with(ACTIVE, true) + ); + } +} diff --git a/src/main/java/net/cshift/mc/sparkt/block/MachineGrinder.java b/src/main/java/net/cshift/mc/sparkt/block/MachineGrinder.java new file mode 100644 index 0000000..87c7808 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/block/MachineGrinder.java @@ -0,0 +1,23 @@ +package net.cshift.mc.sparkt.block; + +import com.mojang.serialization.MapCodec; + +import net.minecraft.util.math.Direction; + +public class MachineGrinder extends MachineBlock{ + public static final MapCodec CODEC = createCodec(MachineGrinder::new); + + public MapCodec getCodec() { + return CODEC; + } + + public MachineGrinder(Settings settings) { + super(settings); + this.setDefaultState( + this.stateManager + .getDefaultState() + .with(FACING, Direction.NORTH) + .with(ACTIVE, true) + ); + } +} diff --git a/src/main/java/net/cshift/mc/sparkt/block/Wire.java b/src/main/java/net/cshift/mc/sparkt/block/Wire.java new file mode 100644 index 0000000..3ad78ed --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/block/Wire.java @@ -0,0 +1,44 @@ +package net.cshift.mc.sparkt.block; + +import org.jetbrains.annotations.Nullable; + +import com.mojang.serialization.MapCodec; + +import net.cshift.mc.sparkt.block.entity.BlockEntityTypes; +import net.cshift.mc.sparkt.block.entity.WireEntity; +import net.minecraft.block.BlockState; +import net.minecraft.block.BlockWithEntity; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.block.entity.BlockEntityTicker; +import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class Wire extends BlockWithEntity { + public static final MapCodec CODEC = createCodec(Wire::new); + + public MapCodec getCodec() { + return CODEC; + } + + public Wire(Settings settings) { + super(settings); + } + + @Override + public BlockEntity createBlockEntity(BlockPos var1, BlockState var2) { + return new WireEntity(var1, var2); + } + + @Override + public BlockEntityTicker getTicker(World world, BlockState state, + BlockEntityType type) { + // TODO Auto-generated method stub + return validateTicker(world, type, BlockEntityTypes.WIRE_ENTITY); + } + + @Nullable + protected static BlockEntityTicker validateTicker(World world, BlockEntityType givenType, BlockEntityType expectedType) { + return world.isClient ? null : validateTicker(givenType, expectedType, WireEntity::tick); + } +} diff --git a/src/main/java/net/cshift/mc/sparkt/block/entity/BlockEntityTypes.java b/src/main/java/net/cshift/mc/sparkt/block/entity/BlockEntityTypes.java new file mode 100644 index 0000000..102cc00 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/block/entity/BlockEntityTypes.java @@ -0,0 +1,36 @@ +package net.cshift.mc.sparkt.block.entity; + +import net.cshift.mc.sparkt.SparktInit; +import net.cshift.mc.sparkt.block.Blocks; +import net.minecraft.block.Block; +import net.minecraft.block.entity.BlockEntityType; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.util.Identifier; + +public class BlockEntityTypes { + + public static final BlockEntityType MACHINE_BLOCK_ENTITY = Registry.register( + Registries.BLOCK_ENTITY_TYPE, + Identifier.of(SparktInit.MODID, "machine_node_entity"), + net.minecraft.block.entity.BlockEntityType.Builder.create(MachineNodeEntity::new, new Block[]{Blocks.MACHINE_FRAME, Blocks.MACHINE_FURNACE, Blocks.MACHINE_GRINDER}).build() + ); + + public static final BlockEntityType MACHINE_DRIVER_ENTITY = Registry.register( + Registries.BLOCK_ENTITY_TYPE, + Identifier.of(SparktInit.MODID, "machine_driver_entity"), + net.minecraft.block.entity.BlockEntityType.Builder.create(MachineDriverEntity::new, new Block[]{Blocks.DRIVER_MECHANICAL, Blocks.DRIVER_ELECTRIC}).build() + ); + + public static final BlockEntityType WIRE_ENTITY = Registry.register( + Registries.BLOCK_ENTITY_TYPE, + Identifier.of(SparktInit.MODID, "wire_entity"), + net.minecraft.block.entity.BlockEntityType.Builder.create(WireEntity::new, new Block[]{Blocks.WIRE}).build() + ); + + public static void register() { + MACHINE_BLOCK_ENTITY.getRegistryEntry(); + MACHINE_DRIVER_ENTITY.getRegistryEntry(); + WIRE_ENTITY.getRegistryEntry(); + } +} diff --git a/src/main/java/net/cshift/mc/sparkt/block/entity/MachineDriverEntity.java b/src/main/java/net/cshift/mc/sparkt/block/entity/MachineDriverEntity.java new file mode 100644 index 0000000..52cf125 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/block/entity/MachineDriverEntity.java @@ -0,0 +1,60 @@ +package net.cshift.mc.sparkt.block.entity; + +import net.cshift.mc.transit.network.Channel; +import net.cshift.mc.transit.network.INode; +import net.cshift.mc.transit.network.PoolManifest; +import net.cshift.mc.transit.network.packet.IStaticPacket; +import net.minecraft.block.BlockState; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.util.math.BlockPos; + +public class MachineDriverEntity extends BlockEntity implements INode{ + + public MachineDriverEntity(BlockPos pos, BlockState state) { + super(BlockEntityTypes.MACHINE_DRIVER_ENTITY, pos, state); + //TODO Auto-generated constructor stub + } + + @Override + public PoolManifest getManifest() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'getManifest'"); + } + + @Override + public Channel connect(int poolID, String group, INode asker) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'connect'"); + } + + @Override + public Channel connectDefault(String group, INode asker) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'connectDefault'"); + } + + @Override + public IStaticPacket accept(IStaticPacket packet, Channel channel) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'accept'"); + } + + @Override + public Number getPressure(Channel channel) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'getPressure'"); + } + + @Override + public Number getRate(Channel channel) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'getRate'"); + } + + @Override + public void onTerminate(Channel channel) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'onTerminate'"); + } + +} diff --git a/src/main/java/net/cshift/mc/sparkt/block/entity/MachineNodeEntity.java b/src/main/java/net/cshift/mc/sparkt/block/entity/MachineNodeEntity.java new file mode 100644 index 0000000..4c21801 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/block/entity/MachineNodeEntity.java @@ -0,0 +1,59 @@ +package net.cshift.mc.sparkt.block.entity; + +import net.cshift.mc.transit.network.*; +import net.cshift.mc.transit.network.packet.IStaticPacket; +import net.minecraft.block.BlockState; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.util.math.BlockPos; + +public class MachineNodeEntity extends BlockEntity implements INode { + + public MachineNodeEntity(BlockPos pos, BlockState state) { + super(BlockEntityTypes.MACHINE_BLOCK_ENTITY, pos, state); + } + + @Override + public IStaticPacket accept(IStaticPacket arg0, Channel arg1) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'accept'"); + } + + @Override + public Channel connect(int arg0, String arg1, INode arg2) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'connect'"); + } + + @Override + public Channel connectDefault(String arg0, INode arg1) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'connectDefault'"); + } + + @Override + public PoolManifest getManifest() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'getManifest'"); + } + + @Override + public Number getPressure(Channel arg0) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'getPressure'"); + } + + @Override + public Number getRate(Channel arg0) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'getRate'"); + } + + @Override + public void onTerminate(Channel arg0) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'onTerminate'"); + } + + + +} diff --git a/src/main/java/net/cshift/mc/sparkt/block/entity/WireEntity.java b/src/main/java/net/cshift/mc/sparkt/block/entity/WireEntity.java new file mode 100644 index 0000000..208a84f --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/block/entity/WireEntity.java @@ -0,0 +1,82 @@ +package net.cshift.mc.sparkt.block.entity; + +import net.cshift.mc.sparkt.netcode.payload.DeliveryPayload; +import net.cshift.mc.transit.network.*; +import net.cshift.mc.transit.network.packet.IStaticPacket; +import net.fabricmc.fabric.api.networking.v1.PlayerLookup; +import net.fabricmc.fabric.api.networking.v1.ServerPlayNetworking; +import net.minecraft.block.BlockState; +import net.minecraft.block.entity.BlockEntity; +import net.minecraft.server.network.ServerPlayerEntity; +import net.minecraft.server.world.ServerWorld; +import net.minecraft.util.math.BlockPos; +import net.minecraft.world.World; + +public class WireEntity extends BlockEntity implements INode { + public static final int COOLDOWN = 40; + private int ticks = COOLDOWN; + + + public WireEntity(BlockPos pos, BlockState state) { + super(BlockEntityTypes.WIRE_ENTITY, pos, state); + + } + + @Override + public IStaticPacket accept(IStaticPacket arg0, Channel arg1) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'accept'"); + } + + @Override + public Channel connect(int arg0, String arg1, INode arg2) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'connect'"); + } + + @Override + public Channel connectDefault(String arg0, INode arg1) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'connectDefault'"); + } + + @Override + public PoolManifest getManifest() { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'getManifest'"); + } + + @Override + public Number getPressure(Channel arg0) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'getPressure'"); + } + + @Override + public Number getRate(Channel arg0) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'getRate'"); + } + + @Override + public void onTerminate(Channel arg0) { + // TODO Auto-generated method stub + throw new UnsupportedOperationException("Unimplemented method 'onTerminate'"); + } + + public static void tick(World world, BlockPos pos, BlockState state, WireEntity blockEntity) { + if (world.isClient) + return; + + blockEntity.ticks--; + + if (blockEntity.ticks > 0) + return; + + for (ServerPlayerEntity player : PlayerLookup.world((ServerWorld) world)) + ServerPlayNetworking.send(player, new DeliveryPayload("lmao")); + + blockEntity.ticks = COOLDOWN; + } + +} diff --git a/src/main/java/net/cshift/mc/sparkt/item/HeatingElement.java b/src/main/java/net/cshift/mc/sparkt/item/HeatingElement.java new file mode 100644 index 0000000..5c7bc61 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/item/HeatingElement.java @@ -0,0 +1,11 @@ +package net.cshift.mc.sparkt.item; + +import net.minecraft.item.Item; + +public class HeatingElement extends Item { + + public HeatingElement(Settings settings) { + super(settings); + } + +} diff --git a/src/main/java/net/cshift/mc/sparkt/item/IngotTungsten.java b/src/main/java/net/cshift/mc/sparkt/item/IngotTungsten.java new file mode 100644 index 0000000..1f8d92e --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/item/IngotTungsten.java @@ -0,0 +1,11 @@ +package net.cshift.mc.sparkt.item; + +import net.minecraft.item.Item; + +public class IngotTungsten extends Item{ + + public IngotTungsten(Settings settings) { + super(settings); + } + +} diff --git a/src/main/java/net/cshift/mc/sparkt/item/Items.java b/src/main/java/net/cshift/mc/sparkt/item/Items.java new file mode 100644 index 0000000..94c53e9 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/item/Items.java @@ -0,0 +1,20 @@ +package net.cshift.mc.sparkt.item; + +import net.cshift.mc.sparkt.SparktInit; +import net.minecraft.item.Item; +import net.minecraft.item.Item.Settings; +import net.minecraft.registry.Registries; +import net.minecraft.registry.Registry; +import net.minecraft.util.Identifier; + +public class Items { + public static final Item INGOT_TUNGSTEN = new IngotTungsten(new Settings()); + public static final Item RAW_TUNGSTEN = new RawTungsten(new Settings()); + public static final Item HEATING_ELEMENT = new HeatingElement(new Settings()); + + public static void register() { + Registry.register(Registries.ITEM, Identifier.of(SparktInit.MODID, "ingot_tungsten"), INGOT_TUNGSTEN); + Registry.register(Registries.ITEM, Identifier.of(SparktInit.MODID, "raw_tungsten"), RAW_TUNGSTEN); + Registry.register(Registries.ITEM, Identifier.of(SparktInit.MODID, "heating_element"), HEATING_ELEMENT); + } +} diff --git a/src/main/java/net/cshift/mc/sparkt/item/RawTungsten.java b/src/main/java/net/cshift/mc/sparkt/item/RawTungsten.java new file mode 100644 index 0000000..18e6213 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/item/RawTungsten.java @@ -0,0 +1,11 @@ +package net.cshift.mc.sparkt.item; + +import net.minecraft.item.Item; + +public class RawTungsten extends Item { + + public RawTungsten(Settings settings) { + super(settings); + } + +} diff --git a/src/main/java/net/cshift/mc/sparkt/netcode/ClientRenderNetwork.java b/src/main/java/net/cshift/mc/sparkt/netcode/ClientRenderNetwork.java new file mode 100644 index 0000000..067d0e0 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/netcode/ClientRenderNetwork.java @@ -0,0 +1,5 @@ +package net.cshift.mc.sparkt.netcode; + +public class ClientRenderNetwork { + +} diff --git a/src/main/java/net/cshift/mc/sparkt/netcode/NetConstants.java b/src/main/java/net/cshift/mc/sparkt/netcode/NetConstants.java new file mode 100644 index 0000000..a7358eb --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/netcode/NetConstants.java @@ -0,0 +1,10 @@ +package net.cshift.mc.sparkt.netcode; + +import net.cshift.mc.sparkt.SparktInit; +import net.minecraft.util.Identifier; + +public class NetConstants { + public static final Identifier TRANSIT_PACKET_ID = Identifier.of(SparktInit.MODID, "net_transit"); + public static final Identifier PROGRESS_PACKET_ID = Identifier.of(SparktInit.MODID, "net_progress"); + public static final Identifier DELIVERY_PACKET_ID = Identifier.of(SparktInit.MODID, "net_delivery"); +} diff --git a/src/main/java/net/cshift/mc/sparkt/netcode/ServerRenderNetwork.java b/src/main/java/net/cshift/mc/sparkt/netcode/ServerRenderNetwork.java new file mode 100644 index 0000000..6bb249d --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/netcode/ServerRenderNetwork.java @@ -0,0 +1,10 @@ +package net.cshift.mc.sparkt.netcode; + +public class ServerRenderNetwork { + + + static void update() { + + } + +} diff --git a/src/main/java/net/cshift/mc/sparkt/netcode/payload/DeliveryPayload.java b/src/main/java/net/cshift/mc/sparkt/netcode/payload/DeliveryPayload.java new file mode 100644 index 0000000..5c7caff --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/netcode/payload/DeliveryPayload.java @@ -0,0 +1,22 @@ +package net.cshift.mc.sparkt.netcode.payload; + +import net.cshift.mc.sparkt.netcode.NetConstants; +import net.minecraft.network.RegistryByteBuf; +import net.minecraft.network.codec.PacketCodec; +import net.minecraft.network.codec.PacketCodecs; +import net.minecraft.network.packet.CustomPayload; + +public record DeliveryPayload (String uuid) implements CustomPayload { + public static final CustomPayload.Id ID = new CustomPayload.Id<>(NetConstants.DELIVERY_PACKET_ID); + + public static final PacketCodec CODEC = PacketCodec.tuple( + PacketCodecs.STRING, DeliveryPayload::uuid, + DeliveryPayload::new + ); + + @Override + public CustomPayload.Id getId () + { + return ID; + } +} diff --git a/src/main/java/net/cshift/mc/sparkt/netcode/payload/ProgressPayload.java b/src/main/java/net/cshift/mc/sparkt/netcode/payload/ProgressPayload.java new file mode 100644 index 0000000..bbc0395 --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/netcode/payload/ProgressPayload.java @@ -0,0 +1,19 @@ +package net.cshift.mc.sparkt.netcode.payload; + +import java.util.HashMap; + +import net.cshift.mc.sparkt.netcode.NetConstants; +import net.minecraft.network.RegistryByteBuf; +import net.minecraft.network.codec.PacketCodec; +import net.minecraft.network.packet.CustomPayload; + +public record ProgressPayload (HashMap map) implements CustomPayload { + public static final CustomPayload.Id ID = new CustomPayload.Id<>(NetConstants.PROGRESS_PACKET_ID); + public static final PacketCodec CODEC = PacketCodec.tuple(null, null, null); + + @Override + public CustomPayload.Id getId () + { + return ID; + } +} diff --git a/src/main/java/net/cshift/mc/sparkt/netcode/payload/TransitPayload.java b/src/main/java/net/cshift/mc/sparkt/netcode/payload/TransitPayload.java new file mode 100644 index 0000000..bc7bb6c --- /dev/null +++ b/src/main/java/net/cshift/mc/sparkt/netcode/payload/TransitPayload.java @@ -0,0 +1,25 @@ +package net.cshift.mc.sparkt.netcode.payload; + +import com.mojang.authlib.properties.PropertyMap; + +import net.cshift.mc.sparkt.netcode.NetConstants; +import net.minecraft.network.RegistryByteBuf; +import net.minecraft.network.codec.PacketCodec; +import net.minecraft.network.codec.PacketCodecs; +import net.minecraft.network.packet.CustomPayload; + +public record TransitPayload(String uuid, PropertyMap obj) implements CustomPayload { + public static final CustomPayload.Id ID = new CustomPayload.Id<>(NetConstants.TRANSIT_PACKET_ID); + + public static final PacketCodec CODEC = PacketCodec.tuple( + PacketCodecs.STRING, TransitPayload::uuid, + PacketCodecs.PROPERTY_MAP, TransitPayload::obj, + TransitPayload::new + ); + + @Override + public CustomPayload.Id getId () + { + return ID; + } +} diff --git a/src/main/java/net/cshift/sparkt/SparktInit.java b/src/main/java/net/cshift/sparkt/SparktInit.java deleted file mode 100644 index 0b85404..0000000 --- a/src/main/java/net/cshift/sparkt/SparktInit.java +++ /dev/null @@ -1,22 +0,0 @@ -package net.cshift.sparkt; - -import org.apache.logging.log4j.LogManager; -import org.apache.logging.log4j.Logger; - -import net.cshift.sparkt.block.Blocks; -import net.cshift.sparkt.block.entity.BlockEntityTypes; -import net.fabricmc.api.ModInitializer; - -public class SparktInit implements ModInitializer { - - public static final Logger LOG = LogManager.getFormatterLogger("Sparkt|Init"); - public static final String MODID = "sparkt"; - - @Override - public void onInitialize() { - LOG.info("Preparing to spark a reaction!"); - Blocks.register(); - BlockEntityTypes.register(); - } - -} \ No newline at end of file diff --git a/src/main/java/net/cshift/sparkt/block/Blocks.java b/src/main/java/net/cshift/sparkt/block/Blocks.java deleted file mode 100644 index 3aab1e2..0000000 --- a/src/main/java/net/cshift/sparkt/block/Blocks.java +++ /dev/null @@ -1,32 +0,0 @@ -package net.cshift.sparkt.block; - -import net.cshift.sparkt.SparktInit; -import net.fabricmc.fabric.api.object.builder.v1.block.FabricBlockSettings; -import net.minecraft.block.Block; -import net.minecraft.item.BlockItem; -import net.minecraft.item.Item; -import net.minecraft.util.Identifier; -import net.minecraft.registry.*; - -public class Blocks { - - public static final Block MACHINE_BLOCK = new MachineBlock(FabricBlockSettings.create().strength(1, 1)); - public static final Block MACHINE_FURNACE = new MachineFurnace(FabricBlockSettings.create().strength(1, 1)); - public static final Block DRIVER_MECHANICAL = new DriverMechanical(FabricBlockSettings.create().strength(1, 1)); - public static final Block MACHINE_GRINDER = new MachineGrinder(FabricBlockSettings.create().strength(1, 1)); - //public static final Block - - public static void register() { - Registry.register(Registries.BLOCK, new Identifier(SparktInit.MODID, "machine_block"), MACHINE_BLOCK); - Registry.register(Registries.ITEM, new Identifier(SparktInit.MODID, "machine_block"), new BlockItem(MACHINE_BLOCK, new Item.Settings())); - - Registry.register(Registries.BLOCK, new Identifier(SparktInit.MODID, "machine_furnace"), MACHINE_FURNACE); - Registry.register(Registries.ITEM, new Identifier(SparktInit.MODID, "machine_furnace"), new BlockItem(MACHINE_FURNACE, new Item.Settings())); - - Registry.register(Registries.BLOCK, new Identifier(SparktInit.MODID, "driver_mechanical"), DRIVER_MECHANICAL); - Registry.register(Registries.ITEM, new Identifier(SparktInit.MODID, "driver_mechanical"), new BlockItem(DRIVER_MECHANICAL, new Item.Settings())); - - Registry.register(Registries.BLOCK, new Identifier(SparktInit.MODID, "machine_grinder"), MACHINE_GRINDER); - Registry.register(Registries.ITEM, new Identifier(SparktInit.MODID, "machine_grinder"), new BlockItem(MACHINE_GRINDER, new Item.Settings())); - } -} \ No newline at end of file diff --git a/src/main/java/net/cshift/sparkt/block/DriverMechanical.java b/src/main/java/net/cshift/sparkt/block/DriverMechanical.java deleted file mode 100644 index a0f690e..0000000 --- a/src/main/java/net/cshift/sparkt/block/DriverMechanical.java +++ /dev/null @@ -1,9 +0,0 @@ -package net.cshift.sparkt.block; - -public class DriverMechanical extends MachineBlock{ - - public DriverMechanical(Settings settings) { - super(settings); - } - -} \ No newline at end of file diff --git a/src/main/java/net/cshift/sparkt/block/MachineBlock.java b/src/main/java/net/cshift/sparkt/block/MachineBlock.java deleted file mode 100644 index 875f295..0000000 --- a/src/main/java/net/cshift/sparkt/block/MachineBlock.java +++ /dev/null @@ -1,28 +0,0 @@ -package net.cshift.sparkt.block; - -import net.cshift.sparkt.block.entity.MachineNode; -import net.minecraft.block.BlockState; -import net.minecraft.block.BlockWithEntity; -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.entity.LivingEntity; -import net.minecraft.item.ItemStack; -import net.minecraft.util.math.BlockPos; -import net.minecraft.world.World; - -public class MachineBlock extends BlockWithEntity { - - public MachineBlock(Settings settings) { - super(settings); - } - - @Override - public BlockEntity createBlockEntity(BlockPos var1, BlockState var2) { - return new MachineNode(var1, var2); - } - - @Override - public void onPlaced(World world, BlockPos pos, BlockState state, LivingEntity placer, ItemStack itemStack) { - super.onPlaced(world, pos, state, placer, itemStack); - } - -} \ No newline at end of file diff --git a/src/main/java/net/cshift/sparkt/block/MachineFurnace.java b/src/main/java/net/cshift/sparkt/block/MachineFurnace.java deleted file mode 100644 index 2c815ce..0000000 --- a/src/main/java/net/cshift/sparkt/block/MachineFurnace.java +++ /dev/null @@ -1,9 +0,0 @@ -package net.cshift.sparkt.block; - -public class MachineFurnace extends MachineBlock{ - - public MachineFurnace(Settings settings) { - super(settings); - } - -} \ No newline at end of file diff --git a/src/main/java/net/cshift/sparkt/block/MachineGrinder.java b/src/main/java/net/cshift/sparkt/block/MachineGrinder.java deleted file mode 100644 index 890fa7e..0000000 --- a/src/main/java/net/cshift/sparkt/block/MachineGrinder.java +++ /dev/null @@ -1,9 +0,0 @@ -package net.cshift.sparkt.block; - -public class MachineGrinder extends MachineBlock{ - - public MachineGrinder(Settings settings) { - super(settings); - } - -} \ No newline at end of file diff --git a/src/main/java/net/cshift/sparkt/block/Wire.java b/src/main/java/net/cshift/sparkt/block/Wire.java deleted file mode 100644 index fa0da3d..0000000 --- a/src/main/java/net/cshift/sparkt/block/Wire.java +++ /dev/null @@ -1,11 +0,0 @@ -package net.cshift.sparkt.block; - -import net.minecraft.block.Block; - -public class Wire extends Block{ - - public Wire(Settings settings) { - super(settings); - } - -} \ No newline at end of file diff --git a/src/main/java/net/cshift/sparkt/block/entity/BlockEntityTypes.java b/src/main/java/net/cshift/sparkt/block/entity/BlockEntityTypes.java deleted file mode 100644 index f4b1379..0000000 --- a/src/main/java/net/cshift/sparkt/block/entity/BlockEntityTypes.java +++ /dev/null @@ -1,22 +0,0 @@ -package net.cshift.sparkt.block.entity; - -import net.cshift.sparkt.SparktInit; -import net.cshift.sparkt.block.Blocks; -import net.fabricmc.fabric.api.object.builder.v1.block.entity.FabricBlockEntityTypeBuilder; -import net.minecraft.block.entity.BlockEntityType; -import net.minecraft.registry.Registries; -import net.minecraft.registry.Registry; -import net.minecraft.util.Identifier; - -public class BlockEntityTypes { - - public static BlockEntityType MACHINE_NODE; - - public static void register() { - MACHINE_NODE = Registry.register( - Registries.BLOCK_ENTITY_TYPE, - new Identifier(SparktInit.MODID, "machine_block_entity"), - FabricBlockEntityTypeBuilder.create(MachineNode::new, Blocks.MACHINE_BLOCK).build() - ); - } -} diff --git a/src/main/java/net/cshift/sparkt/block/entity/MachineFurnaceEntity.java b/src/main/java/net/cshift/sparkt/block/entity/MachineFurnaceEntity.java deleted file mode 100644 index d45938c..0000000 --- a/src/main/java/net/cshift/sparkt/block/entity/MachineFurnaceEntity.java +++ /dev/null @@ -1,61 +0,0 @@ -package net.cshift.sparkt.block.entity; - -import net.minecraft.block.BlockState; -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.block.entity.BlockEntityType; -import net.minecraft.util.math.BlockPos; - -import net.cshift.api.transit.network.*; -import net.cshift.api.transit.network.packet.*; - -public class MachineFurnaceEntity extends BlockEntity implements INode { - - public MachineFurnaceEntity(BlockEntityType type, BlockPos pos, BlockState state) { - super(type, pos, state); - //TODO Auto-generated constructor stub - } - - @Override - public IStaticPacket accept(IStaticPacket arg0, Channel arg1) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'accept'"); - } - - @Override - public Channel connect(int arg0, String arg1, INode arg2) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'connect'"); - } - - @Override - public Channel connectDefault(String arg0, INode arg1) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'connectDefault'"); - } - - @Override - public PoolManifest getManifest() { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'getManifest'"); - } - - @Override - public Number getPressure(Channel arg0) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'getPressure'"); - } - - @Override - public Number getRate(Channel arg0) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'getRate'"); - } - - @Override - public void onTerminate(Channel arg0) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'onTerminate'"); - } - - -} \ No newline at end of file diff --git a/src/main/java/net/cshift/sparkt/block/entity/MachineNode.java b/src/main/java/net/cshift/sparkt/block/entity/MachineNode.java deleted file mode 100644 index 111d8cc..0000000 --- a/src/main/java/net/cshift/sparkt/block/entity/MachineNode.java +++ /dev/null @@ -1,59 +0,0 @@ -package net.cshift.sparkt.block.entity; - -import net.cshift.api.transit.network.*; -import net.cshift.api.transit.network.packet.IStaticPacket; -import net.minecraft.block.BlockState; -import net.minecraft.block.entity.BlockEntity; -import net.minecraft.util.math.BlockPos; - -public class MachineNode extends BlockEntity implements INode { - - public MachineNode(BlockPos pos, BlockState state) { - super(BlockEntityTypes.MACHINE_NODE, pos, state); - } - - @Override - public IStaticPacket accept(IStaticPacket arg0, Channel arg1) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'accept'"); - } - - @Override - public Channel connect(int arg0, String arg1, INode arg2) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'connect'"); - } - - @Override - public Channel connectDefault(String arg0, INode arg1) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'connectDefault'"); - } - - @Override - public PoolManifest getManifest() { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'getManifest'"); - } - - @Override - public Number getPressure(Channel arg0) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'getPressure'"); - } - - @Override - public Number getRate(Channel arg0) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'getRate'"); - } - - @Override - public void onTerminate(Channel arg0) { - // TODO Auto-generated method stub - throw new UnsupportedOperationException("Unimplemented method 'onTerminate'"); - } - - - -} -- cgit v1.2.3