Posted December 30, 20222 yr public class MyProjEntity extends LargeFireball { public MyProjEntity(EntityType<? extends MyProjEntity> pEntityType, Level pLevel) { super(pEntityType, pLevel); } public MyProjEntity(Level pLevel, LivingEntity pShooter, double pOffsetX, double pOffsetY, double pOffsetZ, int pExplosionPower) { super(pLevel, pShooter, pOffsetX, pOffsetY, pOffsetZ, pExplosionPower); } } above is my custom entity class public static final RegistryObject<EntityType<MyProjEntity>> myProjectileEntity = entityTypes.register("my_projectile_entity", () -> EntityType.Builder.of(MyProjEntity::new); and this is how I registered it (haven't finished because of the error below) it confuses between the two constructors I have in the class and idk how to fix it
December 30, 20222 yr Try running it, it won't be confused. I'm pretty sure that's just intellij not understanding. Additionally, the second constructor is wrong. You need to specify your entity type, otherwise it will think it is a vanilla fireball instead.
December 30, 20222 yr Author 8 minutes ago, ChampionAsh5357 said: Try running it, it won't be confused. I'm pretty sure that's just intellij not understanding. Additionally, the second constructor is wrong. You need to specify your entity type, otherwise it will think it is a vanilla fireball instead. firstly, it won't let me run it because of the error. second, so how do I specify that it's my entity type in the second constructor?
December 30, 20222 yr 1 minute ago, Gamesterido said: firstly, it won't let me run it because of the error. That's interesting since the method reference should be able to interpret that correctly. You could try casting it to the correct type or by supplying a lambda instead of the method reference. 4 minutes ago, Gamesterido said: second, so how do I specify that it's my entity type in the second constructor? You either need to implement the internal logic yourself or extend a different base class like Fireball which takes those parameters in the constructor.
December 30, 20222 yr Author 1 hour ago, ChampionAsh5357 said: That's interesting since the method reference should be able to interpret that correctly. You could try casting it to the correct type or by supplying a lambda instead of the method reference. You either need to implement the internal logic yourself or extend a different base class like Fireball which takes those parameters in the constructor. yeah, that's what I thought after some time. ok, Imma do that. Thanks for the help!
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.