Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package de.tntmod.mods;
- import net.minecraft.client.Minecraft;
- import net.minecraft.init.Blocks;
- import net.minecraft.item.ItemStack;
- import net.minecraft.nbt.*;
- import net.minecraft.network.play.client.C10PacketCreativeInventoryAction;
- public class flyadminevil {
- public static ItemStack itm = new ItemStack(Blocks.mob_spawner,1,0);
- public static void execute(Integer radius) {
- NBTTagCompound base = new NBTTagCompound();
- NBTTagCompound BlockEntityTag = new NBTTagCompound();
- NBTTagCompound SpawnData = new NBTTagCompound();
- NBTTagList Equipment = new NBTTagList();
- NBTTagCompound Riding = new NBTTagCompound();
- NBTTagList ActiveEffects = new NBTTagList();
- NBTTagCompound effect = new NBTTagCompound();
- //Hide Flags
- base.setInteger("HideFlags", 63);
- //Block
- BlockEntityTag.setInteger("SpawnCount", radius * 5);
- BlockEntityTag.setInteger("SpawnRange", radius);
- BlockEntityTag.setInteger("RequiredPlayerRange", 5000);
- BlockEntityTag.setInteger("MaxNearbyEntities", 5000);
- BlockEntityTag.setInteger("Delay", 6);
- BlockEntityTag.setString("EntityId", "ArmorStand");
- //armorstand data
- SpawnData.setInteger("Invulnerable", 1);
- SpawnData.setInteger("NoBasePlate", 1);
- SpawnData.setInteger("ShowArms", 1);
- //Equipment
- NBTTagCompound righthandItem = new NBTTagCompound();
- NBTTagCompound boots = new NBTTagCompound();
- NBTTagCompound leggings = new NBTTagCompound();
- NBTTagCompound chestplate = new NBTTagCompound();
- NBTTagCompound colortag = new NBTTagCompound();
- NBTTagCompound displaycolortag = new NBTTagCompound();
- NBTTagCompound helmet = new NBTTagCompound();
- NBTTagCompound helmettag = new NBTTagCompound();
- displaycolortag.setInteger("color", 0);
- righthandItem.setString("id", "command_block");
- righthandItem.setInteger("Count", 1);
- boots.setString("id", "leather_boots");
- boots.setInteger("Count", 1);
- leggings.setString("id", "leather_leggings");
- leggings.setInteger("Count", 1);
- chestplate.setString("id", "leather_chestplate");
- chestplate.setInteger("Count", 1);
- helmet.setString("id", "skull");
- helmet.setInteger("Count", 1);
- helmet.setInteger("Damage", 3);
- helmettag.setString("SkullOwner", "AdminEvil");
- //fly
- Riding.setString("id", "Bat");
- Riding.setInteger("Silent", 1);
- //effect for fly
- effect.setInteger("Id", 14);
- effect.setInteger("Amplifier", 33);
- effect.setInteger("Duration", 100000000);
- effect.setInteger("ShowParticles", 0);
- //ready
- colortag.setTag("display", displaycolortag);
- boots.setTag("tag", colortag);
- leggings.setTag("tag", colortag);
- chestplate.setTag("tag", colortag);
- helmet.setTag("tag", helmettag);
- Equipment.appendTag(righthandItem);
- Equipment.appendTag(boots);
- Equipment.appendTag(leggings);
- Equipment.appendTag(chestplate);
- Equipment.appendTag(helmet);
- SpawnData.setTag("Equipment", Equipment);
- ActiveEffects.appendTag(effect);
- Riding.setTag("ActiveEffects", ActiveEffects);
- base.setTag("BlockEntityTag", BlockEntityTag);
- SpawnData.setTag("Riding", Riding);
- BlockEntityTag.setTag("SpawnData", SpawnData);
- base.setTag("BlockEntityTag", BlockEntityTag);
- itm.setTagCompound(base);
- Minecraft.getMinecraft().thePlayer.sendQueue.addToSendQueue(new C10PacketCreativeInventoryAction(36,itm));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement