mirror of
https://github.com/garbagemule/MobArena.git
synced 2025-02-16 20:41:56 +01:00
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:
parent
c1716709f3
commit
286071871f
@ -12,6 +12,7 @@ These changes will (most likely) be included in the next version.
|
||||
|
||||
## [Unreleased]
|
||||
### 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 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.Material;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.entity.Bee;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Creeper;
|
||||
import org.bukkit.entity.EntityType;
|
||||
@ -101,6 +102,9 @@ public class MACreature {
|
||||
case "poweredcreeper":
|
||||
((Creeper) e).setPowered(true);
|
||||
break;
|
||||
case "angrybee":
|
||||
((Bee) e).setAnger(Integer.MAX_VALUE);
|
||||
break;
|
||||
case "angrywolf":
|
||||
((Wolf) e).setAngry(true);
|
||||
break;
|
||||
@ -232,6 +236,7 @@ public class MACreature {
|
||||
// spawn time. For example, "angry-wolf" is just a normal wolf with
|
||||
// its anger property is set to true.
|
||||
//
|
||||
put("angrybee", "angrybees", "BEE", null);
|
||||
put("angrywolf", "angrywolves", "WOLF");
|
||||
put("babyzombie", "babyzombies", "ZOMBIE");
|
||||
put("babyzombievillager", "babyzombievillagers", "ZOMBIE_VILLAGER");
|
||||
|
Loading…
Reference in New Issue
Block a user