Updated for 1.7.2
This commit is contained in:
parent
cc178e1a3b
commit
29228e18fe
105 changed files with 1939 additions and 2690 deletions
|
|
@ -6,10 +6,10 @@ import cpw.mods.fml.common.registry.GameRegistry;
|
|||
|
||||
public class GeneratorManager {
|
||||
public static void initialize() {
|
||||
GameRegistry.registerWorldGenerator(new WorldGenOres());
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase.blockID, 7, Rarity.BLOODSTONE + 1));
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase.blockID, 8, Rarity.BLACKSOULSTONE + 1));
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase.blockID, 9, Rarity.BLUESOULSTONE + 1));
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase.blockID, 10, Rarity.REDSOULSTONE));
|
||||
GameRegistry.registerWorldGenerator(new WorldGenOres(), 100);
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 7, Rarity.BLOODSTONE + 1), 100);
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 8, Rarity.BLACKSOULSTONE + 1), 100);
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 9, Rarity.BLUESOULSTONE + 1), 100);
|
||||
GameRegistry.registerWorldGenerator(new NetherGenMineable(BlockHandler.BlockBase, 10, Rarity.REDSOULSTONE), 100);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,21 +3,22 @@ package mysticores.worldgen;
|
|||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
||||
public class NetherGenHelper extends WorldGenerator {
|
||||
private int minableBlockId;
|
||||
private Block minableBlockId;
|
||||
private int minableBlockMeta = 0;
|
||||
private int numberOfBlocks;
|
||||
|
||||
public NetherGenHelper(int par1, int par2) {
|
||||
public NetherGenHelper(Block par1, int par2) {
|
||||
this.minableBlockId = par1;
|
||||
this.numberOfBlocks = par2;
|
||||
}
|
||||
|
||||
public NetherGenHelper(int id, int meta, int number) {
|
||||
public NetherGenHelper(Block id, int meta, int number) {
|
||||
this(id, number);
|
||||
minableBlockMeta = meta;
|
||||
}
|
||||
|
|
@ -52,8 +53,8 @@ public class NetherGenHelper extends WorldGenerator {
|
|||
if (var39 * var39 + var42 * var42 < 1.0D) {
|
||||
for (int var44 = var34; var44 <= var37; ++var44) {
|
||||
double var45 = (var44 + 0.5D - var24) / (var28 / 2.0D);
|
||||
int blocktoreplace = par1World.getBlockId(var38, var41, var44);
|
||||
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && blocktoreplace == Block.netherrack.blockID) {
|
||||
Block blocktoreplace = par1World.getBlock(var38, var41, var44);
|
||||
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && blocktoreplace == Blocks.netherrack) {
|
||||
par1World.setBlock(var38, var41, var44, this.minableBlockId, minableBlockMeta, 3);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package mysticores.worldgen;
|
|||
|
||||
import java.util.Random;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraft.world.gen.feature.WorldGenerator;
|
||||
|
|
@ -10,11 +11,11 @@ import cpw.mods.fml.common.IWorldGenerator;
|
|||
public class NetherGenMineable implements IWorldGenerator {
|
||||
private WorldGenerator helper;
|
||||
|
||||
public NetherGenMineable(int blockId, int numBlocks) {
|
||||
public NetherGenMineable(Block blockId, int numBlocks) {
|
||||
helper = new NetherGenHelper(blockId, numBlocks);
|
||||
}
|
||||
|
||||
public NetherGenMineable(int blockId, int meta, int numBlocks) {
|
||||
public NetherGenMineable(Block blockId, int meta, int numBlocks) {
|
||||
helper = new NetherGenHelper(blockId, meta, numBlocks);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue