User Tools

Site Tools


tutorial:entity-old

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Last revisionBoth sides next revision
tutorial:entity [2020/05/11 18:27] – [Entity Drops (loot tables)] conorthedevtutorial:entity [2020/05/24 21:37] – size -> dimensions yanis48
Line 31: Line 31:
         Registry.ENTITY_TYPE,         Registry.ENTITY_TYPE,
         new Identifier("wiki_entity", "cookie_creeper"),         new Identifier("wiki_entity", "cookie_creeper"),
-        FabricEntityTypeBuilder.create(EntityCategory.AMBIENT, CookieCreeperEntity::new).size(EntityDimensions.fixed(1, 2)).build()+        FabricEntityTypeBuilder.create(EntityCategory.AMBIENT, CookieCreeperEntity::new).dimensions(EntityDimensions.fixed(1, 2)).build()
     );     );
 </code> </code>
Line 39: Line 39:
 </code> </code>
  
-The size() method allows you to set the hitbox of your entity. A creeper is 1 block wide and 2 blocks tall, so we'll use (1, 2). +The dimensions() method allows you to set the hitbox of your entity. A creeper is 1 block wide and 2 blocks tall, so we'll use (1, 2). 
  
 If you load up your game at this point, you will be able to use /summon to see your creation. If all went right, it should appear as a normal creeper. I would not recommend going into survival.  If you load up your game at this point, you will be able to use /summon to see your creation. If all went right, it should appear as a normal creeper. I would not recommend going into survival. 
tutorial/entity-old.txt · Last modified: 2020/06/11 20:06 by draylar