Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

  • Author

I didn't get any errors and minecraft is opening just fine

If you you want me to send any strings of code just ask

  • ModderBoi42 changed the title to Now it's just a model problem
  • Author

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#'

  • Author
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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.