Posted January 25, 20205 yr In 1.14.4 the code that decides if a nether portal should open or not is contained within the flint and steel class. I am wondering if there is a way to deregister the flint and steel item then reregister it still under minecraft using my class I have tried making an anonymous subclass but the method I need to change is a protected static. So it wont just let me override that method. I want to do this because I am trying to change how nether portal's work and I need full control of this method.
January 25, 20205 yr You could change the crafting recipe of Flint and Steel to have your item. If you point to the default Flint and Steel texture you have essentially an identical item, but with your @override method. C#, Java, and Lua are my forte's. Currently Working On: Minecraft Manipulation Let's play test!
January 25, 20205 yr Author I should have been more clear basically what I want to do is if you look inside the flint and steel class where it says "== Blocks.OBSIDIAN" I want to change that to if it is in a tag called nether_portal_blocks that I will create I want to add a bunch of blocks that can also be used to create a nether portal Edited January 25, 20205 yr by CrimsonDawn45
January 25, 20205 yr Yea so what I think you can do is create an item, like "MyModdedFlintAndSteel" in your mod, then basically verbatim copy the flint and steel class from Minecraft, adjust i as you wish. Then create a public static boolean method called "isNetherPortalBlock" with a Block or BlockState as a parameter. then just create like an array/list/arraylist with all of your blocks, Just iterate though the array/list and return true if the block matches. Finally just replace the crafting recipe of flint and steel to return your modded flint and steel. Is that kind of what you are looking for? Sorry if it isn't, I might have a disconnect on something. C#, Java, and Lua are my forte's. Currently Working On: Minecraft Manipulation Let's play test!
January 25, 20205 yr 2 hours ago, CrimsonDawn45 said: but the method I need to change is a protected static. So it wont just let me override that method. Yes. You would need to change it another way. Intercepting the item use events is probably able to achieve what you want. 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.