Copper tools

This commit is contained in:
Emmanuel BENOîT 2016-06-16 16:22:52 +02:00
parent 34a807e027
commit 284e7479f3
16 changed files with 214 additions and 2 deletions

View file

@ -32,8 +32,7 @@ food No Extra recipes
Pizza Pizza
Various mashes Various mashes
------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------
tech.tools ??? Copper tools tech.tools No Copper armor
tech.tools ??? Copper armor
------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------
??? ??? Sub-blocks ??? ??? Sub-blocks
??? Yes Improved pistons ??? Yes Improved pistons

View file

@ -4,6 +4,7 @@ package mmm.proxy;
import mmm.Mmm; import mmm.Mmm;
import mmm.deco.DecorativeBlocks; import mmm.deco.DecorativeBlocks;
import mmm.materials.Materials; import mmm.materials.Materials;
import mmm.tech.tools.Tools;
import mmm.utils.UAccessors; import mmm.utils.UAccessors;
import mmm.utils.URegistry; import mmm.utils.URegistry;
import mmm.utils.USeat; import mmm.utils.USeat;
@ -22,6 +23,7 @@ public abstract class PCommon
DecorativeBlocks.preInit( ); DecorativeBlocks.preInit( );
Materials.preInit( ); Materials.preInit( );
Tools.preInit( );
URegistry.registerRecipes( ); URegistry.registerRecipes( );
} }

View file

@ -0,0 +1,36 @@
package mmm.tech.tools;
import mmm.utils.I_URecipeRegistrar;
import mmm.utils.URegistry;
import net.minecraft.init.Items;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class TTAxe
extends ItemAxe
implements I_URecipeRegistrar
{
public TTAxe( final ToolMaterial material , float damage , float attackSpeed )
{
super( material , damage , attackSpeed );
URegistry.setIdentifiers( this , "tech" , "tools" , "axe" , material.toString( ).toLowerCase( ) );
}
@Override
public void registerRecipes( )
{
GameRegistry.addShapedRecipe( new ItemStack( this ) , //
"II" , //
"IS" , //
" S" , //
'I' , this.getToolMaterial( ).getRepairItemStack( ) , //
'S' , new ItemStack( Items.STICK ) );
}
}

View file

@ -0,0 +1,36 @@
package mmm.tech.tools;
import mmm.utils.I_URecipeRegistrar;
import mmm.utils.URegistry;
import net.minecraft.init.Items;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class TTPickaxe
extends ItemPickaxe
implements I_URecipeRegistrar
{
public TTPickaxe( final ToolMaterial material )
{
super( material );
URegistry.setIdentifiers( this , "tech" , "tools" , "pickaxe" , material.toString( ).toLowerCase( ) );
}
@Override
public void registerRecipes( )
{
GameRegistry.addShapedRecipe( new ItemStack( this ) , //
"III" , //
" S " , //
" S " , //
'I' , this.getToolMaterial( ).getRepairItemStack( ) , //
'S' , new ItemStack( Items.STICK ) );
}
}

View file

@ -0,0 +1,35 @@
package mmm.tech.tools;
import mmm.utils.I_URecipeRegistrar;
import mmm.utils.URegistry;
import net.minecraft.init.Items;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class TTShovel
extends ItemSpade
implements I_URecipeRegistrar
{
public TTShovel( final ToolMaterial material )
{
super( material );
URegistry.setIdentifiers( this , "tech" , "tools" , "shovel" , material.toString( ).toLowerCase( ) );
}
@Override
public void registerRecipes( )
{
GameRegistry.addShapedRecipe( new ItemStack( this ) , //
"I" , //
"S" , //
"S" , //
'I' , this.getToolMaterial( ).getRepairItemStack( ) , //
'S' , new ItemStack( Items.STICK ) );
}
}

View file

@ -0,0 +1,39 @@
package mmm.tech.tools;
import mmm.utils.I_URecipeRegistrar;
import mmm.utils.URegistry;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraftforge.fml.common.registry.GameRegistry;
public class TTSword
extends ItemSword
implements I_URecipeRegistrar
{
protected final ToolMaterial material;
public TTSword( final ToolMaterial material )
{
super( material );
this.material = material;
URegistry.setIdentifiers( this , "tech" , "tools" , "sword" , material.toString( ).toLowerCase( ) );
}
@Override
public void registerRecipes( )
{
GameRegistry.addShapedRecipe( new ItemStack( this ) , //
"I" , //
"I" , //
"S" , //
'I' , this.material.getRepairItemStack( ) , //
'S' , new ItemStack( Items.STICK ) );
}
}

View file

@ -0,0 +1,36 @@
package mmm.tech.tools;
import mmm.materials.Materials;
import mmm.utils.URegistry;
import net.minecraft.item.Item.ToolMaterial;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.EnumHelper;
public class Tools
{
public static final ToolMaterial TM_COPPER;
public static final TTSword SWORD_COPPER;
public static final TTShovel SPADE_COPPER;
public static final TTAxe AXE_COPPER;
public static final TTPickaxe PICKAXE_COPPER;
static {
TM_COPPER = EnumHelper.addToolMaterial( "COPPER" , 2 , 192 , 5.0f , 1.5f , 18 )//
.setRepairItem( new ItemStack( Materials.COPPER.INGOT ) );
URegistry.addItem( SWORD_COPPER = new TTSword( Tools.TM_COPPER ) );
URegistry.addItem( SPADE_COPPER = new TTShovel( Tools.TM_COPPER ) );
URegistry.addItem( AXE_COPPER = new TTAxe( Tools.TM_COPPER , 7f , -3f ) );
URegistry.addItem( PICKAXE_COPPER = new TTPickaxe( Tools.TM_COPPER ) );
}
public static void preInit( )
{
// EMPTY
}
}

View file

@ -32,3 +32,8 @@ tile.mmm.materials.ore.malachite.name=Malachite Ore
item.mmm.materials.stone.cuprite.name=Cuprite item.mmm.materials.stone.cuprite.name=Cuprite
tile.mmm.materials.ore.cuprite.name=Cuprite Ore tile.mmm.materials.ore.cuprite.name=Cuprite Ore
item.mmm.tech.tools.shovel.copper.name=Copper Shovel
item.mmm.tech.tools.axe.copper.name=Copper Axe
item.mmm.tech.tools.pickaxe.copper.name=Copper Pickaxe
item.mmm.tech.tools.sword.copper.name=Copper Sword

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "mmm:items/tech/tools/axe/copper"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "mmm:items/tech/tools/pickaxe/copper"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "mmm:items/tech/tools/shovel/copper"
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "mmm:items/tech/tools/sword/copper"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 171 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 181 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 154 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 B