Skip to content

Commit

Permalink
Theoretical fix for 1.11 entity type -> biome spawnable entities
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed Jan 10, 2017
1 parent 7a3eb84 commit 3a86272
Showing 1 changed file with 8 additions and 1 deletion.
Expand Up @@ -11,6 +11,7 @@

import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import java.util.Map;

public class BiomeNMS_v1_11_R1 extends BiomeNMS {
Expand Down Expand Up @@ -98,7 +99,13 @@ protected boolean getDoesSnow() {
private List<EntityType> getSpawnableEntities(EnumCreatureType creatureType) {
List<EntityType> entityTypes = new ArrayList<EntityType>();
for (BiomeBase.BiomeMeta meta : biomeBase.getMobs(creatureType)) {
entityTypes.add(EntityType.valueOf(EntityTypes.getName(meta.b).a())); // TODO: verifyme!
// TODO: verifyme!
String n = EntityTypes.getName(meta.b).a();
EntityType et = EntityType.fromName(n);
if (et == null) {
et = EntityType.valueOf(n.toUpperCase(Locale.ENGLISH));
}
entityTypes.add(et);
}
return entityTypes;
}
Expand Down

0 comments on commit 3a86272

Please sign in to comment.