makerimages Posted November 28, 2013 Posted November 28, 2013 https://bitbucket.org/makerimages/electronica-engineered Issue 5 and commit 8c31178 are related to this. When I go to place down a bucket, it will place it INTO the block i clicked on, not the block that is on the face I clicked on, like it shoud do. Also, it wont empty the bucket. And the water wont immediately start flowing aswell. If you can help me with that, you could please try out issue 5 part 2 aswell(the things i classified "Creative only") thanks! Quote
AomicTim Posted November 28, 2013 Posted November 28, 2013 Do you have any code that decides what side you clicked on and responds accordingly? This is what you may be missing: int x = movingobjectposition.blockX; int y = movingobjectposition.blockY; int z = movingobjectposition.blockZ; if (!world.canMineBlock(player, x, y, z)) { return item; } if (movingobjectposition.sideHit == 0) { y--; } if (movingobjectposition.sideHit == 1) { y++; } if (movingobjectposition.sideHit == 2) { z--; } if (movingobjectposition.sideHit == 3) { z++; } if (movingobjectposition.sideHit == 4) { x--; } if (movingobjectposition.sideHit == 5) { x++; } Try to understand what is happening here. The position of the block that has been hit is x, y, z. The side which the player hits the block is being checked, and depending on which side is hit, the x, y or z value is being decremented or incremented by 1, thus moving the position of the new block to put down out of the block that is hit. Quote
Brenwwe Posted December 4, 2013 Posted December 4, 2013 Where would that go? Well free to look at my bucket code here https://github.com/Brenwwe/EJ/tree/master/EJ_common/EJ/Fluids hopefully that helps. Quote Aether II Developer
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.