PreciousStones

PreciousStones

269k Downloads

Chests as fields is broken.

Psithief opened this issue ยท 5 comments

commented
settings:
  show-debug-info: true
force-field-blocks:
- block: 54

Thanks to 'show-debug-info' I have found two things:

  • When the block is placed, the bukkit event contains Block = 54 and Data = 3, no matter the orientation. That looks like a bug in Bukkit.
  • - block: 54 does not match 54:3, so I must put - block: '54:3'. The PS documentation suggests that the former should match every data. This means it's fortunate that the bukkit bug exists, because there's no way to make four blocks all act as the same type of field!

Alternatively, chest data is supposed to be interpreted differently?

Using v9.1.0 and Bukkit b2149

commented

Mm, and after reloading the chest is seen as its proper oreintation so '54:3' no longer applies. This is difficult. Edit That only happened once, and now 54:3 seems to continue to work.

commented

Ah, here it is. Right-clicking on the chest field with an info-tool or using /ps info causes the field to disappear if it is not oriented to position '3'.

commented

https://bukkit.atlassian.net/browse/BUKKIT-1368
It appears this will never be fixed, thus all data values for rotatable blocks (chests, stairs, slabs, doors, etc.) must all be assumed to be invalid. I doubt you have any choice but to ignore them entirely.

commented

:(

commented

@phaed420 What I meant is that for the rotatable blocks, you should specifically set the data to 0 and compare the data to 0 in all cases.

Here is a short list of rotatable or otherwise data-contaminated blocks that should have data 0 at all times in PS config/database and only ever compared against data 0:

  • Chest 54
  • Ender Chest 130
  • Furnace 61
  • Leaves 18 (unset bit 0x4 - the player placed this block bit)
  • Note block 25
  • Dispenser `
  • Cobble stairs 67
  • Oak wood stairs 53
  • Brick stairs 108
  • Stone brick stairs 109
  • Sandstone Stairs 128
  • Spruce Wood Stairs 134
  • Birch Wood Stairs 135
  • Jungle Wood Stairs 136
  • Pumpkins 86
  • Jack'O'Lanterns 91
  • Fence gate 107

Here is a continuation of the above list, but for less popular block choices:

  • Piston 33, Sticky Piston 29
  • Torch 50
  • Ladders 65
  • Vines 106
  • Trapdoors 96
  • Lily Pads 111
  • Stone button 77
  • Levers 69