Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
fixed drum recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
Trinsdar committed Jun 20, 2023
1 parent 8458b7a commit 2e12ca8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ subprojects {
}
}
} else {
maven { url "file:///${project.projectDir}/mcmodsrepo"}
mavenLocal()
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,9 @@ public static void init() {
}

public static DrumMachine createDrum(Material material, int maxCapacity){
Machine<?> machine = AntimatterAPI.get(Machine.class, material.getId() + "_drum", GTUtility.ID);
DrumMachine machine = AntimatterAPI.get(DrumMachine.class, material.getId() + "_drum", GTUtility.ID);
if (machine != null){
if (machine instanceof DrumMachine drumMachine){
return drumMachine;
} else {
throw new IllegalStateException("Drum registered not using DrumMachine");
}
return machine;
}
return new DrumMachine(GTUtility.ID, material, maxCapacity);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.github.gregtechintergalactical.gtutility.machine;

import io.github.gregtechintergalactical.gtutility.GTUtility;
import muramasa.antimatter.AntimatterAPI;
import muramasa.antimatter.Ref;
import muramasa.antimatter.machine.Tier;
import muramasa.antimatter.material.Material;
Expand All @@ -16,6 +17,7 @@ public class DrumMachine extends MaterialMachine{
public final int maxCapacity;
public DrumMachine(String domain, Material material, int maxCapacity) {
super(domain, material.getId() + "_drum", material);
AntimatterAPI.register(DrumMachine.class, this);
this.maxCapacity = maxCapacity;
setTiers(Tier.NONE);
this.setTile(((materialMachine, blockPos, blockState) -> new BlockEntityDrum(this, blockPos, blockState)));
Expand Down

0 comments on commit 2e12ca8

Please sign in to comment.