diff --git a/TODO.txt b/TODO.txt index 96fc164..cd2ff2b 100644 --- a/TODO.txt +++ b/TODO.txt @@ -42,7 +42,6 @@ materials.ores No Zinc ------------------------------------------------------------------------------------------------------- tech.base No Alloy furnace -> search recipe - -> crafting recipe -> I18n -> XP -> let output hoppers take empty buckets / invalid input diff --git a/src/java/mmm/tech/base/TBAlloyFurnaceBlock.java b/src/java/mmm/tech/base/TBAlloyFurnaceBlock.java index 742f923..5662319 100644 --- a/src/java/mmm/tech/base/TBAlloyFurnaceBlock.java +++ b/src/java/mmm/tech/base/TBAlloyFurnaceBlock.java @@ -7,6 +7,7 @@ import java.util.Random; import javax.annotation.Nullable; import mmm.Mmm; +import mmm.utils.I_URecipeRegistrar; import mmm.utils.UMaths; import mmm.utils.URegistry; import net.minecraft.block.Block; @@ -21,6 +22,7 @@ import net.minecraft.creativetab.CreativeTabs; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.init.Blocks; import net.minecraft.init.SoundEvents; import net.minecraft.inventory.Container; import net.minecraft.inventory.InventoryHelper; @@ -39,6 +41,7 @@ import net.minecraft.util.math.AxisAlignedBB; import net.minecraft.util.math.BlockPos; import net.minecraft.world.IBlockAccess; import net.minecraft.world.World; +import net.minecraftforge.fml.common.registry.GameRegistry; import net.minecraftforge.fml.relauncher.Side; import net.minecraftforge.fml.relauncher.SideOnly; @@ -46,6 +49,7 @@ import net.minecraftforge.fml.relauncher.SideOnly; public class TBAlloyFurnaceBlock extends BlockContainer + implements I_URecipeRegistrar { private static final AxisAlignedBB AABB_BOTTOM = UMaths.makeBlockAABB( 0 , 0 , 0 , 16 , 10 , 16 ); private static final AxisAlignedBB AABB_TOP = UMaths.makeBlockAABB( 4 , 10 , 4 , 12 , 16 , 12 ); @@ -73,6 +77,20 @@ public class TBAlloyFurnaceBlock } + @Override + public void registerRecipes( ) + { + if ( !this.active ) { + GameRegistry.addShapedRecipe( new ItemStack( TechBase.ALLOY_FURNACE_ITEM ) , // + "BBB" , // + "BFB" , // + "BBB" , // + 'B' , Blocks.BRICK_BLOCK , // + 'F' , Blocks.FURNACE ); + } + } + + // ************************************************************************************************* // TILE ENTITY // ************************************************************************************************* @@ -338,7 +356,7 @@ public class TBAlloyFurnaceBlock InventoryHelper.dropInventoryItems( worldIn , pos , afte.fuel ); InventoryHelper.dropInventoryItems( worldIn , pos , afte.output ); } - worldIn.updateComparatorOutputLevel(pos, this); + worldIn.updateComparatorOutputLevel( pos , this ); } super.breakBlock( worldIn , pos , state );