ARRP

ARRP

3M Downloads

[Question] Complex blockstates

PssbleTrngle opened this issue ยท 1 comments

commented

How would you generate a blockstate file representing this json?

"variants": {
      "facing": {
         "north": {},
         "south": {"y": 180},
         "west": {"y": 270},
         "east": {"y": 90}
      },
      "spell": {
         "good": { "model": "mischief:totem/totem_basalt_enchanted" },
         "bad": { "model": "mischief:totem/totem_basalt_enchanted" },
         "none": { "model": "mischief:totem/totem_basalt" }
      }	
  }

This is my obviously wrong attempt.
model(it) just returns the something like 'modid:block/name'

new JVariant()
    put(SpellableBlock.STATE.name, State.NONE, JBlockModel(model(it).toString()))
    put(SpellableBlock.STATE.name, State.CURSED, JBlockModel(model(it).toString()))
    put(SpellableBlock.STATE.name, State.BLESSED, JBlockModel(model(it).toString()))
    put(Totem.FACING.name, Direction.NORTH, JBlockModel("what").y(0))
    put(Totem.FACING.name, Direction.SOUTH, JBlockModel("what").y(180))
    put(Totem.FACING.name, Direction.WEST, JBlockModel("what").y(270))
    put(Totem.FACING.name, Direction.EAST, JBlockModel("what").y(90))
commented

Or would I use a multipart for that?