Skip to content

Commit

Permalink
put output texture on side of watermill
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Jan 19, 2025
1 parent 29af103 commit 374b2e4
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 39 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -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<BlockEntityWatermill> {
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());

}
});
}
}
8 changes: 1 addition & 7 deletions common/src/main/java/trinsdar/gt4r/data/Machines.java
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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);
}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 374b2e4

Please sign in to comment.