Java Code Examples for org.bukkit.entity.EntityType#getName()

The following examples show how to use org.bukkit.entity.EntityType#getName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CraftCreatureSpawner.java    From Kettle with GNU General Public License v3.0 5 votes vote down vote up
@Override
public void setSpawnedType(EntityType entityType) {
    if (entityType == null || entityType.getName() == null) {
        throw new IllegalArgumentException("Can't spawn EntityType " + entityType + " from mobspawners!");
    }

    this.getSnapshot().getSpawnerBaseLogic().setEntityId(new ResourceLocation(entityType.getName()));
}
 
Example 2
Source File: CraftCreatureSpawner.java    From Thermos with GNU General Public License v3.0 5 votes vote down vote up
public void setSpawnedType(EntityType entityType) {
    if (entityType == null || entityType.getName() == null) {
        throw new IllegalArgumentException("Can't spawn EntityType " + entityType + " from mobspawners!");
    }

    spawner.func_145881_a().setEntityName(entityType.getName());
}
 
Example 3
Source File: EntityTypeMap.java    From NBTEditor with GNU General Public License v3.0 4 votes vote down vote up
public static String getName(EntityType type) {
	return "minecraft:" + type.getName();
}
 
Example 4
Source File: EntityTypeMap.java    From NBTEditor with GNU General Public License v3.0 4 votes vote down vote up
public static String getSimpleName(EntityType type) {
	return type.getName();
}