Limestone

This commit is contained in:
Emmanuel BENOîT 2016-06-29 14:15:30 +02:00
parent 0fe1021ba2
commit c6155b176e
7 changed files with 80 additions and 12 deletions
src
java/mmm/materials
resources/assets/mmm
blockstates/materials/rock
models
block/materials/rock
item/materials/rock
textures/blocks/materials/rock

View file

@ -4,6 +4,7 @@ package mmm.materials;
import mmm.materials.ore.MOCopper;
import mmm.materials.ore.MOCuprite;
import mmm.materials.ore.MOMalachite;
import mmm.materials.rock.MLimestone;
import mmm.utils.I_URecipeRegistrar;
import mmm.utils.URegistry;
import net.minecraft.block.material.MapColor;
@ -17,6 +18,7 @@ import net.minecraft.item.Item;
public class Materials
implements I_URecipeRegistrar
{
public static final MLimestone ROCK_LIMESTONE;
public static final MMetal GOLD;
public static final MMetal IRON;
@ -33,6 +35,9 @@ public class Materials
public static final MOre ORE_CUPRITE;
static {
// Rocks
URegistry.addBlock( ROCK_LIMESTONE = new MLimestone( ) );
// Vanilla metals
GOLD = new MMetal( Blocks.GOLD_BLOCK , Items.GOLD_INGOT , Items.GOLD_NUGGET );
IRON = new MMetal( Blocks.IRON_BLOCK , Items.IRON_INGOT , //

View file

@ -0,0 +1,43 @@
package mmm.materials.rock;
import java.util.List;
import mmm.utils.I_UOreGenerationRegistrar;
import mmm.utils.URegistry;
import mmm.world.WLocation;
import mmm.world.WOreGenerationCondition;
import mmm.world.WOreGenerationParameters;
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;
public class MLimestone
extends Block
implements I_UOreGenerationRegistrar
{
public MLimestone( )
{
super( Material.ROCK , MapColor.SNOW );
this.setCreativeTab( CreativeTabs.BUILDING_BLOCKS );
this.setHardness( 1f );
this.setResistance( 7.5f );
this.setSoundType( SoundType.STONE );
this.setHarvestLevel( "pickaxe" , 0 );
URegistry.setIdentifiers( this , "materials" , "rock" , "limestone" );
}
@Override
public void addConditions( final List< WOreGenerationCondition > conditions )
{
conditions.add( new WOreGenerationCondition( WLocation.inOverworld( ) ,
new WOreGenerationParameters( this.getDefaultState( ) , 15 , 40 ) ) );
}
}

View file

@ -0,0 +1,5 @@
{
"variants": {
"normal": { "model": "mmm:materials/rock/limestone" }
}
}

View file

@ -0,0 +1,6 @@
{
"parent": "minecraft:block/cube_all",
"textures": {
"all": "mmm:blocks/materials/rock/limestone"
}
}

View file

@ -0,0 +1,3 @@
{
"parent": "mmm:block/materials/rock/limestone"
}

Binary file not shown.

After

(image error) Size: 229 B