Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Projectile Entity Constructor Missing Access Level Modifier Preventing Direct Extension


Recommended Posts

4 minutes ago, Iron1601 said:

What's the return type of a constructor? stack overflow says void which by the forge docs means that no return type is needed?

Yes, its void. No idea why the docs say that, it is not true.

 

4 minutes ago, Iron1601 said:

And yes I agree there is no reason to AT your code but this was just a temporary measure just to not cause any other errors.

What?

Link to post
Share on other sites
Quote

No idea why the docs say that, it is not true

So I do need a return type in the AT.

Quote

What?

I made a new project to make sure the only things that could be a problem was the AT and AT'd the Mod class to not mess with minecraft or forge's internal libraries. In general I don't think that matters a whole lot since that doesn't seem to be the problem.

Link to post
Share on other sites

I'm looking to make the constructor of ProjectileEntity public or at least protected and im getting

Quote

line 1:30 no viable alternative at input 'public net.minecraft.entity.projectile.ProjectileEntity <init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)'
Exception in thread "main" java.lang.RuntimeException: 
    at net.minecraftforge.accesstransformer.parser.AtParserErrorListener.syntaxError(AtParserErrorListener.java:8)

which to me means that there is a syntax error.  I haven't managed to locate the problem.

Any help would be appreciated.

Link to post
Share on other sites

I meant the AT'd mod class wasn't the problem, the AT is almost certainly the problem. Excuse me if that wasn't clear. I would imagine this is a solvable problem just by someone that knows the syntax.

Edited by Iron1601
Link to post
Share on other sites

I apologize for this dragging on however, it appears the winning formula is 

Quote

public net.minecraft.entity.projectile.ProjectileEntity <init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;)V

With your context clues, other AT's and patience I found this working.

Thanks for the help.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.