Hi all, I have an error that pops when I'm trying to use the line "EntityType.Builder.creat(SpawnGroup.CREATURE, <my entity>::new). It says that the entity is not a functional interface. I'm not sure why this error is happening because the entity is definitely just a class. I originally tried using FabricEntityType.Builder and switched to just EntityType.Builder and it did not change anything. I'm trying to make a mod for 1.20.x, using IntelliJ IDE.
#Problem with EntityType.Builder.create()
23 messages · Page 1 of 1 (latest)
Try swapping the spawn group and the method reference
This has changed several times throughout the 1.20.x lifetime, so it may be helpful to provide a specific version
oh sorry, I'm trying to do 1.20.6
oh wow switching them worked
thank you so much
well, new problem. When trying to set entity dimensions it gets mad.
I gave it floats
the real problem here is that you are not checking the parameters that the method you are calling actually wants
(for both your questions)
the error also tells you what the problem is
please read it carefully
if you don't get into this habit, you will have a bounch of other, similar, problems
I get that, but i am giving it floats. It calls for floats. I'm not sure why it's mad at them.
so when I fix that (it builds now, thank you), it's now just ".dimensions". I can't find on fabric's documentation if that works correctly on an entity vs just a block or something
well this is supposed to be hitbox dimensions for an entity. I think it's the right function to call but I am not sure
is it there another one?
on their wiki it just has the one function as an example