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

  Hello. I've tried searching everywhere, including here, but I still can't solve my problem. I made a slab class that extends to BlockSlab and overrid func_150003_a to return my slab instead of vanilla's stone or wooden slab, but It still gives me this bug. I can't place them on top of each other in the same block (making a double slab). The slab's top or bottom faces are also darkened out, depending on which half of the block the slab is. (If it's on the bottom the top face is darkened out and vice-versa). 

Here's the image of my problem: http://i.imgur.com/4bRxsji.png

    I have also registered both blocks (slab and double slab), using the same class and just changing the boolean in firestoneSlab(boolean b, Material m) to false or true, respectively. The blocks and textures are fine, its just that the slabs don't merge.

    I really don't know what the problem is, if someone could help me I would appreciate it.

  • Author

I don't have an ItemBlock class I thought that was for 1.6.4 . But I've tried using it and it kept crashing on me so could you tell me how to properly use it? And what block do I give it as an argument: the double slab or the single slab?

  • Author

I don't know how the game registry does it. I've created a static variable called slabFire and initiated it in a void method with the following arguments: slabFire = new slabFireItem(null, dcBlocks.firestoneSlabSingle, dcBlocks.firestoneSlabDouble, true);

I don't know what to put in the first argument instead of null and I can't put "dcBlocks.FirestoneSlabDouble" either because that id slot is occupied and the game will just crash.

I'm having the same isue, I tried to figure out what you've written, did you mean something like this? [GameRegistry.registerBlock(TeamCraft.SingleBlock, ItemSlab.class, "SingleSlab", TeamCraft.SingleBlock, TeamCraft.DoubleBlock, false);

        GameRegistry.registerBlock(TeamCraft.DoubleBlock, ItemSlab.class, "DoubleSlab", TeamCraft.SingleBlock, TeamCraft.DoubleBlock, true);]

Em, should I use the BlockSlab class instead of my class? For the single and the double block?

Ok, I have a class that extends BlockSlab. It overrides the getIcon and the getItem Method, but I can't figure out what is the func_150002_b method.

The only thing that I can't figure out is the crash that I showed you yesterday... It seems that something is wrong with my ItemSlab constructor...  http://pastebin.com/YPgd8qyM  I have tried to cast BlockSlab in the Registry, in the constructor, but the same error given.

I'm fully idiot... nevermind, I looked up to your answer(about 5 lines above this comment) and solved it... Now you make a big facepalm and I say again Thanks!!

Can you show me your code? I don't get it working with mine

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.