Jump to content

Recommended Posts

Posted

Hello, I have a custom slab class, these custom slabs function normally. Aside from two things;

 

One:

The slabs do not stack, when I place them on each-other there's a big empty space.

 

Two:

When I click in with the scroll wheel of my mouse, it gives me a stone slab instead. It's the same thing with any custom block that extends a vanilla block, is there a method to fix this?

 

Picture of my problem:

http://postimg.org/image/g97zuc2fp/

 

I have also tried to register the "ItemSlab" in postInit from the following tutorial (Changing the syntax to 1.7.10 myself), but it was of no use, my blocks simply wouldn't stack.

 

 

Here's my registry and slab class.

 

Registering:

 

  Reveal hidden contents

 

 

Slab Class (Cut out import statements):

 

  Reveal hidden contents

 

 

To reiterate, the issue is not with texturing, but the fact the slabs do not change to doubleslabs when placed together, thank you for your time.

Posted

For double slabs, you need to register a custom ItemBlock with the block. Have a look at ItemSlab in vanilla.

Check out my mod, Realms of Chaos, here.

 

If I helped you, be sure to press the "Thank You" button!

Posted

Okay, so, I implemented a class that extends ItemSlab. The issue is that I'm getting an ID overlap. (Two of the same Id, I think) So it crashes Minecraft upon startup.

 

ItemSlab class:

 

  Reveal hidden contents

 

 

The use of the class:

 

  Reveal hidden contents

 

 

Error Log (Some of it):

 

  Reveal hidden contents

 

 

(Edit) For additional reference, here is the source GameData.class method where the error points to:

 

  Reveal hidden contents

 

Posted

When you are registering your block, you need to specify the ItemBlock too.

GameRegistry.registerBlock(block,CustomItemBlock.class,name);

 

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

Solved, took me awhile because I am slightly retarded.

 

Finished slab class:

 

  Reveal hidden contents

 

 

Finished ItemSlab class:

 

  Reveal hidden contents

 

 

Finished slab creation:

 

  Reveal hidden contents

 

 

Finished Registery (Inside of preinit):

 

  Reveal hidden contents

 

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.