User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tutorial:entity [2020/09/02 05:49]
boogiemonster1o1 Generics fix
tutorial:entity [2021/01/30 00:38] (current)
oroarmor [Spawning your Entity]
Line 63: Line 63:
             Registry.ENTITY_TYPE,​             Registry.ENTITY_TYPE,​
             new Identifier("​entitytesting",​ "​cube"​),​             new Identifier("​entitytesting",​ "​cube"​),​
-            FabricEntityTypeBuilder.<​CubeEntity>​create(SpawnGroup.CREATURE,​ CubeEntity::​new).dimensions(EntityDimensions.fixed(0.75f,​ 0.75f)).build()+            FabricEntityTypeBuilder.create(SpawnGroup.CREATURE,​ CubeEntity::​new).dimensions(EntityDimensions.fixed(0.75f,​ 0.75f)).build()
     );     );
Line 257: Line 257:
 {{https://​​MmQvluB.png}} {{https://​​MmQvluB.png}}
 +**NOTE:** If your entity does not extend ''​LivingEntity''​ you have to create your own spawn packet handler. Either do this through the networking API, or mixin to ''​ClientPlayNetworkHandler#​onEntitySpawn''​
 ===== Adding tasks & activities ===== ===== Adding tasks & activities =====
 To add activities see [[:​villager_activities|here]]. To add activities see [[:​villager_activities|here]].
tutorial/entity.1599025774.txt.gz · Last modified: 2020/09/02 05:49 by boogiemonster1o1