As Koadmaster mentioned above, you have there twice the same code in spoilers. Also, If you are bad in english, please try to use full words (you) instead of these short versions (u). It is then better understandable :smile.gif: To get to the point, the only mistake I can see now in this part of your code is that ".setStepSound(soundStoneFootstep)" should be ".setStepSound(Block.soundStoneFootstep)"
Hope it helps :smile.gif:
What u mean by .setStepSound(BLOCK.soundStoneFootstep) The block do u mean the name of the block or just leave it block???
Just leave it as "Block" (Capital B - java is case sensitive)
Thx also when u are setting up the JDK when it says path does it mean CLASSPATH or just the PATH file. Cuase i have like 3 PATH CLASSPATH and another???
Awesome! and Thank You!(will test soon) Also: I tried your potion effect in food tutorial and it worked fine except that (I think) the explanation of the 30 in your tutorial seems incorrect I tried 20 and it gave me like 20 something seconds of effect but then I tried 5 and it gave me like 5 seconds of effect, just thought you might like to know.
Ok thanks. I'll try it again, then post the correct information. I think your right because when I was testing I actually had multipliers in it.
Hey mate, nice tut. I must say it was better and smarter done than anyone else. But I wonder about one thing, how can I make my own skin for a block like a bookshelf. I want to make a block that has one skin around it and another on top and bottom (like a bookshelf). I will try this stuff out in 3 days when I'm back, hoping u will have replied by then so I can try to make a block like that aswell!
Ty in advance, and keep it up!
Haxer , and a for you!
Well, seeing as heaps of people want it, I'll make that tutorial now :smile.gif:
I have a problem if I put he files in MP then run it i get errors when i just copy ur code and change the names whats the problem. like 1 problem is with ModLoader it says that the M is suppost to be lover case but u have it upper im so confused if i post my code could u Edit it THX and Here is the code!!
package net.minecraft.src;
public class mod_BedrockOre extends BaseMod
{
public static final BedrockOre = (new BlockBedrockOre(153, 0)).setHardness(3F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("BedrockOre");
public class BlockBedrockOre extends Block
{
public BlockBedrockOre(int i, int j)
{
super(i, j, Material.rock);
}
public int idDropped(int i, Random random, int j)
{
return mod_BedrockStuff.BedrockOre.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
}
I cant copy the error cause it is in DOS but it says identifier expected! Then on the <soundStonestep> thing there is a thing under the S in stone so im confused plz help!!!
Plz help I pretty sure it should work!!! Thx
public static final BedrockOre = (new BlockBedrockOre
this should be
public static final Block BedrockOre = (new BlockBedrockOre
You need to identify what type of thing you're creating.
As has been suggested above, you need to define where 'soundStoneFootstep' is. So it should be
.setStepSound(Block.soundStoneFootstep)
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 think this is the right bit of the error report:
--------------- T H R E A D ---------------
Current thread (0x49ec8000): JavaThread "AWT-Windows" daemon [_thread_in_native, id=5028, stack(0x4a1b0000,0x4a200000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000000
Registers:
EAX=0x4a1ff7b0, EBX=0x49ed0518, ECX=0x000001d4, EDX=0x000000c0
ESP=0x4a1ff798, EBP=0x4a1ff908, ESI=0x00000000, EDI=0x000000c0
EIP=0x6d0b70d0, EFLAGS=0x00010206
Top of Stack: (sp=0x4a1ff798)
0x4a1ff798: 4a1ff7b0 00001000 00000000 49f06978
0x4a1ff7a8: 49f06900 00000383 0000020f 6d0af5ac
0x4a1ff7b8: 00000000 7c460258 49ec8868 49f06978
0x4a1ff7c8: 6d0b3d33 00000000 00009825 49ec8128
0x4a1ff7d8: 00000001 00000383 00000000 00000000
0x4a1ff7e8: 00000383 00000000 4a1ff87c 49ec8128
0x4a1ff7f8: 019a5320 fffffffe 00000000 765e1b31
0x4a1ff808: 00000000 6d06dbd0 000e053e 0000000f
Instructions: (pc=0x6d0b70d0)
0x6d0b70b0: d8 56 8b b3 10 a0 00 00 1b c0 57 25 00 f0 ff ff
0x6d0b70c0: 05 00 20 00 00 50 c1 e2 05 8d 44 24 14 50 8b fa
0x6d0b70d0: 8b 16 57 c1 e1 05 51 56 ff 52 2c 85 c0 0f 8c 93
0x6d0b70e0: 00 00 00 8b 53 04 8b cf 8b 7c 24 10 8b c1 c1 e9
Register to memory mapping:
EAX=0x4a1ff7b0 is pointing into the stack for thread: 0x49ec8000
EBX=0x49ed0518 is an unknown value
ECX=0x000001d4 is an unknown value
EDX=0x000000c0 is an unknown value
ESP=0x4a1ff798 is pointing into the stack for thread: 0x49ec8000
EBP=0x4a1ff908 is pointing into the stack for thread: 0x49ec8000
ESI=0x00000000 is an unknown value
EDI=0x000000c0 is an unknown value
Stack: [0x4a1b0000,0x4a200000], sp=0x4a1ff798, free space=317k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [awt.dll+0xb70d0]
C [awt.dll+0x9cd3a]
C [USER32.dll+0x1c4e7]
C [USER32.dll+0x1c5e7]
C [USER32.dll+0x14f0e]
C [USER32.dll+0x14f7d]
C [ntdll.dll+0x46fce]
C [USER32.dll+0x164a1]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j sun.awt.windows.WToolkit.eventLoop()V+0
j sun.awt.windows.WToolkit.run()V+52
j java.lang.Thread.run()V+11
v ~StubRoutines::call_stub
the other stuff is on page 4 if it helps
thanks
As a mod maker how do you go about updating mods when i tried to update from 1.7 to 1.0 i just put my 1.7 mods into the 1.0 .jar and started the whole mcp process all over again (which caused a lot of errors where it would replace bits of code with other bits e.g. changing .shiftedIndex to .BiomeDecorator and things like that throughout my code so i know there must be an easier way
thanks if you can help.
Post the contents of ModLoader.txt from mcp/jars please. That's not the error report needed, if it is one at all. One thing I see with your code though, is this:
world.entityJoinedWorld
has now changed to
world.spawnEntityInWorld
As for updating mods, do you still have the .java files from the 1.7 mod? If you do, just put them in src of a new mcp and then fix errors.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Images go in mcp/bin/minecraft, or mcp/eclipse/Client/bin if you're using [email protected]
Can you tell me what the problem was again, and post your current 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 TechGuy, I was wondering, how do you add a modloader recipe to a block/item in the original Minecraft code? Not a new block, something like a Diamond. Say I wanted to make it so if i put a potion with a Gold Ingot and it made a Diamond. How would I add this recipe like a modloader recipe for a new block, and not a new entry in CraftingManager.java?
Hey TechGuy, I was wondering, how do you add a modloader recipe to a block/item in the original Minecraft code? Not a new block, something like a Diamond. Say I wanted to make it so if i put a potion with a Gold Ingot and it made a Diamond. How would I add this recipe like a modloader recipe for a new block, and not a new entry in CraftingManager.java?
Just put it in your mod_ class, and set it to make a diamond, rather than your block/item.
That should work, the only part I'm not sure about is the potion, but Eclipse says it's right. Just change it to Potion.whateverpotionnameis. (Bolded so it was easier to read each word).If your not sure about the name, just check in Potion.java. All the names are at the top.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I had a thought for a mod that used an block that changed blocks/items into different ones (like a furnace or brewing stand) but I have no idea how to make something do that, so I was wondering if you knew how to add that and if you do if you could tell me :smile.gif:
-Thank You-
I had a thought for a mod that used an block that changed blocks/items into different ones (like a furnace or brewing stand) but I have no idea how to make something do that, so I was wondering if you knew how to add that and if you do if you could tell me :smile.gif:
-Thank You-
StrongJoshua has a tutorial on making a new furnace type block. I'll eventually upload one, but it might take a while.
package net.minecraft.src;
import java.util.Map;
public class mod_whitender extends BaseMod
{
public static final Item whitepearl = (new Item(1451)).setItemName("whitepearl");
//ModLoader.AddArmor("pearl")
public static final Item pearlhelm = (new ItemArmor(1450, EnumArmorMaterial.DIAMOND, 4, 0)).setItemName("pearlhelm");
public static final Block blockWhite = (new BlockWhite(237, 0)).setHardness(-1F).setResistance(-1F).setBlockName("blockWhite");
public void addRenderer(Map map){
map.put(EntityWhitender.class, new RenderEnderman()); }
public void load()
{
ModLoader.RegisterEntityID(EntityWhitender.class, "White Enderman", ModLoader.getUniqueEntityId());
// ModLoader.AddSpawn(EntityWhitender.class, 100, 1, 3, EnumCreatureType.creature);
blockWhite.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/kjom/blocks/whiteblock.png");
whitepearl.iconIndex = ModLoader.addOverride("/gui/items.png", "/kjom/items/whitepearl.png");
pearlhelm.iconIndex = ModLoader.addOverride("/gui/items.png", "/kjom/armour/pearlhelm2.png");
ModLoader.AddName(whitepearl, "White Pearl");
ModLoader.AddName(blockWhite, "White Block");
ModLoader.AddName(pearlhelm, "Pearl Crown");
ModLoader.AddRecipe(new ItemStack(blockWhite, 1), new Object[] {
"XXX", "X|X", "XXX", Character.valueOf('X'), Item.ingotGold, Character.valueOf('|'),Item.enderPearl});
ModLoader.AddRecipe(new ItemStack(pearlhelm, 1), new Object[] {
" | ", "XXX", "X X", Character.valueOf('X'), Item.ingotGold, Character.valueOf('|'),whitepearl});
}
@Override
public String getVersion() {
// TODO Auto-generated method stub
return "1.0.0";
}
}
package net.minecraft.src;
public class BlockWhite extends Block
{
private boolean blockType;
protected BlockWhite(int i, int j)
{
super(i, Material.rock);
setTickOnLoad(true);
}
public void onBlockAdded(World world, int i, int j, int k)
{
super.onBlockAdded(world, i, j, k);
if(world.getBlockId(i - 1, j, k) == Block.glowStone.blockID && world.getBlockId(i + 1, j, k) == Block.glowStone.blockID && world.getBlockId(i, j, k + 1) == Block.glowStone.blockID && world.getBlockId(i, j, k - 1) == Block.glowStone.blockID)
{
if(!world.isRemote)
{
world.setBlockWithNotify(i, j, k, 0);
world.setBlockWithNotify(i - 1, j, k, 0);
world.setBlockWithNotify(i + 1, j, k, 0);
world.setBlockWithNotify(i, j, k - 1, 0);
world.setBlockWithNotify(i, j, k + 1, 0);
EntityWhitender entitywhitender = new EntityWhitender(world);
entitywhitender.setLocationAndAngles((double)i + 0.5D, (double)j - 1.95D, (double)k + 0.5D, 0.0F, 0.0F);
world.spawnEntityInWorld(entitywhitender);
}
for(int l = 0; l < 120; l++)
{
world.spawnParticle("snowshovel", (double)i + world.rand.nextDouble(), (double)(j + 1) + world.rand.nextDouble() * 2.5D, (double)k + world.rand.nextDouble(), 0.0D, 0.0D, 0.0D);
}
}
}
public boolean canPlaceBlockAt(World world, int i, int j, int k)
{
int l = world.getBlockId(i, j, k);
return (l == 0 || Block.blocksList[l].blockMaterial.isGroundCover()) && world.isBlockNormalCube(i, j - 1, k);
}
public void onBlockPlacedBy(World world, int i, int j, int k, EntityLiving entityliving)
{
int l = MathHelper.floor_double((double)((entityliving.rotationYaw * 4F) / 360F) + 2.5D) & 3;
world.setBlockMetadataWithNotify(i, j, k, l);
}
}
the problem is that when i try to craft the block t crashes out of the game
Normally that has to do with rendering, but I've noticed this in your block class.
protected BlockWhite(int i, int j)
{
super(i, Material.rock);
setTickOnLoad(true);
}
It needs to be public, and have j in the super statement.
public BlockWhite(int i, int j)
{
super(i, j, Material.rock);
setTickOnLoad(true);
}
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Could you add how to make achievements? I have added 2 but the only problem I am having is finding out how to add Titles and descriptions to them. Help would be appreciated
Could you add how to make achievements? I have added 2 but the only problem I am having is finding out how to add Titles and descriptions to them. Help would be appreciated
Yeh, I'll try.
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 dude where did you learn java and also teach us how to add effects on stuff like on right click this will happen. and another thing is like when you walk on a block it explodes yep so thnx dude.
hey dude where did you learn java and also teach us how to add effects on stuff like on right click this will happen. and another thing is like when you walk on a block it explodes yep so thnx dude.
To what I know of Java at the moment. I'm all self-taught besides a few basic tutorials. If you want to learn it, there is a link in the main post. I'll try and add some tutorials like that soon.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
The Meaning of Life, the Universe, and Everything.
Join Date:
10/27/2011
Posts:
41
Member Details
I already did the image for my items but everytime I recompile, reobfuscate, and startclient atleast one of the images cannot be found please help :sad.gif:
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
What u mean by .setStepSound(BLOCK.soundStoneFootstep) The block do u mean the name of the block or just leave it block???
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumJust leave it as "Block" (Capital B - java is case sensitive)
Divine smoker mod - Hookah in Minecraft: http://www.minecraftforum.net/topic/1689980-172splanspdivine-smoker-water-pipe-modhookahshisha-11/
Thx also when u are setting up the JDK when it says path does it mean CLASSPATH or just the PATH file. Cuase i have like 3 PATH CLASSPATH and another???
Ok thanks. I'll try it again, then post the correct information. I think your right because when I was testing I actually had multipliers in it.
Well, seeing as heaps of people want it, I'll make that tutorial now :smile.gif:
this should be
You need to identify what type of thing you're creating.
As has been suggested above, you need to define where 'soundStoneFootstep' is. So it should be
together they are powerful beyond imagination."
Post the contents of ModLoader.txt from mcp/jars please. That's not the error report needed, if it is one at all. One thing I see with your code though, is this:
has now changed to
As for updating mods, do you still have the .java files from the 1.7 mod? If you do, just put them in src of a new mcp and then fix errors.
together they are powerful beyond imagination."
Can you tell me what the problem was again, and post your current code please.
together they are powerful beyond imagination."
Glowing Items?
Yes.. I said Items, Not blocks!
Thanks
Use the dynamic lights mod and add your stuff to it. There is no other way that I am aware of.
Just put it in your mod_ class, and set it to make a diamond, rather than your block/item.
ModLoader.AddRecipe(new ItemStack(Item.diamond, 1), new Object [] {"#%", Character.valueOf('#'), Item.ingotGold, Character.valueOf('%'), Potion.blindness});That should work, the only part I'm not sure about is the potion, but Eclipse says it's right. Just change it to Potion.whateverpotionnameis. (Bolded so it was easier to read each word). If your not sure about the name, just check in Potion.java. All the names are at the top.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse Premium-Thank You-
StrongJoshua has a tutorial on making a new furnace type block. I'll eventually upload one, but it might take a while.
Normally that has to do with rendering, but I've noticed this in your block class.
protected BlockWhite(int i, int j) { super(i, Material.rock); setTickOnLoad(true); }It needs to be public, and have j in the super statement.
public BlockWhite(int i, int j) { super(i, j, Material.rock); setTickOnLoad(true); }together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumRight, I will look into it, and thanks.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumYeh, I'll try.
together they are powerful beyond imagination."
To what I know of Java at the moment. I'm all self-taught besides a few basic tutorials. If you want to learn it, there is a link in the main post. I'll try and add some tutorials like that soon.
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumIt works for me. This is my item class:
package net.minecraft.src; public class ItemNamehere extends Item { public ItemNamehere(int i) { super(i); maxStackSize = 64; } public boolean onItemUse(ItemStack itemstack, EntityPlayer entityplayer, World world, int i, int j, int k, int l) { if (!entityplayer.canPlayerEdit(i, j, k)) { return false; } int i1 = world.getBlockId(i, j, k); if (i1 == Block.sapling.blockID) { if (!world.multiplayerWorld) { ((BlockSapling)Block.sapling).growTree(world, i, j, k, world.rand); itemstack.stackSize--; } return true; } if (i1 == Block.mushroomBrown.blockID || i1 == Block.mushroomRed.blockID) { if (!world.multiplayerWorld && ((BlockMushroom)Block.blocksList[i1]).fertilizeMushroom(world, i, j, k, world.rand)) { itemstack.stackSize--; } return true; } if (i1 == Block.melonStem.blockID || i1 == Block.pumpkinStem.blockID) { if (!world.multiplayerWorld) { ((BlockStem)Block.blocksList[i1]).fertilizeStem(world, i, j, k); itemstack.stackSize--; } return true; } if (i1 == Block.crops.blockID) { if (!world.multiplayerWorld) { ((BlockCrops)Block.crops).fertilize(world, i, j, k); itemstack.stackSize--; } return true; } if (i1 == Block.grass.blockID) { if (!world.multiplayerWorld) { itemstack.stackSize--; label0: for (int j1 = 0; j1 < 128; j1++) { int k1 = i; int l1 = j + 1; int i2 = k; for (int j2 = 0; j2 < j1 / 16; j2++) { k1 += itemRand.nextInt(3) - 1; l1 += ((itemRand.nextInt(3) - 1) * itemRand.nextInt(3)) / 2; i2 += itemRand.nextInt(3) - 1; if (world.getBlockId(k1, l1 - 1, i2) != Block.grass.blockID || world.isBlockNormalCube(k1, l1, i2)) { continue label0; } } if (world.getBlockId(k1, l1, i2) != 0) { continue; } if (itemRand.nextInt(10) != 0) { world.setBlockAndMetadataWithNotify(k1, l1, i2, Block.tallGrass.blockID, 1); continue; } if (itemRand.nextInt(3) != 0) { world.setBlockWithNotify(k1, l1, i2, Block.plantYellow.blockID); } else { world.setBlockWithNotify(k1, l1, i2, Block.plantRed.blockID); } } } return true; } return false; } }together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumHuh, well I guess that I will try it more efficiently tomorrow.