Hey, I just made a custom block, and whenever I try to place it or break it I get an error report. If anyone knows why this is I would love to know. Thanks. Here's the error report.
java.lang.NullPointerException
at net.minecraft.src.RenderGlobal.playAuxSFX(RenderGlobal.java:2457)
at net.minecraft.src.World.playAuxSFXAtEntity(World.java:4530)
at net.minecraft.src.World.playAuxSFX(World.java:4520)
at net.minecraft.src.PlayerController.onPlayerDestroyBlock(PlayerController.java:42)
at net.minecraft.src.PlayerControllerCreative.clickBlockCreative(PlayerControllerCreative.java:58)
at net.minecraft.src.PlayerControllerCreative.clickBlock(PlayerControllerCreative.java:94)
at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1404)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1832)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:870)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Thread.java:680)
--- END ERROR REPORT fa00a068 ----------
Hey, I just made a custom block, and whenever I try to place it or break it I get an error report. If anyone knows why this is I would love to know. Thanks. Here's the error report.
java.lang.NullPointerException
at net.minecraft.src.RenderGlobal.playAuxSFX(RenderGlobal.java:2457)
at net.minecraft.src.World.playAuxSFXAtEntity(World.java:4530)
at net.minecraft.src.World.playAuxSFX(World.java:4520)
at net.minecraft.src.PlayerController.onPlayerDestroyBlock(PlayerController.java:42)
at net.minecraft.src.PlayerControllerCreative.clickBlockCreative(PlayerControllerCreative.java:58)
at net.minecraft.src.PlayerControllerCreative.clickBlock(PlayerControllerCreative.java:94)
at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1404)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1832)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:870)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Thread.java:680)
--- END ERROR REPORT fa00a068 ----------
Hmm...
What sound is the block supposed to make when you break it?
--- BEGIN ERROR REPORT e5b153f1 --------
Generated 4/25/12 8:04 PM
Minecraft: Minecraft 1.2.5
OS: Windows Vista (amd64) version 6.0
Java: 1.6.0_31, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce 9600M GT/PCI/SSE2 version 3.1 NVIDIA 187.66, NVIDIA Corporation
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
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:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalArgumentException: Slot 180 is already occupied by net.minecraft.src.BlockBrokenTakino@1ce3570c when adding net.minecraft.src.BlockTakino@1167e3a5
at net.minecraft.src.Block.<init>(Block.java:232)
at net.minecraft.src.Block.<init>(Block.java:267)
at net.minecraft.src.BlockTakino.<init>(BlockTakino.java:11)
at net.minecraft.src.mod_Takino.<clinit>(mod_Takino.java:7)
... 15 more
--- END ERROR REPORT e25c05de ----------
--- BEGIN ERROR REPORT e5b153f1 --------
Generated 4/25/12 8:04 PM
Minecraft: Minecraft 1.2.5
OS: Windows Vista (amd64) version 6.0
Java: 1.6.0_31, Sun Microsystems Inc.
VM: Java HotSpot™ 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce 9600M GT/PCI/SSE2 version 3.1 NVIDIA 187.66, NVIDIA Corporation
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
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:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalArgumentException: Slot 180 is already occupied by net.minecraft.src.BlockBrokenTakino@1ce3570c when adding net.minecraft.src.BlockTakino@1167e3a5
at net.minecraft.src.Block.<init>(Block.java:232)
at net.minecraft.src.Block.<init>(Block.java:267)
at net.minecraft.src.BlockTakino.<init>(BlockTakino.java:11)
at net.minecraft.src.mod_Takino.<clinit>(mod_Takino.java:7)
... 15 more
--- END ERROR REPORT e25c05de ----------
Does one of your blocks have ID 180? If so, change it.
public static final Block RedstoneBlock = new BlockRedstoneBlock(200, 144).setHardness(4F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("Redstone Block");
public static final Block RedstoneBlock = new BlockRedstoneBlock(200, 144).setHardness(4F).setResistance(5F).setStepSound(soundStoneFootstep).setBlockName("Redstone Block");
I took out the sound and it worked fine. how should i add the sound in though? everytime i type .setStepSound(soundStoneFootstep) it marks it as an error and tells me to create field soundStoneFootstep. Any ideas?
I also am wondering if anyone knows how to use different colors of wool to make different things.
i.e. if i were to use orange wool and wood to make an orange bed. how would I make it just orange wool not any other color wool.
I took out the sound and it worked fine. how should i add the sound in though? everytime i type .setStepSound(soundStoneFootstep) it marks it as an error and tells me to create field soundStoneFootstep. Any ideas?
I followed your tutorial on adding blocks into the creative Gui, but it isn't working for me.
package net.minecraft.src;
import java.util.List;
import java.util.Random;
import net.minecraft.client.Minecraft;
public class mod_PeacefulPack extends BaseMod
{
//block config
@MLProp public static int SulphuroreID = 203;
@MLProp public static int NiteroreID = 204;
@MLProp public static int FlaxID = 205;
@MLProp public static int FossilID = 206;
@MLProp public static int SlimeslabID = 207;
@MLProp public static int RottenPlantID = 208;
//item config
@MLProp public static int SulphurCrystalID = 506;
@MLProp public static int NiterCrystalID = 507;
@MLProp public static int FlaxFibreID = 508;
@MLProp public static int ClothID = 509;
@MLProp public static int FlaxSeedID = 510;
@MLProp public static int CookedfleshID = 511;
@MLProp public static int ChainID = 512;
@MLProp public static int RottenPlantSeedID = 513;
//block settings
public static Block sulphBlock;
public static Block niterBlock;
public static Block flax;
public static Block fossil;
public static Block slimeslab;
public static Block rottenplant;
//item settings
public static Item sulphDust;
public static Item niterDust;
public static Item flaxfibre;
public static Item cloth;
public static Item flaxseed;
public static Item cookedflesh;
public static Item chain;
public static Item rottenseed;
//flax planten
public static int flax1 = ModLoader.addOverride("/terrain.png", "/Flax/flower1.png");
public static int flax2 = ModLoader.addOverride("/terrain.png", "/Flax/flower2.png");
public static int rottenplant1 = ModLoader.addOverride("/terrain.png", "/Rottenplant/plant1.png");
private boolean addBlocks;
public void load()
{
//blocks
sulphBlock = new Blocksulphur(SulphuroreID, 0).setHardness(3F).setResistance(1.0F).setBlockName("sulphBlock");
niterBlock = new Blockniter(NiteroreID, 0).setHardness(3F).setResistance(1.0F).setBlockName("niterBlock");
flax = new Blockflax(FlaxID, 0).setHardness(0.0F).setBlockName("flax").disableStats().setRequiresSelfNotify();
fossil = new Blockfossil(FossilID, 0).setHardness(3F).setResistance(1.0F).setBlockName("fossil");
slimeslab = new Blockslime(SlimeslabID, 0).setHardness(1F).setLightValue(0.5F).setResistance(1.0F).setBlockName("slimeslab");
rottenplant = new Blockrottenplant(RottenPlantID, 0).setHardness(0.0F).setBlockName("rottenplant").disableStats().setRequiresSelfNotify();
//items
sulphDust = new ItemsulphDust(SulphurCrystalID).setItemName("sulphdust");
niterDust = new ItemniterDust(NiterCrystalID).setItemName("niterdust");
flaxfibre = new Itemflaxfibre(FlaxFibreID).setItemName("flaxfibre");
cloth = new Itemclothmod(ClothID).setItemName("cloth");
flaxseed = new Itemflaxseed(FlaxSeedID, flax.blockID, Block.grass.blockID).setItemName("flaxseed");
cookedflesh = new ItemFood(CookedfleshID, 5, true).setItemName("cookedflesh");
chain = new ItemChain(ChainID).setItemName("chain");
rottenseed = new Itemrottenseed(RottenPlantSeedID, rottenplant.blockID, Block.stone.blockID).setItemName("rottenseed");
//blocks
ModLoader.addName(sulphBlock, "Sulphur Ore");
ModLoader.registerBlock(sulphBlock);
sulphBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Sulphur/sulphurblock.png");
ModLoader.addName(niterBlock, "Niter Ore");
ModLoader.registerBlock(niterBlock);
niterBlock.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Sulphur/niterblock.png");
ModLoader.addName(flax, "Flax");
ModLoader.registerBlock(flax);
flax.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Flax/flower0.png");
flax1 = ModLoader.addOverride("/terrain.png", "/Flax/flower1.png");
flax2 = ModLoader.addOverride("/terrain.png", "/Flax/flower2.png");
ModLoader.addName(fossil, "Fossil");
ModLoader.registerBlock(fossil);
fossil.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/fossil/fossil3.png");
ModLoader.addName(slimeslab, "Goo");
ModLoader.registerBlock(slimeslab);
slimeslab.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/slime/slime.png");
ModLoader.addName(rottenplant, "Rotten Plant");
ModLoader.registerBlock(rottenplant);
rottenplant.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Rottenplant/plant0.png");
rottenplant1 = ModLoader.addOverride("/terrain.png", "/Rottenplant/plant1.png");
//items
ModLoader.addName(sulphDust, "Sulphur Crystal");
sulphDust.iconIndex = ModLoader.addOverride("/gui/items.png", "/Sulphur/sulphurdust.png");
ModLoader.addName(niterDust, "Niter Crystal");
niterDust.iconIndex = ModLoader.addOverride("/gui/items.png", "/Sulphur/niterdust.png");
ModLoader.addName(flaxfibre, "Flax Fibre");
flaxfibre.iconIndex = ModLoader.addOverride("/gui/items.png", "/Flax/fibre.png");
ModLoader.addName(cloth, "Cloth");
cloth.iconIndex = ModLoader.addOverride("/gui/items.png", "/Flax/cloth.png");
ModLoader.addName(flaxseed, "Flax Seed");
flaxseed.iconIndex = ModLoader.addOverride("/gui/items.png", "/Flax/seed.png");
ModLoader.addName(cookedflesh, "Cooked flesh");
cookedflesh.iconIndex = ModLoader.addOverride("/gui/items.png", "/Rottenplant/cookedflesh.png");
ModLoader.addSmelting(Item.rottenFlesh.shiftedIndex, new ItemStack(cookedflesh, 1));
ModLoader.addName(chain, "Chain Material");
chain.iconIndex = ModLoader.addOverride("/gui/items.png", "/new/chain.png");
ModLoader.addName(rottenseed, "Rotten Seed");
rottenseed.iconIndex = ModLoader.addOverride("/gui/items.png", "/Rottenplant/seeds.png");
//some recipes here
}
public mod_PeacefulPack()
{
ModLoader.setInGUIHook(this, true, true);
ModLoader.setInGameHook(this, true, true);
}
public String getVersion() {return "1.2.3";}
public boolean onTickInGame(float f, Minecraft minecraft)
{
if(minecraft.currentScreen == null)
{
addBlocks = false;
}
return true;
}
public boolean onTickInGUI(float f, Minecraft minecraft, GuiScreen screen)
{
if(screen instanceof GuiContainerCreative)
{
if(addBlocks = false)
{
Container container = ((GuiContainer)screen).inventorySlots;
List list = ((ContainerCreative)container).itemList;
list.add(new ItemStack(sulphBlock));
list.add(new ItemStack(niterBlock));
list.add(new ItemStack(flax));
list.add(new ItemStack(fossil));
list.add(new ItemStack(slimeslab));
list.add(new ItemStack(rottenplant));
}
addBlocks = true;
}
return true;
}
}
//generation and fuel code here
It doesn't crash, but it also doens't add them to the GUI. Any help?
I didn't see a reply to this or anything in the OP about it. But, I am having the same problem. Followed the video tutorial on adding blocks to the creative menu (including someone else's for comparison which also shows the exact same thing).
For some odd reason, they're just not showing up in the creative menu for me.
Did you ever find a solution for this?
I know that the video showed x2robbie2x using Minecraft 1.2.4 at the time. Is there anything that might have changed going to 1.2.5? I'm glad I'm not the only one having the problem.
Finally figured out my issue. Not the same issue as for wuppy21.
I was accidentally using an uppercase letter 'O' for the first letter of onTickInGame and onTickInGUI. LOL!
OK, I think I just noticed your problem, the following line...
WorldGenCocoaBeanTree = tree = new WorldGenCocoaBeanTree();
...should be...
WorldGenCocoaBeanTree tree = new WorldGenCocoaBeanTree();
I THINK anyway as I'm on my iPod not my craptop, I'll check it in the morning for you, you basically put in an additional = sign while basically saying in the code "WorldGenCocoaBeanTree AKA tree is a new WorldGenCocoaBeanTree"
Hope that Is easy enough to understand Hope it helps, if there is still anything you need help with, such as a properties file (hint hint) message me
I see you offered to help someone with making a properties file. Anyway, I could use some help making one and I was wondering if you could help me. I have tried a number of tutorials, but none have worked yet. Some seem like they might be outdated. Please help me if you can, I just want to make it possible to change the IDs of the items in my mod. Thanks.
--- BEGIN ERROR REPORT e5b153f1 --------
Generated 4/27/12 6:56 PM
Minecraft: Minecraft 1.2.5
OS: Windows Vista (amd64) version 6.0
Java: 1.6.0_31, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce 9600M GT/PCI/SSE2 version 3.1 NVIDIA 187.66, NVIDIA Corporation
java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.src.mod_Takino
at net.minecraft.src.mod_TakinoCrossbow.<init>(mod_TakinoCrossbow.java:13)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
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:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:662)
--- END ERROR REPORT 49a98294 ----------
--- BEGIN ERROR REPORT e5b153f1 --------
Generated 4/27/12 6:56 PM
Minecraft: Minecraft 1.2.5
OS: Windows Vista (amd64) version 6.0
Java: 1.6.0_31, Sun Microsystems Inc.
VM: Java HotSpot™ 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce 9600M GT/PCI/SSE2 version 3.1 NVIDIA 187.66, NVIDIA Corporation
java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.src.mod_Takino
at net.minecraft.src.mod_TakinoCrossbow.<init>(mod_TakinoCrossbow.java:13)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
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:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:662)
--- END ERROR REPORT 49a98294 ----------
It looks like you forgot some major constructor or definer in your mod class. Check it to see if all the basics are there.
I see you offered to help someone with making a properties file. Anyway, I could use some help making one and I was wondering if you could help me. I have tried a number of tutorials, but none have worked yet. Some seem like they might be outdated. Please help me if you can, I just want to make it possible to change the IDs of the items in my mod. Thanks.
I may be able to help,
1. Go to Risugami's mods, and under the ModLoader section there is a decompile fix download. Just download it.
2. Go to you MCP and go to src/minecraft/net/minecraft/src and drag the MLProp.java into the folder and replace it.
3. Restart eclipse, (assuming that is the program you are using), and go into your mod_ class.
4. Outside of you public void load method, write, for example,
@MLProp public static int newOreID = 145;
(You can make "newOreID" and the number whatever you would like.)
5. Then, inside of, for example,
final Block NewOre = (new BlockNewOre(145, 0)).setHardness(1.5F).setResistance(10F).setStepSound(Block.soundStoneFootstep).setBlockName("newOre");
Instead of a number as the ID, make it your, newOreID, or whatever you named that integer.
6. Recompile, and reobfuscate your mod, put the contents into your jar and run Minecraft.
7. Exit minecraft and in the .minecraft/config folder there should be a new configuration file for your mod.
Now you can open it up in notepad or some other text editor and change the ID of your blocks and/or items!
1. Go to Risugami's mods, and under the ModLoader section there is a decompile fix download. Just download it.
2. Go to you MCP and go to src/minecraft/net/minecraft/src and drag the MLProp.java into the folder and replace it.
3. Restart eclipse, (assuming that is the program you are using), and go into your mod_ class.
4. Outside of you public void load method, write, for example,
@MLProp public static int newOreID = 145;
(You can make "newOreID" and the number whatever you would like.)
5. Then, inside of, for example,
final Block NewOre = (new BlockNewOre(145, 0)).setHardness(1.5F).setResistance(10F).setStepSound(Block.soundStoneFootstep).setBlockName("newOre");
Instead of a number as the ID, make it your, newOreID, or whatever you named that integer.
6. Recompile, and reobfuscate your mod, put the contents into your jar and run Minecraft.
7. Exit minecraft and in the .minecraft/config folder there should be a new configuration file for your mod.
Now you can open it up in notepad or some other text editor and change the ID of your blocks and/or items!
Thank you so much! I got it to work. That was the most helpful thing I have ever read(for the problem I had). Diamond Pants for you!
I don't know for sure, but BaseMod has the following lines that you could make use of:
public boolean dispenseEntity(World world, double d, double d1, double d2, int i, int j, ItemStack itemstack)
{
return false;
}
I have a tutorial on a solar panel, which has a timer and checks to see if there is sunlight depending on how often you set it. You could use the code for the timing along with the dispense method to have a set timer dispense an item whenever you set it.
at net.minecraft.src.RenderGlobal.playAuxSFX(RenderGlobal.java:2457)
at net.minecraft.src.World.playAuxSFXAtEntity(World.java:4530)
at net.minecraft.src.World.playAuxSFX(World.java:4520)
at net.minecraft.src.PlayerController.onPlayerDestroyBlock(PlayerController.java:42)
at net.minecraft.src.PlayerControllerCreative.clickBlockCreative(PlayerControllerCreative.java:58)
at net.minecraft.src.PlayerControllerCreative.clickBlock(PlayerControllerCreative.java:94)
at net.minecraft.client.Minecraft.clickMouse(Minecraft.java:1404)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:1832)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:870)
at net.minecraft.client.Minecraft.run(Minecraft.java:801)
at java.lang.Thread.run(Thread.java:680)
--- END ERROR REPORT fa00a068 ----------
Hmm...
What sound is the block supposed to make when you break it?
Generated 4/25/12 8:04 PM
Minecraft: Minecraft 1.2.5
OS: Windows Vista (amd64) version 6.0
Java: 1.6.0_31, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce 9600M GT/PCI/SSE2 version 3.1 NVIDIA 187.66, NVIDIA Corporation
java.lang.ExceptionInInitializerError
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
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:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.IllegalArgumentException: Slot 180 is already occupied by net.minecraft.src.BlockBrokenTakino@1ce3570c when adding net.minecraft.src.BlockTakino@1167e3a5
at net.minecraft.src.Block.<init>(Block.java:232)
at net.minecraft.src.Block.<init>(Block.java:267)
at net.minecraft.src.BlockTakino.<init>(BlockTakino.java:11)
at net.minecraft.src.mod_Takino.<clinit>(mod_Takino.java:7)
... 15 more
--- END ERROR REPORT e25c05de ----------
Does one of your blocks have ID 180? If so, change it.
Its just supposed to make the stone sound
here's my declaration
I took out the sound and it worked fine. how should i add the sound in though? everytime i type .setStepSound(soundStoneFootstep) it marks it as an error and tells me to create field soundStoneFootstep. Any ideas?
i.e. if i were to use orange wool and wood to make an orange bed. how would I make it just orange wool not any other color wool.
Thanks for any help.
I think it has something to do with the material.
Finally figured out my issue. Not the same issue as for wuppy21.
I was accidentally using an uppercase letter 'O' for the first letter of onTickInGame and onTickInGUI. LOL!
Ya i don't know about that one. Do you have any idea about the wool thing?
I don't see any tutorials remotely similar to this, so do you think you could do something like this?
I see you offered to help someone with making a properties file. Anyway, I could use some help making one and I was wondering if you could help me. I have tried a number of tutorials, but none have worked yet. Some seem like they might be outdated. Please help me if you can, I just want to make it possible to change the IDs of the items in my mod. Thanks.
Generated 4/27/12 6:56 PM
Minecraft: Minecraft 1.2.5
OS: Windows Vista (amd64) version 6.0
Java: 1.6.0_31, Sun Microsystems Inc.
VM: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Sun Microsystems Inc.
LWJGL: 2.4.2
OpenGL: GeForce 9600M GT/PCI/SSE2 version 3.1 NVIDIA 187.66, NVIDIA Corporation
java.lang.NoClassDefFoundError: Could not initialize class net.minecraft.src.mod_Takino
at net.minecraft.src.mod_TakinoCrossbow.<init>(mod_TakinoCrossbow.java:13)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.Class.newInstance0(Class.java:355)
at java.lang.Class.newInstance(Class.java:308)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:287)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1279)
at net.minecraft.src.ModLoader.init(ModLoader.java:849)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:157)
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:424)
at net.minecraft.client.Minecraft.run(Minecraft.java:786)
at java.lang.Thread.run(Thread.java:662)
--- END ERROR REPORT 49a98294 ----------
It looks like you forgot some major constructor or definer in your mod class. Check it to see if all the basics are there.
I may be able to help,
1. Go to Risugami's mods, and under the ModLoader section there is a decompile fix download. Just download it.
2. Go to you MCP and go to src/minecraft/net/minecraft/src and drag the MLProp.java into the folder and replace it.
3. Restart eclipse, (assuming that is the program you are using), and go into your mod_ class.
4. Outside of you public void load method, write, for example, (You can make "newOreID" and the number whatever you would like.)
5. Then, inside of, for example, Instead of a number as the ID, make it your, newOreID, or whatever you named that integer.
6. Recompile, and reobfuscate your mod, put the contents into your jar and run Minecraft.
7. Exit minecraft and in the .minecraft/config folder there should be a new configuration file for your mod.
Now you can open it up in notepad or some other text editor and change the ID of your blocks and/or items!
Thank you so much! I got it to work. That was the most helpful thing I have ever read(for the problem I had). Diamond Pants for you!
No problem!
I don't know for sure, but BaseMod has the following lines that you could make use of:
I like to play FTB with some additions. Also custom modsets are awesome!
I have a tutorial on a solar panel, which has a timer and checks to see if there is sunlight depending on how often you set it. You could use the code for the timing along with the dispense method to have a set timer dispense an item whenever you set it.