Draco18s Posted June 12, 2013 Posted June 12, 2013 /** * Returns whether this block is collideable based on the arguments passed in Args: blockMetaData, unknownFlag */ public boolean canCollideCheck(int par1, boolean par2) { return this.isCollidable(); } The par2 boolean is a flag that relates to collision raycasts, say, by the player's mouse cursor. I had a dispenser-like block that I wanted to fire multiple arrows from, found that because of some offsets (so that they would be emitted from different locations, regardless of orientation) was causing some arrows to collide with the block itself. So I looked into making the block non-collidable for that purpose. Found the above function (well, knew it existed, but implemented it for an override and did this: public boolean canCollideCheck(int par1, boolean par2) { return this.isCollidable() & par2; } I could now no longer right-click interact with my block, but the arrows passed through it as desired. Changed to public boolean canCollideCheck(int par1, boolean par2) { return this.isCollidable() | par2; } And retained the desired behavior and regained the ability to interact with it. Scratch that, was a total fluke due to the RNG. (There are 4 spots my arrows fire from, two of them collide, two don't, the test I thought things worked right was just a fluke of the RNG picking the two that worked). Back-tracing the code it appears that this boolean is true if and only if the player right-clicks while holding a boat. I suspect that this code is used to place the boat on top of water rather than underneath. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
LexManos Posted June 12, 2013 Posted June 12, 2013 Either way this doesn't belong here. We are not the curators of vanilla code documentation. http://mcp.ocean-labs.de/index.php/MCPBot Quote I do Forge for free, however the servers to run it arn't free, so anything is appreciated. Consider supporting the team on Patreon
Draco18s Posted June 12, 2013 Author Posted June 12, 2013 We are not the curators of vanilla code documentation. I actually had no idea. Quote Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
Recommended Posts
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.