Add more mobs
This commit is contained in:
parent
b0e52ca41f
commit
827d1ba070
1 changed files with 5 additions and 3 deletions
|
@ -49,18 +49,20 @@ public class LightningEvent extends Event {
|
||||||
timeCount = timeBetweenStrikes;
|
timeCount = timeBetweenStrikes;
|
||||||
Player player = MC13DTL.board.getPlayers(team).get(ran.nextInt(MC13DTL.board.getPlayers(team).size()));
|
Player player = MC13DTL.board.getPlayers(team).get(ran.nextInt(MC13DTL.board.getPlayers(team).size()));
|
||||||
Location location = player.getLocation();
|
Location location = player.getLocation();
|
||||||
Location lightningPos = new Location(world, ran.nextInt(-20, 20) + location.x(),
|
Location lightningPos = new Location(world, ran.nextInt(-15, 15) + location.x(),
|
||||||
location.y(),
|
location.y(),
|
||||||
ran.nextInt(-20, 20) + location.z());
|
ran.nextInt(-15, 15) + location.z());
|
||||||
lightningPos.setY(world.getHighestBlockYAt(lightningPos));
|
lightningPos.setY(world.getHighestBlockYAt(lightningPos));
|
||||||
world.strikeLightning(lightningPos);
|
world.strikeLightning(lightningPos);
|
||||||
EntityType mob = switch (ran.nextInt(6)) {
|
EntityType mob = switch (ran.nextInt(8)) {
|
||||||
case 0 -> EntityType.ZOMBIE;
|
case 0 -> EntityType.ZOMBIE;
|
||||||
case 1 -> EntityType.SKELETON;
|
case 1 -> EntityType.SKELETON;
|
||||||
case 2 -> EntityType.ENDERMAN;
|
case 2 -> EntityType.ENDERMAN;
|
||||||
case 3 -> EntityType.SPIDER;
|
case 3 -> EntityType.SPIDER;
|
||||||
case 4 -> EntityType.CAVE_SPIDER;
|
case 4 -> EntityType.CAVE_SPIDER;
|
||||||
case 5 -> EntityType.CREEPER;
|
case 5 -> EntityType.CREEPER;
|
||||||
|
case 6 -> EntityType.BLAZE;
|
||||||
|
case 7 -> EntityType.EVOKER;
|
||||||
default -> EntityType.ZOMBIE;
|
default -> EntityType.ZOMBIE;
|
||||||
};
|
};
|
||||||
world.spawnEntity(lightningPos, mob);
|
world.spawnEntity(lightningPos, mob);
|
||||||
|
|
Loading…
Reference in a new issue