O'Reilly logo

Minecraft™ Mod Development in 24 Hours, Sams Teach Yourself by Jimmy Koene

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Custom Block Rendering

It is likely that you want a block with a custom shape. To get this done, you need a block like Listing A.3 for that.

LISTING A.3 Custom Render Block Class

package com.wuppy.samsmod.blocks;import java.util.Random;import com.wuppy.samsmod.SamsMod;import net.minecraft.block.Block;import net.minecraft.block.material.Material;import net.minecraft.client.renderer.texture.IIconRegister;import net.minecraft.creativetab.CreativeTabs;import net.minecraft.init.Items;import net.minecraft.item.Item;import net.minecraft.world.IBlockAccess;import net.minecraft.world.World;import cpw.mods.fml.relauncher.Side;import cpw.mods.fml.relauncher.SideOnly;public class BlockCustomRenderWoodExample extends Block

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required