Skip to content

Commit

Permalink
Feat/alathra accessories 2 (#123)
Browse files Browse the repository at this point in the history
* feat: Alathra Accessories 2.0

* fix: recipe tweaks and version bump

* Update build.gradle.kts

---------

Co-authored-by: ShermansWorld <[email protected]>
  • Loading branch information
Xavbeat03 and ShermansWorld authored Sep 18, 2024
1 parent 76e34d3 commit 47f8e5f
Show file tree
Hide file tree
Showing 5 changed files with 131 additions and 161 deletions.
4 changes: 2 additions & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ plugins {

group = "me.ShermansWorld"

version = "1.27.2"
version = "1.29.0"
description = ""
val mainPackage = "${project.group}.${rootProject.name}"

Expand Down Expand Up @@ -211,4 +211,4 @@ else
project.version = if (versionArg.first().equals('v', true))
versionArg.substring(1)
else
versionArg.uppercase()
versionArg.uppercase()
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
import me.ShermansWorld.AlathraExtras.funny.FreeOpCommand;
import me.ShermansWorld.AlathraExtras.funny.HeadScourgeListener;
import me.ShermansWorld.AlathraExtras.halloween.CandyEatListener;
import me.ShermansWorld.AlathraExtras.items.ItemConverter;
import me.ShermansWorld.AlathraExtras.items.ItemUseListener;
import me.ShermansWorld.AlathraExtras.chat.joinleavemessages.JoinLeaveMessages;
import me.ShermansWorld.AlathraExtras.metrics.MetricsManager;
Expand Down Expand Up @@ -170,7 +169,6 @@ public void onEnable() {
this.getServer().getPluginManager().registerEvents(new FarmingListener(), this);
// this.getServer().getPluginManager().registerEvents(new BookEventsListener(), this);
// This is broken do not enable unless you have confirmed its working.
this.getServer().getPluginManager().registerEvents(new ItemConverter(), this);
this.getServer().getPluginManager().registerEvents(new TownyMenu(), this);
this.getServer().getPluginManager().registerEvents(new CauldronRecipesListener(), this);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -394,9 +394,8 @@ public static void strawHatRecipe() {
NamespacedKey key = new NamespacedKey(AlathraExtras.getInstance(),
AlathraExtras.getInstance().getName() + "straw_hat");
ShapedRecipe strawHatRecipe = new ShapedRecipe(key, strawHat);
strawHatRecipe.shape("@@@", "@#@", "$ $");
strawHatRecipe.shape("@@@", "@ @", "$ $");
strawHatRecipe.setIngredient('@', Material.WHEAT);
strawHatRecipe.setIngredient('#', Material.LEATHER_HELMET);
strawHatRecipe.setIngredient('$', Material.STRING);
AlathraExtras.getInstance().getServer().addRecipe(strawHatRecipe);
}
Expand Down Expand Up @@ -502,6 +501,125 @@ public static void caneRecipe() {
AlathraExtras.getInstance().getServer().addRecipe(caneRecipe);
}

public static void scepterRecipe() {
ItemStack scepter = new ItemStack(Material.STICK);
ItemMeta scepterMeta = scepter.getItemMeta();
scepterMeta.displayName(ColorParser.of("Ruler's Scepter").build());
scepterMeta.lore(List.of(ColorParser.of("<green><bold>Alathran Accessory</bold></green>").build()));
scepterMeta.setCustomModelData(202);
scepter.setItemMeta(scepterMeta);
NamespacedKey key = new NamespacedKey(AlathraExtras.getInstance(),
AlathraExtras.getInstance().getName() + "scepter");
ShapedRecipe scepterRecipe = new ShapedRecipe(key, scepter);
scepterRecipe.shape("@# ", "$%$", " ^%");
scepterRecipe.setIngredient('@', Material.AMETHYST_SHARD);
scepterRecipe.setIngredient('#', Material.LAPIS_LAZULI);
scepterRecipe.setIngredient('$', Material.REDSTONE);
scepterRecipe.setIngredient('%', Material.GOLD_INGOT);
scepterRecipe.setIngredient('^', Material.EMERALD);
AlathraExtras.getInstance().getServer().addRecipe(scepterRecipe);
}

public static void wizardStaffRecipe() {
ItemStack wizardStaff = new ItemStack(Material.STICK);
ItemMeta wizardStaffMeta = wizardStaff.getItemMeta();
wizardStaffMeta.displayName(ColorParser.of("Wizard's Staff").build());
wizardStaffMeta.lore(List.of(ColorParser.of("<green><bold>Alathran Accessory</bold></green>").build()));
wizardStaffMeta.setCustomModelData(203);
wizardStaff.setItemMeta(wizardStaffMeta);
NamespacedKey key = new NamespacedKey(AlathraExtras.getInstance(),
AlathraExtras.getInstance().getName() + "wizardStaff");
ShapedRecipe wizardStaffRecipe = new ShapedRecipe(key, wizardStaff);
wizardStaffRecipe.shape(" @@", " #@", " @");
wizardStaffRecipe.setIngredient('@', Material.STICK);
wizardStaffRecipe.setIngredient('#', Material.LAPIS_BLOCK);
AlathraExtras.getInstance().getServer().addRecipe(wizardStaffRecipe);
}

public static void tophatRecipe() {
ItemStack tophat = new ItemStack(Material.CARVED_PUMPKIN);
ItemMeta tophatMeta = tophat.getItemMeta();
tophatMeta.displayName(ColorParser.of("Gentleman's Pride").build());
tophatMeta.lore(List.of(ColorParser.of("<green><bold>Alathran Accessory</bold></green>").build()));
tophatMeta.setCustomModelData(207);
tophat.setItemMeta(tophatMeta);
NamespacedKey key = new NamespacedKey(AlathraExtras.getInstance(),
AlathraExtras.getInstance().getName() + "tophat");
ShapedRecipe tophatRecipe = new ShapedRecipe(key, tophat);
tophatRecipe.shape(" @ ", " # ", "$$$");
tophatRecipe.setIngredient('@', Material.BLACK_WOOL);
tophatRecipe.setIngredient('#', Material.WHITE_WOOL);
tophatRecipe.setIngredient('$', Material.BLACK_CARPET);
AlathraExtras.getInstance().getServer().addRecipe(tophatRecipe);
}

public static void hornedHelmetRecipe() {
ItemStack hornedHelmet = new ItemStack(Material.CARVED_PUMPKIN);
ItemMeta hornedHelmetMeta = hornedHelmet.getItemMeta();
hornedHelmetMeta.displayName(ColorParser.of("Horned Helmet").build());
hornedHelmetMeta.lore(List.of(ColorParser.of("<green><bold>Alathran Accessory</bold></green>").build()));
hornedHelmetMeta.setCustomModelData(208);
hornedHelmet.setItemMeta(hornedHelmetMeta);
NamespacedKey key = new NamespacedKey(AlathraExtras.getInstance(),
AlathraExtras.getInstance().getName() + "hornedHelmet");
ShapedRecipe hornedHelmetRecipe = new ShapedRecipe(key, hornedHelmet);
hornedHelmetRecipe.shape("@ @", "$#$", "$ $");
hornedHelmetRecipe.setIngredient('@', Material.BONE);
hornedHelmetRecipe.setIngredient('#', Material.IRON_INGOT);
hornedHelmetRecipe.setIngredient('$', Material.LEATHER);
AlathraExtras.getInstance().getServer().addRecipe(hornedHelmetRecipe);
}

public static void mustacheRecipe() {
ItemStack mustache = new ItemStack(Material.CARVED_PUMPKIN);
ItemMeta mustacheMeta = mustache.getItemMeta();
mustacheMeta.displayName(ColorParser.of("Mighty Stache").build());
mustacheMeta.lore(List.of(ColorParser.of("<green><bold>Alathran Accessory</bold></green>").build()));
mustacheMeta.setCustomModelData(209);
mustache.setItemMeta(mustacheMeta);
NamespacedKey key = new NamespacedKey(AlathraExtras.getInstance(),
AlathraExtras.getInstance().getName() + "mustache");
ShapedRecipe mustacheRecipe = new ShapedRecipe(key, mustache);
mustacheRecipe.shape(" ", "@@@", "@ @");
mustacheRecipe.setIngredient('@', Material.BLACK_WOOL);
AlathraExtras.getInstance().getServer().addRecipe(mustacheRecipe);
}

public static void crownRecipe() {
ItemStack crown = new ItemStack(Material.CARVED_PUMPKIN);
ItemMeta crownMeta = crown.getItemMeta();
crownMeta.displayName(ColorParser.of("Ruler's Crown").build());
crownMeta.lore(List.of(ColorParser.of("<green><bold>Alathran Accessory</bold></green>").build()));
crownMeta.setCustomModelData(210);
crown.setItemMeta(crownMeta);
NamespacedKey key = new NamespacedKey(AlathraExtras.getInstance(),
AlathraExtras.getInstance().getName() + "crown");
ShapedRecipe crownRecipe = new ShapedRecipe(key, crown);
crownRecipe.shape("@ @", "###", "$%^");
crownRecipe.setIngredient('@', Material.GOLD_INGOT);
crownRecipe.setIngredient('#', Material.GOLD_BLOCK);
crownRecipe.setIngredient('$', Material.LAPIS_LAZULI);
crownRecipe.setIngredient('%', Material.REDSTONE);
crownRecipe.setIngredient('^', Material.EMERALD);
AlathraExtras.getInstance().getServer().addRecipe(crownRecipe);
}

public static void wreathRecipe() {
ItemStack wreath = new ItemStack(Material.CARVED_PUMPKIN);
ItemMeta wreathMeta = wreath.getItemMeta();
wreathMeta.displayName(ColorParser.of("Wreath of Suns").build());
wreathMeta.lore(List.of(ColorParser.of("<green><bold>Alathran Accessory</bold></green>").build()));
wreathMeta.setCustomModelData(211);
wreath.setItemMeta(wreathMeta);
NamespacedKey key = new NamespacedKey(AlathraExtras.getInstance(),
AlathraExtras.getInstance().getName() + "wreath");
ShapedRecipe wreathRecipe = new ShapedRecipe(key, wreath);
wreathRecipe.shape("@#@", "# #", "@#@");
wreathRecipe.setIngredient('@', Material.VINE);
wreathRecipe.setIngredient('#', Material.SUNFLOWER);
AlathraExtras.getInstance().getServer().addRecipe(wreathRecipe);
}

public static void registerAllCraftingRecipes() {
saddleRecipe();
charcoalBlock();
Expand Down Expand Up @@ -537,5 +655,12 @@ public static void registerAllCraftingRecipes() {
greenHatRecipe();
watchRecipe();
caneRecipe();
scepterRecipe();
wizardStaffRecipe();
tophatRecipe();
hornedHelmetRecipe();
mustacheRecipe();
crownRecipe();
wreathRecipe();
}
}
Loading

0 comments on commit 47f8e5f

Please sign in to comment.