Ok so in Eclipse, ive made my first block and throughout the enitre mod there are no errors,however, when i go to run it this keeps popping up:
java.lang.IllegalArgumentException: Illegal object for naming null
at cpw.mods.fml.client.FMLClientHandler.getObjectName(FMLClientHandler.java:817)
at cpw.mods.fml.common.FMLCommonHandler.addNameForObject(FMLCommonHandler.java:469)
at net.minecraft.src.ModLoader.addName(ModLoader.java:142)
at net.minecraft.src.ModLoader.addName(ModLoader.java:130)
at net.minecraft.src.tutorial.mod_mymod.addNames(mod_mymod.java:33)
at net.minecraft.src.tutorial.mod_mymod.load(mod_mymod.java:21)
at cpw.mods.fml.common.modloader.ModLoaderModContainer.init(ModLoaderModContainer.java:356)
at cpw.mods.fml.common.Loader.modInit(Loader.java:273)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:628)
at cpw.mods.fml.client.FMLClientHandler.onLoadComplete(FMLClientHandler.java:223)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:429)
at net.minecraft.client.Minecraft.run(Minecraft.java:738)
at java.lang.Thread.run(Thread.java:680)
Also heres both my codes if it helps:
mod_mymod:
package net.minecraft.src.tutorial;
import net.minecraft.src.BaseMod;
import net.minecraft.src.Block;
import net.minecraft.src.ModLoader;
public class mod_mymod extends BaseMod {
public static Block blockRavireBlock;
@Override
public String getVersion() {
return null;
}
@Override
public void load() {
this.registerBlocks();
this.addNames();
}
private void registerBlocks() {
ModLoader.registerBlock(blockRavireBlock);
}
private void addNames(){
ModLoader.addName(blockRavireBlock, "Ravire Block");
} }
The actual Block class:
package net.minecraft.src.tutorial;
import net.minecraft.src.Block;
import net.minecraft.src.Material;
import net.minecraft.src.StepSound;
import net.minecraft.src.forge.ITextureProvider;
public class blockRavireBlock extends Block implements ITextureProvider {
protected blockRavireBlock(int blockID, int textureID) {
super(blockID, textureID, Material.wood);
setHardness(3.1F);
setResistance(0.3F);
setLightValue(10);
setStepSound(soundWoodFootstep);
}
@Override
public String getTextureFile(){
return "Ravire.png";
}
}
Yup thats all of it.