Copper tools
This commit is contained in:
parent
34a807e027
commit
284e7479f3
16 changed files with 214 additions and 2 deletions
3
TODO.txt
3
TODO.txt
|
@ -32,8 +32,7 @@ food No Extra recipes
|
|||
Pizza
|
||||
Various mashes
|
||||
-------------------------------------------------------------------------------------------------------
|
||||
tech.tools ??? Copper tools
|
||||
tech.tools ??? Copper armor
|
||||
tech.tools No Copper armor
|
||||
-------------------------------------------------------------------------------------------------------
|
||||
??? ??? Sub-blocks
|
||||
??? Yes Improved pistons
|
||||
|
|
|
@ -4,6 +4,7 @@ package mmm.proxy;
|
|||
import mmm.Mmm;
|
||||
import mmm.deco.DecorativeBlocks;
|
||||
import mmm.materials.Materials;
|
||||
import mmm.tech.tools.Tools;
|
||||
import mmm.utils.UAccessors;
|
||||
import mmm.utils.URegistry;
|
||||
import mmm.utils.USeat;
|
||||
|
@ -22,6 +23,7 @@ public abstract class PCommon
|
|||
|
||||
DecorativeBlocks.preInit( );
|
||||
Materials.preInit( );
|
||||
Tools.preInit( );
|
||||
|
||||
URegistry.registerRecipes( );
|
||||
}
|
||||
|
|
36
src/java/mmm/tech/tools/TTAxe.java
Normal file
36
src/java/mmm/tech/tools/TTAxe.java
Normal 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 ) );
|
||||
}
|
||||
|
||||
}
|
36
src/java/mmm/tech/tools/TTPickaxe.java
Normal file
36
src/java/mmm/tech/tools/TTPickaxe.java
Normal 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 ) );
|
||||
}
|
||||
|
||||
}
|
35
src/java/mmm/tech/tools/TTShovel.java
Normal file
35
src/java/mmm/tech/tools/TTShovel.java
Normal 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 ) );
|
||||
}
|
||||
|
||||
}
|
39
src/java/mmm/tech/tools/TTSword.java
Normal file
39
src/java/mmm/tech/tools/TTSword.java
Normal 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 ) );
|
||||
}
|
||||
|
||||
}
|
36
src/java/mmm/tech/tools/Tools.java
Normal file
36
src/java/mmm/tech/tools/Tools.java
Normal 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
|
||||
}
|
||||
|
||||
}
|
|
@ -32,3 +32,8 @@ tile.mmm.materials.ore.malachite.name=Malachite Ore
|
|||
|
||||
item.mmm.materials.stone.cuprite.name=Cuprite
|
||||
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
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "mmm:items/tech/tools/axe/copper"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "mmm:items/tech/tools/pickaxe/copper"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "mmm:items/tech/tools/shovel/copper"
|
||||
}
|
||||
}
|
|
@ -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 |
Reference in a new issue