Alloy furnace - Crafting
This commit is contained in:
parent
11993d575b
commit
8335dc6067
2 changed files with 19 additions and 2 deletions
1
TODO.txt
1
TODO.txt
|
@ -42,7 +42,6 @@ materials.ores No Zinc
|
||||||
-------------------------------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------------------------------
|
||||||
tech.base No Alloy furnace
|
tech.base No Alloy furnace
|
||||||
-> search recipe
|
-> search recipe
|
||||||
-> crafting recipe
|
|
||||||
-> I18n
|
-> I18n
|
||||||
-> XP
|
-> XP
|
||||||
-> let output hoppers take empty buckets / invalid input
|
-> let output hoppers take empty buckets / invalid input
|
||||||
|
|
|
@ -7,6 +7,7 @@ import java.util.Random;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import mmm.Mmm;
|
import mmm.Mmm;
|
||||||
|
import mmm.utils.I_URecipeRegistrar;
|
||||||
import mmm.utils.UMaths;
|
import mmm.utils.UMaths;
|
||||||
import mmm.utils.URegistry;
|
import mmm.utils.URegistry;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
|
@ -21,6 +22,7 @@ import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLivingBase;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.init.Blocks;
|
||||||
import net.minecraft.init.SoundEvents;
|
import net.minecraft.init.SoundEvents;
|
||||||
import net.minecraft.inventory.Container;
|
import net.minecraft.inventory.Container;
|
||||||
import net.minecraft.inventory.InventoryHelper;
|
import net.minecraft.inventory.InventoryHelper;
|
||||||
|
@ -39,6 +41,7 @@ import net.minecraft.util.math.AxisAlignedBB;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||||
import net.minecraftforge.fml.relauncher.Side;
|
import net.minecraftforge.fml.relauncher.Side;
|
||||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
|
@ -46,6 +49,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||||
|
|
||||||
public class TBAlloyFurnaceBlock
|
public class TBAlloyFurnaceBlock
|
||||||
extends BlockContainer
|
extends BlockContainer
|
||||||
|
implements I_URecipeRegistrar
|
||||||
{
|
{
|
||||||
private static final AxisAlignedBB AABB_BOTTOM = UMaths.makeBlockAABB( 0 , 0 , 0 , 16 , 10 , 16 );
|
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 );
|
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
|
// TILE ENTITY
|
||||||
// *************************************************************************************************
|
// *************************************************************************************************
|
||||||
|
@ -338,7 +356,7 @@ public class TBAlloyFurnaceBlock
|
||||||
InventoryHelper.dropInventoryItems( worldIn , pos , afte.fuel );
|
InventoryHelper.dropInventoryItems( worldIn , pos , afte.fuel );
|
||||||
InventoryHelper.dropInventoryItems( worldIn , pos , afte.output );
|
InventoryHelper.dropInventoryItems( worldIn , pos , afte.output );
|
||||||
}
|
}
|
||||||
worldIn.updateComparatorOutputLevel(pos, this);
|
worldIn.updateComparatorOutputLevel( pos , this );
|
||||||
}
|
}
|
||||||
|
|
||||||
super.breakBlock( worldIn , pos , state );
|
super.breakBlock( worldIn , pos , state );
|
||||||
|
|
Reference in a new issue