Jump to content

Recommended Posts

Posted

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?

Posted

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

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