Please do not instruct how to use ASM on the forums. Doing ASM wrong leaves your code fragile and prone to breaking unexpectedly, especially when other mods get involved, and when Minecraft crashes there will be no evidence that its YOUR code that caused the problem.
If you do not know how to use ASM already, then you should not be using ASM.
I just told you how. Ditch it entirely and register your models in the ModelRegistryEvent directly. Like I do here if you need an example.
I have yet to see a "good" modding tutorial on youtube. All of them make mistakes like this, or static initializers, or CommonProxy or something else posts on this forum are plagued by. The truth is they don't know much more than you. They've just learned how to make their code not explode in their faces and they are eager to share that knowledge with the world even if their code makes no sense(CommonProxy, IHasModel) or is plain incorrect(static initializers)
AnvilRepairEvent. You can get the "current anvil" from the opened container(event.getEntityPlayer().openContainer). It is likely an instance of ContainerRepair(although it might not be in case of modded anvils so you have to account for that). ContainerRepair has a selfPosition field you can use to get the position of the anvil.
Although none of that is needed if you simply want to modify the break chance for the anvil. Just use AnvilRepairEvent#setBreakChance.
There is no event for that. If you wish for one you can submit a PR. This is why you are using a EntityJoinWorldEvent in the first place - to replace the falling anvil entity provided by vanilla with your own wrapper/version that has the necessary hook.
Also note that anvils don't have durability the way items have durability. They have a probabilistic chance of going from "newly made" to "worn" to "damaged" to "gone."
The falling action is also probabilistic: Number of blocks fallen * 5%.
It would override any falling block. It doesn't matter whether the anvil is "new" or "old". It should also affect even the falling blocks currently in the process of falling.
EntityJoinWorldEvent happens every time any entity joins a world. As in every time World#spawnEntity is called.
EntityFallingBlock is not an event. It's an entity.
Oh my gods! Thank you!
None of my methods were static. I went and updated them to be static.
All five of these event methods triggered (like a thousand times)
[20:26:46] [Server thread/WARN] [apothecary]: loadLootTable
[20:26:46] [Server thread/WARN] [apothecary]: lootLoad
[20:26:46] [Server thread/WARN] [apothecary]: lootLoadEvent
[20:26:46] [Server thread/WARN] [apothecary]: onLootTableLoaded
[20:26:46] [Server thread/WARN] [apothecary]: onLootTableLoadedEvent
I was using `@SubscribeEvent`, btw.
How did you register the event handling class? If you used the EventHandler annotation then you need to make the method static. In any case you need to have it properly registered as well.
@LenManos Your staff / mods / whoever works with you was complaining about my mod code and cussing at me as well, and even other people i know said the forge forms are assholes to everyone and idc if i get baned. because you cant speak to someone like that saying you know everything. & you all so stop saying well we dont support this version any more youtubers still play with 1.7.10 & above so you really need to think twice
There may be a build or two for 1.13.0 but once the fundementals are in place we'll be updating to 1.13.Whatever. Things are still being re-written. We're not to worried about the minor changes in MC versions. It's the major ones that are gunna take some time.