when will there be a modloader tutorial for armors?
Look at the code of armor from the iron armor and use it with the modloader logic.
Done.
_____________________________________________________________________________________________
Does anyone know how to increase the size of particles such as smoke?
I know how to change the coordinates and stuff.
Is there some sort of method to increase the size of it? If so, I would like to hear it from someone who knows :smile.gif:
change the value of the particleScale in the appropriate entity so EntitySmikeFX.java.
Its an unknown variable because java is searching for the variable brimstone in the file Block. Now just think where did you place that variable. One oyu have that then you've got your answer
Sure i know that i haven't placed it in Block.java, but i know that i don't have to do that --> I want it to work with ModLoader and without editing original files!
Okay you realize its not located in the Blocks file. Then why in your code are you searching for the variable there?
Its an unknown variable because java is searching for the variable brimstone in the file Block. Now just think where did you place that variable. One oyu have that then you've got your answer
Sure i know that i haven't placed it in Block.java, but i know that i don't have to do that --> I want it to work with ModLoader and without editing original files!
You have to add the variable in your mod_xx.java file...
package net.minecraft.src;
public class mod_mymod extends BaseMod
{
public static final Block myBlock;
static
{
myBlock = (new BlockMy(122, 23)).setHardness(0.3F).setLightValue(0.5F).setBlockName("myBlock");
}
public String Version()
{
return "yourMod version 1.2 - Beta 1.3_01";
}
public mod_mymod()
{
ModLoader.RegisterBlock(mod_mymod.myBlock);
ModLoader.AddName(mod_mymod.myBlock, "Thats the variable to change the name of your Block into XXX");
}
//Add Recipes
public void AddRecipes(CraftingManager craftingmanager)
{
craftingmanager.addRecipe(new ItemStack(myBlock), new Object[]{
"XX", Character.valueOf('X'), Block.dirt
});
}
}
Why do you tell them when they should learn it themselves?
Did you decompile a non modded 1.3 server and for the first one read your error report. Its telling you what your missing. If you don't understand that learn atleast a bit more of java or some if you know none and you'll be able to read that first error
Hey i am working on making another portal but it is not working and i am not sure what i am not doing.
import java.io.PrintStream;
import java.util.Random;
public class BlockPortal2 extends BlockBreakable
{
public BlockPortal2(int i, int j)
{
super(i, j, Material.portal, false);
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
return null;
}
public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, int i, int j, int k)
{
if(iblockaccess.getBlockId(i - 1, j, k) == blockID || iblockaccess.getBlockId(i + 1, j, k) == blockID)
{
float f = 0.5F;
float f2 = 0.125F;
setBlockBounds(0.5F - f, 0.0F, 0.5F - f2, 0.5F + f, 1.0F, 0.5F + f2);
} else
{
float f1 = 0.125F;
float f3 = 0.5F;
setBlockBounds(0.5F - f1, 0.0F, 0.5F - f3, 0.5F + f1, 1.0F, 0.5F + f3);
}
}
public boolean isOpaqueCube()
{
return false;
}
public boolean renderAsNormalBlock()
{
return false;
}
public boolean tryToCreatePortal(World world, int i, int j, int k)
{
int l = 0;
int i1 = 0;
if(world.getBlockId(i - 1, j, k) == Block.dirt.blockID || world.getBlockId(i + 1, j, k) == Block.dirt.blockID)
{
l = 1;
}
if(world.getBlockId(i, j, k - 1) == Block.dirt.blockID || world.getBlockId(i, j, k + 1) == Block.dirt.blockID)
{
i1 = 1;
}
System.out.println((new StringBuilder()).append(l).append(", ").append(i1).toString());
if(l == i1)
{
return false;
}
if(world.getBlockId(i - l, j, k - i1) == 0)
{
i -= l;
k -= i1;
}
for(int j1 = -1; j1 <= 2; j1++)
{
for(int l1 = -1; l1 <= 3; l1++)
{
boolean flag = j1 == -1 || j1 == 2 || l1 == -1 || l1 == 3;
if((j1 == -1 || j1 == 2) && (l1 == -1 || l1 == 3))
{
continue;
}
int j2 = world.getBlockId(i + l * j1, j + l1, k + i1 * j1);
if(flag)
{
if(j2 != Block.dirt.blockID)
{
return false;
}
continue;
}
if(j2 != 0 && j2 != Block.fire.blockID)
{
return false;
}
}
}
world.field_1043_h = true;
for(int k1 = 0; k1 < 2; k1++)
{
for(int i2 = 0; i2 < 3; i2++)
{
world.setBlockWithNotify(i + l * k1, j + i2, k + i1 * k1, Block.portal.blockID);
}
}
world.field_1043_h = false;
return true;
}
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
{
int i1 = 0;
int j1 = 1;
if(world.getBlockId(i - 1, j, k) == blockID || world.getBlockId(i + 1, j, k) == blockID)
{
i1 = 1;
j1 = 0;
}
int k1;
for(k1 = j; world.getBlockId(i, k1 - 1, k) == blockID; k1--) { }
if(world.getBlockId(i, k1 - 1, k) != Block.dirt.blockID)
{
world.setBlockWithNotify(i, j, k, 0);
return;
}
int l1;
for(l1 = 1; l1 < 4 && world.getBlockId(i, k1 + l1, k) == blockID; l1++) { }
if(l1 != 3 || world.getBlockId(i, k1 + l1, k) != Block.dirt.blockID)
{
world.setBlockWithNotify(i, j, k, 0);
return;
}
boolean flag = world.getBlockId(i - 1, j, k) == blockID || world.getBlockId(i + 1, j, k) == blockID;
boolean flag1 = world.getBlockId(i, j, k - 1) == blockID || world.getBlockId(i, j, k + 1) == blockID;
if(flag && flag1)
{
world.setBlockWithNotify(i, j, k, 0);
return;
}
if((world.getBlockId(i + i1, j, k + j1) != Block.dirt.blockID || world.getBlockId(i - i1, j, k - j1) != blockID) && (world.getBlockId(i - i1, j, k - j1) != Block.dirt.blockID || world.getBlockId(i + i1, j, k + j1) != blockID))
{
world.setBlockWithNotify(i, j, k, 0);
return;
} else
{
return;
}
}
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
{
return true;
}
public int quantityDropped(Random random)
{
return 0;
}
public int getRenderBlockPass()
{
return 1;
}
public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)
{
if(world.multiplayerWorld)
{
return;
} else
{
entity.setInPortal();
return;
}
}
public void randomDisplayTick(World world, int i, int j, int k, Random random)
{
if(random.nextInt(100) == 0)
{
world.playSoundEffect((double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, "portal.portal", 1.0F, random.nextFloat() * 0.4F + 0.8F);
}
for(int l = 0; l < 4; l++)
{
double d = (float)i + random.nextFloat();
double d1 = (float)j + random.nextFloat();
double d2 = (float)k + random.nextFloat();
double d3 = 0.0D;
double d4 = 0.0D;
double d5 = 0.0D;
int i1 = random.nextInt(2) * 2 - 1;
d3 = ((double)random.nextFloat() - 0.5D) * 0.5D;
d4 = ((double)random.nextFloat() - 0.5D) * 0.5D;
d5 = ((double)random.nextFloat() - 0.5D) * 0.5D;
if(world.getBlockId(i - 1, j, k) == blockID || world.getBlockId(i + 1, j, k) == blockID)
{
d2 = (double)k + 0.5D + 0.25D * (double)i1;
d5 = random.nextFloat() * 2.0F * (float)i1;
} else
{
d = (double)i + 0.5D + 0.25D * (double)i1;
d3 = random.nextFloat() * 2.0F * (float)i1;
}
world.spawnParticle("portal", d, d1, d2, d3, d4, d5);
}
}
}
it is pretty much the same as the regular portal code but i change the obsidian to dirt. Any help would be greatly appreciated.
I know I have not given anyone enough time to try to help me but I did find some problems with is my self.
here is my portal2 class.
package net.minecraft.src;
import java.io.PrintStream;
import java.util.Random;
public class BlockPortal2 extends BlockBreakable
{
public BlockPortal2(int i, int j)
{
super(i, j, Material.portal, false);
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
return null;
}
public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, int i, int j, int k)
{
if(iblockaccess.getBlockId(i - 1, j, k) == blockID || iblockaccess.getBlockId(i + 1, j, k) == blockID)
{
float f = 0.5F;
float f2 = 0.125F;
setBlockBounds(0.5F - f, 0.0F, 0.5F - f2, 0.5F + f, 1.0F, 0.5F + f2);
} else
{
float f1 = 0.125F;
float f3 = 0.5F;
setBlockBounds(0.5F - f1, 0.0F, 0.5F - f3, 0.5F + f1, 1.0F, 0.5F + f3);
}
}
public boolean isOpaqueCube()
{
return false;
}
public boolean renderAsNormalBlock()
{
return false;
}
public boolean tryToCreatePortal(World world, int i, int j, int k)
{
int l = 0;
int i1 = 0;
if(world.getBlockId(i - 1, j, k) == Block.dirt.blockID || world.getBlockId(i + 1, j, k) == Block.dirt.blockID)
{
l = 1;
}
if(world.getBlockId(i, j, k - 1) == Block.dirt.blockID || world.getBlockId(i, j, k + 1) == Block.dirt.blockID)
{
i1 = 1;
}
System.out.println((new StringBuilder()).append(l).append(", ").append(i1).toString());
if(l == i1)
{
return false;
}
if(world.getBlockId(i - l, j, k - i1) == 0)
{
i -= l;
k -= i1;
}
for(int j1 = -1; j1 <= 2; j1++)
{
for(int l1 = -1; l1 <= 3; l1++)
{
boolean flag = j1 == -1 || j1 == 2 || l1 == -1 || l1 == 3;
if((j1 == -1 || j1 == 2) && (l1 == -1 || l1 == 3))
{
continue;
}
int j2 = world.getBlockId(i + l * j1, j + l1, k + i1 * j1);
if(flag)
{
if(j2 != Block.dirt.blockID)
{
return false;
}
continue;
}
if(j2 != 0 && j2 != Block.fire.blockID)
{
return false;
}
}
}
world.field_1043_h = true;
for(int k1 = 0; k1 < 2; k1++)
{
for(int i2 = 0; i2 < 3; i2++)
{
world.setBlockWithNotify(i + l * k1, j + i2, k + i1 * k1, Block.portal2.blockID);
}
}
world.field_1043_h = false;
return true;
}
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
{
int i1 = 0;
int j1 = 1;
if(world.getBlockId(i - 1, j, k) == blockID || world.getBlockId(i + 1, j, k) == blockID)
{
i1 = 1;
j1 = 0;
}
int k1;
for(k1 = j; world.getBlockId(i, k1 - 1, k) == blockID; k1--) { }
if(world.getBlockId(i, k1 - 1, k) != Block.dirt.blockID)
{
world.setBlockWithNotify(i, j, k, 0);
return;
}
int l1;
for(l1 = 1; l1 < 4 && world.getBlockId(i, k1 + l1, k) == blockID; l1++) { }
if(l1 != 3 || world.getBlockId(i, k1 + l1, k) != Block.dirt.blockID)
{
world.setBlockWithNotify(i, j, k, 0);
return;
}
boolean flag = world.getBlockId(i - 1, j, k) == blockID || world.getBlockId(i + 1, j, k) == blockID;
boolean flag1 = world.getBlockId(i, j, k - 1) == blockID || world.getBlockId(i, j, k + 1) == blockID;
if(flag && flag1)
{
world.setBlockWithNotify(i, j, k, 0);
return;
}
if((world.getBlockId(i + i1, j, k + j1) != Block.dirt.blockID || world.getBlockId(i - i1, j, k - j1) != blockID) && (world.getBlockId(i - i1, j, k - j1) != Block.dirt.blockID || world.getBlockId(i + i1, j, k + j1) != blockID))
{
world.setBlockWithNotify(i, j, k, 0);
return;
} else
{
return;
}
}
public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
{
return true;
}
public int quantityDropped(Random random)
{
return 0;
}
public int getRenderBlockPass()
{
return 1;
}
public void onEntityCollidedWithBlock(World world, int i, int j, int k, Entity entity)
{
if(world.multiplayerWorld)
{
return;
} else
{
entity.setInPortal();
return;
}
}
public void randomDisplayTick(World world, int i, int j, int k, Random random)
{
if(random.nextInt(100) == 0)
{
world.playSoundEffect((double)i + 0.5D, (double)j + 0.5D, (double)k + 0.5D, "portal.portal", 1.0F, random.nextFloat() * 0.4F + 0.8F);
}
for(int l = 0; l < 4; l++)
{
double d = (float)i + random.nextFloat();
double d1 = (float)j + random.nextFloat();
double d2 = (float)k + random.nextFloat();
double d3 = 0.0D;
double d4 = 0.0D;
double d5 = 0.0D;
int i1 = random.nextInt(2) * 2 - 1;
d3 = ((double)random.nextFloat() - 0.5D) * 0.5D;
d4 = ((double)random.nextFloat() - 0.5D) * 0.5D;
d5 = ((double)random.nextFloat() - 0.5D) * 0.5D;
if(world.getBlockId(i - 1, j, k) == blockID || world.getBlockId(i + 1, j, k) == blockID)
{
d2 = (double)k + 0.5D + 0.25D * (double)i1;
d5 = random.nextFloat() * 2.0F * (float)i1;
} else
{
d = (double)i + 0.5D + 0.25D * (double)i1;
d3 = random.nextFloat() * 2.0F * (float)i1;
}
world.spawnParticle("portal", d, d1, d2, d3, d4, d5);
}
}
}
here is the BlockFire class after i have changed it
package net.minecraft.src;
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode
import java.util.Random;
public class BlockFire extends Block
{
protected BlockFire(int i, int j)
{
super(i, j, Material.fire);
chanceToEncourageFire = new int[256];
abilityToCatchFire = new int[256];
setBurnRate(Block.planks.blockID, 5, 20);
setBurnRate(Block.wood.blockID, 5, 5);
setBurnRate(Block.leaves.blockID, 30, 60);
setBurnRate(Block.bookShelf.blockID, 30, 20);
setBurnRate(Block.tnt.blockID, 15, 100);
setBurnRate(Block.cloth.blockID, 30, 60);
setTickOnLoad(true);
}
private void setBurnRate(int i, int j, int k)
{
chanceToEncourageFire[i] = j;
abilityToCatchFire[i] = k;
}
public AxisAlignedBB getCollisionBoundingBoxFromPool(World world, int i, int j, int k)
{
return null;
}
public boolean isOpaqueCube()
{
return false;
}
public boolean renderAsNormalBlock()
{
return false;
}
public int getRenderType()
{
return 3;
}
public int quantityDropped(Random random)
{
return 0;
}
public int tickRate()
{
return 10;
}
public void updateTick(World world, int i, int j, int k, Random random)
{
boolean flag = world.getBlockId(i, j - 1, k) == Block.bloodStone.blockID;
int l = world.getBlockMetadata(i, j, k);
if(l < 15)
{
world.setBlockMetadataWithNotify(i, j, k, l + 1);
world.scheduleBlockUpdate(i, j, k, blockID, tickRate());
}
if(!flag && !func_263_h(world, i, j, k))
{
if(!world.isBlockOpaqueCube(i, j - 1, k) || l > 3)
{
world.setBlockWithNotify(i, j, k, 0);
}
return;
}
if(!flag && !canBlockCatchFire(world, i, j - 1, k) && l == 15 && random.nextInt(4) == 0)
{
world.setBlockWithNotify(i, j, k, 0);
return;
}
if(l % 2 == 0 && l > 2)
{
tryToCatchBlockOnFire(world, i + 1, j, k, 300, random);
tryToCatchBlockOnFire(world, i - 1, j, k, 300, random);
tryToCatchBlockOnFire(world, i, j - 1, k, 250, random);
tryToCatchBlockOnFire(world, i, j + 1, k, 250, random);
tryToCatchBlockOnFire(world, i, j, k - 1, 300, random);
tryToCatchBlockOnFire(world, i, j, k + 1, 300, random);
for(int i1 = i - 1; i1 <= i + 1; i1++)
{
for(int j1 = k - 1; j1 <= k + 1; j1++)
{
for(int k1 = j - 1; k1 <= j + 4; k1++)
{
if(i1 == i && k1 == j && j1 == k)
{
continue;
}
int l1 = 100;
if(k1 > j + 1)
{
l1 += (k1 - (j + 1)) * 100;
}
int i2 = getChanceOfNeighborsEncouragingFire(world, i1, k1, j1);
if(i2 > 0 && random.nextInt(l1) <= i2)
{
world.setBlockWithNotify(i1, k1, j1, blockID);
}
}
}
}
}
if(l == 15)
{
tryToCatchBlockOnFire(world, i + 1, j, k, 1, random);
tryToCatchBlockOnFire(world, i - 1, j, k, 1, random);
tryToCatchBlockOnFire(world, i, j - 1, k, 1, random);
tryToCatchBlockOnFire(world, i, j + 1, k, 1, random);
tryToCatchBlockOnFire(world, i, j, k - 1, 1, random);
tryToCatchBlockOnFire(world, i, j, k + 1, 1, random);
}
}
private void tryToCatchBlockOnFire(World world, int i, int j, int k, int l, Random random)
{
int i1 = abilityToCatchFire[world.getBlockId(i, j, k)];
if(random.nextInt(l) < i1)
{
boolean flag = world.getBlockId(i, j, k) == Block.tnt.blockID;
if(random.nextInt(2) == 0)
{
world.setBlockWithNotify(i, j, k, blockID);
} else
{
world.setBlockWithNotify(i, j, k, 0);
}
if(flag)
{
Block.tnt.onBlockDestroyedByPlayer(world, i, j, k, 0);
}
}
}
private boolean func_263_h(World world, int i, int j, int k)
{
if(canBlockCatchFire(world, i + 1, j, k))
{
return true;
}
if(canBlockCatchFire(world, i - 1, j, k))
{
return true;
}
if(canBlockCatchFire(world, i, j - 1, k))
{
return true;
}
if(canBlockCatchFire(world, i, j + 1, k))
{
return true;
}
if(canBlockCatchFire(world, i, j, k - 1))
{
return true;
}
return canBlockCatchFire(world, i, j, k + 1);
}
private int getChanceOfNeighborsEncouragingFire(World world, int i, int j, int k)
{
int l = 0;
if(!world.isAirBlock(i, j, k))
{
return 0;
} else
{
l = getChanceToEncourageFire(world, i + 1, j, k, l);
l = getChanceToEncourageFire(world, i - 1, j, k, l);
l = getChanceToEncourageFire(world, i, j - 1, k, l);
l = getChanceToEncourageFire(world, i, j + 1, k, l);
l = getChanceToEncourageFire(world, i, j, k - 1, l);
l = getChanceToEncourageFire(world, i, j, k + 1, l);
return l;
}
}
public boolean isCollidable()
{
return false;
}
public boolean canBlockCatchFire(IBlockAccess iblockaccess, int i, int j, int k)
{
return chanceToEncourageFire[iblockaccess.getBlockId(i, j, k)] > 0;
}
public int getChanceToEncourageFire(World world, int i, int j, int k, int l)
{
int i1 = chanceToEncourageFire[world.getBlockId(i, j, k)];
if(i1 > l)
{
return i1;
} else
{
return l;
}
}
public boolean canPlaceBlockAt(World world, int i, int j, int k)
{
return world.isBlockOpaqueCube(i, j - 1, k) || func_263_h(world, i, j, k);
}
public void onNeighborBlockChange(World world, int i, int j, int k, int l)
{
if(!world.isBlockOpaqueCube(i, j - 1, k) && !func_263_h(world, i, j, k))
{
world.setBlockWithNotify(i, j, k, 0);
return;
} else
{
return;
}
}
public void onBlockAdded(World world, int i, int j, int k)
{
if(world.getBlockId(i, j - 1, k) == Block.obsidian.blockID && Block.portal.tryToCreatePortal(world, i, j, k) || world.getBlockId(i, j - 1, k) == Block.dirt.blockID && Block.portal2.tryToCreatePortal(world, i, j, k))
{
return;
}
if(!world.isBlockOpaqueCube(i, j - 1, k) && !func_263_h(world, i, j, k))
{
world.setBlockWithNotify(i, j, k, 0);
return;
} else
{
world.scheduleBlockUpdate(i, j, k, blockID, tickRate());
return;
}
}
public void randomDisplayTick(World world, int i, int j, int k, Random random)
{
if(random.nextInt(24) == 0)
{
world.playSoundEffect((float)i + 0.5F, (float)j + 0.5F, (float)k + 0.5F, "fire.fire", 1.0F + random.nextFloat(), random.nextFloat() * 0.7F + 0.3F);
}
if(world.isBlockOpaqueCube(i, j - 1, k) || Block.fire.canBlockCatchFire(world, i, j - 1, k))
{
for(int l = 0; l < 3; l++)
{
float f = (float)i + random.nextFloat();
float f6 = (float)j + random.nextFloat() * 0.5F + 0.5F;
float f12 = (float)k + random.nextFloat();
world.spawnParticle("largesmoke", f, f6, f12, 0.0D, 0.0D, 0.0D);
}
} else
{
if(Block.fire.canBlockCatchFire(world, i - 1, j, k))
{
for(int i1 = 0; i1 < 2; i1++)
{
float f1 = (float)i + random.nextFloat() * 0.1F;
float f7 = (float)j + random.nextFloat();
float f13 = (float)k + random.nextFloat();
world.spawnParticle("largesmoke", f1, f7, f13, 0.0D, 0.0D, 0.0D);
}
}
if(Block.fire.canBlockCatchFire(world, i + 1, j, k))
{
for(int j1 = 0; j1 < 2; j1++)
{
float f2 = (float)(i + 1) - random.nextFloat() * 0.1F;
float f8 = (float)j + random.nextFloat();
float f14 = (float)k + random.nextFloat();
world.spawnParticle("largesmoke", f2, f8, f14, 0.0D, 0.0D, 0.0D);
}
}
if(Block.fire.canBlockCatchFire(world, i, j, k - 1))
{
for(int k1 = 0; k1 < 2; k1++)
{
float f3 = (float)i + random.nextFloat();
float f9 = (float)j + random.nextFloat();
float f15 = (float)k + random.nextFloat() * 0.1F;
world.spawnParticle("largesmoke", f3, f9, f15, 0.0D, 0.0D, 0.0D);
}
}
if(Block.fire.canBlockCatchFire(world, i, j, k + 1))
{
for(int l1 = 0; l1 < 2; l1++)
{
float f4 = (float)i + random.nextFloat();
float f10 = (float)j + random.nextFloat();
float f16 = (float)(k + 1) - random.nextFloat() * 0.1F;
world.spawnParticle("largesmoke", f4, f10, f16, 0.0D, 0.0D, 0.0D);
}
}
if(Block.fire.canBlockCatchFire(world, i, j + 1, k))
{
for(int i2 = 0; i2 < 2; i2++)
{
float f5 = (float)i + random.nextFloat();
float f11 = (float)(j + 1) - random.nextFloat() * 0.1F;
float f17 = (float)k + random.nextFloat();
world.spawnParticle("largesmoke", f5, f11, f17, 0.0D, 0.0D, 0.0D);
}
}
}
}
private int chanceToEncourageFire[];
private int abilityToCatchFire[];
}
i did add the portal 2 block to the Block.java file, but i am not sure what else to do. When i try this in game it does work exactly like the regular portal does, expect made out of dirt, but it will not actually create the portal its self. When i place the fire it will immediately go out, like the regular portal, but a portal will not appear. Again any help at all would be greatly appreciated.
Is it possible to extend the reach of a Item you have in your hand?
The basic is the reach of 5 blocks and I want like 20 blocks.
Could someone tell where I can find it in Notch's code so I can find it out myself.
I learn from that :smile.gif:
i use this all the time download notepad++ if you dotn already have it set the source parameters to your src folder and use the find in files function it works like a charm 90% of my mods couldnt have been done without
also its in Playercontroller or PlayercontrollerSP
It would be awesome if you could update the two new NPC guides :biggrin.gif:
Rollback Post to RevisionRollBack
There was even going to be a party for you. A big party. That all your friends were invited too. I invited your best friend the companion cube. Of course, he couldn't come because you murdered him. All your other friends couldn't come either, because you don't have any other friends. Because of how unlikeable you are. It says so right here in your personal file: UNLIKEABLE, liked by no one, a bitter, unlikeable loner, who's passing shall not be mourned, SHALL NOT BE MOURNED. That's exactly what it says. Very formal. Very official. It also says you were adopted, so thats funny too.
public int AddSmelting(int id)
{
if(id == Item.bucketMilk.shiftedIndex)
{
return Item.cheeseItem.shiftedIndex;
}
else
{
return 0;
}
}
The return statement must given in each case!
YOU ARE MY HERO! IT WORKED!
Take this:
One you should use @Override annotations before methods you are overriding. When you do that it will obviously tell you if you are not overriding a method in a super class. Which you are not in this case. And second you need to download the modloader java docs and download some java help books since its obvious you don't understand much if any.
i use this all the time download notepad++ if you dotn already have it set the source parameters to your src folder and use the find in files function it works like a charm 90% of my mods couldnt have been done without
also its in Playercontroller or PlayercontrollerSP
What the duce! I just took a random guess at reach of 5 and it's 5.0F :tongue.gif:
To release my mod I need to change one thing which is rather complex.
Here's the whole idea:
I got this Double Jump wings Item
Which lets you jump twice (hard to guess)
What I got know is an Item that let's you jump until the item breaks.
That's basically flying. Which sucks.
What I want to do is if you right click once (activates jump) you can't jump again until you hit the ground.
I know I need to do it with the if and else statements but I'm not a uber java pro.
So if someone could help me with this...Not just saying the code.
In that way I don't learn anything.
(If you don't get it it's my fault, I'm Dutch and I probably made some mistakes)
Just check the block below and if it is anything but air or a liquid let them jump if it is don't let them
I found your tutorial today and I tried to just do the BlockExample tutorial.
I used decompile, put in the file needed and code in the correct places, recompiled and then tried to use the test_server.bat
It comes up with the following on the server.
java.lang.ExceptionInInitializerError
at net.minecraft.src.MobSpawnerBase.<init>(MobSpawnerBase.java:13)
at net.minecraft.src.MobSpawnerRainforest.<init>(MobSpawnerRainforest.java:12)
at net.minecraft.src.MobSpawnerBase.<clinit>(MobSpawnerBase.java:154)
at net.minecraft.src.WorldChunkManager.loadBlockGeneratorData(WorldChunkManager.java:113)
at net.minecraft.src.ChunkProviderGenerate.provideChunk(ChunkProviderGenerate.java:211)
at net.minecraft.src.ChunkProviderServer.loadChunk(ChunkProviderServer.java:56)
at net.minecraft.src.ChunkProviderServer.provideChunk(ChunkProviderServer.java:93)
at net.minecraft.src.World.getChunkFromChunkCoords(World.java:204)
at net.minecraft.src.World.getBlockId(World.java:140)
at net.minecraft.src.World.isAirBlock(World.java:146)
at net.minecraft.src.World.getFirstUncoveredBlock(World.java:97)
at net.minecraft.src.WorldProvider.canCoordinateBeSpawn(WorldProvider.java:50)
at net.minecraft.src.World.<init>(World.java:77)
at net.minecraft.src.WorldServer.<init>(WorldServer.java:14)
at net.minecraft.server.MinecraftServer.initWorld(MinecraftServer.java:110)
at net.minecraft.server.MinecraftServer.startServer(MinecraftServer.java:97)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:185)
at net.minecraft.src.ThreadServerApplication.run(ThreadServerApplication.java:19)
Caused by: java.lang.IllegalArgumentException: Slot 92 is already occupied by net.minecraft.src.BlockCake@15e2075 when adding net.minecraft.src.BlockExample@a522a6
at net.minecraft.src.Block.<init>(Block.java:19)
at net.minecraft.src.Block.<init>(Block.java:36)
at net.minecraft.src.BlockExample.<init>(BlockExample.java:9)
at net.minecraft.src.Block.<clinit>(Block.java:693)
... 18 more
I 1st tried it with Eclipse and thought that I had messed it up with importing it to a project, so I started again from fresh and used notepad++, both got same issue.
Anyone able to shed any light on what I might have done?
Doomie
Your trying to use a tutorial designed for the client as a server mod.
no clue what i am doing at all.... i dont even know what a src directory is.... lol dont hate
Well learn some java then come back here when you know some. Theres a requirement you should know java and we don't like questions of people asking us to write the code for you or how to do every little thing.
Well learn some java then come back here when you know some. Theres a requirement you should know java and we don't like questions of people asking us to write the code for you or how to do every little thing.
change the value of the particleScale in the appropriate entity so EntitySmikeFX.java.
Okay you realize its not located in the Blocks file. Then why in your code are you searching for the variable there?
Why do you tell them when they should learn it themselves?
it is pretty much the same as the regular portal code but i change the obsidian to dirt. Any help would be greatly appreciated.
Did you decompile a non modded 1.3 server and for the first one read your error report. Its telling you what your missing. If you don't understand that learn atleast a bit more of java or some if you know none and you'll be able to read that first error
I know I have not given anyone enough time to try to help me but I did find some problems with is my self.
here is my portal2 class.
here is the BlockFire class after i have changed it
i did add the portal 2 block to the Block.java file, but i am not sure what else to do. When i try this in game it does work exactly like the regular portal does, expect made out of dirt, but it will not actually create the portal its self. When i place the fire it will immediately go out, like the regular portal, but a portal will not appear. Again any help at all would be greatly appreciated.
But now I get another error:
Please, help
I'm a noob at Java :sad.gif:
thanks found it:)
YOU ARE MY HERO! IT WORKED!
Take this:
i use this all the time download notepad++ if you dotn already have it set the source parameters to your src folder and use the find in files function it works like a charm 90% of my mods couldnt have been done without
also its in Playercontroller or PlayercontrollerSP
One you should use @Override annotations before methods you are overriding. When you do that it will obviously tell you if you are not overriding a method in a super class. Which you are not in this case. And second you need to download the modloader java docs and download some java help books since its obvious you don't understand much if any.
Just check the block below and if it is anything but air or a liquid let them jump if it is don't let them
Your trying to use a tutorial designed for the client as a server mod.
Well learn some java then come back here when you know some. Theres a requirement you should know java and we don't like questions of people asking us to write the code for you or how to do every little thing.
lmao rudest comment ever!