PandaTobi Posted November 28, 2020 Share Posted November 28, 2020 When trying to define an addInformation function to add lore to my custom item, the IDE is telling me that I am not overriding a method from it's superclass. Am I doing something wrong? My function: @Override public void addInformation(ItemStack stack, PlayerEntity player, List list, boolean check) { list.add("Lorem ipsum for your troubled soul:"); } Quote Link to comment Share on other sites More sharing options...
Draco18s Posted November 28, 2020 Share Posted November 28, 2020 3 minutes ago, PandaTobi said: Am I doing something wrong? Yes, you have marked a method with @Override but are not actually overriding a method. You need to correct the method signature so that you are overriding a method. 1 Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
PandaTobi Posted November 28, 2020 Author Share Posted November 28, 2020 @Draco18s I see what I did wrong. I was getting stuck on a part where I was trying to convert the String into a ITextComponent object, but it turns out that the inbuilt "func_241827_a_" function already did that. A bit of an odd naming scheme, but I like it! LOL. Quote Link to comment Share on other sites More sharing options...
Draco18s Posted November 28, 2020 Share Posted November 28, 2020 41 minutes ago, PandaTobi said: A bit of an odd naming scheme, Its called a SRG name. Its an automatically assigned identifier by the decompilation process so that even as obfuscated names get shuffled and changed every time Mojang updates the game, the SRG names stay constant. But it means that when major versions happen the SRG -> MCP name identification and mapping needs to be rediscovered. 1 Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
PandaTobi Posted November 28, 2020 Author Share Posted November 28, 2020 @Draco18s I understand. Have a good day, and thank you for giving the time to help me! I'll just post the working code here just to help any future users that happend to stumble across this thread: @Override public void addInformation(ItemStack stack, World worldIn, List<ITextComponent> tooltip, ITooltipFlag flagIn) { super.addInformation(stack, worldIn, tooltip, flagIn); tooltip.add(ITextComponent.func_241827_a_("'Lore'em Ipsum! Ha!")); } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.