If you updated to 1.5 you have to use setUnlocalizedName(name), setItemName and setTextureFile are no longer used. This code snippet from my own project should help you:
its looking for textures inside mods/<modname>/textures/items or /blocks
Shoot... so if setTextureFile is no longer used is there an easy way to access the sprite sheet? Like override whatever texture is used and tell it "go to this image and use the first 16x16px"?
You should just need a for loop in your onBlockDestroyed method, not sure what to call inside of it though
Thats the bit I need. I know how to check if the neighboring blocks are the same id and meta(which is what I need), but im not sure how to tell those blocks to break. I didnt see anything in World that looked helpful, but I wonder if there is a getBlock function that returns a block I can call a damage/drop function on..? I'll keep looking, and if I figure it out I'll share my code for you if you want to add a tutorial about it or something.
-kg6jay
Shoot... so if setTextureFile is no longer used is there an easy way to access the sprite sheet? Like override whatever texture is used and tell it "go to this image and use the first 16x16px"?
There are no more sprite sheets. Each item and block gets its own png file in the appropriate folder. The name is whatever you use in the func_94245_a call after the colon, so
Thats the bit I need. I know how to check if the neighboring blocks are the same id and meta(which is what I need), but im not sure how to tell those blocks to break. I didnt see anything in World that looked helpful, but I wonder if there is a getBlock function that returns a block I can call a damage/drop function on..? I'll keep looking, and if I figure it out I'll share my code for you if you want to add a tutorial about it or something.
-kg6jay
Maybe just get block data, break it, and spawn en EntityItem with the data? Slightly inefficient but meh xD
There are no more sprite sheets. Each item and block gets its own png file in the appropriate folder. The name is whatever you use in the func_94245_a call after the colon, so
will look in "mods\resourceengineering\textures\items\" for "itemGemTurquoise.png"
Edit: Fixed odd mess of font and other random code bits that the editor put into my post..
Hmm... that went way over my head, and it really bothers me that it went over my head THAT far. Here's my code, I got an error message saying "iconRegister cannot be resolved", and I have no idea why it isn't working, and also where do the images go? Can I not locate my images file or is there a specific file location I need to go to?
package splintercell.myMod.common.item;
import net.minecraft.item.Item;
import cpw.mods.fml.relauncher.*;
import splintercell.myMod.common.mod_SplinterCell;
import net.minecraft.creativetab.CreativeTabs;
public class ItemRuby extends Item {
public ItemRuby(int par1) {
super(par1); //Returns super constructor: par1 is ID
//setTextureFile("/splintercellGFX/Items.png"); //Sets the item texture file
iconRegister.func_94245_a("splintercellGFX:rubyItem");
setUnlocalizedName("itemRuby"); //Sets the incode name of the item, make sure it doesn't clash with other items, weird stuff happens
setCreativeTab(CreativeTabs.tabMaterials); //Tells the game what creative mode tab it goes in
}
@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
}
}
And thanks for helping me with this, it means a lot, really appreciate it.
Go back and look at the code snippet I posted.
specifically this portion:
@Override
@SideOnly(Side.CLIENT)
public void func_94581_a(IconRegister iconRegister)
{
makeIcons(iconRegister);
}
public void makeIcons(IconRegister iconRegister)
{
icons = new Icon[7];
icons[0] = iconRegister.func_94245_a("resourceengineering:itemGemTurquoise");
Arg!! Okay, I'm so close (well, at least I think I'm close).
Here's my mod class
package splintercell.myMod.common; //The package your mod is in
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 splintercell.myMod.client.core.handlers.ClientPacketHandler;
import splintercell.myMod.common.core.CommonProxy;
import splintercell.myMod.common.item.ItemRuby;
@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="SplinterCell",name="SC Mod 1",version="1.0") //Gives Forge extra info about your mod
public class mod_SplinterCell { //The class file
@Instance("SplinterCell") //The instance, this is very important later on
public static mod_SplinterCell instance = new mod_SplinterCell();
public static Item ruby = new ItemRuby(31100); //The ruby object
@SidedProxy(clientSide = "splintercell.myMod.client.core.ClientProxy", serverSide = "splintercell.myMod.common.core.CommonProxy") //Tells Forge the location of your proxies
public static CommonProxy proxy;
proxy.addNames();
@Init
public void InitCobaltCraft(FMLInitializationEvent event){ //Your main initialization method
NetworkRegistry.instance().registerGuiHandler(this, proxy); //Registers the class that deals with GUI data
}
}
And then my ItemRuby.java file
package splintercell.myMod.common.item;
import net.minecraft.item.Item;
import cpw.mods.fml.relauncher.*;
import splintercell.myMod.common.mod_SplinterCell;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class ItemRuby extends Item {
public ItemRuby(int par1) {
super(par1); //Returns super constructor: par1 is ID
//setTextureFile("/splintercellGFX/Items.png"); //Sets the item texture file
//iconRegister.func_94245_a("splintercellGFX:rubyItem");
setUnlocalizedName("itemRuby"); //Sets the incode name of the item, make sure it doesn't clash with other items, weird stuff happens
setCreativeTab(CreativeTabs.tabMaterials); //Tells the game what creative mode tab it goes in
}
public void func_94581_a(IconRegister iconRegister)
{
iconIndex = iconRegister.func_94245_a("splintercellGFX:rubyItem");
}
@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
}
}
And then finally my CommonProxy.java file
package splintercell.myMod.common.core;
import splintercell.myMod.common.item.ItemRuby;
import net.minecraft.block.Block;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
public class CommonProxy implements IGuiHandler{ //THIS IS IMPORTANT, CANNOT BE A PROXY/GUI HANDLER WITHOUT THIS!!
public void registerRenderInformation() //Client side texture registering
{
}
@Override
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) { //For GUI's
return null;
}
@Override
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) //For GUI's
{
return null;
}
public void registerTiles()//For registering TileEntities
{
}
public void registerBlocks()//For registering Blocks
{
}
public void addNames()//For adding Item's ingame names
{
LanguageRegistry.addName(mod_SplinterCell.ruby, "Ruby"); //Adds the name for the ruby item
}
public void addRecipes() //For adding your Item's recipes
{
}
}
I figured if you can help me better if you see all he code. I get two error messages, one at the proxy.addNames(); line and the LanguageRegistry.addName(mod_SplinterCell.ruby, "Ruby"); line. I feel like I'm so close yet so far away, is it an easy fix or did I mess something BIG up? Thanks again.
*EDITS* - putting the code inside spoiler comments so it wouldn't take up as much room.
proxy.addNames() goes inside of the init function, which you can call initSplinterCell or whatever you want really. it doesnt have to be InitCobaltCraft
Hope that all gets you through the issues. Feel free to hop on my IRC channel and bug me in real time if it would help you more.(#kg6jay on esper.net)
Also, will the tutorials be updated for 1.5.1? I love your tutorials but none of them work with the new updates. It's fine if you can't or you're busy, I understand.
Also, will the tutorials be updated for 1.5.1? I love your tutorials but none of them work with the new updates. It's fine if you can't or you're busy, I understand.
At some point soon, yes, right now I'm pretty busy though
At some point soon, yes, right now I'm pretty busy though
Good deal. I'm trying to make some armor and I was wondering, does each separate piece have to be it's own image/java file or is it all in one image/java file?
Good deal. I'm trying to make some armor and I was wondering, does each separate piece have to be it's own image/java file or is it all in one image/java file?
Armor can all be 1 java file, but each set has 2 or more image files that go with it. Look for iron_1.png and iron_2.png in the default MC files to get a feeling for how they work. The _2 file is the pants, the _1 has the shirt, helm and boots.
I've made a mod and in MCP everything worked fine. I was able to run the game
with Eclipse and there were no craches or any problems.
But now I've tried to put the mod in the 'real' game and it crashes.
That's the report:
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; Failed to start game
A full error report has been saved to C:\Users\Jaeger\AppData\Roaming\.minecraft\crash-reports\crash-2013-03-22_16.20.33-client.txt - Please include a copy of that file (Not this screen!) if you report this crash to anyone; without it, they will not be able to help fix the crash
--- BEGIN ERROR REPORT e42eb416 --------
Full report at:
C:\Users\Jaeger\AppData\Roaming\.minecraft\crash-reports\crash-2013-03-22_16.20.33-client.txt
Please show that file to Mojang, NOT just this screen!
Generated 22.03.13 16:20
-- System Details --
Details:
Minecraft Version: 1.5.1
Operating System: Windows 8 (amd64) version 6.2
Java Version: 1.7.0_13, Oracle Corporation
Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 846313896 bytes (807 MB) / 1038876672 bytes (990 MB) up to 2112618496 bytes (2014 MB)
JVM Flags: 5 total; -Xms512m -Xmx1024m -Xincgc -Xms1024m -Xmx2048m
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v7.44 FML v5.0.38.600 Minecraft Forge 7.7.0.600 4 mods loaded, 4 mods active
mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML [Forge Mod Loader] (coremods) Unloaded->Constructed
Forge [Minecraft Forge] (coremods) Unloaded->Constructed
JJsKindaMagic [JJsKindaMagic] (jjs) Unloaded->Errored
LWJGL: 2.4.2
OpenGL: Intel® HD Graphics 4000 GL version 4.0.0 - Build 9.17.10.2867, Intel
Is Modded: Definitely; Client brand changed to 'forge,fml'
Type: Client (map_client.txt)
Texture Pack: HerrSommer Dye - 1.5 - v1.zip
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: jjs.kindamagicmod.common.KindaMagicMain
at cpw.mods.fml.common.LoadController.transition(LoadController.java:142)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:504)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:160)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:407)
at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56)
at net.minecraft.client.Minecraft.run(Minecraft.java:729)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: jjs.kindamagicmod.common.KindaMagicMain
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:211)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:56)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:446)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:494)
... 5 more
Caused by: java.lang.NullPointerException
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:200)
... 32 more
--- END ERROR REPORT 75e87a29 ----------
What can I do?
After reobfuscating my stuff I packed it all into a zip file and then put it in the mods folder.
What did I mess up?
I'm not sure, but there's a chance in the update between 1.4 and 1.5 that the ways for putting the mod into the real game changed. That's what happened for everything else, at least.
I've made a mod and in MCP everything worked fine. I was able to run the game
with Eclipse and there were no craches or any problems.
But now I've tried to put the mod in the 'real' game and it crashes.
That's the report:
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; Failed to start game
A full error report has been saved to C:\Users\Jaeger\AppData\Roaming\.minecraft\crash-reports\crash-2013-03-22_16.20.33-client.txt - Please include a copy of that file (Not this screen!) if you report this crash to anyone; without it, they will not be able to help fix the crash
--- BEGIN ERROR REPORT e42eb416 --------
Full report at:
C:\Users\Jaeger\AppData\Roaming\.minecraft\crash-reports\crash-2013-03-22_16.20.33-client.txt
Please show that file to Mojang, NOT just this screen!
Generated 22.03.13 16:20
-- System Details --
Details:
Minecraft Version: 1.5.1
Operating System: Windows 8 (amd64) version 6.2
Java Version: 1.7.0_13, Oracle Corporation
Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 846313896 bytes (807 MB) / 1038876672 bytes (990 MB) up to 2112618496 bytes (2014 MB)
JVM Flags: 5 total; -Xms512m -Xmx1024m -Xincgc -Xms1024m -Xmx2048m
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v7.44 FML v5.0.38.600 Minecraft Forge 7.7.0.600 4 mods loaded, 4 mods active
mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML [Forge Mod Loader] (coremods) Unloaded->Constructed
Forge [Minecraft Forge] (coremods) Unloaded->Constructed
JJsKindaMagic [JJsKindaMagic] (jjs) Unloaded->Errored
LWJGL: 2.4.2
OpenGL: Intel® HD Graphics 4000 GL version 4.0.0 - Build 9.17.10.2867, Intel
Is Modded: Definitely; Client brand changed to 'forge,fml'
Type: Client (map_client.txt)
Texture Pack: HerrSommer Dye - 1.5 - v1.zip
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: jjs.kindamagicmod.common.KindaMagicMain
at cpw.mods.fml.common.LoadController.transition(LoadController.java:142)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:504)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:160)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:407)
at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56)
at net.minecraft.client.Minecraft.run(Minecraft.java:729)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: jjs.kindamagicmod.common.KindaMagicMain
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:211)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:56)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:446)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:494)
... 5 more
Caused by: java.lang.NullPointerException
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:200)
... 32 more
--- END ERROR REPORT 75e87a29 ----------
What can I do?
After reobfuscating my stuff I packed it all into a zip file and then put it in the mods folder.
What did I mess up?
Did you recompile THEN reobfuscate? The packaging method hasnt changed between 1.4 and 1.5, have to copy reobf/minecraft/<yourmodname> and eclipse/Minecraft/bin/mods or eclipse/Minecraft/bin/yourTextureFolder into your zip both at the root level.
Does anybody know how to override a block's properties (in Block.java) without modifying that class? I want to change the properties of bedrock, but don't want that class to be modified. Thanks in advance!
Does anybody know how to override a block's properties (in Block.java) without modifying that class? I want to change the properties of bedrock, but don't want that class to be modified. Thanks in advance!
You can probably remove it from Block.blocksList from your mod class, then add your custom version in, but it'll take some fancy code xD
The Meaning of Life, the Universe, and Everything.
Join Date:
12/21/2012
Posts:
61
Minecraft:
paladin_djamison
PSN:
paladin_djamison
Member Details
Hello
I have created a mod in eclipse using minecraft forge and it works fine in eclipse........but when I package the classes into a zip file minecraft crashes.
Error Screen Text
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; Failed to start game
A full error report has been saved to D:\Users\**** ******\AppData\Roaming\.minecraft\crash-reports\crash-2013-03-23_20.05.15-client.txt - Please include a copy of that file (Not this screen!) if you report this crash to anyone; without it, they will not be able to help fix the crash
--- BEGIN ERROR REPORT 9aa77dc4 --------
Full report at:
D:\Users\Drew Graham\AppData\Roaming\.minecraft\crash-reports\crash-2013-03-23_20.05.15-client.txt
Please show that file to Mojang, NOT just this screen!
Generated 3/23/13 8:05 PM
-- System Details --
Details:
Minecraft Version: 1.5.1
Operating System: Windows Vista (x86) version 6.0
Java Version: 1.7.0_15, Oracle Corporation
Java VM Version: Java HotSpot™ Client VM (mixed mode), Oracle Corporation
Memory: 336171248 bytes (320 MB) / 519110656 bytes (495 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 2 total; -Xms512m -Xmx1024m
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v7.44 FML v5.1.3.605 Minecraft Forge 7.7.0.605 4 mods loaded, 4 mods active
mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML [Forge Mod Loader] (coremods) Unloaded->Constructed
Forge [Minecraft Forge] (coremods) Unloaded->Constructed
PALMODSCSMOD [CSMOD] (Csmod.zip) Unloaded->Errored
LWJGL: 2.4.2
OpenGL: Intel 945G GL version 1.4.0 - Build 7.14.10.1504, Intel
Is Modded: Definitely; Client brand changed to 'forge,fml'
Type: Client (map_client.txt)
Texture Pack: faithful32pack.zip
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: Csmod.Main
at cpw.mods.fml.common.LoadController.transition(LoadController.java:142)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:504)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:160)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:407)
at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56)
at net.minecraft.client.Minecraft.run(Minecraft.java:729)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Csmod.Main
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:211)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:56)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:446)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:494)
... 5 more
Caused by: java.lang.NullPointerException
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:200)
... 32 more
--- END ERROR REPORT 75b42809 ----------
if you can help send me a message.
or quote this post.
Also it WORKED IN ECLIPSE
thanks
-djamison
Shoot... so if setTextureFile is no longer used is there an easy way to access the sprite sheet? Like override whatever texture is used and tell it "go to this image and use the first 16x16px"?
Thats the bit I need. I know how to check if the neighboring blocks are the same id and meta(which is what I need), but im not sure how to tell those blocks to break. I didnt see anything in World that looked helpful, but I wonder if there is a getBlock function that returns a block I can call a damage/drop function on..? I'll keep looking, and if I figure it out I'll share my code for you if you want to add a tutorial about it or something.
-kg6jay
There are no more sprite sheets. Each item and block gets its own png file in the appropriate folder. The name is whatever you use in the func_94245_a call after the colon, so
will look in "mods\resourceengineering\textures\items\" for "itemGemTurquoise.png"
Edit: Fixed odd mess of font and other random code bits that the editor put into my post..
Maybe just get block data, break it, and spawn en EntityItem with the data? Slightly inefficient but meh xD
Hmm... that went way over my head, and it really bothers me that it went over my head THAT far. Here's my code, I got an error message saying "iconRegister cannot be resolved", and I have no idea why it isn't working, and also where do the images go? Can I not locate my images file or is there a specific file location I need to go to?
And thanks for helping me with this, it means a lot, really appreciate it.
specifically this portion:
Arg!! Okay, I'm so close (well, at least I think I'm close).
Here's my mod class
And then my ItemRuby.java file
And then finally my CommonProxy.java file
I figured if you can help me better if you see all he code. I get two error messages, one at the proxy.addNames(); line and the LanguageRegistry.addName(mod_SplinterCell.ruby, "Ruby"); line. I feel like I'm so close yet so far away, is it an easy fix or did I mess something BIG up? Thanks again.
*EDITS* - putting the code inside spoiler comments so it wouldn't take up as much room.
proxy.addNames() goes inside of the init function, which you can call initSplinterCell or whatever you want really. it doesnt have to be InitCobaltCraft
Hope that all gets you through the issues. Feel free to hop on my IRC channel and bug me in real time if it would help you more.(#kg6jay on esper.net)
Slabs- Bring easily place able upside down slabs back to minecraft!
Nope, you have to give an int as the input
At some point soon, yes, right now I'm pretty busy though
Good deal. I'm trying to make some armor and I was wondering, does each separate piece have to be it's own image/java file or is it all in one image/java file?
Armor can all be 1 java file, but each set has 2 or more image files that go with it. Look for iron_1.png and iron_2.png in the default MC files to get a feeling for how they work. The _2 file is the pants, the _1 has the shirt, helm and boots.
I'm not sure, but there's a chance in the update between 1.4 and 1.5 that the ways for putting the mod into the real game changed. That's what happened for everything else, at least.
Did you recompile THEN reobfuscate? The packaging method hasnt changed between 1.4 and 1.5, have to copy reobf/minecraft/<yourmodname> and eclipse/Minecraft/bin/mods or eclipse/Minecraft/bin/yourTextureFolder into your zip both at the root level.
Does anybody know how to override a block's properties (in Block.java) without modifying that class? I want to change the properties of bedrock, but don't want that class to be modified. Thanks in advance!
You can probably remove it from Block.blocksList from your mod class, then add your custom version in, but it'll take some fancy code xD
I have created a mod in eclipse using minecraft forge and it works fine in eclipse........but when I package the classes into a zip file minecraft crashes.
Error Screen Text
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; Failed to start game
A full error report has been saved to D:\Users\**** ******\AppData\Roaming\.minecraft\crash-reports\crash-2013-03-23_20.05.15-client.txt - Please include a copy of that file (Not this screen!) if you report this crash to anyone; without it, they will not be able to help fix the crash
--- BEGIN ERROR REPORT 9aa77dc4 --------
Full report at:
D:\Users\Drew Graham\AppData\Roaming\.minecraft\crash-reports\crash-2013-03-23_20.05.15-client.txt
Please show that file to Mojang, NOT just this screen!
Generated 3/23/13 8:05 PM
-- System Details --
Details:
Minecraft Version: 1.5.1
Operating System: Windows Vista (x86) version 6.0
Java Version: 1.7.0_15, Oracle Corporation
Java VM Version: Java HotSpot™ Client VM (mixed mode), Oracle Corporation
Memory: 336171248 bytes (320 MB) / 519110656 bytes (495 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 2 total; -Xms512m -Xmx1024m
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v7.44 FML v5.1.3.605 Minecraft Forge 7.7.0.605 4 mods loaded, 4 mods active
mcp [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML [Forge Mod Loader] (coremods) Unloaded->Constructed
Forge [Minecraft Forge] (coremods) Unloaded->Constructed
PALMODSCSMOD [CSMOD] (Csmod.zip) Unloaded->Errored
LWJGL: 2.4.2
OpenGL: Intel 945G GL version 1.4.0 - Build 7.14.10.1504, Intel
Is Modded: Definitely; Client brand changed to 'forge,fml'
Type: Client (map_client.txt)
Texture Pack: faithful32pack.zip
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
cpw.mods.fml.common.LoaderException: java.lang.ClassNotFoundException: Csmod.Main
at cpw.mods.fml.common.LoadController.transition(LoadController.java:142)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:504)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:160)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:407)
at net.minecraft.client.MinecraftAppletImpl.func_71384_a(SourceFile:56)
at net.minecraft.client.Minecraft.run(Minecraft.java:729)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: Csmod.Main
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:211)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at cpw.mods.fml.common.ModClassLoader.loadClass(ModClassLoader.java:56)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:446)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:494)
... 5 more
Caused by: java.lang.NullPointerException
at cpw.mods.fml.relauncher.RelaunchClassLoader.findClass(RelaunchClassLoader.java:200)
... 32 more
--- END ERROR REPORT 75b42809 ----------
or quote this post.
Also it WORKED IN ECLIPSE
thanks
-djamison