User Tools

Site Tools


tutorial:entity

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
tutorial:entity [2020/05/11 18:27]
conorthedev [Entity Drops (loot tables)]
tutorial:entity [2020/05/24 21:37] (current)
yanis48 size -> dimensions
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.1589221653.txt.gz ยท Last modified: 2020/05/11 18:27 by conorthedev