diff --git a/common/src/main/java/trinsdar/gt4r/blockentity/single/BlockEntityCoveredGenerator.java b/common/src/main/java/trinsdar/gt4r/blockentity/single/BlockEntityCoveredGenerator.java deleted file mode 100644 index 6badba28..00000000 --- a/common/src/main/java/trinsdar/gt4r/blockentity/single/BlockEntityCoveredGenerator.java +++ /dev/null @@ -1,32 +0,0 @@ -package trinsdar.gt4r.blockentity.single; - -import muramasa.antimatter.capability.machine.MachineEnergyHandler; -import muramasa.antimatter.machine.types.Machine; -import muramasa.antimatter.blockentity.single.BlockEntityGenerator; -import net.minecraft.core.BlockPos; -import net.minecraft.core.Direction; -import net.minecraft.world.level.block.state.BlockState; - -import static muramasa.antimatter.machine.MachineFlag.GENERATOR; - -public class BlockEntityCoveredGenerator extends BlockEntityGenerator { - public BlockEntityCoveredGenerator(Machine type, BlockPos pos, BlockState state) { - super(type, pos, state); - energyHandler.set(() -> new MachineEnergyHandler(this, type.amps(),type.has(GENERATOR)){ - @Override - public boolean canInput(Direction direction) { - return false; - } - @Override - public boolean canInput() { - return false; - } - - @Override - public boolean canOutput(Direction direction) { - return super.canOutput(direction) && direction == tile.getOutputFacing(); - - } - }); - } -} diff --git a/common/src/main/java/trinsdar/gt4r/blockentity/single/BlockEntityWatermill.java b/common/src/main/java/trinsdar/gt4r/blockentity/single/BlockEntityWatermill.java new file mode 100644 index 00000000..c20b76dc --- /dev/null +++ b/common/src/main/java/trinsdar/gt4r/blockentity/single/BlockEntityWatermill.java @@ -0,0 +1,23 @@ +package trinsdar.gt4r.blockentity.single; + +import muramasa.antimatter.capability.machine.MachineEnergyHandler; +import muramasa.antimatter.machine.types.Machine; +import muramasa.antimatter.blockentity.single.BlockEntityGenerator; +import net.minecraft.core.BlockPos; +import net.minecraft.core.Direction; +import net.minecraft.world.level.block.state.BlockState; + +import static muramasa.antimatter.machine.MachineFlag.GENERATOR; + +public class BlockEntityWatermill extends BlockEntityGenerator { + public BlockEntityWatermill(Machine type, BlockPos pos, BlockState state) { + super(type, pos, state); + energyHandler.set(() -> new MachineEnergyHandler<>(this, type.amps(), type.has(GENERATOR)) { + @Override + public boolean canOutput(Direction direction) { + return super.canOutput(direction) && (direction == tile.getFacing().getClockWise() || direction == tile.getFacing().getCounterClockWise()); + + } + }); + } +} diff --git a/common/src/main/java/trinsdar/gt4r/data/Machines.java b/common/src/main/java/trinsdar/gt4r/data/Machines.java index ae8476f1..d160b983 100644 --- a/common/src/main/java/trinsdar/gt4r/data/Machines.java +++ b/common/src/main/java/trinsdar/gt4r/data/Machines.java @@ -172,7 +172,7 @@ public static void initTanks() { public static GeneratorMachine SEMIFLUID_GENERATOR = new GeneratorMachine(GT4RRef.ID, "semifluid_generator").baseTexture(Textures.BASE_HANDLER).setTiers(LV).setMap(SEMIFLUID_FUELS).addFlags(GUI, FLUID, CELL).efficiency(t -> 100); public static GeneratorMachine THERMAL_GENERATOR = new GeneratorMachine(GT4RRef.ID, "thermal_generator").baseTexture(Textures.BASE_HANDLER).setTiers(LV).setMap(THERMAL_FUELS).addFlags(GUI, FLUID, CELL).efficiency(t -> 80); public static GeneratorMachine WINDMILL = new GeneratorMachine(GT4RRef.ID, "windmill").baseTexture(Textures.BASE_HANDLER).setTiers(ULV); - public static GeneratorMachine WATERMILL = new GeneratorMachine(GT4RRef.ID, "watermill").baseTexture(Textures.BASE_HANDLER).setTiers(ULV).custom(); + public static GeneratorMachine WATERMILL = new GeneratorMachine(GT4RRef.ID, "watermill").baseTexture(Textures.BASE_HANDLER).setTiers(ULV).setTile(BlockEntityWatermill::new).custom(); public static UpgradeableMachine BATTERY_BUFFER_FOUR = new UpgradeableMachine(GT4RRef.ID, "4x_battery_buffer").setTiers(LV).noCovers().addFlags(GUI, EU, ITEM).setUpgrades(CustomTags.TRANSFORMER_UPGRADES).setTile(BlockEntityBatteryBox::new).setBlock(BlockBatBox::new).setItemBlockClass(() -> BlockBatBox.class).overlayTexture(Textures.TIER_SPECIFIC_OVERLAY_HANDLER).baseTexture(Textures.BATBOX_HANDLER).allowFrontIO().setVerticalFacingAllowed(true); public static UpgradeableMachine BATTERY_BUFFER_EIGHT = new UpgradeableMachine(GT4RRef.ID, "8x_battery_buffer").setTiers(LV).noCovers().addFlags(GUI, EU, ITEM).setUpgrades(CustomTags.TRANSFORMER_UPGRADES).setTile(BlockEntityBatteryBox::new).setBlock(BlockBatBox::new).setItemBlockClass(() -> BlockBatBox.class).overlayTexture(Textures.TIER_SPECIFIC_OVERLAY_HANDLER).baseTexture(Textures.BATBOX_HANDLER).allowFrontIO().setVerticalFacingAllowed(true); @@ -190,12 +190,6 @@ public static void initTanks() { public static BasicMachine TRANSFORMER_DIGITAL = new BasicMachine(GT4RRef.ID, "transformer_digital").addFlags(GUI, EU).setTiers(EV, IV).setTile(BlockEntityDigitalTransformer::new).noCovers().allowFrontIO(); public static void init() { - STEAM_TURBINE.setOutputCover(COVER_DYNAMO_OLD); - GAS_TURBINE.setOutputCover(COVER_DYNAMO_OLD); - DIESEL_GENERATOR.setOutputCover(COVER_DYNAMO_OLD); - SEMIFLUID_GENERATOR.setOutputCover(COVER_DYNAMO_OLD); - WINDMILL.setOutputCover(COVER_DYNAMO_OLD); - WATERMILL.setOutputCover(COVER_DYNAMO_OLD); HEAT_EXCHANGER.removeFlags(EU); DUSTBIN.removeFlags(EU); } diff --git a/common/src/main/resources/assets/gt4r/textures/block/machine/overlay/watermill/active/side.png b/common/src/main/resources/assets/gt4r/textures/block/machine/overlay/watermill/active/side.png index 6c7e63b9..894dfb11 100644 Binary files a/common/src/main/resources/assets/gt4r/textures/block/machine/overlay/watermill/active/side.png and b/common/src/main/resources/assets/gt4r/textures/block/machine/overlay/watermill/active/side.png differ diff --git a/common/src/main/resources/assets/gt4r/textures/block/machine/overlay/watermill/side.png b/common/src/main/resources/assets/gt4r/textures/block/machine/overlay/watermill/side.png index 6c7e63b9..894dfb11 100644 Binary files a/common/src/main/resources/assets/gt4r/textures/block/machine/overlay/watermill/side.png and b/common/src/main/resources/assets/gt4r/textures/block/machine/overlay/watermill/side.png differ