@PYROMANIAC702HD,didnt get what you want...
Here is the error i get when trying to make ReCompile To my mod:
Here are my classes:
Mod_Test
package net.minecraft.src;
import java.util.Random;
public class mod_Test extends BaseMod
{
public mod_Test()
{
ModLoader.RegisterBlock(Ore2);
Ore2.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Ore2.png");
Test.iconIndex = ModLoader.addOverride("/gui/items.png", "/Ore2Opacity.png");
ModLoader.AddName(Test, "Test");
ModLoader.AddRecipe(new ItemStack(Test, 1), new Object[] {
"XX", Character.valueOf('X'), Block.dirt
});
}
public static final Block Ore2;
public static final Item Test = (new Item(3031)).setItemName("Test");
public String Version()
{
return "1"; //The Version of the mod.
}
}
And Test(The Item):
package net.minecraft.src;
public class Test extends ItemFood
{
public Test(int i, int j, boolean flag, int k)
{
super(i, j, flag);
maxStackSize = 64;
}
}
And Ore2 Block File:
package net.minecraft.src;
import java.util.Random;
public class Ore2 extends Block
{
public Ore2(int i, int j)
{
super(i, j, Material.rock);
setStepSound(soundStoneFootstep);
}
public int idDropped(int i, Random random)
{
return Item.Test.shiftedIndex;
}
public int quantityDropped(Random random)
{
return 1;
}
}
Please Help Me Fix this!!
I dont get whey it cant find the symbol!
Eden.
And Thanks again.
"refer" means look at. He made a tutorial called simple generation + ore... on the first page. Read that, it shows how to have an item drop from a block.
Rollback Post to RevisionRollBack
FRIENDLY REMINDER: If my post has helped you in any way, be sure to click the littlebutton in the bottom right.
im not sure how to fix yours sporeman, i dont think its called flowerRed though, try a different name..
endencampo, you need to copy diamond armour, then colour it different, then it will show up, remember, you must name it, what you named it on the ModLoader.addArmor function..
mine123crafter, soon, it will be someday...
and thanks phantom core :biggrin.gif:
got to go now!
cya
Rollback Post to RevisionRollBack
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
Making a block, that does stuff, when placed, right clicked, or left clicked!
ok, now this isn't a very hard tutorial, so, lets get straight to it!
ok, so first, make a new block, done! then open up your new block.. so now, here are all the lists of things we can do to our block!
public void onBlockRemoval(World world, int i, int j, int k)
{
}
public void onBlockPlaced(World world, int i, int j, int k, int l)
{
}
public void onBlockClicked(World world, int i, int j, int k, EntityPlayer entityplayer)
{
}
public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
{
}
pretty easy to understand, just a bunch of constucters, so, now what we do is this:
if we want it to stike lightning, we just add this to it!
strengthowns really doesn't like me using any code his ever used, but anyway...
so it would look like this:
public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
{
:sad.gif: wont work, i need to make a new thing...
}
see? now you understand it :smile.gif:
there are lots of things you can make it spawn, i will add more later, because you have to nerf the code a bit
well good luck!
full code:
// 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
package net.minecraft.src;
// Referenced classes of package net.minecraft.src:
// Block, Material
public class BlockDirt extends Block
{
protected BlockDirt(int i, int j)
{
super(i, j, Material.ground);
}
public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
{
--------------------
}
}
I have a question regarding this:
Where could I find a tutorial on this?
It looks like yours is unfinished or I am terrible at understanding it.
PS: Basically, I want to make a block that when destroyed, puts a different block in its place, like Ice. When you destroy Ice, it will turn into a water block.
Rollback Post to RevisionRollBack
Quote from The Great Radio »
Quote from Crysis »
Quote from Hafk »
Fixed
Fixed.
Fixed.
Gosh guys, it was fine the way it was.
Quote from Awsomedude101101 »
Hey I'm am 11 plz ignore laungue THATS SO ****ING AWESOME AGHHHHHHHHHH I want but I am totally broke
P.S no homo but r u a girl?
ok, lets get right into it, first make a new block, then open up Blocknewblockthing
now pretty simple, put in this code, and it will make it will spawn a pig when redstone powered!
ok, now thats done!
you now know how to make it, here i will break it down
the is a simple constructer, just checks if the block next to it is powered redstone, then it will do the function, (i think)
cant share sorry
you probably don't need the full code, its just one thing!
well, have fun
here are some examples of what entity's you can spawn
EntityLightningBolt
EntityCow
EntityZombie
EntityCreeper
EntityArrow
EntityYourGrenade (if you use this one you should make it resistant to TNT)
EntityMonster (not sure about this one, i think its a human looking guy that chases you)
EntityGiant (that would be fun)
good luck! :smile.gif:
umm, sorry, having some trouble, it will take quite a while
23/08/2011 16:13:26 ModLoader init
FINE: ModLoader Beta 1.7.3 Initializing...
23/08/2011 16:13:26 ModLoader readFromClassPath
FINER: Adding mods from C:\Users\Anri\AppData\Roaming\.minecraft\bin\minecraft.jar
23/08/2011 16:13:26 ModLoader readFromClassPath
FINER: Zip found.
23/08/2011 16:13:26 ModLoader addMod
FINE: Failed to load mod from "mod_hydronite.class"
23/08/2011 16:13:26 ModLoader addMod
FINER: THROW
java.lang.NoClassDefFoundError: mod_hydronite (wrong name: net/minecraft/src/mod_hydronite)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ModLoader.addMod(ModLoader.java:267)
at ModLoader.readFromClassPath(ModLoader.java:1104)
at ModLoader.init(ModLoader.java:812)
at ModLoader.AddAllRenderers(ModLoader.java:183)
at th.<init>(th.java:60)
at th.<clinit>(th.java:9)
at net.minecraft.client.Minecraft.a(SourceFile:318)
at net.minecraft.client.Minecraft.run(SourceFile:716)
at java.lang.Thread.run(Unknown Source)
23/08/2011 16:13:36 ModLoader AddAllRenderers
FINE: Initialized
Generation!
yes i know, GENERATION
i jizzed a little when i saw my first generation tutorial :smile.gif:
ok here we go!
first, to set up our generation, make a new mod_***
but this one will be a tiny bit different
here it is
package net.minecraft.src;
import java.util.Random;
public class mod_Tankitegen extends BaseMod
{
public mod_Tankitegen()
{
}
public String Version()
{
return "1.7.3";
}
public void GenerateSurface(World world, Random rand, int i, int j)
{
{
for(int k = 0; k <0.1; k++)
{
int RandPosX = i + rand.nextInt(16);
int RandPosY = rand.nextInt(128);
int RandPosZ = j + rand.nextInt(16);
(new WorldGenT()).generate(world, rand, RandPosX, RandPosY, RandPosZ);
}
}
}
so, its simple, pretty much tells it on load to generate your, umm, letter T!
and if your wondering, its way too common!! then just do this:
the first one is X, or width
second one is Y, or hight
and the last one is Z, or length
this one also selects an area to generate, kind of like, MCEdit selecting, or Single Player Commands, wand, to select areas
so, now we will use more of the
world.setBlock(i + i1, j + l1, k + k1, mod_***.cow.blockID);
but change it around abit :tongue.gif:
so change it to this
world.setBlock(i + 0, j + 3, k + 1, 17);
remember you cant use the block, like Block.dirt.blockID like last time
you MUST use the ID!
so here you must imagine, your in a 3D plane, full of nothing, now you must use the codes to direct where the block will go,
chuck a bunch of these in, and change them around
remember put them in the same spot as the other world.setBlock
and DO NOT, use too many world.setBlock(i + 0, j + 3, k + 1, 17); as it will cause, huge lag!
and that lag is pretty damn annoying :0
so theres the tutorial, here are the files
mod_yogenerate!
package net.minecraft.src;
import java.util.Random;
public class mod_Tankitegen extends BaseMod
{
public mod_Tankitegen()
{
}
public String Version()
{
return "1.7.3";
}
public void GenerateSurface(World world, Random rand, int i, int j)
{
{
for(int k = 0; k <0.1; k++)
{
int RandPosX = i + rand.nextInt(16);
int RandPosY = rand.nextInt(128);
int RandPosZ = j + rand.nextInt(16);
(new WorldGenT()).generate(world, rand, RandPosX, RandPosY, RandPosZ);
}
}
}
Works!!!Thanks Man!!You Are Awesome :biggrin.gif:
Fell free to ask me for help when you need :tongue.gif:
"refer" means look at. He made a tutorial called simple generation + ore... on the first page. Read that, it shows how to have an item drop from a block.
and for blocks, this
ok? got to go now :tongue.gif:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
lol it was no problem bro. I pretty much re-did your whole code. :tongue.gif:
What is this O_O why its not like the PNG?
I am making a simple block that is crafted as so:
For some reason, when I recompile, it cannot detect block.flowerred/flowerRed/flower/plant.red/red.plant/Plant.red/Red.Plant.
Any help?
Gosh guys, it was fine the way it was.
endencampo, you need to copy diamond armour, then colour it different, then it will show up, remember, you must name it, what you named it on the ModLoader.addArmor function..
mine123crafter, soon, it will be someday...
and thanks phantom core :biggrin.gif:
got to go now!
cya
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
also, it may have been the wrong name, see what you did in the modLoader.addArmor funtion, then make it like the other armours, with a different name
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
If I cant though I would very much appreciate the files :]
(I feel like an idiot im the only one on most threads who cant get it >_<)
EDIT: 6 Errors! [Better than 21 >_>]
Heres the error report:
I made this map! Please check it out! It's a really awesome map that took me over a year to make! :3
I have a question regarding this:
Where could I find a tutorial on this?
It looks like yours is unfinished or I am terrible at understanding it.
PS: Basically, I want to make a block that when destroyed, puts a different block in its place, like Ice. When you destroy Ice, it will turn into a water block.
Gosh guys, it was fine the way it was.
Not sure what you meen,i remade the armor,changed name's,still,white and weird.
EDIT:Nvm,Fixed It alone...
Is it just me or you really didn't give any code?
23/08/2011 16:13:26 ModLoader init
FINE: ModLoader Beta 1.7.3 Initializing...
23/08/2011 16:13:26 ModLoader readFromClassPath
FINER: Adding mods from C:\Users\Anri\AppData\Roaming\.minecraft\bin\minecraft.jar
23/08/2011 16:13:26 ModLoader readFromClassPath
FINER: Zip found.
23/08/2011 16:13:26 ModLoader addMod
FINE: Failed to load mod from "mod_hydronite.class"
23/08/2011 16:13:26 ModLoader addMod
FINER: THROW
java.lang.NoClassDefFoundError: mod_hydronite (wrong name: net/minecraft/src/mod_hydronite)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at ModLoader.addMod(ModLoader.java:267)
at ModLoader.readFromClassPath(ModLoader.java:1104)
at ModLoader.init(ModLoader.java:812)
at ModLoader.AddAllRenderers(ModLoader.java:183)
at th.<init>(th.java:60)
at th.<clinit>(th.java:9)
at net.minecraft.client.Minecraft.a(SourceFile:318)
at net.minecraft.client.Minecraft.run(SourceFile:716)
at java.lang.Thread.run(Unknown Source)
23/08/2011 16:13:36 ModLoader AddAllRenderers
FINE: Initialized
Can you help me here pleas?
People who make things like that take the fun out of stuff :|
Besides I think doing the coding and learning how to make it is half the fun :biggrin.gif:
He had to remove it because it was strengthown's code and he did not want him to post it.
How do you make the thing you made, generate on the ground instead of in the sky?
My achievements are giving errors from Eclipse.
Here's the mod_***.java (not actually called that though :tongue.gif:)
Found here:
But there's one for each, of course.
Also lines here:
Errors on both of those.
And my second question, how do you make it wash away with water? Is it:
or something else? Thanks in advance!