This commit is contained in:
Adubbz 2013-04-26 06:40:34 +10:00
commit 02d3fc104b
173 changed files with 925 additions and 207 deletions

View file

@ -114,7 +114,7 @@ public class BiomesOPlenty
public void load(FMLInitializationEvent event) public void load(FMLInitializationEvent event)
{ {
LanguageRegistry.instance().addStringLocalization("itemGroup.tabBiomesOPlenty", "en_US", "Biomes O\' Plenty"); LanguageRegistry.instance().addStringLocalization("itemGroup.tabBiomesOPlenty", "en_US", "Biomes O\' Plenty");
//LanguageRegistry.instance().addStringLocalization("generator.BIOMESOP", "en_US", "Biomes O\' Plenty"); LanguageRegistry.instance().addStringLocalization("generator.BIOMESOP", "en_US", "Biomes O\' Plenty");
// Add helpers for compatibility // Add helpers for compatibility
MinecraftForge.TERRAIN_GEN_BUS.register(new WorldTypeSize()); MinecraftForge.TERRAIN_GEN_BUS.register(new WorldTypeSize());

View file

@ -24,7 +24,7 @@ public class ClientProxy extends CommonProxy {
MinecraftForgeClient.preloadTexture(ARMOR_AMETHYST1_PNG); MinecraftForgeClient.preloadTexture(ARMOR_AMETHYST1_PNG);
MinecraftForgeClient.preloadTexture(ARMOR_AMETHYST2_PNG); MinecraftForgeClient.preloadTexture(ARMOR_AMETHYST2_PNG);
RenderingRegistry.registerEntityRenderingHandler(EntityMudball.class, new RenderSnowball(Items.miscItems.get(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityMudball.class, new RenderSnowball(Items.mudball.get(), 0));
RenderingRegistry.registerBlockHandler(new FoliageRenderer()); RenderingRegistry.registerBlockHandler(new FoliageRenderer());
RenderingRegistry.registerBlockHandler(new PlantsRenderer()); RenderingRegistry.registerBlockHandler(new PlantsRenderer());
@ -35,7 +35,7 @@ public class ClientProxy extends CommonProxy {
{ {
EntityFX entityfx = null; EntityFX entityfx = null;
entityfx = new EntityBreakingFX(mc.theWorld, x, y, z, Items.miscItems.get(), mc.renderEngine); entityfx = new EntityBreakingFX(mc.theWorld, x, y, z, Items.mudball.get(), mc.renderEngine);
mc.effectRenderer.addEffect(entityfx); mc.effectRenderer.addEffect(entityfx);
} }

View file

@ -70,12 +70,13 @@ public class Blocks
public static Optional<? extends Block> petals = Optional.absent(); public static Optional<? extends Block> petals = Optional.absent();
public static Optional<? extends Block> bamboo = Optional.absent(); public static Optional<? extends Block> bamboo = Optional.absent();
public static Optional<? extends Block> amethystBlock = Optional.absent(); // public static Optional<? extends Block> amethystBlock = Optional.absent();
public static Optional<? extends Block> amethystOre = Optional.absent(); public static Optional<? extends Block> amethystOre = Optional.absent();
// public static Optional<? extends Block> bambooThatching = Optional.absent(); // public static Optional<? extends Block> bambooThatching = Optional.absent();
public static Optional<? extends Block> mudBrick = Optional.absent(); public static Optional<? extends Block> mudBrick = Optional.absent();
public static Optional<? extends Block> smolderingGrass = Optional.absent(); // public static Optional<? extends Block> smolderingGrass = Optional.absent();
// public static Optional<? extends Block> quicksand = Optional.absent(); // public static Optional<? extends Block> quicksand = Optional.absent();
// public static Optional<? extends Block> grass = Optional.absent();
public static Optional<? extends Block> promisedPortal = Optional.absent(); public static Optional<? extends Block> promisedPortal = Optional.absent();

View file

@ -33,4 +33,5 @@ public class Items
public static Optional<? extends Item> enderporter = Optional.absent(); public static Optional<? extends Item> enderporter = Optional.absent();
public static Optional<? extends Item> shroomPowder = Optional.absent(); public static Optional<? extends Item> shroomPowder = Optional.absent();
public static Optional<? extends Item> miscItems = Optional.absent(); public static Optional<? extends Item> miscItems = Optional.absent();
public static Optional<? extends Item> mudball = Optional.absent();
} }

View file

@ -332,7 +332,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
this.clayInStoneGen = new WorldGenMinable(Block.blockClay.blockID, 32); this.clayInStoneGen = new WorldGenMinable(Block.blockClay.blockID, 32);
this.quagmireGen = new WorldGenQuagmire(Block.grass.blockID, 48); this.quagmireGen = new WorldGenQuagmire(Block.grass.blockID, 48);
this.canyonGen = new WorldGenCanyon(Blocks.redRock.get().blockID, 48); this.canyonGen = new WorldGenCanyon(Blocks.redRock.get().blockID, 48);
this.smolderingGrassGen = new WorldGenSmolderingGrass(Blocks.smolderingGrass.get().blockID, 32); this.smolderingGrassGen = new WorldGenSmolderingGrass(Blocks.holyGrass.get().blockID, 1, 32);
this.driedDirtInSandGen = new WorldGenDriedDirt(Blocks.driedDirt.get().blockID, 32); this.driedDirtInSandGen = new WorldGenDriedDirt(Blocks.driedDirt.get().blockID, 32);
this.coalGen = new WorldGenMinable(Block.oreCoal.blockID, 16); this.coalGen = new WorldGenMinable(Block.oreCoal.blockID, 16);
this.ironGen = new WorldGenMinable(Block.oreIron.blockID, 8); this.ironGen = new WorldGenMinable(Block.oreIron.blockID, 8);

View file

@ -41,4 +41,9 @@ public class BiomeGenCherryBlossomGrove extends BiomeGenBase
{ {
return 10747818; return 10747818;
} }
public int getBiomeFoliageColor()
{
return 10747818;
}
} }

View file

@ -56,6 +56,11 @@ public class BiomeGenDeadForest extends BiomeGenBase
return 12362085; return 12362085;
} }
public int getBiomeFoliageColor()
{
return 12362085;
}
/** /**
* takes temperature, returns color * takes temperature, returns color
*/ */

View file

@ -60,6 +60,11 @@ public class BiomeGenDeadSwamp extends BiomeGenBase
return 6713420; return 6713420;
} }
public int getBiomeFoliageColor()
{
return 6713420;
}
/** /**
* takes temperature, returns color * takes temperature, returns color
*/ */

View file

@ -76,4 +76,9 @@ public class BiomeGenGrassland extends BiomeGenBase
{ {
return 8379261; return 8379261;
} }
public int getBiomeFoliageColor()
{
return 8379261;
}
} }

View file

@ -63,4 +63,9 @@ public class BiomeGenMeadow extends BiomeGenBase
{ {
return 6533741; return 6533741;
} }
public int getBiomeFoliageColor()
{
return 6533741;
}
} }

View file

@ -67,6 +67,11 @@ public class BiomeGenMoor extends BiomeGenBase
return 6394725; return 6394725;
} }
public int getBiomeFoliageColor()
{
return 6394725;
}
/** /**
* takes temperature, returns color * takes temperature, returns color
*/ */

View file

@ -39,4 +39,9 @@ public class BiomeGenOrchard extends BiomeGenBase
{ {
return 14024557; return 14024557;
} }
public int getBiomeFoliageColor()
{
return 14024557;
}
} }

View file

@ -46,4 +46,9 @@ public class BiomeGenSteppe extends BiomeGenBase
{ {
return 13413215; return 13413215;
} }
public int getBiomeFoliageColor()
{
return 13413215;
}
} }

View file

@ -0,0 +1,148 @@
package biomesoplenty.blocks;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Items;
public class BlockBOPAmethyst extends Block
{
private static final String[] types = new String[] {"amethystore", "amethystblock"};
private Icon[] textures;
public BlockBOPAmethyst(int par1, Material par2Material)
{
super(par1, par2Material);
this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
setStepSound(Block.soundStoneFootstep);
}
@Override
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[types.length];
for (int i = 0; i < types.length; ++i)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:"+types[i]);
}
@Override
public Icon getIcon(int side, int meta)
{
if (meta < 0 || meta >= textures.length)
meta = 0;
return textures[meta];
}
@Override
public int getDamageValue(World world, int x, int y, int z) {
return world.getBlockMetadata(x, y, z);
}
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) {
for (int i = 0; i < types.length; ++i)
list.add(new ItemStack(blockID, 1, i));
}
@Override
public float getBlockHardness(World world, int x, int y, int z)
{
int meta = world.getBlockMetadata(x, y, z);
float hardness = this.blockHardness;
switch (meta)
{
case 0:
hardness = 3.0F;
break;
case 1:
hardness = 5.0F;
break;
}
return hardness;
}
@Override
public float getExplosionResistance(Entity par1Entity, World world, int x, int y, int z, double explosionX, double explosionY, double explosionZ)
{
int meta = world.getBlockMetadata(x, y, z);
float resistance = this.blockResistance;
switch (meta)
{
case 0:
resistance = 5.0F;
break;
case 1:
resistance = 10.0F;
break;
}
return resistance / 5.0F;
}
@Override
public int idDropped(int meta, Random par2Random, int par3)
{
return meta == 0 ? Items.miscItems.get().itemID : this.blockID;
}
@Override
public int damageDropped(int meta)
{
return meta == 0 ? 2 : meta;
}
@Override
public int quantityDropped(int meta, int fortune, Random random)
{
if (meta == 0)
return quantityDroppedWithBonus(fortune, random);
else
return quantityDropped(random);
}
@Override
public int quantityDroppedWithBonus(int bonus, Random par2Random)
{
if (bonus > 0 && this.blockID != this.idDropped(0, par2Random, bonus))
{
int rnd = par2Random.nextInt(bonus + 2) - 1;
if (rnd < 0)
rnd = 0;
return (1 + par2Random.nextInt(2)) * (rnd + 1);
}
else
return (1 + par2Random.nextInt(2));
}
@Override
public void dropBlockAsItemWithChance(World world, int par2, int par3, int par4, int par5, float par6, int par7)
{
super.dropBlockAsItemWithChance(world, par2, par3, par4, par5, par6, par7);
if (this.idDropped(par5, world.rand, par7) != this.blockID)
{
int var8 = MathHelper.getRandomIntegerInRange(world.rand, 1, 4);
this.dropXpOnBlockBreak(world, par2, par3, par4, var8);
}
}
}

View file

@ -45,8 +45,8 @@ public class BlockBOPAppleLeaves extends BlockLeavesBase implements IShearable
for (int i = 0; i < 4; ++i) for (int i = 0; i < 4; ++i)
{ {
textures[0][i] = iconRegister.registerIcon("BiomesOPlenty:appleleaves" + i + "_fancy"); textures[0][i] = iconRegister.registerIcon("BiomesOPlenty:leaves_apple" + i + "_fancy");
textures[1][i] = iconRegister.registerIcon("BiomesOPlenty:appleleaves" + i + "_fast"); textures[1][i] = iconRegister.registerIcon("BiomesOPlenty:leaves_apple" + i + "_fast");
} }
} }
@ -259,6 +259,27 @@ public class BlockBOPAppleLeaves extends BlockLeavesBase implements IShearable
return random.nextInt(20) == 0 ? 1 : 0; return random.nextInt(20) == 0 ? 1 : 0;
} }
public void dropBlockAsItemWithChance(World world, int x, int y, int z, int meta, float chance, int par7)
{
if (world.isRemote)
return;
if (world.rand.nextInt(20) == 0)
{
int var9 = this.idDropped(meta, world.rand, par7);
this.dropBlockAsItem_do(world, x, y, z, new ItemStack(var9, 1, this.damageDropped(meta)));
}
if ((meta & 3) == 3)
this.dropBlockAsItem_do(world, x, y, z, new ItemStack(Item.appleRed, 1, 0));
else if ((meta & 3) == 2 && world.rand.nextInt(2) == 0)
this.dropBlockAsItem_do(world, x, y, z, new ItemStack(Item.appleRed, 1, 0));
else if ((meta & 3) == 1 && world.rand.nextInt(5) == 0)
this.dropBlockAsItem_do(world, x, y, z, new ItemStack(Item.appleRed, 1, 0));
else if ((meta & 3) == 0 && world.rand.nextInt(10) == 0)
this.dropBlockAsItem_do(world, x, y, z, new ItemStack(Item.appleRed, 1, 0));
}
@Override @Override
public boolean isShearable(ItemStack item, World world, int x, int y, int z) public boolean isShearable(ItemStack item, World world, int x, int y, int z)
{ {

View file

@ -44,8 +44,8 @@ public class BlockBOPColorizedLeaves extends BlockLeavesBase implements IShearab
for (int i = 0; i < leaves.length; ++i) for (int i = 0; i < leaves.length; ++i)
{ {
textures[0][i] = iconRegister.registerIcon("BiomesOPlenty:" + leaves[i] + "leaves1"); textures[0][i] = iconRegister.registerIcon("BiomesOPlenty:leaves_" + leaves[i] + "_fancy");
textures[1][i] = iconRegister.registerIcon("BiomesOPlenty:" + leaves[i] + "leaves2"); textures[1][i] = iconRegister.registerIcon("BiomesOPlenty:leaves_" + leaves[i] + "_fast");
} }
} }

View file

@ -41,7 +41,7 @@ public class BlockBOPColorizedSapling extends BlockSapling
textures = new Icon[saplings.length]; textures = new Icon[saplings.length];
for (int i = 0; i < saplings.length; ++i) for (int i = 0; i < saplings.length; ++i)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + saplings[i] + "sapling"); textures[i] = iconRegister.registerIcon("BiomesOPlenty:sapling_" + saplings[i]);
} }
@ -62,6 +62,18 @@ public class BlockBOPColorizedSapling extends BlockSapling
list.add(new ItemStack(blockID, 1, i)); list.add(new ItemStack(blockID, 1, i));
} }
@Override
public void updateTick(World world, int x, int y, int z, Random random)
{
if (world.isRemote)
return;
this.checkFlowerChange(world, x, y, z);
if (world.getBlockLightValue(x, y + 1, z) >= 9 && random.nextInt(7) == 0)
this.growTree(world, x, y, z, random);
}
@Override @Override
public void growTree(World world, int x, int y, int z, Random random) public void growTree(World world, int x, int y, int z, Random random)
{ {

View file

@ -20,7 +20,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class BlockBOPFlower extends BlockFlower public class BlockBOPFlower extends BlockFlower
{ {
private static final String[] plants = new String[] {"tinyflower", "swampflower", "deadbloom", "glowflower", "hydrangea", "orangeflower", "pinkflower", "purpleflower", "violet", "whiteflower", "toadstool", "cactus"}; private static final String[] plants = new String[] {"clover", "swampflower", "deadbloom", "glowflower", "hydrangea", "daisy", "tulip", "wildflower", "violet", "anemone", "toadstool", "cactus"};
private Icon[] textures; private Icon[] textures;
protected BlockBOPFlower(int blockID, Material material) protected BlockBOPFlower(int blockID, Material material)

View file

@ -10,12 +10,14 @@ import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon; import net.minecraft.util.Icon;
import net.minecraft.world.ColorizerFoliage; import net.minecraft.world.ColorizerFoliage;
import net.minecraft.world.ColorizerGrass; import net.minecraft.world.ColorizerGrass;
import net.minecraft.world.IBlockAccess; import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.ForgeHooks;
import net.minecraftforge.common.IShearable; import net.minecraftforge.common.IShearable;
import biomesoplenty.BiomesOPlenty; import biomesoplenty.BiomesOPlenty;
import biomesoplenty.blocks.renderers.FoliageRenderer; import biomesoplenty.blocks.renderers.FoliageRenderer;
@ -69,6 +71,38 @@ public class BlockBOPFoliage extends BlockFlower implements IShearable
list.add(new ItemStack(blockID, 1, i)); list.add(new ItemStack(blockID, 1, i));
} }
@Override
public ArrayList<ItemStack> getBlockDropped(World world, int x, int y, int z, int meta, int fortune)
{
ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
switch (meta)
{
case 1:
case 2:
case 3:
if (world.rand.nextInt(8) != 0)
return ret;
ItemStack item = ForgeHooks.getGrassSeed(world);
if (item != null)
ret.add(item);
break;
case 5:
if (world.rand.nextInt(50) != 0)
return ret;
if (world.rand.nextInt(2) == 0)
ret.add(new ItemStack(Item.carrot,1));
else
ret.add(new ItemStack(Item.potato,1));
break;
}
return ret;
}
@Override @Override
public boolean canPlaceBlockOnSide(World world, int x, int y, int z, int side, ItemStack itemStack) public boolean canPlaceBlockOnSide(World world, int x, int y, int z, int side, ItemStack itemStack)
{ {

View file

@ -1,23 +1,16 @@
package biomesoplenty.blocks; package biomesoplenty.blocks;
import java.util.Random;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material; import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.util.Icon; import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import biomesoplenty.BiomesOPlenty; import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Items;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class BlockBOPGeneric extends Block public class BlockBOPGeneric extends Block
{ {
public enum BlockType public enum BlockType
{ {
ASH_STONE, HARD_SAND, HARD_DIRT, HARD_ICE, HOLY_STONE, AMETHYST_ORE, AMETHYST_BLOCK, BAMBOO_THATCHING, DRIED_DIRT, CRAG_ROCK, MUD_BRICK; ASH_STONE, HARD_SAND, HARD_DIRT, HARD_ICE, HOLY_STONE, BAMBOO_THATCHING, DRIED_DIRT, CRAG_ROCK, MUD_BRICK;
} }
private Icon texture; private Icon texture;
@ -31,14 +24,6 @@ public class BlockBOPGeneric extends Block
switch (type) switch (type)
{ {
case AMETHYST_BLOCK:
setHardness(5.0F).setResistance(10.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("amethystBlock");
break;
case AMETHYST_ORE:
setHardness(3.0F).setResistance(5.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("amethystOre");
break;
case ASH_STONE: case ASH_STONE:
setHardness(1.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("ashStone"); setHardness(1.0F).setStepSound(Block.soundStoneFootstep).setUnlocalizedName("ashStone");
break; break;
@ -85,14 +70,6 @@ public class BlockBOPGeneric extends Block
{ {
switch (type) switch (type)
{ {
case AMETHYST_BLOCK:
texture = iconRegister.registerIcon("BiomesOPlenty:amethystblock");
break;
case AMETHYST_ORE:
texture = iconRegister.registerIcon("BiomesOPlenty:amethystore");
break;
case ASH_STONE: case ASH_STONE:
texture = iconRegister.registerIcon("BiomesOPlenty:ashstone"); texture = iconRegister.registerIcon("BiomesOPlenty:ashstone");
break; break;
@ -139,50 +116,4 @@ public class BlockBOPGeneric extends Block
{ {
return texture; return texture;
} }
@Override
public int idDropped(int par1, Random par2Random, int par3)
{
return type == BlockType.AMETHYST_ORE ? Items.miscItems.get().itemID : this.blockID;
}
@Override
public int damageDropped(int meta)
{
return type == BlockType.AMETHYST_ORE ? 2 : 0;
}
@Override
public int quantityDropped(Random par1Random)
{
return type == BlockType.AMETHYST_ORE ? 1 + par1Random.nextInt(2) : 1;
}
@Override
public int quantityDroppedWithBonus(int bonus, Random par2Random)
{
if (bonus > 0 && this.blockID != this.idDropped(0, par2Random, bonus))
{
int rnd = par2Random.nextInt(bonus + 2) - 1;
if (rnd < 0)
rnd = 0;
return this.quantityDropped(par2Random) * (rnd + 1);
}
else
return this.quantityDropped(par2Random);
}
@Override
public void dropBlockAsItemWithChance(World world, int par2, int par3, int par4, int par5, float par6, int par7)
{
super.dropBlockAsItemWithChance(world, par2, par3, par4, par5, par6, par7);
if (this.idDropped(par5, world.rand, par7) != this.blockID)
{
int var8 = MathHelper.getRandomIntegerInRange(world.rand, 1, 4);
this.dropXpOnBlockBreak(world, par2, par3, par4, var8);
}
}
} }

View file

@ -0,0 +1,185 @@
package biomesoplenty.blocks;
import static net.minecraftforge.common.ForgeDirection.UP;
import java.util.List;
import java.util.Random;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.item.ItemStack;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Icon;
import net.minecraft.world.World;
import net.minecraft.world.WorldProviderEnd;
import net.minecraftforge.common.ForgeDirection;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Blocks;
public class BlockBOPGrass extends Block
{
private Icon[][] blockIcon = new Icon[2][6];
public BlockBOPGrass(int par1)
{
super(par1, Material.grass);
this.setTickRandomly(true);
this.setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
setStepSound(Block.soundGrassFootstep);
setHardness(0.6F);
setLightValue(0.25F);
}
@Override
public void registerIcons(IconRegister iconRegister)
{
this.blockIcon[0][0] = iconRegister.registerIcon("BiomesOPlenty:holystone");
this.blockIcon[0][1] = iconRegister.registerIcon("BiomesOPlenty:holygrass_top");
this.blockIcon[0][2] = iconRegister.registerIcon("BiomesOPlenty:holygrass_side");
this.blockIcon[0][3] = iconRegister.registerIcon("BiomesOPlenty:holygrass_side");
this.blockIcon[0][4] = iconRegister.registerIcon("BiomesOPlenty:holygrass_side");
this.blockIcon[0][5] = iconRegister.registerIcon("BiomesOPlenty:holygrass_side");
this.blockIcon[1][0] = iconRegister.registerIcon("BiomesOPlenty:smolderinggrass_bottom");
this.blockIcon[1][1] = iconRegister.registerIcon("BiomesOPlenty:smolderinggrass_top");
this.blockIcon[1][2] = iconRegister.registerIcon("BiomesOPlenty:smolderinggrass_side");
this.blockIcon[1][3] = iconRegister.registerIcon("BiomesOPlenty:smolderinggrass_side");
this.blockIcon[1][4] = iconRegister.registerIcon("BiomesOPlenty:smolderinggrass_side");
this.blockIcon[1][5] = iconRegister.registerIcon("BiomesOPlenty:smolderinggrass_side");
}
@Override
public Icon getIcon(int side, int meta)
{
return blockIcon[meta][side];
}
@Override
@SuppressWarnings({ "rawtypes", "unchecked" })
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list) {
for (int i = 0; i < 2; ++i)
list.add(new ItemStack(blockID, 1, i));
}
@Override
public int damageDropped(int meta)
{
return meta;
}
@Override
public boolean isFireSource(World world, int x, int y, int z, int metadata, ForgeDirection side)
{
if (metadata == 0)
{
if (blockID == Block.netherrack.blockID && side == UP)
return true;
if (blockID == this.blockID && side == UP)
return true;
if ((world.provider instanceof WorldProviderEnd) && blockID == Block.bedrock.blockID && side == UP)
return true;
}
return false;
}
@Override
public int onBlockPlaced(World world, int par2, int par3, int par4, int par5, float par6, float par7, float par8, int meta)
{
if (meta == 0)
if (world.provider.isHellWorld)
{
world.playSound(par2, par3, par4, "mob.ghast.death", 20.0F, 0.95F + (float)Math.random() * 0.1F, true);
for (int l = 0; l < 8; ++l)
{
world.spawnParticle("flame", (double)par2 + Math.random(), (double)par3 + Math.random(), (double)par4 + Math.random(), 0.0D, 0.0D, 0.0D);
world.spawnParticle("smoke", (double)par2 + Math.random(), (double)par3 + Math.random(), (double)par4 + Math.random(), 0.0D, 0.0D, 0.0D);
}
}
return meta;
}
@Override
public void randomDisplayTick(World world, int x, int y, int z, Random random)
{
if (!world.isRemote)
return;
if (world.getBlockMetadata(x, y, z) == 1)
{
if (random.nextInt(4) == 0)
world.spawnParticle("smoke", (double)((float)x + random.nextFloat()), (double)((float)y + 1.1F), (double)((float)z + random.nextFloat()), 0.0D, 0.0D, 0.0D);
if (random.nextInt(6) == 0)
world.spawnParticle("flame", (double)((float)x + random.nextFloat()), (double)((float)y + 1.1F), (double)((float)z + random.nextFloat()), 0.0D, 0.0D, 0.0D);
}
}
@Override
public void updateTick(World world, int x, int y, int z, Random random)
{
if (world.getBlockMetadata(x, y, z) == 0)
{
if (world.provider.isHellWorld)
{
world.setBlock(x, y + 1, z, Block.fire.blockID);
world.setBlock(x, y, z, Blocks.holyGrass.get().blockID, 1, 2);
}
if (!world.isRemote)
{
if (world.getBlockLightValue(x, y + 1, z) < 4 && Block.lightOpacity[world.getBlockId(x, y + 1, z)] > 2)
{
world.setBlock(x, y, z, Blocks.holyStone.get().blockID);
}
else if (world.getBlockLightValue(x, y + 1, z) >= 9)
{
for (int var6 = 0; var6 < 4; ++var6)
{
int var7 = x + random.nextInt(3) - 1;
int var8 = y + random.nextInt(5) - 3;
int var9 = z + random.nextInt(3) - 1;
int var10 = world.getBlockId(var7, var8 + 1, var9);
if (world.getBlockId(var7, var8, var9) == Blocks.holyStone.get().blockID && world.getBlockLightValue(var7, var8 + 1, var9) >= 4 && Block.lightOpacity[var10] <= 2)
{
world.setBlock(var7, var8, var9, Blocks.holyGrass.get().blockID, 0, 2);
}
}
}
}
}
}
@Override
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int x, int y, int z)
{
if (world.getBlockMetadata(x, y, z) == 1)
{
float f = 0.02F;
return AxisAlignedBB.getAABBPool().getAABB((double)x, (double)y, (double)z, (double)(x + 1), (double)((float)(y + 1) - f), (double)(z + 1));
}
return super.getCollisionBoundingBoxFromPool(world, x, y, z);
}
@Override
public void onEntityCollidedWithBlock(World world, int x, int y, int z, Entity entity)
{
if (world.getBlockMetadata(x, y, z) == 1)
entity.setFire(2);
}
@Override
public int idDropped(int meta, Random par2Random, int par3)
{
return meta == 0 ? Blocks.holyStone.get().blockID : Block.dirt.blockID;
}
}

View file

@ -27,7 +27,7 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable
} }
//Autumn - Orange = Leaves 1, Origin - White = Leaves 2 //Autumn - Orange = Leaves 1, Origin - White = Leaves 2
private static final String[] leaves = new String[] {"autumn", "bamboo", "blue", "dark", "dead", "fir", "holy", "orange", "origin", "pink", "red", "white"}; private static final String[] leaves = new String[] {"yellowautumn", "bamboo", "magic", "dark", "dead", "fir", "holy", "orangeautumn", "origin", "pinkcherry", "maple", "whitecherry"};
private Icon[][] textures; private Icon[][] textures;
private final LeafCategory category; private final LeafCategory category;
int[] adjacentTreeBlocks; int[] adjacentTreeBlocks;
@ -51,8 +51,8 @@ public class BlockBOPLeaves extends BlockLeavesBase implements IShearable
for (int i = 0; i < leaves.length; ++i) for (int i = 0; i < leaves.length; ++i)
{ {
textures[0][i] = iconRegister.registerIcon("BiomesOPlenty:" + leaves[i] + "leaves1"); textures[0][i] = iconRegister.registerIcon("BiomesOPlenty:leaves_" + leaves[i] + "_fancy");
textures[1][i] = iconRegister.registerIcon("BiomesOPlenty:" + leaves[i] + "leaves2"); textures[1][i] = iconRegister.registerIcon("BiomesOPlenty:leaves_" + leaves[i] + "_fast");
} }
} }

View file

@ -46,12 +46,12 @@ public class BlockBOPLog extends Block
for (int i = 0; i < types.length - 1; ++i) for (int i = 0; i < types.length - 1; ++i)
{ {
textures[i] = iconRegister.registerIcon("BiomesOPlenty:"+types[i]+"log"); textures[i] = iconRegister.registerIcon("BiomesOPlenty:log_"+types[i]+"_side");
logHearts[i] = iconRegister.registerIcon("BiomesOPlenty:logTopBottum"); logHearts[i] = iconRegister.registerIcon("BiomesOPlenty:log_"+types[i]+"_heart");
} }
textures[types.length - 1] = iconRegister.registerIcon("BiomesOPlenty:bigflowerstem"); textures[types.length - 1] = iconRegister.registerIcon("BiomesOPlenty:bigflowerstem_side");
logHearts[types.length - 1] = iconRegister.registerIcon("BiomesOPlenty:stemTopBottum"); logHearts[types.length - 1] = iconRegister.registerIcon("BiomesOPlenty:bigflowerstem_heart");
} }
@Override @Override

View file

@ -12,7 +12,7 @@ import biomesoplenty.BiomesOPlenty;
public class BlockBOPPlank extends Block public class BlockBOPPlank extends Block
{ {
private static final String[] woodTypes = new String[] {"acaciaplank", "cherryplank", "darkplank", "firPlank", "holyplank", "magicplank", "mangroveplank", "palmplank", "redwoodplank", "willowplank", "bamboothatching"}; private static final String[] woodTypes = new String[] {"plank_acacia", "plank_cherry", "plank_dark", "plank_fir", "plank_holy", "plank_magic", "plank_mangrove", "plank_palm", "plank_redwood", "plank_willow", "bamboothatching"};
private Icon[] textures; private Icon[] textures;
public BlockBOPPlank(int blockID) public BlockBOPPlank(int blockID)

View file

@ -30,7 +30,7 @@ import biomesoplenty.worldgen.WorldGenTaiga9;
public class BlockBOPSapling extends BlockSapling public class BlockBOPSapling extends BlockSapling
{ {
private static final String[] saplings = new String[] {"apple", "yellow", "bamboo", "magic", "dark", "brown", "fir", "holy", "orange", "origin", "pink", "red", "white"}; private static final String[] saplings = new String[] {"apple", "yellowautumn", "bamboo", "magic", "dark", "dead", "fir", "holy", "orangeautumn", "origin", "pinkcherry", "maple", "whitecherry"};
private Icon[] textures; private Icon[] textures;
private static final int TYPES = 15; private static final int TYPES = 15;
@ -48,7 +48,7 @@ public class BlockBOPSapling extends BlockSapling
textures = new Icon[saplings.length]; textures = new Icon[saplings.length];
for (int i = 0; i < saplings.length; ++i) for (int i = 0; i < saplings.length; ++i)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:" + saplings[i] + "sapling"); textures[i] = iconRegister.registerIcon("BiomesOPlenty:sapling_" + saplings[i]);
} }
@ -68,6 +68,18 @@ public class BlockBOPSapling extends BlockSapling
list.add(new ItemStack(blockID, 1, i)); list.add(new ItemStack(blockID, 1, i));
} }
@Override
public void updateTick(World world, int x, int y, int z, Random random)
{
if (world.isRemote)
return;
this.checkFlowerChange(world, x, y, z);
if (world.getBlockLightValue(x, y + 1, z) >= 9 && random.nextInt(7) == 0)
this.growTree(world, x, y, z, random);
}
@Override @Override
public void growTree(World world, int x, int y, int z, Random random) public void growTree(World world, int x, int y, int z, Random random)
{ {

View file

@ -61,7 +61,7 @@ public class BlockBOPSlab extends BlockHalfSlab
textures = new Icon[woodTypes.length]; textures = new Icon[woodTypes.length];
for (int i = 0; i < woodTypes.length; ++i) for (int i = 0; i < woodTypes.length; ++i)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:"+woodTypes[i]+"plank"); textures[i] = iconRegister.registerIcon("BiomesOPlenty:plank_"+woodTypes[i]);
} }
} }

View file

@ -36,7 +36,7 @@ public class BlockBOPStairs extends BlockStairs
for (int i = 0; i < types.length; ++i) for (int i = 0; i < types.length; ++i)
if (i < types.length - 3) if (i < types.length - 3)
textures[i] = iconRegister.registerIcon("BiomesOPlenty:"+types[i]+"plank"); textures[i] = iconRegister.registerIcon("BiomesOPlenty:plank_"+types[i]);
else else
textures[i] = iconRegister.registerIcon("BiomesOPlenty:"+types[i]); textures[i] = iconRegister.registerIcon("BiomesOPlenty:"+types[i]);

View file

@ -86,7 +86,7 @@ public class BlockMud extends Block
public int idDropped(int par1, Random par2Random, int par3) public int idDropped(int par1, Random par2Random, int par3)
{ {
if (par1 == 0) if (par1 == 0)
return Items.miscItems.get().itemID; return Items.mudball.get().itemID;
else else
return this.blockID; return this.blockID;
} }

View file

@ -32,7 +32,7 @@ public class BOPBiomes {
initializeBiomes(); initializeBiomes();
//Initialize new world type //Initialize new world type
//WTBiomesOP = new WTBiomesOP(); WTBiomesOP = new WTBiomesOP();
//Biome Dictionary //Biome Dictionary
addToBiomeDictionary(); addToBiomeDictionary();
@ -317,6 +317,38 @@ public class BOPBiomes {
addVillageBiome(Biomes.forestNew); addVillageBiome(Biomes.forestNew);
addVillageBiome(Biomes.taigaNew); addVillageBiome(Biomes.taigaNew);
addVillageBiome(Biomes.swamplandNew); addVillageBiome(Biomes.swamplandNew);
// Additional biomes to spawn villages
addVillageBiome(Biomes.alps);
addVillageBiome(Biomes.badlands);
addVillageBiome(Biomes.bambooForest);
addVillageBiome(Biomes.bog);
addVillageBiome(Biomes.borealForest);
addVillageBiome(Biomes.canyon);
addVillageBiome(Biomes.cherryBlossomGrove);
addVillageBiome(Biomes.deadSwamp);
addVillageBiome(Biomes.deciduousForest);
addVillageBiome(Biomes.drylands);
addVillageBiome(Biomes.dunes);
addVillageBiome(Biomes.fen);
addVillageBiome(Biomes.highland);
addVillageBiome(Biomes.jadeCliffs);
addVillageBiome(Biomes.lushDesert);
addVillageBiome(Biomes.meadow);
addVillageBiome(Biomes.moor);
addVillageBiome(Biomes.mountain);
addVillageBiome(Biomes.oasis);
addVillageBiome(Biomes.outback);
addVillageBiome(Biomes.pasture);
addVillageBiome(Biomes.quagmire);
addVillageBiome(Biomes.rainforest);
addVillageBiome(Biomes.seasonalForest);
addVillageBiome(Biomes.swampwoods);
addVillageBiome(Biomes.temperateRainforest);
addVillageBiome(Biomes.thicket);
addVillageBiome(Biomes.tropics);
addVillageBiome(Biomes.tundra);
addVillageBiome(Biomes.wetland);
} }
private static void addStrongholdBiomes() private static void addStrongholdBiomes()
@ -622,65 +654,79 @@ public class BOPBiomes {
// Vanilla biomes generation // Vanilla biomes generation
if (BOPConfiguration.plainsGen) if (BOPConfiguration.plainsGen)
{
if (BOPConfiguration.vanillaEnhanced) if (BOPConfiguration.vanillaEnhanced)
{ {
registerBiome(Biomes.plainsNew); registerBiome(Biomes.plainsNew);
GameRegistry.removeBiome(BiomeGenBase.plains); GameRegistry.removeBiome(BiomeGenBase.plains);
} }
}
else else
GameRegistry.removeBiome(BiomeGenBase.plains); GameRegistry.removeBiome(BiomeGenBase.plains);
if (BOPConfiguration.desertGen) if (BOPConfiguration.desertGen)
{
if (BOPConfiguration.vanillaEnhanced) if (BOPConfiguration.vanillaEnhanced)
{ {
registerBiome(Biomes.desertNew); registerBiome(Biomes.desertNew);
GameRegistry.removeBiome(BiomeGenBase.desert); GameRegistry.removeBiome(BiomeGenBase.desert);
} }
}
else else
GameRegistry.removeBiome(BiomeGenBase.desert); GameRegistry.removeBiome(BiomeGenBase.desert);
if (BOPConfiguration.extremeHillsGen) if (BOPConfiguration.extremeHillsGen)
{
if (BOPConfiguration.vanillaEnhanced) if (BOPConfiguration.vanillaEnhanced)
{ {
registerBiome(Biomes.extremeHillsNew); registerBiome(Biomes.extremeHillsNew);
GameRegistry.removeBiome(BiomeGenBase.extremeHills); GameRegistry.removeBiome(BiomeGenBase.extremeHills);
} }
}
else else
GameRegistry.removeBiome(BiomeGenBase.extremeHills); GameRegistry.removeBiome(BiomeGenBase.extremeHills);
if (BOPConfiguration.forestGen) if (BOPConfiguration.forestGen)
{
if (BOPConfiguration.vanillaEnhanced) if (BOPConfiguration.vanillaEnhanced)
{ {
registerBiome(Biomes.forestNew); registerBiome(Biomes.forestNew);
GameRegistry.removeBiome(BiomeGenBase.forest); GameRegistry.removeBiome(BiomeGenBase.forest);
} }
}
else else
GameRegistry.removeBiome(BiomeGenBase.forest); GameRegistry.removeBiome(BiomeGenBase.forest);
if (BOPConfiguration.taigaGen) if (BOPConfiguration.taigaGen)
{
if (BOPConfiguration.vanillaEnhanced) if (BOPConfiguration.vanillaEnhanced)
{ {
registerBiome(Biomes.taigaNew); registerBiome(Biomes.taigaNew);
GameRegistry.removeBiome(BiomeGenBase.taiga); GameRegistry.removeBiome(BiomeGenBase.taiga);
} }
}
else else
GameRegistry.removeBiome(BiomeGenBase.taiga); GameRegistry.removeBiome(BiomeGenBase.taiga);
if (BOPConfiguration.swamplandGen) if (BOPConfiguration.swamplandGen)
{
if (BOPConfiguration.vanillaEnhanced) if (BOPConfiguration.vanillaEnhanced)
{ {
registerBiome(Biomes.swamplandNew); registerBiome(Biomes.swamplandNew);
GameRegistry.removeBiome(BiomeGenBase.swampland); GameRegistry.removeBiome(BiomeGenBase.swampland);
} }
}
else else
GameRegistry.removeBiome(BiomeGenBase.swampland); GameRegistry.removeBiome(BiomeGenBase.swampland);
if (BOPConfiguration.jungleGen) if (BOPConfiguration.jungleGen)
{
if (BOPConfiguration.vanillaEnhanced) if (BOPConfiguration.vanillaEnhanced)
{ {
registerBiome(Biomes.jungleNew); registerBiome(Biomes.jungleNew);
GameRegistry.removeBiome(BiomeGenBase.jungle); GameRegistry.removeBiome(BiomeGenBase.jungle);
} }
}
else else
GameRegistry.removeBiome(BiomeGenBase.jungle); GameRegistry.removeBiome(BiomeGenBase.jungle);
} }

View file

@ -7,6 +7,7 @@ import net.minecraft.item.ItemStack;
import net.minecraftforge.common.MinecraftForge; import net.minecraftforge.common.MinecraftForge;
import biomesoplenty.api.Blocks; import biomesoplenty.api.Blocks;
import biomesoplenty.blocks.BlockAsh; import biomesoplenty.blocks.BlockAsh;
import biomesoplenty.blocks.BlockBOPAmethyst;
import biomesoplenty.blocks.BlockBOPAppleLeaves; import biomesoplenty.blocks.BlockBOPAppleLeaves;
import biomesoplenty.blocks.BlockBOPColorizedLeaves; import biomesoplenty.blocks.BlockBOPColorizedLeaves;
import biomesoplenty.blocks.BlockBOPColorizedSapling; import biomesoplenty.blocks.BlockBOPColorizedSapling;
@ -14,6 +15,7 @@ import biomesoplenty.blocks.BlockBOPFlower;
import biomesoplenty.blocks.BlockBOPFoliage; import biomesoplenty.blocks.BlockBOPFoliage;
import biomesoplenty.blocks.BlockBOPGeneric; import biomesoplenty.blocks.BlockBOPGeneric;
import biomesoplenty.blocks.BlockBOPGeneric.BlockType; import biomesoplenty.blocks.BlockBOPGeneric.BlockType;
import biomesoplenty.blocks.BlockBOPGrass;
import biomesoplenty.blocks.BlockBOPLeaves; import biomesoplenty.blocks.BlockBOPLeaves;
import biomesoplenty.blocks.BlockBOPLeaves.LeafCategory; import biomesoplenty.blocks.BlockBOPLeaves.LeafCategory;
import biomesoplenty.blocks.BlockBOPLog; import biomesoplenty.blocks.BlockBOPLog;
@ -28,21 +30,20 @@ import biomesoplenty.blocks.BlockBOPSlab.SlabCategory;
import biomesoplenty.blocks.BlockBOPStairs; import biomesoplenty.blocks.BlockBOPStairs;
import biomesoplenty.blocks.BlockBOPStairs.Category; import biomesoplenty.blocks.BlockBOPStairs.Category;
import biomesoplenty.blocks.BlockBamboo; import biomesoplenty.blocks.BlockBamboo;
import biomesoplenty.blocks.BlockHolyGrass;
import biomesoplenty.blocks.BlockMoss; import biomesoplenty.blocks.BlockMoss;
import biomesoplenty.blocks.BlockMud; import biomesoplenty.blocks.BlockMud;
import biomesoplenty.blocks.BlockOriginGrass; import biomesoplenty.blocks.BlockOriginGrass;
import biomesoplenty.blocks.BlockPromisedPortal; import biomesoplenty.blocks.BlockPromisedPortal;
import biomesoplenty.blocks.BlockQuicksand;
import biomesoplenty.blocks.BlockSmolderingGrass;
import biomesoplenty.blocks.BlockTreeMoss; import biomesoplenty.blocks.BlockTreeMoss;
import biomesoplenty.blocks.BlockWillow; import biomesoplenty.blocks.BlockWillow;
import biomesoplenty.items.ItemBOPAmethyst;
import biomesoplenty.items.ItemBOPAppleLeaves; import biomesoplenty.items.ItemBOPAppleLeaves;
import biomesoplenty.items.ItemBOPBamboo; import biomesoplenty.items.ItemBOPBamboo;
import biomesoplenty.items.ItemBOPColorizedLeaves; import biomesoplenty.items.ItemBOPColorizedLeaves;
import biomesoplenty.items.ItemBOPColorizedSapling; import biomesoplenty.items.ItemBOPColorizedSapling;
import biomesoplenty.items.ItemBOPFlower; import biomesoplenty.items.ItemBOPFlower;
import biomesoplenty.items.ItemBOPFoliage; import biomesoplenty.items.ItemBOPFoliage;
import biomesoplenty.items.ItemBOPGrass;
import biomesoplenty.items.ItemBOPLeaves; import biomesoplenty.items.ItemBOPLeaves;
import biomesoplenty.items.ItemBOPLog; import biomesoplenty.items.ItemBOPLog;
import biomesoplenty.items.ItemBOPMoss; import biomesoplenty.items.ItemBOPMoss;
@ -72,17 +73,18 @@ public class BOPBlocks {
Blocks.shearBlockIds.put(Blocks.leavesColorized.get().blockID, 15.0F); Blocks.shearBlockIds.put(Blocks.leavesColorized.get().blockID, 15.0F);
Blocks.shearBlockIds.put(Blocks.leavesFruit.get().blockID, 15.0F); Blocks.shearBlockIds.put(Blocks.leavesFruit.get().blockID, 15.0F);
MinecraftForge.setBlockHarvestLevel(Blocks.smolderingGrass.get(), "shovel", 0); MinecraftForge.setBlockHarvestLevel(Blocks.holyGrass.get(), 1, "shovel", 0);
MinecraftForge.setBlockHarvestLevel(Blocks.mud.get(), "shovel", 0); MinecraftForge.setBlockHarvestLevel(Blocks.mud.get(), "shovel", 0);
MinecraftForge.setBlockHarvestLevel(Blocks.ash.get(), "shovel", 0); MinecraftForge.setBlockHarvestLevel(Blocks.ash.get(), "shovel", 0);
MinecraftForge.setBlockHarvestLevel(Blocks.originGrass.get(), "shovel", 0); MinecraftForge.setBlockHarvestLevel(Blocks.originGrass.get(), "shovel", 0);
MinecraftForge.setBlockHarvestLevel(Blocks.hardSand.get(), "shovel", 0); MinecraftForge.setBlockHarvestLevel(Blocks.hardSand.get(), "shovel", 0);
MinecraftForge.setBlockHarvestLevel(Blocks.holyGrass.get(), "pickaxe", 0); MinecraftForge.setBlockHarvestLevel(Blocks.holyGrass.get(), 0, "pickaxe", 0);
// MinecraftForge.setBlockHarvestLevel(Blocks.quicksand.get(), "shovel", 0); // MinecraftForge.setBlockHarvestLevel(Blocks.quicksand.get(), "shovel", 0);
MinecraftForge.setBlockHarvestLevel(Blocks.driedDirt.get(), "pickaxe", 0); MinecraftForge.setBlockHarvestLevel(Blocks.driedDirt.get(), "pickaxe", 0);
MinecraftForge.setBlockHarvestLevel(Blocks.amethystOre.get(), "pickaxe", 3); MinecraftForge.setBlockHarvestLevel(Blocks.amethystOre.get(), "pickaxe", 3);
MinecraftForge.setBlockHarvestLevel(Blocks.amethystBlock.get(), "pickaxe", 3);
addGrassPlants();
registerNames(); registerNames();
} }
@ -120,16 +122,18 @@ public class BOPBlocks {
Blocks.redBricksStairs = Optional.of((new BlockBOPStairs(BOPConfiguration.redBrickStairsID, Blocks.redRock.get(), Category.RED_BRICKS)).setUnlocalizedName("redBricksStairs")); Blocks.redBricksStairs = Optional.of((new BlockBOPStairs(BOPConfiguration.redBrickStairsID, Blocks.redRock.get(), Category.RED_BRICKS)).setUnlocalizedName("redBricksStairs"));
Blocks.hardSand = Optional.of(new BlockBOPGeneric(BOPConfiguration.hardSandID, Material.sand, BlockType.HARD_SAND)); Blocks.hardSand = Optional.of(new BlockBOPGeneric(BOPConfiguration.hardSandID, Material.sand, BlockType.HARD_SAND));
Blocks.hardDirt = Optional.of(new BlockBOPGeneric(BOPConfiguration.hardDirtID, Material.rock, BlockType.HARD_DIRT)); Blocks.hardDirt = Optional.of(new BlockBOPGeneric(BOPConfiguration.hardDirtID, Material.rock, BlockType.HARD_DIRT));
Blocks.holyGrass = Optional.of((BlockHolyGrass)(new BlockHolyGrass(BOPConfiguration.holyGrassID)).setHardness(1.0F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("holyGrass")); Blocks.holyGrass = Optional.of(new BlockBOPGrass(BOPConfiguration.holyGrassID).setUnlocalizedName("holyGrass"));
Blocks.holyStone = Optional.of(new BlockBOPGeneric(BOPConfiguration.holyStoneID, Material.rock, BlockType.HOLY_STONE)); Blocks.holyStone = Optional.of(new BlockBOPGeneric(BOPConfiguration.holyStoneID, Material.rock, BlockType.HOLY_STONE).setLightValue(0.25F));
Blocks.promisedPortal = Optional.of(new BlockPromisedPortal(BOPConfiguration.promisedLandPortalID).setUnlocalizedName("promisedPortal").setBlockUnbreakable().setResistance(6000000.0F).setLightValue(1.0F)); Blocks.promisedPortal = Optional.of(new BlockPromisedPortal(BOPConfiguration.promisedLandPortalID).setUnlocalizedName("promisedPortal").setBlockUnbreakable().setResistance(6000000.0F).setLightValue(1.0F));
Blocks.amethystOre = Optional.of(new BlockBOPGeneric(BOPConfiguration.amethystOreID, Material.rock, BlockType.AMETHYST_ORE)); // Blocks.amethystOre = Optional.of(new BlockBOPGeneric(BOPConfiguration.amethystOreID, Material.rock, BlockType.AMETHYST_ORE));
Blocks.amethystBlock = Optional.of(new BlockBOPGeneric(BOPConfiguration.amethystBlockID, Material.iron, BlockType.AMETHYST_BLOCK)); // Blocks.amethystBlock = Optional.of(new BlockBOPGeneric(BOPConfiguration.amethystBlockID, Material.iron, BlockType.AMETHYST_BLOCK));
Blocks.amethystOre = Optional.of(new BlockBOPAmethyst(BOPConfiguration.amethystOreID, Material.rock).setUnlocalizedName("amethystOre"));
// Blocks.bambooThatching = Optional.of(new BlockBOPGeneric(BOPConfiguration.bambooThatchingID, Material.wood, BlockType.BAMBOO_THATCHING)); // Blocks.bambooThatching = Optional.of(new BlockBOPGeneric(BOPConfiguration.bambooThatchingID, Material.wood, BlockType.BAMBOO_THATCHING));
Blocks.moss = Optional.of((new BlockMoss(BOPConfiguration.mossID)).setHardness(0.2F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("moss")); Blocks.moss = Optional.of((new BlockMoss(BOPConfiguration.mossID)).setHardness(0.2F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("moss"));
Blocks.smolderingGrass = Optional.of((BlockSmolderingGrass)(new BlockSmolderingGrass(BOPConfiguration.smolderingGrassID)).setHardness(0.6F).setLightValue(0.25F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("smolderingGrass")); // Blocks.smolderingGrass = Optional.of((BlockSmolderingGrass)(new BlockSmolderingGrass(BOPConfiguration.smolderingGrassID)).setHardness(0.6F).setLightValue(0.25F).setStepSound(Block.soundGrassFootstep).setUnlocalizedName("smolderingGrass"));
Blocks.cragRock = Optional.of(new BlockBOPGeneric(BOPConfiguration.cragRockID, Material.rock, BlockType.CRAG_ROCK)); Blocks.cragRock = Optional.of(new BlockBOPGeneric(BOPConfiguration.cragRockID, Material.rock, BlockType.CRAG_ROCK));
// Blocks.quicksand = Optional.of((new BlockQuicksand(BOPConfiguration.quicksandID)).setHardness(0.3F).setStepSound(Block.soundSandFootstep).setUnlocalizedName("quicksand")); // Blocks.quicksand = Optional.of((new BlockQuicksand(BOPConfiguration.quicksandID)).setHardness(0.3F).setStepSound(Block.soundSandFootstep).setUnlocalizedName("quicksand"));
// Blocks.grass = Optional.of(new BlockBOPGrass(3000).setUnlocalizedName("holyGrass"));
Blocks.planks = Optional.of((new BlockBOPPlank(BOPConfiguration.planksID)).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setUnlocalizedName("planks")); Blocks.planks = Optional.of((new BlockBOPPlank(BOPConfiguration.planksID)).setResistance(5.0F).setStepSound(Block.soundWoodFootstep).setUnlocalizedName("planks"));
@ -182,16 +186,18 @@ public class BOPBlocks {
GameRegistry.registerBlock(Blocks.redBricksStairs.get(), "redBricksStairs"); GameRegistry.registerBlock(Blocks.redBricksStairs.get(), "redBricksStairs");
GameRegistry.registerBlock(Blocks.hardSand.get(), "hardSand"); GameRegistry.registerBlock(Blocks.hardSand.get(), "hardSand");
GameRegistry.registerBlock(Blocks.hardDirt.get(), "hardDirt"); GameRegistry.registerBlock(Blocks.hardDirt.get(), "hardDirt");
GameRegistry.registerBlock(Blocks.holyGrass.get(), "holyGrass"); // GameRegistry.registerBlock(Blocks.holyGrass.get(), "holyGrass");
GameRegistry.registerBlock(Blocks.holyGrass.get(), ItemBOPGrass.class, "holyGrass");
GameRegistry.registerBlock(Blocks.holyStone.get(), "holyStone"); GameRegistry.registerBlock(Blocks.holyStone.get(), "holyStone");
GameRegistry.registerBlock(Blocks.promisedPortal.get(), "promisedPortal"); GameRegistry.registerBlock(Blocks.promisedPortal.get(), "promisedPortal");
GameRegistry.registerBlock(Blocks.amethystOre.get(), "amethystOre"); GameRegistry.registerBlock(Blocks.amethystOre.get(), ItemBOPAmethyst.class, "amethystOre");
GameRegistry.registerBlock(Blocks.amethystBlock.get(), "amethystBlock"); // GameRegistry.registerBlock(Blocks.amethystBlock.get(), "amethystBlock");
// GameRegistry.registerBlock(Blocks.bambooThatching.get(), "bambooThatching"); // GameRegistry.registerBlock(Blocks.bambooThatching.get(), "bambooThatching");
GameRegistry.registerBlock(Blocks.moss.get(), ItemBOPMoss.class, "moss"); GameRegistry.registerBlock(Blocks.moss.get(), ItemBOPMoss.class, "moss");
GameRegistry.registerBlock(Blocks.smolderingGrass.get(), "smolderingGrass"); // GameRegistry.registerBlock(Blocks.smolderingGrass.get(), "smolderingGrass");
GameRegistry.registerBlock(Blocks.cragRock.get(), "cragRock"); GameRegistry.registerBlock(Blocks.cragRock.get(), "cragRock");
// GameRegistry.registerBlock(Blocks.quicksand.get(), "quicksand"); // GameRegistry.registerBlock(Blocks.quicksand.get(), "quicksand");
// GameRegistry.registerBlock(Blocks.amethyst.get(), ItemBOPAmethyst.class, "amethystOre1");
ItemBOPSlab.setSlabs(Blocks.stoneSingleSlab.get(), Blocks.stoneDoubleSlab.get()); ItemBOPSlab.setSlabs(Blocks.stoneSingleSlab.get(), Blocks.stoneDoubleSlab.get());
GameRegistry.registerBlock(Blocks.stoneDoubleSlab.get(), ItemBOPSlab.class, "stoneDoubleSlab"); GameRegistry.registerBlock(Blocks.stoneDoubleSlab.get(), ItemBOPSlab.class, "stoneDoubleSlab");
@ -228,7 +234,7 @@ public class BOPBlocks {
LanguageRegistry.addName(Blocks.ash.get(), "Ash Block"); LanguageRegistry.addName(Blocks.ash.get(), "Ash Block");
LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,0), "Dead Grass"); LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,0), "Dead Grass");
LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,1), "Desert Grass"); LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,1), "Desert Grass");
LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,9), "Anenome"); LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,9), "Anemone");
LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,1), "Swampflower"); LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,1), "Swampflower");
LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,7), "Wildflower"); LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,7), "Wildflower");
LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,5), "Daisy"); LanguageRegistry.addName(new ItemStack(Blocks.flowers.get(),1,5), "Daisy");
@ -299,17 +305,21 @@ public class BOPBlocks {
LanguageRegistry.addName(Blocks.hardSand.get(), "Hard Sand"); LanguageRegistry.addName(Blocks.hardSand.get(), "Hard Sand");
LanguageRegistry.addName(new ItemStack(Blocks.colorizedSaplings.get(),1,0), "Acacia Sapling"); LanguageRegistry.addName(new ItemStack(Blocks.colorizedSaplings.get(),1,0), "Acacia Sapling");
LanguageRegistry.addName(Blocks.hardDirt.get(), "Hard Dirt"); LanguageRegistry.addName(Blocks.hardDirt.get(), "Hard Dirt");
LanguageRegistry.addName(Blocks.holyGrass.get(), "Holy Grass"); // LanguageRegistry.addName(Blocks.holyGrass.get(), "Holy Grass");
LanguageRegistry.addName(new ItemStack(Blocks.holyGrass.get(), 1, 0), "Holy Grass");
LanguageRegistry.addName(new ItemStack(Blocks.holyGrass.get(), 1, 1), "Smoldering Grass");
LanguageRegistry.addName(Blocks.holyStone.get(), "Holy Stone"); LanguageRegistry.addName(Blocks.holyStone.get(), "Holy Stone");
LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,4), "Holy Tall Grass"); LanguageRegistry.addName(new ItemStack(Blocks.plants.get(),1,4), "Holy Tall Grass");
LanguageRegistry.addName(Blocks.promisedPortal.get(), "Promised Land Portal"); LanguageRegistry.addName(Blocks.promisedPortal.get(), "Promised Land Portal");
LanguageRegistry.addName(new ItemStack(Blocks.saplings.get(),1,7), "Holy Sapling"); LanguageRegistry.addName(new ItemStack(Blocks.saplings.get(),1,7), "Holy Sapling");
LanguageRegistry.addName(Blocks.amethystOre.get(), "Amethyst Ore"); // LanguageRegistry.addName(Blocks.amethystOre.get(), "Amethyst Ore");
LanguageRegistry.addName(Blocks.amethystBlock.get(), "Block of Amethyst"); // LanguageRegistry.addName(Blocks.amethystBlock.get(), "Block of Amethyst");
LanguageRegistry.addName(new ItemStack(Blocks.amethystOre.get(),1,0), "Amethyst Ore");
LanguageRegistry.addName(new ItemStack(Blocks.amethystOre.get(),1,1), "Block of Amethyst");
// LanguageRegistry.addName(Blocks.bambooThatching.get(), "Bamboo Thatching"); // LanguageRegistry.addName(Blocks.bambooThatching.get(), "Bamboo Thatching");
LanguageRegistry.addName(Blocks.moss.get(), "Moss"); LanguageRegistry.addName(Blocks.moss.get(), "Moss");
LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,0), "Algae"); LanguageRegistry.addName(new ItemStack(Blocks.foliage.get(),1,0), "Algae");
LanguageRegistry.addName(Blocks.smolderingGrass.get(), "Smoldering Grass"); // LanguageRegistry.addName(Blocks.smolderingGrass.get(), "Smoldering Grass");
LanguageRegistry.addName(Blocks.cragRock.get(), "Crag Rock"); LanguageRegistry.addName(Blocks.cragRock.get(), "Crag Rock");
// LanguageRegistry.addName(Blocks.quicksand.get(), "Quicksand"); // LanguageRegistry.addName(Blocks.quicksand.get(), "Quicksand");
LanguageRegistry.addName(new ItemStack(Blocks.mud.get(), 1, 1), "Quicksand"); LanguageRegistry.addName(new ItemStack(Blocks.mud.get(), 1, 1), "Quicksand");
@ -384,4 +394,20 @@ public class BOPBlocks {
LanguageRegistry.addName(new ItemStack(Blocks.leavesColorized.get(),1,1), "Mangrove Leaves"); LanguageRegistry.addName(new ItemStack(Blocks.leavesColorized.get(),1,1), "Mangrove Leaves");
LanguageRegistry.addName(new ItemStack(Blocks.leaves1.get(),1,6), "Holy Leaves"); LanguageRegistry.addName(new ItemStack(Blocks.leaves1.get(),1,6), "Holy Leaves");
} }
private static void addGrassPlants()
{
MinecraftForge.addGrassPlant(Blocks.flowers.get(), 0, 10);
MinecraftForge.addGrassPlant(Blocks.flowers.get(), 1, 3);
MinecraftForge.addGrassPlant(Blocks.flowers.get(), 2, 1);
MinecraftForge.addGrassPlant(Blocks.flowers.get(), 3, 1);
MinecraftForge.addGrassPlant(Blocks.flowers.get(), 4, 5);
MinecraftForge.addGrassPlant(Blocks.flowers.get(), 5, 5);
MinecraftForge.addGrassPlant(Blocks.flowers.get(), 6, 5);
MinecraftForge.addGrassPlant(Blocks.flowers.get(), 7, 5);
MinecraftForge.addGrassPlant(Blocks.flowers.get(), 8, 5);
MinecraftForge.addGrassPlant(Blocks.flowers.get(), 9, 5);
MinecraftForge.addGrassPlant(Blocks.foliage.get(), 5, 10);
}
} }

View file

@ -17,6 +17,8 @@ public class BOPConfiguration {
public static boolean achievements; public static boolean achievements;
public static boolean vanillaEnhanced; public static boolean vanillaEnhanced;
public static int villageDistance;
public static int promisedLandDimID; public static int promisedLandDimID;
public static boolean alpsGen; public static boolean alpsGen;
@ -143,13 +145,13 @@ public class BOPConfiguration {
public static int promisedLandPortalID; public static int promisedLandPortalID;
public static int amethystOreID; public static int amethystOreID;
public static int amethystBlockID; // public static int amethystBlockID;
public static int bambooThatchingID; // public static int bambooThatchingID;
public static int mossID; public static int mossID;
public static int smolderingGrassID; // public static int smolderingGrassID;
public static int quicksandID; // public static int quicksandID;
public static int planksID; public static int planksID;
@ -181,6 +183,7 @@ public class BOPConfiguration {
public static int bopDiscMudID; public static int bopDiscMudID;
public static int miscItemsID; public static int miscItemsID;
public static int mudballID;
public static int swordMudID; public static int swordMudID;
public static int shovelMudID; public static int shovelMudID;
@ -320,6 +323,10 @@ public class BOPConfiguration {
addToDefault = config.get("Biome Settings", "Add Biomes To Default World", true).getBoolean(true); addToDefault = config.get("Biome Settings", "Add Biomes To Default World", true).getBoolean(true);
villageDistance = config.get("Biomes O\' Plenty World Type Settings", "Distance between villages", 24, "In Vanilla it is set to 32").getInt();
if (villageDistance < 8)
villageDistance = 8;
alpsGen = config.get("Biomes To Generate", "Alps", true).getBoolean(false); alpsGen = config.get("Biomes To Generate", "Alps", true).getBoolean(false);
arcticGen = config.get("Biomes To Generate", "Arctic", true).getBoolean(false); arcticGen = config.get("Biomes To Generate", "Arctic", true).getBoolean(false);
badlandsGen = config.get("Biomes To Generate", "Badlands", true).getBoolean(false); badlandsGen = config.get("Biomes To Generate", "Badlands", true).getBoolean(false);
@ -445,13 +452,13 @@ public class BOPConfiguration {
promisedLandPortalID = config.getBlock("Promised Land Portal ID", 1941, null).getInt(); promisedLandPortalID = config.getBlock("Promised Land Portal ID", 1941, null).getInt();
amethystOreID = config.getBlock("Amethyst Ore ID", 1942, null).getInt(); amethystOreID = config.getBlock("Amethyst Ore ID", 1942, null).getInt();
amethystBlockID = config.getBlock("Block of Amethyst ID", 1943, null).getInt(); // amethystBlockID = config.getBlock("Block of Amethyst ID", 1943, null).getInt();
bambooThatchingID = config.getBlock("Bamboo Thatching ID", 1944, null).getInt(); // bambooThatchingID = config.getBlock("Bamboo Thatching ID", 1944, null).getInt();
mossID = config.getBlock("Moss ID", 391, null).getInt(); mossID = config.getBlock("Moss ID", 391, null).getInt();
smolderingGrassID = config.getBlock("Smoldering Grass ID", 1945, null).getInt(); // smolderingGrassID = config.getBlock("Smoldering Grass ID", 1945, null).getInt();
quicksandID = config.getBlock("Quicksand ID", 1946, null).getInt(); // quicksandID = config.getBlock("Quicksand ID", 1946, null).getInt();
planksID = config.getBlock("Planks ID", 1947, null).getInt(); planksID = config.getBlock("Planks ID", 1947, null).getInt();
@ -480,6 +487,7 @@ public class BOPConfiguration {
enderporterID = config.getItem("Enderporter ID", 21007).getInt(); enderporterID = config.getItem("Enderporter ID", 21007).getInt();
miscItemsID = config.getItem("Misc Items ID", 21010).getInt(); miscItemsID = config.getItem("Misc Items ID", 21010).getInt();
mudballID = config.getItem("Mud Ball ID", 21011).getInt();
bopDiscID = config.getItem("Traversia Music Disc ID", 21019, null).getInt(); bopDiscID = config.getItem("Traversia Music Disc ID", 21019, null).getInt();
bopDiscMudID = config.getItem("Muddy Music Disc ID", 21020, null).getInt(); bopDiscMudID = config.getItem("Muddy Music Disc ID", 21020, null).getInt();

View file

@ -107,24 +107,24 @@ public class BOPCrafting
GameRegistry.addRecipe(new ItemStack(Block.cloth, 1, 0), new Object[] {"CCC", "CCC", "CCC", 'C', new ItemStack(Blocks.plants.get(), 1, 7)}); GameRegistry.addRecipe(new ItemStack(Block.cloth, 1, 0), new Object[] {"CCC", "CCC", "CCC", 'C', new ItemStack(Blocks.plants.get(), 1, 7)});
GameRegistry.addRecipe(new ItemStack(Item.coal, 1), new Object[] {"AAA", "AAA", "AAA", 'A', new ItemStack(Items.miscItems.get(), 1, 1)}); GameRegistry.addRecipe(new ItemStack(Item.coal, 1), new Object[] {"AAA", "AAA", "AAA", 'A', new ItemStack(Items.miscItems.get(), 1, 1)});
GameRegistry.addRecipe(new ItemStack(Blocks.mud.get(), 1), new Object[] {"MM", "MM", 'M', new ItemStack(Items.miscItems.get(), 1, 0)}); GameRegistry.addRecipe(new ItemStack(Blocks.mud.get(), 1), new Object[] {"MM", "MM", 'M', Items.mudball.get()});
GameRegistry.addRecipe(new ItemStack(Blocks.amethystBlock.get(), 1), new Object[] {"AAA", "AAA", "AAA", 'A', new ItemStack(Items.miscItems.get(), 1, 2)}); GameRegistry.addRecipe(new ItemStack(Blocks.amethystOre.get(), 1, 1), new Object[] {"AAA", "AAA", "AAA", 'A', new ItemStack(Items.miscItems.get(), 1, 2)});
GameRegistry.addRecipe(new ItemStack(Blocks.ash.get(), 1), new Object[] {"AA", "AA", 'A', new ItemStack(Items.miscItems.get(), 1, 1)}); GameRegistry.addRecipe(new ItemStack(Blocks.ash.get(), 1), new Object[] {"AA", "AA", 'A', new ItemStack(Items.miscItems.get(), 1, 1)});
GameRegistry.addRecipe(new ItemStack(Blocks.mudBrick.get(), 1), new Object[] {"MM", "MM", 'M', new ItemStack(Items.miscItems.get(), 1, 3)}); GameRegistry.addRecipe(new ItemStack(Blocks.mudBrick.get(), 1), new Object[] {"MM", "MM", 'M', new ItemStack(Items.miscItems.get(), 1, 3)});
GameRegistry.addRecipe(new ItemStack(Blocks.planks.get(), 1, 10), new Object[] {"###", "###", "###", '#', Blocks.bamboo.get()}); // GameRegistry.addRecipe(new ItemStack(Blocks.planks.get(), 1, 10), new Object[] {"###", "###", "###", '#', Blocks.bamboo.get()});
GameRegistry.addRecipe(new ItemStack(Block.cobblestoneMossy, 1, 0), new Object[] {"MMM", "MCM", "MMM", 'M', Blocks.moss.get(), 'C', Block.cobblestone}); GameRegistry.addRecipe(new ItemStack(Block.cobblestoneMossy, 1, 0), new Object[] {"MMM", "MCM", "MMM", 'M', Blocks.moss.get(), 'C', Block.cobblestone});
GameRegistry.addRecipe(new ItemStack(Block.stoneBrick, 1, 1), new Object[] {"MMM", "MSM", "MMM", 'M', Blocks.moss.get(), 'S', Block.stoneBrick}); GameRegistry.addRecipe(new ItemStack(Block.stoneBrick, 1, 1), new Object[] {"MMM", "MSM", "MMM", 'M', Blocks.moss.get(), 'S', Block.stoneBrick});
//Mud Tools and Armor //Mud Tools and Armor
GameRegistry.addRecipe(new ItemStack(Items.pickaxeMud.get(), 1), new Object [] {"###", " X ", " X ", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0), Character.valueOf('X'), Item.stick}); GameRegistry.addRecipe(new ItemStack(Items.pickaxeMud.get(), 1), new Object [] {"###", " X ", " X ", Character.valueOf('#'), Items.mudball.get(), Character.valueOf('X'), Item.stick});
GameRegistry.addRecipe(new ItemStack(Items.shovelMud.get(), 1), new Object [] {"#", "X", "X", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0), Character.valueOf('X'), Item.stick}); GameRegistry.addRecipe(new ItemStack(Items.shovelMud.get(), 1), new Object [] {"#", "X", "X", Character.valueOf('#'), Items.mudball.get(), Character.valueOf('X'), Item.stick});
GameRegistry.addRecipe(new ItemStack(Items.swordMud.get(), 1), new Object [] {"#", "#", "X", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0), Character.valueOf('X'), Item.stick}); GameRegistry.addRecipe(new ItemStack(Items.swordMud.get(), 1), new Object [] {"#", "#", "X", Character.valueOf('#'), Items.mudball.get(), Character.valueOf('X'), Item.stick});
GameRegistry.addRecipe(new ItemStack(Items.axeMud.get(), 1), new Object [] {"##", "#X", " X", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0), Character.valueOf('X'), Item.stick}); GameRegistry.addRecipe(new ItemStack(Items.axeMud.get(), 1), new Object [] {"##", "#X", " X", Character.valueOf('#'), Items.mudball.get(), Character.valueOf('X'), Item.stick});
GameRegistry.addRecipe(new ItemStack(Items.hoeMud.get(), 1), new Object [] {"##", " X", " X", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0), Character.valueOf('X'), Item.stick}); GameRegistry.addRecipe(new ItemStack(Items.hoeMud.get(), 1), new Object [] {"##", " X", " X", Character.valueOf('#'), Items.mudball.get(), Character.valueOf('X'), Item.stick});
GameRegistry.addRecipe(new ItemStack(Items.helmetMud.get(), 1), new Object [] {"###", "# #", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0)}); GameRegistry.addRecipe(new ItemStack(Items.helmetMud.get(), 1), new Object [] {"###", "# #", Character.valueOf('#'), Items.mudball.get()});
GameRegistry.addRecipe(new ItemStack(Items.chestplateMud.get(), 1), new Object [] {"# #", "###", "###", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0)}); GameRegistry.addRecipe(new ItemStack(Items.chestplateMud.get(), 1), new Object [] {"# #", "###", "###", Character.valueOf('#'), Items.mudball.get()});
GameRegistry.addRecipe(new ItemStack(Items.leggingsMud.get(), 1), new Object [] {"###", "# #", "# #", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0)}); GameRegistry.addRecipe(new ItemStack(Items.leggingsMud.get(), 1), new Object [] {"###", "# #", "# #", Character.valueOf('#'), Items.mudball.get()});
GameRegistry.addRecipe(new ItemStack(Items.bootsMud.get(), 1), new Object [] {"# #", "# #", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 0)}); GameRegistry.addRecipe(new ItemStack(Items.bootsMud.get(), 1), new Object [] {"# #", "# #", Character.valueOf('#'), Items.mudball.get()});
//Amethyst Tools and Armor //Amethyst Tools and Armor
GameRegistry.addRecipe(new ItemStack(Items.pickaxeAmethyst.get(), 1), new Object [] {"###", " X ", " X ", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 2), Character.valueOf('X'), Item.ingotIron}); GameRegistry.addRecipe(new ItemStack(Items.pickaxeAmethyst.get(), 1), new Object [] {"###", " X ", " X ", Character.valueOf('#'), new ItemStack(Items.miscItems.get(), 1, 2), Character.valueOf('X'), Item.ingotIron});
@ -143,11 +143,13 @@ public class BOPCrafting
GameRegistry.addRecipe(new ItemStack(Items.ancientStaff.get(), 1, 1), new Object[] {"ISI", "ISI", " E ", 'I', Item.ingotIron, 'S', Block.whiteStone, 'E', Item.emerald}); GameRegistry.addRecipe(new ItemStack(Items.ancientStaff.get(), 1, 1), new Object[] {"ISI", "ISI", " E ", 'I', Item.ingotIron, 'S', Block.whiteStone, 'E', Item.emerald});
GameRegistry.addRecipe(new ItemStack(Items.ancientStaff.get(), 1, 2), new Object[] {"ISI", "IRI", "ISI", 'I', Item.ingotIron, 'S', Block.whiteStone, 'R', Item.redstone}); GameRegistry.addRecipe(new ItemStack(Items.ancientStaff.get(), 1, 2), new Object[] {"ISI", "IRI", "ISI", 'I', Item.ingotIron, 'S', Block.whiteStone, 'R', Item.redstone});
GameRegistry.addRecipe(new ItemStack(Items.ancientStaff.get(), 1, 3), new Object[] {" N ", "IDI", "ISI", 'I', Item.ingotIron, 'S', Block.whiteStone, 'D', Item.diamond, 'N', Item.netherStar}); GameRegistry.addRecipe(new ItemStack(Items.ancientStaff.get(), 1, 3), new Object[] {" N ", "IDI", "ISI", 'I', Item.ingotIron, 'S', Block.whiteStone, 'D', Item.diamond, 'N', Item.netherStar});
GameRegistry.addRecipe(new ItemStack(Items.enderporter.get(), 1, 0), new Object[] {"IOI", "OAO", "IOI", 'I', Item.eyeOfEnder, 'O', Block.obsidian, 'A', Blocks.amethystBlock.get()}); GameRegistry.addRecipe(new ItemStack(Items.enderporter.get(), 1, 0), new Object[] {"IOI", "OAO", "IOI", 'I', Item.eyeOfEnder, 'O', Block.obsidian, 'A', new ItemStack(Blocks.amethystOre.get(), 1, 1)});
GameRegistry.addRecipe(new ItemStack(Items.bopDiscMud.get(), 1), new Object[] {" M ", "MDM", " M ", 'M', new ItemStack(Items.miscItems.get(), 1, 0), 'D', Items.bopDisc.get()}); GameRegistry.addRecipe(new ItemStack(Items.bopDiscMud.get(), 1), new Object[] {" M ", "MDM", " M ", 'M', Items.mudball.get(), 'D', Items.bopDisc.get()});
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.bamboo.get(), 9), new Object[] {new ItemStack(Blocks.planks.get(), 1, 10)}); GameRegistry.addRecipe(new ItemStack(Blocks.planks.get(), 1, 10), new Object[] {"##", "##", '#', Blocks.bamboo.get()});
GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 9, 2), new Object[] {Blocks.amethystBlock.get()});
GameRegistry.addShapelessRecipe(new ItemStack(Blocks.bamboo.get(), 4), new Object[] {new ItemStack(Blocks.planks.get(), 1, 10)});
GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 9, 2), new Object[] {new ItemStack(Blocks.amethystOre.get(), 1, 1)});
//Plants //Plants
GameRegistry.addShapelessRecipe(new ItemStack(Items.shroomPowder.get(), 2), new Object[] {new ItemStack(Blocks.flowers.get(),1,10)}); GameRegistry.addShapelessRecipe(new ItemStack(Items.shroomPowder.get(), 2), new Object[] {new ItemStack(Blocks.flowers.get(),1,10)});
@ -158,7 +160,12 @@ public class BOPCrafting
GameRegistry.addSmelting(Block.dirt.blockID, new ItemStack(Blocks.driedDirt.get(), 1), 0F); GameRegistry.addSmelting(Block.dirt.blockID, new ItemStack(Blocks.driedDirt.get(), 1), 0F);
FurnaceRecipes.smelting().addSmelting(Blocks.redRock.get().blockID, 1, new ItemStack(Blocks.redRock.get(), 1, 0), 0.1F); FurnaceRecipes.smelting().addSmelting(Blocks.redRock.get().blockID, 1, new ItemStack(Blocks.redRock.get(), 1, 0), 0.1F);
FurnaceRecipes.smelting().addSmelting(Blocks.flowers.get().blockID, 11, new ItemStack(Item.dyePowder, 1, 2), 0.2F); FurnaceRecipes.smelting().addSmelting(Blocks.flowers.get().blockID, 11, new ItemStack(Item.dyePowder, 1, 2), 0.2F);
FurnaceRecipes.smelting().addSmelting(Items.miscItems.get().itemID, 2, new ItemStack(Items.miscItems.get(), 1, 3), 0F); FurnaceRecipes.smelting().addSmelting(Items.mudball.get().itemID, 0, new ItemStack(Items.miscItems.get(), 1, 0), 0F);
FurnaceRecipes.smelting().addSmelting(Blocks.logs1.get().blockID, new ItemStack(Item.coal, 1, 1), 15F);
FurnaceRecipes.smelting().addSmelting(Blocks.logs2.get().blockID, new ItemStack(Item.coal, 1, 1), 15F);
for (int i = 0; i < 3; ++i)
FurnaceRecipes.smelting().addSmelting(Blocks.logs3.get().blockID, i, new ItemStack(Item.coal, 1, 1), 15F);
GameRegistry.registerFuelHandler(checkNotNull(new FurnaceFuel())); GameRegistry.registerFuelHandler(checkNotNull(new FurnaceFuel()));
} }
@ -168,7 +175,8 @@ public class BOPCrafting
//Ore Registration //Ore Registration
for (int i = 0; i < 10; ++i) for (int i = 0; i < 10; ++i)
OreDictionary.registerOre("plankWood", new ItemStack(Blocks.planks.get(), 1, i)); OreDictionary.registerOre("plankWood", new ItemStack(Blocks.planks.get(), 1, i));
// OreDictionary.registerOre("plankWood", new ItemStack(Blocks.bambooThatching.get()));
OreDictionary.registerOre("stickWood", new ItemStack(Blocks.bamboo.get()));
OreDictionary.registerOre("treeSapling", new ItemStack(Blocks.saplings.get(), 1, OreDictionary.WILDCARD_VALUE)); OreDictionary.registerOre("treeSapling", new ItemStack(Blocks.saplings.get(), 1, OreDictionary.WILDCARD_VALUE));
OreDictionary.registerOre("treeSapling", new ItemStack(Blocks.colorizedSaplings.get(), 1, OreDictionary.WILDCARD_VALUE)); OreDictionary.registerOre("treeSapling", new ItemStack(Blocks.colorizedSaplings.get(), 1, OreDictionary.WILDCARD_VALUE));

View file

@ -18,6 +18,7 @@ import biomesoplenty.items.ItemBOP;
import biomesoplenty.items.ItemBOPAncientStaff; import biomesoplenty.items.ItemBOPAncientStaff;
import biomesoplenty.items.ItemBOPAxe; import biomesoplenty.items.ItemBOPAxe;
import biomesoplenty.items.ItemBOPHoe; import biomesoplenty.items.ItemBOPHoe;
import biomesoplenty.items.ItemBOPMudball;
import biomesoplenty.items.ItemBOPPickaxe; import biomesoplenty.items.ItemBOPPickaxe;
import biomesoplenty.items.ItemBOPRecord; import biomesoplenty.items.ItemBOPRecord;
import biomesoplenty.items.ItemBOPRecordMud; import biomesoplenty.items.ItemBOPRecordMud;
@ -101,6 +102,7 @@ public class BOPItems {
// Item declaration // Item declaration
Items.shroomPowder = Optional.of(new ItemShroomPowder(BOPConfiguration.shroomPowderID, 1, 0.5F, false)); Items.shroomPowder = Optional.of(new ItemShroomPowder(BOPConfiguration.shroomPowderID, 1, 0.5F, false));
Items.miscItems = Optional.of(new ItemBOP(BOPConfiguration.miscItemsID)); Items.miscItems = Optional.of(new ItemBOP(BOPConfiguration.miscItemsID));
Items.mudball = Optional.of(new ItemBOPMudball(BOPConfiguration.mudballID));
Items.ancientStaff = Optional.of(new ItemBOPAncientStaff(BOPConfiguration.ancientStaffID)); Items.ancientStaff = Optional.of(new ItemBOPAncientStaff(BOPConfiguration.ancientStaffID));
@ -133,8 +135,8 @@ public class BOPItems {
private static void registerNames() private static void registerNames()
{ {
LanguageRegistry.addName(Items.shroomPowder.get(), "Shroom Powder"); LanguageRegistry.addName(Items.shroomPowder.get(), "Shroom Powder");
LanguageRegistry.addName(new ItemStack(Items.miscItems.get(), 1, 0), "Mud Ball"); LanguageRegistry.addName(Items.mudball.get(), "Mud Ball");
LanguageRegistry.addName(new ItemStack(Items.miscItems.get(), 1, 3), "Mud Brick"); LanguageRegistry.addName(new ItemStack(Items.miscItems.get(), 1, 0), "Mud Brick");
LanguageRegistry.addName(new ItemStack(Items.miscItems.get(), 1, 2), "Amethyst"); LanguageRegistry.addName(new ItemStack(Items.miscItems.get(), 1, 2), "Amethyst");
LanguageRegistry.addName(new ItemStack(Items.miscItems.get(), 1, 1), "Pile of Ashes"); LanguageRegistry.addName(new ItemStack(Items.miscItems.get(), 1, 1), "Pile of Ashes");

View file

@ -14,7 +14,7 @@ public class BOPVanillaCompat {
public static void init() public static void init()
{ {
// Dispenser behavior for mud balls // Dispenser behavior for mud balls
BlockDispenser.dispenseBehaviorRegistry.putObject(new ItemStack(Items.miscItems.get(), 1, 0), new DispenserBehaviorMudball()); BlockDispenser.dispenseBehaviorRegistry.putObject(Items.mudball.get(), new DispenserBehaviorMudball());
ChestGenHooks dungeon; ChestGenHooks dungeon;
ChestGenHooks mineshaft; ChestGenHooks mineshaft;
@ -34,7 +34,7 @@ public class BOPVanillaCompat {
mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(Items.miscItems.get(), 1, 1), 2, 8, 25)); mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(Items.miscItems.get(), 1, 1), 2, 8, 25));
mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(Blocks.plants.get(),1,5), 4, 6, 15)); mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(Blocks.plants.get(),1,5), 4, 6, 15));
mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(Items.miscItems.get(), 1, 0), 2, 8, 10)); mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(Items.mudball.get(), 1, 0), 2, 8, 10));
mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(Item.dyePowder, 1, 3), 4, 12, 75)); mineshaft.addItem(new WeightedRandomChestContent(new ItemStack(Item.dyePowder, 1, 3), 4, 12, 75));
strongholdCorridor.addItem(new WeightedRandomChestContent(new ItemStack(Blocks.moss.get()), 2, 8, 50)); strongholdCorridor.addItem(new WeightedRandomChestContent(new ItemStack(Blocks.moss.get()), 2, 8, 50));

View file

@ -42,7 +42,7 @@ public class AchievementHelper
achAsh = (new Achievement(3060, "achAsh", 1, 3, new ItemStack(Items.miscItems.get(), 1, 1), achFlower)).registerAchievement(); achAsh = (new Achievement(3060, "achAsh", 1, 3, new ItemStack(Items.miscItems.get(), 1, 1), achFlower)).registerAchievement();
achOrigin = (new Achievement(3061, "achOrigin", 0, 5, Blocks.originGrass.get(), achFlower)).setSpecial().registerAchievement(); achOrigin = (new Achievement(3061, "achOrigin", 0, 5, Blocks.originGrass.get(), achFlower)).setSpecial().registerAchievement();
achPromised = (new Achievement(3062, "achPromised", 0, -5, Blocks.holyGrass.get(), achFlower)).setSpecial().registerAchievement(); achPromised = (new Achievement(3062, "achPromised", 0, -5, Blocks.holyGrass.get(), achFlower)).setSpecial().registerAchievement();
achMud = (new Achievement(3063, "achMud", -2, -1, new ItemStack(Items.miscItems.get(), 1, 0), achFlower)).registerAchievement(); achMud = (new Achievement(3063, "achMud", -2, -1, Items.mudball.get(), achFlower)).registerAchievement();
achShroom = (new Achievement(3064, "achShroom", 1, -2, new ItemStack(Blocks.flowers.get(),1,10), achFlower)).registerAchievement(); achShroom = (new Achievement(3064, "achShroom", 1, -2, new ItemStack(Blocks.flowers.get(),1,10), achFlower)).registerAchievement();
achBarley = (new Achievement(3065, "achBarley", -2, 4, new ItemStack(Blocks.plants.get(),1,6), achFlower)).registerAchievement(); achBarley = (new Achievement(3065, "achBarley", -2, 4, new ItemStack(Blocks.plants.get(),1,6), achFlower)).registerAchievement();
achMoss = (new Achievement(3066, "achMoss", -1, -3, Blocks.moss.get(), achFlower)).registerAchievement(); achMoss = (new Achievement(3066, "achMoss", -1, -3, Blocks.moss.get(), achFlower)).registerAchievement();
@ -92,7 +92,7 @@ public class AchievementHelper
{ {
player.addStat(achPromised, 1); player.addStat(achPromised, 1);
} }
if (item.itemID == Items.miscItems.get().itemID && item.getItemDamage() == 0) if (item.itemID == Items.mudball.get().itemID)
{ {
player.addStat(achMud, 1); player.addStat(achMud, 1);
} }

View file

@ -88,7 +88,7 @@ public class BonemealUse
} }
} }
} }
else if (event.ID == Blocks.holyGrass.get().blockID) else if (event.ID == Blocks.holyGrass.get().blockID && event.world.getBlockMetadata(event.X, event.Y, event.Z) == 0)
{ {
int var13 = event.X; int var13 = event.X;
int var14 = event.Y + 1; int var14 = event.Y + 1;

View file

@ -1,5 +1,6 @@
package biomesoplenty.integration; package biomesoplenty.integration;
import cpw.mods.fml.common.event.FMLInterModComms;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import biomesoplenty.api.BlockReferences; import biomesoplenty.api.BlockReferences;
import biomesoplenty.api.Blocks; import biomesoplenty.api.Blocks;
@ -14,6 +15,7 @@ public class ThaumcraftIntegration {
protected static void init() protected static void init()
{ {
addAspects(); addAspects();
FMLInterModComms.sendMessage("Thaumcraft", "harvestClickableCrop", new ItemStack(Blocks.leavesFruit.get(), 1, 3));
} }
private static void addAspects() private static void addAspects()

View file

@ -4,19 +4,16 @@ import java.util.List;
import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs; import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.util.Icon; import net.minecraft.util.Icon;
import net.minecraft.world.World;
import biomesoplenty.BiomesOPlenty; import biomesoplenty.BiomesOPlenty;
import biomesoplenty.items.projectiles.EntityMudball;
import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly; import cpw.mods.fml.relauncher.SideOnly;
public class ItemBOP extends Item public class ItemBOP extends Item
{ {
private static String[] items = {"mudball", "ash", "amethyst", "mudbrick"}; private static String[] items = {"mudbrick", "ash", "amethyst"};
@SideOnly(Side.CLIENT) @SideOnly(Side.CLIENT)
private Icon[] textures; private Icon[] textures;
@ -53,23 +50,4 @@ public class ItemBOP extends Item
for(int meta = 0; meta < items.length; ++meta) for(int meta = 0; meta < items.length; ++meta)
subTypes.add(new ItemStack(itemId, 1, meta)); subTypes.add(new ItemStack(itemId, 1, meta));
} }
public ItemStack onItemRightClick(ItemStack itemStack, World par2World, EntityPlayer par3EntityPlayer)
{
if (itemStack.getItemDamage() == 0)
{
if (!par3EntityPlayer.capabilities.isCreativeMode)
{
--itemStack.stackSize;
}
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
if (!par2World.isRemote)
{
par2World.spawnEntityInWorld(new EntityMudball(par2World, par3EntityPlayer));
}
}
return itemStack;
}
} }

View file

@ -0,0 +1,27 @@
package biomesoplenty.items;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class ItemBOPAmethyst extends ItemBlock
{
private static final String[] types = new String[] {"amethystOre", "amethystBlock"};
public ItemBOPAmethyst(int par1)
{
super(par1);
setMaxDamage(0);
setHasSubtypes(true);
}
@Override
public int getMetadata(int meta)
{
return meta;
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
return types[itemstack.getItemDamage() & 15];
}
}

View file

@ -10,7 +10,7 @@ import net.minecraft.world.World;
public class ItemBOPFlower extends ItemBlock public class ItemBOPFlower extends ItemBlock
{ {
private static final String[] plants = new String[] {"tinyflower", "swampflower", "deadbloom", "glowflower", "hydrangea", "orangeflower", "pinkflower", "purpleflower", "violet", "whiteflower", "toadstool", "cactus"}; private static final String[] plants = new String[] {"clover", "swampflower", "deadbloom", "glowflower", "hydrangea", "daisy", "tulip", "wildflower", "violet", "anemone", "toadstool", "cactus"};
public ItemBOPFlower(int par1) public ItemBOPFlower(int par1)
{ {

View file

@ -0,0 +1,27 @@
package biomesoplenty.items;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
public class ItemBOPGrass extends ItemBlock
{
private static final String[] types = new String[] {"holyGrass", "smolderingGrass"};
public ItemBOPGrass(int par1)
{
super(par1);
setMaxDamage(0);
setHasSubtypes(true);
}
@Override
public int getMetadata(int meta)
{
return meta;
}
@Override
public String getUnlocalizedName(ItemStack itemstack) {
return types[itemstack.getItemDamage() & 15];
}
}

View file

@ -0,0 +1,38 @@
package biomesoplenty.items;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.items.projectiles.EntityMudball;
public class ItemBOPMudball extends Item
{
public ItemBOPMudball(int par1)
{
super(par1);
setCreativeTab(BiomesOPlenty.tabBiomesOPlenty);
setUnlocalizedName("mudball");
}
public void registerIcons(IconRegister iconRegister)
{
itemIcon = iconRegister.registerIcon("BiomesOPlenty:mudball");
}
public ItemStack onItemRightClick(ItemStack itemStack, World par2World, EntityPlayer par3EntityPlayer)
{
if (!par3EntityPlayer.capabilities.isCreativeMode)
--itemStack.stackSize;
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
if (!par2World.isRemote)
par2World.spawnEntityInWorld(new EntityMudball(par2World, par3EntityPlayer));
return itemStack;
}
}

View file

@ -7,7 +7,7 @@ import net.minecraft.util.Icon;
public class ItemBOPSapling extends ItemBlock public class ItemBOPSapling extends ItemBlock
{ {
private static final String[] saplings = new String[] {"apple", "yellow", "bamboo", "magic", "dark", "brown", "fir", "holy", "orange", "origin", "pink", "red", "white"}; private static final String[] saplings = new String[] {"apple", "yellowAutumn", "bamboo", "magic", "dark", "dead", "fir", "holy", "orangeAutumn", "origin", "pinkCherry", "maple", "whiteCherry"};
private static final int MAX = 12; private static final int MAX = 12;
public ItemBOPSapling(int par1) public ItemBOPSapling(int par1)

View file

@ -6,29 +6,31 @@ import biomesoplenty.api.Blocks;
import biomesoplenty.configuration.BOPBlocks; import biomesoplenty.configuration.BOPBlocks;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator; import net.minecraft.world.gen.feature.WorldGenerator;
public class WorldGenCattail extends WorldGenerator public class WorldGenCattail extends WorldGenerator
{ {
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) public boolean generate(World world, Random par2Random, int par3, int par4, int par5)
{ {
int var11; int var11;
for (boolean var6 = false; ((var11 = par1World.getBlockId(par3, par4, par5)) == 0 || var11 == Block.leaves.blockID) && par4 > 0; --par4) for (boolean var6 = false; ((var11 = world.getBlockId(par3, par4, par5)) == 0 || var11 == Block.leaves.blockID) && par4 > 0; --par4)
{ {
; ;
} }
for (int var7 = 0; var7 < 128; ++var7) for (int var7 = 0; var7 < 128; ++var7)
{ {
int var8 = par3 + par2Random.nextInt(8) - par2Random.nextInt(8); int x = par3 + par2Random.nextInt(8) - par2Random.nextInt(8);
int var9 = par4 + par2Random.nextInt(4) - par2Random.nextInt(4); int y = par4 + par2Random.nextInt(4) - par2Random.nextInt(4);
int var10 = par5 + par2Random.nextInt(8) - par2Random.nextInt(8); int z = par5 + par2Random.nextInt(8) - par2Random.nextInt(8);
if (par1World.isAirBlock(var8, var9, var10) && Blocks.plants.get().canBlockStay(par1World, var8, var9, var10)) if (world.isAirBlock(x, y, z) && Blocks.plants.get().canBlockStay(world, x, y, z))
{ {
par1World.setBlock(var8, var9, var10, Blocks.plants.get().blockID, 7, 2); if ((world.getBlockMaterial(x - 1, y - 1, z) == Material.water ? true : (world.getBlockMaterial(x + 1, y - 1, z) == Material.water ? true : (world.getBlockMaterial(x, y - 1, z - 1) == Material.water ? true : world.getBlockMaterial(x, y - 1, z + 1) == Material.water))))
world.setBlock(x, y, z, Blocks.plants.get().blockID, 7, 2);
} }
} }

View file

@ -448,7 +448,7 @@ public class WorldGenDeadTree3 extends WorldGenerator
int[] var2 = new int[] {this.basePos[0], this.basePos[1] + this.heightLimit - 1, this.basePos[2]}; int[] var2 = new int[] {this.basePos[0], this.basePos[1] + this.heightLimit - 1, this.basePos[2]};
int var3 = this.worldObj.getBlockId(this.basePos[0], this.basePos[1] - 1, this.basePos[2]); int var3 = this.worldObj.getBlockId(this.basePos[0], this.basePos[1] - 1, this.basePos[2]);
if (var3 != 2 && var3 != 3 && var3 != Blocks.smolderingGrass.get().blockID && var3 != Blocks.ash.get().blockID) if (var3 != 2 && var3 != 3 && var3 != Blocks.holyGrass.get().blockID && var3 != Blocks.ash.get().blockID)
{ {
return false; return false;
} }

View file

@ -76,7 +76,7 @@ public class WorldGenPromisedTree extends WorldGenerator
if ((var11 == Blocks.holyGrass.get().blockID) && par4 < 256 - var6 - 1) if ((var11 == Blocks.holyGrass.get().blockID) && par4 < 256 - var6 - 1)
{ {
this.setBlock(par1World, par3, par4 - 1, par5, Blocks.holyGrass.get().blockID); this.setBlockAndMetadata(par1World, par3, par4 - 1, par5, Blocks.holyGrass.get().blockID, 0);
var21 = par2Random.nextInt(2); var21 = par2Random.nextInt(2);
var13 = 1; var13 = 1;
byte var22 = 0; byte var22 = 0;

View file

@ -74,7 +74,7 @@ public class WorldGenPromisedTree2 extends WorldGenerator
if ((var8 == Blocks.holyGrass.get().blockID) && par4 < 256 - var6 - 1) if ((var8 == Blocks.holyGrass.get().blockID) && par4 < 256 - var6 - 1)
{ {
this.setBlock(par1World, par3, par4 - 1, par5, Blocks.holyGrass.get().blockID); this.setBlockAndMetadata(par1World, par3, par4 - 1, par5, Blocks.holyGrass.get().blockID, 0);
int var16; int var16;
for (var16 = par4 - 3 + var6; var16 <= par4 + var6; ++var16) for (var16 = par4 - 3 + var6; var16 <= par4 + var6; ++var16)

View file

@ -85,10 +85,10 @@ public class WorldGenPromisedTree3 extends WorldGenerator
{ {
if ((var14 == Blocks.holyGrass.get().blockID) && var4 < 256 - var6 - 1) if ((var14 == Blocks.holyGrass.get().blockID) && var4 < 256 - var6 - 1)
{ {
var1.setBlock(var3, var4 - 1, var5, Blocks.holyGrass.get().blockID); var1.setBlock(var3, var4 - 1, var5, Blocks.holyGrass.get().blockID, 0, 2);
var1.setBlock(var3 - 1, var4 - 1, var5, Blocks.holyGrass.get().blockID); var1.setBlock(var3 - 1, var4 - 1, var5, Blocks.holyGrass.get().blockID, 0, 2);
var1.setBlock(var3, var4 - 1, var5 - 1, Blocks.holyGrass.get().blockID); var1.setBlock(var3, var4 - 1, var5 - 1, Blocks.holyGrass.get().blockID, 0, 2);
var1.setBlock(var3 - 1, var4 - 1, var5 - 1, Blocks.holyGrass.get().blockID); var1.setBlock(var3 - 1, var4 - 1, var5 - 1, Blocks.holyGrass.get().blockID, 0, 2);
var15 = var2.nextInt(2); var15 = var2.nextInt(2);
int var16 = 1; int var16 = 1;
boolean var17 = false; boolean var17 = false;

View file

@ -17,10 +17,13 @@ public class WorldGenSmolderingGrass extends WorldGenerator
/** The number of blocks to generate. */ /** The number of blocks to generate. */
private int numberOfBlocks; private int numberOfBlocks;
public WorldGenSmolderingGrass(int par1, int par2) private int blockMeta;
public WorldGenSmolderingGrass(int par1, int meta, int par2)
{ {
this.minableBlockId = par1; this.minableBlockId = par1;
this.numberOfBlocks = par2; this.numberOfBlocks = par2;
this.blockMeta = meta;
} }
public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5) public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
@ -66,7 +69,7 @@ public class WorldGenSmolderingGrass extends WorldGenerator
if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && par1World.getBlockId(var38, var41, var44) == Blocks.ash.get().blockID) if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && par1World.getBlockId(var38, var41, var44) == Blocks.ash.get().blockID)
{ {
par1World.setBlock(var38, var41, var44, this.minableBlockId); par1World.setBlock(var38, var41, var44, this.minableBlockId, this.blockMeta, 2);
} }
} }
} }

View file

@ -0,0 +1,95 @@
package biomesoplenty.worldgen.structure;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Map.Entry;
import biomesoplenty.configuration.BOPConfiguration;
import net.minecraft.util.MathHelper;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.gen.structure.MapGenStructure;
import net.minecraft.world.gen.structure.MapGenVillage;
import net.minecraft.world.gen.structure.StructureStart;
public class BOPMapGenVillage extends MapGenStructure
{
/** A list of all the biomes villages can spawn in. */
public static List villageSpawnBiomes = Arrays.asList(new BiomeGenBase[] {BiomeGenBase.plains, BiomeGenBase.desert});
/** World terrain type, 0 for normal, 1 for flat map */
private int terrainType;
private int distance;
private int field_82666_h;
public BOPMapGenVillage()
{
this.terrainType = 0;
this.distance = BOPConfiguration.villageDistance;
this.field_82666_h = BOPConfiguration.villageDistance / 4;
villageSpawnBiomes = MapGenVillage.villageSpawnBiomes;
}
public BOPMapGenVillage(Map par1Map)
{
this();
Iterator iterator = par1Map.entrySet().iterator();
while (iterator.hasNext())
{
Entry entry = (Entry)iterator.next();
if (((String)entry.getKey()).equals("size"))
{
this.terrainType = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.terrainType, 0);
}
else if (((String)entry.getKey()).equals("distance"))
{
this.distance = MathHelper.parseIntWithDefaultAndMax((String)entry.getValue(), this.distance, this.field_82666_h + 1);
}
}
}
protected boolean canSpawnStructureAtCoords(int par1, int par2)
{
int k = par1;
int l = par2;
if (par1 < 0)
{
par1 -= this.distance - 1;
}
if (par2 < 0)
{
par2 -= this.distance - 1;
}
int i1 = par1 / this.distance;
int j1 = par2 / this.distance;
Random random = this.worldObj.setRandomSeed(i1, j1, 10387312);
i1 *= this.distance;
j1 *= this.distance;
i1 += random.nextInt(this.distance - this.field_82666_h);
j1 += random.nextInt(this.distance - this.field_82666_h);
if (k == i1 && l == j1)
{
boolean flag = this.worldObj.getWorldChunkManager().areBiomesViable(k * 16 + 8, l * 16 + 8, 0, villageSpawnBiomes);
if (flag)
{
return true;
}
}
return false;
}
protected StructureStart getStructureStart(int par1, int par2)
{
return new BOPStructureVillageStart(this.worldObj, this.rand, par1, par2, this.terrainType);
}
}

View file

@ -0,0 +1,70 @@
package biomesoplenty.worldgen.structure;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.world.gen.structure.ComponentVillageRoadPiece;
import net.minecraft.world.gen.structure.ComponentVillageStartPiece;
import net.minecraft.world.gen.structure.StructureComponent;
import net.minecraft.world.gen.structure.StructureStart;
import net.minecraft.world.gen.structure.StructureVillagePieces;
class BOPStructureVillageStart extends StructureStart
{
/** well ... thats what it does */
private boolean hasMoreThanTwoComponents = false;
public BOPStructureVillageStart(World par1World, Random par2Random, int par3, int par4, int par5)
{
ArrayList arraylist = StructureVillagePieces.getStructureVillageWeightedPieceList(par2Random, par5);
ComponentVillageStartPiece componentvillagestartpiece = new ComponentVillageStartPiece(par1World.getWorldChunkManager(), 0, par2Random, (par3 << 4) + 2, (par4 << 4) + 2, arraylist, par5);
this.components.add(componentvillagestartpiece);
componentvillagestartpiece.buildComponent(componentvillagestartpiece, this.components, par2Random);
ArrayList arraylist1 = componentvillagestartpiece.field_74930_j;
ArrayList arraylist2 = componentvillagestartpiece.field_74932_i;
int l;
while (!arraylist1.isEmpty() || !arraylist2.isEmpty())
{
StructureComponent structurecomponent;
if (arraylist1.isEmpty())
{
l = par2Random.nextInt(arraylist2.size());
structurecomponent = (StructureComponent)arraylist2.remove(l);
structurecomponent.buildComponent(componentvillagestartpiece, this.components, par2Random);
}
else
{
l = par2Random.nextInt(arraylist1.size());
structurecomponent = (StructureComponent)arraylist1.remove(l);
structurecomponent.buildComponent(componentvillagestartpiece, this.components, par2Random);
}
}
this.updateBoundingBox();
l = 0;
Iterator iterator = this.components.iterator();
while (iterator.hasNext())
{
StructureComponent structurecomponent1 = (StructureComponent)iterator.next();
if (!(structurecomponent1 instanceof ComponentVillageRoadPiece))
{
++l;
}
}
this.hasMoreThanTwoComponents = l > 2;
}
/**
* currently only defined for Villages, returns true if Village has more than 2 non-road components
*/
public boolean isSizeableStructure()
{
return this.hasMoreThanTwoComponents;
}
}

View file

@ -15,6 +15,7 @@ import java.util.List;
import java.util.Random; import java.util.Random;
import biomesoplenty.configuration.BOPConfiguration; import biomesoplenty.configuration.BOPConfiguration;
import biomesoplenty.worldgen.structure.BOPMapGenVillage;
import net.minecraft.block.Block; import net.minecraft.block.Block;
import net.minecraft.block.BlockSand; import net.minecraft.block.BlockSand;
@ -59,7 +60,7 @@ public class ChunkProviderBOP implements IChunkProvider
private double[] stoneNoise = new double[256]; private double[] stoneNoise = new double[256];
private MapGenBase caveGenerator = new MapGenCaves(); private MapGenBase caveGenerator = new MapGenCaves();
private MapGenStronghold strongholdGenerator = new MapGenStronghold(); private MapGenStronghold strongholdGenerator = new MapGenStronghold();
private MapGenVillage villageGenerator = new MapGenVillage(); private BOPMapGenVillage villageGenerator = new BOPMapGenVillage();
private MapGenMineshaft mineshaftGenerator = new MapGenMineshaft(); private MapGenMineshaft mineshaftGenerator = new MapGenMineshaft();
private MapGenScatteredFeature scatteredFeatureGenerator = new MapGenScatteredFeature(); private MapGenScatteredFeature scatteredFeatureGenerator = new MapGenScatteredFeature();
private MapGenBase ravineGenerator = new MapGenRavine(); private MapGenBase ravineGenerator = new MapGenRavine();
@ -80,7 +81,7 @@ public class ChunkProviderBOP implements IChunkProvider
{ {
caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, CAVE); caveGenerator = TerrainGen.getModdedMapGen(caveGenerator, CAVE);
strongholdGenerator = (MapGenStronghold) TerrainGen.getModdedMapGen(strongholdGenerator, STRONGHOLD); strongholdGenerator = (MapGenStronghold) TerrainGen.getModdedMapGen(strongholdGenerator, STRONGHOLD);
villageGenerator = (MapGenVillage) TerrainGen.getModdedMapGen(villageGenerator, VILLAGE); villageGenerator = (BOPMapGenVillage) TerrainGen.getModdedMapGen(villageGenerator, VILLAGE);
mineshaftGenerator = (MapGenMineshaft) TerrainGen.getModdedMapGen(mineshaftGenerator, MINESHAFT); mineshaftGenerator = (MapGenMineshaft) TerrainGen.getModdedMapGen(mineshaftGenerator, MINESHAFT);
scatteredFeatureGenerator = (MapGenScatteredFeature) TerrainGen.getModdedMapGen(scatteredFeatureGenerator, SCATTERED_FEATURE); scatteredFeatureGenerator = (MapGenScatteredFeature) TerrainGen.getModdedMapGen(scatteredFeatureGenerator, SCATTERED_FEATURE);
ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator, RAVINE); ravineGenerator = TerrainGen.getModdedMapGen(ravineGenerator, RAVINE);

View file

@ -11,7 +11,7 @@ public class WTBiomesOP extends WorldTypeBase
{ {
public WTBiomesOP() { public WTBiomesOP() {
super(4, "BIOMESOP"); super(4, "BIOMESOP");
this.removeAllBiomes(); //this.removeAllBiomes();
this.removeBiome(BiomeGenBase.plains); this.removeBiome(BiomeGenBase.plains);
this.removeBiome(BiomeGenBase.desert); this.removeBiome(BiomeGenBase.desert);
this.removeBiome(BiomeGenBase.forest); this.removeBiome(BiomeGenBase.forest);

View file

Before

Width:  |  Height:  |  Size: 286 B

After

Width:  |  Height:  |  Size: 286 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 628 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 598 B

View file

Before

Width:  |  Height:  |  Size: 238 B

After

Width:  |  Height:  |  Size: 238 B

View file

Before

Width:  |  Height:  |  Size: 320 B

After

Width:  |  Height:  |  Size: 320 B

View file

Before

Width:  |  Height:  |  Size: 628 B

After

Width:  |  Height:  |  Size: 628 B

View file

Before

Width:  |  Height:  |  Size: 660 B

After

Width:  |  Height:  |  Size: 660 B

View file

Before

Width:  |  Height:  |  Size: 642 B

After

Width:  |  Height:  |  Size: 642 B

View file

Before

Width:  |  Height:  |  Size: 653 B

After

Width:  |  Height:  |  Size: 653 B

View file

Before

Width:  |  Height:  |  Size: 628 B

After

Width:  |  Height:  |  Size: 628 B

View file

Before

Width:  |  Height:  |  Size: 602 B

After

Width:  |  Height:  |  Size: 602 B

View file

Before

Width:  |  Height:  |  Size: 573 B

After

Width:  |  Height:  |  Size: 573 B

View file

Before

Width:  |  Height:  |  Size: 500 B

After

Width:  |  Height:  |  Size: 500 B

View file

Before

Width:  |  Height:  |  Size: 480 B

After

Width:  |  Height:  |  Size: 480 B

View file

Before

Width:  |  Height:  |  Size: 732 B

After

Width:  |  Height:  |  Size: 732 B

View file

Before

Width:  |  Height:  |  Size: 686 B

After

Width:  |  Height:  |  Size: 686 B

View file

Before

Width:  |  Height:  |  Size: 592 B

After

Width:  |  Height:  |  Size: 592 B

View file

Before

Width:  |  Height:  |  Size: 562 B

After

Width:  |  Height:  |  Size: 562 B

View file

Before

Width:  |  Height:  |  Size: 542 B

After

Width:  |  Height:  |  Size: 542 B

View file

Before

Width:  |  Height:  |  Size: 589 B

After

Width:  |  Height:  |  Size: 589 B

View file

Before

Width:  |  Height:  |  Size: 631 B

After

Width:  |  Height:  |  Size: 631 B

Some files were not shown because too many files have changed in this diff Show more