Chewy, I am making a mod as you know by now, and I would love to learn more about advanced blocks, like maybe a block you can walkthrough, or one that can power redstone (possibly when the block is hit by an arrow. If you could do something like that, I would be really happy. Please message me if you know how to do something like that.
Chewy, I am making a mod as you know by now, and I would love to learn more about advanced blocks, like maybe a block you can walkthrough, or one that can power redstone (possibly when the block is hit by an arrow. If you could do something like that, I would be really happy. Please message me if you know how to do something like that.
An intangible block is very easy, you just have to find the function that sets the collision mesh of the box and set it to null (look for it in BlockTorch.java). A block powered by an arrow is really complex. You could probably look in EntityArrow.java and find what happens when the arrow collides with a block and make the block it has collided with turn on by making a static function in the block class and calling it when the arrow collides. This is just speculation, it may be more complex then that.
Hey chewy, I'm having some trouble starting up Java, it opens up then closes back down.
Also, once I get it working, can you show me how to make a mod that hides player's names?
Hey chewy, I'm having some trouble starting up Java, it opens up then closes back down.
Also, once I get it working, can you show me how to make a mod that hides player's names?
What Java task are you trying to perform, specifically? You can't run the JRE, only the applications it runs. Are you decompiling, recompiling, testing or what?
As for the mod idea, it would only work client side. Once you get it working, just look in EntityOtherPlayerMP.java and look for a function that uses FontRenderer.java. I'll go more into detail once you get it working.
Great tutorial but I seem to be stuck on Raw foods/smelting ores. I don't know where to find how long it takes for an item to be cooked and what item it turns into afterward.
I've tried skimming through Items.java and even BlockFurnace.java
Edit: I found what I was looking for. Anyways, thanks a lot. I'll be referring to this guide from time to time.
Also, how would you go about making grass grow? I'll look into the coding for spreading grass later, but I doubt I'll find something.
Great tutorial, however, there seems to be a problem with my toolset :tongue.gif: Granted I've only added a sword and a pickaxe so far, neither of them have the qualities of the EnumToolMaterial I've made :/ There aren't any errors either. Is this only happening because it is V1.7.3 right now? or am I just bad with coding? :tongue.gif:
chewy i still cant solve it i read the tutorial and i have added the int every where it could possibly be may you plz help me by telling me exactly where to put it?
chewy i still cant solve it i read the tutorial and i have added the int every where it could possibly be may you plz help me by telling me exactly where to put it?
Well it would definitely help if you actually posted the 'int' you were talking about and what part of the code you were talking about as well. Its not like there is one common int in all of Java, there are many different ints that are assigned many different things, so please specify the int and what java file you are talking about.
lol i have written it and now it is still not working (kinda hard when i gotta romove all the ore generation stuff and make it work its just a window.) My Error:
== MCP v4.3 ==
> Recompiling client...
javac.exe -g -verbose -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jin
put.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d
bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minec
raft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java fai
led.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_FramedGlass.java:5: cannot find symbol
symbol : constructor BlockframedGlass(int,int)
location: class net.minecraft.src.BlockframedGlass
public static final Block framedGlass = new BlockframedGlass(100, 0).setHardness
(0.3F).setResistance(0F).setLightValue(0.0F).setBlockName("framedGlass");
^
1 error
==================
> Done in 5.19 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
and now my scriptsss
mod_FramedGlass.java
package net.minecraft.src;
public class mod_FramedGlass extends BaseMod {
public static final Block framedGlass = new BlockframedGlass(100, 0).setHardness(0.3F).setResistance(0F).setLightValue(0.0F).setBlockName("framedGlass");
public mod_FramedGlass() {
ModLoader.RegisterBlock(framedGlass);
framedGlass.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Plankcraft/FramedGlass.png");
}
public String Version() {
return "0.1 for MC Beta 1.7.3";
}
}
BlockframedGlass.java
package net.minecraft.src;
public class BlockframedGlass extends Block {
public BlockframedGlass(int i) {
super(i, Material.glass);
blockIndexInTexture = 0;
}
public int getBlockTextureFromSide (int i) {
if (i == 1) {
return blockIndexInTexture - 16;
}
if (i == 0) {
return blockIndexInTexture + 16;
} else {
return blockIndexInTexture;
}
}
}
EDIT: now i changed a file name to mod_framedGlass.java it recompiles but when it does i get this
== MCP v4.3 ==
> Recompiling client...
javac.exe -g -verbose -classpath "lib/;lib/*;jars/bin/minecraft.jar;jars/bin/jin
put.jar;jars/bin/lwjgl.jar;jars/bin/lwjgl_util.jar" -sourcepath src/minecraft -d
bin/minecraft src/minecraft\net\minecraft\client\*.java src/minecraft\net\minec
raft\isom\*.java src/minecraft\net\minecraft\src\*.java conf/patches/*.java fai
led.
Return code : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_framedGlass.java:5: cannot find symbol
symbol : constructor BlockframedGlass(int,int)
location: class net.minecraft.src.BlockframedGlass
public static final Block framedGlass = new BlockframedGlass(100, 0).setHardness
(0.3F).setResistance(0F).setLightValue(0.0F).setBlockName("framedGlass");
^
1 error
==================
> Done in 5.29 seconds
> Recompiling server...
!! Can not find server sources !!
Press any key to continue . . .
where do i put the int in my code? please show me i just cant seem to get it right
that was all it was :tongue.gif: You only needed the 100 as the ID, the extra 0 threw everything off. Your error was saying that it couldn't recognize it since it thought it was 2 separate ints, so you had to remove the extra one (the zero).
I'm sorry, what do you mean?
Add it to the constructor in your block class. If you don't know what the constructor is go to the Java tutorial I linked in the first tutorial.
An intangible block is very easy, you just have to find the function that sets the collision mesh of the box and set it to null (look for it in BlockTorch.java). A block powered by an arrow is really complex. You could probably look in EntityArrow.java and find what happens when the arrow collides with a block and make the block it has collided with turn on by making a static function in the block class and calling it when the arrow collides. This is just speculation, it may be more complex then that.
If so where would I add it?
This goes in your block class.
I use the non modloader one though, so I don't make mod_whatever classes
I think the code was for me, because I found it in the torch block.java file
Also, once I get it working, can you show me how to make a mod that hides player's names?
What Java task are you trying to perform, specifically? You can't run the JRE, only the applications it runs. Are you decompiling, recompiling, testing or what?
As for the mod idea, it would only work client side. Once you get it working, just look in EntityOtherPlayerMP.java and look for a function that uses FontRenderer.java. I'll go more into detail once you get it working.
but I seem to be stuck on Raw foods/smelting ores. I don't know where to find how long it takes for an item to be cooked and what item it turns into afterward.
I've tried skimming through Items.java and even BlockFurnace.java
Edit: I found what I was looking for. Anyways, thanks a lot. I'll be referring to this guide from time to time.
Also, how would you go about making grass grow? I'll look into the coding for spreading grass later, but I doubt I'll find something.
^Click me!^
Well it would definitely help if you actually posted the 'int' you were talking about and what part of the code you were talking about as well. Its not like there is one common int in all of Java, there are many different ints that are assigned many different things, so please specify the int and what java file you are talking about.
^Click me!^
where do i put the int in my code? please show me i just cant seem to get it right
that was all it was :tongue.gif: You only needed the 100 as the ID, the extra 0 threw everything off. Your error was saying that it couldn't recognize it since it thought it was 2 separate ints, so you had to remove the extra one (the zero).
^Click me!^