diff --git a/README.md b/README.md index 7363385..3838e94 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,7 @@ Currently included: - 1 packed ice -> 9 ice - 3 glass + 1 popped chorus fruit -> 3 dragons breath - 8 kelp + 1 yellow dye -> 1 sponge +- 1 dropper + 3 sticks + 3 string -> 1 dispenser ### Dropped seed planting Automatically plants seed dropped on tilled soil. diff --git a/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java b/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java index 87683b2..8142dce 100644 --- a/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java +++ b/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java @@ -65,6 +65,13 @@ public class CraftingTweaks { spongeRecipe.setIngredient('K', Material.KELP); spongeRecipe.setIngredient('D', Material.YELLOW_DYE); + // Dispenser Alternative Recipe + NamespacedKey dispenserKey = new NamespacedKey(plugin, "dispenser"); + ShapedRecipe dispenserRecipe = new ShapedRecipe(dispenserKey, new ItemStack(Material.DISPENSER)); + spongeRecipe.shape(" TS","TDS"," TS"); + spongeRecipe.setIngredient('T', Material.STICK); + spongeRecipe.setIngredient('D', Material.DROPPER); + spongeRecipe.setIngredient('S', Material.STRING); @@ -77,5 +84,6 @@ public class CraftingTweaks { if (config.CRAFTING_TWEAKS_ICE) plugin.getServer().addRecipe(iceRecipe); if (config.CRAFTING_TWEAKS_DRAGONS_BREATH) plugin.getServer().addRecipe(dragonBreathRecipe); if (config.CRAFTING_TWEAKS_SPONGE) plugin.getServer().addRecipe(spongeRecipe); + if (config.CRAFTING_TWEAKS_DISPENSER) plugin.getServer().addRecipe((dispenserRecipe)); } } diff --git a/src/main/java/nl/kallestruik/vanillatweaks/config.java b/src/main/java/nl/kallestruik/vanillatweaks/config.java index e9e23db..041f3b4 100644 --- a/src/main/java/nl/kallestruik/vanillatweaks/config.java +++ b/src/main/java/nl/kallestruik/vanillatweaks/config.java @@ -19,6 +19,7 @@ public class config { public static boolean CRAFTING_TWEAKS_ICE; public static boolean CRAFTING_TWEAKS_DRAGONS_BREATH; public static boolean CRAFTING_TWEAKS_SPONGE; + public static boolean CRAFTING_TWEAKS_DISPENSER; public static boolean SEED_DROP_PLANTING_ENABLED; @@ -52,6 +53,7 @@ public class config { CRAFTING_TWEAKS_ICE = config.getBoolean("crafting-tweaks.ice"); CRAFTING_TWEAKS_DRAGONS_BREATH = config.getBoolean("crafting-tweaks.dragons-breath"); CRAFTING_TWEAKS_SPONGE = config.getBoolean("crafting-tweaks.sponge"); + CRAFTING_TWEAKS_DISPENSER = config.getBoolean("crafting-tweak.dispenser"); SEED_DROP_PLANTING_ENABLED = config.getBoolean("seed-drop-planting.enabled"); diff --git a/src/main/resources/config.yml b/src/main/resources/config.yml index e255953..5d8951d 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -11,6 +11,7 @@ crafting-tweaks: ice: true dragons-breath: true sponge: true + dispenser: true seed-drop-planting: enabled: true