Code Editing: Change the breed mob type?

Started by ninjawizard1234 on

Topic category: Help with modding (Java Edition)

Last seen on 04:46, 14. Mar 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Code Editing: Change the breed mob type?

Hey guys, something i use to make on my older version of my mod, make 2 birds breed and lay a egg (a entity) instead of a small bird, but now when i set the egg entity name the code wont accept anymore (was working on mcreator 2020), i need for 2023, can someone give me a hand? this is the part of the code i need to change the blue_jay to blue_jay_egg entity:

@Override
	public AgeableMob getBreedOffspring(ServerLevel serverWorld, AgeableMob ageable) {
		BlueJayEntity retval = WizardAnimalsPlusModEntities.BLUE_JAY.get().create(serverWorld); //<------------ Need to set the Diferent Entity here
		retval.finalizeSpawn(serverWorld, serverWorld.getCurrentDifficultyAt(retval.blockPosition()), MobSpawnType.BREEDING, null, null);
		return retval;
	}
Last seen on 04:46, 14. Mar 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
keep in mind i realise i…
Sun, 11/19/2023 - 09:47

keep in mind i realise i could this with a procedure (when entity spawn, if type = x and so on) but with editing i guess would be much cleaner for the gameplay :) 

Last seen on 04:46, 14. Mar 2024
Joined Nov 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
actually scratch that i cant…
Sun, 11/19/2023 - 10:37

actually scratch that i cant use that procedure or would create a infinity loop ->egg ->baby lol really need to manually change