Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static int getItemBurnTime(ItemStack p_145952_0_)
- {
- if (p_145952_0_ == null)
- {
- return 0;
- }
- else
- {
- int moddedBurnTime = net.minecraftforge.event.ForgeEventFactory.getFuelBurnTime(p_145952_0_);
- if (moddedBurnTime >= 0) return moddedBurnTime;
- Item item = p_145952_0_.getItem();
- if (item instanceof ItemBlock && Block.getBlockFromItem(item) != Blocks.air)
- {
- Block block = Block.getBlockFromItem(item);
- if (block == Blocks.wooden_slab)
- {
- return 150;
- }
- if (block.getMaterial() == Material.wood)
- {
- return 300;
- }
- if (block == Blocks.coal_block)
- {
- return 16000;
- }
- }
- if (item instanceof ItemTool && ((ItemTool)item).getToolMaterialName().equals("WOOD")) return 200;
- if (item instanceof ItemSword && ((ItemSword)item).getToolMaterialName().equals("WOOD")) return 200;
- if (item instanceof ItemHoe && ((ItemHoe)item).getToolMaterialName().equals("WOOD")) return 200;
- if (item == Items.stick) return 100;
- if (item == Items.coal) return 1600;
- if (item == Items.lava_bucket) return 20000;
- if (item == Item.getItemFromBlock(Blocks.sapling)) return 100;
- if (item == Items.blaze_rod) return 2400;
- return GameRegistry.getFuelValue(p_145952_0_);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment