Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix API8 datafixers #2622

Closed
wants to merge 1 commit into from
Closed

fix API8 datafixers #2622

wants to merge 1 commit into from

Conversation

Faithcaio
Copy link
Contributor

@Faithcaio Faithcaio commented May 24, 2020

after #2620

@Faithcaio Faithcaio requested a review from gabizou as a code owner May 24, 2020 07:36
Copy link
Contributor

@i509VCB i509VCB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is definitely an odd section of the codebase, if you need some help with DFU, just give me a ping.

final Type<?> trackedType = spongeDataType.findFieldType(name);
final OpticFinder<?> trackedFinder = DSL.fieldFinder(name, trackedType);

return this.fixTypeEverywhereTyped("Entity" + name + "UserFix", this.getInputSchema().getType(TypeReferences.ENTITY),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where things go down hill...

So TypeReferences.ENTITY does not exist on any schemas of Sponge's datafixer.

This means this will fail to fix, hard fail. The solution to this is the include minecraft's own schema into your datafixer, at a lower version than sponge's current schema version so the type reference exists.

Even then, there is a whole extra can of beans with the entity type reference, but that is closer to how modded entities are handled during registration.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

However that itself can be a mess, and I need to sleep. So I can clarify tomorrow.

@@ -35,12 +38,13 @@
import java.util.Map;
import java.util.UUID;

public class PlayerRespawnData implements IFixableData {
// TODO this is actually doing nothing?
public class PlayerRespawnData extends DataFix {

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd probably want to call this PlayerRespawnDataFix

gabizou added a commit that referenced this pull request May 31, 2020
Signed-off-by: Gabriel Harris-Rouquette <[email protected]>
@gabizou
Copy link
Member

gabizou commented May 31, 2020

Merged into api-8.

@gabizou gabizou closed this May 31, 2020
@Faithcaio Faithcaio deleted the api8/datafixers branch July 12, 2020 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants