Added crafting recipe for dragons breath. Fixed typo.

master
LuukFTF 2019-10-05 00:43:40 +02:00
parent b6740b9de3
commit e3db5f892c
5 changed files with 15 additions and 2 deletions

View File

@ -17,6 +17,7 @@ Currently included:
- 3 leather + 2 string + 2 iron ingot -> 1 saddle - 3 leather + 2 string + 2 iron ingot -> 1 saddle
- 1 blue ice -> 9 packed ice - 1 blue ice -> 9 packed ice
- 1 packed ice -> 9 ice - 1 packed ice -> 9 ice
- 3 glass + 1 popped chorus fruit -> 3 dragons breath
### Dropped seed planting ### Dropped seed planting
Automatically plants seed dropped on tilled soil. Automatically plants seed dropped on tilled soil.

View File

@ -49,7 +49,14 @@ public class CraftingTweaks {
// Packed ice -> 9 ice // Packed ice -> 9 ice
NamespacedKey iceKey = new NamespacedKey(plugin, "ice"); NamespacedKey iceKey = new NamespacedKey(plugin, "ice");
ShapelessRecipe iceRecipe = new ShapelessRecipe(iceKey, new ItemStack(Material.ICE, 9)); ShapelessRecipe iceRecipe = new ShapelessRecipe(iceKey, new ItemStack(Material.ICE, 9));
packedIceRecipe.addIngredient(Material.PACKED_ICE); iceRecipe.addIngredient(Material.PACKED_ICE);
// Dragons breath
NamespacedKey dragonBreathKey = new NamespacedKey(plugin, "dragon_breath");
ShapedRecipe dragonBreathRecipe = new ShapedRecipe(dragonBreathKey, new ItemStack(Material.DRAGON_BREATH, 3));
dragonBreathRecipe.shape("GCG", " G ");
dragonBreathRecipe.setIngredient('G', Material.GLASS);
dragonBreathRecipe.setIngredient('C', Material.POPPED_CHORUS_FRUIT);
// Add recipes // Add recipes
if (config.CRAFTING_TWEAKS_BETTER_CHEST) plugin.getServer().addRecipe(chestRecipe); if (config.CRAFTING_TWEAKS_BETTER_CHEST) plugin.getServer().addRecipe(chestRecipe);
@ -58,6 +65,6 @@ public class CraftingTweaks {
if (config.CRAFTING_TWEAKS_SADDLE) plugin.getServer().addRecipe(saddleRecipe); if (config.CRAFTING_TWEAKS_SADDLE) plugin.getServer().addRecipe(saddleRecipe);
if (config.CRAFTING_TWEAKS_PACKED_ICE) plugin.getServer().addRecipe(packedIceRecipe); if (config.CRAFTING_TWEAKS_PACKED_ICE) plugin.getServer().addRecipe(packedIceRecipe);
if (config.CRAFTING_TWEAKS_ICE) plugin.getServer().addRecipe(iceRecipe); if (config.CRAFTING_TWEAKS_ICE) plugin.getServer().addRecipe(iceRecipe);
if (config.CRAFTING_TWEAKS_DRAGONS_BREATH) plugin.getServer().addRecipe(dragonBreathRecipe);
} }
} }

View File

@ -52,6 +52,8 @@ public final class VanillaTweaks extends JavaPlugin {
getServer().getPluginManager().registerEvents(new HoeHarvestingHandler(), this); getServer().getPluginManager().registerEvents(new HoeHarvestingHandler(), this);
} }
} catch (IOException | InvalidConfigurationException | NullPointerException e) { } catch (IOException | InvalidConfigurationException | NullPointerException e) {
util.printException(e); util.printException(e);
} }

View File

@ -17,6 +17,7 @@ public class config {
public static boolean CRAFTING_TWEAKS_SADDLE; public static boolean CRAFTING_TWEAKS_SADDLE;
public static boolean CRAFTING_TWEAKS_PACKED_ICE; public static boolean CRAFTING_TWEAKS_PACKED_ICE;
public static boolean CRAFTING_TWEAKS_ICE; public static boolean CRAFTING_TWEAKS_ICE;
public static boolean CRAFTING_TWEAKS_DRAGONS_BREATH;
public static boolean SEED_DROP_PLANTING_ENABLED; public static boolean SEED_DROP_PLANTING_ENABLED;
@ -48,6 +49,7 @@ public class config {
CRAFTING_TWEAKS_SADDLE = config.getBoolean("crafting-tweaks.saddle"); CRAFTING_TWEAKS_SADDLE = config.getBoolean("crafting-tweaks.saddle");
CRAFTING_TWEAKS_PACKED_ICE = config.getBoolean("crafting-tweaks.packed-ice"); CRAFTING_TWEAKS_PACKED_ICE = config.getBoolean("crafting-tweaks.packed-ice");
CRAFTING_TWEAKS_ICE = config.getBoolean("crafting-tweaks.ice"); CRAFTING_TWEAKS_ICE = config.getBoolean("crafting-tweaks.ice");
CRAFTING_TWEAKS_DRAGONS_BREATH = config.getBoolean("crafting-tweaks.dragons-breath");
SEED_DROP_PLANTING_ENABLED = config.getBoolean("seed-drop-planting.enabled"); SEED_DROP_PLANTING_ENABLED = config.getBoolean("seed-drop-planting.enabled");

View File

@ -9,6 +9,7 @@ crafting-tweaks:
saddle: true saddle: true
packed-ice: true packed-ice: true
ice: true ice: true
dragons-breath: true
seed-drop-planting: seed-drop-planting:
enabled: true enabled: true