From dbf86b2b4a42823d51d912fde80720d14a869e30 Mon Sep 17 00:00:00 2001 From: LuukFTF Date: Sat, 5 Oct 2019 01:52:55 +0200 Subject: [PATCH] Added crafting recipe for sponge. --- README.md | 1 + .../vanillatweaks/CraftingTweaks/CraftingTweaks.java | 11 +++++++++++ .../java/nl/kallestruik/vanillatweaks/config.java | 2 ++ src/main/resources/config.yml | 1 + 4 files changed, 15 insertions(+) diff --git a/README.md b/README.md index 1651ffb..7363385 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ Currently included: - 1 blue ice -> 9 packed ice - 1 packed ice -> 9 ice - 3 glass + 1 popped chorus fruit -> 3 dragons breath +- 8 kelp + 1 yellow dye -> 1 sponge ### 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 edcd2c6..87683b2 100644 --- a/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java +++ b/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java @@ -58,6 +58,16 @@ public class CraftingTweaks { dragonBreathRecipe.setIngredient('G', Material.GLASS); dragonBreathRecipe.setIngredient('C', Material.POPPED_CHORUS_FRUIT); + // Sponge Block + NamespacedKey spongeKey = new NamespacedKey(plugin, "sponge"); + ShapedRecipe spongeRecipe = new ShapedRecipe(spongeKey, new ItemStack(Material.SPONGE)); + spongeRecipe.shape("KKK","KDK","KKK"); + spongeRecipe.setIngredient('K', Material.KELP); + spongeRecipe.setIngredient('D', Material.YELLOW_DYE); + + + + // Add recipes if (config.CRAFTING_TWEAKS_BETTER_CHEST) plugin.getServer().addRecipe(chestRecipe); if (config.CRAFTING_TWEAKS_NAME_TAG) plugin.getServer().addRecipe(nametagRecipe); @@ -66,5 +76,6 @@ public class CraftingTweaks { if (config.CRAFTING_TWEAKS_PACKED_ICE) plugin.getServer().addRecipe(packedIceRecipe); 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); } } diff --git a/src/main/java/nl/kallestruik/vanillatweaks/config.java b/src/main/java/nl/kallestruik/vanillatweaks/config.java index 3ce4165..e9e23db 100644 --- a/src/main/java/nl/kallestruik/vanillatweaks/config.java +++ b/src/main/java/nl/kallestruik/vanillatweaks/config.java @@ -18,6 +18,7 @@ public class config { public static boolean CRAFTING_TWEAKS_PACKED_ICE; public static boolean CRAFTING_TWEAKS_ICE; public static boolean CRAFTING_TWEAKS_DRAGONS_BREATH; + public static boolean CRAFTING_TWEAKS_SPONGE; public static boolean SEED_DROP_PLANTING_ENABLED; @@ -50,6 +51,7 @@ public class config { CRAFTING_TWEAKS_PACKED_ICE = config.getBoolean("crafting-tweaks.packed-ice"); 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"); 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 7e1c109..e255953 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -10,6 +10,7 @@ crafting-tweaks: packed-ice: true ice: true dragons-breath: true + sponge: true seed-drop-planting: enabled: true