From a1ae4a3d6b52d7b29ca266ec7860bbdc89f530cf Mon Sep 17 00:00:00 2001 From: LuukFTF Date: Wed, 16 Oct 2019 23:32:11 +0200 Subject: [PATCH 1/2] Added shulker shell recipe --- README.md | 5 +---- .../vanillatweaks/CraftingTweaks/CraftingTweaks.java | 8 ++++++++ src/main/java/nl/kallestruik/vanillatweaks/config.java | 2 ++ src/main/resources/config.yml | 1 + 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index dbadc10..b9b3fe3 100644 --- a/README.md +++ b/README.md @@ -20,6 +20,7 @@ Currently included: - 3 glass + 1 popped chorus fruit -> 3 dragons breath - 8 kelp + 1 yellow dye -> 1 sponge - 1 dropper + 3 sticks + 3 string -> 1 dispenser +- 3 purpur slabs + 2 chorus fruit -> 1 shulker shell ### Dropped seed planting Automatically plants seed dropped on tilled soil. @@ -43,8 +44,4 @@ When breaking crops with a hoe you break a range around them. This drastically s ### Lily pad growing When right-clicking a lily pad with bone meal it wil grow new lily pads around the one that was clicked. -## Planned tweaks -- Dynamite -- Sign editing - diff --git a/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java b/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java index 7db5dea..f593d61 100644 --- a/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java +++ b/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java @@ -73,6 +73,13 @@ public class CraftingTweaks { dispenserRecipe.setIngredient('D', Material.DROPPER); dispenserRecipe.setIngredient('S', Material.STRING); + // Shulker Shell + NamespacedKey shulkerShellKey = new NamespacedKey(plugin, "shulker_shell"); + ShapedRecipe shulkerShellRecipe = new ShapedRecipe(shulkerShellKey, new ItemStack(Material.SHULKER_SHELL)); + shulkerShellRecipe.shape("BBB","F F"); + shulkerShellRecipe.setIngredient('B', Material.PURPUR_SLAB); + shulkerShellRecipe.setIngredient('F', Material.POPPED_CHORUS_FRUIT); + // Add recipes @@ -85,5 +92,6 @@ public class CraftingTweaks { 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); + if (config.CRAFTING_TWEAKS_SHULKER_SHELL) plugin.getServer().addRecipe(shulkerShellRecipe) } } diff --git a/src/main/java/nl/kallestruik/vanillatweaks/config.java b/src/main/java/nl/kallestruik/vanillatweaks/config.java index 390165d..db46f1d 100644 --- a/src/main/java/nl/kallestruik/vanillatweaks/config.java +++ b/src/main/java/nl/kallestruik/vanillatweaks/config.java @@ -21,6 +21,7 @@ public class config { public static boolean CRAFTING_TWEAKS_DRAGONS_BREATH; public static boolean CRAFTING_TWEAKS_SPONGE; public static boolean CRAFTING_TWEAKS_DISPENSER; + public static boolean CRAFTING_TWEAKS_SHULKER_SHELL; public static boolean SEED_DROP_PLANTING_ENABLED; @@ -57,6 +58,7 @@ public class config { CRAFTING_TWEAKS_DRAGONS_BREATH = config.getBoolean("crafting-tweaks.dragons-breath"); CRAFTING_TWEAKS_SPONGE = config.getBoolean("crafting-tweaks.sponge"); CRAFTING_TWEAKS_DISPENSER = config.getBoolean("crafting-tweaks.dispenser"); + CRAFTING_TWEAKS_SHULKER_SHELL = config.getBoolean("çrafting-tweaks.shulker-shell") 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 3050e8b..5f96cd2 100644 --- a/src/main/resources/config.yml +++ b/src/main/resources/config.yml @@ -12,6 +12,7 @@ crafting-tweaks: dragons-breath: true sponge: true dispenser: true + shulker-shell: true seed-drop-planting: enabled: true From 103c7a8bd4feea5a28170206d5ba0965d51c1dac Mon Sep 17 00:00:00 2001 From: LuukFTF Date: Wed, 16 Oct 2019 21:39:33 +0000 Subject: [PATCH 2/2] Update src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java --- .../vanillatweaks/CraftingTweaks/CraftingTweaks.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java b/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java index f593d61..5c29438 100644 --- a/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java +++ b/src/main/java/nl/kallestruik/vanillatweaks/CraftingTweaks/CraftingTweaks.java @@ -92,6 +92,6 @@ public class CraftingTweaks { 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); - if (config.CRAFTING_TWEAKS_SHULKER_SHELL) plugin.getServer().addRecipe(shulkerShellRecipe) + if (config.CRAFTING_TWEAKS_SHULKER_SHELL) plugin.getServer().addRecipe(shulkerShellRecipe); } }