Class MobDefinition.Builder
java.lang.Object
fr.fidorial.entity.mob.MobDefinition.Builder
- Enclosing class:
MobDefinition
Assembles a
MobDefinition.- Since:
- 0.1.0
-
Method Summary
Modifier and TypeMethodDescriptionattackDamage(float attackDamage) behaviour(MobBehaviour.Factory behaviour) build()followRange(double followRange) maxHealth(float maxHealth) movementSpeed(double movementSpeed) persistent(boolean persistent) size(double width, double height) soundSource(Sound.Source soundSource)
-
Method Details
-
maxHealth
- Parameters:
maxHealth- the health ceiling in half-hearts- Returns:
- this builder
- Since:
- 0.1.0
-
movementSpeed
- Parameters:
movementSpeed- the walking speed in blocks per tick- Returns:
- this builder
- Since:
- 0.1.0
-
size
- Parameters:
width- the hitbox width in blocksheight- the hitbox height in blocks- Returns:
- this builder
- Since:
- 0.1.0
-
followRange
- Parameters:
followRange- the radius in blocks the mob picks targets within- Returns:
- this builder
- Since:
- 0.1.0
-
attackDamage
- Parameters:
attackDamage- the damage one hit deals- Returns:
- this builder
- Since:
- 0.1.0
-
soundSource
- Parameters:
soundSource- the sound category the mob's sounds are played in- Returns:
- this builder
- Since:
- 0.1.0
-
behaviour
- Parameters:
behaviour- builds the brain of each mob of this kind- Returns:
- this builder
- Since:
- 0.1.0
-
persistent
- Parameters:
persistent- whether the mob is written to the region files- Returns:
- this builder
- Since:
- 0.1.0
-
build
- Returns:
- the assembled definition
- Since:
- 0.1.0
-