[SPIGOT-246] Signs or Chests spawn in random directions Created: 20/Dec/14  Updated: 08/Mar/15  Resolved: 08/Mar/15

Status: Closed
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: tastybento Assignee: Thinkofname
Resolution: Cannot Reproduce Votes: 0
Labels: 1.8, world
Environment:

java version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)


Plugin: ASkyBlock

 Description   

When setting a block to a CHEST or SIGN_POST the direction of the resulting item is somewhat random. In 1.7.10, it was always the same direction. In V1.8 I've found that it changes and I cannot work out why.

Examples code:
Block blockToChange = world.getBlockAt(x, Settings.island_level + 5, z + 3);
blockToChange.setType(Material.SIGN_POST);

Unless the sign is specifically direction set, it sometimes spawns facing SOUTH, and sometimes NORTH.

I also have code that loads schematics. The blocks from the schematic are set using this code:

block.setTypeIdAndData(type, blockData[index], false);

This also results in signs and chests sometimes being oriented wrongly even though the data part should set the orientation.

Due to the random nature, I haven't been able to work out a pattern yet or reliably way to replicate the issue.



 Comments   
Comment by Thinkofname [ 08/Mar/15 ]

May have already been fixed

Comment by tastybento [ 16/Jan/15 ]

Cool. I'd be interested in seeing where the problem was.

Comment by MattBDev [ 16/Jan/15 ]

I found the issue. I will submit a PR for it.

Comment by tastybento [ 15/Jan/15 ]

No, they don't. Only North or South.

Comment by MattBDev [ 14/Jan/15 ]

Does the Sign or Chest ever face east or west? If they don't, I think I see why the direction is somewhat random.

Comment by md_5 [ 06/Jan/15 ]

Sorry I thought this was about worldgen.

Comment by tastybento [ 06/Jan/15 ]

Sorry - I don't understand - can vanilla be programmed?

In game, when placing a sign or chest it always faces the player.

The issue seems to be with Bukkit method setType(Material) when the Material is a SIGN_POST or CHEST. Is the direction always one value or undefined?

Comment by md_5 [ 22/Dec/14 ]

And what about vanilla 1.8.0?

Comment by tastybento [ 20/Dec/14 ]

Sorry - I accidentally made this in the BuildTools. It should be in Spigot.

Generated at Mon Apr 21 20:53:39 UTC 2025 using Jira 10.3.5#10030005-sha1:190c783f2bd6c69cd5accdb70f97e48812a78d14.