From 2c40f5d0a25b3850ad2b1fa39abf9f87c01ed76e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Thu, 30 Jun 2016 14:08:58 +0200 Subject: [PATCH] Sphalerite + zinc --- TODO.txt | 7 ++-- src/java/mmm/materials/Materials.java | 24 +++++++++--- src/java/mmm/materials/ore/MOSphalerite.java | 36 ++++++++++++++++++ .../mmm/blockstates/materials/block/zinc.json | 5 +++ .../blockstates/materials/ore/sphalerite.json | 5 +++ src/resources/assets/mmm/lang/en_US.lang | 12 ++++-- .../models/block/materials/block/zinc.json | 6 +++ .../block/materials/ore/sphalerite.json | 6 +++ .../mmm/models/item/materials/block/zinc.json | 3 ++ .../mmm/models/item/materials/ingot/zinc.json | 6 +++ .../models/item/materials/nugget/zinc.json | 6 +++ .../models/item/materials/ore/sphalerite.json | 3 ++ .../item/materials/stone/sphalerite.json | 6 +++ .../textures/blocks/materials/block/zinc.png | Bin 0 -> 391 bytes .../blocks/materials/ore/sphalerite.png | Bin 0 -> 363 bytes .../textures/items/materials/ingots/zinc.png | Bin 0 -> 253 bytes .../textures/items/materials/nuggets/zinc.png | Bin 0 -> 194 bytes .../items/materials/stone/sphalerite.png | Bin 0 -> 546 bytes 18 files changed, 113 insertions(+), 12 deletions(-) create mode 100644 src/java/mmm/materials/ore/MOSphalerite.java create mode 100644 src/resources/assets/mmm/blockstates/materials/block/zinc.json create mode 100644 src/resources/assets/mmm/blockstates/materials/ore/sphalerite.json create mode 100644 src/resources/assets/mmm/models/block/materials/block/zinc.json create mode 100644 src/resources/assets/mmm/models/block/materials/ore/sphalerite.json create mode 100644 src/resources/assets/mmm/models/item/materials/block/zinc.json create mode 100644 src/resources/assets/mmm/models/item/materials/ingot/zinc.json create mode 100644 src/resources/assets/mmm/models/item/materials/nugget/zinc.json create mode 100644 src/resources/assets/mmm/models/item/materials/ore/sphalerite.json create mode 100644 src/resources/assets/mmm/models/item/materials/stone/sphalerite.json create mode 100644 src/resources/assets/mmm/textures/blocks/materials/block/zinc.png create mode 100644 src/resources/assets/mmm/textures/blocks/materials/ore/sphalerite.png create mode 100644 src/resources/assets/mmm/textures/items/materials/ingots/zinc.png create mode 100644 src/resources/assets/mmm/textures/items/materials/nuggets/zinc.png create mode 100644 src/resources/assets/mmm/textures/items/materials/stone/sphalerite.png diff --git a/TODO.txt b/TODO.txt index d0a7db1..800255e 100644 --- a/TODO.txt +++ b/TODO.txt @@ -44,10 +44,10 @@ materials.rock No Slate materials.rock No Chalk ------------------------------------------------------------------------------------------------------- materials.ore No Rock salt -materials.ore No Zinc (sphalerite) materials.ore No Aluminium (bauxite) materials.ore No Silver (native, horn silver) materials.ore No Lead (galena) +materials.ore No Cinnabar ------------------------------------------------------------------------------------------------------- tech.base No Alloy furnace -> fix item pickup in creative mode @@ -65,5 +65,6 @@ world ??? Limestone hills / mountains ??? Yes Improved pistons ??? ??? Insulated redstone wires ??? ??? Electrical-like power -??? ??? Atlases -??? ??? "Luggage" (chests with persistent contents) \ No newline at end of file +??? ??? Atlases +??? ??? "Luggage" (chests with persistent contents) +??? ??? Blackboard \ No newline at end of file diff --git a/src/java/mmm/materials/Materials.java b/src/java/mmm/materials/Materials.java index 4923575..93255fe 100644 --- a/src/java/mmm/materials/Materials.java +++ b/src/java/mmm/materials/Materials.java @@ -5,6 +5,7 @@ import mmm.materials.ore.MOCassiterite; import mmm.materials.ore.MOCopper; import mmm.materials.ore.MOCuprite; import mmm.materials.ore.MOMalachite; +import mmm.materials.ore.MOSphalerite; import mmm.materials.rock.MLimestone; import mmm.utils.I_URecipeRegistrar; import mmm.utils.URegistry; @@ -25,21 +26,25 @@ public class Materials public static final MMetal IRON; public static final MMetal COPPER; public static final MMetal TIN; + public static final MMetal ZINC; + public static final MMetal BRONZE; public static final MMetal STEEL; // public static final MMetal RED_COPPER; public static final Item ITEM_SLAG; + public static final Item ITEM_COKE; + public static final Item ITEM_PIG_IRON_INGOT; public static final Item ITEM_MALACHITE; public static final Item ITEM_CUPRITE; - public static final Item ITEM_COKE; public static final Item ITEM_CASSITERITE; - public static final Item ITEM_PIG_IRON_INGOT; + public static final Item ITEM_SPHALERITE; public static final MOre ORE_COPPER; public static final MOre ORE_MALACHITE; public static final MOre ORE_CUPRITE; public static final MOre ORE_CASSITERITE; + public static final MOre ORE_SPHALERITE; static { // Rocks @@ -50,9 +55,12 @@ public class Materials IRON = new MMetal( Blocks.IRON_BLOCK , Items.IRON_INGOT , // new MMetalItem( E_MMetalItemType.NUGGET , "iron" ) ); - // Custom metals + // Custom metals - pure COPPER = new MMetal( "copper" , 0.4f , 4f , 1 , MapColor.DIRT ); TIN = new MMetal( "tin" , 0.6f , 1f , 0 , MapColor.GRAY ); + ZINC = new MMetal( "zinc" , 0.4f , 4f , 1 , MapColor.GRAY ); + + // Custom metals - alloys BRONZE = new MMetal( "bronze" , 0f , 5f , 1 , MapColor.BROWN ); STEEL = new MMetal( "steel" , 0f , 7f , 2 , MapColor.LIGHT_BLUE ); STEEL.BLOCK.setResistance( 12f ); @@ -60,18 +68,22 @@ public class Materials // Items that do not correspond to metals or ores ITEM_SLAG = Materials.makeItem( "slag" ); - ITEM_MALACHITE = Materials.makeItem( "malachite" ); - ITEM_CUPRITE = Materials.makeItem( "cuprite" ); ITEM_COKE = Materials.makeFuel( "coke" , 9600 ); - ITEM_CASSITERITE = Materials.makeItem( "cassiterite" ); ITEM_PIG_IRON_INGOT = new MMetalItem( E_MMetalItemType.INGOT , "pig_iron" ); URegistry.addItem( Materials.ITEM_PIG_IRON_INGOT ); + // Ore drops + ITEM_MALACHITE = Materials.makeItem( "malachite" ); + ITEM_CUPRITE = Materials.makeItem( "cuprite" ); + ITEM_CASSITERITE = Materials.makeItem( "cassiterite" ); + ITEM_SPHALERITE = Materials.makeItem( "sphalerite" ); + // Actual ores ORE_COPPER = new MOCopper( ); ORE_MALACHITE = new MOMalachite( ); ORE_CUPRITE = new MOCuprite( ); ORE_CASSITERITE = new MOCassiterite( ); + ORE_SPHALERITE = new MOSphalerite( ); // Other recipes URegistry.addRecipeRegistrar( new Materials( ) ); diff --git a/src/java/mmm/materials/ore/MOSphalerite.java b/src/java/mmm/materials/ore/MOSphalerite.java new file mode 100644 index 0000000..44b8fd6 --- /dev/null +++ b/src/java/mmm/materials/ore/MOSphalerite.java @@ -0,0 +1,36 @@ +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; + + + +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< WOreGenerationCondition > conditions ) + { + conditions.add( new WOreGenerationCondition( WLocation.inOverworld( ) , + new WOreGenerationParameters( this.getDefaultState( ) , 15 , 15 ) ) ); + } + +} diff --git a/src/resources/assets/mmm/blockstates/materials/block/zinc.json b/src/resources/assets/mmm/blockstates/materials/block/zinc.json new file mode 100644 index 0000000..1cbda87 --- /dev/null +++ b/src/resources/assets/mmm/blockstates/materials/block/zinc.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "mmm:materials/block/zinc" } + } +} diff --git a/src/resources/assets/mmm/blockstates/materials/ore/sphalerite.json b/src/resources/assets/mmm/blockstates/materials/ore/sphalerite.json new file mode 100644 index 0000000..1cda566 --- /dev/null +++ b/src/resources/assets/mmm/blockstates/materials/ore/sphalerite.json @@ -0,0 +1,5 @@ +{ + "variants": { + "normal": { "model": "mmm:materials/ore/sphalerite" } + } +} diff --git a/src/resources/assets/mmm/lang/en_US.lang b/src/resources/assets/mmm/lang/en_US.lang index b9a4fee..0bfe863 100644 --- a/src/resources/assets/mmm/lang/en_US.lang +++ b/src/resources/assets/mmm/lang/en_US.lang @@ -20,14 +20,14 @@ item.mmm.materials.nugget.copper.name=Copper Nugget tile.mmm.materials.block.copper.name=Copper Block tile.mmm.materials.ore.copper.name=Native Copper item.mmm.materials.stone.malachite.name=Malachite -tile.mmm.materials.ore.malachite.name=Malachite Ore +tile.mmm.materials.ore.malachite.name=Malachite item.mmm.materials.stone.cuprite.name=Cuprite -tile.mmm.materials.ore.cuprite.name=Cuprite Ore +tile.mmm.materials.ore.cuprite.name=Cuprite item.mmm.materials.ingot.tin.name=Tin Ingot item.mmm.materials.nugget.tin.name=Tin Nugget tile.mmm.materials.block.tin.name=Tin Block -tile.mmm.materials.ore.cassiterite.name=Cassiterite Ore +tile.mmm.materials.ore.cassiterite.name=Cassiterite item.mmm.materials.stone.cassiterite.name=Cassiterite item.mmm.materials.ingot.bronze.name=Bronze Ingot @@ -38,6 +38,12 @@ item.mmm.materials.ingot.steel.name=Steel Ingot item.mmm.materials.nugget.steel.name=Steel Nugget tile.mmm.materials.block.steel.name=Steel Block +tile.mmm.materials.ore.sphalerite.name=Sphalerite +item.mmm.materials.stone.sphalerite.name=Sphalerite +item.mmm.materials.ingot.zinc.name=Zinc Ingot +item.mmm.materials.nugget.zinc.name=Zinc Nugget +tile.mmm.materials.block.zinc.name=Zinc Block + tile.mmm.tech.base.alloy_furnace.inactive.name=Alloy Furnace container.mmm.alloy_furnace.contents=Furnace Contents diff --git a/src/resources/assets/mmm/models/block/materials/block/zinc.json b/src/resources/assets/mmm/models/block/materials/block/zinc.json new file mode 100644 index 0000000..8c7b455 --- /dev/null +++ b/src/resources/assets/mmm/models/block/materials/block/zinc.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "mmm:blocks/materials/block/zinc" + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/models/block/materials/ore/sphalerite.json b/src/resources/assets/mmm/models/block/materials/ore/sphalerite.json new file mode 100644 index 0000000..17e0934 --- /dev/null +++ b/src/resources/assets/mmm/models/block/materials/ore/sphalerite.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:block/cube_all", + "textures": { + "all": "mmm:blocks/materials/ore/sphalerite" + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/models/item/materials/block/zinc.json b/src/resources/assets/mmm/models/item/materials/block/zinc.json new file mode 100644 index 0000000..4b748e1 --- /dev/null +++ b/src/resources/assets/mmm/models/item/materials/block/zinc.json @@ -0,0 +1,3 @@ +{ + "parent": "mmm:block/materials/block/zinc" +} \ No newline at end of file diff --git a/src/resources/assets/mmm/models/item/materials/ingot/zinc.json b/src/resources/assets/mmm/models/item/materials/ingot/zinc.json new file mode 100644 index 0000000..a86e380 --- /dev/null +++ b/src/resources/assets/mmm/models/item/materials/ingot/zinc.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "mmm:items/materials/ingots/zinc" + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/models/item/materials/nugget/zinc.json b/src/resources/assets/mmm/models/item/materials/nugget/zinc.json new file mode 100644 index 0000000..5c460bd --- /dev/null +++ b/src/resources/assets/mmm/models/item/materials/nugget/zinc.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "mmm:items/materials/nuggets/zinc" + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/models/item/materials/ore/sphalerite.json b/src/resources/assets/mmm/models/item/materials/ore/sphalerite.json new file mode 100644 index 0000000..b13841f --- /dev/null +++ b/src/resources/assets/mmm/models/item/materials/ore/sphalerite.json @@ -0,0 +1,3 @@ +{ + "parent": "mmm:block/materials/ore/sphalerite" +} \ No newline at end of file diff --git a/src/resources/assets/mmm/models/item/materials/stone/sphalerite.json b/src/resources/assets/mmm/models/item/materials/stone/sphalerite.json new file mode 100644 index 0000000..3d2d5f4 --- /dev/null +++ b/src/resources/assets/mmm/models/item/materials/stone/sphalerite.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "mmm:items/materials/stone/sphalerite" + } +} \ No newline at end of file diff --git a/src/resources/assets/mmm/textures/blocks/materials/block/zinc.png b/src/resources/assets/mmm/textures/blocks/materials/block/zinc.png new file mode 100644 index 0000000000000000000000000000000000000000..8855b922eaab8eb56ebca2f81614f22bcd994e8f GIT binary patch literal 391 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPNn;f?VmmKFkEd~Zg5l>%L!_y5ub z4`jsoxa}PRWG?sy6n-n$y2GVAOFaI;Q(eBRyuO9`yt;Su%!5Q)Lqb(Ao183-{bbW$ zbN{)t4t|rSU0oeo5+Zb41@4B=tm*-s5zW4rnv^M097~>iG3sA7k3GQS84;htbUgIvt3z^J jt!0W#YxXh3A7ECUYbkKwf7NnekTH0=`njxgN@xNA@1L5v literal 0 HcmV?d00001 diff --git a/src/resources/assets/mmm/textures/blocks/materials/ore/sphalerite.png b/src/resources/assets/mmm/textures/blocks/materials/ore/sphalerite.png new file mode 100644 index 0000000000000000000000000000000000000000..fa2788de73ca5e111595cab6fb87971b1db2f668 GIT binary patch literal 363 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPNn;f@>Ud9QHRY0L1o-U3d7N={2y}1qr@YIBFxOV=K zwFoO~p<cZvL3L?4Qqg$Hn@rPMqYUwsQ6BU8`4VF(u{Ru9}ki z@_wyN`|;eV?JQ10sWPk+4>#>&Xi~8^d;HGi{GyaHWdUY=jRh`Eu>$*bK3{nI>+f6{ zMb&7g&MKF_$0?@24&JD>?Go`+mMmV=X778MWm1oK!Z#1cRh!v5o*%t%Cg0}4IY$S_ zmsRpHuN)eZC(itN|99k;dkY$3zdQ`sXSdAR@JFwL^`5feViSdIx{qz%XF&boFyt=akR{ E0C)M22LJ#7 literal 0 HcmV?d00001 diff --git a/src/resources/assets/mmm/textures/items/materials/ingots/zinc.png b/src/resources/assets/mmm/textures/items/materials/ingots/zinc.png new file mode 100644 index 0000000000000000000000000000000000000000..4a27042b45c9725e17c95d40ee81f1d33b4f2f37 GIT binary patch literal 253 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPNn;f@=9Lr^{aG+3^r;B5V#p$aPFLEAG;9;G6P%!3L zzPfc=dw)wbygx-t3tJLN>H-&%%wqIXD!Q*bf}zt zl*-aBkvu(Y(bh7D?AT}qAth_hatmjM>6)7+H59MA$XsLo{%_EuFAf|F6aS8D(O literal 0 HcmV?d00001 diff --git a/src/resources/assets/mmm/textures/items/materials/nuggets/zinc.png b/src/resources/assets/mmm/textures/items/materials/nuggets/zinc.png new file mode 100644 index 0000000000000000000000000000000000000000..7cd9cdaa5a182be644eb95f63b710837643a5e89 GIT binary patch literal 194 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`Y)RhkE)4%caKYZ?lYt_f1s;*b z3=G`DAk4@xYmNj^kiEpy*OmPNn;f@=;d&->KA@1lr;B5V#p&b(308~7ef$2^OQ?Al z*Vq65f4pD*|NXty-|GVdFaB4NX1ILk?%lupmn>;9alXLI!OyRLUNq%qUk-zZapbn( iqYN_?Q?lh885mN}x^16+wDt$kXa-MLKbLh*2~7Yr3qK10 literal 0 HcmV?d00001 diff --git a/src/resources/assets/mmm/textures/items/materials/stone/sphalerite.png b/src/resources/assets/mmm/textures/items/materials/stone/sphalerite.png new file mode 100644 index 0000000000000000000000000000000000000000..6d023871df276b8147471e704109ed6861615ee2 GIT binary patch literal 546 zcmV+-0^R+IP)0u~L_ z%V0fzIOX8pmcQ6*gh60%=fWVgJsw9YTCNbs)+M&5c+YC|Awxdf8nlolVaK-`ya|i1|BFFnv zQeDzD4Y5pgO+&xP#K3P7gGE+Q!`c&$r$-c3f##lACN%e$_7p{=&B|C}uv{fh?d@~07*qoM6N<$f^zlk=>Px# literal 0 HcmV?d00001