Keheck Posted April 5, 2020 Posted April 5, 2020 While I was working on my mod my IDE complained that "All entities must have a constructor that takes one net.minecraft.world.World constructor" //A constructor like this: public Entity(net.minecraft.world.World world) { //do stuff } I was wondering why, especially because the mod builds and the entity registers just fine without this constructor. I dug around in my code inspection settings and it turns out that it belongs to the MCP inspection group. Using a breakpoint to find it's usage didn't help since at no point during mod setup and testing (testing as in summoning the entity via the /summon command; the entity is a throwable and would use another constructor when thrown anyway). When is this constructor used, if at all, and is that constructor important? Quote
Animefan8888 Posted April 5, 2020 Posted April 5, 2020 On 4/5/2020 at 11:40 AM, Keheck said: While I was working on my mod my IDE complained that "All entities must have a constructor that takes one net.minecraft.world.World constructor" Expand That constructor makes me think you are using 1.12 or an earlier version. Which are not supported on this forum. Please update to a modern version of Minecraft to receive support. For more information read the LTS at the top of the page. Quote VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect. Forge and vanilla BlockState generator.
_Cruelar_ Posted April 5, 2020 Posted April 5, 2020 If you aren't using 1.12 (which I agree with Animefan seems like you do): The Plugin in IntelliJ which I think you're using isn't working for 1.14 and needs to be manually redownloaded with a newer version to work with newer Forge versions Quote My Projects: Cruelars Triforcemod (1.12 release; 1.14 alpha soon coming) Important: As my mod is on at least 10 different third party sites without my permission, I want to warn you about that with a link to StopModReposts
Draco18s Posted April 5, 2020 Posted April 5, 2020 Oh, and for reference, that constructor is used to load the entity from disk. 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.
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.