Skip to content

Commit

Permalink
make wct recipe not removed
Browse files Browse the repository at this point in the history
  • Loading branch information
GlodBlock committed Feb 3, 2023
1 parent 8655189 commit e1aa537
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/main/java/com/glodblock/github/FluidCraft.java
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class FluidCraft {
@Mod.EventHandler
public static void preInit(FMLPreInitializationEvent event) {
Config.run();
(new ChannelLoader()).run();
ChannelLoader.INSTANCE.run();
proxy.preInit(event);
}

Expand All @@ -70,8 +70,9 @@ public static void postInit(FMLPostInitializationEvent event) {
ItemAndBlockHolder.loadSetting();

if (!Config.removeRecipe) {
(new RecipeLoader()).run();
RecipeLoader.INSTANCE.run();
}
RecipeLoader.runWCTRecipe();

if (ModAndClassUtil.isV2) {
CalculatorV2PluginLoader.installCalculatorV2Plugins();
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/com/glodblock/github/loader/ChannelLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

public class ChannelLoader implements Runnable {

public static final ChannelLoader INSTANCE = new ChannelLoader();

@Override
@SuppressWarnings("all")
public void run() {
Expand Down
13 changes: 9 additions & 4 deletions src/main/java/com/glodblock/github/loader/RecipeLoader.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

public class RecipeLoader implements Runnable {

public static final RecipeLoader INSTANCE = new RecipeLoader();

public static final ItemStack AE2_INTERFACE = GameRegistry
.findItemStack("appliedenergistics2", "tile.BlockInterface", 1);
public static final ItemStack AE2_PROCESS_ENG = new ItemStack(
Expand Down Expand Up @@ -133,10 +135,6 @@ public void run() {
GameRegistry.addShapelessRecipe(INTERFACE.stack(), FLUID_INTERFACE.stack());
GameRegistry.addShapelessRecipe(WIRELESS_FLUID_TERM.stack(), AE2_WIRELESS_TERMINAL, BUCKET);
GameRegistry.addShapelessRecipe(WIRELESS_PATTERN_TERM.stack(), WIRELESS_FLUID_TERM, FLUID_TERMINAL);
if (ModAndClassUtil.WCT) {
GameRegistry.addRecipe(new WirelessTerminalRecipe(WIRELESS_PATTERN_TERM.stack()));
GameRegistry.addRecipe(new WirelessTerminalRecipe(WIRELESS_FLUID_TERM.stack()));
}
GameRegistry
.addRecipe(new ShapedOreRecipe(CERTUS_QUARTZ_TANK.stack(), "GGG", "G G", "GGG", 'G', AE2_QUARTZ_GLASS));
GameRegistry.addShapelessRecipe(FLUID_AUTO_FILLER.stack(), FLUID_TERMINAL, ENCODER);
Expand Down Expand Up @@ -451,4 +449,11 @@ public void run() {
AE2_BLANK_PATTERN));
}
}

public static void runWCTRecipe() {
if (ModAndClassUtil.WCT) {
GameRegistry.addRecipe(new WirelessTerminalRecipe(WIRELESS_PATTERN_TERM.stack()));
GameRegistry.addRecipe(new WirelessTerminalRecipe(WIRELESS_FLUID_TERM.stack()));
}
}
}

0 comments on commit e1aa537

Please sign in to comment.