Advertisement
MsGamerHD

Untitled

Oct 13th, 2016
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.75 KB | None | 0 0
  1.     public static void freezeEntity(Entity en){
  2.          net.minecraft.server.v1_8_R3.Entity nmsEn = ((CraftEntity)en).getHandle();
  3.          NBTTagCompound compound = new NBTTagCompound();
  4.          nmsEn.c(compound);
  5.          compound.setByte("NoAI", (byte) 1);
  6.          compound.setByte("Silent", (byte) 1);
  7.          compound.setByte("CustomNameVisible", (byte) 1);
  8.          compound.setByte("PlayerCreated", (byte) 1);
  9.          nmsEn.f(compound);
  10.      }
  11.    
  12.      public static void unfreezeEntity(Entity en){
  13.          net.minecraft.server.v1_8_R3.Entity nmsEn = ((CraftEntity) en).getHandle();
  14.          NBTTagCompound compound = new NBTTagCompound();
  15.          nmsEn.c(compound);
  16.          compound.setByte("NoAI", (byte) 0);
  17.          compound.setByte("Silent", (byte) 0);
  18.          nmsEn.f(compound);
  19.      }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement