turns out that i hadnt changed the edited minecraft.jar back into the .jar (instead of folder) so i just decompiled the normal jar with no modloader and decompile still doesnt work
EarthGuardian, on 01 April 2012 - 06:11 PM, said:
BaseMod.java << this is the main java file your need to make it work ..
if that one isnt decompiled your doing something wrong.
ehmm i dont see anny texture overrides in that pice of code ... you send ..
show the whole code ?? or add the texture part ...
hehe im trying to help
post your whole code you writen for that item.
and no that dusnt mean its not installed it means it cant find it yet ..
and maby try a Block first ?? Items are harder to make than blocks when your new like me
and try using eclipse .. that program helped me alot ..
is there a difference between editrocket an eclipse (im on mac) and what i did is i copied word for word what it said in Tech Guy's tutorial, of course i changed the name and the place for the texture and i made the two files i needed and ended both with .java so i have no idea whats going on. im having so much trouble just decompiling with modloader installed.
or is it possible that i need to create the 2 new files but also edit other ones? i really need someone to help me....i cant get this right
now that i think about it, when i open the minecraft.jar with archive utility and put in the modloader files (over-writing the old ones), do i then get rid of the "minecraft.jar" and compress the folder (with modloader) into a .jar?
and no there is no BaseMod.java in the list
Could someone possibly give/make me a 100% accurate and detailed "guide" as to how to decompile. (including stuff like "go to terminal and type **** then drag in the *****.** file) i am on a MAC! thanks to anyone that does this
turns out that i hadnt changed the edited minecraft.jar back into the .jar (instead of folder) so i just decompiled the normal jar with no modloader and decompile still doesnt work
EarthGuardian, on 01 April 2012 - 06:11 PM, said:
BaseMod.java << this is the main java file your need to make it work ..
if that one isnt decompiled your doing something wrong.
ehmm i dont see anny texture overrides in that pice of code ... you send ..
show the whole code ?? or add the texture part ...
hehe im trying to help
post your whole code you writen for that item.
and no that dusnt mean its not installed it means it cant find it yet ..
and maby try a Block first ?? Items are harder to make than blocks when your new like me
and try using eclipse .. that program helped me alot ..
is there a difference between editrocket an eclipse (im on mac) and what i did is i copied word for word what it said in Tech Guy's tutorial, of course i changed the name and the place for the texture and i made the two files i needed and ended both with .java so i have no idea whats going on. im having so much trouble just decompiling with modloader installed.
or is it possible that i need to create the 2 new files but also edit other ones? i really need someone to help me....i cant get this right
now that i think about it, when i open the minecraft.jar with archive utility and put in the modloader files (over-writing the old ones), do i then get rid of the "minecraft.jar" and compress the folder (with modloader) into a .jar?
and no there is no BaseMod.java in the list
Could someone possibly give/make me a 100% accurate and detailed "guide" as to how to decompile. (including stuff like "go to terminal and type **** then drag in the *****.** file) i am on a MAC! thanks to anyone that does this
to decompile open terminal type "cd" then hit your spacebar. then drag in your mcp folder, and hit enter. then type "bash decompile.sh" and hit enter. it should decompile
lol and your giving advice to other ppl ?? did you even check the error ?? its even given you a prox fix ;< that sign
normaly you need to add and ; behind the line but in this case ... give that public an return lol ..
public String getVersion()
{
return "1.2.4";
}
like that ..
public String getVersion()
{
return "1.2.4";
}
Thats the code i was using when i got the error, and as far as i can tell they are the same. :{
I have tried that many times, with a fresh minecraft folder (inc. jar and bin) and a new MPC. by change directory i mean when at the beginning before running clean up you do " cd (drag in the MPC folder) " in terminal on mac.
Yeah, sorry. I forgot you were on a Mac and had to do that. Is the problem all sorted now, or are you still having trouble decompiling?
I made a block, ran reobfuscate, put the files and modloader in my minecraft.jar, but then the game kept crashing. On Eclipse there are no errors in the code. I tried installing my mod without modloader, of course it didn't work but the game did not crash. When I installed modloader it then crashed. Any idea on what is happening?
What happens if you run the client through Eclipse?
I am trying to make some new stairs, but every time I craft them or scroll down to where they are located in the Creative inventory, the game crashes.
Here is my Block file:
package net.minecraft.src;
import java.util.ArrayList;
public class BlockConcrete11 extends Block
{
public BlockConcrete11(int i, int j)
{
super(i, j, Material.wood);
}
public void getCollidingBoundingBoxes(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, ArrayList arraylist)
{
int l = world.getBlockMetadata(i, j, k);
if (l == 0)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 1)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 2)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 3)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
{
int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
if (l == 0)
{
world.setBlockMetadataWithNotify(i, j, k, 2);
}
if (l == 1)
{
world.setBlockMetadataWithNotify(i, j, k, 1);
}
if (l == 2)
{
world.setBlockMetadataWithNotify(i, j, k, 3);
}
if (l == 3)
{
world.setBlockMetadataWithNotify(i, j, k, 0);
}
}
public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, int i, int j, int k)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
public boolean isOpaqueCube()
{
return false;
}
public boolean renderAsNormalBlock()
{
return false;
}
public int getRenderType()
{
return 10;
}
}
Here is the error report:
java.lang.NullPointerException
at net.minecraft.src.ItemStack.getIconIndex(ItemStack.java:105)
at net.minecraft.src.RenderItem.renderItemIntoGUI(RenderItem.java:270)
at net.minecraft.src.GuiContainer.drawSlotInventory(GuiContainer.java:228)
at net.minecraft.src.GuiContainer.drawScreen(GuiContainer.java:74)
at net.minecraft.src.GuiContainerCreative.drawScreen(GuiContainerCreative.java:235)
at net.minecraft.src.EntityRenderer.updateCameraAndRender(EntityRenderer.java:1014)
at net.minecraft.src.EntityRendererProxy.updateCameraAndRender(EntityRendererProxy.java:20)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:942)
at net.minecraft.client.Minecraft.run(Minecraft.java:798)
at java.lang.Thread.run(Thread.java:680)
--- END ERROR REPORT 18c2be4c ----------
public static final Item ItemZythriumHelmet = new ItemArmor(608, EnumArmorMaterial.ZYTHRIUM, ModLoader.addArmor("zythrium"), 0).setItemName("ItemZythriumHelmet");
public static final Item ItemZythriumChest = new ItemArmor(609, EnumArmorMaterial.ZYTHRIUM, ModLoader.addArmor("zythrium"), 1).setItemName("ItemZythriumChest");
public static final Item ItemZythriumLegs = new ItemArmor(610, EnumArmorMaterial.ZYTHRIUM, ModLoader.addArmor("zythrium"), 2).setItemName("ItemZythriumLegs");
public static final Item ItemZythriumBoots = new ItemArmor(611, EnumArmorMaterial.ZYTHRIUM, ModLoader.addArmor("zythrium"), 3).setItemName("ItemZythriumBoots");
There Are No Error My Armor Just Wont Show Its Texture
What will happen when version 1.2.5 comes out, will you still make tutorials, or will you stop,and dø people need to use modloader then. Sorry my English is bad
Yes, of course I'll update! I started the tutorials in 1.1, and I'm updating everytime a new update comes out.
I mean to say, if I want a block to spawn a mob on top of it every time it executes updateTick (with only a chance of spawning), what sort of methods would I need? I was thinking it would be something like this, but I have no clue where to start.
public int randomnumberthing
public void updateTick()
{
*code to generate a random value between 1 and 4 for randomnumberthing*
if(randomnumberthing = 4)
{
*code to spawn specific mob on top of block*
}
randomnumberthing = 0
}
If you could help, that'd be great!
Well, this is what I would do.
public int number = 0;
public void updateTick()
{
number++; //puts the int up by 1 every tick, supposedly.
if(number == 4)//not sure about generating that number. I know how to do it with Random, but you would probably get errors in this case.
{
EntityLiving entityliving = (EntityLiving)EntityList.createEntityByName("EntityName", worldObj);
double d3 = (double)xCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D;
double d4 = (yCoord + worldObj.rand.nextInt(3)) - 1;
double d5 = (double)zCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D;
entityliving.setLocationAndAngles(d3, d4, d5, worldObj.rand.nextFloat() * 360F, 0.0F);
worldObj.spawnEntityInWorld(entityliving);
number = 0;
}
}
Mods loaded: 3
ModLoader 1.2.3
(mod_SpawnStructure 1.2.3: This Mod didn't even gets loaded)
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 4372d53c --------
Generated 01.04.12 20:48
Minecraft: Minecraft 1.2.3
OS: Windows Vista (x86) version 6.0
Java: 1.7.0_01, Oracle Corporation
VM: Java HotSpot™ Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel 965/963 Graphics Media Accelerator version 2.0.0 - Build 7.15.10.1666, Intel
java.lang.NullPointerException
at net.minecraft.src.ItemBlock.getItemName(ItemBlock.java:114)
at net.minecraft.src.Item.getStatName(Item.java:457)
at net.minecraft.src.ModLoader.initStats(ModLoader.java:913)
at net.minecraft.src.ModLoader.init(ModLoader.java:875)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:154)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:423)
at net.minecraft.client.Minecraft.run(Minecraft.java:784)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT c33012d5 ----------
I tested everything, if I add this line, it crashes
//mod_SpawnStructure extends BaseMod
public static final Item potFlowerItem = new BlockStructurePotItem(140).setItemName("FlowerPot");
This is the called code
//BlockStructurePotItem extends ItemBlock
public BlockStructurePotItem(int i){
super(i);
setMaxDamage(0);
setHasSubtypes(true);
}
I think EarthGuardian will be able to help you more than I can. He managed to get damage values blocks working(with a little help from me) and I haven't really tried them yet.
I got an error while testing my mod, it tells me there's something wrong with the BlockStoneRedCobbleStairs.java
Here's the source code and the crash report:
mod_RedstonePlus.java
package net.minecraft.src;
public class mod_RedstonePlus extends BaseMod
{
public static final Block RedstoneBlock = new BlockRedstoneBlock(160, 0).setBlockName("Redstone Block").setHardness(5F).setResistance(10F);
public static final Block RedstoneStairs = new BlockRedstoneStairs(161, 0).setBlockName("Redstone Stairs").setHardness(5F).setResistance(10F);
public static final Block RedstoneSlab = new BlockRedstoneSlab(162, 0).setBlockName("Redstone Stairs").setHardness(5F).setResistance(10F);
public static final Block RedstoneBrick = new BlockRedstoneBrick(163, 0).setBlockName("Redstone Bricks").setHardness(10F).setResistance(20F);
public static final Item RedstoneDrink = new ItemFood(5001, 10, 1F, false).setItemName("Redstone Drink");
public static final Block DustedStone = new BlockDustedStone(164, 0).setBlockName("Dusted Stone").setHardness(3F).setResistance(6F);
public static final Block RedSTONE = new BlockRedSTONE(165, 0).setBlockName("redSTONE").setHardness(6F).setResistance(12F);
public static final Block RedstoneGlass = new BlockRedstoneGlass(166, 0).setBlockName("Redstone Glass").setHardness(2F).setResistance(4F);
public static final Item RedstoneCrystal = new ItemRedstoneCrystal(5000).setItemName("Redstone Crystal");
public static final Block RedSTONEStairs = new BlockSTONERedStairs(167, 0).setBlockName("RedSTONE Stairs").setHardness(6F).setResistance(12F);
public static final Block StoneRedSlab = new BlockSTONERedSlab(168, 0).setBlockName("RedSTONE Stairs").setHardness(6F).setResistance(12F);
public static final Block StoneRedBrick = new BlockStoneRedBrick(169, 0).setBlockName("RedSTONE Brick").setHardness(12F).setResistance(24F);
public static final Block StoneRedCobble = new BlockStoneRedCobble(170, 0).setBlockName("RedSTONE Cobble").setHardness(5F).setResistance(10F);
public static final Block StoneRedCobbleStairs = new BlockStoneRedCobbleStairs(171, 0).setBlockName("RedSTONE Cobble Stairs").setHardness(5F).setResistance(10F);
public static final Block StoneRedCobbleSlab = new BlockStoneRedCobbleSlab(172, 0).setBlockName("RedSTONE Cobble Slab");
public void load()
{
RedstoneBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RedstonePlus/RedstoneBlock.png");
RedstoneStairs.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RedstonePlus/RedstoneStairs.png");
RedstoneSlab.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RedstonePlus/RedstoneSlab.png");
RedstoneBrick.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RedstonePlus/RedstoneBrick.png");
RedstoneDrink.iconIndex = ModLoader.addOverride("/gui/items.png", "/RedstonePlus/RedstoneDrink.png");
DustedStone.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RedstonePlus/DustedStone.png");
RedSTONE.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RedstonePlus/RedSTONE.png");
RedstoneGlass.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RedstonePlus/RedstoneGlass.png");
RedstoneCrystal.iconIndex = ModLoader.addOverride("/gui/items.png", "/RedstonePlus/RedstoneCrystal.png");
RedSTONEStairs.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RedstonePlus/StoneRedStairs.png");
StoneRedSlab.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RedstonePlus/StoneRedSlab.png");
StoneRedBrick.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RedstonePlus/StoneRedBrick.png");
StoneRedCobble.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RedstonePlus/StoneRedCobble.png");
StoneRedCobbleStairs.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RedstonePlus/StoneRedCobbleStairs.png");
StoneRedCobbleSlab.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/RedstonePlus/StoneRedCobbleSlab.png");
ModLoader.registerBlock(RedstoneBlock);
ModLoader.registerBlock(RedstoneStairs);
ModLoader.registerBlock(RedstoneSlab);
ModLoader.registerBlock(RedstoneBrick);
ModLoader.registerBlock(DustedStone);
ModLoader.registerBlock(RedSTONE);
ModLoader.registerBlock(RedstoneGlass);
ModLoader.registerBlock(RedSTONEStairs);
ModLoader.registerBlock(StoneRedSlab);
ModLoader.registerBlock(StoneRedBrick);
ModLoader.registerBlock(StoneRedCobble);
ModLoader.registerBlock(StoneRedCobbleStairs);
ModLoader.registerBlock(StoneRedCobbleSlab);
ModLoader.addName(RedstoneBlock, "Block of Redstone");
ModLoader.addName(RedstoneStairs, "Redstone Stairs");
ModLoader.addName(RedstoneSlab, "Redstone Slab");
ModLoader.addName(RedstoneBrick, "Redstone Bricks");
ModLoader.addName(RedstoneDrink, "Redstone Drink");
ModLoader.addName(DustedStone, "Dusted Stone");
ModLoader.addName(RedSTONE, "RedSTONE");
ModLoader.addName(RedstoneGlass, "Redstone Glass");
ModLoader.addName(RedstoneCrystal, "Redstone Crystal");
ModLoader.addName(RedSTONEStairs, "RedSTONE Stairs");
ModLoader.addName(StoneRedSlab, "RedSTONE Slab");
ModLoader.addName(StoneRedBrick, "RedSTONE Bricks");
ModLoader.addName(StoneRedCobble, "RedSTONE Cobble");
ModLoader.addName(StoneRedCobbleStairs, "RedSTONE Cobble Stairs");
ModLoader.addName(StoneRedCobbleSlab, "RedSTONE Cobble Slab");
ModLoader.addRecipe(new ItemStack(RedstoneBlock, 1), new Object [] {"###","###","###", Character.valueOf('#'), Item.redstone});
ModLoader.addRecipe(new ItemStack(Item.redstone, 9), new Object [] {"# ", Character.valueOf('#'), RedstoneBlock});
ModLoader.addRecipe(new ItemStack(RedstoneStairs, 3), new Object [] {"# ", "## ", "###", Character.valueOf('#'), RedstoneBlock});
ModLoader.addRecipe(new ItemStack(RedstoneBlock, 2), new Object [] {"# ", Character.valueOf('#'), RedstoneStairs});
ModLoader.addRecipe(new ItemStack(RedstoneSlab, 6), new Object [] {"###", Character.valueOf('#'), RedstoneBlock});
ModLoader.addRecipe(new ItemStack(RedstoneBlock, 1), new Object [] {"# ", "# ", Character.valueOf('#'), RedstoneSlab});
ModLoader.addRecipe(new ItemStack(RedstoneBrick, 1), new Object [] {"## ", "## ", Character.valueOf('#'), RedstoneBlock});
ModLoader.addRecipe(new ItemStack(RedstoneBlock, 4), new Object [] {"# ", Character.valueOf('#'), RedstoneBrick});
ModLoader.addRecipe(new ItemStack(RedstoneDrink, 1), new Object [] {" # ", " $ ", Character.valueOf('#'), Item.redstone, Character.valueOf('$'), Item.glassBottle});
ModLoader.addRecipe(new ItemStack(DustedStone, 1), new Object [] {"###", "#$#", "###", Character.valueOf('#'), Item.redstone, Character.valueOf('$'), Block.stone});
ModLoader.addRecipe(new ItemStack(RedSTONEStairs, 3), new Object [] {"# ", "## ", "###", Character.valueOf('#'), RedSTONE});
ModLoader.addRecipe(new ItemStack(RedSTONE, 2), new Object [] {"# ", Character.valueOf('#'), RedSTONEStairs});
ModLoader.addRecipe(new ItemStack(StoneRedSlab, 6), new Object [] {"###", Character.valueOf('#'), RedSTONE});
ModLoader.addRecipe(new ItemStack(RedSTONE, 1), new Object [] {"# ", "# ", Character.valueOf('#'), StoneRedSlab});
ModLoader.addRecipe(new ItemStack(StoneRedBrick, 1), new Object [] {"## ", "## ", Character.valueOf('#'), RedSTONE});
ModLoader.addRecipe(new ItemStack(RedSTONE, 4), new Object [] {"# ", Character.valueOf('#'), StoneRedBrick});
ModLoader.addRecipe(new ItemStack(StoneRedCobbleStairs, 3), new Object [] {"# ", "## ", "###", Character.valueOf('#'), StoneRedCobble});
ModLoader.addRecipe(new ItemStack(StoneRedCobble, 2), new Object [] {"# ", StoneRedCobbleStairs});
ModLoader.addRecipe(new ItemStack(StoneRedCobbleSlab, 6), new Object [] {"###", Character.valueOf('#'), StoneRedCobble});
ModLoader.addRecipe(new ItemStack(StoneRedCobble, 1), new Object [] {"# ", "# ", Character.valueOf('#'), StoneRedCobbleSlab});
ModLoader.addSmelting(DustedStone.blockID, new ItemStack(RedSTONE, 1));
ModLoader.addSmelting(RedstoneBlock.blockID, new ItemStack(RedstoneGlass, 1));
ModLoader.addSmelting(Item.redstone.shiftedIndex, new ItemStack(RedstoneCrystal, 1));
ModLoader.addSmelting(StoneRedCobble.blockID, new ItemStack(RedSTONE, 1));
}
public String getVersion()
{
return "1.2.4";
}
}
BlockStoneRedCobbleStairs.java
package net.minecraft.src;
import java.util.ArrayList;
public class BlockStoneRedCobbleStairs extends Block
{
public BlockStoneRedCobbleStairs(int i, int j)
{
super(i, j, Material.rock);
}
public void getCollidingBoundingBoxes(World world, int i, int j, int k, AxisAlignedBB axisalignedbb, ArrayList arraylist)
{
int l = world.getBlockMetadata(i, j, k);
if (l == 0)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 0.5F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 1)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 0.5F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.5F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 2)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 0.5F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 1.0F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
else if (l == 3)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.5F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
setBlockBounds(0.0F, 0.0F, 0.5F, 1.0F, 0.5F, 1.0F);
super.getCollidingBoundingBoxes(world, i, j, k, axisalignedbb, arraylist);
}
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
{
int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 0.5D) & 3;
if (l == 0)
{
world.setBlockMetadataWithNotify(i, j, k, 2);
}
if (l == 1)
{
world.setBlockMetadataWithNotify(i, j, k, 1);
}
if (l == 2)
{
world.setBlockMetadataWithNotify(i, j, k, 3);
}
if (l == 3)
{
world.setBlockMetadataWithNotify(i, j, k, 0);
}
}
public void setBlockBoundsBasedOnState(IBlockAccess iblockaccess, int i, int j, int k)
{
setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
}
public boolean isOpaqueCube()
{
return false;
}
public boolean renderAsNormalBlock()
{
return false;
}
public int getRenderType()
{
return 10;
}
}
The crash report:
Mods loaded: 2
ModLoader 1.2.4
mod_RedstonePlus 1.2.4
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 82d82f44 --------
Generated 1-4-12 23:00
Minecraft: Minecraft 1.2.4
OS: Windows 7 (x86) version 6.1
Java: 1.7.0_01, Oracle Corporation
VM: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: Intel 965/963 Graphics Media Accelerator version 2.0.0 - Build 8.14.10.1930, Intel
java.lang.ClassCastException: net.minecraft.src.BlockStoneRedCobbleStairs cannot be cast to java.lang.Character
at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.java:371)
at net.minecraft.src.ModLoader.addRecipe(ModLoader.java:411)
at net.minecraft.src.mod_RedstonePlus.load(mod_RedstonePlus.java:83)
at net.minecraft.src.ModLoader.init(ModLoader.java:855)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:156)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:422)
at net.minecraft.client.Minecraft.run(Minecraft.java:783)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT f991df40 ----------
There is something wrong with one of your recipes, what is line 83 of your mod_ class?
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Yeah, sorry. I forgot you were on a Mac and had to do that. Is the problem all sorted now, or are you still having trouble decompiling?
What happens if you run the client through Eclipse?
Did you register the block?
I'm not going to help you. Simply because you didn't read all of the BOLD writing at the bottom of the OP.
Yes, of course I'll update! I started the tutorials in 1.1, and I'm updating everytime a new update comes out.
Well, this is what I would do.
public int number = 0;
public void updateTick()
{
number++; //puts the int up by 1 every tick, supposedly.
if(number == 4)//not sure about generating that number. I know how to do it with Random, but you would probably get errors in this case.
{
EntityLiving entityliving = (EntityLiving)EntityList.createEntityByName("EntityName", worldObj);
double d3 = (double)xCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D;
double d4 = (yCoord + worldObj.rand.nextInt(3)) - 1;
double d5 = (double)zCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D;
entityliving.setLocationAndAngles(d3, d4, d5, worldObj.rand.nextFloat() * 360F, 0.0F);
worldObj.spawnEntityInWorld(entityliving);
number = 0;
}
}
I think EarthGuardian will be able to help you more than I can. He managed to get damage values blocks working(with a little help from me) and I haven't really tried them yet.
Do you get a crash report? Look in ModLoader.txt in .minecraft if Minecraft closes too quickly. If you get a black screen, delete META-INF.
There is something wrong with one of your recipes, what is line 83 of your mod_ class?
No, I missed that part. Ugh, I will fix that tomorrow. At least it was just a careless error. Thanks for all the tutorials, they have helped a lot!
I have found the Dragon explosion effect, and I need some help to finish it up.
What do I need to say to "Call" The effect method?
This is my problem:
if (thrower != null)
{ float stuff = What do I put here?; /**What am I supposed to put instead there? I need to call the VWhateverrenderStar but I think I need an appropriate float, but I dont know which one.
field_40178_aA++;
thrower.setPositionAndUpdate(posX, posY, posZ);
thrower.fallDistance = 0.0F;
thrower.attackEntityFrom(DamageSource.fall, 1);
VWhatever.renderStar(this, stuff); // This should work but I dont know what the float has to
System.out.println("lol");
}
The spoilers below show the whole script if you really need to see.
_____________________________________________
The one below is the effect
{ float stuff = What do I put here?; /**What am I supposed to put instead there? I need to call the VWhateverrenderStar but I think I need an appropriate float, but I dont know which one.
field_40178_aA++;
thrower.setPositionAndUpdate(posX, posY, posZ);
thrower.fallDistance = 0.0F;
thrower.attackEntityFrom(DamageSource.fall, 1);
VWhatever.renderStar(this, stuff); // This should work but I dont know what the float has to
public int number = 0;
public void updateTick()
{
number++; //puts the int up by 1 every tick, supposedly.
if(number == 4)//not sure about generating that number. I know how to do it with Random, but you would probably get errors in this case.
{
EntityLiving entityliving = (EntityLiving)EntityList.createEntityByName("EntityName", worldObj);
double d3 = (double)xCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D;
double d4 = (yCoord + worldObj.rand.nextInt(3)) - 1;
double d5 = (double)zCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D;
entityliving.setLocationAndAngles(d3, d4, d5, worldObj.rand.nextFloat() * 360F, 0.0F);
worldObj.spawnEntityInWorld(entityliving);
number = 0;
}
}
worldObj isn't recognized. Do I have to import another package or something?
I need help fixing this stuff.
I am a noob, so dont be surprised if the error is something stupid.
== ERRORS FOUND ==
src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:15: illegal start of expression
public String getVersion()
^
src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:15: ';' expected
public String getVersion()
^
2 errors
==================
package net.minecraft.src;
public class mod_hardeneddiamond extends BaseMod
{
public static final Item harddeneddiamond = new harddeneddiamond(5000).setItemName("assfacemcgee");
public void load()
{
hardeneddiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/hardeneddiamond.png");
ModLoader.addName(hardeneddiamond, "Hardened Diamond");
ModLoader.addRecipe(new ItemStack(hardeneddiamond, 1), new Object [] {
"XX", "XX", Character.valueOf('X'), Item.diamond});
public String getVersion()
{
return "1.2.4";
}
}
}
package net.minecraft.src;
public class hardeneddiamond extends Item
{
public hardeneddiamond (int i)
{
super (i);
maxStackSize = 64;
}
}
You put the getVersion method inside the load method. You can't do that. If you don't know how to fix that, I seriously recommend that you take a look at the page linked at the bottom of the OP.
I have found the Dragon explosion effect, and I need some help to finish it up.
What do I need to say to "Call" The effect method?
This is my problem:
if (thrower != null)
{ float stuff = What do I put here?; /**What am I supposed to put instead there? I need to call the VWhateverrenderStar but I think I need an appropriate float, but I dont know which one.
field_40178_aA++;
thrower.setPositionAndUpdate(posX, posY, posZ);
thrower.fallDistance = 0.0F;
thrower.attackEntityFrom(DamageSource.fall, 1);
VWhatever.renderStar(this, stuff); // This should work but I dont know what the float has to
System.out.println("lol");
}
The spoilers below show the whole script if you really need to see.
_____________________________________________
The one below is the effect
{ float stuff = What do I put here?; /**What am I supposed to put instead there? I need to call the VWhateverrenderStar but I think I need an appropriate float, but I dont know which one.
field_40178_aA++;
thrower.setPositionAndUpdate(posX, posY, posZ);
thrower.fallDistance = 0.0F;
thrower.attackEntityFrom(DamageSource.fall, 1);
VWhatever.renderStar(this, stuff); // This should work but I dont know what the float has to
public int number = 0;
public void updateTick()
{
number++; //puts the int up by 1 every tick, supposedly.
if(number == 4)//not sure about generating that number. I know how to do it with Random, but you would probably get errors in this case.
{
EntityLiving entityliving = (EntityLiving)EntityList.createEntityByName("EntityName", worldObj);
double d3 = (double)xCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D;
double d4 = (yCoord + worldObj.rand.nextInt(3)) - 1;
double d5 = (double)zCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D;
entityliving.setLocationAndAngles(d3, d4, d5, worldObj.rand.nextFloat() * 360F, 0.0F);
worldObj.spawnEntityInWorld(entityliving);
number = 0;
}
}
worldObj isn't recognized. Do I have to import another package or something?
You are putting that in your TileEntity*** class right?
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
You put the getVersion method inside the load method. You can't do that. If you don't know how to fix that, I seriously recommend that you take a look at the page linked at the bottom of the OP.
Thanks didnt notice that i fixed, but now im pretty sure i didnt install mcp properly because now im getting
== ERRORS FOUND ==
src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:4: cannot find symbol
symbol: class BaseMod
public class mod_hardeneddiamond extends BaseMod
^
src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:6: cannot find symbol
symbol : class harddeneddiamond
location: class net.minecraft.src.mod_hardeneddiamond
public static final Item harddeneddiamond = new harddeneddiamond(5000).setItemName("assfacemcgee");
^
src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:10: non-static variable iconIndex cannot be referenced from a static context
hardeneddiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/hardeneddiamond.png");
^
src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:10: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_hardeneddiamond
hardeneddiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/hardeneddiamond.png");
^
src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:11: cannot find symbol
symbol : variable hardeneddiamond
location: class net.minecraft.src.mod_hardeneddiamond
ModLoader.addName(hardeneddiamond, "Hardened Diamond");
^
src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:11: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_hardeneddiamond
ModLoader.addName(hardeneddiamond, "Hardened Diamond");
^
src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:12: cannot find symbol
symbol : variable hardeneddiamond
location: class net.minecraft.src.mod_hardeneddiamond
ModLoader.addRecipe(new ItemStack(hardeneddiamond, 1), new Object [] {
^
src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:12: cannot find symbol
symbol : variable ModLoader
location: class net.minecraft.src.mod_hardeneddiamond
ModLoader.addRecipe(new ItemStack(hardeneddiamond, 1), new Object [] {
^
8 errors
==================
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
ModLoader.addRecipe(new ItemStack(StoneRedCobble, 2), new Object [] {"# ", StoneRedCobbleStairs});
You didn't define what that # is. It should be:
ModLoader.addRecipe(new ItemStack(StoneRedCobble, 2), new Object [] {"# ", Character.valueOf('#'), StoneRedCobbleStairs});
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Oke, I got the decompiling working...
Now I´m getting this:
Mods loaded: 2
ModLoader 1.2.4
mod_Durp 1.2.4
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
--- BEGIN ERROR REPORT 8a1de043 --------
Generated 2-4-12 10:11
Minecraft: Minecraft 1.2.4
OS: Windows 7 (amd64) version 6.1
Java: 1.7.0_03, Oracle Corporation
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
LWJGL: 2.4.2
OpenGL: ATI Radeon 3000 Graphics version 3.3.10907 Compatibility Profile Context, ATI Technologies Inc.
java.lang.Exception: [email protected] is missing name tag!
at net.minecraft.src.ModLoader.addName(ModLoader.java:354)
at net.minecraft.src.ModLoader.addName(ModLoader.java:306)
at net.minecraft.src.mod_Durp.load(mod_Durp.java:11)
at net.minecraft.src.ModLoader.init(ModLoader.java:855)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:156)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:85)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:12)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:422)
at net.minecraft.client.Minecraft.run(Minecraft.java:783)
at java.lang.Thread.run(Thread.java:722)
--- END ERROR REPORT c75977c7 ----------
Code:
package net.minecraft.src;
import java.util.Random;
public class mod_Durp extends BaseMod
{
public static final Block Durp = new BlockDurp(213, 0).setHardness(1.5F).setResistance(10F).setStepSound(Block.soundStoneFootstep);
public void load()
{
ModLoader.registerBlock(Durp);
ModLoader.addName(Durp, "Durp");
Durp.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Durp.png");
}
public void generateSurface(World world, Random rand, int baseX, int baseZ)
{
for(int x = 0; x < 30; x++)
{
int Xcoord = baseX + rand.nextInt(6);
int Ycoord = rand.nextInt(53);
int Zcoord = baseZ + rand.nextInt(4);
(new WorldGenMinable(Durp.blockID, 40)).generate(world, rand, Xcoord, Ycoord, Zcoord);
}
}
public String getVersion()
{
return "1.2.4";
}
}
package net.minecraft.src;
import java.util.Random;
public class BlockDurp extends Block
{
public BlockDurp(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_Durp.Durp.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
To post a comment, please login or register a new account.
Have you tried running the jar you're trying to decompile?
BaseMod.java << this is the main java file your need to make it work ..
if that one isnt decompiled your doing something wrong.
ehmm i dont see anny texture overrides in that pice of code ... you send ..
show the whole code ?? or add the texture part ...
hehe im trying to help
post your whole code you writen for that item.
and no that dusnt mean its not installed it means it cant find it yet ..
and maby try a Block first ?? Items are harder to make than blocks when your new like me
and try using eclipse .. that program helped me alot ..
so i have no idea whats going on. im having so much trouble just decompiling with modloader installed.
or is it possible that i need to create the 2 new files but also edit other ones? i really need someone to help me....i cant get this right
now that i think about it, when i open the minecraft.jar with archive utility and put in the modloader files (over-writing the old ones), do i then get rid of the "minecraft.jar" and compress the folder (with modloader) into a .jar?
and no there is no BaseMod.java in the list
Could someone possibly give/make me a 100% accurate and detailed "guide" as to how to decompile. (including stuff like "go to terminal and type **** then drag in the *****.** file) i am on a MAC! thanks to anyone that does this
to decompile open terminal type "cd" then hit your spacebar. then drag in your mcp folder, and hit enter. then type "bash decompile.sh" and hit enter. it should decompile
public String getVersion() { return "1.2.4"; }Thats the code i was using when i got the error, and as far as i can tell they are the same. :{
Yeah, sorry. I forgot you were on a Mac and had to do that. Is the problem all sorted now, or are you still having trouble decompiling?
What happens if you run the client through Eclipse?
Did you register the block?
I'm not going to help you. Simply because you didn't read all of the BOLD writing at the bottom of the OP.
Yes, of course I'll update!
Well, this is what I would do.
public int number = 0; public void updateTick() { number++; //puts the int up by 1 every tick, supposedly. if(number == 4)//not sure about generating that number. I know how to do it with Random, but you would probably get errors in this case. { EntityLiving entityliving = (EntityLiving)EntityList.createEntityByName("EntityName", worldObj); double d3 = (double)xCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D; double d4 = (yCoord + worldObj.rand.nextInt(3)) - 1; double d5 = (double)zCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D; entityliving.setLocationAndAngles(d3, d4, d5, worldObj.rand.nextFloat() * 360F, 0.0F); worldObj.spawnEntityInWorld(entityliving); number = 0; } }I think EarthGuardian will be able to help you more than I can. He managed to get damage values blocks working(with a little help from me) and I haven't really tried them yet.
Do you get a crash report? Look in ModLoader.txt in .minecraft if Minecraft closes too quickly. If you get a black screen, delete META-INF.
There is something wrong with one of your recipes, what is line 83 of your mod_ class?
together they are powerful beyond imagination."
I am a noob, so dont be surprised if the error is something stupid.
package net.minecraft.src; public class mod_hardeneddiamond extends BaseMod { public static final Item harddeneddiamond = new harddeneddiamond(5000).setItemName("assfacemcgee"); public void load() { hardeneddiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/hardeneddiamond.png"); ModLoader.addName(hardeneddiamond, "Hardened Diamond"); ModLoader.addRecipe(new ItemStack(hardeneddiamond, 1), new Object [] { "XX", "XX", Character.valueOf('X'), Item.diamond}); public String getVersion() { return "1.2.4"; } } }package net.minecraft.src; public class hardeneddiamond extends Item { public hardeneddiamond (int i) { super (i); maxStackSize = 64; } }No, I missed that part. Ugh, I will fix that tomorrow. At least it was just a careless error. Thanks for all the tutorials, they have helped a lot!
What do I need to say to "Call" The effect method?
This is my problem:
The spoilers below show the whole script if you really need to see.
_____________________________________________
The one below is the effect
For the script below, that is the entity that is being thrown.
public int number = 0; public void updateTick() { number++; //puts the int up by 1 every tick, supposedly. if(number == 4)//not sure about generating that number. I know how to do it with Random, but you would probably get errors in this case. { EntityLiving entityliving = (EntityLiving)EntityList.createEntityByName("EntityName", worldObj); double d3 = (double)xCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D; double d4 = (yCoord + worldObj.rand.nextInt(3)) - 1; double d5 = (double)zCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D; entityliving.setLocationAndAngles(d3, d4, d5, worldObj.rand.nextFloat() * 360F, 0.0F); worldObj.spawnEntityInWorld(entityliving); number = 0; } }worldObj isn't recognized. Do I have to import another package or something?
You put the getVersion method inside the load method. You can't do that. If you don't know how to fix that, I seriously recommend that you take a look at the page linked at the bottom of the OP.
I take it you don't know what a float is?
You are putting that in your TileEntity*** class right?
together they are powerful beyond imagination."
Oh, no it was in my mod_*** class. Do I need a TileEntity*** class?
So what would I put, something like this?
public class TileEntityBlock extends TileEntity { public int number = 0; public void updateEntity() { number++; if(number == 4) { EntityLiving entityliving = (EntityLiving)EntityList.createEntityByName("My custom mob title", worldObj); double d3 = (double)xCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D; double d4 = (yCoord + worldObj.rand.nextInt(3)) - 1; double d5 = (double)zCoord + (worldObj.rand.nextDouble() - worldObj.rand.nextDouble()) * 4D; entityliving.setLocationAndAngles(d3, d4, d5, worldObj.rand.nextFloat() * 360F, 0.0F); worldObj.spawnEntityInWorld(entityliving); number = 0; } } }Thanks didnt notice that i fixed, but now im pretty sure i didnt install mcp properly because now im getting
== ERRORS FOUND == src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:4: cannot find symbol symbol: class BaseMod public class mod_hardeneddiamond extends BaseMod ^ src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:6: cannot find symbol symbol : class harddeneddiamond location: class net.minecraft.src.mod_hardeneddiamond public static final Item harddeneddiamond = new harddeneddiamond(5000).setItemName("assfacemcgee"); ^ src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:10: non-static variable iconIndex cannot be referenced from a static context hardeneddiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/hardeneddiamond.png"); ^ src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:10: cannot find symbol symbol : variable ModLoader location: class net.minecraft.src.mod_hardeneddiamond hardeneddiamond.iconIndex = ModLoader.addOverride("/gui/items.png", "/hardeneddiamond.png"); ^ src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:11: cannot find symbol symbol : variable hardeneddiamond location: class net.minecraft.src.mod_hardeneddiamond ModLoader.addName(hardeneddiamond, "Hardened Diamond"); ^ src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:11: cannot find symbol symbol : variable ModLoader location: class net.minecraft.src.mod_hardeneddiamond ModLoader.addName(hardeneddiamond, "Hardened Diamond"); ^ src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:12: cannot find symbol symbol : variable hardeneddiamond location: class net.minecraft.src.mod_hardeneddiamond ModLoader.addRecipe(new ItemStack(hardeneddiamond, 1), new Object [] { ^ src/minecraft/net/minecraft/src/mod_hardeneddiamond.java:12: cannot find symbol symbol : variable ModLoader location: class net.minecraft.src.mod_hardeneddiamond ModLoader.addRecipe(new ItemStack(hardeneddiamond, 1), new Object [] { ^ 8 errors ==================But ill fix that on my own thanks a bunch.
Yes. Then put this in your block class:
public TileEntity getBlockEntity() { return new TileEntityNamehere(); }And then this in the load() method of your mod_ class:
together they are powerful beyond imagination."
You didn't define what that # is. It should be:
ModLoader.addRecipe(new ItemStack(StoneRedCobble, 2), new Object [] {"# ", Character.valueOf('#'), StoneRedCobbleStairs});together they are powerful beyond imagination."
Are you doing exactly as jtbnoob said to do it on the previous page? Link to their post(intructions are at the bottom).
That's weird. Try rewriting the addName line.
together they are powerful beyond imagination."