Do you have a block with an ID greater than 256 or 4096? It looks like you have something at ID 19000 or 18744(Not sure if its pre or post offset calculation). Check your block IDs and ensure they are in the proper range
Okay Thanks yeah I did have a block at 19000 to make sure it did not get in the way my other mods that I have installed so thanks
- Tutorials are officially on hold, on account of 1.5 coming soon
- I'm currently working with the 1.5 pre-release to figure stuff out
- No more sprite sheets, items and blocks have individual textures, so no more preloading!
- FML now has 'runtime reobfuscation', guess what this means? You don't need to manually update your mod after 1.5, forge does it for you!
- I will probably rewrite the tutorials for 1.5, I've learned a lot since before, and frankly I find the old ones horrible xD
Well, just put my mod into 1.5, and i get a whopping 100 errors. setItemName and getTextureFile is all messed up, and there is no fix to it. What do i do?
Rollback Post to RevisionRollBack
“Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.”-Albert Einstein [SSSS]
Well, just put my mod into 1.5, and i get a whopping 100 errors. setItemName and getTextureFile is all messed up, and there is no fix to it. What do i do?
use setUnlocalizedName in place of setItemName. I cant help with getTextureFile yet as I havent figured that part out, but I suggest looking at the Iron Chests code on github, it already employs the new texture scheme.
1.5 is turning out to be a nightmare for my mod. I don't know what was the problem with using sprite sheets. Is there some advantage to not using sprites? I get you don't have to pre-load the textures but was that really such a big deal? I hope it doesn't take too long to figure out what needs to be changed. Seems like most of the larger mods were already ready for the new version. Any tips you can give us for getting existing mods converted to 1.5? I realize it will probably be a while before you get to re-write the tutorials as you said in your previous post. Thanks again for your help & for the very helpful tutorials.
Well, just put my mod into 1.5, and i get a whopping 100 errors. setItemName and getTextureFile is all messed up, and there is no fix to it. What do i do?
1.5 is turning out to be a nightmare for my mod. I don't know what was the problem with using sprite sheets. Is there some advantage to not using sprites? I get you don't have to pre-load the textures but was that really such a big deal? I hope it doesn't take too long to figure out what needs to be changed. Seems like most of the larger mods were already ready for the new version. Any tips you can give us for getting existing mods converted to 1.5? I realize it will probably be a while before you get to re-write the tutorials as you said in your previous post. Thanks again for your help & for the very helpful tutorials.
This change was made by Mojang, they did it to make the mod API, because the way it would've had to work i adding textures to the vanilla spritesheet
Also, can't give much in the way of tips, because I'm still trying to figure stuff out myself xD
Lol well thanks anyway, but don't sell yourself short. You did have some useful tips via the post above with the link to some VERY helpful information!! Thanks for that link!! Now, I've got my mod somewhat functional again (will be good as soon as I finish with the code changes) You should most certainly put a link to that on the top of your post as it can save people a lot of work until the next MCP comes out. According to that link all the functions with the odd alpha numeric names will be renamed in the next version of MCP. Hopefully that will make your life easier as well
Edit: got everything working again in my mod and it sure took forever but it was worth it.
I'm having a problem with adding items. When I add the code to add the names, proxy.addNames(); in my main mod class, I get null pointer exceptions when i try to run it. I'm initializing proxy as
public static CommonProxy proxy = new CommonProxy();
and add names is defined as
public void addNames(){
LanguageRegistry.addName(MoonModMain.skygem, "Skygem");
}
in my CommonProxy class.
Any help would be great, thanks.
I'm having a problem with adding items. When I add the code to add the names, proxy.addNames(); in my main mod class, I get null pointer exceptions when i try to run it. I'm initializing proxy as
public static CommonProxy proxy = new CommonProxy();
and add names is defined as
public void addNames(){
LanguageRegistry.addName(MoonModMain.skygem, "Skygem");
}
in my CommonProxy class.
Any help would be great, thanks.
I need some more info, ie the crash log and mod class
I'm having a different problem now.
I fixed the blackscreen and null pointer exception, but the item doesn't appear in the creative tabs when i start the game.
@NetworkMod(clientSideRequired=true,serverSideRequired=false, //Whether client side and server side are needed
clientPacketHandlerSpec = @SidedPacketHandler(channels = {"TutorialGeneral" }, packetHandler = ClientPacketHandler.class), //For clientside packet handling
serverPacketHandlerSpec = @SidedPacketHandler(channels = {}, packetHandler = ServerPacketHandler.class)) //For serverside packet handling
@Mod(modid="Moon Mod",name="Moon Mod",version="1.0") //Gives Forge extra info about your mod
public class MoonModMain //The class file
{
public static Item skygem = new Item(1000).setUnlocalizedName("MoonMod:skygem");
@Instance("MyMoonMod") //The instance, this is very important later on
public static MoonModMain instance = new MoonModMain();
@SidedProxy(clientSide = "razMod.client.core.ClientProxy", serverSide = "razMod.common.core.CommonProxy") //Tells Forge the location of your proxies
public static CommonProxy proxy;
@Init
public void Init(FMLInitializationEvent event) //Your main initialization method
{
NetworkRegistry.instance().registerGuiHandler(this, proxy); //Registers the class that deals with GUI data
LanguageRegistry.addName(MoonModMain.skygem, "Skygem");
proxy.addNames();
}
}
there is the main mod class.
here is the item class
public class ItemSkygem extends Item {
public ItemSkygem(int par1) {
super(par1); //Returns super constructor: par1 is ID
//setUnlocalizedName("MoonMod:Skygem");
setCreativeTab(CreativeTabs.tabMaterials); //Tells the game what creative mode tab it goes in
}
//@Override
//public void func_94581_a(IconRegister iconRegister)
//{
// iconIndex = iconRegister.func_94245_a("MoonMod:Skygem");
//}
@SideOnly(Side.CLIENT) //Marks a method as client side only, typically for graphics and rendering
public int getItemIconFromDamage(int i){
return 0; //The first icon on the spritesheet
}
}
I'm having a different problem now.
I fixed the blackscreen and null pointer exception, but the item doesn't appear in the creative tabs when i start the game.
@NetworkMod(clientSideRequired=true,serverSideRequired=false, //Whether client side and server side are needed
clientPacketHandlerSpec = @SidedPacketHandler(channels = {"TutorialGeneral" }, packetHandler = ClientPacketHandler.class), //For clientside packet handling
serverPacketHandlerSpec = @SidedPacketHandler(channels = {}, packetHandler = ServerPacketHandler.class)) //For serverside packet handling
@Mod(modid="Moon Mod",name="Moon Mod",version="1.0") //Gives Forge extra info about your mod
public class MoonModMain //The class file
{
public static Item skygem = new Item(1000).setUnlocalizedName("MoonMod:skygem");
@Instance("MyMoonMod") //The instance, this is very important later on
public static MoonModMain instance = new MoonModMain();
@SidedProxy(clientSide = "razMod.client.core.ClientProxy", serverSide = "razMod.common.core.CommonProxy") //Tells Forge the location of your proxies
public static CommonProxy proxy;
@Init
public void Init(FMLInitializationEvent event) //Your main initialization method
{
NetworkRegistry.instance().registerGuiHandler(this, proxy); //Registers the class that deals with GUI data
LanguageRegistry.addName(MoonModMain.skygem, "Skygem");
proxy.addNames();
}
}
there is the main mod class.
here is the item class
public class ItemSkygem extends Item {
public ItemSkygem(int par1) {
super(par1); //Returns super constructor: par1 is ID
//setUnlocalizedName("MoonMod:Skygem");
setCreativeTab(CreativeTabs.tabMaterials); //Tells the game what creative mode tab it goes in
}
//@Override
//public void func_94581_a(IconRegister iconRegister)
//{
// iconIndex = iconRegister.func_94245_a("MoonMod:Skygem");
//}
@SideOnly(Side.CLIENT) //Marks a method as client side only, typically for graphics and rendering
public int getItemIconFromDamage(int i){
return 0; //The first icon on the spritesheet
}
}
1) Please, put it in spoilers
2) You're declaring your item as Item in the mod class, it should look like this:
public static Item skygem = new ItemSkygem(1000).setUnlocalizedName("MoonMod:skygem");
Okay Thanks yeah I did have a block at 19000 to make sure it did not get in the way my other mods that I have installed so thanks
You are welcome. The bit told me that was the issue. Hope that helps you for the future
No Problem
http://darkhaxspace.weebly.com/living-drops.html
- Tutorials are officially on hold, on account of 1.5 coming soon
- I'm currently working with the 1.5 pre-release to figure stuff out
- No more sprite sheets, items and blocks have individual textures, so no more preloading!
- FML now has 'runtime reobfuscation', guess what this means? You don't need to manually update your mod after 1.5, forge does it for you!
- I will probably rewrite the tutorials for 1.5, I've learned a lot since before, and frankly I find the old ones horrible xD
Decompiling can be tricky i've found, but if you want to see the code:
Download bearded octo nemesis, just google it, you'll find it
Download jd-gui
Set both up.
To use BON, you need: A mod zip/jar to deobfuscate
A place to store the output as .jar
A mod that you have reobfuscated
When you have that, just open the outputted jar in jd-gui
use setUnlocalizedName in place of setItemName. I cant help with getTextureFile yet as I havent figured that part out, but I suggest looking at the Iron Chests code on github, it already employs the new texture scheme.
1) You need setUnlocalizedName now
2) There's some special methods you need now, check out http://www.minecraft...block-textures/
This change was made by Mojang, they did it to make the mod API, because the way it would've had to work i adding textures to the vanilla spritesheet
Also, can't give much in the way of tips, because I'm still trying to figure stuff out myself xD
Edit: got everything working again in my mod and it sure took forever but it was worth it.
Take a look on page 38
Twitter
Blog
YouTube
Hmm, why do you need it
Any new members, PM me and I should be able to help you.
public static CommonProxy proxy = new CommonProxy();
and add names is defined as
public void addNames(){
LanguageRegistry.addName(MoonModMain.skygem, "Skygem");
}
in my CommonProxy class.
Any help would be great, thanks.
I need some more info, ie the crash log and mod class
I fixed the blackscreen and null pointer exception, but the item doesn't appear in the creative tabs when i start the game.
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler;
import cpw.mods.fml.common.SidedProxy;
import myMod.client.core.handlers.ClientPacketHandler;
import myMod.common.core.CommonProxy;
import myMod.common.core.handlers.ServerPacketHandler;
@NetworkMod(clientSideRequired=true,serverSideRequired=false, //Whether client side and server side are needed
clientPacketHandlerSpec = @SidedPacketHandler(channels = {"TutorialGeneral" }, packetHandler = ClientPacketHandler.class), //For clientside packet handling
serverPacketHandlerSpec = @SidedPacketHandler(channels = {}, packetHandler = ServerPacketHandler.class)) //For serverside packet handling
@Mod(modid="Moon Mod",name="Moon Mod",version="1.0") //Gives Forge extra info about your mod
public class MoonModMain //The class file
{
public static Item skygem = new Item(1000).setUnlocalizedName("MoonMod:skygem");
@Instance("MyMoonMod") //The instance, this is very important later on
public static MoonModMain instance = new MoonModMain();
@SidedProxy(clientSide = "razMod.client.core.ClientProxy", serverSide = "razMod.common.core.CommonProxy") //Tells Forge the location of your proxies
public static CommonProxy proxy;
@Init
public void Init(FMLInitializationEvent event) //Your main initialization method
{
NetworkRegistry.instance().registerGuiHandler(this, proxy); //Registers the class that deals with GUI data
LanguageRegistry.addName(MoonModMain.skygem, "Skygem");
proxy.addNames();
}
}
there is the main mod class.
here is the item class
package myMod.common.item;
import net.minecraft.item.Item;
import cpw.mods.fml.relauncher.*;
import myMod.MoonModMain;
import net.minecraft.creativetab.CreativeTabs;
public class ItemSkygem extends Item {
public ItemSkygem(int par1) {
super(par1); //Returns super constructor: par1 is ID
//setUnlocalizedName("MoonMod:Skygem");
setCreativeTab(CreativeTabs.tabMaterials); //Tells the game what creative mode tab it goes in
}
//@Override
//public void func_94581_a(IconRegister iconRegister)
//{
// iconIndex = iconRegister.func_94245_a("MoonMod:Skygem");
//}
@SideOnly(Side.CLIENT) //Marks a method as client side only, typically for graphics and rendering
public int getItemIconFromDamage(int i){
return 0; //The first icon on the spritesheet
}
}
1) Please, put it in spoilers
2) You're declaring your item as Item in the mod class, it should look like this:
public static Item skygem = new ItemSkygem(1000).setUnlocalizedName("MoonMod:skygem");