Changes

53 bytes added ,  06:02, 6 October 2022
Fix Attributes Section
Line 80: Line 80:     
In your Entity class, create a static method that creates your attributes:
 
In your Entity class, create a static method that creates your attributes:
<code>
+
<syntaxhighlight lang="java">
// In your Entity class...
+
public static AttributeSupplier.Builder createAttributes()
 
  −
public static AttributeSupplier.Builder setAttributes()
   
{
 
{
       return createHostileAttributes().add(Attributes.MAX_HEALTH);
+
       return createHostileAttributes().add(Attributes.MAX_HEALTH, 40.0F).add(Attributes.ATTACK_DAMAGE, 10.0F);
 
}
 
}
</code>
+
</syntaxhighlight>
    
== Natural Spawning ==
 
== Natural Spawning ==
 
To make entities naturally spawn, they must be added to the spawn list for each biome that the entity should spawn in. This can be achieved with a [[Biome Modifiers#Add Spawns|<code>forge:add_spawns</code> biome modifier]].
 
To make entities naturally spawn, they must be added to the spawn list for each biome that the entity should spawn in. This can be achieved with a [[Biome Modifiers#Add Spawns|<code>forge:add_spawns</code> biome modifier]].
11

edits