Jump to content

Recommended Posts

Posted (edited)

Hi! I have a custom block. Now I wanted it to have rotations like standing sign block has. Added IntegerProperty for rotations and all rotations work perfectly fine except the block model. The rotation changes according to the placement (as it should be), but instead of the correct block model I see purple and black squared block. Created the block model with Blockbench, and I think my blockstate.json is also correct:

{
  "variants": {
    "rotation=0": {
      "model": "mymodid:block/my_block",
      "y": 0
    },
    "rotation=1": {
      "model": "mymodid:block/my_block",
      "y": 22.5
    },
    "rotation=2": {
      "model": "mymodid:block/my_block",
      "y": 45
    },
    "rotation=3": {
      "model": "mymodid:block/my_block",
      "y": 67.5
    },
    "rotation=4": {
      "model": "mymodid:block/my_block",
      "y": 90
    },
    "rotation=5": {
      "model": "mymodid:block/my_block",
      "y": 112.5
    },
    "rotation=6": {
      "model": "mymodid:block/my_block",
      "y": 135
    },
    "rotation=7": {
      "model": "mymodid:block/my_block",
      "y": 157.5
    },
    "rotation=8": {
      "model": "mymodid:block/my_block",
      "y": 180
    },
    "rotation=9": {
      "model": "mymodid:block/my_block",
      "y": 202.5
    },
    "rotation=10": {
      "model": "mymodid:block/my_block",
      "y": 225
    },
    "rotation=11": {
      "model": "mymodid:block/my_block",
      "y": 247.5
    },
    "rotation=12": {
      "model": "mymodid:block/my_block",
      "y": 270
    },
    "rotation=13": {
      "model": "mymodid:block/my_block",
      "y": 292.5
    },
    "rotation=14": {
      "model": "mymodid:block/my_block",
      "y": 315
    },
    "rotation=15": {
      "model": "mymodid:block/my_block",
      "y": 337.5
    }
  }
}

Why is it not working? What am I doing wrong this time? Thanks.

Edited by RInventor7
Solved
Posted

The blockstate.json doesn’t accept values such as 22.5 and 45.

After searching around for few hours and trying to understand how Minecraft sign block works, I came to conclusion that in order to rotate the block by 22.5 increments you would have to create a custom renderer. 

  • RInventor7 changed the title to Block rotations not working [1.19.2] [SOLVED]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.