本文整理汇总了Java中cpw.mods.fml.common.registry.EntityRegistry.getCustomEntityTypeName方法的典型用法代码示例。如果您正苦于以下问题:Java EntityRegistry.getCustomEntityTypeName方法的具体用法?Java EntityRegistry.getCustomEntityTypeName怎么用?Java EntityRegistry.getCustomEntityTypeName使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cpw.mods.fml.common.registry.EntityRegistry
的用法示例。
在下文中一共展示了EntityRegistry.getCustomEntityTypeName方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: CraftLivingEntity
import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
public CraftLivingEntity(final CraftServer server, final net.minecraft.entity.EntityLivingBase entity) {
super(server, entity);
// Cauldron start
this.entityClass = entity.getClass();
this.entityName = EntityRegistry.getCustomEntityTypeName(entityClass);
if (entityName == null)
entityName = entity.getCommandSenderName();
// Cauldron end
if (entity instanceof net.minecraft.entity.EntityLiving) {
equipment = new CraftEntityEquipment(this);
}
}
示例2: CraftCustomEntity
import cpw.mods.fml.common.registry.EntityRegistry; //导入方法依赖的package包/类
public CraftCustomEntity(CraftServer server, net.minecraft.entity.Entity entity) {
super(server, entity);
this.entityClass = entity.getClass();
this.entityName = EntityRegistry.getCustomEntityTypeName(entityClass);
if (entityName == null)
entityName = entity.getCommandSenderName();
}