Giter VIP home page Giter VIP logo

Comments (6)

asiekierka avatar asiekierka commented on June 27, 2024 1

Not done, see discussion in #2

from intermediary.

asiekierka avatar asiekierka commented on June 27, 2024

An internal Stitch branch now performs bridge lookup.

The question is: Should this change be introduced on the 19w update? Does it have the potential to break any existing mod?

from intermediary.

Chocohead avatar Chocohead commented on June 27, 2024

If you take the simplest example of calling the methods:

Serializer testA = new Serializer();
testA.read(new Identifier(""), new JsonObject());
testA.method_8142(new Identifier(""), new JsonObject());

The first call will get obfuscated back to the interface's name (method_8121) whilst the second will keep it's naming. Thus the second direct call would break but the first abstract one would be fine.

This is only a problem if the concrete types have been used too:

RecipeSerializer<ShapelessRecipe> testB = new Serializer();
testB.read(new Identifier(""), new JsonObject());

Would get obfuscated to method_8121 and thus would carry on working fine. It is most likely people have been using the abstract methods as the concrete ones appear to lack any non-Intermediary names.

As for actually extending the types, due to the clunky naming Java already doesn't see them as actually implementing the interfaces:

public class Test extends Serializer {

	@Override
	public ShapelessRecipe read(Identifier var1, JsonObject var2) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public ShapelessRecipe read(Identifier var1, PacketByteBuf var2) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void write(PacketByteBuf var1, ShapelessRecipe var2) {
		// TODO Auto-generated method stub

	}

Is what you get when Eclipse automatically fills the missing methods, ie the interface's names with the proper generic signatures. The generated bridges override correctly too, so the only issue people would have is if they called the concrete methods directly rather than using the interface's abstract methods.

from intermediary.

asiekierka avatar asiekierka commented on June 27, 2024

I think its best to stall this for the first 19w update, or hopefully an 18w50b (though unlikely).

from intermediary.

asiekierka avatar asiekierka commented on June 27, 2024

FabricMC/stitch@2e001d7

Implemented. Awaiting snapshot.

from intermediary.

valoeghese avatar valoeghese commented on June 27, 2024

Wow this hasn't been touched since 2018 lol

from intermediary.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.