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

I've coded an multi-textured-block in 1.7.2 , but it doesn't work . Here is the code:

package DETheLegendOfGaming.RedPow0rReloaded;

 

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

import net.minecraft.block.Block;

import net.minecraft.block.BlockLog;

import net.minecraft.block.BlockRotatedPillar;

import net.minecraft.block.material.Material;

import net.minecraft.client.renderer.texture.IIconRegister;

import net.minecraft.util.IIcon;

import net.minecraft.world.IBlockAccess;

 

public class blockRubberWood extends BlockRotatedPillar {

@SideOnly(Side.CLIENT)

    protected IIcon[] blockRubberWood_top;

    @SideOnly(Side.CLIENT)

    protected IIcon[] blockRubberWood_side;

    private static final String __OBFID = "CL_00000266";

   

    public blockRubberWood(Material p_i45394_1_) {

super(p_i45394_1_);

// TODO Auto-generated constructor stub

this.setCreativeTab(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.tabProjectRedAddon);

this.setHardness(2.0F);

        this.setStepSound(soundTypeWood);

        this.setBlockTextureName(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood_up");

}

   

    @SideOnly(Side.CLIENT)

    public static IIcon topIcon;

    @SideOnly(Side.CLIENT)

    public static IIcon bottomIcon;

    @SideOnly(Side.CLIENT)

    public static IIcon sideIcon;

   

public int getRenderType()

    {

        return 31;

    }

 

@SideOnly(Side.CLIENT)

public void registerIcons(IIconRegister icon) {

topIcon = icon.registerIcon(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood" + "_up");

bottomIcon = icon.registerIcon(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood" + "_up");

sideIcon = icon.registerIcon(DETheLegendOfGaming.RedPow0rReloaded.RedPow0rReloadedMain.MODID + ":" + "IIconRubberWood" + "_side");

 

}

 

 

public static void init() {

 

}

 

 

 

 

 

    @Override

    public boolean canSustainLeaves(IBlockAccess world, int x, int y, int z)

    {

        return true;

    }

 

    @Override

    public boolean isWood(IBlockAccess world, int x, int y, int z)

    {

        return true;

    }

 

@Override

public IIcon getSideIcon(int var1) {

// TODO Auto-generated method stub

return sideIcon;

 

}

public IIcon getTopIcon(int var1) {

// TODO Auto-generated method stub

return topIcon;

 

}

public IIcon getBottomIcon(int var1) {

// TODO Auto-generated method stub

return bottomIcon;

 

}

 

 

 

 

}

 

registerBlockIcons

 

And if you put the Override annotation over all methods you ever override from Minecraft, you would've figured that out.

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.