Add recipes for packed ice and normal ice (from blue and packed ice)

master
dragontamerfred 2019-10-03 19:01:48 +02:00
parent 94366f74d2
commit 43aee539c4
3 changed files with 19 additions and 0 deletions

View File

@ -41,10 +41,23 @@ public class CraftingTweaks {
saddleRecipe.setIngredient('S', Material.STRING);
saddleRecipe.setIngredient('I', Material.IRON_INGOT);
// Blue ice -> 9 packed ice
NamespacedKey packedIceKey = new NamespacedKey(plugin, "packed_ice");
ShapelessRecipe packedIceRecipe = new ShapelessRecipe(packedIceKey, new ItemStack(Material.PACKED_ICE, 9));
packedIceRecipe.addIngredient(Material.BLUE_ICE);
// Packed ice -> 9 ice
NamespacedKey iceKey = new NamespacedKey(plugin, "ice");
ShapelessRecipe iceRecipe = new ShapelessRecipe(iceKey, new ItemStack(Material.ICE, 9));
packedIceRecipe.addIngredient(Material.PACKED_ICE);
// Add recipes
if (config.CRAFTING_TWEAKS_BETTER_CHEST) plugin.getServer().addRecipe(chestRecipe);
if (config.CRAFTING_TWEAKS_NAME_TAG) plugin.getServer().addRecipe(nametagRecipe);
if (config.CRAFTING_TWEAKS_WOOL_TO_STRING) plugin.getServer().addRecipe(stringRecipe);
if (config.CRAFTING_TWEAKS_SADDLE) plugin.getServer().addRecipe(saddleRecipe);
if (config.CRAFTING_TWEAKS_PACKED_ICE) plugin.getServer().addRecipe(packedIceRecipe);
if (config.CRAFTING_TWEAKS_ICE) plugin.getServer().addRecipe(iceRecipe);
}
}

View File

@ -15,6 +15,8 @@ public class config {
public static boolean CRAFTING_TWEAKS_NAME_TAG;
public static boolean CRAFTING_TWEAKS_WOOL_TO_STRING;
public static boolean CRAFTING_TWEAKS_SADDLE;
public static boolean CRAFTING_TWEAKS_PACKED_ICE;
public static boolean CRAFTING_TWEAKS_ICE;
public static boolean SEED_DROP_PLANTING_ENABLED;
@ -37,6 +39,8 @@ public class config {
CRAFTING_TWEAKS_NAME_TAG = config.getBoolean("crafting-tweaks.name-tag");
CRAFTING_TWEAKS_WOOL_TO_STRING = config.getBoolean("crafting-tweaks.wool-to-string");
CRAFTING_TWEAKS_SADDLE = config.getBoolean("crafting-tweaks.saddle");
CRAFTING_TWEAKS_PACKED_ICE = config.getBoolean("crafting-tweaks.packed-ice");
CRAFTING_TWEAKS_ICE = config.getBoolean("crafting-tweaks.ice");
SEED_DROP_PLANTING_ENABLED = config.getBoolean("seed-drop-planting.enabled");

View File

@ -7,6 +7,8 @@ crafting-tweaks:
name-tag: true
wool-to-string: true
saddle: true
packed-ice: true
ice: true
seed-drop-planting:
enabled: true