Posted February 16, 20214 yr Even though some classes extend ProjectileEntity, its constructor is protected. I tried extending it and my IDE told me I needed a "constructor matching super" so I made one but of-course the constructor is protected so a super() is not an option. Am I missing something or is there no way to directly extend ProjectileEntity? Thanks in advance Edited February 16, 20214 yr by Iron1601
February 16, 20214 yr 20 minutes ago, Iron1601 said: constructor is protected extends ProjectileEntity and set the constructor to public that you register you entity if you extends a class which has protect methods you can use them
February 16, 20214 yr Author Quote 'ProjectileEntity(net.minecraft.entity.EntityType<? extends net.minecraft.entity.projectile.ProjectileEntity>, net.minecraft.world.World)' is not public in 'net.minecraft.entity.projectile.ProjectileEntity'. Cannot be accessed from outside package Thanks for the suggestion I tried it and the IDE gave me ^ that. To me this sounds like its not public in the class itself let alone extending classes. Regardless this seems like a mistake of some sort since it is highly unusual to not have a modifier.
February 16, 20214 yr Author So I have to piggyback off of some other class and override its methods and logic? If so, why?
February 16, 20214 yr Author Indeed that is the last resort though I haven't managed to get the formatting down. F.e how do I express "EntityType<? extends [class name]> or a return type of void?
February 16, 20214 yr Author I have seen, and following that I made Quote public net.minecraft.entity.projectile.ProjectileEntity(Lnet/minecraft/entity/EntityType; Lnet/minecraft/world/World) Which doesn't seem to work; still fails at runtime. Edited February 16, 20214 yr by Iron1601
February 16, 20214 yr Author So this? Quote public net.minecraft.entity.projectile.ProjectileEntity <init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World) If yes the error is now Quote Could not find net.minecraftforge:forge:1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_8792c... Edited February 16, 20214 yr by Iron1601
February 16, 20214 yr Author Quote Could not resolve all files for configuration ':compileClasspath'. > Could not find net.minecraftforge:forge:1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451. Searched in the following locations: - https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451.pom - https://files.minecraftforge.net/maven/net/minecraftforge/forge/1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451.jar - file:/C:/Users/Iftach/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451.pom - file:/C:/Users/Iftach/.gradle/caches/forge_gradle/bundeled_repo/net/minecraftforge/forge/1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451.jar - https://libraries.minecraft.net/net/minecraftforge/forge/1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451.jar - https://repo.maven.apache.org/maven2/net/minecraftforge/forge/1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451.pom - https://repo.maven.apache.org/maven2/net/minecraftforge/forge/1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451/forge-1.16.4-35.1.4_mapped_snapshot_20201028-1.16.3_at_7f64862d2fbb7783bd9b00c37ce20f3f46067451.jar Required by: project : Possible solution: - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html
February 16, 20214 yr Author What I sent was the "Could not resolve net.minecraftforge:forge:1.16.4...." This is the :compileJava Error log.txt
February 16, 20214 yr Author I would imagine this means there is something wrong with the line since puttin a space between the "private com.example.examplemod" and the "<init>" fixes it. I guess this means there is some syntax problem with Quote public net.minecraft.entity.projectile.ProjectileEntity <init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;) Same error on both to be clear I see now it says "Syntax error" so I guess there's that but what error? Edited February 16, 20214 yr by Iron1601
February 16, 20214 yr Author The log was of the examplemod of the mdk to have a control test and the same exact errors came up in both i checked Also I AT'd my own mod so it wont screw up anything else that might be used somewhere else Edited February 16, 20214 yr by Iron1601
February 16, 20214 yr Author Im confident you can AT your own mod so long as you dont actively mess something up. My entire AT is the one line Quote public net.minecraft.entity.projectile.ProjectileEntity <init>(Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;) Not sure what an update error log is? updated?
February 16, 20214 yr Author Excuse me if i'm jumping to conclusions or if this is wrong but removing the (Lnet/minecraft/entity/EntityType;Lnet/minecraft/world/World;) fixes the error but just nerfs the AT so now it just doesn't compile
February 16, 20214 yr Author What's the return type of a constructor? stack overflow says void which by the forge docs means that no return type is needed? 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. This is the :comileJava error message I'm assuming that's what you mean. I cant really find any log file in the run/logs or logs folders that seems relevant. log,txt
February 16, 20214 yr Author 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.
February 18, 20214 yr Author 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.
February 18, 20214 yr Author 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 February 18, 20214 yr by Iron1601
February 18, 20214 yr Author 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.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.