Jump to content

robertkhamilton

Members
  • Posts

    5
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

robertkhamilton's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. This would work for most cases, however PlayerInteractEvent for Action.RIGHT_CLICK_BLOCK also fires a false positive when Right click is selected but no block is placed (such as in the case where a user is standing too close to the block on which they're clicking). Would be nice if there was a way to tell if the block was actually placed, not just that a user right-clicked on a block. I guess one solution would be to check the face on which the click event occurred, then based on that face, check the position to see if a block exists or not; if the block exists then the placing was successful. Seems pretty painful to just check if a block was successfully placed though.
  2. Any more thoughts on this? I see a number of forum suggestions to use PlayerInteractEvent.action == RIGHT_CLICK_BLOCK to detect block placing, however, if the client is standing too close to the block placement site, RIGHT_CLICK_BLOCK will still trigger without any block being created. Any way to access Block.onPostBlockPlaced?
  3. Thanks coolAlias, After reading through these and looking around a bit I'm realizing that accessing these events is only one way to mod with Forge (apologies for my neubosity)? Is the use of Transformers what I should really be looking into? i.e. http://www.minecraftforge.net/wiki/Using_Access_Transformers For instance, if I wanted to fire a message when a new block is created by a Client, like "onBlockPlacedBy" in Block, since there's no Event for that, I would instead have to override that method with an Access Transformer?
  4. Hi all, I've recently posted my first Mod (OSCCraft) which embeds an Open Sound Control implementation into Minecraft (Forge 1.7.2). For those who don't know it, OSC is a messaging protocol (UDP or TCP) that is commonly used in interactive music or media systems to pass data from one system to the next (like MIDI but more flexible). I've so far figured out a few key events to monitor, mostly by trial and error, and was wondering if there's a comprehensive list or easy place to see all the events that Forge can access? For instance, I'm using net.minecraftforge.event.entity.player.PlayerInteractEvent to track Client position and rotation and using net.minecraftforge.event.world.BlockEvent.BreakEvent to track which blocks are being broken at any given time. I'm an experienced programmer and have already explored much of this using the Minecraft deobfuscated source without Forge, but would prefer to keep the project Forge loadable. Thanks, Rob --------------- rob hamilton center for computer research in music and acoustics stanford university http://ccrma.stanford.edu/~rob https://github.com/robertkhamilton/osccraft
  5. Hi all, I've uploaded the source and mod .jar for OSCCraft, a forge-1.7.2 mod that output Open Sound Control messages for specific player and block-related events. Files can be found at: https://github.com/robertkhamilton/osccraft Here are a few specifics: - Mod outputs player position data and block hit/destroyed events over OSC - Built into the Minecraft Forge 1.7.2 framework and can be loaded as a standard mod - Currently, output is simply hardcoded to "localhost:6666" - Output namespaces for the initial release are just: => /osccraft/player <x> <y> <z> <pitch> <yaw> <player-id> <event-id> => /osccraft/block/hit <x> <y> <z> <block-side> <player-id> <event-id> <block-type> => /osccraft/block/destroyed <x> <y> <z> <player-id> <event-id> <block-type> Player position (XYZ), rotation and player ID are output on each tick. Block hit and destroyed messages include block location as well as player id and a limited block-type (just for a few major block types). Block and player events are filtered to send to each Client (i.e. sent to localhost), though this can be easily tweaked in the source to show all client data to each client. More updates to come. Any suggestions or comments would be appreciated. Enjoy, Rob ------------------- rob hamilton center for computer research in music and acoustics stanford university http://ccrma.stanford.edu/~rob
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.