Improvements to Crafting Recipes
Added a configuration option for adjusting the number of World Threads needed to create one Stable Fabric. A few users have asked for this to be available. The default setting is our usual 8 thread for each fabric. Also overhauled our recipes to remove blank item slots, allowing them to be crafted on any line of the grid, as long as all the items are aligned properly.
This commit is contained in:
@@ -9,89 +9,82 @@ import static StevenDimDoors.mod_pocketDim.mod_pocketDim.*;
|
|||||||
|
|
||||||
public class CraftingManager
|
public class CraftingManager
|
||||||
{
|
{
|
||||||
|
private CraftingManager() { }
|
||||||
|
|
||||||
public static void registerRecipes(DDProperties properties)
|
public static void registerRecipes(DDProperties properties)
|
||||||
{
|
{
|
||||||
|
if (properties.CraftingStableFabricAllowed)
|
||||||
|
{
|
||||||
|
switch (properties.WorldThreadRequirementLevel)
|
||||||
|
{
|
||||||
|
case 1:
|
||||||
|
GameRegistry.addShapelessRecipe(new ItemStack(itemStableFabric, 1),
|
||||||
|
Item.enderPearl, mod_pocketDim.itemWorldThread);
|
||||||
|
break;
|
||||||
|
case 2:
|
||||||
|
GameRegistry.addRecipe(new ItemStack(itemStableFabric, 1),
|
||||||
|
"yxy", 'x', Item.enderPearl, 'y', mod_pocketDim.itemWorldThread);
|
||||||
|
break;
|
||||||
|
case 3:
|
||||||
|
GameRegistry.addRecipe(new ItemStack(itemStableFabric, 1),
|
||||||
|
" y ", "yxy", " y ", 'x', Item.enderPearl, 'y', mod_pocketDim.itemWorldThread);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
GameRegistry.addRecipe(new ItemStack(itemStableFabric, 1),
|
||||||
|
"yyy", "yxy", "yyy", 'x', Item.enderPearl, 'y', mod_pocketDim.itemWorldThread);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (properties.CraftingDimensionalDoorAllowed)
|
if (properties.CraftingDimensionalDoorAllowed)
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ItemStack(itemDimensionalDoor, 1), new Object[]
|
GameRegistry.addRecipe(new ItemStack(itemDimensionalDoor, 1),
|
||||||
{
|
"yxy", 'x', mod_pocketDim.itemStableFabric, 'y', Item.doorIron);
|
||||||
" ", "yxy", " ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.doorIron
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if (properties.CraftingUnstableDoorAllowed)
|
if (properties.CraftingUnstableDoorAllowed)
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ItemStack(itemUnstableDoor, 1), new Object[]
|
GameRegistry.addRecipe(new ItemStack(itemUnstableDoor, 1),
|
||||||
{
|
"yxy", 'x', Item.eyeOfEnder, 'y', mod_pocketDim.itemDimensionalDoor);
|
||||||
" ", "yxy", " ", 'x', Item.eyeOfEnder, 'y', mod_pocketDim.itemDimensionalDoor
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if (properties.CraftingWarpDoorAllowed)
|
if (properties.CraftingWarpDoorAllowed)
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ItemStack(itemWarpDoor, 1), new Object[]
|
GameRegistry.addRecipe(new ItemStack(itemWarpDoor, 1),
|
||||||
{
|
"yxy", 'x', mod_pocketDim.itemStableFabric, 'y', Item.doorWood);
|
||||||
" ", "yxy", " ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.doorWood
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if (properties.CraftingTransTrapdoorAllowed)
|
if (properties.CraftingTransTrapdoorAllowed)
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ItemStack(transTrapdoor, 1), new Object[]
|
GameRegistry.addRecipe(new ItemStack(transTrapdoor, 1),
|
||||||
{
|
"y", "x", "y", 'x', mod_pocketDim.itemStableFabric, 'y', Block.trapdoor);
|
||||||
" y ", " x ", " y ", 'x', mod_pocketDim.itemStableFabric, 'y', Block.trapdoor
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if (properties.CraftingRiftSignatureAllowed)
|
if (properties.CraftingRiftSignatureAllowed)
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ItemStack(itemRiftSignature, 1), new Object[]
|
GameRegistry.addRecipe(new ItemStack(itemRiftSignature, 1),
|
||||||
{
|
" y ", "yxy", " y ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.ingotIron);
|
||||||
" y ", "yxy", " y ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.ingotIron
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties.CraftingRiftRemoverAllowed)
|
if (properties.CraftingRiftRemoverAllowed)
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ItemStack(itemRiftRemover, 1), new Object[]
|
GameRegistry.addRecipe(new ItemStack(itemRiftRemover, 1),
|
||||||
{
|
"yyy", "yxy", "yyy", 'x', mod_pocketDim.itemStableFabric, 'y', Item.ingotGold);
|
||||||
"yyy", "yxy", "yyy", 'x', mod_pocketDim.itemStableFabric, 'y', Item.ingotGold
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties.CraftingRiftBladeAllowed)
|
if (properties.CraftingRiftBladeAllowed)
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ItemStack(itemRiftBlade, 1), new Object[]
|
GameRegistry.addRecipe(new ItemStack(itemRiftBlade, 1),
|
||||||
{
|
"x", "x", "y", 'x', mod_pocketDim.itemStableFabric, 'y', Item.blazeRod);
|
||||||
" x ", " x ", " y ", 'x', mod_pocketDim.itemStableFabric, 'y', Item.blazeRod
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (properties.CraftingStableFabricAllowed)
|
|
||||||
{
|
|
||||||
GameRegistry.addRecipe(new ItemStack(itemStableFabric, 1), new Object[]
|
|
||||||
{
|
|
||||||
"yyy", "yxy", "yyy", 'x', Item.enderPearl, 'y', mod_pocketDim.itemWorldThread
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (properties.CraftingStabilizedRiftSignatureAllowed)
|
if (properties.CraftingStabilizedRiftSignatureAllowed)
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemStabilizedLinkSignature,1), new Object[]
|
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemStabilizedLinkSignature,1),
|
||||||
{
|
" y ", "yxy", " y ", 'x', mod_pocketDim.itemRiftSignature, 'y', mod_pocketDim.itemStableFabric);
|
||||||
" y ", "yxy", " y ", 'x', mod_pocketDim.itemRiftSignature, 'y', mod_pocketDim.itemStableFabric
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if (properties.CraftingGoldenDimensionalDoorAllowed)
|
if (properties.CraftingGoldenDimensionalDoorAllowed)
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemGoldenDimensionalDoor,1), new Object[]
|
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemGoldenDimensionalDoor,1),
|
||||||
{
|
"yxy", 'x', mod_pocketDim.itemGoldenDoor, 'y', mod_pocketDim.itemStableFabric);
|
||||||
" ", "xyx", " ", 'x', mod_pocketDim.itemGoldenDoor, 'y', Item.eyeOfEnder
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
if (properties.CraftingGoldenDoorAllowed)
|
if (properties.CraftingGoldenDoorAllowed)
|
||||||
{
|
{
|
||||||
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemGoldenDoor, 1), new Object[]
|
GameRegistry.addRecipe(new ItemStack(mod_pocketDim.itemGoldenDoor, 1),
|
||||||
{
|
"yy", "yy", "yy", 'y', Item.ingotGold);
|
||||||
"yy ", "yy ", "yy ", 'y', Item.ingotGold
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -108,6 +108,7 @@ public class DDProperties
|
|||||||
public final int FortressGatewayGenerationChance;
|
public final int FortressGatewayGenerationChance;
|
||||||
public final int MonolithSpawningChance;
|
public final int MonolithSpawningChance;
|
||||||
public final int LimboReturnRange;
|
public final int LimboReturnRange;
|
||||||
|
public final int WorldThreadRequirementLevel;
|
||||||
public final String CustomSchematicDirectory;
|
public final String CustomSchematicDirectory;
|
||||||
|
|
||||||
|
|
||||||
@@ -144,6 +145,10 @@ public class DDProperties
|
|||||||
CraftingGoldenDoorAllowed = config.get(CATEGORY_CRAFTING, "Allow Crafting Golden Door", true).getBoolean(true);
|
CraftingGoldenDoorAllowed = config.get(CATEGORY_CRAFTING, "Allow Crafting Golden Door", true).getBoolean(true);
|
||||||
CraftingGoldenDimensionalDoorAllowed = config.get(CATEGORY_CRAFTING, "Allow Crafting Golden Dimensional Door", true).getBoolean(true);
|
CraftingGoldenDimensionalDoorAllowed = config.get(CATEGORY_CRAFTING, "Allow Crafting Golden Dimensional Door", true).getBoolean(true);
|
||||||
|
|
||||||
|
WorldThreadRequirementLevel = config.get(CATEGORY_CRAFTING, "World Thread Requirement Level", 4,
|
||||||
|
"Controls the amount of World Thread needed to craft Stable Fabric. The number must be an " +
|
||||||
|
"integer from 1 to 4. The levels change the recipe to use 1, 2, 4, or 8 threads, respectively. The default level is 4.").getInt();
|
||||||
|
|
||||||
RiftBladeLootEnabled = config.get(CATEGORY_LOOT, "Enable Rift Blade Loot", true).getBoolean(true);
|
RiftBladeLootEnabled = config.get(CATEGORY_LOOT, "Enable Rift Blade Loot", true).getBoolean(true);
|
||||||
FabricOfRealityLootEnabled = config.get(CATEGORY_LOOT, "Enable Fabric of Reality Loot", true).getBoolean(true);
|
FabricOfRealityLootEnabled = config.get(CATEGORY_LOOT, "Enable Fabric of Reality Loot", true).getBoolean(true);
|
||||||
WorldThreadLootEnabled = config.get(CATEGORY_LOOT, "Enable World Thread Loot", true).getBoolean(true);
|
WorldThreadLootEnabled = config.get(CATEGORY_LOOT, "Enable World Thread Loot", true).getBoolean(true);
|
||||||
|
|||||||
Reference in New Issue
Block a user