Posted June 26, 20196 yr I'm porting a mod from 1.10.2 to 1.12.2 and have received the following error NAME_TO_CLASS cannot be resolved or is not a field for the code Spoiler public void modifyDrops(final MobDropsInfo mobDrops) { if (!mobDrops.theEntity.world.isRemote) { int count = FileHelper.getCount(this.counts); while (count-- > 0) { final Entity entity = EntityList.NAME_TO_CLASS.(this.entityId, mobDrops.theEntity.world); if (entity == null) { return; } this.initEntity(mobDrops.theEntity, entity, mobDrops); mobDrops.theEntity.world.spawnEntity(entity); I know that NAME_TO_Class needs to be changed. I believe that it could be changed to createEntityByIDFromName, or getClassfromName, and these are suggestions I get when testing. However, When I switch to them it says I need a resource location, which I'm not sure how to create, fix, or what it means. This is one only a few errors left in the port, and would really appreciate a solution.
June 26, 20196 yr You should probably understand what that code is doing, and then port it differently. Without knowing what entitiyId or mobDrops.theEntity is, getClassFromName seems like the right replacement About Me Spoiler My Discord - Cadiboo#8887 My Website - Cadiboo.github.io My Mods - Cadiboo.github.io/projects My Tutorials - Cadiboo.github.io/tutorials Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support. When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible. Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)
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.