Everything posted by CheshirZ
-
[1.9]Making tree. Leaves, sapling & world generation.
I'm the idiot, I forgot about reg models =\ Thank you! If I get some trouble I post them her!
-
[1.9]Making tree. Leaves, sapling & world generation.
Not all is Ok. Block do not rendering in inventory. And I'm question: How I do my leaves connected with my log?(sustain) Sorry, I be latter.
-
[1.9]Making tree. Leaves, sapling & world generation.
Ok. I codding rubber leaves. Her Is code. package cheshirX.highEnergetics.blocks.block; import java.util.List; import java.util.Random; import cheshirX.highEnergetics.HighEnergetics; import net.minecraft.block.Block; import net.minecraft.block.BlockLeaves; import net.minecraft.block.BlockPlanks; import net.minecraft.block.properties.PropertyInteger; import net.minecraft.block.state.BlockStateContainer; import net.minecraft.block.state.IBlockState; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Blocks; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.stats.StatList; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.BlockRenderLayer; import net.minecraft.util.math.BlockPos; import net.minecraft.world.World; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BlockRubberLeaves extends BlockLeaves { public static final PropertyInteger LEVEL = PropertyInteger.create("level", 0, 15); public BlockPlanks.EnumType type; public ItemBlock item; public BlockRubberLeaves() { super(); setRegistryName("rubber_leaves"); setUnlocalizedName("rubber_leaves"); setCreativeTab(HighEnergetics.tabHEI); //setDefaultState(this.blockState.getBaseState()/*.withProperty(LEVEL, new Integer(0))*/); type = BlockPlanks.EnumType.OAK; } @Override protected void dropApple(World worldIn, BlockPos pos, IBlockState state, int chance) { if((type == BlockPlanks.EnumType.OAK || type == BlockPlanks.EnumType.DARK_OAK) && worldIn.rand.nextInt(chance) == 0) { spawnAsEntity(worldIn, pos, new ItemStack(Items.apple)); } } @Override protected int getSaplingDropChance(IBlockState state) { return type == BlockPlanks.EnumType.JUNGLE ? 40 : super.getSaplingDropChance(state); } @Override protected ItemStack createStackedBlock(IBlockState state) { return new ItemStack(Item.getItemFromBlock(this), 1, type.getMetadata()); } /** * Convert the given metadata into a BlockState for this Block */ @Override public IBlockState getStateFromMeta(int meta) { return this.getDefaultState()/*.withProperty(LEVEL, new Integer(meta))*/; } /** * Convert the BlockState into the correct metadata value */ @Override public int getMetaFromState(IBlockState state) { return 0;//state.getValue(LEVEL).intValue(); } @Override public BlockPlanks.EnumType getWoodType(int meta) { return BlockPlanks.EnumType.OAK; } @Override protected BlockStateContainer createBlockState() { return new BlockStateContainer(this/*, LEVEL*/); } /** * Gets the metadata of the item this Block can drop. This method is called * when the block gets destroyed. It returns the metadata of the dropped * item based on the old metadata of the block. */ @Override public int damageDropped(IBlockState state) { return 0; } @Override public void harvestBlock(World worldIn, EntityPlayer player, BlockPos pos, IBlockState state, TileEntity te, ItemStack stack) { if(!worldIn.isRemote && stack != null && stack.getItem() == Items.shears) { player.addStat(StatList.func_188055_a(this)); } else { super.harvestBlock(worldIn, player, pos, state, te, stack); } } @Override public List<ItemStack> onSheared(ItemStack itemStack, net.minecraft.world.IBlockAccess world, BlockPos pos, int fortune) { Block block = type.getMetadata() < 4 ? Blocks.leaves : Blocks.leaves2; int meta = type.getMetadata() % 4; return java.util.Arrays.asList(new ItemStack(block, 1, meta)); } /** * Just here to prevent BlockLeaves's updateTick from running. */ @Override public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand) { // } /** * Just here to prevent BlockLeaves's beginLeavesDecay from running. */ @Override public void beginLeavesDecay(IBlockState state, World world, BlockPos pos) { // } @Override @SideOnly(Side.CLIENT) public BlockRenderLayer getBlockLayer() { return Minecraft.isFancyGraphicsEnabled() ? BlockRenderLayer.CUTOUT_MIPPED : BlockRenderLayer.SOLID; } /** * Used to determine ambient occlusion and culling when rebuilding chunks for render */ @Override public boolean isOpaqueCube(IBlockState state) { return !Minecraft.isFancyGraphicsEnabled(); } }
-
[1.9]Making tree. Leaves, sapling & world generation.
I made the leaves, they are transparent, but I do not know how to do what they would have kept on my tree and dropped my sapling.
-
[1.9]Making tree. Leaves, sapling & world generation.
Now, I'm working on the mod. I need to add your tree, wood blocks, respectively, are necessary for him, leaves and seedlings. The log is ready, now I suffer doing foliage. I ask your help forum as it to make?
-
[1.9]Making tool crafting recipe
I'm confused
-
[1.9]Making tool crafting recipe
You tall about ItemStack copy() method?
-
[1.9] help generating ores
Ou, you are long code. But, why? On this site is guide easier, and it work on 1.9. The site - http://bedrockminer.jimdo.com/modding-tutorials/basic-modding-1-8/world-generation/
-
[1.9]Making tool crafting recipe
But, why?
-
[1.9]Making tool crafting recipe
And a few information. Then damaged tool is staing in crafting grid, It are the icon and the zero sub.
-
[1.9]Making tool crafting recipe
Good day. I have a problem! When I add the recipe to craft an instrument, it works well. But when I take a damaged tool from the crafting grid disappears Is code of tool: And of recipe: I want tool like hammer from IC2
IPS spam blocked by CleanTalk.