Slate
This commit is contained in:
parent
c9671c0382
commit
e02bf94c74
8 changed files with 67 additions and 1 deletions
|
@ -8,6 +8,7 @@ import mmm.materials.ore.MOMalachite;
|
||||||
import mmm.materials.ore.MOSphalerite;
|
import mmm.materials.ore.MOSphalerite;
|
||||||
import mmm.materials.rock.MRChalk;
|
import mmm.materials.rock.MRChalk;
|
||||||
import mmm.materials.rock.MRLimestone;
|
import mmm.materials.rock.MRLimestone;
|
||||||
|
import mmm.materials.rock.MRSlate;
|
||||||
import mmm.utils.I_URecipeRegistrar;
|
import mmm.utils.I_URecipeRegistrar;
|
||||||
import mmm.utils.URegistry;
|
import mmm.utils.URegistry;
|
||||||
import net.minecraft.block.material.MapColor;
|
import net.minecraft.block.material.MapColor;
|
||||||
|
@ -23,6 +24,7 @@ public class Materials
|
||||||
{
|
{
|
||||||
public static final MRLimestone ROCK_LIMESTONE;
|
public static final MRLimestone ROCK_LIMESTONE;
|
||||||
public static final MRChalk ROCK_CHALK;
|
public static final MRChalk ROCK_CHALK;
|
||||||
|
public static final MRSlate ROCK_SLATE;
|
||||||
|
|
||||||
public static final MMetal GOLD;
|
public static final MMetal GOLD;
|
||||||
public static final MMetal IRON;
|
public static final MMetal IRON;
|
||||||
|
@ -52,6 +54,7 @@ public class Materials
|
||||||
// Rocks
|
// Rocks
|
||||||
URegistry.addBlock( ROCK_LIMESTONE = new MRLimestone( ) );
|
URegistry.addBlock( ROCK_LIMESTONE = new MRLimestone( ) );
|
||||||
URegistry.addBlock( ROCK_CHALK = new MRChalk( ) );
|
URegistry.addBlock( ROCK_CHALK = new MRChalk( ) );
|
||||||
|
URegistry.addBlock( ROCK_SLATE = new MRSlate( ) );
|
||||||
|
|
||||||
// Vanilla metals
|
// Vanilla metals
|
||||||
GOLD = new MMetal( Blocks.GOLD_BLOCK , Items.GOLD_INGOT , Items.GOLD_NUGGET );
|
GOLD = new MMetal( Blocks.GOLD_BLOCK , Items.GOLD_INGOT , Items.GOLD_NUGGET );
|
||||||
|
|
49
src/java/mmm/materials/rock/MRSlate.java
Normal file
49
src/java/mmm/materials/rock/MRSlate.java
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
package mmm.materials.rock;
|
||||||
|
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import mmm.utils.I_UOreGenerationRegistrar;
|
||||||
|
import mmm.utils.URegistry;
|
||||||
|
import mmm.world.WLocationInBiome;
|
||||||
|
import mmm.world.gen.WGOreCondition;
|
||||||
|
import mmm.world.gen.WGOreParameters;
|
||||||
|
import net.minecraft.block.Block;
|
||||||
|
import net.minecraft.block.SoundType;
|
||||||
|
import net.minecraft.block.material.MapColor;
|
||||||
|
import net.minecraft.block.material.Material;
|
||||||
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
|
import net.minecraft.world.biome.BiomePlains;
|
||||||
|
import net.minecraft.world.biome.BiomeSwamp;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public class MRSlate
|
||||||
|
extends Block
|
||||||
|
implements I_UOreGenerationRegistrar
|
||||||
|
{
|
||||||
|
|
||||||
|
public MRSlate( )
|
||||||
|
{
|
||||||
|
super( Material.ROCK , MapColor.BLACK );
|
||||||
|
this.setCreativeTab( CreativeTabs.BUILDING_BLOCKS );
|
||||||
|
this.setHardness( 1.5f );
|
||||||
|
this.setResistance( 10f );
|
||||||
|
this.setSoundType( SoundType.STONE );
|
||||||
|
this.setHarvestLevel( "pickaxe" , 0 );
|
||||||
|
URegistry.setIdentifiers( this , "materials" , "rock" , "slate" );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void addConditions( final List< WGOreCondition > conditions )
|
||||||
|
{
|
||||||
|
conditions.add( new WGOreCondition( //
|
||||||
|
new WLocationInBiome<>( BiomePlains.class ) ,
|
||||||
|
new WGOreParameters( this.getDefaultState( ) , 15 , 40 ) ) );
|
||||||
|
conditions.add( new WGOreCondition( //
|
||||||
|
new WLocationInBiome<>( BiomeSwamp.class ) ,
|
||||||
|
new WGOreParameters( this.getDefaultState( ) , 20 , 60 ) ) );
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -31,7 +31,6 @@ public class WGOre
|
||||||
public void generate( final Random random , final int chunkX , final int chunkZ , final World world ,
|
public void generate( final Random random , final int chunkX , final int chunkZ , final World world ,
|
||||||
final IChunkGenerator chunkGenerator , final IChunkProvider chunkProvider )
|
final IChunkGenerator chunkGenerator , final IChunkProvider chunkProvider )
|
||||||
{
|
{
|
||||||
System.err.println( "GEN ORES " + chunkX + " / " + chunkZ );
|
|
||||||
final Biome biome = world.getBiomeGenForCoords( new BlockPos( chunkX * 16 , 0 , chunkZ * 16 ) );
|
final Biome biome = world.getBiomeGenForCoords( new BlockPos( chunkX * 16 , 0 , chunkZ * 16 ) );
|
||||||
if ( biome instanceof I_WBiomeWithOres ) {
|
if ( biome instanceof I_WBiomeWithOres ) {
|
||||||
for ( final WGOreParameters parameters : ( (I_WBiomeWithOres) biome ).getBiomeOres( world ) ) {
|
for ( final WGOreParameters parameters : ( (I_WBiomeWithOres) biome ).getBiomeOres( world ) ) {
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"variants": {
|
||||||
|
"normal": { "model": "mmm:materials/rock/slate" }
|
||||||
|
}
|
||||||
|
}
|
|
@ -10,6 +10,7 @@ gui.mmm.tech.base.am.disabled=Deactivated
|
||||||
|
|
||||||
tile.mmm.materials.rock.limestone.name=Limestone
|
tile.mmm.materials.rock.limestone.name=Limestone
|
||||||
tile.mmm.materials.rock.chalk.name=Chalk
|
tile.mmm.materials.rock.chalk.name=Chalk
|
||||||
|
tile.mmm.materials.rock.slate.name=Slate
|
||||||
|
|
||||||
item.mmm.materials.stone.coke.name=Coke
|
item.mmm.materials.stone.coke.name=Coke
|
||||||
item.mmm.materials.stone.slag.name=Slag
|
item.mmm.materials.stone.slag.name=Slag
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"parent": "minecraft:block/cube_all",
|
||||||
|
"textures": {
|
||||||
|
"all": "mmm:blocks/materials/rock/slate"
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"parent": "mmm:block/materials/rock/slate"
|
||||||
|
}
|
Binary file not shown.
After Width: | Height: | Size: 315 B |
Reference in a new issue