Advertisement
TNT_Block

flyadminevil :D

Mar 6th, 2019
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.38 KB | None | 0 0
  1. package de.tntmod.mods;
  2.  
  3. import net.minecraft.client.Minecraft;
  4. import net.minecraft.init.Blocks;
  5. import net.minecraft.item.ItemStack;
  6. import net.minecraft.nbt.*;
  7. import net.minecraft.network.play.client.C10PacketCreativeInventoryAction;
  8.  
  9. public class flyadminevil {
  10. public static ItemStack itm = new ItemStack(Blocks.mob_spawner,1,0);
  11. public static void execute(Integer radius) {
  12. NBTTagCompound base = new NBTTagCompound();
  13. NBTTagCompound BlockEntityTag = new NBTTagCompound();
  14. NBTTagCompound SpawnData = new NBTTagCompound();
  15. NBTTagList Equipment = new NBTTagList();
  16. NBTTagCompound Riding = new NBTTagCompound();
  17. NBTTagList ActiveEffects = new NBTTagList();
  18. NBTTagCompound effect = new NBTTagCompound();
  19.  
  20. //Hide Flags
  21.  
  22. base.setInteger("HideFlags", 63);
  23.  
  24. //Block
  25.  
  26. BlockEntityTag.setInteger("SpawnCount", radius * 5);
  27. BlockEntityTag.setInteger("SpawnRange", radius);
  28. BlockEntityTag.setInteger("RequiredPlayerRange", 5000);
  29. BlockEntityTag.setInteger("MaxNearbyEntities", 5000);
  30. BlockEntityTag.setInteger("Delay", 6);
  31. BlockEntityTag.setString("EntityId", "ArmorStand");
  32.  
  33.  
  34. //armorstand data
  35.  
  36. SpawnData.setInteger("Invulnerable", 1);
  37. SpawnData.setInteger("NoBasePlate", 1);
  38. SpawnData.setInteger("ShowArms", 1);
  39.  
  40.  
  41. //Equipment
  42.  
  43. NBTTagCompound righthandItem = new NBTTagCompound();
  44. NBTTagCompound boots = new NBTTagCompound();
  45. NBTTagCompound leggings = new NBTTagCompound();
  46. NBTTagCompound chestplate = new NBTTagCompound();
  47. NBTTagCompound colortag = new NBTTagCompound();
  48. NBTTagCompound displaycolortag = new NBTTagCompound();
  49. NBTTagCompound helmet = new NBTTagCompound();
  50. NBTTagCompound helmettag = new NBTTagCompound();
  51.  
  52. displaycolortag.setInteger("color", 0);
  53.  
  54. righthandItem.setString("id", "command_block");
  55. righthandItem.setInteger("Count", 1);
  56.  
  57. boots.setString("id", "leather_boots");
  58. boots.setInteger("Count", 1);
  59.  
  60. leggings.setString("id", "leather_leggings");
  61. leggings.setInteger("Count", 1);
  62.  
  63. chestplate.setString("id", "leather_chestplate");
  64. chestplate.setInteger("Count", 1);
  65.  
  66. helmet.setString("id", "skull");
  67. helmet.setInteger("Count", 1);
  68. helmet.setInteger("Damage", 3);
  69.  
  70. helmettag.setString("SkullOwner", "AdminEvil");
  71.  
  72.  
  73.  
  74.  
  75. //fly
  76.  
  77. Riding.setString("id", "Bat");
  78. Riding.setInteger("Silent", 1);
  79.  
  80. //effect for fly
  81.  
  82. effect.setInteger("Id", 14);
  83. effect.setInteger("Amplifier", 33);
  84. effect.setInteger("Duration", 100000000);
  85. effect.setInteger("ShowParticles", 0);
  86.  
  87.  
  88.  
  89. //ready
  90.  
  91. colortag.setTag("display", displaycolortag);
  92. boots.setTag("tag", colortag);
  93. leggings.setTag("tag", colortag);
  94. chestplate.setTag("tag", colortag);
  95. helmet.setTag("tag", helmettag);
  96. Equipment.appendTag(righthandItem);
  97. Equipment.appendTag(boots);
  98. Equipment.appendTag(leggings);
  99. Equipment.appendTag(chestplate);
  100. Equipment.appendTag(helmet);
  101. SpawnData.setTag("Equipment", Equipment);
  102. ActiveEffects.appendTag(effect);
  103. Riding.setTag("ActiveEffects", ActiveEffects);
  104. base.setTag("BlockEntityTag", BlockEntityTag);
  105.  
  106. SpawnData.setTag("Riding", Riding);
  107.  
  108. BlockEntityTag.setTag("SpawnData", SpawnData);
  109. base.setTag("BlockEntityTag", BlockEntityTag);
  110. itm.setTagCompound(base);
  111. Minecraft.getMinecraft().thePlayer.sendQueue.addToSendQueue(new C10PacketCreativeInventoryAction(36,itm));
  112. }
  113. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement