Vinetos

[NBTTag] Spawn Entity Without IA

Oct 12th, 2015
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. public void spawnEntity(World w, Location loc){
  2. Skeleton as = (Skeleton) w.spawnEntity(loc, EntityType.SKELETON);
  3. as.setCustomName("§dSquellette");
  4. as.setSkeletonType(Skeleton.SkeletonType.WITHER);
  5. Entity nmsEntity = ((CraftEntity) as).getHandle();
  6. NBTTagCompound tag = nmsEntity.getNBTTag();
  7.  
  8. if (tag == null)
  9. tag = new NBTTagCompound();
  10. }
  11.  
  12. nmsEntity.c(tag);
  13. tag.setInt("IADisable", 1);
  14. nmsEntity.f(tag)
  15. }
Advertisement
Add Comment
Please, Sign In to add comment