diff --git a/TODO.txt b/TODO.txt index 31909c0..a3397f5 100644 --- a/TODO.txt +++ b/TODO.txt @@ -16,7 +16,6 @@ plants No? Eggplant plants No? Strawberries ------------------------------------------------------------------------------------------------------- ores No Rock salt -ores No Malachite (copper) ores No Cuprite (copper) ------------------------------------------------------------------------------------------------------- animals ??? Goats diff --git a/src/java/mmm/materials/MOre.java b/src/java/mmm/materials/MOre.java index 7520cd6..d827176 100644 --- a/src/java/mmm/materials/MOre.java +++ b/src/java/mmm/materials/MOre.java @@ -181,7 +181,7 @@ public class MOre public void registerRecipes( ) { if ( this.metal != null ) { - ItemStack output = new ItemStack( this.metal.INGOT , 0 , this.genIngots ); + ItemStack output = new ItemStack( this.metal.INGOT , this.genIngots ); float xp = this.metal.SMELTING_XP * this.genIngots; if ( this.dropItems == null ) { GameRegistry.addSmelting( this , output , xp ); diff --git a/src/java/mmm/materials/Materials.java b/src/java/mmm/materials/Materials.java index 117c4ba..29da5fd 100644 --- a/src/java/mmm/materials/Materials.java +++ b/src/java/mmm/materials/Materials.java @@ -2,25 +2,44 @@ package mmm.materials; import mmm.materials.ore.MOCopper; +import mmm.materials.ore.MOMalachite; import mmm.utils.URegistry; +import net.minecraft.creativetab.CreativeTabs; import net.minecraft.init.Items; +import net.minecraft.item.Item; public class Materials { + public static final MMetal GOLD; public static final MMetal IRON; public static final MMetal COPPER; + public static final Item STONE_MALACHITE; + public static final MOre ORE_COPPER; + public static final MOre ORE_MALACHITE; static { GOLD = new MMetal( Items.GOLD_INGOT , Items.GOLD_NUGGET ); IRON = new MMetal( Items.IRON_INGOT , new MMetalItem( E_MMetalItemType.NUGGET , "iron" ) ); COPPER = new MMetal( "copper" , 0.4f ); + URegistry.addItem( STONE_MALACHITE = makeStone( "malachite" ) ); + URegistry.addBlock( ORE_COPPER = new MOCopper( ) ); + URegistry.addBlock( ORE_MALACHITE = new MOMalachite( ) ); + } + + + public static Item makeStone( String name ) + { + Item stone = new Item( ); + URegistry.setIdentifiers( stone , "materials" , "stone" , name ); + stone.setCreativeTab( CreativeTabs.MATERIALS ); + return stone; } diff --git a/src/java/mmm/materials/ore/MOMalachite.java b/src/java/mmm/materials/ore/MOMalachite.java new file mode 100644 index 0000000..9486210 --- /dev/null +++ b/src/java/mmm/materials/ore/MOMalachite.java @@ -0,0 +1,48 @@ +package mmm.materials.ore; + + +import java.util.List; + +import mmm.materials.MOre; +import mmm.materials.Materials; +import mmm.utils.I_UOreGenerationRegistrar; +import mmm.world.WLocation; +import mmm.world.WOreGenerationCondition; +import mmm.world.WOreGenerationParameters; +import net.minecraft.init.Items; +import net.minecraft.item.ItemStack; +import net.minecraftforge.fml.common.registry.GameRegistry; + + + +public class MOMalachite + extends MOre + implements I_UOreGenerationRegistrar +{ + + public MOMalachite( ) + { + super( "malachite" , 1 ); + this.setMetal( Materials.COPPER ); + this.setDrops( Materials.STONE_MALACHITE ); + this.setExperience( 1 , 3 ); + } + + + @Override + public void addConditions( final List< WOreGenerationCondition > conditions ) + { + conditions.add( new WOreGenerationCondition( WLocation.inOverworld( ) , + new WOreGenerationParameters( this.getDefaultState( ) , 5 , 9 , 80 , 255 ) ) ); + } + + + @Override + public void registerRecipes( ) + { + super.registerRecipes( ); + GameRegistry.addShapelessRecipe( new ItemStack( Items.DYE , 1 , 2 ) , + new ItemStack( Materials.STONE_MALACHITE ) ); + } + +} diff --git a/src/resources/assets/mmm/blockstates/materials/ore/malachite.json b/src/resources/assets/mmm/blockstates/materials/ore/malachite.json new file mode 100644 index 0000000..659a5db --- /dev/null +++ b/src/resources/assets/mmm/blockstates/materials/ore/malachite.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "mmm:materials/ore/malachite" } + } +} diff --git a/src/resources/assets/mmm/lang/en_US.lang b/src/resources/assets/mmm/lang/en_US.lang index bc811de..2ef26b8 100644 --- a/src/resources/assets/mmm/lang/en_US.lang +++ b/src/resources/assets/mmm/lang/en_US.lang @@ -26,3 +26,6 @@ item.mmm.materials.nugget.iron.name=Iron Nugget item.mmm.materials.ingot.copper.name=Copper Ingot item.mmm.materials.nugget.copper.name=Copper Nugget tile.mmm.materials.ore.copper.name=Native Copper + +item.mmm.materials.stone.malachite.name=Malachite +tile.mmm.materials.ore.malachite.name=Malachite diff --git a/src/resources/assets/mmm/models/block/materials/ore/malachite.json b/src/resources/assets/mmm/models/block/materials/ore/malachite.json new file mode 100644 index 0000000..e2088bb --- /dev/null +++ b/src/resources/assets/mmm/models/block/materials/ore/malachite.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "mmm:blocks/materials/ore/malachite" + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/models/item/materials/ore/malachite.json b/src/resources/assets/mmm/models/item/materials/ore/malachite.json new file mode 100644 index 0000000..8f0d10f --- /dev/null +++ b/src/resources/assets/mmm/models/item/materials/ore/malachite.json @@ -0,0 +1,3 @@ +{ + "parent": "mmm:block/materials/ore/malachite" +} \ No newline at end of file diff --git a/src/resources/assets/mmm/models/item/materials/stone/malachite.json b/src/resources/assets/mmm/models/item/materials/stone/malachite.json new file mode 100644 index 0000000..4cede72 --- /dev/null +++ b/src/resources/assets/mmm/models/item/materials/stone/malachite.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "mmm:items/materials/ore/malachite" + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/textures/blocks/materials/ore/malachite.png b/src/resources/assets/mmm/textures/blocks/materials/ore/malachite.png new file mode 100644 index 0000000..801b4f7 Binary files /dev/null and b/src/resources/assets/mmm/textures/blocks/materials/ore/malachite.png differ diff --git a/src/resources/assets/mmm/textures/items/materials/ore/malachite.png b/src/resources/assets/mmm/textures/items/materials/ore/malachite.png new file mode 100644 index 0000000..2c8b5fe Binary files /dev/null and b/src/resources/assets/mmm/textures/items/materials/ore/malachite.png differ