Jump to content

Custom Slabs


OrangeySnicket

Recommended Posts

To my pleasant surprise, I was actually able to get my code up and running without crashing the game right off the bat. To my less pleasant surprise, the block I was attempting to create didn't seem to actually exist. Even give commands return an error message informing me that such a block could not be found. Yet, insofar as I can tell from the logs, the block is, in fact, registered. Were it an issue with the model or blockstate files, I would have expected to see the pink checkerboard of doom. As is, though, the block simply doesn't seem to exist anywhere in the usable game registry.

My workspace data can be found at https://github.com/OrangeySnicket/CosCraft-Mod/tree/WIP/workspace/InvestitureMod. The block in question is AshTiles. Any help would be appreciated.

Link to comment
Share on other sites

16 minutes ago, OrangeySnicket said:

Even give commands return an error message informing me that such a block could not be found.

You never register an Item for your slab block. You've commented it out.
 

Quote

//new ItemBlock(ModBlocks.ASH_TILES).setRegistryName(ModBlocks.ASH_TILES.getRegistryName()),

 

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

Oh, good heavens. Well, as usual, it's my own stupidity getting in the way. Thanks for pointing out that glaringly obvious fact that I somehow failed to see as I was checking and re-checking my code. I feel really stupid right now. 

 

For my next inevitably stupid question... I have the slabs working, mostly, but it doesn't seem to be possible to place an upside down slab. I'd assume that that has something to do with my getMetaFromState function, but everything seems to be in order there. Despite the fact that I'm sure it isn't.

Link to comment
Share on other sites

9 minutes ago, OrangeySnicket said:

Despite the fact that I'm sure it isn't

It doesnt have anything to do with your getMetaFromState method that is only used to serialize your block to the disk. Your ItemBlock needs to be an ItemSlab.

VANILLA MINECRAFT CLASSES ARE THE BEST RESOURCES WHEN MODDING

I will be posting 1.15.2 modding tutorials on this channel. If you want to be notified of it do the normal YouTube stuff like subscribing, ect.

Forge and vanilla BlockState generator.

Link to comment
Share on other sites

I fixed that, but it doesn't seem to have actually changed anything. My slabs still behave as though they were full blocks, creating an annoying levitation effect, displayed here. Correspondingly, I still am not able to place slabs upside down.

If it helps at all with diagnosis, when I dig down and attempt to place two slabs in the hole, it glitches a window in the world through which you get a spectator mode view. 

2019-09-19_14.14.27.png

Edited by OrangeySnicket
Link to comment
Share on other sites

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.