Removed specific classes for the various ores
This commit is contained in:
parent
b7995fa4a1
commit
570e273004
11 changed files with 62 additions and 330 deletions
|
@ -36,6 +36,13 @@ public class MMetal
|
|||
}
|
||||
|
||||
|
||||
public MMetal setBlockResistance( float resistance )
|
||||
{
|
||||
this.BLOCK.setResistance( resistance );
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
protected MMetal( final float baseSmeltingXP , final Block block , final Item ingot , final Item nugget )
|
||||
{
|
||||
this.SMELTING_XP = baseSmeltingXP;
|
||||
|
|
|
@ -3,15 +3,6 @@ package mmm.materials;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import mmm.materials.ore.MOBauxite;
|
||||
import mmm.materials.ore.MOCassiterite;
|
||||
import mmm.materials.ore.MOCinnabar;
|
||||
import mmm.materials.ore.MOCopper;
|
||||
import mmm.materials.ore.MOCuprite;
|
||||
import mmm.materials.ore.MOGalena;
|
||||
import mmm.materials.ore.MOMalachite;
|
||||
import mmm.materials.ore.MORockSalt;
|
||||
import mmm.materials.ore.MOSphalerite;
|
||||
import mmm.utils.I_UOreGenerationRegistrar;
|
||||
import mmm.utils.I_URecipeRegistrar;
|
||||
import mmm.utils.URegistry;
|
||||
|
@ -27,8 +18,10 @@ import net.minecraft.creativetab.CreativeTabs;
|
|||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.init.Items;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.biome.BiomePlains;
|
||||
import net.minecraft.world.biome.BiomeSwamp;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
|
||||
|
||||
|
@ -88,8 +81,8 @@ public class Materials
|
|||
|
||||
// Custom metals - alloys
|
||||
BRONZE = new MMetal( "bronze" , 0f , 5f , 1 , MapColor.BROWN );
|
||||
STEEL = new MMetal( "steel" , 0f , 7f , 2 , MapColor.LIGHT_BLUE );
|
||||
Materials.STEEL.BLOCK.setResistance( 12f );
|
||||
STEEL = new MMetal( "steel" , 0f , 7f , 2 , MapColor.LIGHT_BLUE ) //
|
||||
.setBlockResistance( 12f );
|
||||
// RED_COPPER = new MMetal( "red_copper" , 0f , 2f , 1 , MapColor.RED );
|
||||
|
||||
// Items that do not correspond to metals or ores
|
||||
|
@ -106,15 +99,30 @@ public class Materials
|
|||
ITEM_ROCK_SALT = Materials.makeItem( "rock_salt" );
|
||||
|
||||
// Actual ores
|
||||
ORE_COPPER = new MOCopper( );
|
||||
ORE_MALACHITE = new MOMalachite( );
|
||||
ORE_CUPRITE = new MOCuprite( );
|
||||
ORE_CASSITERITE = new MOCassiterite( );
|
||||
ORE_SPHALERITE = new MOSphalerite( );
|
||||
ORE_ROCK_SALT = new MORockSalt( );
|
||||
ORE_BAUXITE = new MOBauxite( );
|
||||
ORE_GALENA = new MOGalena( );
|
||||
ORE_CINNABAR = new MOCinnabar( );
|
||||
ORE_COPPER = new MOre( "copper" , 1 ) //
|
||||
.setMetal( Materials.COPPER );
|
||||
ORE_MALACHITE = new MOre( "malachite" , 1 )//
|
||||
.setMetal( Materials.COPPER ) //
|
||||
.setDrops( Materials.ITEM_MALACHITE ) //
|
||||
.setExperience( 1 , 3 );
|
||||
ORE_CUPRITE = new MOre( "cuprite" , 1 ) //
|
||||
.setMetal( Materials.COPPER , 2 ) //
|
||||
.setDrops( Materials.ITEM_CUPRITE ) //
|
||||
.setExperience( 2 , 5 );
|
||||
ORE_CASSITERITE = new MOre( "cassiterite" , 0 )//
|
||||
.setMetal( Materials.TIN , 1 , E_MMetalItemType.NUGGET ) //
|
||||
.setDrops( Materials.ITEM_CASSITERITE , 2 , 5 ) //
|
||||
.setExperience( 2 , 5 );
|
||||
ORE_SPHALERITE = new MOre( "sphalerite" , 1 ) //
|
||||
.setMetal( Materials.ZINC ) //
|
||||
.setDrops( Materials.ITEM_SPHALERITE ) //
|
||||
.setExperience( 1 , 3 );
|
||||
ORE_ROCK_SALT = new MOre( "rock_salt" , 0 ) //
|
||||
.setDrops( Materials.ITEM_ROCK_SALT , 2 , 5 ) //
|
||||
.setExperience( 0 , 1 );
|
||||
ORE_BAUXITE = new MOre( "bauxite" , 1 );
|
||||
ORE_GALENA = new MOre( "galena" , 1 );
|
||||
ORE_CINNABAR = new MOre( "cinnabar" , 1 );
|
||||
|
||||
// Other recipes, ore generation parameters, etc.
|
||||
final Materials materials = new Materials( );
|
||||
|
@ -170,6 +178,10 @@ public class Materials
|
|||
@Override
|
||||
public void registerRecipes( )
|
||||
{
|
||||
// Green dye from malachite
|
||||
GameRegistry.addShapelessRecipe( new ItemStack( Items.DYE , 1 , 2 ) ,
|
||||
new ItemStack( Materials.ITEM_MALACHITE ) );
|
||||
|
||||
// Bronze
|
||||
MAlloyRecipe.build( ).setName( "materials/bronze" ).setBurnTime( 400 ) //
|
||||
.addInput( Materials.COPPER.INGOT ) //
|
||||
|
@ -229,6 +241,29 @@ public class Materials
|
|||
new WLocationInBiome<>( BiomeSwamp.class ) , //
|
||||
new WGOreParameters( Materials.ROCK_SLATE , 20 , 60 ) ) );
|
||||
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) , //
|
||||
new WGOreParameters( Materials.ORE_COPPER , 20 , 9 , 0 , 128 ) ) );
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) , //
|
||||
new WGOreParameters( Materials.ORE_COPPER , 10 , 17 , 40 , 60 ) ) );
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) , //
|
||||
new WGOreParameters( Materials.ORE_MALACHITE , 5 , 9 , 80 , 255 ) ) );
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) , //
|
||||
new WGOreParameters( Materials.ORE_CUPRITE , 10 , 9 , 0 , 60 ) ) );
|
||||
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) ,
|
||||
new WGOreParameters( Materials.ORE_CASSITERITE , 10 , 9 , 45 , 80 ) ) );
|
||||
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) , //
|
||||
new WGOreParameters( Materials.ORE_SPHALERITE , 15 , 15 ) ) );
|
||||
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) , //
|
||||
new WGOreParameters( Materials.ORE_ROCK_SALT , 5 , 30 , 45 , 255 ) ) );
|
||||
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) , //
|
||||
new WGOreParameters( Materials.ORE_GALENA , 10 , 9 ) ) );
|
||||
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) , //
|
||||
new WGOreParameters( Materials.ORE_CINNABAR , 1 , 20 , 0 , 50 ) ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
package mmm.materials.ore;
|
||||
|
||||
|
||||
import mmm.materials.MOre;
|
||||
|
||||
|
||||
|
||||
public class MOBauxite
|
||||
extends MOre
|
||||
{
|
||||
|
||||
public MOBauxite( )
|
||||
{
|
||||
super( "bauxite" , 1 );
|
||||
}
|
||||
|
||||
}
|
|
@ -1,37 +0,0 @@
|
|||
package mmm.materials.ore;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mmm.materials.E_MMetalItemType;
|
||||
import mmm.materials.MOre;
|
||||
import mmm.materials.Materials;
|
||||
import mmm.utils.I_UOreGenerationRegistrar;
|
||||
import mmm.world.WLocation;
|
||||
import mmm.world.gen.WGOreCondition;
|
||||
import mmm.world.gen.WGOreParameters;
|
||||
|
||||
|
||||
|
||||
public class MOCassiterite
|
||||
extends MOre
|
||||
implements I_UOreGenerationRegistrar
|
||||
{
|
||||
|
||||
public MOCassiterite( )
|
||||
{
|
||||
super( "cassiterite" , 0 );
|
||||
this.setMetal( Materials.TIN , 1 , E_MMetalItemType.NUGGET );
|
||||
this.setDrops( Materials.ITEM_CASSITERITE , 2 , 5 );
|
||||
this.setExperience( 2 , 5 );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addConditions( final List< WGOreCondition > conditions )
|
||||
{
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) ,
|
||||
new WGOreParameters( this.getDefaultState( ) , 10 , 9 , 45 , 80 ) ) );
|
||||
}
|
||||
|
||||
}
|
|
@ -1,33 +0,0 @@
|
|||
package mmm.materials.ore;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mmm.materials.I_MRock;
|
||||
import mmm.materials.MOre;
|
||||
import mmm.utils.I_UOreGenerationRegistrar;
|
||||
import mmm.world.WLocation;
|
||||
import mmm.world.gen.WGOreCondition;
|
||||
import mmm.world.gen.WGOreParameters;
|
||||
|
||||
|
||||
|
||||
public class MOCinnabar
|
||||
extends MOre
|
||||
implements I_UOreGenerationRegistrar , I_MRock
|
||||
{
|
||||
|
||||
public MOCinnabar( )
|
||||
{
|
||||
super( "cinnabar" , 1 );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addConditions( final List< WGOreCondition > conditions )
|
||||
{
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) ,
|
||||
new WGOreParameters( this.getDefaultState( ) , 1 , 20 , 0 , 50 ) ) );
|
||||
}
|
||||
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
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.gen.WGOreCondition;
|
||||
import mmm.world.gen.WGOreParameters;
|
||||
|
||||
|
||||
|
||||
public class MOCopper
|
||||
extends MOre
|
||||
implements I_UOreGenerationRegistrar
|
||||
{
|
||||
|
||||
public MOCopper( )
|
||||
{
|
||||
super( "copper" , 1 );
|
||||
this.setMetal( Materials.COPPER );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addConditions( final List< WGOreCondition > conditions )
|
||||
{
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) ,
|
||||
new WGOreParameters( this.getDefaultState( ) , 20 , 9 , 0 , 128 ) ) );
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) ,
|
||||
new WGOreParameters( this.getDefaultState( ) , 10 , 17 , 40 , 60 ) ) );
|
||||
}
|
||||
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
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.gen.WGOreCondition;
|
||||
import mmm.world.gen.WGOreParameters;
|
||||
|
||||
|
||||
|
||||
public class MOCuprite
|
||||
extends MOre
|
||||
implements I_UOreGenerationRegistrar
|
||||
{
|
||||
|
||||
public MOCuprite( )
|
||||
{
|
||||
super( "cuprite" , 1 );
|
||||
this.setMetal( Materials.COPPER , 2 );
|
||||
this.setDrops( Materials.ITEM_CUPRITE );
|
||||
this.setExperience( 2 , 5 );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addConditions( final List< WGOreCondition > conditions )
|
||||
{
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) ,
|
||||
new WGOreParameters( this.getDefaultState( ) , 10 , 9 , 0 , 60 ) ) );
|
||||
}
|
||||
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
package mmm.materials.ore;
|
||||
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import mmm.materials.MOre;
|
||||
import mmm.utils.I_UOreGenerationRegistrar;
|
||||
import mmm.world.WLocation;
|
||||
import mmm.world.gen.WGOreCondition;
|
||||
import mmm.world.gen.WGOreParameters;
|
||||
|
||||
|
||||
|
||||
public class MOGalena
|
||||
extends MOre
|
||||
implements I_UOreGenerationRegistrar
|
||||
{
|
||||
|
||||
public MOGalena( )
|
||||
{
|
||||
super( "galena" , 1 );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addConditions( final List< WGOreCondition > conditions )
|
||||
{
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) ,
|
||||
new WGOreParameters( this.getDefaultState( ) , 10 , 9 ) ) );
|
||||
}
|
||||
|
||||
}
|
|
@ -1,48 +0,0 @@
|
|||
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.gen.WGOreCondition;
|
||||
import mmm.world.gen.WGOreParameters;
|
||||
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.ITEM_MALACHITE );
|
||||
this.setExperience( 1 , 3 );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addConditions( final List< WGOreCondition > conditions )
|
||||
{
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) ,
|
||||
new WGOreParameters( this.getDefaultState( ) , 5 , 9 , 80 , 255 ) ) );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void registerRecipes( )
|
||||
{
|
||||
super.registerRecipes( );
|
||||
GameRegistry.addShapelessRecipe( new ItemStack( Items.DYE , 1 , 2 ) ,
|
||||
new ItemStack( Materials.ITEM_MALACHITE ) );
|
||||
}
|
||||
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
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.gen.WGOreCondition;
|
||||
import mmm.world.gen.WGOreParameters;
|
||||
|
||||
|
||||
|
||||
public class MORockSalt
|
||||
extends MOre
|
||||
implements I_UOreGenerationRegistrar
|
||||
{
|
||||
|
||||
public MORockSalt( )
|
||||
{
|
||||
super( "rock_salt" , 0 );
|
||||
this.setDrops( Materials.ITEM_ROCK_SALT , 2 , 5 );
|
||||
this.setExperience( 0 , 1 );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addConditions( final List< WGOreCondition > conditions )
|
||||
{
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) ,
|
||||
new WGOreParameters( this.getDefaultState( ) , 5 , 30 , 45 , 255 ) ) );
|
||||
}
|
||||
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
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.gen.WGOreCondition;
|
||||
import mmm.world.gen.WGOreParameters;
|
||||
|
||||
|
||||
|
||||
public class MOSphalerite
|
||||
extends MOre
|
||||
implements I_UOreGenerationRegistrar
|
||||
{
|
||||
|
||||
public MOSphalerite( )
|
||||
{
|
||||
super( "sphalerite" , 1 );
|
||||
this.setMetal( Materials.ZINC );
|
||||
this.setDrops( Materials.ITEM_SPHALERITE );
|
||||
this.setExperience( 1 , 3 );
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addConditions( final List< WGOreCondition > conditions )
|
||||
{
|
||||
conditions.add( new WGOreCondition( WLocation.inOverworld( ) ,
|
||||
new WGOreParameters( this.getDefaultState( ) , 15 , 15 ) ) );
|
||||
}
|
||||
|
||||
}
|
Reference in a new issue