Amongst other things, added Pixie Jars and prevented Poison and Spring Water from generating in Origin Valley, the Promised Land and the Nether

This commit is contained in:
Adubbz 2013-11-17 19:05:11 +11:00
parent 15f0bd2f98
commit fcb3964149
12 changed files with 125 additions and 10 deletions

View file

@ -30,7 +30,7 @@ public class BiomeGenPromisedLandForest extends BiomeGenBase implements IWCFog
fillerBlock = (byte)Blocks.holyDirt.get().blockID;
customBiomeDecorator.treesPerChunk = 10;
customBiomeDecorator.grassPerChunk = -999;
customBiomeDecorator.holyTallGrassPerChunk = 50;
customBiomeDecorator.holyTallGrassPerChunk = 100;
customBiomeDecorator.promisedWillowPerChunk = 40;
customBiomeDecorator.pinkFlowersPerChunk = 12;
customBiomeDecorator.rainbowflowersPerChunk = 10;

View file

@ -100,7 +100,7 @@ public class BOPAchievements
int i = 0;
int biomeID = world.getBiomeGenForCoords(x, z).biomeID;
//if (world.isRemote)
if (!world.isRemote)
{
if (Minecraft.getMinecraft().statFileWriter.hasAchievementUnlocked(achAmbrosia) && Minecraft.getMinecraft().statFileWriter.hasAchievementUnlocked(achPhantom) && Minecraft.getMinecraft().statFileWriter.hasAchievementUnlocked(achCoral) && Minecraft.getMinecraft().statFileWriter.hasAchievementUnlocked(achEnderporter))
{

View file

@ -265,7 +265,7 @@ public class BOPCrafting
GameRegistry.addRecipe(new ItemStack(Blocks.planks.get(), 1, 10), new Object[] {"##", "##", '#', Blocks.bamboo.get()});
GameRegistry.addRecipe(new ItemStack(Items.jarEmpty.get(), 3, 0), new Object[] {"# #", "# #", "###", '#', Block.glass});
GameRegistry.addShapelessRecipe(new ItemStack(Items.food.get(), 1, 10), new Object[] {Block.plantYellow, new ItemStack(Item.potion, 1, 0), new ItemStack(Blocks.flowers2.get(), 1, 6), new ItemStack(Blocks.coral.get(), 1, 3), new ItemStack(Blocks.plants.get(), 1, 15), new ItemStack(Items.miscItems.get(), 1, 4), new ItemStack(Items.jarFilled.get(), 1, 0), new ItemStack(Items.food.get(), 1, 0), Item.sugar});
GameRegistry.addShapelessRecipe(new ItemStack(Items.food.get(), 1, 10), new Object[] {new ItemStack(Items.miscItems.get(), 1, 11), new ItemStack(Item.potion, 1, 0), new ItemStack(Blocks.flowers2.get(), 1, 6), new ItemStack(Blocks.coral.get(), 1, 3), new ItemStack(Blocks.plants.get(), 1, 15), new ItemStack(Items.miscItems.get(), 1, 4), new ItemStack(Items.jarFilled.get(), 1, 0), new ItemStack(Items.food.get(), 1, 0), Item.sugar});
GameRegistry.addRecipe(new ItemStack(Blocks.flesh.get(), 1, 0), new Object[] {"##", "##", '#', new ItemStack(Items.miscItems.get(), 1, 3)});
GameRegistry.addRecipe(new ItemStack(Item.rottenFlesh, 1, 0), new Object[] {"FFF", "FPF", "FFF", 'F', new ItemStack(Items.miscItems.get(), 1, 3), 'P', new ItemStack(Items.jarFilled.get(), 1, 1)});

View file

@ -117,7 +117,7 @@ public class BOPEntities {
{
EntityRegistry.registerModEntity(EntityPixie.class, "Pixie", BOPConfigurationIDs.pixieID, BiomesOPlenty.instance, 80, 3, true);
registerEntityEgg(EntityPixie.class, 16560347, 16645116);
registerEntityEgg(EntityPixie.class, 16742365, 16645116);
if (Biomes.promisedLandForest.isPresent() && Biomes.promisedLandSwamp.isPresent() && Biomes.promisedLandPlains.isPresent() && Biomes.promisedLandShrub.isPresent())
{

View file

@ -8,7 +8,7 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityBird extends EntityFlyingMob
public class EntityBird extends EntityFlyingCreature
{
public int courseChangeCooldown;
public double waypointX;

View file

@ -9,7 +9,7 @@ import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
public class EntityPixie extends EntityFlyingMob
public class EntityPixie extends EntityFlyingCreature
{
public int courseChangeCooldown;
public double waypointX;
@ -95,9 +95,9 @@ public class EntityPixie extends EntityFlyingMob
{
super.onEntityUpdate();
for (int i = 0; i < 3; i++)
for (int i = 0; i < 7; i++)
{
if (this.rand.nextInt(3) == 0)
if (this.rand.nextInt(2) == 0)
{
BiomesOPlenty.proxy.spawnParticle("pixietrail", this.posX + (this.rand.nextDouble()) * (double)this.width, this.posY + this.rand.nextDouble() * (double)this.height - (double)this.yOffset, this.posZ + (this.rand.nextDouble()) * (double)this.width);
}

View file

@ -1,15 +1,19 @@
package biomesoplenty.items;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumMovingObjectType;
import net.minecraft.util.MovingObjectPosition;
import net.minecraft.world.World;
import net.minecraftforge.common.FakePlayer;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Fluids;
import biomesoplenty.api.Items;
import biomesoplenty.entities.EntityPixie;
public class ItemJarEmpty extends Item
{
@ -76,4 +80,43 @@ public class ItemJarEmpty extends Item
return par1ItemStack;
}
}
/**
* Returns true if the item can be used on the given entity, e.g. shears on sheep.
*/
public boolean itemInteractionForEntity(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, EntityLivingBase par3EntityLivingBase)
{
if (par3EntityLivingBase instanceof EntityPixie)
{
EntityPixie entitypixie = (EntityPixie)par3EntityLivingBase;
entitypixie.setDead();
--par1ItemStack.stackSize;
if (par2EntityPlayer.inventory.getFirstEmptyStack() >= 0)
{
EntityItem entityitem = new EntityItem(par2EntityPlayer.worldObj, par2EntityPlayer.posX, par2EntityPlayer.posY, par2EntityPlayer.posZ, new ItemStack(Items.jarFilled.get(), 1, 2));
if (!par2EntityPlayer.worldObj.isRemote)
{
par2EntityPlayer.worldObj.spawnEntityInWorld(entityitem);
if (!(par2EntityPlayer instanceof FakePlayer))
{
entityitem.onCollideWithPlayer(par2EntityPlayer);
}
}
}
else
{
par2EntityPlayer.dropPlayerItem(new ItemStack(Items.jarFilled.get(), 1, 2));
}
return true;
}
else
{
return false;
}
}
}

View file

@ -2,19 +2,28 @@ package biomesoplenty.items;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingData;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.Facing;
import net.minecraft.util.Icon;
import net.minecraft.util.MathHelper;
import net.minecraft.world.World;
import biomesoplenty.BiomesOPlenty;
import biomesoplenty.api.Items;
import biomesoplenty.configuration.configfile.BOPConfigurationIDs;
import biomesoplenty.entities.EntityPixie;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class ItemJarFilled extends Item
{
private static String[] jars = {"jarhoney", "jarpoison"};
private static String[] jars = {"jarhoney", "jarpoison", "jarpixie"};
@SideOnly(Side.CLIENT)
private Icon[] textures;
@ -66,4 +75,66 @@ public class ItemJarFilled extends Item
subTypes.add(new ItemStack(itemId, 1, meta));
}
}
}
@Override
public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World world, int x, int y, int z, int side, float xoffset, float yoffset, float zoffset)
{
if (itemStack.getItemDamage() == 2)
{
if (entityPlayer.dimension == 0 || entityPlayer.dimension == BOPConfigurationIDs.promisedLandDimID)
{
int i1 = world.getBlockId(x, y, z);
x += Facing.offsetsXForSide[side];
y += Facing.offsetsYForSide[side];
z += Facing.offsetsZForSide[side];
double d0 = 0.0D;
if (side == 1 && Block.blocksList[i1] != null && Block.blocksList[i1].getRenderType() == 11)
{
d0 = 0.5D;
}
if (!world.isRemote)
{
EntityPixie entity = new EntityPixie(world);
entity.setLocationAndAngles(x, y, z, MathHelper.wrapAngleTo180_float(world.rand.nextFloat() * 360.0F), 0.0F);
entity.rotationYawHead = entity.rotationYaw;
entity.renderYawOffset = entity.rotationYaw;
entity.onSpawnWithEgg((EntityLivingData)null);
world.spawnEntityInWorld(entity);
entity.playLivingSound();
if (itemStack.hasDisplayName())
{
((EntityLiving)entity).setCustomNameTag(itemStack.getDisplayName());
}
}
if (!entityPlayer.capabilities.isCreativeMode)
{
--itemStack.stackSize;
if (itemStack.stackSize <= 0)
{
itemStack = new ItemStack(Items.jarEmpty.get(), 1, 0);
}
if (!entityPlayer.inventory.addItemStackToInventory(new ItemStack(Items.jarEmpty.get(), 1, 0)))
{
entityPlayer.dropPlayerItem(new ItemStack(Items.jarEmpty.get(), 1, 0));
}
}
}
else
{
if (!world.isRemote)
{
entityPlayer.addChatMessage("\u00a75Pixies cannot survive in this environment!");
}
}
}
return true;
}
}

View file

@ -325,6 +325,7 @@ item.bop.miscItems.pixiedust.name=Pixie Dust
item.bop.jarEmpty.name=Empty Jar
item.bop.jarFilled.jarhoney.name=Honey Jar
item.bop.jarFilled.jarpoison.name=Poison Extract Jar
item.bop.jarFilled.jarpixie.name=Pixie Jar
item.bop.gems.amethyst.name=Amethyst
item.bop.gems.ruby.name=Ruby

Binary file not shown.

Before

Width:  |  Height:  |  Size: 380 B

After

Width:  |  Height:  |  Size: 380 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 356 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 515 B

After

Width:  |  Height:  |  Size: 499 B