Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.TNT_Block_Unkown.modules;
- import java.awt.Color;
- import net.minecraft.init.Items;
- import net.minecraft.item.ItemStack;
- import net.minecraft.nbt.NBTTagCompound;
- import net.minecraft.nbt.NBTTagDouble;
- import net.minecraft.nbt.NBTTagInt;
- import net.minecraft.nbt.NBTTagList;
- public class Vulkan {
- public static ItemStack generateVulkanItem(Double posX,Double posY,Double posZ, Double mX, Double mY, Double mZ, Color c) {
- ItemStack itm = new ItemStack(Items.armor_stand,1,0);
- NBTTagCompound entityTag = new NBTTagCompound();
- entityTag.setInteger("Invulnerable", 1);
- entityTag.setInteger("NoBasePlate", 1);
- entityTag.setInteger("ShowArms", 1);
- NBTTagCompound colordp = new NBTTagCompound();
- colordp.setInteger("color", c.getRGB());
- NBTTagCompound colorTag = new NBTTagCompound();
- colorTag.setTag("display", colordp);
- NBTTagList equipment = new NBTTagList();
- NBTTagCompound feet = new NBTTagCompound();
- feet.setString("id", "leather_boots");
- feet.setInteger("Count", 1);
- feet.setTag("tag", colorTag);
- NBTTagCompound legg = new NBTTagCompound();
- legg.setString("id", "leather_leggings");
- legg.setInteger("Count", 1);
- legg.setTag("tag", colorTag);
- NBTTagCompound chest = new NBTTagCompound();
- chest.setString("id", "leather_chestplate");
- chest.setInteger("Count", 1);
- chest.setTag("tag", colorTag);
- NBTTagCompound head = new NBTTagCompound();
- head.setString("id", "leather_helmet");
- head.setInteger("Count", 1);
- head.setTag("tag", colorTag);
- equipment.appendTag(new NBTTagCompound());
- equipment.appendTag(feet);
- equipment.appendTag(legg);
- equipment.appendTag(chest);
- equipment.appendTag(head);
- entityTag.setTag("Equipment", equipment);
- //animation
- NBTTagList motion = new NBTTagList();
- motion.appendTag(new NBTTagDouble(mX));
- motion.appendTag(new NBTTagDouble(mY));
- motion.appendTag(new NBTTagDouble(mZ));
- NBTTagList pos = new NBTTagList();
- pos.appendTag(new NBTTagDouble(posX));
- pos.appendTag(new NBTTagDouble(posY));
- pos.appendTag(new NBTTagDouble(posZ));
- entityTag.setTag("Pos", pos);
- entityTag.setTag("Motion", motion);
- itm.setTagInfo("EntityTag", entityTag);
- return itm;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement