added basic tuner recipe

master
Soper Aylamo 2021-05-25 23:29:08 -04:00
parent f5dbf42d01
commit 0f6e3c7273
Signed by: Soper
GPG Key ID: A27AC885ACC3BEAE
1 changed files with 34 additions and 4 deletions

View File

@ -12,8 +12,13 @@ import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.plugin.java.JavaPlugin; import org.bukkit.plugin.java.JavaPlugin;
import xyz.soper.arty.debug.DebugCommand; import xyz.soper.arty.debug.DebugCommand;
import xyz.soper.arty.event.Listener.MortarInteract; import xyz.soper.arty.event.Listener.MortarInteract;
import xyz.soper.arty.item.Mortar;
import xyz.soper.arty.item.MortarTuner;
import xyz.soper.arty.item.Shell; import xyz.soper.arty.item.Shell;
import java.util.ArrayList;
import java.util.List;
public class Artillery extends JavaPlugin { public class Artillery extends JavaPlugin {
@Override @Override
@ -23,8 +28,8 @@ public class Artillery extends JavaPlugin {
ItemStack baseMortar = new ItemStack(Material.BREWING_STAND); ItemStack baseMortar = new ItemStack(Material.BREWING_STAND);
ItemMeta baseMortarMeta = baseMortar.getItemMeta(); ItemMeta baseMortarMeta = baseMortar.getItemMeta();
assert baseMortarMeta != null; if(baseMortarMeta != null)
baseMortarMeta.setDisplayName(ChatColor.GRAY + "Basic Mortar"); baseMortarMeta.setDisplayName(Mortar.BASIC_MORTAR_NAME);
baseMortar.setItemMeta(baseMortarMeta); baseMortar.setItemMeta(baseMortarMeta);
NamespacedKey basicMortarKey = new NamespacedKey(this, "basic_mortar"); NamespacedKey basicMortarKey = new NamespacedKey(this, "basic_mortar");
@ -41,8 +46,8 @@ public class Artillery extends JavaPlugin {
ItemStack mortar = new ItemStack(Material.BREWING_STAND); ItemStack mortar = new ItemStack(Material.BREWING_STAND);
ItemMeta mortarMeta = mortar.getItemMeta(); ItemMeta mortarMeta = mortar.getItemMeta();
assert mortarMeta != null; if(mortarMeta != null)
mortarMeta.setDisplayName(ChatColor.GRAY + "Mortar"); mortarMeta.setDisplayName(Mortar.NORMAL_MORTAR_NAME);
mortar.setItemMeta(mortarMeta); mortar.setItemMeta(mortarMeta);
NamespacedKey mortarKey = new NamespacedKey(this, "mortar"); NamespacedKey mortarKey = new NamespacedKey(this, "mortar");
@ -56,6 +61,31 @@ public class Artillery extends JavaPlugin {
Bukkit.addRecipe(mortarRecipe); Bukkit.addRecipe(mortarRecipe);
//END OF NORMAL MORTAR RECIPE //END OF NORMAL MORTAR RECIPE
//START OF BASIC MORTAR TUNER RECIPE
ItemStack basicTuner = new ItemStack(Material.LEVER);
ItemMeta basicTunerMeta = basicTuner.getItemMeta();
if(basicTunerMeta != null) {
basicTunerMeta.setDisplayName(MortarTuner.BASIC_TUNER_NAME);
List<String> lore = new ArrayList<String>();
lore.add(ChatColor.GOLD + "Currently unlinked");
basicTunerMeta.setLore(lore);
}
basicTuner.setItemMeta(basicTunerMeta);
//TODO: This is the wrong recipe, this is for a normal tuner, not basic.
NamespacedKey basicTunerKey = new NamespacedKey(this, "basic_tuner");
ShapedRecipe basicTunerRecipe = new ShapedRecipe(basicTunerKey, basicTuner);
basicTunerRecipe.shape(" SI", " TC", "W ");
basicTunerRecipe.setIngredient('S', Material.STRING);
basicTunerRecipe.setIngredient('I', Material.IRON_INGOT);
basicTunerRecipe.setIngredient('T', Material.STICK);
basicTunerRecipe.setIngredient('C', Material.COMPASS);
basicTunerRecipe.setIngredient('W', Material.WHITE_WOOL);
Bukkit.addRecipe(basicTunerRecipe);
//END OF BASIC MORTAR TUNER RECIPE
//START OF DEBUG SHELL RECIPE //START OF DEBUG SHELL RECIPE
NamespacedKey debugShellKey = new NamespacedKey(this, "debug_shell"); NamespacedKey debugShellKey = new NamespacedKey(this, "debug_shell");
ShapelessRecipe debugShellRecipe = new ShapelessRecipe(debugShellKey, new Shell().getShell()); ShapelessRecipe debugShellRecipe = new ShapelessRecipe(debugShellKey, new Shell().getShell());