Skip to content

Commit

Permalink
Fisher and Block breaker (#161)
Browse files Browse the repository at this point in the history
* Fisher

* Fisher creates loottable and lootcontext in constructor

* Updated fisher to be more in line with other machines

* Fisher removed lootTable and lootContext from constructor and other fix I don't remember.

* Fisher uses power

* Block Breaker

* refine fisher

* refine the block breaker + better ui

* fix interaction for output face

* DONE

---------

Co-authored-by: KilaBash <[email protected]>
  • Loading branch information
h3tR and Yefancy authored Jul 16, 2023
1 parent 4f9d401 commit a0a6f3f
Show file tree
Hide file tree
Showing 11 changed files with 1,044 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ public enum GTToolType {
SHOVEL("shovel", "shovels", 1.5F, -3.0F, true),
AXE("axe", "axes", 6.0F, -3.2F, true),
HOE("hoe", "hoes", 0, -3.0F, true),

SAW("saw", "saws", 1, 1, GTSoundEntries.SAW_TOOL),
HARD_HAMMER("hammer", "hammers", 1, 1, GTSoundEntries.FORGE_HAMMER),
SOFT_MALLET("mallet", "mallets", 1, 1, GTSoundEntries.SOFT_MALLET_TOOL),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
import com.gregtechceu.gtceu.api.registry.GTRegistries;
import com.gregtechceu.gtceu.api.registry.registrate.MachineBuilder;
import com.gregtechceu.gtceu.api.registry.registrate.MultiblockMachineBuilder;
import com.gregtechceu.gtceu.client.renderer.block.CTMModelRenderer;
import com.gregtechceu.gtceu.client.renderer.machine.*;
import com.gregtechceu.gtceu.common.block.BoilerFireboxType;
import com.gregtechceu.gtceu.common.machine.electric.*;
Expand Down Expand Up @@ -243,6 +242,34 @@ public class GTMachines {
.register(),
LV, MV, HV, EV);

public final static MachineDefinition[] FISHER = registerTieredMachines("fisher", FisherMachine::new,
(tier, builder) -> builder
.rotationState(RotationState.NON_Y_AXIS)
.editableUI(FisherMachine.EDITABLE_UI_CREATOR.apply(GTCEu.id("fisher"), (tier + 1) * (tier + 1)))
.renderer(() -> new TieredHullMachineRenderer(tier, GTCEu.id("block/machine/fisher_machine")))
.langValue("%s Fisher %s".formatted(VLVH[tier], VLVT[tier]))
.tooltips(Component.translatable("gtceu.machine.fisher.tooltip"),
Component.translatable("gtceu.machine.fisher.speed", 1000 - tier * 200L),
Component.translatable("gtceu.machine.fisher.requirement", FisherMachine.WATER_CHECK_SIZE,FisherMachine.WATER_CHECK_SIZE),
Component.translatable("gtceu.universal.tooltip.voltage_in", GTValues.V[tier], GTValues.VNF[tier]),
Component.translatable("gtceu.universal.tooltip.energy_storage_capacity", GTValues.V[tier] * 64))
.register(),
LV, MV, HV, EV);

public final static MachineDefinition[] BLOCK_BREAKER = registerTieredMachines("block_breaker", BlockBreakerMachine::new,
(tier, builder) -> builder
.rotationState(RotationState.NON_Y_AXIS)
.editableUI(BlockBreakerMachine.EDITABLE_UI_CREATOR.apply(GTCEu.id("block_breaker"), (tier + 1) * (tier + 1)))
.renderer(() -> new TieredHullMachineRenderer(tier, GTCEu.id("block/machine/block_breaker_machine")))
.langValue("%s Block Breaker %s".formatted(VLVH[tier], VLVT[tier]))
.tooltips(Component.translatable("gtceu.machine.block_breaker.tooltip"),
Component.translatable("gtceu.machine.block_breaker.speed_bonus", (int) (BlockBreakerMachine.getEfficiencyMultiplier(tier) * 100)),
Component.translatable("gtceu.universal.tooltip.voltage_in", GTValues.V[tier], GTValues.VNF[tier]),
Component.translatable("gtceu.universal.tooltip.energy_storage_capacity", GTValues.V[tier] * 64))
.register(),
LV, MV, HV, EV);


public static final MachineDefinition[] MINER = registerTieredMachines("miner", (holder, tier) -> new MinerMachine(holder, tier, 320 / (tier * 2), tier * 8, tier),
(tier, builder) -> builder
.rotationState(RotationState.NON_Y_AXIS)
Expand Down
Loading

0 comments on commit a0a6f3f

Please sign in to comment.