Posted February 27, 20169 yr Hello, I am creating a mod for my school project and I need to log player events into a mysql database. I have logged things such as killing an living entity or crafting an item. Mostly the events from this page: https://dl.dropboxusercontent.com/s/h777x7ugherqs0w/forgeevents.html I am trying to look into getting events such as brewing potions, creating enchanted items, riding an entity, going through a portal, etc... Is there a mod that already exists for these extended events or do I have to create them?
February 27, 20169 yr Look at the subclasses of cpw.mods.fml.common.eventhandler.Event in your IDE to see which events are provided by Forge. PotionBrewEvent.Pre / Post are fired when a potion is brewed. None of the other events you described are provided by Forge and I'm not aware of any mods that do provide them. In 1.8.9, EntityTravelToDimensionEvent is fired when an entity changes dimensions. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
February 27, 20169 yr Author I was trying to use the PotionBrewEvent event, but it does not provide the information on which player has created the potion, only the items created. My group has decided to use 1.7.10 for stability and tutorials. Is there a way to implement custom events, such as interacting with an enchantment table and getting its output?
February 27, 20169 yr I was trying to use the PotionBrewEvent event, but it does not provide the information on which player has created the potion, only the items created. I imagine that this is because the brewing isn't directly triggered by a player like regular crafting is. The only way to approximate which player brewed the potion is to record who took the resulting potions out of the brewing stand. Is there a way to implement custom events, such as interacting with an enchantment table and getting its output? Unless you can use an existing hook or event, you'll have to either make a PR to Forge (which is very unlikely to get merged for 1.7.10, since it's now outdated) or resort to ASM. ASM requires knowledge of the Java bytecode format and there aren't many tutorials on it. Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.
February 28, 20169 yr Author Thank you for the answers, I will try looking into ASM, otherwise my team will use spigot cauldron to develop the mod.
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.