|
| 1 | +package com.github.gtexpert.gtwp.integration.mworld.recipes; |
| 2 | + |
| 3 | +import java.util.Arrays; |
| 4 | +import java.util.List; |
| 5 | + |
| 6 | +import gregtech.loaders.WoodTypeEntry; |
| 7 | + |
| 8 | +import com.github.gtexpert.gtwp.api.util.Mods; |
| 9 | +import com.github.gtexpert.gtwp.loaders.GTWPWoodRecipeLoader; |
| 10 | + |
| 11 | +public class MWorldWoodRecipe { |
| 12 | + |
| 13 | + private static List<WoodTypeEntry> DEFAULT_ENTRIES; |
| 14 | + |
| 15 | + private static List<WoodTypeEntry> getDefaultEntries() { |
| 16 | + if (DEFAULT_ENTRIES == null) { |
| 17 | + final String mcModId = Mods.Names.MYSTICAL_WORLD; |
| 18 | + return DEFAULT_ENTRIES = Arrays.asList( |
| 19 | + new WoodTypeEntry.Builder(mcModId, "charred") |
| 20 | + .log(Mods.MysticalWorld.getItem("charred_log", 1)).removeCharcoalRecipe() |
| 21 | + .planks(Mods.MysticalWorld.getItem("charred_planks", 1), null) |
| 22 | + .slab(Mods.MysticalWorld.getItem("charred_slab", 1), "charred_slab") |
| 23 | + .fence(Mods.MysticalWorld.getItem("charred_fence", 1), "charred_fence") |
| 24 | + .fenceGate(Mods.MysticalWorld.getItem("charred_fence_gate", 1), "charred_fence_gate") |
| 25 | + .stairs(Mods.MysticalWorld.getItem("charred_stairs", 1), "charred_stairs") |
| 26 | + .build()); |
| 27 | + } |
| 28 | + return DEFAULT_ENTRIES; |
| 29 | + } |
| 30 | + |
| 31 | + public static void init() { |
| 32 | + for (WoodTypeEntry entry : getDefaultEntries()) { |
| 33 | + GTWPWoodRecipeLoader.removePlankRecipe(false, entry, Mods.Names.MYSTICAL_WORLD); |
| 34 | + |
| 35 | + GTWPWoodRecipeLoader.registerWoodTypeRecipe(false, entry); |
| 36 | + GTWPWoodRecipeLoader.addCuttingRecipe(entry); |
| 37 | + GTWPWoodRecipeLoader.addSawmillRecipe(entry); |
| 38 | + } |
| 39 | + } |
| 40 | +} |
0 commit comments