Did you have Forge in the minecraft jar you were installing the obfuscated mod on?
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I've used your tutorial for the ore generation, and I get an error inside eclipse, EDIT: Since it actually shows the red text color code, I will now mark it with /-/.
public void generateSurface(World world, /-/Random/-/ random, int chunkX, int chunkZ)
{
for(int i = 0; i < 7; i++)
{
int randPosX = chunkX + random.nextInt(16);
int randPosY = random.nextInt(16);
int randPosZ = chunkZ + random.nextInt(16);
(new WorldGenMinable(Nosi.blockID, 6)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
public String getVersion()
So basically eclipse says that I have an error with Random. (It says "Random cannot be resolved to a type")
This is all placed in my mod_ file, just as the tutorial shows.
You have to import Random.
Rollback Post to RevisionRollBack
Learn some Java before you mod, and skip over the chapter on ModLoader, straight to MinecraftForge. It's better. Trust me.
This may be answered, I'll check later, but how do you make a shapeless crafting recipe?
You actually put what you want to obtain in the first brackets then in the second set you put the ingredients.
ModLoader.addShapelessRecipe(new ItemStack(itemToReceive, 1), new Object [] {Item.sugar, Item.sugar});
If you want to use two of something in it, just write it twice.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I'm having a problem with my arrow. When i fire it, the texture doesn't come up and it's just invisible. Here's the code:
DarkBow
package net.minecraft.src;
import java.util.Random;
public class DarkBow extends Item
{
public DarkBow(int par1)
{
super(par1);
maxStackSize = 1;
setMaxDamage(2196);
}
public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag)
{
EntityPlayer entityplayer = (EntityPlayer)entity;
ItemStack itemstack1 = entityplayer.inventory.getCurrentItem();
if(entityplayer.isUsingItem() && itemstack1.itemID == mod_Darkstone.Darkbow.shiftedIndex)
{
int k = itemstack.getMaxItemUseDuration() - entityplayer.getItemInUseCount();
if (k >= 18) {
iconIndex = mod_Darkstone.DarkBow4;} else if(k > 13) {
iconIndex = mod_Darkstone.DarkBow3;} else if(k > 0) {
iconIndex = mod_Darkstone.DarkBow2;}
} else {
iconIndex = mod_Darkstone.DarkBow1;}
}
/**
* called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount
*/
public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4)
{
boolean flag = par3EntityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, par1ItemStack) > 0;
if (flag || par3EntityPlayer.inventory.hasItem(mod_Darkstone.Darkorb.shiftedIndex))
{
int i = getMaxItemUseDuration(par1ItemStack) - par4;
float f = (float)i / 20F;
f = (f * f + f * 2.0F) / 3F;
if ((double)f < 0.10000000000000001D)
{
return;
}
if (f > 1.0F)
{
f = 1.0F;
}
EntityDarkArrow entitydarkarrow = new EntityDarkArrow(par2World, par3EntityPlayer, f * 2.0F);
if (f == 1.0F)
{
entitydarkarrow.arrowCritical = true;
}
int j = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, par1ItemStack);
if (j > 0)
{
entitydarkarrow.setDamage(entitydarkarrow.getDamage() + (double)j * 0.5D + 0.5D);
}
int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, par1ItemStack);
if (k > 0)
{
entitydarkarrow.func_46023_b(k);
}
if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, par1ItemStack) > 0)
{
entitydarkarrow.setFire(100);
}
par1ItemStack.damageItem(1, par3EntityPlayer);
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F);
if (!par2World.isRemote)
{
par2World.spawnEntityInWorld(entitydarkarrow);
}
}
}
public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
return par1ItemStack;
}
/**
* How long it takes to use or consume an item
*/
public int getMaxItemUseDuration(ItemStack par1ItemStack)
{
return 0x11940;
}
/**
* returns the action that specifies what animation to play when the items is being used
*/
public EnumAction getItemUseAction(ItemStack par1ItemStack)
{
return EnumAction.bow;
}
/**
* Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer
*/
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer)
{
if (par3EntityPlayer.capabilities.isCreativeMode || par3EntityPlayer.inventory.hasItem(mod_Darkstone.Darkorb.shiftedIndex))
{
par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack));
}
return par1ItemStack;
}
/**
* Return the enchantability factor of the item, most of the time is based on material.
*/
public int getItemEnchantability()
{
return 1;
}
}
EntityDarkArrow
package net.minecraft.src;
import cpw.mods.fml.common.Side;
import cpw.mods.fml.common.asm.SideOnly;
import java.util.Iterator;
import java.util.List;
public class EntityDarkArrow extends Entity implements IProjectile
{
public static DamageSource causeArrowDamage(EntityDarkArrow entityDarkArrow, Entity par1Entity)
{
return (new EntityDamageSourceIndirect("arrow", entityDarkArrow, par1Entity)).setProjectile();
}
private int xTile = -1;
private int yTile = -1;
private int zTile = -1;
private int inTile = 0;
private int inData = 0;
private boolean inGround = false;
/** 1 if the player can pick up the arrow */
public int canBePickedUp = 0;
/** Seems to be some sort of timer for animating an arrow. */
public int arrowShake = 0;
/** The owner of this arrow. */
public Entity shootingEntity;
private int ticksInGround;
private int ticksInAir = 0;
private double damage = 5.0D;
/** The amount of knockback an arrow applies when it hits a mob. */
private int knockbackStrength;
public boolean arrowCritical;
public EntityDarkArrow(World par1World)
{
super(par1World);
this.setSize(0.5F, 0.5F);
}
public EntityDarkArrow(World par1World, double par2, double par4, double par6)
{
super(par1World);
this.setSize(0.5F, 0.5F);
this.setPosition(par2, par4, par6);
this.yOffset = 0.0F;
}
public EntityDarkArrow(World par1World, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving, float par4, float par5)
{
super(par1World);
this.shootingEntity = par2EntityLiving;
if (par2EntityLiving instanceof EntityPlayer)
{
this.canBePickedUp = 1;
}
this.posY = par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight() - 0.10000000149011612D;
double var6 = par3EntityLiving.posX - par2EntityLiving.posX;
double var8 = par3EntityLiving.posY + (double)par3EntityLiving.getEyeHeight() - 0.699999988079071D - this.posY;
double var10 = par3EntityLiving.posZ - par2EntityLiving.posZ;
double var12 = (double)MathHelper.sqrt_double(var6 * var6 + var10 * var10);
if (var12 >= 1.0E-7D)
{
float var14 = (float)(Math.atan2(var10, var6) * 180.0D / Math.PI) - 90.0F;
float var15 = (float)(-(Math.atan2(var8, var12) * 180.0D / Math.PI));
double var16 = var6 / var12;
double var18 = var10 / var12;
this.setLocationAndAngles(par2EntityLiving.posX + var16, this.posY, par2EntityLiving.posZ + var18, var14, var15);
this.yOffset = 0.0F;
float var20 = (float)var12 * 0.2F;
this.setThrowableHeading(var6, var8 + (double)var20, var10, par4, par5);
}
}
public EntityDarkArrow(World par1World, EntityLiving par2EntityLiving, float par3)
{
super(par1World);
this.shootingEntity = par2EntityLiving;
if (par2EntityLiving instanceof EntityPlayer)
{
this.canBePickedUp = 1;
}
this.setSize(0.5F, 0.5F);
this.setLocationAndAngles(par2EntityLiving.posX, par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight(), par2EntityLiving.posZ, par2EntityLiving.rotationYaw, par2EntityLiving.rotationPitch);
this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
this.posY -= 0.10000000149011612D;
this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F);
this.setPosition(this.posX, this.posY, this.posZ);
this.yOffset = 0.0F;
this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI));
this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI));
this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, par3 * 1.5F, 1.0F);
}
protected void entityInit()
{
this.dataWatcher.addObject(16, Byte.valueOf((byte)0));
}
/**
* Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction.
*/
public void setThrowableHeading(double var1, double var3, double var5, float var7, float var8)
{
float var9 = MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5);
var1 /= (double)var9;
var3 /= (double)var9;
var5 /= (double)var9;
var1 += this.rand.nextGaussian() * 0.007499999832361937D * (double)var8;
var3 += this.rand.nextGaussian() * 0.007499999832361937D * (double)var8;
var5 += this.rand.nextGaussian() * 0.007499999832361937D * (double)var8;
var1 *= (double)var7;
var3 *= (double)var7;
var5 *= (double)var7;
this.motionX = var1;
this.motionY = var3;
this.motionZ = var5;
float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5);
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(var1, var5) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(var3, (double)var10) * 180.0D / Math.PI);
this.ticksInGround = 0;
}
@SideOnly(Side.CLIENT)
/**
* Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX,
* posY, posZ, yaw, pitch
*/
public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9)
{
this.setPosition(par1, par3, par5);
this.setRotation(par7, par8);
}
@SideOnly(Side.CLIENT)
/**
* Sets the velocity to the args. Args: x, y, z
*/
public void setVelocity(double par1, double par3, double par5)
{
this.motionX = par1;
this.motionY = par3;
this.motionZ = par5;
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
{
float var7 = MathHelper.sqrt_double(par1 * par1 + par5 * par5);
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(par1, par5) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(par3, (double)var7) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch;
this.prevRotationYaw = this.rotationYaw;
this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
this.ticksInGround = 0;
}
}
/**
* Called to update the entity's position/logic.
*/
public void onUpdate()
{
super.onUpdate();
if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F)
{
float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)var1) * 180.0D / Math.PI);
}
int var16 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
if (var16 > 0)
{
Block.blocksList[var16].setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile);
AxisAlignedBB var2 = Block.blocksList[var16].getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile);
if (var2 != null && var2.isVecInside(this.worldObj.func_82732_R().getVecFromPool(this.posX, this.posY, this.posZ)))
{
this.inGround = true;
}
}
if (this.arrowShake > 0)
{
--this.arrowShake;
}
if (this.inGround)
{
int var18 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
int var19 = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
if (var18 == this.inTile && var19 == this.inData)
{
++this.ticksInGround;
if (this.ticksInGround == 1200)
{
this.setDead();
}
}
else
{
this.inGround = false;
this.motionX *= (double)(this.rand.nextFloat() * 0.2F);
this.motionY *= (double)(this.rand.nextFloat() * 0.2F);
this.motionZ *= (double)(this.rand.nextFloat() * 0.2F);
this.ticksInGround = 0;
this.ticksInAir = 0;
}
}
else
{
++this.ticksInAir;
Vec3 var17 = this.worldObj.func_82732_R().getVecFromPool(this.posX, this.posY, this.posZ);
Vec3 var3 = this.worldObj.func_82732_R().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
MovingObjectPosition var4 = this.worldObj.rayTraceBlocks_do_do(var17, var3, false, true);
var17 = this.worldObj.func_82732_R().getVecFromPool(this.posX, this.posY, this.posZ);
var3 = this.worldObj.func_82732_R().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ);
if (var4 != null)
{
var3 = this.worldObj.func_82732_R().getVecFromPool(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord);
}
Entity var5 = null;
List var6 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D));
double var7 = 0.0D;
Iterator var9 = var6.iterator();
float var11;
while (var9.hasNext())
{
Entity var10 = (Entity)var9.next();
if (var10.canBeCollidedWith() && (var10 != this.shootingEntity || this.ticksInAir >= 5))
{
var11 = 0.3F;
AxisAlignedBB var12 = var10.boundingBox.expand((double)var11, (double)var11, (double)var11);
MovingObjectPosition var13 = var12.calculateIntercept(var17, var3);
if (var13 != null)
{
double var14 = var17.distanceTo(var13.hitVec);
if (var14 < var7 || var7 == 0.0D)
{
var5 = var10;
var7 = var14;
}
}
}
}
if (var5 != null)
{
var4 = new MovingObjectPosition(var5);
}
float var20;
if (var4 != null)
{
if (var4.entityHit != null)
{
var20 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
int var24 = MathHelper.ceiling_double_int((double)var20 * this.damage);
if (this.getIsCritical())
{
var24 += this.rand.nextInt(var24 / 2 + 2);
}
DamageSource var22 = null;
if (this.shootingEntity == null)
{
var22 = EntityDarkArrow.causeArrowDamage(this, this);
}
else
{
var22 = EntityDarkArrow.causeArrowDamage(this, this.shootingEntity);
}
if (this.isBurning())
{
var4.entityHit.setFire(5);
}
if (var4.entityHit.attackEntityFrom(var22, var24))
{
if (var4.entityHit instanceof EntityLiving)
{
++((EntityLiving)var4.entityHit).arrowHitTempCounter;
if (this.knockbackStrength > 0)
{
float var25 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
if (var25 > 0.0F)
{
var4.entityHit.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)var25, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)var25);
}
}
}
this.worldObj.playSoundAtEntity(this, "random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
this.setDead();
}
else
{
this.motionX *= -0.10000000149011612D;
this.motionY *= -0.10000000149011612D;
this.motionZ *= -0.10000000149011612D;
this.rotationYaw += 180.0F;
this.prevRotationYaw += 180.0F;
this.ticksInAir = 0;
}
}
else
{
this.xTile = var4.blockX;
this.yTile = var4.blockY;
this.zTile = var4.blockZ;
this.inTile = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile);
this.inData = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile);
this.motionX = (double)((float)(var4.hitVec.xCoord - this.posX));
this.motionY = (double)((float)(var4.hitVec.yCoord - this.posY));
this.motionZ = (double)((float)(var4.hitVec.zCoord - this.posZ));
var20 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ);
this.posX -= this.motionX / (double)var20 * 0.05000000074505806D;
this.posY -= this.motionY / (double)var20 * 0.05000000074505806D;
this.posZ -= this.motionZ / (double)var20 * 0.05000000074505806D;
this.worldObj.playSoundAtEntity(this, "random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F));
this.inGround = true;
this.arrowShake = 7;
this.setIsCritical(false);
}
}
if (this.getIsCritical())
{
for (int var21 = 0; var21 < 4; ++var21)
{
this.worldObj.spawnParticle("crit", this.posX + this.motionX * (double)var21 / 4.0D, this.posY + this.motionY * (double)var21 / 4.0D, this.posZ + this.motionZ * (double)var21 / 4.0D, -this.motionX, -this.motionY + 0.2D, -this.motionZ);
}
}
this.posX += this.motionX;
this.posY += this.motionY;
this.posZ += this.motionZ;
var20 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI);
for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)var20) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F)
{
;
}
while (this.rotationPitch - this.prevRotationPitch >= 180.0F)
{
this.prevRotationPitch += 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw < -180.0F)
{
this.prevRotationYaw -= 360.0F;
}
while (this.rotationYaw - this.prevRotationYaw >= 180.0F)
{
this.prevRotationYaw += 360.0F;
}
this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F;
this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F;
float var23 = 0.99F;
var11 = 0.05F;
if (this.isInWater())
{
for (int var26 = 0; var26 < 4; ++var26)
{
float var27 = 0.25F;
this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)var27, this.posY - this.motionY * (double)var27, this.posZ - this.motionZ * (double)var27, this.motionX, this.motionY, this.motionZ);
}
var23 = 0.8F;
}
this.motionX *= (double)var23;
this.motionY *= (double)var23;
this.motionZ *= (double)var23;
this.motionY -= (double)var11;
this.setPosition(this.posX, this.posY, this.posZ);
this.doBlockCollisions();
}
}
/**
* (abstract) Protected helper method to write subclass entity data to NBT.
*/
public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound)
{
par1NBTTagCompound.setShort("xTile", (short)this.xTile);
par1NBTTagCompound.setShort("yTile", (short)this.yTile);
par1NBTTagCompound.setShort("zTile", (short)this.zTile);
par1NBTTagCompound.setByte("inTile", (byte)this.inTile);
par1NBTTagCompound.setByte("inData", (byte)this.inData);
par1NBTTagCompound.setByte("shake", (byte)this.arrowShake);
par1NBTTagCompound.setByte("inGround", (byte)(this.inGround ? 1 : 0));
par1NBTTagCompound.setByte("pickup", (byte)this.canBePickedUp);
par1NBTTagCompound.setDouble("damage", this.damage);
}
/**
* (abstract) Protected helper method to read subclass entity data from NBT.
*/
public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound)
{
this.xTile = par1NBTTagCompound.getShort("xTile");
this.yTile = par1NBTTagCompound.getShort("yTile");
this.zTile = par1NBTTagCompound.getShort("zTile");
this.inTile = par1NBTTagCompound.getByte("inTile") & 255;
this.inData = par1NBTTagCompound.getByte("inData") & 255;
this.arrowShake = par1NBTTagCompound.getByte("shake") & 255;
this.inGround = par1NBTTagCompound.getByte("inGround") == 1;
if (par1NBTTagCompound.hasKey("damage"))
{
this.damage = par1NBTTagCompound.getDouble("damage");
}
if (par1NBTTagCompound.hasKey("pickup"))
{
this.canBePickedUp = par1NBTTagCompound.getByte("pickup");
}
else if (par1NBTTagCompound.hasKey("player"))
{
this.canBePickedUp = par1NBTTagCompound.getBoolean("player") ? 1 : 0;
}
}
/**
* returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to
* prevent them from trampling crops
*/
protected boolean canTriggerWalking()
{
return false;
}
@SideOnly(Side.CLIENT)
public float getShadowSize()
{
return 0.0F;
}
public void setDamage(double par1)
{
this.damage = par1;
}
public double getDamage()
{
return this.damage;
}
/**
* Sets the amount of knockback the arrow applies when it hits a mob.
*/
public void setKnockbackStrength(int par1)
{
this.knockbackStrength = par1;
}
/**
* If returns false, the item will not inflict any damage against entities.
*/
public boolean canAttackWithItem()
{
return false;
}
/**
* Whether the arrow has a stream of critical hit particles flying behind it.
*/
public void setIsCritical(boolean par1)
{
byte var2 = this.dataWatcher.getWatchableObjectByte(16);
if (par1)
{
this.dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 | 1)));
}
else
{
this.dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 & -2)));
}
}
/**
* Whether the arrow has a stream of critical hit particles flying behind it.
*/
public boolean getIsCritical()
{
byte var1 = this.dataWatcher.getWatchableObjectByte(16);
return (var1 & 1) != 0;
}
public void func_46023_b(int k) {
// TODO Auto-generated method stub
}
}
package net.minecraft.src;
import java.util.Map;
import java.util.Random;
public class mod_Darkstone extends BaseMod
{
public static final Item Obsidianrod = new Item(2100).setItemName("darkrod");
public static final ItemPickaxeDark Darkpickaxe = (ItemPickaxeDark)new ItemPickaxeDark(2101, EnumToolDark.DARK).setItemName("darkpick");
public static final ItemSwordDark Darksword = (ItemSwordDark)new ItemSwordDark(2102, EnumToolDark.DARK).setItemName("darksword");
public static final Item darkstone = new Item(2099).setItemName("dark");
public static final ItemHoeDark Darkhoe = (ItemHoeDark)new ItemHoeDark(2105, EnumToolDark.DARK).setItemName("darkhoe");
public static final ItemSpadeDark Darkspade = (ItemSpadeDark)new ItemSpadeDark(2103, EnumToolDark.DARK).setItemName("darkspade");
public static final ItemAxeDark Darkaxe = (ItemAxeDark)new ItemAxeDark(2104, EnumToolDark.DARK).setItemName("darkaxe");
public static final Block Darkore = new DarkstoneOre(2098, 6).setResistance(10.0F).setHardness(5.0F).setBlockName("dore");
public static final Item Darkarrow = new Item(2106).setItemName("darkarrow");
public static final Item Darkbow = new DarkBow(2107).setItemName("darkbow");
public static final Item Darkorb = new Item(2108).setItemName("dorb");
public static int DarkBow1 = ModLoader.addOverride("/gui/items.png", "/darkstone/darkbow1.png");
public static int DarkBow2 = ModLoader.addOverride("/gui/items.png", "/darkstone/darkbow2.png");
public static int DarkBow3 = ModLoader.addOverride("/gui/items.png", "/darkstone/darkbow3.png");
public static int DarkBow4 = ModLoader.addOverride("/gui/items.png", "/darkstone/darkbow4.png");
protected Random randomGenerator;
public mod_Darkstone()
{
ModLoader.setInGameHook(this, true, true);
ModLoader.addSmelting(Darkore.blockID, new ItemStack(darkstone, 1));
}
public String getVersion() {
return "1.4.2";
}
public void load() {
ModLoader.registerBlock(Darkore);
Darkore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/darkstone/darkstoneore.png");
ModLoader.addName(Darkore, "§8Darkstone Ore");
darkstone.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkstone.png");
ModLoader.addName(darkstone, "§8Darkstone");
Darksword.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darksword.png");
ModLoader.addName(Darksword, "§8Dark Sword");
ModLoader.addRecipe(new ItemStack(Darksword, 1), new Object[] { " D ", " D ", " X ", Character.valueOf('D'), darkstone, Character.valueOf('X'), Obsidianrod });
Darkpickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkpickaxe.png");
ModLoader.addName(Darkpickaxe, "§8Dark Pickaxe");
ModLoader.addRecipe(new ItemStack(Darkpickaxe, 1), new Object[] { "DDD", " X ", " X ", Character.valueOf('D'), darkstone, Character.valueOf('X'), Obsidianrod });
Obsidianrod.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/obsidianrod.png");
ModLoader.addName(Obsidianrod, "§8Obsidian Rod");
ModLoader.addRecipe(new ItemStack(Obsidianrod, 4), new Object[] { " X ", " X ", Character.valueOf('X'), Block.obsidian});
Darkaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkaxe.png");
ModLoader.addName(Darkaxe, "§8Dark Axe");
ModLoader.addRecipe(new ItemStack(Darkaxe, 1), new Object[] { "DD ", "DX ", " X ", Character.valueOf('D'), darkstone, Character.valueOf('X'), Obsidianrod });
Darkspade.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkshovel.png");
ModLoader.addName(Darkspade, "§8Dark Shovel");
ModLoader.addRecipe(new ItemStack(Darkspade, 1), new Object[] { " D ", " X ", " X ", Character.valueOf('D'), darkstone, Character.valueOf('X'), Obsidianrod });
Darkhoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkhoe.png");
ModLoader.addName(Darkhoe, "§8Dark Hoe");
ModLoader.addRecipe(new ItemStack(Darkhoe, 1), new Object[] { "DD ", " X ", " X ", Character.valueOf('D'), darkstone, Character.valueOf('X'), Obsidianrod });
Darkarrow.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkarrow.png");
ModLoader.addName(Darkarrow, "§8Dark Arrow");
Darkbow.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkbow.png");
ModLoader.addName(Darkbow, "§8Dark Bow");
ModLoader.addRecipe(new ItemStack(Darkbow, 1), new Object[] { "XD ", "X D", "XD ", Character.valueOf('X'), darkstone, Character.valueOf('D'), Obsidianrod });
Darkorb.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkorb.png");
ModLoader.addName(Darkorb, "§8Dark Orb");
ModLoader.addRecipe(new ItemStack(Darkorb, 1), new Object[] { "XDX", "DMD", "XDX", Character.valueOf('D'), darkstone, Character.valueOf('X'), Block.obsidian, Character.valueOf('M'), Item.diamond });
}
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
this.randomGenerator = random;
for (int i = 0; i < 1; i++)
{
int randPosX = chunkX + this.randomGenerator.nextInt(16);
int randPosY = random.nextInt(16);
int randPosZ = chunkZ + this.randomGenerator.nextInt(16);
new WorldGenMinable(Darkore.blockID, 3).generate(world, random, randPosX, randPosY, randPosZ);
}
}
public void addRenderer(Map map)
{
map.put(EntityDarkArrow.class, new RenderDarkArrow());
}
}
Please help! Also i tryed putting a smoke particle effect behind it but that didn't work for some reason. :|
I had been searching like crazy and i still can't find it. Also do you know how to make an item 3d like a sword or a pickaxe? I know i saw it somewhere, but i can't remember where i did see it...
I am having trouble with generating a structure, im fairly sure it has to do with the integrated server update. Have you checked that for compatability for 1.4.2? I'd love to get this working and im not sure how to combat it.
Help! I get this error when trying to make a smelting recipie:
- shiftedIndex cannot be resolved or is not
a field
- porkCooked cannot be resolved to a
variable
This is the code:
ModLoader.addSmelting(Porkanium.shiftedIndex, new ItemStack(porkCooked), 1.0F);
P.S. I'm new to modding, so sorry if I'm missing something obvious.
If you're getting an error for shiftedIndex then Porkanium isn't declared as an Item. Post the rest of your code please. The porkCooked variable is in Item so you need to call it from there:
I am having trouble with generating a structure, im fairly sure it has to do with the integrated server update. Have you checked that for compatability for 1.4.2? I'd love to get this working and im not sure how to combat it.
No one else has had trouble with it from what I have heard. Post your code please.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Hey again. It seems as if the axe is causing trouble. I tested my mod without the axe code, and then I tested it with the axe code, and it gave me this error:
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; ModLoader has failed to initialize.
This error has been saved to C:\Users\Casper\Desktop\MCP\jars\.\crash-reports\crash-2012-11-11_16.02.12-client.txt for your convenience. Please include a copy of this file if you report this crash to anyone.
--- BEGIN ERROR REPORT 3c508d0e --------
Generated 11-11-12 16:02
- Minecraft Version: 1.4.2
- Operating System: Windows 7 (amd64) version 6.1
- Java Version: 1.7.0_05, Oracle Corporation
- Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
- Memory: 957786440 bytes (913 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
- JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
- AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
- ModLoader: Mods loaded: 2
ModLoader 1.4.2
mod_Nosirrah 1.4.2
java.lang.StringIndexOutOfBoundsException: String index out of range: 7
at java.lang.String.charAt(Unknown Source)
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:196)
at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:524)
at net.minecraft.src.mod_Nosirrah.load(mod_Nosirrah.java:39)
at net.minecraft.src.ModLoader.init(ModLoader.java:960)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:190)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:91)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:417)
at net.minecraft.client.Minecraft.run(Minecraft.java:737)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 22b3c0d0 ----------
This is my axe code in the mod_ file:
public static final Item NosiAxe = new ItemNosirrahAxe(6003, EnumToolMaterialNosirrah.NOSI).setItemName("NosiAxe").setCreativeTab(CreativeTabs.tabTools);
and
NosiAxe.iconIndex=ModLoader.addOverride("/gui/items.png","/stuff/NosiAxe.png");
ModLoader.addName(NosiAxe, "Nosi Axe");
ModLoader.addRecipe(new ItemStack(NosiAxe,1), new Object []
{
"XX","XS"," S ",('X'),NosiIngot,('S'),Item.stick
});
You have to make the three Strings equal lengths in the recipe.
For Example:
ModLoader.addRecipe(new ItemStack(NosiAxe,1), new Object []
{
"XX ","XS "," S ",('X'),NosiIngot,('S'),Item.stick
});
If you're getting an error for shiftedIndex then Porkanium isn't declared as an Item. Post the rest of your code please. The porkCooked variable is in Item so you need to call it from there:
Item.porkCooked
Porkanium is a block, so what part of Porkanium.shifted index should I change?
Here is the rest of the code regarding Porkanium:
package net.minecraft.src;
public class mod_FoodOres extends BaseMod
{
public static Block Porkanium = (new Block(400, Material.rock)).setLightValue(1.0F).setHardness(1.0F).setResistance(1.0F).setBlockName("Porkanium");
public void load()
{
ModLoader.registerBlock(Porkanium);
Porkanium.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/SpartanMods/FoodOres/Porkanium.png");
ModLoader.addName(Porkanium, "Porkanium");
ModLoader.addSmelting(Porkanium.shiftedIndex, new ItemStack(Item.porkCooked), 1.0F);
}
public String getVersion()
{
return "1.4.2";
}
}
Porkanium is a block, so what part of Porkanium.shifted index should I change?
Here is the rest of the code regarding Porkanium:
package net.minecraft.src;
public class mod_FoodOres extends BaseMod
{
public static Block Porkanium = (new Block(400, Material.rock)).setLightValue(1.0F).setHardness(1.0F).setResistance(1.0F).setBlockName("Porkanium");
public void load()
{
ModLoader.registerBlock(Porkanium);
Porkanium.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/SpartanMods/FoodOres/Porkanium.png");
ModLoader.addName(Porkanium, "Porkanium");
ModLoader.addSmelting(Porkanium.shiftedIndex, new ItemStack(Item.porkCooked), 1.0F);
}
public String getVersion()
{
return "1.4.2";
}
}
Anytime you reference your Porkanium object from outside your main mod file, you're going to have to retrieve it from your mod_yourModFileName file, so for example, you'll want to start with
mod_yourModFileName.Porkanium
This of course takes place in your Main mod file, so you don't need to add this.
Blocks use blockID, while items use shiftedIndex. Simply change your Porkanium.shiftedIndex to
Anytime you reference your Porkanium object from outside your main mod file, you're going to have to retrieve it from your mod_yourModFileName file, so for example, you'll want to start with
mod_yourModFileName.Porkanium
I wouldn't need the mod_yourModFileName though, right? Because this smelting recipe is in the main mod file already, and doesn't need to be retrieved. Anyways, thanks!
I wouldn't need the mod_yourModFileName though, right? Because this smelting recipe is in the main mod file already, and doesn't need to be retrieved. Anyways, thanks!
That is correct.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
No one else has had trouble with it from what I have heard. Post your code please.
Okay, here it is:
mod_WorldGenDungeon1
package net.minecraft.src;
import java.util.Random;
public class mod_WorldGenDungeon1 extends BaseMod
{
public void load()
{
}
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
for(int k = 0; k < 10; k++)
{
int RandPosX = chunkX + random.nextInt(5);
int RandPosY = random.nextInt(60);
int RandPosZ = chunkZ + random.nextInt(5);
(new WorldGenDungeon1()).generate(world, random, RandPosX, RandPosY, RandPosZ);
}
}
public String getVersion()
{
return "1.4.2";
}
}
package net.minecraft.src;
import java.util.Random;
public class mod_WorldGenDungeon1 extends BaseMod
{
public void load()
{
}
public void generateSurface(World world, Random random, int chunkX, int chunkZ)
{
for(int k = 0; k < 10; k++)
{
int RandPosX = chunkX + random.nextInt(5);
int RandPosY = random.nextInt(60);
int RandPosZ = chunkZ + random.nextInt(5);
(new WorldGenDungeon1()).generate(world, random, RandPosX, RandPosY, RandPosZ);
}
}
public String getVersion()
{
return "1.4.2";
}
}
int RandPosX = chunkX + random.nextInt(5);
int RandPosZ = chunkZ + random.nextInt(5);
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Nope, that hasnt changed much at all, the error comes when i try to create a new, creative superflat map. It says 'loading world' and 'converting world'.
the error in eclipse, the actual window never turns to a crash screen.
Nov 13, 2012 2:56:33 PM net.minecraft.src.IntegratedServer startServer
INFO: Starting integrated minecraft server version 1.4.2
Nov 13, 2012 2:56:33 PM net.minecraft.src.IntegratedServer startServer
INFO: Generating keypair
Nov 13, 2012 2:56:34 PM net.minecraft.server.MinecraftServer convertMapIfNeeded
INFO: Converting map!
Scanning folders...
Total conversion count is 0
java.lang.ArrayIndexOutOfBoundsException: -117
at net.minecraft.src.ExtendedBlockStorage.setExtBlockID(ExtendedBlockStorage.java:79)
at net.minecraft.src.Chunk.setBlockIDWithMetadata(Chunk.java:598)
at net.minecraft.src.World.setBlockAndMetadataWithUpdate(World.java:406)
at net.minecraft.src.World.setBlockAndMetadata(World.java:384)
at net.minecraft.src.WorldGenDungeon1.generate(WorldGenDungeon1.java:36)
at net.minecraft.src.mod_WorldGenDungeon1.generateSurface(mod_WorldGenDungeon1.java:20)
at net.minecraft.src.ModLoader.populateChunk(ModLoader.java:1321)
at net.minecraft.src.ChunkProviderServer.populate(ChunkProviderServer.java:222)
at net.minecraft.src.Chunk.populateChunk(Chunk.java:1136)
at net.minecraft.src.ChunkProviderServer.loadChunk(ChunkProviderServer.java:116)
at net.minecraft.src.ChunkProviderServer.provideChunk(ChunkProviderServer.java:129)
at net.minecraft.src.World.getChunkFromChunkCoords(World.java:376)
at net.minecraft.src.World.getBlockId(World.java:283)
at net.minecraft.src.World.isAirBlock(World.java:296)
at net.minecraft.src.World.getFirstUncoveredBlock(World.java:270)
at net.minecraft.src.WorldProvider.canCoordinateBeSpawn(WorldProvider.java:79)
at net.minecraft.src.WorldServer.createSpawnPosition(WorldServer.java:658)
at net.minecraft.src.WorldServer.initialize(WorldServer.java:622)
at net.minecraft.src.World.<init>(World.java:223)
at net.minecraft.src.WorldServer.<init>(WorldServer.java:47)
at net.minecraft.src.IntegratedServer.loadAllWorlds(IntegratedServer.java:73)
at net.minecraft.src.IntegratedServer.startServer(IntegratedServer.java:102)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:461)
at net.minecraft.src.ThreadMinecraftServer.run(ThreadMinecraftServer.java:17)
Nov 13, 2012 2:56:38 PM net.minecraft.server.MinecraftServer run
SEVERE: Encountered an unexpected exception ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException: -117
at net.minecraft.src.ExtendedBlockStorage.setExtBlockID(ExtendedBlockStorage.java:79)
at net.minecraft.src.Chunk.setBlockIDWithMetadata(Chunk.java:598)
at net.minecraft.src.World.setBlockAndMetadataWithUpdate(World.java:406)
at net.minecraft.src.World.setBlockAndMetadata(World.java:384)
at net.minecraft.src.WorldGenDungeon1.generate(WorldGenDungeon1.java:36)
at net.minecraft.src.mod_WorldGenDungeon1.generateSurface(mod_WorldGenDungeon1.java:20)
at net.minecraft.src.ModLoader.populateChunk(ModLoader.java:1321)
at net.minecraft.src.ChunkProviderServer.populate(ChunkProviderServer.java:222)
at net.minecraft.src.Chunk.populateChunk(Chunk.java:1136)
at net.minecraft.src.ChunkProviderServer.loadChunk(ChunkProviderServer.java:116)
at net.minecraft.src.ChunkProviderServer.provideChunk(ChunkProviderServer.java:129)
at net.minecraft.src.World.getChunkFromChunkCoords(World.java:376)
at net.minecraft.src.World.getBlockId(World.java:283)
at net.minecraft.src.World.isAirBlock(World.java:296)
at net.minecraft.src.World.getFirstUncoveredBlock(World.java:270)
at net.minecraft.src.WorldProvider.canCoordinateBeSpawn(WorldProvider.java:79)
at net.minecraft.src.WorldServer.createSpawnPosition(WorldServer.java:658)
at net.minecraft.src.WorldServer.initialize(WorldServer.java:622)
at net.minecraft.src.World.<init>(World.java:223)
at net.minecraft.src.WorldServer.<init>(WorldServer.java:47)
at net.minecraft.src.IntegratedServer.loadAllWorlds(IntegratedServer.java:73)
at net.minecraft.src.IntegratedServer.startServer(IntegratedServer.java:102)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:461)
at net.minecraft.src.ThreadMinecraftServer.run(ThreadMinecraftServer.java:17)
Nov 13, 2012 2:56:38 PM net.minecraft.server.MinecraftServer run
SEVERE: This crash report has been saved to: C:\Users\Dyan L\Desktop\MCP\jars\.\crash-reports\crash-2012-11-13_14.56.38-server.txt
Nov 13, 2012 2:56:38 PM net.minecraft.server.MinecraftServer stopServer
INFO: Stopping server
Nov 13, 2012 2:56:38 PM net.minecraft.server.MinecraftServer stopServer
INFO: Saving players
Nov 13, 2012 2:56:38 PM net.minecraft.server.MinecraftServer stopServer
INFO: Saving worlds
java.lang.NullPointerException
at net.minecraft.server.MinecraftServer.stopServer(MinecraftServer.java:421)
at net.minecraft.src.IntegratedServer.stopServer(IntegratedServer.java:232)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:540)
at net.minecraft.src.ThreadMinecraftServer.run(ThreadMinecraftServer.java:17)
I just realised i havent even tried compiling and reobfuscating, then checking as a mod. One sec.
nope, just freezes at the aforementioned screen.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumDid you have Forge in the minecraft jar you were installing the obfuscated mod on?
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYou have to import Random.
Thanks, but will the comma after "(yourIngredient, 1)," be the "(yourIngredient2, 1)?" For multiple items to make one thing?
I can only recommend forcing an update to get a new minecraft jar and try installing it on that.
You actually put what you want to obtain in the first brackets then in the second set you put the ingredients.
ModLoader.addShapelessRecipe(new ItemStack(itemToReceive, 1), new Object [] {Item.sugar, Item.sugar});If you want to use two of something in it, just write it twice.together they are powerful beyond imagination."
DarkBow
package net.minecraft.src; import java.util.Random; public class DarkBow extends Item { public DarkBow(int par1) { super(par1); maxStackSize = 1; setMaxDamage(2196); } public void onUpdate(ItemStack itemstack, World world, Entity entity, int i, boolean flag) { EntityPlayer entityplayer = (EntityPlayer)entity; ItemStack itemstack1 = entityplayer.inventory.getCurrentItem(); if(entityplayer.isUsingItem() && itemstack1.itemID == mod_Darkstone.Darkbow.shiftedIndex) { int k = itemstack.getMaxItemUseDuration() - entityplayer.getItemInUseCount(); if (k >= 18) { iconIndex = mod_Darkstone.DarkBow4;} else if(k > 13) { iconIndex = mod_Darkstone.DarkBow3;} else if(k > 0) { iconIndex = mod_Darkstone.DarkBow2;} } else { iconIndex = mod_Darkstone.DarkBow1;} } /** * called when the player releases the use item button. Args: itemstack, world, entityplayer, itemInUseCount */ public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4) { boolean flag = par3EntityPlayer.capabilities.isCreativeMode || EnchantmentHelper.getEnchantmentLevel(Enchantment.infinity.effectId, par1ItemStack) > 0; if (flag || par3EntityPlayer.inventory.hasItem(mod_Darkstone.Darkorb.shiftedIndex)) { int i = getMaxItemUseDuration(par1ItemStack) - par4; float f = (float)i / 20F; f = (f * f + f * 2.0F) / 3F; if ((double)f < 0.10000000000000001D) { return; } if (f > 1.0F) { f = 1.0F; } EntityDarkArrow entitydarkarrow = new EntityDarkArrow(par2World, par3EntityPlayer, f * 2.0F); if (f == 1.0F) { entitydarkarrow.arrowCritical = true; } int j = EnchantmentHelper.getEnchantmentLevel(Enchantment.power.effectId, par1ItemStack); if (j > 0) { entitydarkarrow.setDamage(entitydarkarrow.getDamage() + (double)j * 0.5D + 0.5D); } int k = EnchantmentHelper.getEnchantmentLevel(Enchantment.punch.effectId, par1ItemStack); if (k > 0) { entitydarkarrow.func_46023_b(k); } if (EnchantmentHelper.getEnchantmentLevel(Enchantment.flame.effectId, par1ItemStack) > 0) { entitydarkarrow.setFire(100); } par1ItemStack.damageItem(1, par3EntityPlayer); par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 1.0F, 1.0F / (itemRand.nextFloat() * 0.4F + 1.2F) + f * 0.5F); if (!par2World.isRemote) { par2World.spawnEntityInWorld(entitydarkarrow); } } } public ItemStack onFoodEaten(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { return par1ItemStack; } /** * How long it takes to use or consume an item */ public int getMaxItemUseDuration(ItemStack par1ItemStack) { return 0x11940; } /** * returns the action that specifies what animation to play when the items is being used */ public EnumAction getItemUseAction(ItemStack par1ItemStack) { return EnumAction.bow; } /** * Called whenever this item is equipped and the right mouse button is pressed. Args: itemStack, world, entityPlayer */ public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { if (par3EntityPlayer.capabilities.isCreativeMode || par3EntityPlayer.inventory.hasItem(mod_Darkstone.Darkorb.shiftedIndex)) { par3EntityPlayer.setItemInUse(par1ItemStack, getMaxItemUseDuration(par1ItemStack)); } return par1ItemStack; } /** * Return the enchantability factor of the item, most of the time is based on material. */ public int getItemEnchantability() { return 1; } }package net.minecraft.src; import cpw.mods.fml.common.Side; import cpw.mods.fml.common.asm.SideOnly; import java.util.Iterator; import java.util.List; public class EntityDarkArrow extends Entity implements IProjectile { public static DamageSource causeArrowDamage(EntityDarkArrow entityDarkArrow, Entity par1Entity) { return (new EntityDamageSourceIndirect("arrow", entityDarkArrow, par1Entity)).setProjectile(); } private int xTile = -1; private int yTile = -1; private int zTile = -1; private int inTile = 0; private int inData = 0; private boolean inGround = false; /** 1 if the player can pick up the arrow */ public int canBePickedUp = 0; /** Seems to be some sort of timer for animating an arrow. */ public int arrowShake = 0; /** The owner of this arrow. */ public Entity shootingEntity; private int ticksInGround; private int ticksInAir = 0; private double damage = 5.0D; /** The amount of knockback an arrow applies when it hits a mob. */ private int knockbackStrength; public boolean arrowCritical; public EntityDarkArrow(World par1World) { super(par1World); this.setSize(0.5F, 0.5F); } public EntityDarkArrow(World par1World, double par2, double par4, double par6) { super(par1World); this.setSize(0.5F, 0.5F); this.setPosition(par2, par4, par6); this.yOffset = 0.0F; } public EntityDarkArrow(World par1World, EntityLiving par2EntityLiving, EntityLiving par3EntityLiving, float par4, float par5) { super(par1World); this.shootingEntity = par2EntityLiving; if (par2EntityLiving instanceof EntityPlayer) { this.canBePickedUp = 1; } this.posY = par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight() - 0.10000000149011612D; double var6 = par3EntityLiving.posX - par2EntityLiving.posX; double var8 = par3EntityLiving.posY + (double)par3EntityLiving.getEyeHeight() - 0.699999988079071D - this.posY; double var10 = par3EntityLiving.posZ - par2EntityLiving.posZ; double var12 = (double)MathHelper.sqrt_double(var6 * var6 + var10 * var10); if (var12 >= 1.0E-7D) { float var14 = (float)(Math.atan2(var10, var6) * 180.0D / Math.PI) - 90.0F; float var15 = (float)(-(Math.atan2(var8, var12) * 180.0D / Math.PI)); double var16 = var6 / var12; double var18 = var10 / var12; this.setLocationAndAngles(par2EntityLiving.posX + var16, this.posY, par2EntityLiving.posZ + var18, var14, var15); this.yOffset = 0.0F; float var20 = (float)var12 * 0.2F; this.setThrowableHeading(var6, var8 + (double)var20, var10, par4, par5); } } public EntityDarkArrow(World par1World, EntityLiving par2EntityLiving, float par3) { super(par1World); this.shootingEntity = par2EntityLiving; if (par2EntityLiving instanceof EntityPlayer) { this.canBePickedUp = 1; } this.setSize(0.5F, 0.5F); this.setLocationAndAngles(par2EntityLiving.posX, par2EntityLiving.posY + (double)par2EntityLiving.getEyeHeight(), par2EntityLiving.posZ, par2EntityLiving.rotationYaw, par2EntityLiving.rotationPitch); this.posX -= (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); this.posY -= 0.10000000149011612D; this.posZ -= (double)(MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * 0.16F); this.setPosition(this.posX, this.posY, this.posZ); this.yOffset = 0.0F; this.motionX = (double)(-MathHelper.sin(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); this.motionZ = (double)(MathHelper.cos(this.rotationYaw / 180.0F * (float)Math.PI) * MathHelper.cos(this.rotationPitch / 180.0F * (float)Math.PI)); this.motionY = (double)(-MathHelper.sin(this.rotationPitch / 180.0F * (float)Math.PI)); this.setThrowableHeading(this.motionX, this.motionY, this.motionZ, par3 * 1.5F, 1.0F); } protected void entityInit() { this.dataWatcher.addObject(16, Byte.valueOf((byte)0)); } /** * Similar to setArrowHeading, it's point the throwable entity to a x, y, z direction. */ public void setThrowableHeading(double var1, double var3, double var5, float var7, float var8) { float var9 = MathHelper.sqrt_double(var1 * var1 + var3 * var3 + var5 * var5); var1 /= (double)var9; var3 /= (double)var9; var5 /= (double)var9; var1 += this.rand.nextGaussian() * 0.007499999832361937D * (double)var8; var3 += this.rand.nextGaussian() * 0.007499999832361937D * (double)var8; var5 += this.rand.nextGaussian() * 0.007499999832361937D * (double)var8; var1 *= (double)var7; var3 *= (double)var7; var5 *= (double)var7; this.motionX = var1; this.motionY = var3; this.motionZ = var5; float var10 = MathHelper.sqrt_double(var1 * var1 + var5 * var5); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(var1, var5) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(var3, (double)var10) * 180.0D / Math.PI); this.ticksInGround = 0; } @SideOnly(Side.CLIENT) /** * Sets the position and rotation. Only difference from the other one is no bounding on the rotation. Args: posX, * posY, posZ, yaw, pitch */ public void setPositionAndRotation2(double par1, double par3, double par5, float par7, float par8, int par9) { this.setPosition(par1, par3, par5); this.setRotation(par7, par8); } @SideOnly(Side.CLIENT) /** * Sets the velocity to the args. Args: x, y, z */ public void setVelocity(double par1, double par3, double par5) { this.motionX = par1; this.motionY = par3; this.motionZ = par5; if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { float var7 = MathHelper.sqrt_double(par1 * par1 + par5 * par5); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(par1, par5) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(par3, (double)var7) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch; this.prevRotationYaw = this.rotationYaw; this.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch); this.ticksInGround = 0; } } /** * Called to update the entity's position/logic. */ public void onUpdate() { super.onUpdate(); if (this.prevRotationPitch == 0.0F && this.prevRotationYaw == 0.0F) { float var1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); this.prevRotationYaw = this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); this.prevRotationPitch = this.rotationPitch = (float)(Math.atan2(this.motionY, (double)var1) * 180.0D / Math.PI); } int var16 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile); if (var16 > 0) { Block.blocksList[var16].setBlockBoundsBasedOnState(this.worldObj, this.xTile, this.yTile, this.zTile); AxisAlignedBB var2 = Block.blocksList[var16].getCollisionBoundingBoxFromPool(this.worldObj, this.xTile, this.yTile, this.zTile); if (var2 != null && var2.isVecInside(this.worldObj.func_82732_R().getVecFromPool(this.posX, this.posY, this.posZ))) { this.inGround = true; } } if (this.arrowShake > 0) { --this.arrowShake; } if (this.inGround) { int var18 = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile); int var19 = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile); if (var18 == this.inTile && var19 == this.inData) { ++this.ticksInGround; if (this.ticksInGround == 1200) { this.setDead(); } } else { this.inGround = false; this.motionX *= (double)(this.rand.nextFloat() * 0.2F); this.motionY *= (double)(this.rand.nextFloat() * 0.2F); this.motionZ *= (double)(this.rand.nextFloat() * 0.2F); this.ticksInGround = 0; this.ticksInAir = 0; } } else { ++this.ticksInAir; Vec3 var17 = this.worldObj.func_82732_R().getVecFromPool(this.posX, this.posY, this.posZ); Vec3 var3 = this.worldObj.func_82732_R().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); MovingObjectPosition var4 = this.worldObj.rayTraceBlocks_do_do(var17, var3, false, true); var17 = this.worldObj.func_82732_R().getVecFromPool(this.posX, this.posY, this.posZ); var3 = this.worldObj.func_82732_R().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); if (var4 != null) { var3 = this.worldObj.func_82732_R().getVecFromPool(var4.hitVec.xCoord, var4.hitVec.yCoord, var4.hitVec.zCoord); } Entity var5 = null; List var6 = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); double var7 = 0.0D; Iterator var9 = var6.iterator(); float var11; while (var9.hasNext()) { Entity var10 = (Entity)var9.next(); if (var10.canBeCollidedWith() && (var10 != this.shootingEntity || this.ticksInAir >= 5)) { var11 = 0.3F; AxisAlignedBB var12 = var10.boundingBox.expand((double)var11, (double)var11, (double)var11); MovingObjectPosition var13 = var12.calculateIntercept(var17, var3); if (var13 != null) { double var14 = var17.distanceTo(var13.hitVec); if (var14 < var7 || var7 == 0.0D) { var5 = var10; var7 = var14; } } } } if (var5 != null) { var4 = new MovingObjectPosition(var5); } float var20; if (var4 != null) { if (var4.entityHit != null) { var20 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); int var24 = MathHelper.ceiling_double_int((double)var20 * this.damage); if (this.getIsCritical()) { var24 += this.rand.nextInt(var24 / 2 + 2); } DamageSource var22 = null; if (this.shootingEntity == null) { var22 = EntityDarkArrow.causeArrowDamage(this, this); } else { var22 = EntityDarkArrow.causeArrowDamage(this, this.shootingEntity); } if (this.isBurning()) { var4.entityHit.setFire(5); } if (var4.entityHit.attackEntityFrom(var22, var24)) { if (var4.entityHit instanceof EntityLiving) { ++((EntityLiving)var4.entityHit).arrowHitTempCounter; if (this.knockbackStrength > 0) { float var25 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); if (var25 > 0.0F) { var4.entityHit.addVelocity(this.motionX * (double)this.knockbackStrength * 0.6000000238418579D / (double)var25, 0.1D, this.motionZ * (double)this.knockbackStrength * 0.6000000238418579D / (double)var25); } } } this.worldObj.playSoundAtEntity(this, "random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); this.setDead(); } else { this.motionX *= -0.10000000149011612D; this.motionY *= -0.10000000149011612D; this.motionZ *= -0.10000000149011612D; this.rotationYaw += 180.0F; this.prevRotationYaw += 180.0F; this.ticksInAir = 0; } } else { this.xTile = var4.blockX; this.yTile = var4.blockY; this.zTile = var4.blockZ; this.inTile = this.worldObj.getBlockId(this.xTile, this.yTile, this.zTile); this.inData = this.worldObj.getBlockMetadata(this.xTile, this.yTile, this.zTile); this.motionX = (double)((float)(var4.hitVec.xCoord - this.posX)); this.motionY = (double)((float)(var4.hitVec.yCoord - this.posY)); this.motionZ = (double)((float)(var4.hitVec.zCoord - this.posZ)); var20 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionY * this.motionY + this.motionZ * this.motionZ); this.posX -= this.motionX / (double)var20 * 0.05000000074505806D; this.posY -= this.motionY / (double)var20 * 0.05000000074505806D; this.posZ -= this.motionZ / (double)var20 * 0.05000000074505806D; this.worldObj.playSoundAtEntity(this, "random.bowhit", 1.0F, 1.2F / (this.rand.nextFloat() * 0.2F + 0.9F)); this.inGround = true; this.arrowShake = 7; this.setIsCritical(false); } } if (this.getIsCritical()) { for (int var21 = 0; var21 < 4; ++var21) { this.worldObj.spawnParticle("crit", this.posX + this.motionX * (double)var21 / 4.0D, this.posY + this.motionY * (double)var21 / 4.0D, this.posZ + this.motionZ * (double)var21 / 4.0D, -this.motionX, -this.motionY + 0.2D, -this.motionZ); } } this.posX += this.motionX; this.posY += this.motionY; this.posZ += this.motionZ; var20 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); this.rotationYaw = (float)(Math.atan2(this.motionX, this.motionZ) * 180.0D / Math.PI); for (this.rotationPitch = (float)(Math.atan2(this.motionY, (double)var20) * 180.0D / Math.PI); this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { ; } while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { this.prevRotationPitch += 360.0F; } while (this.rotationYaw - this.prevRotationYaw < -180.0F) { this.prevRotationYaw -= 360.0F; } while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { this.prevRotationYaw += 360.0F; } this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; float var23 = 0.99F; var11 = 0.05F; if (this.isInWater()) { for (int var26 = 0; var26 < 4; ++var26) { float var27 = 0.25F; this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)var27, this.posY - this.motionY * (double)var27, this.posZ - this.motionZ * (double)var27, this.motionX, this.motionY, this.motionZ); } var23 = 0.8F; } this.motionX *= (double)var23; this.motionY *= (double)var23; this.motionZ *= (double)var23; this.motionY -= (double)var11; this.setPosition(this.posX, this.posY, this.posZ); this.doBlockCollisions(); } } /** * (abstract) Protected helper method to write subclass entity data to NBT. */ public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) { par1NBTTagCompound.setShort("xTile", (short)this.xTile); par1NBTTagCompound.setShort("yTile", (short)this.yTile); par1NBTTagCompound.setShort("zTile", (short)this.zTile); par1NBTTagCompound.setByte("inTile", (byte)this.inTile); par1NBTTagCompound.setByte("inData", (byte)this.inData); par1NBTTagCompound.setByte("shake", (byte)this.arrowShake); par1NBTTagCompound.setByte("inGround", (byte)(this.inGround ? 1 : 0)); par1NBTTagCompound.setByte("pickup", (byte)this.canBePickedUp); par1NBTTagCompound.setDouble("damage", this.damage); } /** * (abstract) Protected helper method to read subclass entity data from NBT. */ public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) { this.xTile = par1NBTTagCompound.getShort("xTile"); this.yTile = par1NBTTagCompound.getShort("yTile"); this.zTile = par1NBTTagCompound.getShort("zTile"); this.inTile = par1NBTTagCompound.getByte("inTile") & 255; this.inData = par1NBTTagCompound.getByte("inData") & 255; this.arrowShake = par1NBTTagCompound.getByte("shake") & 255; this.inGround = par1NBTTagCompound.getByte("inGround") == 1; if (par1NBTTagCompound.hasKey("damage")) { this.damage = par1NBTTagCompound.getDouble("damage"); } if (par1NBTTagCompound.hasKey("pickup")) { this.canBePickedUp = par1NBTTagCompound.getByte("pickup"); } else if (par1NBTTagCompound.hasKey("player")) { this.canBePickedUp = par1NBTTagCompound.getBoolean("player") ? 1 : 0; } } /** * returns if this entity triggers Block.onEntityWalking on the blocks they walk on. used for spiders and wolves to * prevent them from trampling crops */ protected boolean canTriggerWalking() { return false; } @SideOnly(Side.CLIENT) public float getShadowSize() { return 0.0F; } public void setDamage(double par1) { this.damage = par1; } public double getDamage() { return this.damage; } /** * Sets the amount of knockback the arrow applies when it hits a mob. */ public void setKnockbackStrength(int par1) { this.knockbackStrength = par1; } /** * If returns false, the item will not inflict any damage against entities. */ public boolean canAttackWithItem() { return false; } /** * Whether the arrow has a stream of critical hit particles flying behind it. */ public void setIsCritical(boolean par1) { byte var2 = this.dataWatcher.getWatchableObjectByte(16); if (par1) { this.dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 | 1))); } else { this.dataWatcher.updateObject(16, Byte.valueOf((byte)(var2 & -2))); } } /** * Whether the arrow has a stream of critical hit particles flying behind it. */ public boolean getIsCritical() { byte var1 = this.dataWatcher.getWatchableObjectByte(16); return (var1 & 1) != 0; } public void func_46023_b(int k) { // TODO Auto-generated method stub } }package net.minecraft.src; import org.lwjgl.opengl.GL11; public class RenderDarkArrow extends Render { public RenderDarkArrow() { } public void renderDarkArrow(EntityDarkArrow entitydarkarrow, double d, double d1, double d2, float f, float f1) { loadTexture("/darkstone/darkarrows.png"); GL11.glPushMatrix(); GL11.glTranslatef((float)d, (float)d1, (float)d2); GL11.glRotatef((entitydarkarrow.prevRotationYaw + (entitydarkarrow.rotationYaw - entitydarkarrow.prevRotationYaw) * f1) - 90F, 0.0F, 1.0F, 0.0F); GL11.glRotatef(entitydarkarrow.prevRotationPitch + (entitydarkarrow.rotationPitch - entitydarkarrow.prevRotationPitch) * f1, 0.0F, 0.0F, 1.0F); Tessellator tessellator = Tessellator.instance; int i = 0; float f2 = 0.0F; float f3 = 0.5F; float f4 = (float)(0 + i * 10) / 32F; float f5 = (float)(5 + i * 10) / 32F; float f6 = 0.0F; float f7 = 0.15625F; float f8 = (float)(5 + i * 10) / 32F; float f9 = (float)(10 + i * 10) / 32F; float f10 = 0.05625F; GL11.glEnable(32826 /*GL_RESCALE_NORMAL_EXT*/); float f11 = (float)entitydarkarrow.arrowShake - f1; if(f11 > 0.0F) { float f12 = -MathHelper.sin(f11 * 3F) * f11; GL11.glRotatef(f12, 0.0F, 0.0F, 1.0F); } GL11.glRotatef(45F, 1.0F, 0.0F, 0.0F); GL11.glScalef(f10, f10, f10); GL11.glTranslatef(-4F, 0.0F, 0.0F); GL11.glNormal3f(f10, 0.0F, 0.0F); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(-7D, -2D, -2D, f6, f8); tessellator.addVertexWithUV(-7D, -2D, 2D, f7, f8); tessellator.addVertexWithUV(-7D, 2D, 2D, f7, f9); tessellator.addVertexWithUV(-7D, 2D, -2D, f6, f9); tessellator.draw(); GL11.glNormal3f(-f10, 0.0F, 0.0F); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(-7D, 2D, -2D, f6, f8); tessellator.addVertexWithUV(-7D, 2D, 2D, f7, f8); tessellator.addVertexWithUV(-7D, -2D, 2D, f7, f9); tessellator.addVertexWithUV(-7D, -2D, -2D, f6, f9); tessellator.draw(); for(int j = 0; j < 4; j++) { GL11.glRotatef(90F, 1.0F, 0.0F, 0.0F); GL11.glNormal3f(0.0F, 0.0F, f10); tessellator.startDrawingQuads(); tessellator.addVertexWithUV(-8D, -2D, 0.0D, f2, f4); tessellator.addVertexWithUV(8D, -2D, 0.0D, f3, f4); tessellator.addVertexWithUV(8D, 2D, 0.0D, f3, f5); tessellator.addVertexWithUV(-8D, 2D, 0.0D, f2, f5); tessellator.draw(); } GL11.glDisable(32826 /*GL_RESCALE_NORMAL_EXT*/); GL11.glPopMatrix(); } public void doRender(Entity entity, double d, double d1, double d2, float f, float f1) { renderDarkArrow((EntityDarkArrow)entity, d, d1, d2, f, f1); } }package net.minecraft.src; import java.util.Map; import java.util.Random; public class mod_Darkstone extends BaseMod { public static final Item Obsidianrod = new Item(2100).setItemName("darkrod"); public static final ItemPickaxeDark Darkpickaxe = (ItemPickaxeDark)new ItemPickaxeDark(2101, EnumToolDark.DARK).setItemName("darkpick"); public static final ItemSwordDark Darksword = (ItemSwordDark)new ItemSwordDark(2102, EnumToolDark.DARK).setItemName("darksword"); public static final Item darkstone = new Item(2099).setItemName("dark"); public static final ItemHoeDark Darkhoe = (ItemHoeDark)new ItemHoeDark(2105, EnumToolDark.DARK).setItemName("darkhoe"); public static final ItemSpadeDark Darkspade = (ItemSpadeDark)new ItemSpadeDark(2103, EnumToolDark.DARK).setItemName("darkspade"); public static final ItemAxeDark Darkaxe = (ItemAxeDark)new ItemAxeDark(2104, EnumToolDark.DARK).setItemName("darkaxe"); public static final Block Darkore = new DarkstoneOre(2098, 6).setResistance(10.0F).setHardness(5.0F).setBlockName("dore"); public static final Item Darkarrow = new Item(2106).setItemName("darkarrow"); public static final Item Darkbow = new DarkBow(2107).setItemName("darkbow"); public static final Item Darkorb = new Item(2108).setItemName("dorb"); public static int DarkBow1 = ModLoader.addOverride("/gui/items.png", "/darkstone/darkbow1.png"); public static int DarkBow2 = ModLoader.addOverride("/gui/items.png", "/darkstone/darkbow2.png"); public static int DarkBow3 = ModLoader.addOverride("/gui/items.png", "/darkstone/darkbow3.png"); public static int DarkBow4 = ModLoader.addOverride("/gui/items.png", "/darkstone/darkbow4.png"); protected Random randomGenerator; public mod_Darkstone() { ModLoader.setInGameHook(this, true, true); ModLoader.addSmelting(Darkore.blockID, new ItemStack(darkstone, 1)); } public String getVersion() { return "1.4.2"; } public void load() { ModLoader.registerBlock(Darkore); Darkore.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/darkstone/darkstoneore.png"); ModLoader.addName(Darkore, "§8Darkstone Ore"); darkstone.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkstone.png"); ModLoader.addName(darkstone, "§8Darkstone"); Darksword.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darksword.png"); ModLoader.addName(Darksword, "§8Dark Sword"); ModLoader.addRecipe(new ItemStack(Darksword, 1), new Object[] { " D ", " D ", " X ", Character.valueOf('D'), darkstone, Character.valueOf('X'), Obsidianrod }); Darkpickaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkpickaxe.png"); ModLoader.addName(Darkpickaxe, "§8Dark Pickaxe"); ModLoader.addRecipe(new ItemStack(Darkpickaxe, 1), new Object[] { "DDD", " X ", " X ", Character.valueOf('D'), darkstone, Character.valueOf('X'), Obsidianrod }); Obsidianrod.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/obsidianrod.png"); ModLoader.addName(Obsidianrod, "§8Obsidian Rod"); ModLoader.addRecipe(new ItemStack(Obsidianrod, 4), new Object[] { " X ", " X ", Character.valueOf('X'), Block.obsidian}); Darkaxe.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkaxe.png"); ModLoader.addName(Darkaxe, "§8Dark Axe"); ModLoader.addRecipe(new ItemStack(Darkaxe, 1), new Object[] { "DD ", "DX ", " X ", Character.valueOf('D'), darkstone, Character.valueOf('X'), Obsidianrod }); Darkspade.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkshovel.png"); ModLoader.addName(Darkspade, "§8Dark Shovel"); ModLoader.addRecipe(new ItemStack(Darkspade, 1), new Object[] { " D ", " X ", " X ", Character.valueOf('D'), darkstone, Character.valueOf('X'), Obsidianrod }); Darkhoe.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkhoe.png"); ModLoader.addName(Darkhoe, "§8Dark Hoe"); ModLoader.addRecipe(new ItemStack(Darkhoe, 1), new Object[] { "DD ", " X ", " X ", Character.valueOf('D'), darkstone, Character.valueOf('X'), Obsidianrod }); Darkarrow.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkarrow.png"); ModLoader.addName(Darkarrow, "§8Dark Arrow"); Darkbow.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkbow.png"); ModLoader.addName(Darkbow, "§8Dark Bow"); ModLoader.addRecipe(new ItemStack(Darkbow, 1), new Object[] { "XD ", "X D", "XD ", Character.valueOf('X'), darkstone, Character.valueOf('D'), Obsidianrod }); Darkorb.iconIndex = ModLoader.addOverride("/gui/items.png", "/darkstone/darkorb.png"); ModLoader.addName(Darkorb, "§8Dark Orb"); ModLoader.addRecipe(new ItemStack(Darkorb, 1), new Object[] { "XDX", "DMD", "XDX", Character.valueOf('D'), darkstone, Character.valueOf('X'), Block.obsidian, Character.valueOf('M'), Item.diamond }); } public void generateSurface(World world, Random random, int chunkX, int chunkZ) { this.randomGenerator = random; for (int i = 0; i < 1; i++) { int randPosX = chunkX + this.randomGenerator.nextInt(16); int randPosY = random.nextInt(16); int randPosZ = chunkZ + this.randomGenerator.nextInt(16); new WorldGenMinable(Darkore.blockID, 3).generate(world, random, randPosX, randPosY, randPosZ); } } public void addRenderer(Map map) { map.put(EntityDarkArrow.class, new RenderDarkArrow()); } }I had been searching like crazy and i still can't find it. Also do you know how to make an item 3d like a sword or a pickaxe? I know i saw it somewhere, but i can't remember where i did see it...
This is the code:
P.S. I'm new to modding, so sorry if I'm missing something obvious.
If you're getting an error for shiftedIndex then Porkanium isn't declared as an Item. Post the rest of your code please. The porkCooked variable is in Item so you need to call it from there:
Adding the name of the class the object is in doesn't make a difference seeing as that code is in that class already.
No one else has had trouble with it from what I have heard. Post your code please.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYou have to make the three Strings equal lengths in the recipe.
For Example:
ModLoader.addRecipe(new ItemStack(NosiAxe,1), new Object [] { "XX ","XS "," S ",('X'),NosiIngot,('S'),Item.stick });Oh okay! Thank you!
Porkanium is a block, so what part of Porkanium.shifted index should I change?
Here is the rest of the code regarding Porkanium:
package net.minecraft.src; public class mod_FoodOres extends BaseMod { public static Block Porkanium = (new Block(400, Material.rock)).setLightValue(1.0F).setHardness(1.0F).setResistance(1.0F).setBlockName("Porkanium"); public void load() { ModLoader.registerBlock(Porkanium); Porkanium.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/SpartanMods/FoodOres/Porkanium.png"); ModLoader.addName(Porkanium, "Porkanium"); ModLoader.addSmelting(Porkanium.shiftedIndex, new ItemStack(Item.porkCooked), 1.0F); } public String getVersion() { return "1.4.2"; } }-
View User Profile
-
View Posts
-
Send Message
Curse PremiumAnytime you reference your Porkanium object from outside your main mod file, you're going to have to retrieve it from your mod_yourModFileName file, so for example, you'll want to start with
This of course takes place in your Main mod file, so you don't need to add this.
Blocks use blockID, while items use shiftedIndex. Simply change your Porkanium.shiftedIndex to
I wouldn't need the mod_yourModFileName though, right? Because this smelting recipe is in the main mod file already, and doesn't need to be retrieved. Anyways, thanks!
That is correct.
together they are powerful beyond imagination."
Okay, here it is:
mod_WorldGenDungeon1
package net.minecraft.src; import java.util.Random; public class mod_WorldGenDungeon1 extends BaseMod { public void load() { } public void generateSurface(World world, Random random, int chunkX, int chunkZ) { for(int k = 0; k < 10; k++) { int RandPosX = chunkX + random.nextInt(5); int RandPosY = random.nextInt(60); int RandPosZ = chunkZ + random.nextInt(5); (new WorldGenDungeon1()).generate(world, random, RandPosX, RandPosY, RandPosZ); } } public String getVersion() { return "1.4.2"; } }package net.minecraft.src; import java.util.Random; public class WorldGenDungeon1 extends WorldGenerator { public WorldGenDungeon1() { } public boolean generate(World world, Random random, int i, int j, int k) { world.setBlock(i + 0, j + 0, k + 0, Block.dirt.blockID); world.setBlock(i + 0, j + 0, k + 1, Block.dirt.blockID); world.setBlock(i + 0, j + 0, k + 2, Block.dirt.blockID); world.setBlock(i + 0, j + 0, k + 3, Block.dirt.blockID); world.setBlock(i + 0, j + 0, k + 4, Block.dirt.blockID); world.setBlock(i + 0, j + 0, k + 5, Block.dirt.blockID); world.setBlock(i + 0, j + 0, k + 6, Block.dirt.blockID); world.setBlock(i + 0, j + 0, k + 7, Block.dirt.blockID); world.setBlock(i + 0, j + 0, k + 8, Block.dirt.blockID); world.setBlock(i + 0, j + 0, k + 9, Block.dirt.blockID); world.setBlock(i + 0, j + 0, k + 10, Block.dirt.blockID); world.setBlock(i + 0, j + 0, k + 11, Block.dirt.blockID); world.setBlock(i + 0, j + 0, k + 12, Block.grass.blockID); world.setBlock(i + 0, j + 0, k + 13, Block.grass.blockID); world.setBlockAndMetadata(i + 0, j + 1, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 1, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 1, k + 2, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 1, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 1, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 1, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 1, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 1, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 1, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 1, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 1, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 1, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 2, k + 0, -117, 1); world.setBlockAndMetadata(i + 0, j + 2, k + 1, -117, 1); world.setBlockAndMetadata(i + 0, j + 2, k + 2, -117, 1); world.setBlockAndMetadata(i + 0, j + 2, k + 3, -117, 1); world.setBlockAndMetadata(i + 0, j + 2, k + 4, -117, 1); world.setBlockAndMetadata(i + 0, j + 2, k + 5, -117, 1); world.setBlockAndMetadata(i + 0, j + 2, k + 6, -117, 1); world.setBlockAndMetadata(i + 0, j + 2, k + 7, -117, 1); world.setBlockAndMetadata(i + 0, j + 2, k + 8, -117, 1); world.setBlockAndMetadata(i + 0, j + 2, k + 9, -117, 1); world.setBlockAndMetadata(i + 0, j + 2, k + 10, -117, 1); world.setBlockAndMetadata(i + 0, j + 2, k + 11, -117, 1); world.setBlockAndMetadata(i + 0, j + 3, k + 0, -117, 1); world.setBlockAndMetadata(i + 0, j + 3, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 3, k + 2, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 3, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 3, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 3, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 3, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 3, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 3, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 3, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 3, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 3, k + 11, -117, 1); world.setBlockAndMetadata(i + 0, j + 4, k + 0, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 0, j + 4, k + 1, -117, 1); world.setBlockAndMetadata(i + 0, j + 4, k + 2, -117, 1); world.setBlockAndMetadata(i + 0, j + 4, k + 3, -117, 1); world.setBlockAndMetadata(i + 0, j + 4, k + 4, -117, 1); world.setBlockAndMetadata(i + 0, j + 4, k + 5, -117, 1); world.setBlockAndMetadata(i + 0, j + 4, k + 6, -117, 1); world.setBlockAndMetadata(i + 0, j + 4, k + 7, -117, 1); world.setBlockAndMetadata(i + 0, j + 4, k + 8, -117, 1); world.setBlockAndMetadata(i + 0, j + 4, k + 9, -117, 1); world.setBlockAndMetadata(i + 0, j + 4, k + 10, -117, 1); world.setBlockAndMetadata(i + 0, j + 4, k + 11, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 0, j + 5, k + 0, -117, 1); world.setBlockAndMetadata(i + 0, j + 5, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 5, k + 2, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 5, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 5, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 5, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 5, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 5, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 5, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 5, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 5, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 0, j + 5, k + 11, -117, 1); world.setBlock(i + 0, j + 6, k + 0, Block.glowStone.blockID); world.setBlock(i + 0, j + 6, k + 11, Block.glowStone.blockID); world.setBlock(i + 1, j + 0, k + 0, Block.dirt.blockID); world.setBlock(i + 1, j + 0, k + 1, Block.dirt.blockID); world.setBlock(i + 1, j + 0, k + 2, Block.dirt.blockID); world.setBlock(i + 1, j + 0, k + 3, Block.dirt.blockID); world.setBlock(i + 1, j + 0, k + 4, Block.dirt.blockID); world.setBlock(i + 1, j + 0, k + 5, Block.dirt.blockID); world.setBlock(i + 1, j + 0, k + 6, Block.dirt.blockID); world.setBlock(i + 1, j + 0, k + 7, Block.dirt.blockID); world.setBlock(i + 1, j + 0, k + 8, Block.dirt.blockID); world.setBlock(i + 1, j + 0, k + 9, Block.dirt.blockID); world.setBlock(i + 1, j + 0, k + 10, Block.dirt.blockID); world.setBlock(i + 1, j + 0, k + 11, Block.dirt.blockID); world.setBlock(i + 1, j + 0, k + 12, Block.grass.blockID); world.setBlock(i + 1, j + 0, k + 13, Block.grass.blockID); world.setBlockAndMetadata(i + 1, j + 1, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 1, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 1, k + 2, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 1, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 1, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 1, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 1, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 1, k + 7, Block.stoneBrick.blockID, 1); world.setBlock(i + 1, j + 1, k + 8, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 1, j + 1, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 1, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 1, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 2, k + 0, -117, 1); world.setBlockAndMetadata(i + 1, j + 2, k + 11, -117, 1); world.setBlockAndMetadata(i + 1, j + 3, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 3, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 4, k + 0, -117, 1); world.setBlockAndMetadata(i + 1, j + 4, k + 11, -117, 1); world.setBlockAndMetadata(i + 1, j + 5, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 5, k + 11, -117, 1); world.setBlockAndMetadata(i + 1, j + 6, k + 1, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 1, j + 6, k + 2, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 1, j + 6, k + 3, Block.stoneBrick.blockID, 1); world.setBlock(i + 1, j + 6, k + 4, Block.stoneBrick.blockID); world.setBlock(i + 1, j + 6, k + 5, Block.glowStone.blockID); world.setBlock(i + 1, j + 6, k + 6, Block.glowStone.blockID); world.setBlock(i + 1, j + 6, k + 7, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 1, j + 6, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 1, j + 6, k + 9, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 1, j + 6, k + 10, Block.stoneBrick.blockID, 3); world.setBlock(i + 2, j + 0, k + 0, Block.dirt.blockID); world.setBlock(i + 2, j + 0, k + 1, Block.dirt.blockID); world.setBlock(i + 2, j + 0, k + 2, Block.dirt.blockID); world.setBlock(i + 2, j + 0, k + 3, Block.dirt.blockID); world.setBlock(i + 2, j + 0, k + 4, Block.dirt.blockID); world.setBlock(i + 2, j + 0, k + 5, Block.dirt.blockID); world.setBlock(i + 2, j + 0, k + 6, Block.dirt.blockID); world.setBlock(i + 2, j + 0, k + 7, Block.dirt.blockID); world.setBlock(i + 2, j + 0, k + 8, Block.dirt.blockID); world.setBlock(i + 2, j + 0, k + 9, Block.dirt.blockID); world.setBlock(i + 2, j + 0, k + 10, Block.dirt.blockID); world.setBlock(i + 2, j + 0, k + 11, Block.dirt.blockID); world.setBlock(i + 2, j + 0, k + 12, Block.dirt.blockID); world.setBlock(i + 2, j + 0, k + 13, Block.dirt.blockID); world.setBlockAndMetadata(i + 2, j + 1, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 1, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 1, k + 2, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 1, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 1, k + 4, Block.stoneBrick.blockID, 1); world.setBlock(i + 2, j + 1, k + 5, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 2, j + 1, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 1, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 1, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 1, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 1, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 1, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 2, k + 0, -117, 1); world.setBlockAndMetadata(i + 2, j + 2, k + 11, -117, 1); world.setBlockAndMetadata(i + 2, j + 3, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 3, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 4, k + 0, -117, 1); world.setBlockAndMetadata(i + 2, j + 4, k + 11, -117, 1); world.setBlockAndMetadata(i + 2, j + 5, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 5, k + 11, -117, 1); world.setBlockAndMetadata(i + 2, j + 6, k + 1, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 2, j + 6, k + 2, Block.stoneBrick.blockID, 1); world.setBlock(i + 2, j + 6, k + 3, Block.stoneBrick.blockID); world.setBlock(i + 2, j + 6, k + 4, Block.glowStone.blockID); world.setBlockAndMetadata(i + 2, j + 6, k + 5, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 2, j + 6, k + 6, Block.stoneBrick.blockID, 3); world.setBlock(i + 2, j + 6, k + 7, Block.glowStone.blockID); world.setBlock(i + 2, j + 6, k + 8, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 2, j + 6, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 2, j + 6, k + 10, Block.stoneBrick.blockID, 2); world.setBlock(i + 3, j + 0, k + 0, Block.dirt.blockID); world.setBlock(i + 3, j + 0, k + 1, Block.dirt.blockID); world.setBlock(i + 3, j + 0, k + 2, Block.dirt.blockID); world.setBlock(i + 3, j + 0, k + 3, Block.dirt.blockID); world.setBlock(i + 3, j + 0, k + 4, Block.dirt.blockID); world.setBlock(i + 3, j + 0, k + 5, Block.dirt.blockID); world.setBlock(i + 3, j + 0, k + 6, Block.dirt.blockID); world.setBlock(i + 3, j + 0, k + 7, Block.dirt.blockID); world.setBlock(i + 3, j + 0, k + 8, Block.dirt.blockID); world.setBlock(i + 3, j + 0, k + 9, Block.dirt.blockID); world.setBlock(i + 3, j + 0, k + 10, Block.dirt.blockID); world.setBlock(i + 3, j + 0, k + 11, Block.dirt.blockID); world.setBlock(i + 3, j + 0, k + 12, Block.dirt.blockID); world.setBlock(i + 3, j + 0, k + 13, Block.dirt.blockID); world.setBlockAndMetadata(i + 3, j + 1, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 3, j + 1, k + 1, Block.stoneBrick.blockID, 1); world.setBlock(i + 3, j + 1, k + 2, Block.stoneBrick.blockID); world.setBlock(i + 3, j + 1, k + 3, Block.mobSpawner.blockID); world.setBlockAndMetadata(i + 3, j + 1, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 3, j + 1, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 3, j + 1, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 3, j + 1, k + 7, Block.stoneBrick.blockID, 1); world.setBlock(i + 3, j + 1, k + 8, Block.mobSpawner.blockID); world.setBlock(i + 3, j + 1, k + 9, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 3, j + 1, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 3, j + 1, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 3, j + 2, k + 0, -117, 1); world.setBlockAndMetadata(i + 3, j + 2, k + 11, -117, 1); world.setBlockAndMetadata(i + 3, j + 3, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 3, j + 3, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 3, j + 4, k + 0, -117, 1); world.setBlockAndMetadata(i + 3, j + 4, k + 11, -117, 1); world.setBlockAndMetadata(i + 3, j + 5, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 3, j + 5, k + 11, -117, 1); world.setBlockAndMetadata(i + 3, j + 6, k + 1, Block.stoneBrick.blockID, 1); world.setBlock(i + 3, j + 6, k + 2, Block.stoneBrick.blockID); world.setBlock(i + 3, j + 6, k + 3, Block.glowStone.blockID); world.setBlockAndMetadata(i + 3, j + 6, k + 4, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 3, j + 6, k + 5, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 3, j + 6, k + 6, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 3, j + 6, k + 7, Block.stoneBrick.blockID, 3); world.setBlock(i + 3, j + 6, k + 8, Block.glowStone.blockID); world.setBlock(i + 3, j + 6, k + 9, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 3, j + 6, k + 10, Block.stoneBrick.blockID, 1); world.setBlock(i + 4, j + 0, k + 0, Block.dirt.blockID); world.setBlock(i + 4, j + 0, k + 1, Block.dirt.blockID); world.setBlock(i + 4, j + 0, k + 2, Block.dirt.blockID); world.setBlock(i + 4, j + 0, k + 3, Block.dirt.blockID); world.setBlock(i + 4, j + 0, k + 4, Block.dirt.blockID); world.setBlock(i + 4, j + 0, k + 5, Block.dirt.blockID); world.setBlock(i + 4, j + 0, k + 6, Block.dirt.blockID); world.setBlock(i + 4, j + 0, k + 7, Block.dirt.blockID); world.setBlock(i + 4, j + 0, k + 8, Block.dirt.blockID); world.setBlock(i + 4, j + 0, k + 9, Block.dirt.blockID); world.setBlock(i + 4, j + 0, k + 10, Block.dirt.blockID); world.setBlock(i + 4, j + 0, k + 11, Block.dirt.blockID); world.setBlock(i + 4, j + 0, k + 12, Block.dirt.blockID); world.setBlock(i + 4, j + 0, k + 13, Block.grass.blockID); world.setBlockAndMetadata(i + 4, j + 1, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 1, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 1, k + 2, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 1, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 1, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 1, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 1, k + 6, Block.stoneBrick.blockID, 1); world.setBlock(i + 4, j + 1, k + 7, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 4, j + 1, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 1, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 1, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 1, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 2, k + 0, -117, 1); world.setBlockAndMetadata(i + 4, j + 2, k + 11, -117, 1); world.setBlockAndMetadata(i + 4, j + 3, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 3, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 4, k + 0, -117, 1); world.setBlockAndMetadata(i + 4, j + 4, k + 11, -117, 1); world.setBlockAndMetadata(i + 4, j + 5, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 5, k + 11, -117, 1); world.setBlock(i + 4, j + 6, k + 1, Block.stoneBrick.blockID); world.setBlock(i + 4, j + 6, k + 2, Block.glowStone.blockID); world.setBlockAndMetadata(i + 4, j + 6, k + 3, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 4, j + 6, k + 4, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 4, j + 6, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 6, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 4, j + 6, k + 7, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 4, j + 6, k + 8, Block.stoneBrick.blockID, 3); world.setBlock(i + 4, j + 6, k + 9, Block.glowStone.blockID); world.setBlock(i + 4, j + 6, k + 10, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 4, j + 6, k + 11, -117, 1); world.setBlock(i + 5, j + 0, k + 0, Block.dirt.blockID); world.setBlock(i + 5, j + 0, k + 1, Block.dirt.blockID); world.setBlock(i + 5, j + 0, k + 2, Block.dirt.blockID); world.setBlock(i + 5, j + 0, k + 3, Block.dirt.blockID); world.setBlock(i + 5, j + 0, k + 4, Block.dirt.blockID); world.setBlock(i + 5, j + 0, k + 5, Block.dirt.blockID); world.setBlock(i + 5, j + 0, k + 6, Block.dirt.blockID); world.setBlock(i + 5, j + 0, k + 7, Block.dirt.blockID); world.setBlock(i + 5, j + 0, k + 8, Block.dirt.blockID); world.setBlock(i + 5, j + 0, k + 9, Block.dirt.blockID); world.setBlock(i + 5, j + 0, k + 10, Block.dirt.blockID); world.setBlock(i + 5, j + 0, k + 11, Block.dirt.blockID); world.setBlock(i + 5, j + 0, k + 12, Block.dirt.blockID); world.setBlock(i + 5, j + 0, k + 13, Block.dirt.blockID); world.setBlockAndMetadata(i + 5, j + 1, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 1, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 1, k + 2, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 1, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 1, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 1, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 1, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 1, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 1, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 1, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 1, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 1, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 1, k + 12, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 1, k + 13, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 2, k + 0, -117, 1); world.setBlockAndMetadata(i + 5, j + 2, k + 11, -117, 1); world.setBlockAndMetadata(i + 5, j + 2, k + 12, -117, 1); world.setBlockAndMetadata(i + 5, j + 2, k + 13, -117, 1); world.setBlockAndMetadata(i + 5, j + 3, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 3, k + 11, -117, 1); world.setBlockAndMetadata(i + 5, j + 3, k + 12, -117, 1); world.setBlockAndMetadata(i + 5, j + 3, k + 13, -117, 1); world.setBlockAndMetadata(i + 5, j + 4, k + 0, -117, 1); world.setBlockAndMetadata(i + 5, j + 4, k + 11, -117, 1); world.setBlockAndMetadata(i + 5, j + 4, k + 12, -117, 1); world.setBlockAndMetadata(i + 5, j + 4, k + 13, -117, 1); world.setBlockAndMetadata(i + 5, j + 5, k + 0, Block.stoneBrick.blockID, 1); world.setBlock(i + 5, j + 5, k + 11, Block.glowStone.blockID); world.setBlockAndMetadata(i + 5, j + 5, k + 12, -117, 1); world.setBlock(i + 5, j + 5, k + 13, Block.glowStone.blockID); world.setBlock(i + 5, j + 6, k + 1, Block.glowStone.blockID); world.setBlockAndMetadata(i + 5, j + 6, k + 2, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 5, j + 6, k + 3, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 5, j + 6, k + 4, Block.stoneBrick.blockID, 1); world.setBlock(i + 5, j + 6, k + 5, Block.stoneBrick.blockID); world.setBlock(i + 5, j + 6, k + 6, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 5, j + 6, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 5, j + 6, k + 8, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 5, j + 6, k + 9, Block.stoneBrick.blockID, 3); world.setBlock(i + 5, j + 6, k + 10, Block.glowStone.blockID); world.setBlockAndMetadata(i + 5, j + 6, k + 11, -117, 1); world.setBlockAndMetadata(i + 5, j + 6, k + 12, -117, 1); world.setBlockAndMetadata(i + 5, j + 6, k + 13, -117, 1); world.setBlock(i + 6, j + 0, k + 0, Block.dirt.blockID); world.setBlock(i + 6, j + 0, k + 1, Block.dirt.blockID); world.setBlock(i + 6, j + 0, k + 2, Block.dirt.blockID); world.setBlock(i + 6, j + 0, k + 3, Block.dirt.blockID); world.setBlock(i + 6, j + 0, k + 4, Block.dirt.blockID); world.setBlock(i + 6, j + 0, k + 5, Block.dirt.blockID); world.setBlock(i + 6, j + 0, k + 6, Block.dirt.blockID); world.setBlock(i + 6, j + 0, k + 7, Block.dirt.blockID); world.setBlock(i + 6, j + 0, k + 8, Block.dirt.blockID); world.setBlock(i + 6, j + 0, k + 9, Block.dirt.blockID); world.setBlock(i + 6, j + 0, k + 10, Block.dirt.blockID); world.setBlock(i + 6, j + 0, k + 11, Block.dirt.blockID); world.setBlock(i + 6, j + 0, k + 12, Block.dirt.blockID); world.setBlock(i + 6, j + 0, k + 13, Block.dirt.blockID); world.setBlockAndMetadata(i + 6, j + 1, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 1, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 1, k + 2, Block.stoneBrick.blockID, 1); world.setBlock(i + 6, j + 1, k + 3, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 6, j + 1, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 1, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 1, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 1, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 1, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 1, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 1, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 1, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 1, k + 12, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 1, k + 13, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 2, k + 0, -117, 1); world.setBlockAndMetadata(i + 6, j + 2, k + 1, Block.chest.blockID, 3); world.setBlockAndMetadata(i + 6, j + 3, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 4, k + 0, -117, 1); world.setBlockAndMetadata(i + 6, j + 5, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 5, k + 11, -117, 1); world.setBlockAndMetadata(i + 6, j + 6, k + 1, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 6, j + 6, k + 2, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 6, j + 6, k + 3, Block.stoneBrick.blockID, 1); world.setBlock(i + 6, j + 6, k + 4, Block.stoneBrick.blockID); world.setBlock(i + 6, j + 6, k + 5, Block.glowStone.blockID); world.setBlock(i + 6, j + 6, k + 6, Block.glowStone.blockID); world.setBlock(i + 6, j + 6, k + 7, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 6, j + 6, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 6, j + 6, k + 9, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 6, j + 6, k + 10, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 6, j + 6, k + 11, -117, 1); world.setBlockAndMetadata(i + 6, j + 6, k + 12, -117, 1); world.setBlockAndMetadata(i + 6, j + 6, k + 13, -117, 1); world.setBlock(i + 7, j + 0, k + 0, Block.dirt.blockID); world.setBlock(i + 7, j + 0, k + 1, Block.dirt.blockID); world.setBlock(i + 7, j + 0, k + 2, Block.dirt.blockID); world.setBlock(i + 7, j + 0, k + 3, Block.dirt.blockID); world.setBlock(i + 7, j + 0, k + 4, Block.dirt.blockID); world.setBlock(i + 7, j + 0, k + 5, Block.dirt.blockID); world.setBlock(i + 7, j + 0, k + 6, Block.dirt.blockID); world.setBlock(i + 7, j + 0, k + 7, Block.dirt.blockID); world.setBlock(i + 7, j + 0, k + 8, Block.dirt.blockID); world.setBlock(i + 7, j + 0, k + 9, Block.dirt.blockID); world.setBlock(i + 7, j + 0, k + 10, Block.dirt.blockID); world.setBlock(i + 7, j + 0, k + 11, Block.dirt.blockID); world.setBlock(i + 7, j + 0, k + 12, Block.dirt.blockID); world.setBlock(i + 7, j + 0, k + 13, Block.dirt.blockID); world.setBlockAndMetadata(i + 7, j + 1, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 1, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 1, k + 2, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 1, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 1, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 1, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 1, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 1, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 1, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 1, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 1, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 1, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 1, k + 12, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 1, k + 13, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 2, k + 0, -117, 1); world.setBlockAndMetadata(i + 7, j + 2, k + 11, -117, 1); world.setBlockAndMetadata(i + 7, j + 2, k + 12, -117, 1); world.setBlockAndMetadata(i + 7, j + 2, k + 13, -117, 1); world.setBlockAndMetadata(i + 7, j + 3, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 3, k + 11, -117, 1); world.setBlockAndMetadata(i + 7, j + 3, k + 12, -117, 1); world.setBlockAndMetadata(i + 7, j + 3, k + 13, -117, 1); world.setBlockAndMetadata(i + 7, j + 4, k + 0, -117, 1); world.setBlockAndMetadata(i + 7, j + 4, k + 11, -117, 1); world.setBlockAndMetadata(i + 7, j + 4, k + 12, -117, 1); world.setBlockAndMetadata(i + 7, j + 4, k + 13, -117, 1); world.setBlockAndMetadata(i + 7, j + 5, k + 0, Block.stoneBrick.blockID, 1); world.setBlock(i + 7, j + 5, k + 11, Block.glowStone.blockID); world.setBlockAndMetadata(i + 7, j + 5, k + 12, -117, 1); world.setBlock(i + 7, j + 5, k + 13, Block.glowStone.blockID); world.setBlock(i + 7, j + 6, k + 1, Block.glowStone.blockID); world.setBlockAndMetadata(i + 7, j + 6, k + 2, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 7, j + 6, k + 3, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 7, j + 6, k + 4, Block.stoneBrick.blockID, 1); world.setBlock(i + 7, j + 6, k + 5, Block.stoneBrick.blockID); world.setBlock(i + 7, j + 6, k + 6, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 7, j + 6, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 7, j + 6, k + 8, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 7, j + 6, k + 9, Block.stoneBrick.blockID, 3); world.setBlock(i + 7, j + 6, k + 10, Block.glowStone.blockID); world.setBlockAndMetadata(i + 7, j + 6, k + 11, -117, 1); world.setBlockAndMetadata(i + 7, j + 6, k + 12, -117, 1); world.setBlockAndMetadata(i + 7, j + 6, k + 13, -117, 1); world.setBlock(i + 8, j + 0, k + 0, Block.dirt.blockID); world.setBlock(i + 8, j + 0, k + 1, Block.dirt.blockID); world.setBlock(i + 8, j + 0, k + 2, Block.dirt.blockID); world.setBlock(i + 8, j + 0, k + 3, Block.dirt.blockID); world.setBlock(i + 8, j + 0, k + 4, Block.dirt.blockID); world.setBlock(i + 8, j + 0, k + 5, Block.dirt.blockID); world.setBlock(i + 8, j + 0, k + 6, Block.dirt.blockID); world.setBlock(i + 8, j + 0, k + 7, Block.dirt.blockID); world.setBlock(i + 8, j + 0, k + 8, Block.dirt.blockID); world.setBlock(i + 8, j + 0, k + 9, Block.dirt.blockID); world.setBlock(i + 8, j + 0, k + 10, Block.dirt.blockID); world.setBlock(i + 8, j + 0, k + 11, Block.dirt.blockID); world.setBlock(i + 8, j + 0, k + 12, Block.grass.blockID); world.setBlock(i + 8, j + 0, k + 13, Block.grass.blockID); world.setBlockAndMetadata(i + 8, j + 1, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 1, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 1, k + 2, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 1, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 1, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 1, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 1, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 1, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 1, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 1, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 1, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 1, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 2, k + 0, -117, 1); world.setBlockAndMetadata(i + 8, j + 2, k + 11, -117, 1); world.setBlockAndMetadata(i + 8, j + 3, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 3, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 4, k + 0, -117, 1); world.setBlockAndMetadata(i + 8, j + 4, k + 11, -117, 1); world.setBlockAndMetadata(i + 8, j + 5, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 5, k + 11, -117, 1); world.setBlock(i + 8, j + 6, k + 1, Block.stoneBrick.blockID); world.setBlock(i + 8, j + 6, k + 2, Block.glowStone.blockID); world.setBlockAndMetadata(i + 8, j + 6, k + 3, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 8, j + 6, k + 4, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 8, j + 6, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 6, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 8, j + 6, k + 7, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 8, j + 6, k + 8, Block.stoneBrick.blockID, 3); world.setBlock(i + 8, j + 6, k + 9, Block.glowStone.blockID); world.setBlock(i + 8, j + 6, k + 10, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 8, j + 6, k + 11, -117, 1); world.setBlock(i + 9, j + 0, k + 0, Block.dirt.blockID); world.setBlock(i + 9, j + 0, k + 1, Block.dirt.blockID); world.setBlock(i + 9, j + 0, k + 2, Block.dirt.blockID); world.setBlock(i + 9, j + 0, k + 3, Block.dirt.blockID); world.setBlock(i + 9, j + 0, k + 4, Block.dirt.blockID); world.setBlock(i + 9, j + 0, k + 5, Block.dirt.blockID); world.setBlock(i + 9, j + 0, k + 6, Block.dirt.blockID); world.setBlock(i + 9, j + 0, k + 7, Block.dirt.blockID); world.setBlock(i + 9, j + 0, k + 8, Block.dirt.blockID); world.setBlock(i + 9, j + 0, k + 9, Block.dirt.blockID); world.setBlock(i + 9, j + 0, k + 10, Block.dirt.blockID); world.setBlock(i + 9, j + 0, k + 11, Block.dirt.blockID); world.setBlock(i + 9, j + 0, k + 12, Block.dirt.blockID); world.setBlock(i + 9, j + 0, k + 13, Block.grass.blockID); world.setBlockAndMetadata(i + 9, j + 1, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 9, j + 1, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 9, j + 1, k + 2, Block.stoneBrick.blockID, 1); world.setBlock(i + 9, j + 1, k + 3, Block.mobSpawner.blockID); world.setBlockAndMetadata(i + 9, j + 1, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 9, j + 1, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 9, j + 1, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 9, j + 1, k + 7, Block.stoneBrick.blockID, 1); world.setBlock(i + 9, j + 1, k + 8, Block.mobSpawner.blockID); world.setBlockAndMetadata(i + 9, j + 1, k + 9, Block.stoneBrick.blockID, 1); world.setBlock(i + 9, j + 1, k + 10, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 9, j + 1, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 9, j + 2, k + 0, -117, 1); world.setBlockAndMetadata(i + 9, j + 2, k + 11, -117, 1); world.setBlockAndMetadata(i + 9, j + 3, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 9, j + 3, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 9, j + 4, k + 0, -117, 1); world.setBlockAndMetadata(i + 9, j + 4, k + 11, -117, 1); world.setBlockAndMetadata(i + 9, j + 5, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 9, j + 5, k + 11, -117, 1); world.setBlockAndMetadata(i + 9, j + 6, k + 1, Block.stoneBrick.blockID, 1); world.setBlock(i + 9, j + 6, k + 2, Block.stoneBrick.blockID); world.setBlock(i + 9, j + 6, k + 3, Block.glowStone.blockID); world.setBlockAndMetadata(i + 9, j + 6, k + 4, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 9, j + 6, k + 5, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 9, j + 6, k + 6, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 9, j + 6, k + 7, Block.stoneBrick.blockID, 3); world.setBlock(i + 9, j + 6, k + 8, Block.glowStone.blockID); world.setBlock(i + 9, j + 6, k + 9, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 9, j + 6, k + 10, Block.stoneBrick.blockID, 1); world.setBlock(i + 10, j + 0, k + 0, Block.dirt.blockID); world.setBlock(i + 10, j + 0, k + 1, Block.dirt.blockID); world.setBlock(i + 10, j + 0, k + 2, Block.dirt.blockID); world.setBlock(i + 10, j + 0, k + 3, Block.dirt.blockID); world.setBlock(i + 10, j + 0, k + 4, Block.dirt.blockID); world.setBlock(i + 10, j + 0, k + 5, Block.dirt.blockID); world.setBlock(i + 10, j + 0, k + 6, Block.dirt.blockID); world.setBlock(i + 10, j + 0, k + 7, Block.dirt.blockID); world.setBlock(i + 10, j + 0, k + 8, Block.dirt.blockID); world.setBlock(i + 10, j + 0, k + 9, Block.dirt.blockID); world.setBlock(i + 10, j + 0, k + 10, Block.dirt.blockID); world.setBlock(i + 10, j + 0, k + 11, Block.dirt.blockID); world.setBlock(i + 10, j + 0, k + 12, Block.dirt.blockID); world.setBlock(i + 10, j + 0, k + 13, Block.grass.blockID); world.setBlockAndMetadata(i + 10, j + 1, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 10, j + 1, k + 1, Block.stoneBrick.blockID, 1); world.setBlock(i + 10, j + 1, k + 2, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 10, j + 1, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 10, j + 1, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 10, j + 1, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 10, j + 1, k + 6, Block.stoneBrick.blockID, 1); world.setBlock(i + 10, j + 1, k + 7, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 10, j + 1, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 10, j + 1, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 10, j + 1, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 10, j + 1, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 10, j + 2, k + 0, -117, 1); world.setBlockAndMetadata(i + 10, j + 2, k + 11, -117, 1); world.setBlockAndMetadata(i + 10, j + 3, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 10, j + 3, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 10, j + 4, k + 0, -117, 1); world.setBlockAndMetadata(i + 10, j + 4, k + 11, -117, 1); world.setBlockAndMetadata(i + 10, j + 5, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 10, j + 5, k + 11, -117, 1); world.setBlockAndMetadata(i + 10, j + 6, k + 1, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 10, j + 6, k + 2, Block.stoneBrick.blockID, 1); world.setBlock(i + 10, j + 6, k + 3, Block.stoneBrick.blockID); world.setBlock(i + 10, j + 6, k + 4, Block.glowStone.blockID); world.setBlockAndMetadata(i + 10, j + 6, k + 5, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 10, j + 6, k + 6, Block.stoneBrick.blockID, 3); world.setBlock(i + 10, j + 6, k + 7, Block.glowStone.blockID); world.setBlock(i + 10, j + 6, k + 8, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 10, j + 6, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 10, j + 6, k + 10, Block.stoneBrick.blockID, 2); world.setBlock(i + 11, j + 0, k + 0, Block.dirt.blockID); world.setBlock(i + 11, j + 0, k + 1, Block.dirt.blockID); world.setBlock(i + 11, j + 0, k + 2, Block.dirt.blockID); world.setBlock(i + 11, j + 0, k + 3, Block.dirt.blockID); world.setBlock(i + 11, j + 0, k + 4, Block.dirt.blockID); world.setBlock(i + 11, j + 0, k + 5, Block.dirt.blockID); world.setBlock(i + 11, j + 0, k + 6, Block.dirt.blockID); world.setBlock(i + 11, j + 0, k + 7, Block.dirt.blockID); world.setBlock(i + 11, j + 0, k + 8, Block.dirt.blockID); world.setBlock(i + 11, j + 0, k + 9, Block.dirt.blockID); world.setBlock(i + 11, j + 0, k + 10, Block.dirt.blockID); world.setBlock(i + 11, j + 0, k + 11, Block.dirt.blockID); world.setBlock(i + 11, j + 0, k + 12, Block.dirt.blockID); world.setBlock(i + 11, j + 0, k + 13, Block.dirt.blockID); world.setBlockAndMetadata(i + 11, j + 1, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 1, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 1, k + 2, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 1, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 1, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 1, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 1, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 1, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 1, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 1, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 1, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 1, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 2, k + 0, -117, 1); world.setBlockAndMetadata(i + 11, j + 2, k + 11, -117, 1); world.setBlockAndMetadata(i + 11, j + 3, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 3, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 4, k + 0, -117, 1); world.setBlockAndMetadata(i + 11, j + 4, k + 11, -117, 1); world.setBlockAndMetadata(i + 11, j + 5, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 5, k + 11, -117, 1); world.setBlockAndMetadata(i + 11, j + 6, k + 1, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 11, j + 6, k + 2, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 11, j + 6, k + 3, Block.stoneBrick.blockID, 1); world.setBlock(i + 11, j + 6, k + 4, Block.stoneBrick.blockID); world.setBlock(i + 11, j + 6, k + 5, Block.glowStone.blockID); world.setBlock(i + 11, j + 6, k + 6, Block.glowStone.blockID); world.setBlock(i + 11, j + 6, k + 7, Block.stoneBrick.blockID); world.setBlockAndMetadata(i + 11, j + 6, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 11, j + 6, k + 9, Block.stoneBrick.blockID, 2); world.setBlockAndMetadata(i + 11, j + 6, k + 10, Block.stoneBrick.blockID, 3); world.setBlock(i + 12, j + 0, k + 0, Block.dirt.blockID); world.setBlock(i + 12, j + 0, k + 1, Block.dirt.blockID); world.setBlock(i + 12, j + 0, k + 2, Block.dirt.blockID); world.setBlock(i + 12, j + 0, k + 3, Block.dirt.blockID); world.setBlock(i + 12, j + 0, k + 4, Block.dirt.blockID); world.setBlock(i + 12, j + 0, k + 5, Block.dirt.blockID); world.setBlock(i + 12, j + 0, k + 6, Block.dirt.blockID); world.setBlock(i + 12, j + 0, k + 7, Block.dirt.blockID); world.setBlock(i + 12, j + 0, k + 8, Block.dirt.blockID); world.setBlock(i + 12, j + 0, k + 9, Block.dirt.blockID); world.setBlock(i + 12, j + 0, k + 10, Block.dirt.blockID); world.setBlock(i + 12, j + 0, k + 11, Block.dirt.blockID); world.setBlock(i + 12, j + 0, k + 12, Block.dirt.blockID); world.setBlock(i + 12, j + 0, k + 13, Block.grass.blockID); world.setBlockAndMetadata(i + 12, j + 1, k + 0, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 1, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 1, k + 2, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 1, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 1, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 1, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 1, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 1, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 1, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 1, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 1, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 1, k + 11, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 2, k + 0, -117, 1); world.setBlockAndMetadata(i + 12, j + 2, k + 1, -117, 1); world.setBlockAndMetadata(i + 12, j + 2, k + 2, -117, 1); world.setBlockAndMetadata(i + 12, j + 2, k + 3, -117, 1); world.setBlockAndMetadata(i + 12, j + 2, k + 4, -117, 1); world.setBlockAndMetadata(i + 12, j + 2, k + 5, -117, 1); world.setBlockAndMetadata(i + 12, j + 2, k + 6, -117, 1); world.setBlockAndMetadata(i + 12, j + 2, k + 7, -117, 1); world.setBlockAndMetadata(i + 12, j + 2, k + 8, -117, 1); world.setBlockAndMetadata(i + 12, j + 2, k + 9, -117, 1); world.setBlockAndMetadata(i + 12, j + 2, k + 10, -117, 1); world.setBlockAndMetadata(i + 12, j + 2, k + 11, -117, 1); world.setBlockAndMetadata(i + 12, j + 3, k + 0, -117, 1); world.setBlockAndMetadata(i + 12, j + 3, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 3, k + 2, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 3, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 3, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 3, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 3, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 3, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 3, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 3, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 3, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 3, k + 11, -117, 1); world.setBlockAndMetadata(i + 12, j + 4, k + 0, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 12, j + 4, k + 1, -117, 1); world.setBlockAndMetadata(i + 12, j + 4, k + 2, -117, 1); world.setBlockAndMetadata(i + 12, j + 4, k + 3, -117, 1); world.setBlockAndMetadata(i + 12, j + 4, k + 4, -117, 1); world.setBlockAndMetadata(i + 12, j + 4, k + 5, -117, 1); world.setBlockAndMetadata(i + 12, j + 4, k + 6, -117, 1); world.setBlockAndMetadata(i + 12, j + 4, k + 7, -117, 1); world.setBlockAndMetadata(i + 12, j + 4, k + 8, -117, 1); world.setBlockAndMetadata(i + 12, j + 4, k + 9, -117, 1); world.setBlockAndMetadata(i + 12, j + 4, k + 10, -117, 1); world.setBlockAndMetadata(i + 12, j + 4, k + 11, Block.stoneBrick.blockID, 3); world.setBlockAndMetadata(i + 12, j + 5, k + 0, -117, 1); world.setBlockAndMetadata(i + 12, j + 5, k + 1, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 5, k + 2, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 5, k + 3, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 5, k + 4, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 5, k + 5, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 5, k + 6, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 5, k + 7, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 5, k + 8, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 5, k + 9, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 5, k + 10, Block.stoneBrick.blockID, 1); world.setBlockAndMetadata(i + 12, j + 5, k + 11, -117, 1); world.setBlock(i + 12, j + 6, k + 0, Block.glowStone.blockID); world.setBlock(i + 12, j + 6, k + 11, Block.glowStone.blockID); return true; } }Try setting the 5s in these two lines to 16.
together they are powerful beyond imagination."
the error in eclipse, the actual window never turns to a crash screen.
I just realised i havent even tried compiling and reobfuscating, then checking as a mod. One sec.nope, just freezes at the aforementioned screen.