Add support for angry bees.
This commit introduces a new type variant, `angry-bee`, which is a bee whose anger level is maximized upon spawning, much in the same vein as its angry wolf cousin. Note that bees are not available prior to Minecraft 1.15, so a sentinel `null` name is used in the registration to prevent warnings from being logged on server versions that don't have a concept of bees. Closes #584
This commit is contained in:
@@ -12,6 +12,7 @@ These changes will (most likely) be included in the next version.
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
### Added
|
### Added
|
||||||
|
- New monster variant `angry-bees` can be used to spawn angry bees.
|
||||||
- (API) MobArena's internal command handler now supports registering pre-instantiated subcommand instances. This should make it easier for extensions to avoid the Singleton anti-pattern for command dependencies.
|
- (API) MobArena's internal command handler now supports registering pre-instantiated subcommand instances. This should make it easier for extensions to avoid the Singleton anti-pattern for command dependencies.
|
||||||
- (API) MobArena now fires MobArenaPreReloadEvent and MobArenaReloadEvent before and after, respectively, reloading its config-file. This should allow extensions and other plugins to better respond to configuration changes.
|
- (API) MobArena now fires MobArenaPreReloadEvent and MobArenaReloadEvent before and after, respectively, reloading its config-file. This should allow extensions and other plugins to better respond to configuration changes.
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import org.bukkit.DyeColor;
|
|||||||
import org.bukkit.Location;
|
import org.bukkit.Location;
|
||||||
import org.bukkit.Material;
|
import org.bukkit.Material;
|
||||||
import org.bukkit.World;
|
import org.bukkit.World;
|
||||||
|
import org.bukkit.entity.Bee;
|
||||||
import org.bukkit.entity.Creature;
|
import org.bukkit.entity.Creature;
|
||||||
import org.bukkit.entity.Creeper;
|
import org.bukkit.entity.Creeper;
|
||||||
import org.bukkit.entity.EntityType;
|
import org.bukkit.entity.EntityType;
|
||||||
@@ -101,6 +102,9 @@ public class MACreature {
|
|||||||
case "poweredcreeper":
|
case "poweredcreeper":
|
||||||
((Creeper) e).setPowered(true);
|
((Creeper) e).setPowered(true);
|
||||||
break;
|
break;
|
||||||
|
case "angrybee":
|
||||||
|
((Bee) e).setAnger(Integer.MAX_VALUE);
|
||||||
|
break;
|
||||||
case "angrywolf":
|
case "angrywolf":
|
||||||
((Wolf) e).setAngry(true);
|
((Wolf) e).setAngry(true);
|
||||||
break;
|
break;
|
||||||
@@ -232,6 +236,7 @@ public class MACreature {
|
|||||||
// spawn time. For example, "angry-wolf" is just a normal wolf with
|
// spawn time. For example, "angry-wolf" is just a normal wolf with
|
||||||
// its anger property is set to true.
|
// its anger property is set to true.
|
||||||
//
|
//
|
||||||
|
put("angrybee", "angrybees", "BEE", null);
|
||||||
put("angrywolf", "angrywolves", "WOLF");
|
put("angrywolf", "angrywolves", "WOLF");
|
||||||
put("babyzombie", "babyzombies", "ZOMBIE");
|
put("babyzombie", "babyzombies", "ZOMBIE");
|
||||||
put("babyzombievillager", "babyzombievillagers", "ZOMBIE_VILLAGER");
|
put("babyzombievillager", "babyzombievillagers", "ZOMBIE_VILLAGER");
|
||||||
|
|||||||
Reference in New Issue
Block a user