Block Orientation

metouto

Active Member
Contributor
Art
Will we have block orientation sometime ??? What I mean is ... I placed some bookcases against a wall and the back of the bookcases were facing me :eek: ... should it not be the books facing me ??? :?
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
This can be done by adding the line
Code:
    alignment = "HorizontalDirection"
into the block definition. This should make it so that block is always placed with the "front" facing away from you, so then you just need to ensure the books texture is... on the back I guess.
 

B!0HAX

Member
Contributor
World
*a new?* Block Orientation (front facing players)

Code:
    alignment = "ReverseHorizontalDirection"
Creating that instead of swapping the back for the front texture.

Would it be too much of a pain to create something like that?
I started looking at the c0de... (please correct me if I'm not in the right track / missing something out)
Files Im looking at:

  • [1] HorizontalBlockFamily.java
    [2] BlockManifestor.grooovy
Procedure (?):
Clone [1] & tinker, to create "ReverseBlockFamily.java" and then add to [2] (around line 173) the "definitions"/"case" (whatever).

Maybe its easier to simply swap around front / back textures and use the code above (thanks Immortius).
Code:
    alignment = "HorizontalDirection"
But I thought it would be interesting to attempt (learning comes with trying).
:]
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
Yeah, shouldn't be too hard to add that sort of alignment. Is really a matter of convention, I was considering the "front" of a torch to be the part that touches a wall. Might be more sensible to have that the other way around in general, so I might reverse that while changing block shapes to be defined in JSON. Having a reverse alignment also is a good idea.

Those are the two locations you should be looking at.
 
Top