Lists of all applicable Keys by Block and all applicable Blocks by Key

I tried to list all acceptable values:
[code] [list]
But there are three problems, making this list wrong:

  1. Some values depend on other values: for example, AXIS of lever depends of it’s DIRECTION - XZ for UP and DOWN and Y for all others. Getting and listing all that combinatorial stuff in a static table is not realistic.
  2. DISPENSER and DROPPER are listed as unable to be in UP and DOWN DIRECTION while they can be in that direction.
  3. Any RAIL_DIRECTION for any rail except for simple rail is returned as non-applicable, while it is applicable.
    …and I’m pretty sure it’s not the only problems. In case of 2 and 3, blockState.with on line 105 returns null for some reason. I’m stumped how to solve it, maybe I should have used Catalogues and Game Registry? Or my code has some other errors?

Edit: Hm, seems like I can’t set Dispenser to Direction.UP even manually, while SOUTH works. Same to manually setting RailDirections to rails. Can someone confirm this? Maybe this is a SpongeCommon bug, but I’m not sure. Maybe bug is from my side.

1 Like