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

class B extends A implements I{} class A { void foo(); } interface I {void foo();} #12

Open
md-5 opened this issue Oct 5, 2013 · 13 comments

Comments

@md-5
Copy link
Owner

md-5 commented Oct 5, 2013

No description provided.

@tonybruess
Copy link

?

@md-5
Copy link
Owner Author

md-5 commented Oct 5, 2013

The above case fails to remap A.foo->A.bar in the case I.foo->I.bar

rutgerkok referenced this issue in MCTCP/TerrainControl Oct 10, 2013
- Exchanged ForgeMod for our own ForgeModderTools.
- Removed some settings that were equal to the default settings - they
only clutter up the page.
- Removed all child .gitignores - added new entries to the parent
.gitignore.
- 1.0.0 -> 2.5.1.
- com.khorn.minecraft -> com.khorn.terraincontrol
@CovertJaguar
Copy link

Possibly related and also broken:
class A { void foo(); } class B extends A implements I{} interface I{ void foo(); } MD: I/foo ()V I/bar ()V

In other words, implementing an interface function in a superclass that doesn't implement the interface breaks all kinds of shit, badly. Renaming needs to traverse the inheritance tree in both directions.

@iChun
Copy link

iChun commented Jul 15, 2014

Would like to bump this, actually. It's been a while.

@md-5
Copy link
Owner Author

md-5 commented Jul 15, 2014

@iChun it can't actually be fixed properly without generating synthetic redirect methods, which is a whole extra can of worms.

@iChun
Copy link

iChun commented Jul 15, 2014

Ahh, @AbrarSyed pointed me in your direction cause I was prodding him about ATs not transforming methods which override a super.method which was ATed to.. eg from protected to public, requiring multiple AT lines like these: https://github.com/MinecraftForge/MinecraftForge/blob/master/src/main/resources/forge_at.cfg#L127-L132

Might be a separate issue altogether for all I know but thought I'd just mention it now.

@md-5
Copy link
Owner Author

md-5 commented Jul 15, 2014

Thats a completely different issue, you should probably open a ticket for it.

@iChun
Copy link

iChun commented Jul 15, 2014

Dang, I'm in bed now. I'll try to remember in the morning but I'll probably
forget. Wouldn't be too hard to fix now, would it?
On 15 Jul 2014 13:14, "md-5" [email protected] wrote:

Thats a completely different issue, you should probably open a ticket for
it.


Reply to this email directly or view it on GitHub
#12 (comment).

@md-5
Copy link
Owner Author

md-5 commented Jul 15, 2014

Probably not, for simple cases such as the above anyway. However that being said our AT code was relicensed directly from Forge by cpw, so any bugs are either the result of:
a) error in porting to SS
b) error in Forge AT itself

@tukochet
Copy link

tukochet commented Jun 4, 2015

I'm also running into this problem. Has anyone addressed it or found a work around?

@CovertJaguar
Copy link

There are work arounds. They often result in extra boilerplate, but its fairly simple to avoid the described situation, usually by adding redirects in the child classes.

@mezz
Copy link

mezz commented Jun 10, 2016

This is a major source of boilerplate and confusion in Forestry.
It also prevents me from creating default interfaces to redirect vanilla interfaces to a delegate.
Here's a nice example of doing that with a Forge interface: ForestryMC/ForestryMC@92eab8d
Unfortunately it's not possible with IItemHandler or anything else with obfuscated names due to this bug.

@CovertJaguar
Copy link

Also the infamous "getWorld()" bugs. ;)

CodesCubesAndCrashes added a commit to CodesCubesAndCrashes/AgriCraft that referenced this issue Jun 15, 2017
For the IAgriCrop interface, this renames the getPos and getWorld
methods so as to not match the methods inherited from TileEntity.
The only uses so far were in the mutation strategies. And the newly
named methods just call the original named methods via 'this'.

This workaround is for a re-obfuscation bug in Special Source, a
program that ForgeGradle depends on.

MinecraftForge/ForgeGradle#205
md-5/SpecialSource#12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants