Jump to content

Recommended Posts

Posted (edited)

My custom block is visible in the inventory, but when placed it is invisible. The texture is registering on some level, as it functions in the inventory, and when the block is broken the particles match the texture. The following are my JSON files for the blocks.

 

BlockState JSON:

  Reveal hidden contents

Block Model JSON:

  Reveal hidden contents

Item Model JSON:

  Reveal hidden contents

 

Edited by Zuve
Posted

Each variant needs to point to an object not an array of objects (remove the []). Your log should be telling you this

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 5/21/2019 at 4:54 AM, Cadiboo said:

Each variant needs to point to an object not an array of objects (remove the []). Your log should be telling you this

Expand  

Fixed this, but the issue still persists. There are no errors in the log, but the block remains invisible.

Posted
  On 5/21/2019 at 6:31 PM, V0idWa1k3r said:

Please show the code for your block. I have a very strong suspicion it extends BlockContainer.

Expand  

Thanks, this pointed me in the right direction. I was missing methods for the direction and render type.

Posted (edited)
  On 5/21/2019 at 9:54 PM, Zuve said:

Thanks, this pointed me in the right direction. I was missing methods for the direction and render type.

Expand  

You should not be overriding extending BlockContainer.

Edited by DavidM
typo

Some tips:

  Reveal hidden contents

 

Posted (edited)
  On 5/21/2019 at 11:35 PM, DavidM said:

overriding

Expand  

*extending

BlockContainer is legacy vanilla code. Forge provides a much better system

Edited by Cadiboo
  • Like 1

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted
  On 5/22/2019 at 12:14 AM, Cadiboo said:

*extending

BlockContainer is legacy vanilla code. Forge provides a much better system

Expand  

I wasn't aware of this. Do you have links to any documentation for the system? Searching for forge custom container doesn't seem to show me anything.

Posted

Just override hasTileEntity(IBlockState) and createTileEntity(IBlockState). That’s it

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

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.