Add more mobs

This commit is contained in:
Mathieu Strypsteen 2024-09-23 08:24:36 +02:00
parent b0e52ca41f
commit 827d1ba070

View file

@ -49,18 +49,20 @@ public class LightningEvent extends Event {
timeCount = timeBetweenStrikes;
Player player = MC13DTL.board.getPlayers(team).get(ran.nextInt(MC13DTL.board.getPlayers(team).size()));
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(),
ran.nextInt(-20, 20) + location.z());
ran.nextInt(-15, 15) + location.z());
lightningPos.setY(world.getHighestBlockYAt(lightningPos));
world.strikeLightning(lightningPos);
EntityType mob = switch (ran.nextInt(6)) {
EntityType mob = switch (ran.nextInt(8)) {
case 0 -> EntityType.ZOMBIE;
case 1 -> EntityType.SKELETON;
case 2 -> EntityType.ENDERMAN;
case 3 -> EntityType.SPIDER;
case 4 -> EntityType.CAVE_SPIDER;
case 5 -> EntityType.CREEPER;
case 6 -> EntityType.BLAZE;
case 7 -> EntityType.EVOKER;
default -> EntityType.ZOMBIE;
};
world.spawnEntity(lightningPos, mob);