From d946f110d0c393cd2708a47b42aadfbe375bf312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Beno=C3=AEt?= Date: Thu, 7 Jul 2016 16:17:23 +0200 Subject: [PATCH] Bauxite - Fixed gen (hopefully) --- src/java/mmm/materials/ore/MOBauxite.java | 17 ----------------- src/java/mmm/world/biome/A_WBLimestone.java | 10 +++++++--- 2 files changed, 7 insertions(+), 20 deletions(-) diff --git a/src/java/mmm/materials/ore/MOBauxite.java b/src/java/mmm/materials/ore/MOBauxite.java index 161a2f9..5c25dc8 100644 --- a/src/java/mmm/materials/ore/MOBauxite.java +++ b/src/java/mmm/materials/ore/MOBauxite.java @@ -1,21 +1,12 @@ 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.block.state.pattern.BlockMatcher; public class MOBauxite extends MOre - implements I_UOreGenerationRegistrar { public MOBauxite( ) @@ -23,12 +14,4 @@ public class MOBauxite super( "bauxite" , 1 ); } - - @Override - public void addConditions( final List< WGOreCondition > conditions ) - { - conditions.add( new WGOreCondition( WLocation.inOverworld( ) , new WGOreParameters( this.getDefaultState( ) , - 10 , 9 , 45 , 80 , BlockMatcher.forBlock( Materials.ROCK_LIMESTONE ) ) ) ); - } - } diff --git a/src/java/mmm/world/biome/A_WBLimestone.java b/src/java/mmm/world/biome/A_WBLimestone.java index 05a92e0..d49f57e 100644 --- a/src/java/mmm/world/biome/A_WBLimestone.java +++ b/src/java/mmm/world/biome/A_WBLimestone.java @@ -3,6 +3,7 @@ package mmm.world.biome; import java.util.Random; +import com.google.common.base.Predicate; import com.google.common.base.Predicates; import mmm.materials.Materials; @@ -10,6 +11,7 @@ import mmm.world.I_WBiomeWithOres; import mmm.world.I_WDefaultPopulateHandler; import mmm.world.gen.WGLimestoneLayer; import mmm.world.gen.WGOreParameters; +import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.pattern.BlockMatcher; import net.minecraft.init.Blocks; import net.minecraft.util.math.BlockPos; @@ -25,7 +27,7 @@ public abstract class A_WBLimestone implements I_WDefaultPopulateHandler , I_WBiomeWithOres { - public A_WBLimestone( BiomeProperties properties ) + public A_WBLimestone( final BiomeProperties properties ) { super( properties ); } @@ -65,11 +67,13 @@ public abstract class A_WBLimestone @Override public WGOreParameters[] getBiomeOres( final World worldIn ) { + final Predicate< IBlockState > stoneOrLimestone = Predicates.or( BlockMatcher.forBlock( Blocks.STONE ) , + BlockMatcher.forBlock( Materials.ROCK_LIMESTONE ) ); return new WGOreParameters[] { new WGOreParameters( Materials.ROCK_CHALK.getDefaultState( ) , 15 , 20 , // worldIn.getSeaLevel( ) - 20 , 255 , // - Predicates.or( BlockMatcher.forBlock( Blocks.STONE ) , - BlockMatcher.forBlock( Materials.ROCK_LIMESTONE ) ) ) + stoneOrLimestone ) , + new WGOreParameters( Materials.ORE_BAUXITE.getDefaultState( ) , 10 , 9 , 45 , 255 , stoneOrLimestone ) }; }