Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static final ItemStack[][] equipment;
- static {
- // note - any extra items are ignored in the setArmorContents() method, which we use to compactly store the desired weapon
- equipment = new ItemStack[][6];
- equipment[0] = new ItemStack[5];
- equipment[1] = new ItemStack[] { new ItemStack(Material.LEATHER_BOOTS), new ItemStack(Material.LEATHER_LEGGINGS), new ItemStack(Material.LEATHER_CHESTPLATE), new ItemStack(Material.LEATHER_HELMET), new ItemStack(Material.WOOD_AXE) };
- equipment[2] = new ItemStack[] { new ItemStack(Material.CHAINMAIL_BOOTS), new ItemStack(Material.CHAINMAIL_LEGGINGS), new ItemStack(Material.CHAINMAIL_CHESTPLATE), new ItemStack(Material.CHAINMAIL_HELMET), new ItemStack(Material.WOOD_SWORD) };
- equipment[3] = new ItemStack[] { new ItemStack(Material.IRON_BOOTS), new ItemStack(Material.IRON_LEGGINGS), new ItemStack(Material.IRON_CHESTPLATE), new ItemStack(Material.IRON_HELMET), new ItemStack(Material.IRON_SWORD) };
- equipment[4] = new ItemStack[] { new ItemStack(Material.GOLD_BOOTS), new ItemStack(Material.GOLD_LEGGINGS), new ItemStack(Material.GOLD_CHESTPLATE), new ItemStack(Material.GOLD_HELMET), new ItemStack(Material.GOLD_SWORD) };
- equipment[5] = new ItemStack[] { new ItemStack(Material.DIAMOND_BOOTS), new ItemStack(Material.DIAMOND_LEGGINGS), new ItemStack(Material.DIAMOND_CHESTPLATE), new ItemStack(Material.DIAMOND_HELMET), new ItemStack(Material.DIAMOND_SWORD) };
- }
- ....
- if (wave >= 5) {
- ItemStack[] waveEquip = equipment[0];
- if (wave < 10) {
- waveEquip = equipment[1];
- } else if (wave < 15) {
- waveEquip = equipment[2];
- } else if (wave < 20) {
- waveEquip = equipment[3];
- } else if (wave < 25) {
- waveEquip = equipment[4];
- } else {
- waveEquip = equipment[5];
- }
- for (ControllableMob<LivingEntity> cm : monsters) {
- LivingEntity e = cm.getEntity();
- if (!e.getType().equals(EntityType.CREEPER)
- && !e.getType().equals(EntityType.WITCH)) {
- EntityEquipment equip = e.getEquipment();
- equip.setArmorContents(waveEquip);
- equip.setItemInHand(waveEquip[4]);
- equip.setBootsDropChance(0);
- equip.setChestplateDropChance(0);
- equip.setHelmetDropChance(0);
- equip.setLeggingsDropChance(0);
- equip.setItemInHandDropChance(0);
- if (Math.ulp(e.getMaxHealth()) <= 0.0625) { // soft-cap increases
- e.setMaxHealth(e.getMaxHealth() + amplifier);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement