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

hey guys is there anyone who is able to help me with the coding to add a block to forge that acts and sounds like a wood log block like oak or acacia logs?

im able to make cube_column blocks into forge but how do I add the ability for the block to rotate when placed onto a side of a block like how the log blocks act? 

Untitled.png

  • Author

Yes I copied and renamed the vanilla blockstate and model jsons and still no difference :'(

 

  • Author

the block texture doesn't load unless I add "normal": {"model": "mm:test_block} . Would there be other commands to make the block act like a wood log block?

 

by the way, I really appreciate you looking into this even if we don't find a solution :)

 

-------------------------------------------------------

[mm/models/blocks/test_block.json]

{

    "parent": "block/cube_column",
    "textures": {
        "end": "mm:blocks/test_block_top",
        "side": "mm:blocks/test_block"
    }
}
-----------------------------------------------------------

[mm/models/blockstates/test_block.json]

{
    "variants": {
        "axis=y":  { "model": "mm:test_block" },
        "axis=z":   { "model": "mm:test_block", "x": 90 },
        "axis=x":   { "model": "mm:test_block", "x": 90, "y": 90 },
        "axis=none": { "model": "mm:test_block_bark" }
    }
}
------------------------------------------------------------

[mm/models/item/test_block.json]

{
    "parent": "mm:block/test_block"
}

------------------------------------------------------------

[mm/models/blocks/test_block_bark.json]

{
    "parent": "block/cube_all",
    "textures": {
        "all": "mm:blocks/test_block"
    }
}
(some extra json i found which accompanied the wood log jsons)

-------------------------------------------------------------

 

ModBlocks.java

BlockBase.java

Main.java

Make your block extend BlockRotatedPillar instead of Block. BlockRotatedPillar has the code to change the orientation of the block depending on which face you click when placing it.

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.