use of net.minecraft.world.entity.EntityDimensions in project MyPet by xXKeyleXx.
the class EntityRegistry method registerEntityType.
protected void registerEntityType(MyPetType petType, String key, DefaultedRegistry<EntityType<?>> entityRegistry) {
EntityDimensions size = entityRegistry.get(new ResourceLocation(key.toLowerCase())).getDimensions();
entityTypes.put(petType, Registry.register(entityRegistry, "mypet_" + key.toLowerCase(), EntityType.Builder.createNothing(MobCategory.CREATURE).noSave().noSummon().sized(size.width, size.height).build(key)));
EntityType<? extends LivingEntity> types = (EntityType<? extends LivingEntity>) entityRegistry.get(new ResourceLocation(key));
registerDefaultAttributes(entityTypes.get(petType), types);
overwriteEntityID(entityTypes.get(petType), getEntityTypeId(petType, entityRegistry), entityRegistry);
}
use of net.minecraft.world.entity.EntityDimensions in project MyPet by xXKeyleXx.
the class EntityRegistry method registerEntityType.
protected void registerEntityType(MyPetType petType, String key, DefaultedRegistry<EntityType<?>> entityRegistry) {
EntityDimensions size = entityRegistry.get(new ResourceLocation(key.toLowerCase())).getDimensions();
entityTypes.put(petType, Registry.register(entityRegistry, "mypet_" + key.toLowerCase(), EntityType.Builder.createNothing(MobCategory.CREATURE).noSave().noSummon().sized(size.width, size.height).build(key)));
EntityType<? extends LivingEntity> types = (EntityType<? extends LivingEntity>) entityRegistry.get(new ResourceLocation(key));
registerDefaultAttributes(entityTypes.get(petType), types);
overwriteEntityID(entityTypes.get(petType), getEntityTypeId(petType, entityRegistry), entityRegistry);
}
Aggregations