I am continuing a cauldron mod to 1.2.5.
The mod allows you to cook food in a cauldron by holding it and right clicking. Not to advertise, but it also creates mushroom stew if you right click with a red mushroom, a brown mushroom, and a pot.
I get these errors with this code
ERROR:
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_03\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\BlockCauldron.java:207: illegal start of express
ion
public int idDropped(int par1, Random par2Random, int par3)
^
src\minecraft\net\minecraft\src\BlockCauldron.java:207: ';' expected
public int idDropped(int par1, Random par2Random, int par3)
^
src\minecraft\net\minecraft\src\BlockCauldron.java:207: ';' expected
public int idDropped(int par1, Random par2Random, int par3)
^
src\minecraft\net\minecraft\src\BlockCauldron.java:207: not a statement
public int idDropped(int par1, Random par2Random, int par3)
^
src\minecraft\net\minecraft\src\BlockCauldron.java:207: ';' expected
public int idDropped(int par1, Random par2Random, int par3)
^
src\minecraft\net\minecraft\src\BlockCauldron.java:207: ';' expected
public int idDropped(int par1, Random par2Random, int par3)
^
src\minecraft\net\minecraft\src\BlockCauldron.java:211: reached end of file whil
e parsing
}
^
7 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
And the CODE
package net.minecraft.src;
import java.util.ArrayList;
import java.util.Random;
public class BlockCauldron extends Block
{
public BlockCauldron(int par1)
{
super(par1, Material.iron);
blockIndexInTexture = 154;
}
/**
* From the specified side and block metadata retrieves the blocks texture. Args: side, metadata
*/
public int getBlockTextureFromSideAndMetadata(int par1, int par2)
{
if (par1 == 1)
{
return 138;
}
return par1 != 0 ? 154 : 155;
}
/**
* Adds to the supplied array any colliding bounding boxes with the passed in bounding box. Args: world, x, y, z,
* axisAlignedBB, arrayList
*/
public void getCollidingBoundingBoxes(World par1World, int par2, int par3, int par4, AxisAlignedBB par5AxisAlignedBB, ArrayList par6ArrayList)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.3125F, 1.0F);
super.getCollidingBoundingBoxes(par1World, par2, par3, par4, par5AxisAlignedBB, par6ArrayList);
float f = 0.125F;
setBlockBounds(0.0F, 0.0F, 0.0F, f, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(par1World, par2, par3, par4, par5AxisAlignedBB, par6ArrayList);
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, f);
super.getCollidingBoundingBoxes(par1World, par2, par3, par4, par5AxisAlignedBB, par6ArrayList);
setBlockBounds(1.0F - f, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(par1World, par2, par3, par4, par5AxisAlignedBB, par6ArrayList);
setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(par1World, par2, par3, par4, par5AxisAlignedBB, par6ArrayList);
setBlockBoundsForItemRender();
}
/**
* Sets the block's bounds for rendering it as an item
*/
public void setBlockBoundsForItemRender()
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
/**
* Is this block (a) opaque and (B) a full 1m cube? This determines whether or not to render the shared face of two
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
*/
public boolean isOpaqueCube()
{
return false;
}
/**
* The type of render function that is called for this block
*/
public int getRenderType()
{
return 24;
}
/**
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
*/
public boolean renderAsNormalBlock()
{
return false;
}
/**
* Called upon block activation (left or right click on the block.). The three integers represent x,y,z of the
* block.
*/
public boolean blockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer)
{
if (par1World.isRemote)
{
return true;
}
ItemStack itemstack = par5EntityPlayer.inventory.getCurrentItem();
if (itemstack == null)
{
return true;
}
int i = par1World.getBlockMetadata(par2, par3, par4);
if (itemstack.itemID == Item.bucketWater.shiftedIndex)
{
if (i < 3)
{
if (!par5EntityPlayer.capabilities.isCreativeMode)
{
par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, new ItemStack(Item.bucketEmpty));
}
par1World.setBlockMetadataWithNotify(par2, par3, par4, 3);
}
return true;
}
if (itemstack.itemID == Item.glassBottle.shiftedIndex && i > 0)
{
ItemStack itemstack1 = new ItemStack(Item.potion, 1, 0);
if (!par5EntityPlayer.inventory.addItemStackToInventory(itemstack1))
{
par1World.spawnEntityInWorld(new EntityItem(par1World, (double)par2 + 0.5D, (double)par3 + 1.5D, (double)par4 + 0.5D, itemstack1));
}
itemstack.stackSize--;
if (itemstack.stackSize <= 0)
{
par5EntityPlayer.inventory.setInventorySlotContents(par5EntityPlayer.inventory.currentItem, null);
}
par1World.setBlockMetadataWithNotify(par2, par3, par4, i - 1);
if (itemstack.itemID == Item.fishRaw.shiftedIndex && l == 3 && flag)
{
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);
EntityItem entityitem = new EntityItem(world, (float)i, (float)j, (float)k, new ItemStack(Item.fishCooked));
entityitem.delayBeforeCanPickup = 10;
entityitem.motionY = 0.5D;
world.spawnEntityInWorld(entityitem);
world.spawnParticle("explode", i, j, k, 0.0D, 0.0D, 0.0D);
}
if (itemstack.itemID == Item.beefRaw.shiftedIndex && l == 3 && flag)
{
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);
EntityItem entityitem1 = new EntityItem(world, (float)i, (float)j, (float)k, new ItemStack(Item.beefCooked));
entityitem1.delayBeforeCanPickup = 10;
entityitem1.motionY = 0.5D;
world.spawnEntityInWorld(entityitem1);
world.spawnParticle("explode", i, j, k, 0.0D, 0.0D, 0.0D);
}
if (itemstack.itemID == Item.chickenRaw.shiftedIndex && l == 3 && flag)
{
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);
EntityItem entityitem2 = new EntityItem(world, (float)i, (float)j, (float)k, new ItemStack(Item.chickenCooked));
entityitem2.delayBeforeCanPickup = 10;
entityitem2.motionY = 0.5D;
world.spawnEntityInWorld(entityitem2);
world.spawnParticle("explode", i, j, k, 0.0D, 0.0D, 0.0D);
}
if (itemstack.itemID == Item.porkRaw.shiftedIndex && l == 3 && flag)
{
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);
EntityItem entityitem3 = new EntityItem(world, (float)i, (float)j, (float)k, new ItemStack(Item.porkCooked));
entityitem3.delayBeforeCanPickup = 10;
entityitem3.motionY = 0.5D;
world.spawnEntityInWorld(entityitem3);
world.spawnParticle("explode", i, j, k, 0.0D, 0.0D, 0.0D);
}
if (itemstack.itemID == Item.rottenFlesh.shiftedIndex && l == 3 && flag)
{
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);
EntityItem entityitem4 = new EntityItem(world, (float)i, (float)j, (float)k, new ItemStack(Item.beefCooked));
entityitem4.delayBeforeCanPickup = 10;
entityitem4.motionY = 0.5D;
world.spawnEntityInWorld(entityitem4);
world.spawnParticle("explode", i, j, k, 0.0D, 0.0D, 0.0D);
}
if (itemstack.itemID == Block.mushroomRed.blockID && l == 3 && flag && mr == 0)
{
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);
world.spawnParticle("explode", i, j, k, 0.0D, 0.0D, 0.0D);
mr = 1;
}
if (itemstack.itemID == Block.mushroomBrown.blockID && l == 3 && flag && mb == 0)
{
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);
world.spawnParticle("explode", i, j, k, 0.0D, 0.0D, 0.0D);
mb = 1;
}
if (itemstack.itemID == Item.bowlEmpty.shiftedIndex && l == 3 && flag && mr == 1 && mb == 1)
{
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem, null);
EntityItem entityitem5 = new EntityItem(world, (float)i, (float)j, (float)k, new ItemStack(Item.bowlSoup));
entityitem5.delayBeforeCanPickup = 10;
entityitem5.motionY = 0.5D;
world.spawnEntityInWorld(entityitem5);
world.spawnParticle("explode", i, j, k, 0.0D, 0.0D, 0.0D);
mb = 0;
mr = 0;
}
}
return true;
}
/**
* Returns the ID of the items to drop on destruction.
*/
public int idDropped(int par1, Random random)
{
return Item.cauldron.shiftedIndex;
}
}
This is BASEFILE modification.
That means that modloader, mp, or forge are not used.
No API is used either.
It is the cauldron data file, and the display for the cauldron in minecraft is an item, and it's java identifier is Item.cauldron
The mod allows you to cook food in a cauldron by holding it and right clicking. Not to advertise, but it also creates mushroom stew if you right click with a red mushroom, a brown mushroom, and a pot.
I get these errors with this code
ERROR:
And the CODE
That is the BlockCauldron.java file.
Help me ASAP
Click Here to view my WIP Mod!
Currently developing a Tech/Space mod. PM if you can/want to help!
This is BASEFILE modification.
That means that modloader, mp, or forge are not used.
No API is used either.
It is the cauldron data file, and the display for the cauldron in minecraft is an item, and it's java identifier is Item.cauldron
Click Here to view my WIP Mod!
Currently developing a Tech/Space mod. PM if you can/want to help!