Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void freezeEntity(Entity en){
- net.minecraft.server.v1_8_R3.Entity nmsEn = ((CraftEntity)en).getHandle();
- NBTTagCompound compound = new NBTTagCompound();
- nmsEn.c(compound);
- compound.setByte("NoAI", (byte) 1);
- compound.setByte("Silent", (byte) 1);
- compound.setByte("CustomNameVisible", (byte) 1);
- compound.setByte("PlayerCreated", (byte) 1);
- nmsEn.f(compound);
- }
- public static void unfreezeEntity(Entity en){
- net.minecraft.server.v1_8_R3.Entity nmsEn = ((CraftEntity) en).getHandle();
- NBTTagCompound compound = new NBTTagCompound();
- nmsEn.c(compound);
- compound.setByte("NoAI", (byte) 0);
- compound.setByte("Silent", (byte) 0);
- nmsEn.f(compound);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement