Malachite
This commit is contained in:
parent
a868bd4b5b
commit
a03ec70140
11 changed files with 91 additions and 2 deletions
1
TODO.txt
1
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
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
48
src/java/mmm/materials/ore/MOMalachite.java
Normal file
48
src/java/mmm/materials/ore/MOMalachite.java
Normal file
|
@ -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 ) );
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"variants": {
|
||||
"normal": { "model": "mmm:materials/ore/malachite" }
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:block/cube_all",
|
||||
"textures": {
|
||||
"all": "mmm:blocks/materials/ore/malachite"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"parent": "mmm:block/materials/ore/malachite"
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "minecraft:item/generated",
|
||||
"textures": {
|
||||
"layer0": "mmm:items/materials/ore/malachite"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 264 B |
Binary file not shown.
After Width: | Height: | Size: 338 B |
Reference in a new issue