I'm just learning Fabric & Java so apologies if this is obvious. I'm following this tutorial (https://wiki.fabricmc.net/tutorial:entity) on creating a new mob similar to a Zombie (it extends the Zombie class). The part I'm stuck on is registering the entity.
public static final EntityType<StickZombieEntity> STICKZOMBIE = Registry.register(
Registries.ENTITY_TYPE,
Identifier.of("stick-mod", "stickzombie"),
EntityType.Builder.create(StickZombieEntity::new, SpawnGroup.MONSTER)
.dimensions(0.6f, 1.95f)
.build("stickzombie")
);```
The above code is pasted directly from the tutorial with minimal changes.
Unfortunately VScode flags this and says
`The method build(RegistryKey<EntityType<?>>) in the type EntityType.Builder<StickZombieEntity> is not applicable for the arguments (String)`
I don't understand what the issue is.
I've also tried using FabricEntityType.Builder instead, loosely following this outdated tutorial (https://wiki.fabricmc.net/tutorial:entity-old) since I could find nothing else to go off of:
```java
public static final EntityType<StickZombieEntity> STICKZOMBIE = Registry.register(
Registries.ENTITY_TYPE,
Identifier.of("stick-mod", "stickzombie"),
FabricEntityType.Builder.createMob(
(EntityType.EntityFactory<StickZombieEntity>) StickZombieEntity::new,
SpawnGroup.MONSTER,
builder -> builder.dimensions(EntityDimensions.fixed(0.6F, 1.95F))
)
);```
The flag this time is
`Type mismatch: cannot convert from EntityType.Builder<StickZombieEntity> to T`
Would appreciate some help. Thanks in advance.