Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Entity entity = (Entity) dependencies.get("entity");
- int x = (int) dependencies.get("x");
- int y = (int) dependencies.get("y");
- int z = (int) dependencies.get("z");
- World world = (World) dependencies.get("world");
- boolean LaunchStatus = false;
- double RandomX = 0;
- double RandomZ = 0;
- double Y = 0;
- double Level = 0;
- if (entity instanceof PlayerEntity && !world.isRemote) {
- ((PlayerEntity) entity).sendStatusMessage(new StringTextComponent("\u00A7oInfection Wave is coming..."), (false));
- }
- LaunchStatus = (boolean) (false);
- while (((LaunchStatus) == (false))) {
- if ((Math.random() < 0.01)) {
- if ((Math.random() < 0.01)) {
- LaunchStatus = (boolean) (true);
- }
- }
- }
- if (((LaunchStatus) == (true))) {
- if ((Math.random() < 0.5)) {
- Level = (double) 2;
- } else {
- Level = (double) 1;
- }
- for (int index1 = 0; index1 < (int) ((10 * (Level))); index1++) {
- if ((Math.random() < 0.5)) {
- RandomX = (double) (x + (Math.random() * 60));
- } else {
- RandomX = (double) (x - (Math.random() * 60));
- }
- if ((Math.random() < 0.5)) {
- RandomZ = (double) (z + (Math.random() * 60));
- } else {
- RandomZ = (double) (z - (Math.random() * 60));
- }
- Y = (double) (y + 5);
- if (!world.isRemote) {
- Entity entityToSpawn = new WeaponizedZombieEntity.CustomEntity(WeaponizedZombieEntity.entity, world);
- entityToSpawn.setLocationAndAngles((RandomX), (Y), (RandomZ), world.rand.nextFloat() * 360F, 0);
- world.addEntity(entityToSpawn);
- }
- }
- for (int index2 = 0; index2 < (int) ((7 * (Level))); index2++) {
- if ((Math.random() < 0.5)) {
- RandomX = (double) (x + (Math.random() * 40));
- } else {
- RandomX = (double) (x - (Math.random() * 40));
- }
- if ((Math.random() < 0.5)) {
- RandomZ = (double) (z + (Math.random() * 40));
- } else {
- RandomZ = (double) (z - (Math.random() * 40));
- }
- Y = (double) (y + 5);
- if (!world.isRemote) {
- Entity entityToSpawn = new PathogenicZombieEntity.CustomEntity(PathogenicZombieEntity.entity, world);
- entityToSpawn.setLocationAndAngles((RandomX), (Y), (RandomZ), world.rand.nextFloat() * 360F, 0);
- world.addEntity(entityToSpawn);
- }
- }
- for (int index3 = 0; index3 < (int) ((4 * (Level))); index3++) {
- if ((Math.random() < 0.5)) {
- RandomX = (double) (x + (Math.random() * 40));
- } else {
- RandomX = (double) (x - (Math.random() * 40));
- }
- if ((Math.random() < 0.5)) {
- RandomZ = (double) (z + (Math.random() * 40));
- } else {
- RandomZ = (double) (z - (Math.random() * 40));
- }
- Y = (double) (y + 5);
- if (!world.isRemote) {
- Entity entityToSpawn = new Radiation_ZombieEntity.CustomEntity(Radiation_ZombieEntity.entity, world);
- entityToSpawn.setLocationAndAngles((RandomX), (Y), (RandomZ), world.rand.nextFloat() * 360F, 0);
- world.addEntity(entityToSpawn);
- }
- }
- world.playSound((PlayerEntity) null, x, y, z,
- (net.minecraft.util.SoundEvent) ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("survive:warning_horn")),
- SoundCategory.NEUTRAL, (float) 1, (float) 1);
- if (entity instanceof PlayerEntity && !world.isRemote) {
- ((PlayerEntity) entity).sendStatusMessage(new StringTextComponent("Survive!"), (false));
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment