Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

bumpernickl

Members
  • Posts

    9
  • Joined

  • Last visited

bumpernickl's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. After dding the doesSideBlockRendering function: @Override public boolean doesSideBlockRendering(IBlockAccess world, BlockPos pos, EnumFacing face) { // The stairs are transparent. Always render the adjacent faces. return false; } the ground remains visible. Thanks for all the support!
  2. I added isOpaqueCube and shouldSideBeRendered: public boolean isOpaqueCube(IBlockState state) { return false; } @SideOnly(Side.CLIENT) @Override public boolean shouldSideBeRendered(IBlockAccess worldIn, BlockPos pos, EnumFacing side) { IBlockState iblockstate = worldIn.getBlockState(pos); Block block = iblockstate.getBlock(); if (this == ExtraStairsMod.glassStairsBlock) { if (worldIn.getBlockState(pos.offset(side.getOpposite())) != iblockstate) { return true; } if (block == this) { return false; } } return false; The shadow still appears beneath the stairs and the faces adjacent to stairs don't show.
  3. The mod compiles both with and without the @Override annotation and the game acts the same way both times. There is no error on the @)Override annotation. Both methods do what they should, it seems like I am just missing a method to keep the surrounding blocks from becoming transparent and to prevent a shadow.
  4. I added @Override before the methods but this did not fix the problem.
  5. I made glass stairs render correctly, however any blocks underneath them appear transparent as well. package com.mstarks.extrastairs.blocks; import net.minecraft.block.BlockStairs; import net.minecraft.block.material.Material; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Blocks; import net.minecraft.util.EnumWorldBlockLayer; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; public class BasicStairs extends BlockStairs { public BasicStairs(String unlocalizedName, CreativeTabs tab, Material material, float hardness, float resistance, int harvestLevel) { super(Blocks.stone_stairs.getStateFromMeta(0)); this.setUnlocalizedName(unlocalizedName); this.setCreativeTab(tab); this.setHardness(hardness); this.setResistance(resistance); this.setHarvestLevel("pickaxe", harvestLevel); } @SideOnly(Side.CLIENT) public EnumWorldBlockLayer getBlockLayer() { return EnumWorldBlockLayer.CUTOUT; } public boolean isFullCube() { return false; } } Don't worry about activating/deactivating the parts of the code I had mentioned, I can figure that out on my own (except under the super argument). In the main class for a block, you can set the tool used under this.setHarvestLevel (i.e. pickaxe, axe, shovel, etc.). I would like to make the block break at the same speed with every tool or your hands, like glass in vanilla.
  6. I use 1.8 because I can't stand the hit delay in older versions. The material is set to stone, as it makes the wrong sounds ingame. I believe I found the method, "EnumWorldBlockLayer", but I would like to use this only if I set a variable to true in the main class, and it errors when I add an if statement. (Another unrelated problem, what is the argument for using any tool or your hand when breaking a block?)
  7. I found where it sets the material in my BasicStairs class: super(Blocks.stone_stairs.getStateFromMeta(0)); I would like to add a variable I can set when registering the stair in the main mod class, but I am unsure what I should replace this line with.
  8. I'm surprised its so easy. I have another question though. I tried adding glass stairs and they do have the default texture, however all the transparent regions appear black when placed. Can this be fixed?
  9. I would like to add stairs and slabs for existing blocks into my mod, using vanilla textures. However, I wish to take them from the game files rather then implement them directly into the mod, because I want it to be texture pack compatible. I am using generalized classes as well, so it needs to be in the main mod file or in the .json files. Is there any way I can do this? Thanks!
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.