Added wild carrot gen and salads

This commit is contained in:
Matt Caughey 2013-07-10 08:51:30 -04:00
parent 01fffd09e9
commit 9b1170b142
19 changed files with 84 additions and 11 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 441 B

After

Width:  |  Height:  |  Size: 491 B

View File

@ -454,7 +454,7 @@ public class BiomeDecoratorBOP extends BiomeDecorator
netherWartGen = new WorldGenNetherWart(Block.netherStalk.blockID, 0);
canyonGrassGen = new WorldGenCanyonGrass(Blocks.foliage.get().blockID, 2);
steppeGen = new WorldGenSteppe(Block.sand.blockID, 0);
carrotGen = new WorldGenCarrots(Block.tallGrass.blockID, 0);
carrotGen = new WorldGenBOPFlowers(Blocks.plants.get().blockID, 11);
potatoGen = new WorldGenPotatoes(Block.tallGrass.blockID, 0);
bigMushroomGen = new WorldGenBigMushroom();
reedGen = new WorldGenReed();

View File

@ -30,6 +30,7 @@ public class BiomeGenChaparral extends BiomeGenBase
customBiomeDecorator.berryBushesPerChunk = 2;
customBiomeDecorator.generateStoneInGrass = true;
customBiomeDecorator.generatePumpkins = false;
customBiomeDecorator.carrotsPerChunk = 1;
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
}

View File

@ -29,6 +29,7 @@ public class BiomeGenForestNew extends BiomeGenBase
customBiomeDecorator.poisonIvyPerChunk = 2;
customBiomeDecorator.sunflowersPerChunk = 1;
customBiomeDecorator.berryBushesPerChunk = 2;
customBiomeDecorator.carrotsPerChunk = 1;
}
/**

View File

@ -43,6 +43,7 @@ public class BiomeGenFungiForest extends BiomeGenBase
customBiomeDecorator.highCattailsPerChunk = 2;
customBiomeDecorator.reedsBOPPerChunk = 1;
customBiomeDecorator.lilyflowersPerChunk = 2;
customBiomeDecorator.carrotsPerChunk = 1;
customBiomeDecorator.generateMycelium = true;
customBiomeDecorator.generatePumpkins = true;
waterColorMultiplier = 65326;

View File

@ -36,6 +36,7 @@ public class BiomeGenGarden extends BiomeGenBase
customBiomeDecorator.sandPerChunk2 = -999;
customBiomeDecorator.bushesPerChunk = 10;
customBiomeDecorator.lilyflowersPerChunk = 4;
customBiomeDecorator.carrotsPerChunk = 1;
customBiomeDecorator.generatePumpkins = true;
customBiomeDecorator.generateMelons = true;
spawnableCreatureList.clear();

View File

@ -20,6 +20,7 @@ public class BiomeGenHighland extends BiomeGenBase
customBiomeDecorator.grassPerChunk = 25;
customBiomeDecorator.potatoesPerChunk = -999;
customBiomeDecorator.generateBoulders = false;
customBiomeDecorator.carrotsPerChunk = 1;
}
@Override

View File

@ -22,6 +22,7 @@ public class BiomeGenJadeCliffs extends BiomeGenBase
customBiomeDecorator = (BiomeDecoratorBOP)theBiomeDecorator;
customBiomeDecorator.treesPerChunk = 12;
customBiomeDecorator.grassPerChunk = 3;
customBiomeDecorator.carrotsPerChunk = 1;
}
@Override

View File

@ -25,7 +25,7 @@ public class BiomeGenMeadow extends BiomeGenBase
customBiomeDecorator.grassPerChunk = 10;
customBiomeDecorator.tinyFlowersPerChunk = 14;
customBiomeDecorator.flowersPerChunk = 10;
customBiomeDecorator.carrotsPerChunk = -999;
customBiomeDecorator.carrotsPerChunk = 1;
customBiomeDecorator.sandPerChunk = -999;
customBiomeDecorator.sandPerChunk2 = -999;
customBiomeDecorator.hydrangeasPerChunk = 3;

View File

@ -22,7 +22,7 @@ public class BiomeGenMeadowForest extends BiomeGenBase
customBiomeDecorator.grassPerChunk = 10;
customBiomeDecorator.tinyFlowersPerChunk = 7;
customBiomeDecorator.flowersPerChunk = 10;
customBiomeDecorator.carrotsPerChunk = -999;
customBiomeDecorator.carrotsPerChunk = 1;
customBiomeDecorator.sandPerChunk = -999;
customBiomeDecorator.sandPerChunk2 = -999;
customBiomeDecorator.hydrangeasPerChunk = 3;

View File

@ -29,6 +29,7 @@ public class BiomeGenOrchard extends BiomeGenBase
customBiomeDecorator.sunflowersPerChunk = 1;
customBiomeDecorator.lilyflowersPerChunk = 2;
customBiomeDecorator.berryBushesPerChunk = 3;
customBiomeDecorator.carrotsPerChunk = 1;
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
}

View File

@ -26,6 +26,7 @@ public class BiomeGenPrairie extends BiomeGenBase
customBiomeDecorator.whiteFlowersPerChunk = 45;
customBiomeDecorator.portobellosPerChunk = 2;
customBiomeDecorator.berryBushesPerChunk = 2;
customBiomeDecorator.carrotsPerChunk = 1;
spawnableCreatureList.add(new SpawnListEntry(EntityHorse.class, 5, 2, 6));
}

View File

@ -27,6 +27,7 @@ public class BiomeGenSpruceWoods extends BiomeGenBase
customBiomeDecorator.sproutsPerChunk = 3;
customBiomeDecorator.poisonIvyPerChunk = 1;
customBiomeDecorator.berryBushesPerChunk = 3;
customBiomeDecorator.carrotsPerChunk = 1;
}
/**

View File

@ -28,6 +28,7 @@ public class BiomeGenTemperateRainforest extends BiomeGenBase
customBiomeDecorator.generatePumpkins = false;
customBiomeDecorator.blueMilksPerChunk = 3;
customBiomeDecorator.poisonIvyPerChunk = 1;
customBiomeDecorator.carrotsPerChunk = 1;
}
/**

View File

@ -19,11 +19,12 @@ import net.minecraft.world.World;
import net.minecraftforge.common.IShearable;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Blocks;
import biomesoplenty.api.Items;
import biomesoplenty.blocks.renderers.RenderUtils;
public class BlockBOPPlant extends BlockFlower implements IShearable
{
private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "reed", "cattailtop", "cattailbottom"};
private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "reed", "cattailtop", "cattailbottom", "wildcarrot"};
private Icon[] textures;
private static final int CATTAILTOP = 9;
@ -89,8 +90,11 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
@SuppressWarnings({ "rawtypes", "unchecked" })
public void getSubBlocks(int blockID, CreativeTabs creativeTabs, List list)
{
for (int i = 0; i < CATTAILTOP; ++i) {
list.add(new ItemStack(blockID, 1, i));
for (int i = 0; i < 12; ++i) {
if (i != 9 && i != 10)
{
list.add(new ItemStack(blockID, 1, i));
}
}
}
@ -222,19 +226,35 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
@Override
public int idDropped(int par1, Random par2Random, int par3)
{
if (par1 > 5)
if (par1 > 5 && par1 != 11)
{
return blockID;
}
else if (par1 == 11)
{
return Items.berries.get().itemID;
}
else
{
return -1;
}
}
@Override
public int damageDropped(int meta)
{
if (meta == 9)
{
return 7;
}
else if (meta == 11)
{
return 2;
}
else
{
return meta;
}
}
@Override
@ -244,6 +264,8 @@ public class BlockBOPPlant extends BlockFlower implements IShearable
return random.nextInt(5) == 0 ? 1 : 0;
else if (meta == 7 || meta == 8 || meta == 9)
return 1;
else if (meta == 11)
return random.nextInt(7) == 0 ? 2 : 1;
else
return 0;
}

View File

@ -250,6 +250,9 @@ public class BOPCrafting
//Plants
GameRegistry.addShapelessRecipe(new ItemStack(Items.shroomPowder.get(), 2), new Object[] {new ItemStack(Blocks.mushrooms.get(),1,0)});
GameRegistry.addShapelessRecipe(new ItemStack(Items.miscItems.get(), 1, 3), new Object[] {new ItemStack(Blocks.foliage.get(),1,7)});
GameRegistry.addShapelessRecipe(new ItemStack(Items.berries.get(), 1, 4), new Object[] {Item.bowlEmpty, new ItemStack(Items.berries.get(), 1, 0), Item.appleRed, Item.melon});
GameRegistry.addShapelessRecipe(new ItemStack(Items.berries.get(), 1, 5), new Object[] {Item.bowlEmpty, new ItemStack(Items.berries.get(), 1, 2), Item.carrot, Item.potato});
GameRegistry.addShapelessRecipe(new ItemStack(Items.berries.get(), 1, 6), new Object[] {Item.bowlEmpty, new ItemStack(Blocks.mushrooms.get(), 1, 0), new ItemStack(Blocks.mushrooms.get(), 1, 1), new ItemStack(Blocks.mushrooms.get(), 1, 2)});
//Glass
GameRegistry.addRecipe(new ItemStack(Blocks.glass.get(), 1, 0), new Object [] {"GGG", "GGG", "GGG", Character.valueOf('G'), Block.glass});

View File

@ -13,7 +13,7 @@ import cpw.mods.fml.relauncher.SideOnly;
public class ItemBlockPlant extends ItemBlock
{
private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "reed", "cattailtop", "cattailbottom"};
private static final String[] plants = new String[] {"deadgrass", "desertgrass", "desertsprouts", "dunegrass", "holytallgrass", "thorn", "barley", "cattail", "reed", "cattailtop", "cattailbottom", "wildcarrot"};
@SideOnly(Side.CLIENT)
private Icon[] textures;
@ -34,11 +34,12 @@ public class ItemBlockPlant extends ItemBlock
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
textures = new Icon[3];
textures = new Icon[4];
textures[0] = iconRegister.registerIcon("biomesoplenty:item_barley");
textures[1] = iconRegister.registerIcon("biomesoplenty:item_cattail");
textures[2] = iconRegister.registerIcon("biomesoplenty:item_reed");
textures[3] = iconRegister.registerIcon("biomesoplenty:item_wildcarrot");
}
@Override
@ -61,6 +62,8 @@ public class ItemBlockPlant extends ItemBlock
return textures[1];
else if (meta == 8)
return textures[2];
else if (meta == 11)
return textures[3];
else
return Block.blocksList[itemID].getIcon(0, meta);
}

View File

@ -15,7 +15,7 @@ import biomesoplenty.BiomesOPlenty;
public class ItemBOPFood extends ItemFood
{
private static final String[] foodTypes = new String[] {"berries", "shroomPowder"};
private static final String[] foodTypes = new String[] {"berries", "shroomPowder", "wildcarrots", "sunflowerseeds", "saladfruit", "saladveggie", "saladshroom"};
private Icon[] textures;
public ItemBOPFood(int par1)
@ -31,7 +31,7 @@ public class ItemBOPFood extends ItemFood
{
if (itemstack.getItemDamage() == 0)
{
return addFoodAndSaturation(world, itemstack, player, 3, 0.2F);
return addFoodAndSaturation(world, itemstack, player, 2, 0.2F);
}
else if (itemstack.getItemDamage() == 1)
{
@ -42,6 +42,41 @@ public class ItemBOPFood extends ItemFood
return addFoodAndSaturation(world, itemstack, player, 1, 0.1F);
}
else if (itemstack.getItemDamage() == 2)
{
return addFoodAndSaturation(world, itemstack, player, 3, 0.5F);
}
else if (itemstack.getItemDamage() == 3)
{
return addFoodAndSaturation(world, itemstack, player, 2, 0.5F);
}
else if (itemstack.getItemDamage() == 4)
{
if (world.rand.nextFloat() < 0.05F)
{
player.addPotionEffect(new PotionEffect(Potion.digSpeed.id, 550, 1));
}
return addFoodAndSaturation(world, itemstack, player, 6, 0.8F);
}
else if (itemstack.getItemDamage() == 5)
{
if (world.rand.nextFloat() < 0.05F)
{
player.addPotionEffect(new PotionEffect(Potion.field_76434_w.id, 1100, 1));
}
return addFoodAndSaturation(world, itemstack, player, 6, 1.2F);
}
else if (itemstack.getItemDamage() == 6)
{
if (world.rand.nextFloat() < 0.05F)
{
player.addPotionEffect(new PotionEffect(Potion.jump.id, 550, 1));
}
return addFoodAndSaturation(world, itemstack, player, 6, 1.6F);
}
return addFoodAndSaturation(world, itemstack, player, 0, 0);
}