Jump to content

Recommended Posts

Posted

Make a normal Block class that extends BlockHalfSlab.

Then

 

public *YourName*Slab(int id, boolean slabtype){
        
        super(id, slabtype, Material.rock);
        this.setCreativeTab(CreativeTabs.tabBlock);
        this.setRequiresSelfNotify(); //if you want to have metadata
        this.setLightOpacity(0);//Fixes most of the Halfslab lightning bugs
     
    }

 

 

"Slabtype" is a boolean which defines weather it is a single slab or a double slab (like when you place two slabs on top of each other they connect), set it to false for it to be a single slab.

 

If you want your single slabs to connect to double slabs you'll need to add a few things, but for a simple halfslab that should be all.

 

Be carefull with metadata though, the slab stores weather it's on top or on the bottom with metadata, which means you can't have 16 different slabs in one BlockID, just 8 at max.

  • 2 weeks later...
Posted

Maxx that code does not work it errors out.

 

 

  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.