Posted December 17, 201311 yr Hi all, I'm trying to add a semi-block-protection feature to my mod. The idea is that there will be a control block/TE in an area, which will 'reinforce' blocks in its chunk (or otherwise designated bounds). This will be based on a teams system, where players not on the controlling team for the chunk/controlled area will have a much harder time breaking blocks within that designated area. (the goal is for siege warfare -- to remove the ability to just pick-axe through your enemies defenses in mere seconds -- but not completely remove the ability to break, merely make it take longer...tunneling should be a valid tactic, but not the _only_ tactic as it currently is ) Setting up the control block/TE is fairly simple/standard stuff...where I'm getting stuck is dynamically altering the block-hardness or break speed of the player -- based on location --. I see there is the BreakSpeed event...which does pass a player reference, however, it does not give any target block location reference. Is there a super-secret hidden event that I'm not seeing that contains this information, or should I re-ray-trace to get the target block? Has anyone else done a similar feature without resorting to a core-mod? Thanks in advance, Shadowmage
December 17, 201311 yr You don't need a coremod You can raytrace, of course, but you can also: EntityPlayerMP#theItemInWorldManager would give all the information you want on the currently damaged block by corresponding player.
December 17, 201311 yr Author Thanks for the info -- I will take a look into this shortly, it sounds like that may just be the missing link I was looking for
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.