#Problem with EntityType.Builder.create()

23 messages · Page 1 of 1 (latest)

upper canopy
#

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.

grizzled thunder
grizzled thunder
upper canopy
#

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

rugged minnow
#

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

upper canopy
#

I get that, but i am giving it floats. It calls for floats. I'm not sure why it's mad at them.

rugged minnow
#

you are not givin it floats

#

check the parameters of dimensions()

upper canopy
#

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

rugged minnow
#

a block?

#

(always check the code, that's your real documentation)

upper canopy
#

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

rugged minnow
#

is it there another one?

upper canopy
#

on their wiki it just has the one function as an example