diff --git a/src/main/java/com/dreammaster/scripts/ScriptGalacticraft.java b/src/main/java/com/dreammaster/scripts/ScriptGalacticraft.java index 127528be0..6b5e1fbaf 100644 --- a/src/main/java/com/dreammaster/scripts/ScriptGalacticraft.java +++ b/src/main/java/com/dreammaster/scripts/ScriptGalacticraft.java @@ -60,7 +60,6 @@ import micdoodle8.mods.galacticraft.api.recipe.SpaceStationRecipe; import micdoodle8.mods.galacticraft.api.world.SpaceStationType; import micdoodle8.mods.galacticraft.core.Constants; -import micdoodle8.mods.galacticraft.core.GalacticraftCore; import micdoodle8.mods.galacticraft.core.blocks.GCBlocks; import micdoodle8.mods.galacticraft.core.items.GCItems; import micdoodle8.mods.galacticraft.core.nei.BuggyRecipeHandler; @@ -2773,7 +2772,8 @@ private void dungeonBlockRecipes() { .duration(4 * SECONDS).eut(TierEU.RECIPE_HV).addTo(mixerRecipes); } - private void spaceStationRecipes() { + @Optional.Method(modid = "GalacticraftCore") + private static void spaceStationRecipes() { final HashMap inputMap = new HashMap<>(); inputMap.put(new ItemStack(GCBlocks.basicBlock, 1, 4), 231); inputMap.put(new ItemStack(Blocks.glass_pane), 6); @@ -2783,13 +2783,14 @@ private void spaceStationRecipes() { new SpaceStationType(ConfigManagerCore.idDimensionOverworldOrbit, 0, new SpaceStationRecipe(inputMap))); } - private void buggyRecipes() { + @Optional.Method(modid = "GalacticraftCore") + private static void buggyRecipes() { HashMap input = new HashMap<>(); HashMap input2; input.put(1, new ItemStack(GCItems.basicItem, 1, 19)); input.put(2, new ItemStack(GCItems.partBuggy, 1, 1)); if (GalaxySpace.isModLoaded()) { - input.put(3, GT_ModHandler.getModItem(GalaxySpace.ID, "item.RocketControlComputer", 1, 100)); + input.put(3, getModItem(GalaxySpace.ID, "item.RocketControlComputer", 1, 100)); } for (int i = 4; i <= 7; i++) { input.put(i, new ItemStack(GCItems.partBuggy)); @@ -2834,8 +2835,7 @@ private void buggyRecipes() { input3.put( 3, new PositionedStack( - GT_ModHandler - .getModItem(Constants.MOD_ID_GALAXYSPACE, "item.RocketControlComputer", 1, 100), + getModItem(Constants.MOD_ID_GALAXYSPACE, "item.RocketControlComputer", 1, 100), 62 - x, 73 - y)); } @@ -2948,14 +2948,15 @@ private void buggyRecipes() { new PositionedStack(new ItemStack(GCItems.buggy, 1, 3), 143 - x, 64 - y)); } - private void cargoRecipes() { + @Optional.Method(modid = "GalacticraftCore") + private static void cargoRecipes() { HashMap input = new HashMap<>(); HashMap input2; input.put(1, new ItemStack(GCItems.basicItem, 1, 14)); if (GalaxySpace.isModLoaded()) { - input.put(2, GT_ModHandler.getModItem(Constants.MOD_ID_GALAXYSPACE, "item.RocketControlComputer", 1, 101)); + input.put(2, getModItem(Constants.MOD_ID_GALAXYSPACE, "item.RocketControlComputer", 1, 101)); for (int i = 3; i <= 5; i++) { - input.put(i, GT_ModHandler.getModItem(Constants.MOD_ID_GALAXYSPACE, "item.ModuleSmallFuelCanister", 1)); + input.put(i, getModItem(Constants.MOD_ID_GALAXYSPACE, "item.ModuleSmallFuelCanister", 1)); } } input.put(7, new ItemStack(GCItems.partNoseCone)); @@ -2987,23 +2988,22 @@ private void cargoRecipes() { if (GalaxySpace.isModLoaded()) { input3.add( new PositionedStack( - GT_ModHandler - .getModItem(Constants.MOD_ID_GALAXYSPACE, "item.RocketControlComputer", 1, 101), + getModItem(Constants.MOD_ID_GALAXYSPACE, "item.RocketControlComputer", 1, 101), 134 - x, 28 - y)); input3.add( new PositionedStack( - GT_ModHandler.getModItem(Constants.MOD_ID_GALAXYSPACE, "item.ModuleSmallFuelCanister", 1), + getModItem(Constants.MOD_ID_GALAXYSPACE, "item.ModuleSmallFuelCanister", 1), 116 - x, 19 - y)); input3.add( new PositionedStack( - GT_ModHandler.getModItem(Constants.MOD_ID_GALAXYSPACE, "item.ModuleSmallFuelCanister", 1), + getModItem(Constants.MOD_ID_GALAXYSPACE, "item.ModuleSmallFuelCanister", 1), 152 - x, 19 - y)); input3.add( new PositionedStack( - GT_ModHandler.getModItem(Constants.MOD_ID_GALAXYSPACE, "item.ModuleSmallFuelCanister", 1), + getModItem(Constants.MOD_ID_GALAXYSPACE, "item.ModuleSmallFuelCanister", 1), 116 - x, 37 - y)); } @@ -3040,7 +3040,7 @@ private void cargoRecipes() { } @Optional.Method(modid = "GalacticraftCore") - private void astroMinerRecipes() { + private static void astroMinerRecipes() { final HashMap input = new HashMap<>(); for (int i = 1; i <= 8; i++) { input.put(i, new ItemStack(MarsItems.marsItemBasic, 1, 3)); @@ -3054,7 +3054,7 @@ private void astroMinerRecipes() { input.put(i, new ItemStack(AsteroidsItems.orionDrive)); } if (GalaxySpace.isModLoaded()) { - input.put(18, GT_ModHandler.getModItem(Constants.MOD_ID_GALAXYSPACE, "item.RocketControlComputer", 1, 102)); + input.put(18, getModItem(Constants.MOD_ID_GALAXYSPACE, "item.RocketControlComputer", 1, 102)); } input.put(19, new ItemStack(GCItems.basicItem, 1, 14)); input.put(20, new ItemStack(GCItems.basicItem, 1, 14)); @@ -3065,8 +3065,8 @@ private void astroMinerRecipes() { input.put(25, RecipeUtil.getChestItemStack(1, 1)); input.put(26, new ItemStack(AsteroidsItems.basicItem, 1, 8)); input.put(27, new ItemStack(AsteroidBlocks.beamReceiver)); - input.put(28, GT_ModHandler.getModItem(Constants.MOD_ID_GREGTECH, "gt.metaitem.01", 1, 32603)); - input.put(29, GT_ModHandler.getModItem(Constants.MOD_ID_GREGTECH, "gt.metaitem.01", 1, 32603)); + input.put(28, getModItem(Constants.MOD_ID_GREGTECH, "gt.metaitem.01", 1, 32603)); + input.put(29, getModItem(Constants.MOD_ID_GREGTECH, "gt.metaitem.01", 1, 32603)); GalacticraftRegistry .addAstroMinerRecipe(new NasaWorkbenchRecipe(new ItemStack(AsteroidsItems.astroMiner, 1, 0), input)); @@ -3096,8 +3096,7 @@ private void astroMinerRecipes() { if (GalaxySpace.isModLoaded()) { input3.add( new PositionedStack( - GT_ModHandler - .getModItem(Constants.MOD_ID_GALAXYSPACE, "item.RocketControlComputer", 1, 102), + getModItem(Constants.MOD_ID_GALAXYSPACE, "item.RocketControlComputer", 1, 102), 62 - x, 37 - y)); } @@ -3111,15 +3110,9 @@ private void astroMinerRecipes() { input3.add(new PositionedStack(new ItemStack(AsteroidsItems.basicItem, 1, 8), 44 - x, 73 - y)); input3.add(new PositionedStack(new ItemStack(AsteroidBlocks.beamReceiver), 62 - x, 73 - y)); input3.add( - new PositionedStack( - GT_ModHandler.getModItem(Constants.MOD_ID_GREGTECH, "gt.metaitem.01", 1, 32603), - 80 - x, - 73 - y)); + new PositionedStack(getModItem(Constants.MOD_ID_GREGTECH, "gt.metaitem.01", 1, 32603), 80 - x, 73 - y)); input3.add( - new PositionedStack( - GT_ModHandler.getModItem(Constants.MOD_ID_GREGTECH, "gt.metaitem.01", 1, 32603), - 98 - x, - 73 - y)); + new PositionedStack(getModItem(Constants.MOD_ID_GREGTECH, "gt.metaitem.01", 1, 32603), 98 - x, 73 - y)); instance.registerAstroMinerRecipe( input3, new PositionedStack(new ItemStack(AsteroidsItems.astroMiner), 143 - x, 55 - y));