this tutorial worked PERFECTLY. thank you so much. I'm trying to make like 20 new ores that I have never seen made in any other mod. Got Csycryl down, now to make the items. Thanks again.
you get less errors than me. I get 3076 errors, but it's because your computer can't find the OpenGL libraries, which most likely you don't have it unless you use it... or some other random reason, either way, as long as it does not affect the files you are modifying, and even if it does to the most part, because those errors will not exist when you put them back into the .jar, which has the stuff that is missing.
Does this tutorial apply to 1.7.2? I can't seem to find anything you're talking about in the first tutorial in Block.java. All I see are the sounds for when you walk on certain materials. :<
this tutorial worked PERFECTLY. thank you so much. I'm trying to make like 20 new ores that I have never seen made in any other mod. Got Csycryl down, now to make the items. Thanks again.
Does this tutorial apply to 1.7.2? I can't seem to find anything you're talking about in the first tutorial in Block.java. All I see are the sounds for when you walk on certain materials. :<
Did you decompile using the current version of MCP? MCP only works for the version it is made for. MCP 4.1 is made for 1.6.6, so it will only work for 1.6.6. If you use it for 1.7 it will mix up obfuscated names and everything will be wrong. Sorry for the confusion, I'll fix it now.
No, I should have known that a 1.6.6 program wouldn't have worked with 1.7.2 files. I just assumed it would work fine with everything except pistons and shears and other items implemented in 1.7.2. Oh well, MCP will update eventually! :3
dang, I'm having trouble with the items, I made another if statement on the BlockOre saying to drop my item if the item ID is my blocks' however when I break it instant crash and can't get back into that world, because the game is having trouble drawing the item, it says NullPointerException, but I look through my script and absolutely nothing is left null at all.
The process for my ore:
Break ore with ironPickaxe+ and get a Csycryl Chunk of metal
Put the Csycryl Chunk in a furnace and you'll get 2 Csycrly Gems, put 6 gems in a crafting table like this to make a Csycryl Ingot:
# # #
# # #
then use the ingots to make a pickaxe. it will take:
9 ores to make a pickaxe
9 ores to make an axe
6 ores to make a hoe
6 ores to make a sword
3 ores to make a spade/shovel
public static Item CsycrylChunk = (new Item(261)).setIconCoord(0, 10).setItemName("csycrylMetalChunk");
public static Item CsycrylGem = (new Item(262)).setIconCoord(1, 10).setItemName("csycrylGem");
public static Item CsycrylIngot = (new Item(263)).setIconCoord(2, 10).setItemName("csycrylIngot");
is there anything else I need? because it just doesn't find the item somehow, it keeps getting null.
dang, I'm having trouble with the items, I made another if statement on the BlockOre saying to drop my item if the item ID is my blocks' however when I break it instant crash and can't get back into that world, because the game is having trouble drawing the item, it says NullPointerException, but I look through my script and absolutely nothing is left null at all.
The process for my ore:
Break ore with ironPickaxe+ and get a Csycryl Chunk of metal
Put the Csycryl Chunk in a furnace and you'll get 2 Csycrly Gems, put 6 gems in a crafting table like this to make a Csycryl Ingot:
# # #
# # #
then use the ingots to make a pickaxe. it will take:
9 ores to make a pickaxe
9 ores to make an axe
6 ores to make a hoe
6 ores to make a sword
3 ores to make a spade/shovel
public static Item CsycrylChunk = (new Item(261)).setIconCoord(0, 10).setItemName("csycrylMetalChunk");
public static Item CsycrylGem = (new Item(262)).setIconCoord(1, 10).setItemName("csycrylGem");
public static Item CsycrylIngot = (new Item(263)).setIconCoord(2, 10).setItemName("csycrylIngot");
is there anything else I need? because it just doesn't find the item somehow, it keeps getting null.
If you run it in the MCP test version you can get a stack trace from the crash. Just run startclient.bat in your MCP folder and send me that stack trace.
By the way, I like that you figure things out on your own. That's how I had to learn most of the things I know :smile.gif:
the stack trace has no help, it deals with the RenderItem.doRender(), but I'll post it anyways, I'm just wondering why my items is considered null.
Ingame crash report:
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem.
If you wish to report this, please copy this entire text and email it to [email protected].
Please include a description of what you did when the error occured.
--- BEGIN ERROR REPORT a1dce528 --------
Generated 7/5/11 1:18 PM
Minecraft: Minecraft Beta 1.6.6
OS: Windows Vista (x86) version 6.0
Java: 1.6.0_24, Sun Microsystems Inc.
VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: Mobile Intel(R) 4 Series Express Chipset Family version 2.1.0 - Build 8.15.10.2302, Intel
java.lang.NullPointerException
at net.minecraft.src.ItemStack.getIconIndex(ItemStack.java:72)
at net.minecraft.src.RenderItem.doRenderItem(RenderItem.java:77)
at net.minecraft.src.RenderItem.doRender(RenderItem.java:240)
at net.minecraft.src.RenderManager.renderEntityWithPosYaw(RenderManager.java:133)
at net.minecraft.src.RenderManager.renderEntity(RenderManager.java:124)
at net.minecraft.src.RenderGlobal.renderEntities(RenderGlobal.java:307)
at net.minecraft.src.EntityRenderer.renderWorld(EntityRenderer.java:567)
at net.minecraft.src.EntityRenderer.updateCameraAndRender(EntityRenderer.java:427)
at net.minecraft.client.Minecraft.run(Minecraft.java:514)
at java.lang.Thread.run(Thread.java:662)
--- END ERROR REPORT 48890f35 ----------
Console:
== MCP v4.1 ==
[13:17] 16 achievements
[13:17] 155 recipes
[13:17] Loading: net.java.games.input.DirectAndRawInputEnvironmentPlugin
[13:17]
[13:17] Starting up SoundSystem...
[13:17] Initializing LWJGL OpenAL
[13:17] (The LWJGL binding of OpenAL. For more information, see http://www.lwjg
l.org)
[13:18] OpenAL initialized.
[13:18]
[13:18] java.lang.NullPointerException
[13:18] at net.minecraft.src.ItemStack.getIconIndex(ItemStack.java:72)
[13:18] at net.minecraft.src.RenderItem.doRenderItem(RenderItem.java:77)
[13:18] at net.minecraft.src.RenderItem.doRender(RenderItem.java:240)
[13:18] at net.minecraft.src.RenderManager.renderEntityWithPosYaw(RenderManager.
java:133)
[13:18] at net.minecraft.src.RenderManager.renderEntity(RenderManager.java:124)
[13:18] at net.minecraft.src.RenderGlobal.renderEntities(RenderGlobal.java:307)
[13:18] at net.minecraft.src.EntityRenderer.renderWorld(EntityRenderer.java:567)
[13:18] at net.minecraft.src.EntityRenderer.updateCameraAndRender(EntityRenderer
.java:427)
[13:18] at net.minecraft.client.Minecraft.run(Minecraft.java:514)
[13:18] at java.lang.Thread.run(Thread.java:662)
[13:18] Stopping!
[13:18]
[13:18] SoundSystem shutting down...
[13:18] Author: Paul Lamb, www.paulscode.com
[13:18]
A NullPointerException can be a pain to work around. I'll look at it more later, but for now can I see the rest of the code? I feel like there's something missing.
I'll pm you a zip file with all of the code if you want, but I don't want it to take up space in the thread. Thanks for your help. Awaiting your reply.
No, I should have known that a 1.6.6 program wouldn't have worked with 1.7.2 files. I just assumed it would work fine with everything except pistons and shears and other items implemented in 1.7.2. Oh well, MCP will update eventually! :3
you'd have to look into how other events are done. take a look for example at the player classes to find out how they movve, if you can't figure it out then just add another if statment for whatever key you want.
I have a quick question: how can you link a certain event with a button? (For example, if I press "X", then "Y" will occur.)
Well, if I recall correctly keybindings are in GameSettings.java. Have a look around there if you want.
If not, you just do what DreadKyller said, EntityPlayer.java will teach you a lot if you read and pay attention.
GameSettings holds the info for the keys, but does nothing about actually applying them, no where in GameSettings does it have anything of the type like onKeyPress() or to deal with calling events. Finding the script that calls the EntityPlayer's key sensing event and then making it call another void you make in some class of yours and have that handle the keypress based on the key code. For more info on keys and what each int stands for look up ASII Key Values, which is basically a list of keys and what key is what number, for example Space is 32, which is the one most people know.
Like I said, that's what I remembered, I really haven't messed with any base classes in a couple of months. I'm not sure what he's trying to do, so I just threw that out there. Either way, the best approach when trying something new that is advanced, is looking around and immersing yourself in the code.
But anyway, thanks Dread, you just now inadvertently gave me some ideas! and also for explaining what python is, in a different thread....
http://s1204.photobucket.com/albums/bb401/3DreadKyller/?action=view¤t=2011-07-04_151353.png
http://s1204.photobucket.com/albums/bb401/3DreadKyller/?action=view¤t=2011-07-04_151405.png
http://s1204.photobucket.com/albums/bb401/3DreadKyller/?action=view¤t=2011-07-04_151844.png
http://s1204.photobucket.com/albums/bb401/3DreadKyller/?action=view¤t=2011-07-04_152155.png
Same here, not sure what's wrong.
Could you expand that list for me? Just click the plus sign and send me a screen.
Awesome, glad I could help.
Did you decompile using the current version of MCP? MCP only works for the version it is made for. MCP 4.1 is made for 1.6.6, so it will only work for 1.6.6. If you use it for 1.7 it will mix up obfuscated names and everything will be wrong. Sorry for the confusion, I'll fix it now.
No, I should have known that a 1.6.6 program wouldn't have worked with 1.7.2 files. I just assumed it would work fine with everything except pistons and shears and other items implemented in 1.7.2. Oh well, MCP will update eventually! :3
The process for my ore:
Break ore with ironPickaxe+ and get a Csycryl Chunk of metal
Put the Csycryl Chunk in a furnace and you'll get 2 Csycrly Gems, put 6 gems in a crafting table like this to make a Csycryl Ingot:
# # #
# # #
then use the ingots to make a pickaxe. it will take:
9 ores to make a pickaxe
9 ores to make an axe
6 ores to make a hoe
6 ores to make a sword
3 ores to make a spade/shovel
here is the code I added into the BlockOre.java:
here is the code I added into Item.java:
is there anything else I need? because it just doesn't find the item somehow, it keeps getting null.
If you run it in the MCP test version you can get a stack trace from the crash. Just run startclient.bat in your MCP folder and send me that stack trace.
By the way, I like that you figure things out on your own. That's how I had to learn most of the things I know :smile.gif:
Ingame crash report:
Console:
so it tried to render it as a block as ID of -5 because I accidentally put a minus sign. It's working now...
I give you three diamonds and a Notch:
No, I can't stop there...
And it has!
Well, if I recall correctly keybindings are in GameSettings.java. Have a look around there if you want.
If not, you just do what DreadKyller said, EntityPlayer.java will teach you a lot if you read and pay attention.
But anyway, thanks Dread, you just now inadvertently gave me some ideas! and also for explaining what python is, in a different thread....