ssssshhocking

Untitled

May 22nd, 2020
886
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.32 KB | None | 0 0
  1.  
  2. Entity entity = (Entity) dependencies.get("entity");
  3. int x = (int) dependencies.get("x");
  4. int y = (int) dependencies.get("y");
  5. int z = (int) dependencies.get("z");
  6. World world = (World) dependencies.get("world");
  7. boolean LaunchStatus = false;
  8. double RandomX = 0;
  9. double RandomZ = 0;
  10. double Y = 0;
  11. double Level = 0;
  12. if (entity instanceof PlayerEntity && !world.isRemote) {
  13. ((PlayerEntity) entity).sendStatusMessage(new StringTextComponent("\u00A7oInfection Wave is coming..."), (false));
  14. }
  15. LaunchStatus = (boolean) (false);
  16. while (((LaunchStatus) == (false))) {
  17. if ((Math.random() < 0.01)) {
  18. if ((Math.random() < 0.01)) {
  19. LaunchStatus = (boolean) (true);
  20. }
  21. }
  22. }
  23. if (((LaunchStatus) == (true))) {
  24. if ((Math.random() < 0.5)) {
  25. Level = (double) 2;
  26. } else {
  27. Level = (double) 1;
  28. }
  29. for (int index1 = 0; index1 < (int) ((10 * (Level))); index1++) {
  30. if ((Math.random() < 0.5)) {
  31. RandomX = (double) (x + (Math.random() * 60));
  32. } else {
  33. RandomX = (double) (x - (Math.random() * 60));
  34. }
  35. if ((Math.random() < 0.5)) {
  36. RandomZ = (double) (z + (Math.random() * 60));
  37. } else {
  38. RandomZ = (double) (z - (Math.random() * 60));
  39. }
  40. Y = (double) (y + 5);
  41. if (!world.isRemote) {
  42. Entity entityToSpawn = new WeaponizedZombieEntity.CustomEntity(WeaponizedZombieEntity.entity, world);
  43. entityToSpawn.setLocationAndAngles((RandomX), (Y), (RandomZ), world.rand.nextFloat() * 360F, 0);
  44. world.addEntity(entityToSpawn);
  45. }
  46. }
  47. for (int index2 = 0; index2 < (int) ((7 * (Level))); index2++) {
  48. if ((Math.random() < 0.5)) {
  49. RandomX = (double) (x + (Math.random() * 40));
  50. } else {
  51. RandomX = (double) (x - (Math.random() * 40));
  52. }
  53. if ((Math.random() < 0.5)) {
  54. RandomZ = (double) (z + (Math.random() * 40));
  55. } else {
  56. RandomZ = (double) (z - (Math.random() * 40));
  57. }
  58. Y = (double) (y + 5);
  59. if (!world.isRemote) {
  60. Entity entityToSpawn = new PathogenicZombieEntity.CustomEntity(PathogenicZombieEntity.entity, world);
  61. entityToSpawn.setLocationAndAngles((RandomX), (Y), (RandomZ), world.rand.nextFloat() * 360F, 0);
  62. world.addEntity(entityToSpawn);
  63. }
  64. }
  65. for (int index3 = 0; index3 < (int) ((4 * (Level))); index3++) {
  66. if ((Math.random() < 0.5)) {
  67. RandomX = (double) (x + (Math.random() * 40));
  68. } else {
  69. RandomX = (double) (x - (Math.random() * 40));
  70. }
  71. if ((Math.random() < 0.5)) {
  72. RandomZ = (double) (z + (Math.random() * 40));
  73. } else {
  74. RandomZ = (double) (z - (Math.random() * 40));
  75. }
  76. Y = (double) (y + 5);
  77. if (!world.isRemote) {
  78. Entity entityToSpawn = new Radiation_ZombieEntity.CustomEntity(Radiation_ZombieEntity.entity, world);
  79. entityToSpawn.setLocationAndAngles((RandomX), (Y), (RandomZ), world.rand.nextFloat() * 360F, 0);
  80. world.addEntity(entityToSpawn);
  81. }
  82. }
  83. world.playSound((PlayerEntity) null, x, y, z,
  84. (net.minecraft.util.SoundEvent) ForgeRegistries.SOUND_EVENTS.getValue(new ResourceLocation("survive:warning_horn")),
  85. SoundCategory.NEUTRAL, (float) 1, (float) 1);
  86. if (entity instanceof PlayerEntity && !world.isRemote) {
  87. ((PlayerEntity) entity).sendStatusMessage(new StringTextComponent("Survive!"), (false));
  88. }
  89. }
  90. }
Advertisement
Add Comment
Please, Sign In to add comment