Jump to content

Recommended Posts

Posted (edited)

I'm trying to make a slab block but the model won't work

I already have another block, it isn't a slab but works perfectly fine

I can't figure out what is making the slab block bug

Anyways, here's the code of the blockinit class:

Spoiler

public static final RegistryObject<Block> BLACK_SLAB = register("black_slab",
            () -> new SlabBlock(BlockBehaviour.Properties.of(Material.WOOD, MaterialColor.COLOR_BLACK).strength(2.0f)
                    .sound(SoundType.WOOD)),
            object -> () -> new BlockItem(object.get(), new Item.Properties().tab(UnimplementedFeaturesMod.FIRST_VERSION_TAB)));
 

 

Edited by ModderBoi42
Fixed the slab, new problems now
  • ModderBoi42 changed the title to Now it's just a model problem
Posted

I fixed the slab, but now i got a problem with another block

I'm now trying to make a charcoal block that rotates like a log

Here's the json files for the blockstate and the model:

Spoiler

{
  "variants": {
    "axis=x": {
      "model": "ufm:block/charcoal_block_horizontal",
      "x": 90,
      "y": 90
    },
    "axis=y": {
      "model": "ufm:block/charcoal_block"
    },
    "axis=z": {
      "model": "ufm:block/charcoal_block_horizontal",
      "x": 90
    }
  }
}

 

{
  "parent": "minecraft:block/cube_column",
  "textures": {
    "end": "ufm:block/charcoal_block_top",
    "side": "ufm:block/charcoal_block"
  }
}

 

{
  "parent": "minecraft:block/cube_column_horizontal",
  "textures": {
    "end": "ufm:block/charcoal_block_top",
    "side": "ufm:block/charcoal_block"
  }
}

And an error message from the console:

Spoiler

[09:13:35] [Worker-Main-6/WARN]: Exception loading blockstate definition: 'ufm:blockstates/charcoal_block.json' in resourcepack: 'Mod Resources' for variant: 'axis=z': Unknown blockstate property: 'axis'
[09:13:35] [Worker-Main-6/WARN]: Exception loading blockstate definition: 'ufm:blockstates/charcoal_block.json' in resourcepack: 'Mod Resources' for variant: 'axis=x': Unknown blockstate property: 'axis'
[09:13:35] [Worker-Main-6/WARN]: Exception loading blockstate definition: 'ufm:blockstates/charcoal_block.json' in resourcepack: 'Mod Resources' for variant: 'axis=y': Unknown blockstate property: 'axis'
[09:13:35] [Worker-Main-6/WARN]: Exception loading blockstate definition: 'ufm:blockstates/charcoal_block.json' missing model for variant: 'ufm:charcoal_block#'

Posted
7 hours ago, diesieben07 said:

The errors tell you exactly what is wrong

No they don't

Spoiler

{
  "variants": {
    "axis=x": {
      "model": "minecraft:block/acacia_log_horizontal",
      "x": 90,
      "y": 90
    },
    "axis=y": {
      "model": "minecraft:block/acacia_log"
    },
    "axis=z": {
      "model": "minecraft:block/acacia_log_horizontal",
      "x": 90
    }
  }
}

That's the acacia log blockstate
I copied it and changed what needed to be changed
And now there's the error whenever i try to run the mod

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.