Advertisement
Guest User

FlyAdminEvil like Garkolym

a guest
May 24th, 2019
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.23 KB | None | 0 0
  1. package de.tnt_block_unkown.tntmod.commands.list;
  2.  
  3. import de.tnt_block_unkown.tntmod.commands.Command;
  4. import de.tnt_block_unkown.tntmod.main.TNTMod;
  5. import net.minecraft.init.Blocks;
  6. import net.minecraft.item.ItemStack;
  7. import net.minecraft.nbt.NBTTagCompound;
  8. import net.minecraft.nbt.NBTTagList;
  9.  
  10. public class FlyAdminEvil extends Command {
  11. public FlyAdminEvil() {
  12. super("flyadminevil", "<radius>", "spawnt fliegende AdminEvils.");
  13. }
  14.  
  15. @Override
  16. public void onCommand(String[] args) {
  17. try {
  18. Integer range = Integer.parseInt(args[0]);
  19. Integer count = Integer.parseInt(args[0]);
  20. // {BlockEntityTag:{SpawnCount:count,SpawnRange:range,RequiredPlayerRange:5000,MaxNearbyEntities:5000,Delay:1,MinSpawnDelay:1,MaxSpawnDelay:1,
  21. // EntityId:ArmorStand,
  22. // SpawnData:{Invulnerable:1b,NoBasePlate:1b,ShowArms:1b,Equipment:[{id:"command_block",Count:1b},
  23. // {id:"leather_boots",Count:1b,tag:{display:{color:0}}},{id:"leather_leggings",Count:1b,tag:{display:{color:0}}},{id:"leather_chestplate",Count:1b,
  24. // tag:{display:{color:0}}},{id:"skull",Count:1b,Damage:3b,tag:{SkullOwner:"AdminEvil"}}],Riding:{id:"Bat",Silent:1,ActiveEffects:[{Id:14,
  25. // Amplifier:0,Duration:2147483647,ShowParticles:0b}]},
  26. // CustomName:"�4[Owner]
  27. // �eAdminEvil",CustomNameVisible:1b}}}
  28.  
  29. ItemStack itm = new ItemStack(Blocks.mob_spawner, 1, 0);
  30.  
  31. NBTTagCompound blockEntityTag = new NBTTagCompound();
  32. blockEntityTag.setInteger("SpawnCount", count);
  33. blockEntityTag.setInteger("SpawnRange", range);
  34. blockEntityTag.setInteger("RequiredPlayerRange", 5000);
  35. blockEntityTag.setInteger("MaxNearbyEntities", 5000);
  36. blockEntityTag.setInteger("Delay", 5);
  37. blockEntityTag.setInteger("MinSpawnDelay", 5);
  38. blockEntityTag.setInteger("MaxSpawnDelay", 1);
  39. blockEntityTag.setString("EntityId", "ArmorStand");
  40.  
  41. NBTTagCompound spawnData = new NBTTagCompound();
  42. spawnData.setInteger("Invulnerable", 1);
  43. spawnData.setInteger("NoBasePlate", 1);
  44. spawnData.setInteger("ShowArms", 1);
  45. spawnData.setString("CustomName", "�4[Owner] �eAdminEvil");
  46. spawnData.setInteger("CustomNameVisible", 1);
  47.  
  48. NBTTagList equipment = new NBTTagList();
  49.  
  50. NBTTagCompound handItem = new NBTTagCompound();
  51. handItem.setString("id", "command_block");
  52. handItem.setInteger("Count", 1);
  53.  
  54. NBTTagCompound colorNumber = new NBTTagCompound();
  55. colorNumber.setInteger("color", 0);
  56.  
  57. NBTTagCompound colorTag = new NBTTagCompound();
  58. colorTag.setTag("display", colorNumber);
  59.  
  60. NBTTagCompound feet = new NBTTagCompound();
  61. feet.setString("id", "leather_boots");
  62. feet.setInteger("Count", 1);
  63. feet.setTag("tag", colorTag);
  64.  
  65. NBTTagCompound legg = new NBTTagCompound();
  66. legg.setString("id", "leather_leggings");
  67. legg.setInteger("Count", 1);
  68. legg.setTag("tag", colorTag);
  69.  
  70. NBTTagCompound body = new NBTTagCompound();
  71. body.setString("id", "leather_chestplate");
  72. body.setInteger("Count", 1);
  73. body.setTag("tag", colorTag);
  74.  
  75. NBTTagCompound skullOwner = new NBTTagCompound();
  76. skullOwner.setString("SkullOwner", "AdminEvil");
  77.  
  78. NBTTagCompound head = new NBTTagCompound();
  79. head.setString("id", "skull");
  80. head.setInteger("Count", 1);
  81. head.setInteger("Damage", 3);
  82. head.setTag("tag", skullOwner);
  83.  
  84. equipment.appendTag(handItem);
  85. equipment.appendTag(feet);
  86. equipment.appendTag(legg);
  87. equipment.appendTag(body);
  88. equipment.appendTag(head);
  89.  
  90. NBTTagCompound riding = new NBTTagCompound();
  91. riding.setString("id", "Bat");
  92. riding.setInteger("Silent", 1);
  93.  
  94. NBTTagList activeEffects = new NBTTagList();
  95. NBTTagCompound invisible = new NBTTagCompound();
  96. invisible.setInteger("Id", 14);
  97. invisible.setInteger("Amplifier", 0);
  98. invisible.setInteger("Duration", 2147483647);
  99. invisible.setByte("ShowParticles", (byte) 0);
  100. activeEffects.appendTag(invisible);
  101. riding.setTag("ActiveEffects", activeEffects);
  102. spawnData.setTag("Equipment", equipment);
  103. spawnData.setTag("Riding", riding);
  104. blockEntityTag.setTag("SpawnData", spawnData);
  105. itm.setTagInfo("BlockEntityTag", blockEntityTag);
  106. TNTMod.giveItem(TNTMod.addSpawnerToFurnance(itm));
  107. } catch (Exception e) {
  108. TNTMod.addMessage("#flyadminevil <radius>");
  109. }
  110. }
  111.  
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement