Fix herobrine and formatting

This commit is contained in:
Edith Boles 2021-10-01 21:39:07 -07:00
parent 53446e7f07
commit 998967b8b8
4 changed files with 16 additions and 12 deletions

View File

@ -72,8 +72,8 @@ public class Commands implements CommandExecutor {
builder.append(": " + ChatColor.AQUA + entry.getValue().toString()); builder.append(": " + ChatColor.AQUA + entry.getValue().toString());
builder.append("\n"); builder.append("\n");
} }
builder.append(" \n" + ChatColor.GOLD + "" + ChatColor.BOLD + "Blood: " + ChatColor.RESET + "" + ChatColor.AQUA + String.valueOf(ritual.health / 2.0) + ChatColor.RED + "\n"); builder.append(" \n" + ChatColor.GOLD + "" + ChatColor.BOLD + "Blood: " + ChatColor.RESET + "" + ChatColor.AQUA + String.valueOf(ritual.health / 2.0) + ChatColor.RED + " \n");
builder.append(ChatColor.GOLD + "" + ChatColor.BOLD + "Backfire: " + ChatColor.RESET + "" + ChatColor.AQUA + String.valueOf(Math.round(ritual.backfire * 100)) + ChatColor.GREEN + "%\n"); builder.append(ChatColor.GOLD + "" + ChatColor.BOLD + "Backfire: " + ChatColor.RESET + "" + ChatColor.AQUA + String.valueOf(Math.round(ritual.backfire * 100)) + "%\n");
sender.sendMessage(builder.toString()); sender.sendMessage(builder.toString());
return true; return true;
} }

View File

@ -31,7 +31,6 @@ public class QuidProQuo extends JavaPlugin {
getServer().getPluginManager().registerEvents(new Events(), this); getServer().getPluginManager().registerEvents(new Events(), this);
// register all rituals // register all rituals
rituals.add(new HealRitual());
rituals.add(new WoolingRitual()); rituals.add(new WoolingRitual());
rituals.add(new FeedingRitual()); rituals.add(new FeedingRitual());
rituals.add(new SnowmanRitual()); rituals.add(new SnowmanRitual());
@ -45,6 +44,7 @@ public class QuidProQuo extends JavaPlugin {
rituals.add(new ChugJugRitual()); rituals.add(new ChugJugRitual());
rituals.add(new CreeperHissRitual()); rituals.add(new CreeperHissRitual());
rituals.add(new RotateRitual()); rituals.add(new RotateRitual());
rituals.add(new HealRitual());
// run ritual setup scripts // run ritual setup scripts
for (Ritual ritual : rituals) { for (Ritual ritual : rituals) {

View File

@ -17,7 +17,7 @@ public class ChugJugRitual extends Ritual {
addIngredient(Material.BLAZE_ROD, 1); addIngredient(Material.BLAZE_ROD, 1);
addIngredient(Material.GLASS_BOTTLE, 1); addIngredient(Material.GLASS_BOTTLE, 1);
addIngredient(Material.REDSTONE, 1); addIngredient(Material.REDSTONE, 1);
addIngredient(Material.GLOWSTONE, 1); addIngredient(Material.GLOWSTONE_DUST, 1);
addIngredient(Material.WHEAT, 64*8); addIngredient(Material.WHEAT, 64*8);
addSacrifice(EntityType.WITCH, 1); addSacrifice(EntityType.WITCH, 1);
health = 10; health = 10;

View File

@ -21,11 +21,15 @@ public class HerobrineRitual extends Ritual {
@Override @Override
public void setup() { public void setup() {
addIngredient(Material.WHEAT, 64); addIngredient(Material.WHEAT, 64*9);
addIngredient(Material.DIAMOND, 2); addIngredient(Material.DIAMOND, 9);
addIngredient(Material.ROTTEN_FLESH, 64);
addIngredient(Material.REDSTONE_BLOCK, 9);
addIngredient(Material.SUGAR, 32);
addSacrifice(EntityType.ZOMBIE, 3);
health = 10; health = 10;
name = "herobrine"; name = "herobrine";
backfire = 0.5; backfire = 0.1;
} }
@Override @Override
public void execute(Player caster, Player target, Location location) { public void execute(Player caster, Player target, Location location) {
@ -59,11 +63,11 @@ public class HerobrineRitual extends Ritual {
heroBine.addPotionEffect(fireResistance); heroBine.addPotionEffect(fireResistance);
heroBine.addPotionEffect(speed); heroBine.addPotionEffect(speed);
EntityEquipment equipment = heroBine.getEquipment(); EntityEquipment equipment = heroBine.getEquipment();
ItemStack headStack = new ItemStack(Material.SKULL); ItemStack skull = new ItemStack(Material.SKULL_ITEM, 1, (short) 3);
ItemMeta headMeta = headStack.getItemMeta(); SkullMeta meta = (SkullMeta) skull.getItemMeta();
SkullMeta skullMeta = (SkullMeta)headMeta; meta.setOwner("MHF_Herobrine");
skullMeta.setOwner("Herobrine"); skull.setItemMeta(meta);
equipment.setHelmet(headStack); equipment.setHelmet(skull);
equipment.setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE)); equipment.setChestplate(new ItemStack(Material.DIAMOND_CHESTPLATE));
equipment.setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS)); equipment.setLeggings(new ItemStack(Material.DIAMOND_LEGGINGS));
equipment.setBoots(new ItemStack(Material.DIAMOND_BOOTS)); equipment.setBoots(new ItemStack(Material.DIAMOND_BOOTS));