defaultAttributes

FabricEntityTypeBuilder.Mob<TdefaultAttributes(Supplier<DefaultAttributeContainer.Builder> defaultAttributeBuilder)

Sets the default attributes for a type of living entity.

This can be used in a fashion similar to this:

		FabricEntityTypeBuilder.createLiving()
			.spawnGroup(SpawnGroup.CREATURE)
			.entityFactory(MyCreature::new)
			.defaultAttributes(LivingEntity::createLivingAttributes)
			...
			.build();
		

Return

this builder for chaining

Parameters

defaultAttributeBuilder

a function to generate the default attribute builder from the entity type

Sources

jvm source
Link copied to clipboard