Jump to content

Recommended Posts

Posted

Hey guys, so in a discontinued mod of mine I made stairs using this code:

And this seemed to work in 1.4, 1.5 and 1.6

 

  Reveal hidden contents

 

 

However when I added it to my new 1.7 mod using this code:

 

  Reveal hidden contents

Why bother?

Posted

Here's my code(which works perfectly):

Main file:

        public static BlockStairs CbBlackStair;

        	CbBlackStair = new CbColorStair(CbBlack, 0, "Black", 2);

BlockStair:

package colorblocks.blocks;

import colorblocks.ColorBlocks;
import net.minecraft.block.Block;
import net.minecraft.block.BlockStairs;

public class CbColorStair extends BlockStairs{

private Block block;

public CbColorStair(Block block, int extender,String string, int tab) {
	super(block, 1);
	this.block = block;
	this.setBlockName("Cb" + string + "Stair");
	setResistance(50F);
	setHardness(0.1F);
	setStepSound(Block.soundTypeStone);
	setLightLevel(1F);
	this.damageDropped(0);
	if(tab == 0)
	this.setCreativeTab(ColorBlocks.BlueTab);
	if(tab == 1)
		this.setCreativeTab(ColorBlocks.BrownTab);
	if(tab == 2)
		this.setCreativeTab(ColorBlocks.GrayTab);
	if(tab == 3)
		this.setCreativeTab(ColorBlocks.GreenTab);
	if(tab == 4)
		this.setCreativeTab(ColorBlocks.PinkTab);
	if(tab == 5)
		this.setCreativeTab(ColorBlocks.YellowTab);
	if(tab == 6)
		this.setCreativeTab(ColorBlocks.RedTab);
}

}

 

 

If I helped please press the Thank You button.

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.