Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Can't resolve symbol SpawnListEntry


Skullblade
 Share

Recommended Posts

your tutorial is for version 1.14 / 1.15, but minecraft change the biome/world gen (also include entity spawning) in 1.16.2, if you try your code in 1.16.1 it will work
also you don't need to create a new Event, subscribe to it!

okay there you don't understand what to do:

use the code snippet from the static EventHandle and replace the event with BiomeLoadingEvent,
and then check out the methods in the event (e.g. BiomeLoadingEvent#getSpawns), than do your logic there

Edited by Luis_ST
Link to comment
Share on other sites

9 minutes ago, Luis_ST said:

your tutorial is for version 1.14 / 1.15, but minecraft change the biome/world gen (also include entity spawning) in 1.16.2, if you try your code in 1.16.1 it will work
also you don't need to create a new Event, subscribe to it!

okay there you don't understand what to do:

use the code snippet from the static EventHandle and replace the event with BiomeLoadingEvent,
and then check out the methods in the event (e.g. BiomeLoadingEvent#getSpawns), than do your logic there

I know this isn't all of what you were asking, but I wanted to know if I was on the right track. I'm not sure where to go from here. Not sure where to check for methods, or what logic to code in.

image.thumb.png.d1adac443f4113e7f4d10bc1b7249ac5.png

Link to comment
Share on other sites

Just now, Skullblade said:

Sweet. Now what?

Congratulations you have now successfully subscribed to an event

now use BiomeLoadingEvent#getSpawns to get the MobSpawnInfo.Builder for the biome,
then use MobSpawnInfo.Builder#addSpawn to add a new ModSpawn
MobSpawnInfo.Spawners need 4 parameter:

  1. the entity you want to spawn
  2. the weight of the spwn
  3. the min spawn count
  4. the max spawn count

you can take a look in DefaultBiomeFeatures#farmAnimals this is an simple example what you have to do

 

Link to comment
Share on other sites

7 minutes ago, Luis_ST said:

Congratulations you have now successfully subscribed to an event

now use BiomeLoadingEvent#getSpawns to get the MobSpawnInfo.Builder for the biome,
then use MobSpawnInfo.Builder#addSpawn to add a new ModSpawn
MobSpawnInfo.Spawners need 4 parameter:

  1. the entity you want to spawn
  2. the weight of the spwn
  3. the min spawn count
  4. the max spawn count

you can take a look in DefaultBiomeFeatures#farmAnimals this is an simple example what you have to do

 

Ok, so I have this now.

image.thumb.png.d30f53c645189b23bc0096a8c26866a9.png

Is there a specific code I need to enter in genericName's place (I chose a temporary name because I didn't know what to use) or can I name it something easier to remember?

  • Confused 1
Link to comment
Share on other sites

please learn basic java before modding minecraft
i already told you what you have to do.

the code part genericName.addSpawn... is correct,
but you put a method in a method that is completely wrong
in addition you never use the event

Link to comment
Share on other sites

9 hours ago, Luis_ST said:

please learn basic java before modding minecraft
i already told you what you have to do.

the code part genericName.addSpawn... is correct,
but you put a method in a method that is completely wrong
in addition you never use the event

Which method is wrong and how would I use the event? I can't do much about it if you're not specific. In addition, I believe I had asked what the p_ builder number thing was for this specific instance. When looking at the farm animal code and the monster code, there were two different p_ things. (I don't know what they're called, I just dislike their existence)

Link to comment
Share on other sites

25 minutes ago, Skullblade said:

Which method is wrong and how would I use the event?

the "bloodghastSpawns" method is wrong remove them but copy the code inside the methode.
then replace "genericName" with event.getSpawns() an it should work...

28 minutes ago, Skullblade said:

In addition, I believe I had asked what the p_ builder number thing was for this specific instance. When looking at the farm animal code and the monster code, there were two different p_ things.

explain

Link to comment
Share on other sites

2 hours ago, Luis_ST said:

the "bloodghastSpawns" method is wrong remove them but copy the code inside the methode.
then replace "genericName" with event.getSpawns() an it should work...

explain

You know, the code thingy. In the DefaultBiomeFeatures you sent me to, each builder has a different p_ number thing, like p_243731_0_ or p_243734_0_. I didn't know if I needed one, but apparently event.getSpawns() works. The instructions about removing the bloodghastSpawns were unclear, but I think it should look something like this. You know, without the errors.

image.thumb.png.762cf6f6dbbc87f0fa98d111ba89537b.png

The underlined section in red is asking for an EntityClassification, and I gave it an EntityType. But I don't believe I have a classification to give it. I tried 'classification' and 'PlaneswalkerEntities.classification' but those didn't work.

Link to comment
Share on other sites

39 minutes ago, Skullblade said:

You know, the code thingy. In the DefaultBiomeFeatures you sent me to, each builder has a different p_ number thing, like p_243731_0_ or p_243734_0_.

these are unmapped parameter names, mojang only gives forge the names of fields and methods (1.17 and classes).

 

44 minutes ago, Skullblade said:

The underlined section in red is asking for an EntityClassification, and I gave it an EntityType. But I don't believe I have a classification to give it. I tried 'classification' and 'PlaneswalkerEntities.classification' but those didn't work.

this is the type of the entity like
EntityClassification#MONSTER (zombie),
EntityClassification#CREATURE (villager),
EntityClassification#AMBIENT (bat),
and so on

Link to comment
Share on other sites

7 minutes ago, Luis_ST said:

these are unmapped parameter names, mojang only gives forge the names of fields and methods (1.17 and classes).

 

this is the type of the entity like
EntityClassification#MONSTER (zombie),
EntityClassification#CREATURE (villager),
EntityClassification#AMBIENT (bat),
and so on

Good to know. Thank you for your help, and sorry for not understanding earlier.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.