Posted September 13, 201213 yr I am currently writing a tool for my mod that lets the player harvest bark from logs by getting the metadata of the log and changing it to a "barkless log" while damaging the tool (similar to a hoe). However this only works for logs that are vertically oriented and not for logs oriented on their sides. I assume this is due to log orientation being set with the use of further metadata, but I was wondering if there was a way to detect this rotation and have my bark harvesting work without adding 8 more if statements to accommodate the rotations metadata? (note: I can do it with the more if statements but was wondering if there was a simpler way to do it. In relation to the same block, placing it manually with rotation works with one small glitch, it always places the oak variation, no matter which variation is being used, how do I fix this?
September 13, 201213 yr About the first issue, have you tried using a bitwise AND operation? (&) I don't know which number you would need for that to work, but I can imagine that it would work somewhat like that.
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.