diff -r -U 3 minecraft_server\net\minecraft\world\World.java minecraft_server_patched\net\minecraft\world\World.java
--- minecraft_server\net\minecraft\world\World.java
+++ minecraft_server_patched\net\minecraft\world\World.java
@@ -1961,8 +1961,8 @@
       List<T> list = Lists.<T>newArrayList();
 
       for(Entity entity : this.field_72996_f) {
-         if (p_175644_1_.isAssignableFrom(entity.getClass()) && p_175644_2_.apply(entity)) {
-            list.add(entity);
+         if (p_175644_1_.isAssignableFrom(entity.getClass()) && p_175644_2_.apply((T)entity)) {
+            list.add((T)entity);
          }
       }
 
@@ -1973,8 +1973,8 @@
       List<T> list = Lists.<T>newArrayList();
 
       for(Entity entity : this.field_73010_i) {
-         if (p_175661_1_.isAssignableFrom(entity.getClass()) && p_175661_2_.apply(entity)) {
-            list.add(entity);
+         if (p_175661_1_.isAssignableFrom(entity.getClass()) && p_175661_2_.apply((T)entity)) {
+            list.add((T)entity);
          }
       }
 
