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 am trying to update my mod into 1.9 and have sorted through all the errors and now, after getting in game, one of my blocks is not rendering at all.

 

lX47LIX.png

 

As you can see the block, when placed, is not there. However the item for the block is displaying as intended.

 

blockstates/miningRig.json:

{
    "variants": {
        "facing=north": { "model": "doge:miningRig" },
        "facing=south": { "model": "doge:miningRig", "y": 180 },
        "facing=west":  { "model": "doge:miningRig", "y": 270 },
        "facing=east":  { "model": "doge:miningRig", "y": 90 }
    }
}

 

models/block/miningRig.json:

{
    "parent": "block/cube",
    "textures": {
        "particle": "doge:blocks/miningRigFrontOff",
        "up": "doge:blocks/miningRigTopBackOff",
        "down": "doge:blocks/miningRigBottom",
        "south": "doge:blocks/miningRigTopBackOff",
        "north": "doge:blocks/miningRigFrontOff",
        "east": "doge:blocks/miningRigSideOff",
        "west": "doge:blocks/miningRigSideOff"
    }
}

 

models/items/miningRig.json:

{
    "parent": "doge:block/miningRig"
}

 

models registered with:

ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(Doge.miningRig), 0, new ModelResourceLocation(Doge.miningRig.getRegistryName(), "inventory"));

 

The other block I have is working fine although it has no block states and simply uses block/cube_all model

 

full source available here: https://github.com/mmdanggg2/DogeMod/tree/1.9.4

I have a youtube if you care:

https://www.youtube.com/c/mmdanggg2

BlockContainer

overrides

Block#getRenderType

to return

EnumBlockRenderType.INVISIBLE

, which prevents the standard baked model from being rendered (so the model can be rendered by a

TESR

).

 

You could override

Block#getRenderType

to return

EnumBlockRenderType.MODEL

(like various vanilla blocks with

TileEntities

do), but the best way around this is to not extend

BlockContainer

at all. Instead, override

Block#hasTileEntity(IBlockState)

and

Block#createTileEntity

.

 

MiningRig

has a

getRenderType

method returning 3, but this no longer overrides

Block#getRenderType

in 1.9+. Always annotate override methods with

@Override

. If this gives you a compilation error, fix the method signature rather than removing the annotation.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

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.