Hey Jbond, sweet tutorial. I have a question about the achievements. I want to make it so that when I kill my mob, it will give an achievement. I'm not sure how to manipulate the code to make it do that. Also, I tried to make the achievement only available after getting the Time to Strike! achievement, but I got this error:
Cannot reference a field before it is defined
And yes, I did make the static for the achievement. If you could help me, I would be very thankful.
Ive been modding for a while now and wondered if there is any way to make an item - bigger.
i want to make an item like 8x32 so a long item but cant figure out how - if you could help that would be great
Thanks
You have to make a model of it if you want it bigger than 16x16. Use techne for it.
These tutorials don't seem to work with 1.4.7. When I try changing the item ID's after getting a "java.lang.Exception: No more empty item sprite indices left!" error, it still does not work. here's the full error report:
Minecraft has crashed!
----------------------
Minecraft has stopped running because it encountered a problem; Exception occured in ModLoader
A full error report has been saved to C:\Documents and Settings\Brian.T-AF1EB1B126944\My Documents\Downloads\mcp726a\jars\.\crash-reports\crash-2013-02-15_16.23.11-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 56cfb --------
Full report at:
C:\Documents and Settings\Brian.T-AF1EB1B126944\My Documents\Downloads\mcp726a\jars\.\crash-reports\crash-2013-02-15_16.23.11-client.txt
Please show that file to Mojang, NOT just this screen!
Generated 2/15/13 4:23 PM
-- System Details --
Details:
Minecraft Version: 1.4.7
Operating System: Windows XP (x86) version 5.1
Java Version: 1.7.0_13, Oracle Corporation
Java VM Version: Java HotSpot™ Client VM (mixed mode), Oracle Corporation
Memory: 1035123472 bytes (987 MB) / 1067057152 bytes (1017 MB) up to 1067057152 bytes (1017 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: Start[net.minecraft.src.IPlayerUsage, MinecraftFakeLauncher, ThreadShutdown, ...]
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
ModLoader: Mods loaded: 2
ModLoader 1.4.7
mod_MMM Moar Metals and Minerals Mod Version 1.8.4 For Minecraft 1.4.7
java.lang.Exception: No more empty item sprite indices left!
at net.minecraft.src.ModLoader.getUniqueItemSpriteIndex(ModLoader.java:760)
at net.minecraft.src.ModLoader.getUniqueSpriteIndex(ModLoader.java:770)
at net.minecraft.src.ModLoader.addOverride(ModLoader.java:474)
at net.minecraft.src.mod_MMM.load(mod_MMM.java:678)
at net.minecraft.src.ModLoader.init(ModLoader.java:960)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:190)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:93)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:421)
at net.minecraft.src.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:41)
at net.minecraft.client.Minecraft.run(Minecraft.java:741)
at java.lang.Thread.run(Unknown Source)
--- END ERROR REPORT 928ffa76 ----------
the tutorials work for 1.4.7 but that errors means that you can't have anymore pictures for items because modloader only lets you use a few pictures
i am making a mod to and want to add 5 ores, but if i put the generate code in eclipse i can find only 1 ore in the world. i checked the codes 5 times, made 100 new worlds. can u show me how your generating ore code looks like so i can go back to modding thanks
this is my code what do i wrong?
:public void generateSurface(World world, Random random, int i, int j) { for(int k = 0; k < 5; k++) { int randPosX = i + random.nextInt(16); int randPosY = random.nextInt(128); int randPosZ = j + random.nextInt(16); (new WorldGenMinable(FlusOre.blockID, 10)).generate(world, random, randPosX, randPosY, randPosZ); } }
public void generateSurface1(here u see that there is a (1) in the line generateSurface(1) does it need to be a 1 or just different?)(World world, Random random, int i, int j) { for(int k = 0; k < 5; k++) { int randPosX = i + random.nextInt(16); int randPosY = random.nextInt(128); int randPosZ = j + random.nextInt(16); (new WorldGenMinable(MagnetOre.blockID, 10)).generate(world, random, randPosX, randPosY, randPosZ); } }
Hope u can help me:D
im a new coder aswell but i've made a few mods but basically you only need onepublic void, two always screws it up, but just put them all under the same public void so it looks like this:
public void generateSurface(World world, Random random, int i, int j) { for(int k = 0; k < 5; k++) { int randPosX = i + random.nextInt(16); int randPosY = random.nextInt(128); int randPosZ = j + random.nextInt(16); (new WorldGenMinable(FlusOre.blockID, 10)).generate(world, random, randPosX, randPosY, randPosZ); }
{ for(int k = 0; k < 5; k++) { int randPosX = i + random.nextInt(16); int randPosY = random.nextInt(128); int randPosZ = j + random.nextInt(16); (new WorldGenMinable(MagnetOre.blockID, 10)).generate(world, random, randPosX, randPosY, randPosZ); } }
This is the first mod I decide not to simply copy and pat the text and actually type it out to try to better understand how basic coding works. (I AM reading up about Java a little every once and awhile too.)
Anyways that's no the point, i need to know why .shiftedIndex isn't working. (I figured out how to fix the .setItemName and the Override texture error, just use .setUnlocalizedName("YourItemHere")
code (someone who knows the answer, please reply):
package net.minecraft.src;
import java.util.Random;
public class mod_FCapsule extends BaseMod
{
public static final Item FCap = new Item(5602).setUnlocalizedName("MCF Capsule");
public void load()
{
ModLoader.addName(FCap, "Fueal Capsule");
FCap.setCreativeTab(CreativeTabs.tabMisc);
ModLoader.addRecipe(new ItemStack(FCap, 8), new Object [] {"###", "#@#", "###", Character.valueOf('#'), mod_Capsule.Cap, Character.valueOf('@'), Item.coal});
}
public int addFuel (int par1, int par2)
{
if(par1 == mod_FCapsule.FCap.shiftedIndex)
{
return 200;
}
return 0;
}
public String getVersion()
{
return "Test";
}
}
Great job! Keep it up
I remember you helped me with modding a while back... in like 1.2.5
Just got a few questions:
1) Is modding with Forge better? Is Forge like an add-on to ModLoader, so the player needs both? I don't want to make the player go to too much of a hassle if I modded with Forge. They would have mods with ModLoader, then they install Forge with it, and somethings not compatible, blah blah blah *EXPLOSION* I don't know what to use. ML or Forge?
2) Could you make tutorials on: Metadata, Custom Creative Tabs, and an interact-able block (IE furnace) being affected by an "outside force" (IE electricity or something...)?
the tutorials work for 1.4.7 but that errors means that you can't have anymore pictures for items because modloader only lets you use a few pictures
WRONG
Look at Layman Mod Maker. It kinda does that.
Also be sure to check out my second YouTube channel for all sorts of cool projects.
im a new coder aswell but i've made a few mods but basically you only need onepublic void, two always screws it up, but just put them all under the same public void so it looks like this:
public void generateSurface(World world, Random random, int i, int j)
{
for(int k = 0; k < 5; k++)
{
int randPosX = i + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = j + random.nextInt(16);
(new WorldGenMinable(FlusOre.blockID, 10)).generate(world, random, randPosX, randPosY, randPosZ);
}
{
for(int k = 0; k < 5; k++)
{
int randPosX = i + random.nextInt(16);
int randPosY = random.nextInt(128);
int randPosZ = j + random.nextInt(16);
(new WorldGenMinable(MagnetOre.blockID, 10)).generate(world, random, randPosX, randPosY, randPosZ);
}
}
Anyways that's no the point, i need to know why .shiftedIndex isn't working. (I figured out how to fix the .setItemName and the Override texture error, just use .setUnlocalizedName("YourItemHere")
code (someone who knows the answer, please reply):
Thanks I try to post my issues here for now so if anyone wants to help me with my coding errors be my guest.
I remember you helped me with modding a while back... in like 1.2.5
Just got a few questions:
1) Is modding with Forge better? Is Forge like an add-on to ModLoader, so the player needs both? I don't want to make the player go to too much of a hassle if I modded with Forge. They would have mods with ModLoader, then they install Forge with it, and somethings not compatible, blah blah blah *EXPLOSION* I don't know what to use. ML or Forge?
2) Could you make tutorials on: Metadata, Custom Creative Tabs, and an interact-able block (IE furnace) being affected by an "outside force" (IE electricity or something...)?
:3