From c6155b176eca971dca00a7d3bc5234fc4cb57d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Wed, 29 Jun 2016 14:15:30 +0200 Subject: [PATCH] Limestone --- TODO.txt | 30 +++++++----- src/java/mmm/materials/Materials.java | 5 ++ src/java/mmm/materials/rock/MLimestone.java | 43 ++++++++++++++++++ .../blockstates/materials/rock/limestone.json | 5 ++ .../block/materials/rock/limestone.json | 6 +++ .../models/item/materials/rock/limestone.json | 3 ++ .../blocks/materials/rock/limestone.png | Bin 0 -> 229 bytes 7 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 src/java/mmm/materials/rock/MLimestone.java create mode 100644 src/resources/assets/mmm/blockstates/materials/rock/limestone.json create mode 100644 src/resources/assets/mmm/models/block/materials/rock/limestone.json create mode 100644 src/resources/assets/mmm/models/item/materials/rock/limestone.json create mode 100644 src/resources/assets/mmm/textures/blocks/materials/rock/limestone.png diff --git a/TODO.txt b/TODO.txt index b016a44..5f2e81b 100644 --- a/TODO.txt +++ b/TODO.txt @@ -6,6 +6,9 @@ deco No Copper pots deco No Copper plates deco No Lanterns deco No Light plates +deco No Limestone... + ...stairs + ...slabs ------------------------------------------------------------------------------------------------------- plants No? Tomatoes plants No? Turnips @@ -40,21 +43,24 @@ materials No Metal from slag -> generate iron nuggets in furnace -> random nuggets in alloy furnace ------------------------------------------------------------------------------------------------------- -materials.ores No Limestone -materials.ores No Rock salt -materials.ores No Tin (cassiterite) -materials.ores No Zinc (sphalerite) -materials.ores No Aluminium (bauxite) -materials.ores No Silver (native, horn silver) -materials.ores No Lead (galena) +materials.rock No Smooth limestone +------------------------------------------------------------------------------------------------------- +materials.ore No Rock salt +materials.ore No Tin (cassiterite) +materials.ore No Zinc (sphalerite) +materials.ore No Aluminium (bauxite) +materials.ore No Silver (native, horn silver) +materials.ore No Lead (galena) ------------------------------------------------------------------------------------------------------- tech.base No Coke oven ------------------------------------------------------------------------------------------------------- -animals ??? Goats +animals ??? Goats ------------------------------------------------------------------------------------------------------- -??? ??? Sub-blocks -??? Yes Improved pistons -??? ??? Insulated redstone wires -??? ??? Electrical-like power +world ??? Limestone hills / mountains +------------------------------------------------------------------------------------------------------- +??? ??? Sub-blocks +??? Yes Improved pistons +??? ??? Insulated redstone wires +??? ??? Electrical-like power ??? ??? Atlases ??? ??? "Luggage" (chests with persistent contents) \ No newline at end of file diff --git a/src/java/mmm/materials/Materials.java b/src/java/mmm/materials/Materials.java index 0f206dc..9f144af 100644 --- a/src/java/mmm/materials/Materials.java +++ b/src/java/mmm/materials/Materials.java @@ -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 , // diff --git a/src/java/mmm/materials/rock/MLimestone.java b/src/java/mmm/materials/rock/MLimestone.java new file mode 100644 index 0000000..d4ea0bc --- /dev/null +++ b/src/java/mmm/materials/rock/MLimestone.java @@ -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 ) ) ); + } + +} diff --git a/src/resources/assets/mmm/blockstates/materials/rock/limestone.json b/src/resources/assets/mmm/blockstates/materials/rock/limestone.json new file mode 100644 index 0000000..523a2fd --- /dev/null +++ b/src/resources/assets/mmm/blockstates/materials/rock/limestone.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "mmm:materials/rock/limestone" } + } +} diff --git a/src/resources/assets/mmm/models/block/materials/rock/limestone.json b/src/resources/assets/mmm/models/block/materials/rock/limestone.json new file mode 100644 index 0000000..02f20c6 --- /dev/null +++ b/src/resources/assets/mmm/models/block/materials/rock/limestone.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "mmm:blocks/materials/rock/limestone" + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/models/item/materials/rock/limestone.json b/src/resources/assets/mmm/models/item/materials/rock/limestone.json new file mode 100644 index 0000000..7e02bea --- /dev/null +++ b/src/resources/assets/mmm/models/item/materials/rock/limestone.json @@ -0,0 +1,3 @@ +{ + "parent": "mmm:block/materials/rock/limestone" +} \ No newline at end of file diff --git a/src/resources/assets/mmm/textures/blocks/materials/rock/limestone.png b/src/resources/assets/mmm/textures/blocks/materials/rock/limestone.png new file mode 100644 index 0000000000000000000000000000000000000000..17e4b0ccb644b09b61f4c7170a41fb97588d56dd GIT binary patch literal 229 zcmV^P)