Advertisement
TNT_Block

Vulkan

Apr 15th, 2019
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.23 KB | None | 0 0
  1. package de.TNT_Block_Unkown.modules;
  2.  
  3. import java.awt.Color;
  4.  
  5. import net.minecraft.init.Items;
  6. import net.minecraft.item.ItemStack;
  7. import net.minecraft.nbt.NBTTagCompound;
  8. import net.minecraft.nbt.NBTTagDouble;
  9. import net.minecraft.nbt.NBTTagInt;
  10. import net.minecraft.nbt.NBTTagList;
  11.  
  12. public class Vulkan {
  13. public static ItemStack generateVulkanItem(Double posX,Double posY,Double posZ, Double mX, Double mY, Double mZ, Color c) {
  14. ItemStack itm = new ItemStack(Items.armor_stand,1,0);
  15. NBTTagCompound entityTag = new NBTTagCompound();
  16. entityTag.setInteger("Invulnerable", 1);
  17. entityTag.setInteger("NoBasePlate", 1);
  18. entityTag.setInteger("ShowArms", 1);
  19.  
  20. NBTTagCompound colordp = new NBTTagCompound();
  21. colordp.setInteger("color", c.getRGB());
  22.  
  23. NBTTagCompound colorTag = new NBTTagCompound();
  24. colorTag.setTag("display", colordp);
  25.  
  26. NBTTagList equipment = new NBTTagList();
  27.  
  28. NBTTagCompound feet = new NBTTagCompound();
  29. feet.setString("id", "leather_boots");
  30. feet.setInteger("Count", 1);
  31. feet.setTag("tag", colorTag);
  32.  
  33. NBTTagCompound legg = new NBTTagCompound();
  34. legg.setString("id", "leather_leggings");
  35. legg.setInteger("Count", 1);
  36. legg.setTag("tag", colorTag);
  37.  
  38. NBTTagCompound chest = new NBTTagCompound();
  39. chest.setString("id", "leather_chestplate");
  40. chest.setInteger("Count", 1);
  41. chest.setTag("tag", colorTag);
  42.  
  43. NBTTagCompound head = new NBTTagCompound();
  44. head.setString("id", "leather_helmet");
  45. head.setInteger("Count", 1);
  46. head.setTag("tag", colorTag);
  47.  
  48. equipment.appendTag(new NBTTagCompound());
  49. equipment.appendTag(feet);
  50. equipment.appendTag(legg);
  51. equipment.appendTag(chest);
  52. equipment.appendTag(head);
  53. entityTag.setTag("Equipment", equipment);
  54.  
  55. //animation
  56.  
  57. NBTTagList motion = new NBTTagList();
  58. motion.appendTag(new NBTTagDouble(mX));
  59. motion.appendTag(new NBTTagDouble(mY));
  60. motion.appendTag(new NBTTagDouble(mZ));
  61.  
  62. NBTTagList pos = new NBTTagList();
  63. pos.appendTag(new NBTTagDouble(posX));
  64. pos.appendTag(new NBTTagDouble(posY));
  65. pos.appendTag(new NBTTagDouble(posZ));
  66.  
  67. entityTag.setTag("Pos", pos);
  68. entityTag.setTag("Motion", motion);
  69. itm.setTagInfo("EntityTag", entityTag);
  70. return itm;
  71. }
  72. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement