meteor-client icon indicating copy to clipboard operation
meteor-client copied to clipboard

Auto Breed not working in Multiplayer since 1.20.5/6

Open EnderKill98 opened this issue 9 months ago • 3 comments

Describe the bug

Auto Breed will not feed any animals, when holding the corresponding Item.

I did a bunch of investigation and found, why this happens. However this is Data/Datapack related and I have zero knowledge in that area and are not sure how to fix this.

https://github.com/MeteorDevelopment/meteor-client/blob/339cf2b801084dec188d505c4add4e86c2e463b1/src/main/java/meteordevelopment/meteorclient/systems/modules/world/AutoBreed.java#L80-L90

Basically, the needed ItemTags are no longer included when the client is running clientside only. ItemTags are used by the various Animal Implementations (e.g. TurtleEntity) to determine whether an Entity can be breed with a certain Item. So animal.isBreedingItem will always return false.

In the class net.minecraft.data.Main, the function public static DataGenerator create(Path output, Collection<Path> inputs, boolean includeClient, boolean includeServer, boolean includeDev, boolean includeReports, boolean validate, GameVersion gameVersion, boolean ignoreCache) takes the argument includeServer.

Specifically, create is adding VanillaItemTagProvider, which includes the entries for the *_FOOD ItemTags only if that boolean (includeServer) is true.

As mentioned, I'm at a loss here, how I would force the client to just have includeServer be true all the time. It seems to be spawned as a new process, which makes mixins seemingly fail (I tried mixing into the Head of main and adding --server to args).

Not affected: Singleplayer / Open to LAN

In these mods, Auto Breed works normally. Somehow Minecraft then loads the server side (as part of the integrated server?). The client can then find these tags without an issue and do auto breeding.

Steps to reproduce

  1. Join a Multiplayer server
  2. Enable Auto Breed
  3. Spawn a Mob and hold the corresponding breeding Item

Meteor Version

Meteor 0.5.7-2087

Minecraft Version

MC 1.20.6

Operating System

macOS

Before submitting a bug report

  • [X] This bug wasn't already reported (I have searched bug reports on GitHub).

  • [X] This is a valid bug (I am able to reproduce this on the latest dev build).

EnderKill98 avatar May 28 '24 19:05 EnderKill98