Moving stuff around

This commit is contained in:
Emmanuel BENOîT 2016-07-03 17:56:49 +02:00
parent 033b927dc0
commit 0e3cb6fd1a
4 changed files with 22 additions and 18 deletions

View file

@ -50,8 +50,8 @@ materials.ore No Lead (galena)
materials.ore No Cinnabar
-------------------------------------------------------------------------------------------------------
tech.base No Alloy furnace
-> fix item pickup in creative mode
-> don't drop the item in creative mode unless it's been named
-> fix item pickup in creative mode BF
-> don't drop the item in creative mode unless it's been named BF
tech.base No Coke oven
tech.base No Metal recycler
-------------------------------------------------------------------------------------------------------
@ -59,7 +59,7 @@ tech.tools
-------------------------------------------------------------------------------------------------------
animals ??? Goats
-------------------------------------------------------------------------------------------------------
world ??? Limestone hills / mountains
world ??? Improved system to handle neighbouring biomes BF
-------------------------------------------------------------------------------------------------------
??? ??? Sub-blocks
??? Yes Improved pistons

View file

@ -10,7 +10,6 @@ import mmm.utils.UAccessors;
import mmm.utils.URegistry;
import mmm.utils.USeat;
import mmm.world.World;
import mmm.world.gen.WGOre;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
@ -36,6 +35,6 @@ public abstract class PCommon
public void init( final FMLInitializationEvent event )
{
USeat.register( Mmm.get( ) );
WGOre.init( );
World.init( );
}
}

View file

@ -1,10 +1,17 @@
package mmm.world;
import java.util.ArrayList;
import mmm.utils.I_UOreGenerationRegistrar;
import mmm.utils.URegistry;
import mmm.world.biome.WBLimestoneMountains;
import mmm.world.biome.WBLimestonePlateau;
import mmm.world.gen.WGOre;
import mmm.world.gen.WGOreCondition;
import net.minecraftforge.common.BiomeManager.BiomeType;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.registry.GameRegistry;
@ -64,4 +71,14 @@ public class World
// EMPTY
}
public static void init( )
{
final ArrayList< WGOreCondition > conditions = new ArrayList<>( );
for ( final I_UOreGenerationRegistrar registrar : URegistry.getOreGenerationRegistrars( ) ) {
registrar.addConditions( conditions );
}
GameRegistry.registerWorldGenerator( new WGOre( conditions ) , 0 );
}
}

View file

@ -4,13 +4,10 @@ package mmm.world.gen;
import java.util.ArrayList;
import java.util.Random;
import mmm.utils.I_UOreGenerationRegistrar;
import mmm.utils.URegistry;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkGenerator;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraftforge.fml.common.IWorldGenerator;
import net.minecraftforge.fml.common.registry.GameRegistry;
@ -18,19 +15,10 @@ public class WGOre
implements IWorldGenerator
{
public static void init( )
{
final ArrayList< WGOreCondition > conditions = new ArrayList<>( );
for ( final I_UOreGenerationRegistrar registrar : URegistry.getOreGenerationRegistrars( ) ) {
registrar.addConditions( conditions );
}
GameRegistry.registerWorldGenerator( new WGOre( conditions ) , 0 );
}
private final ArrayList< WGOreCondition > conditions;
private WGOre( final ArrayList< WGOreCondition > conditions )
public WGOre( final ArrayList< WGOreCondition > conditions )
{
this.conditions = conditions;
}