import net.minecraft.server.v1_11_R1.EntityLiving;
import org.bukkit.Location;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.event.entity.CreatureSpawnEvent;

/**
 * Many people have been struggling to spawn in entities with No AI (Frozen) with proper positions and rotations.
 * This is the simplest solution I have found to fix the rotation problem.
 */
public class FrozenEntity {
	
	private EntityLiving living;
	
	//Create a frozen entity with an NMS entity. Use this code template to create entities:
	//FrozenEntity frozen = new FrozenEntity(new EntityZombie(((CraftWorld)Bukkit.getWorld("world")).getHandle()));
	
	public FrozenEntity(EntityLiving living) {
		this.living = living;
	}
	
	//spawn in the frozen entity at the given location
	public Entity spawn(Location loc) {
		living.h(loc.getYaw());
		living.i(loc.getYaw());
		living.setPositionRotation(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());
		living.getWorld().addEntity(living, CreatureSpawnEvent.SpawnReason.CUSTOM);
		((LivingEntity)living.getBukkitEntity()).setAI(false);
		return living.getBukkitEntity();
	}
	
	public Entity getEntity() {
		return living.getBukkitEntity();
	}
	
}

@@ -457,17 +457,17 @@
 ng;%0A%09%0A%09/
-/
+*
 Create a
@@ -545,18 +545,16 @@
 ities:%0A%09
-//
 FrozenEn
@@ -655,16 +655,20 @@
 le()));%0A
+%09*/%0A
 %09%0A%09publi
@@ -823,16 +823,158 @@
  loc) %7B%0A
+%09%09/* whenever someone at Mojang signs up Codecadamy or a weekend workshop to learn %0A%09%09   programming basics we wont need these two lines%0A%09%09*/%0A
 %09%09living
@@ -1009,32 +1009,35 @@
 (loc.getYaw());%0A
+%09%09%0A
 %09%09living.setPosi

Update FrozenEntity.java