Posted March 16, 20178 yr Hello there! I want to add in my mod an ability to record breaking block animation. I tried looking up, if there is such event (of course there's not, it's of too narrow use) or an event that allows reading vanilla packets on server side, but no success. I'm not sure whether it's possible without coremod, but if it possible, how to intercept a vanilla packet on both side (like the CPacketClickWindow or SPacketBlockBreakAnim)? I'm sure it somehow related to Netty and injecting some kind of decoder, or something, but I don't know where to start. Could you give me directions? Thank you for attention! Blockbuster – simple machinimas and cinematics for Minecraft
March 16, 20178 yr Author 1 hour ago, diesieben07 said: Yes, it is possible, but very hacky and should be done as a last resort. Please describe exactly what you want to achieve. Okay, so I have a mod which allows to record player actions and playback them using entities. I want to record breaking block animation and its progress, since my current code allows people to break blocks like in creative mode. Currently, I record all actions using event listener for multiple events, but this way, I'm quite limited of what I want to record. That's why I want to intersect incoming client packets and outgoing server packets. Well, I'm not really worry about hackiness, since I've got already few places where I use quite hacky reflection code for accessing some vanilla stuff Thanks for your time and reply! I really appreciate this! Blockbuster – simple machinimas and cinematics for Minecraft
March 16, 20178 yr Author 42 minutes ago, diesieben07 said: You can implement IWorldEventListener and register it to the world in WorldEvent.Load. Then you will get notified about block breaking with IWorldEventListener::sendBlockBreakProgress. Oh, that's a great idea! Thank you very much! Blockbuster – simple machinimas and cinematics for Minecraft
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.