Posted May 10, 20169 yr I've added some custom wood blocks whose class inherits from BlockLog, and for whatever reason, I can't get them to burn like normal wood. I can set the top face of the block on fire, but I can't set the sides on fire like I can with regular wood, and the custom wood blocks don't burn up. The only things the BlockOldLog and BlockNewLog classes do that the BlockLog class does not is specify the vanilla wood types, so I don't believe that's the issue. The Block_RawLog class has a tick event, but I don't know if that would change things. Can anyone see if I'm missing something or doing something wrong? Here's the code for the custom wood blocks: public class Block_RawLog extends BlockLog { public Block_RawLog() { this.setTickRandomly(true); } @SideOnly(Side.CLIENT) public void registerBlockIcons(IIconRegister register) { this.field_150167_a = new IIcon[1]; this.field_150167_a[0] = register.registerIcon(this.getTextureName() + "_" + "side"); this.field_150166_b = new IIcon[1]; this.field_150166_b[0] = register.registerIcon(this.getTextureName() + "_" + "top"); } public void updateTick(World world, int x, int y, int z, Random random) { boolean debug = true; int meta_orig = world.getBlockMetadata(x, y, z); int meta_rot = meta_orig & 3; // 12D = 0011B, isolates bottom bits int meta_dir = meta_orig - meta_rot; if (meta_rot == 3 || (debug && meta_rot >= 1)) { world.setBlock(x, y, z, BlockInit.Raw_Log_Dead, meta_dir, 2); } else { meta_rot++; world.setBlockMetadataWithNotify(x, y, z, meta_rot+meta_dir, 2); } } } How I'm instantiating the blocks themselves, in case there's something different I need to do here: Raw_Log_Birch = new Block_RawLog().setBlockName("raw_log_birch").setCreativeTab(mod_TrekkieCubOddsAndEnds.tab_usefulthings).setBlockTextureName(TCOAE_Const.PRE_USE + "raw_log_birch");
May 10, 20169 yr Author How do the encouragement and flammability values of that function work? Also, does this need to happen before or after the custom blocks are registered?
May 10, 20169 yr I don't think the blocks need to be registered with the GameRegistry, but they do need to be instantiated. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
May 10, 20169 yr My mistake. *salute* Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
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.