Advertisement
Guest User

Untitled

a guest
Nov 3rd, 2015
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.89 KB | None | 0 0
  1. if (!world.isRemote)
  2.         {
  3.             Block block1 = world.getBlock(x, y, z);
  4.             if (block1 == Blocks.furnace)
  5.             {
  6.                 TileEntity tile = world.getTileEntity(x,y,z);
  7.                 TileEntityFurnace furn = (TileEntityFurnace)tile;
  8.  
  9.                 ItemStack toBurn = furn.getStackInSlot(0);
  10.                 if (toBurn != null)
  11.                 {
  12.                     ItemStack burnResult = FurnaceRecipes.smelting().getSmeltingResult(toBurn);
  13.  
  14.                     ItemStack currentResult = furn.getStackInSlot(2);
  15.  
  16.                     if (burnResult != null && (currentResult == null || currentResult.getUnlocalizedName() == burnResult.getUnlocalizedName()))
  17.                     {
  18.                         BlockFurnace.updateFurnaceBlockState(true, world, x, y, z);
  19.                         furn.furnaceBurnTime = 400;
  20.                     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement