It would seem you've forgotten to add the resources (textures for the block) but I could tell better the issue if I saw the code you have written.
that's all i can tell from the error log though, if that doesn't fix the issue, then we may need to get some more experienced help
I just checked and the textures for everything were both at the right places. I think maybe before all this,I was trying to make a mod and in my modding\eclipse\Client\bin, there's a class for the deleted .java file i tried to first make. could that be the issue?
I just checked and the textures for everything were both at the right places. I think maybe before all this,I was trying to make a mod and in my modding\eclipse\Client\bin, there's a class for the deleted .java file i tried to first make. could that be the issue?
Could be, If I start on something new I always run the Cleanup.bat (or .sh if your mac) file..
Hey so I am still trying to make a new block and now I just have a few errors. Being a modding/java n00b I really don't know how to fix them. Thanks in advance. Here is my code:
mod_***.java
package net.minecraft.src;
public class mod_LargeLightMod extends BaseMod
{
public static final Block Lightdirt = new BlockLightdirt (125,0).setBlockName("Lightdirt").setHardness(3F).setResistance(1F).setLightValue(1F);
public void load()
{
Lightdirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png, "/Lightdirt.png");
ModLoader.registerBlock(Lightdirt);
ModLoader.addName(Lightdirt, "Lightdirt");
ModLoader.addRecipe(new ItemStack (Lightdirt, 2), new Object [] {"###", "#L#", "###", Character.valueOf ('#'), Block.dirt, Character.valueOf ('L'), Item.lightStoneDust});
}
public String getVersion()
{
return "1.2.5";
}
}
BlockLightdirt.java
package net.minecraft.src;
import java.util.Random;
public class BlockLightdirt extends Block
{
public BlockLightdirt (int i, int j)
{
super(i, j, Material.ground);
}
public int idDropped (int i, Random random, int j)
{
return mod_LargeLightMod.Lightdirt.125;
}
public int quantityDropped (Random random)
{
return 1;
}}
Hey so I am still trying to make a new block and now I just have a few errors. Being a modding/java n00b I really don't know how to fix them. Thanks in advance. Here is my code:
mod_***.java
package net.minecraft.src;
public class mod_LargeLightMod extends BaseMod
{
public static final Block Lightdirt = new BlockLightdirt (125,0).setBlockName("Lightdirt").setHardness(3F).setResistance(1F).setLightValue(1F);
public void load()
{
Lightdirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png, "/Lightdirt.png");
ModLoader.registerBlock(Lightdirt);
ModLoader.addName(Lightdirt, "Lightdirt");
ModLoader.addRecipe(new ItemStack (Lightdirt, 2), new Object [] {"###", "#L#", "###", Character.valueOf ('#'), Block.dirt, Character.valueOf ('L'), Item.lightStoneDust});
}
public String getVersion()
{
return "1.2.5";
}
}
BlockLightdirt.java
package net.minecraft.src;
import java.util.Random;
public class BlockLightdirt extends Block
{
public BlockLightdirt (int i, int j)
{
super(i, j, Material.ground);
}
public int idDropped (int i, Random random, int j)
{
return mod_LargeLightMod.Lightdirt.125;
}
public int quantityDropped (Random random)
{
return 1;
}}
Firstly, you didn't give your Lightdirt block any special properties. Everything you declared in BlockLightdirt.java is unnecessary, as all those settings are set by default. That being the case, you can safely delete that class and change your declaration of the block in the mod_* to this:
public static final Block Lightdirt = new Block(125, Material.ground).setBlockName("Lightdirt").setHardness(3F).setResistance(1F).setLightValue(1F);
You might also want to set a step sound for it on the end there... If it's going to sound like dirt when you walk on it, it'll need to look like this:
public static final Block Lightdirt = new Block(125, Material.ground).setBlockName("Lightdirt").setHardness(3F).setResistance(1F).setLightValue(1F).setStepSound(Block.soundGravelFootstep);
Next up is the line containing your texture for the block in your mod_* file. You've forgotten an end-quote on the /terrain. Here's what you have:
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
so, I'm making a mod (duh...) and it says it can't find an image, it could find it before but always my last modloader.addoverdrive doesn't seem to work. I tried renaming it all and it still wont work, help?
so, I'm making a mod (duh...) and it says it can't find an image, it could find it before but always my last modloader.addoverdrive doesn't seem to work. I tried renaming it all and it still wont work, help?
Tell us exactly where you put your textures as well as post your code.
Rollback Post to RevisionRollBack
I used to maintain the Minecraft Forums Mod List. However, life has stepped in the way of that. Perhaps later...
Okay, now I have a problem myself. I made a humanoid NPC, just an easy thing nothing special, the only problem is that he should be holding something, but I guess he's too lazy to do it so he doesn't want to hold that sword. I get no errors when I recompile or when I start the game, here are the codes:
mod_demon
package net.minecraft.src;
import java.lang.reflect.Method;
import java.util.Map;
public class mod_demon extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityDemon.class, "Demon", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityDemon.class, 500, 4, 10, EnumCreatureType.creature);//X, Y, Z: X=How many spawn in the world Y/Z=minumum/maximum spawn in 1 chunk
}//EnumCreatureType.creature = cow etc, .monster = spawn at night .waterCreature= spawn in water
public void AddRenderer(Map map)
{
map.put(EntityDemon.class, new RenderBiped(new ModelBiped(), 0.5F));
}
public String getVersion()
{
return "1.0.0";
}
}
EntityDemon
package net.minecraft.src;
public class EntityDemon extends EntityCreature
{
public EntityDemon(World world)
{
super(world);
texture = "/soulmod/demon.png";
moveSpeed = 0.5F;
}
public int getMaxHealth()
{
return 5;
}
public ItemStack getHeldItem()
{
return defaultHeldItem;
}
static
{
defaultHeldItem = new ItemStack(Item.swordStone, 1);
}
private static final ItemStack defaultHeldItem;
}
I just don't get why it doesn't work, can anyone help me? Oh and ignore the comments, these are just there to remind me what the numbers do ^^
This sometimes happens with certain mobs, I don't really know why though. One thing I do know is it would probably also be a good idea to upgrade your mod to 1.2.5.
Anyway, try compiling your mod and testing it in normal minecraft as well as the MCP client. Sometimes stupid things happen in MCP
Hey, i want a NPC to spawn only the i right click the block, there is someway to do this?
I think so. I know the Forge API has a dispense entity function but I'm sure it's also possible with standard ModLoader. Use something like onBlockActivated() or something and get it to create your mob like that. I'll try giving you some code later.
so, I'm making a mod (duh...) and it says it can't find an image, it could find it before but always my last modloader.addoverdrive doesn't seem to work. I tried renaming it all and it still wont work, help?
dude, it's addoverride again, RIDE not drive. Lol.
Create a render class, check RenderBlaze for example. Then link the render and the entity in you mod file with this (Replace EntityPig with your entity class and RenderPig with your render class):
// Adds Render to entity
public void addRenderer(Map map)
{
map.put(EntityPig.class, new RenderPig());
}
It actually appeared to be easier. Just had to change one parameter. But still, cheers.
I still have 2 questions: 1, when I am compiling the code with mcp where does it come out? Someone said reobf but nothing was there. Or, since I use ecplipse where does eclipse put the code?
Question 2: How do you make blocks share an ID like halfslabs. I'm still new to java so I don't understand the original halfslab code.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
im really happy now
i change my jobs from texturing to modding
thanks!!
I just checked and the textures for everything were both at the right places. I think maybe before all this,I was trying to make a mod and in my modding\eclipse\Client\bin, there's a class for the deleted .java file i tried to first make. could that be the issue?
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumCould be, If I start on something new I always run the Cleanup.bat (or .sh if your mac) file..
p.s. no pressure, I have all summer
p.s.s thanks in advance
Kill two stones with one bird whenever possible
mod_***.java
package net.minecraft.src; public class mod_LargeLightMod extends BaseMod { public static final Block Lightdirt = new BlockLightdirt (125,0).setBlockName("Lightdirt").setHardness(3F).setResistance(1F).setLightValue(1F); public void load() { Lightdirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png, "/Lightdirt.png"); ModLoader.registerBlock(Lightdirt); ModLoader.addName(Lightdirt, "Lightdirt"); ModLoader.addRecipe(new ItemStack (Lightdirt, 2), new Object [] {"###", "#L#", "###", Character.valueOf ('#'), Block.dirt, Character.valueOf ('L'), Item.lightStoneDust}); } public String getVersion() { return "1.2.5"; } }BlockLightdirt.java
package net.minecraft.src; import java.util.Random; public class BlockLightdirt extends Block { public BlockLightdirt (int i, int j) { super(i, j, Material.ground); } public int idDropped (int i, Random random, int j) { return mod_LargeLightMod.Lightdirt.125; } public int quantityDropped (Random random) { return 1; }}And here are the errors:
and
src\minecraft\net\minecraft\src\mod_***.java:9: error: unclosed string literal Lightdirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Lightdirt.png");and here is a Screenshot of the errors:
http://prntscr.com/bya5g
Thanks.
-
View User Profile
-
View Posts
-
Send Message
Retired StaffFirstly, you didn't give your Lightdirt block any special properties. Everything you declared in BlockLightdirt.java is unnecessary, as all those settings are set by default. That being the case, you can safely delete that class and change your declaration of the block in the mod_* to this:
public static final Block Lightdirt = new Block(125, Material.ground).setBlockName("Lightdirt").setHardness(3F).setResistance(1F).setLightValue(1F);You might also want to set a step sound for it on the end there... If it's going to sound like dirt when you walk on it, it'll need to look like this:
public static final Block Lightdirt = new Block(125, Material.ground).setBlockName("Lightdirt").setHardness(3F).setResistance(1F).setLightValue(1F).setStepSound(Block.soundGravelFootstep);Next up is the line containing your texture for the block in your mod_* file. You've forgotten an end-quote on the /terrain. Here's what you have:
Lightdirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png, "/Lightdirt.png");And here's what it should be:
Lightdirt.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Lightdirt.png");Try that, go up to file, hit "Save All", recompile, test. If you still have errors, come back.
http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/juno/R/eclipse-java-juno-win32.zip
thanks.
Honey the test results are back! They're Positive! ... Yes, I'm sure it's only Mincraft addiction!
together they are powerful beyond imagination."
-
View User Profile
-
View Posts
-
Send Message
Curse Premium-
View User Profile
-
View Posts
-
Send Message
Retired StaffTell us exactly where you put your textures as well as post your code.
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumAnyway, try compiling your mod and testing it in normal minecraft as well as the MCP client. Sometimes stupid things happen in MCP
I think so. I know the Forge API has a dispense entity function but I'm sure it's also possible with standard ModLoader. Use something like onBlockActivated() or something and get it to create your mob like that. I'll try giving you some code later.
dude, it's addoverride again, RIDE not drive. Lol.
Kill two stones with one bird whenever possible
Here's the concerned class file:
package net.minecraft.src; import net.minecraft.src.forge.*; import net.minecraft.src.forge.ITextureProvider; public class ItemDatModRwMaterials extends Item implements ITextureProvider { public ItemDatModRawMaterials(int i) { super(i); } public String getTextureFile() { return "/DatMod/itemsOther.png"; } }I would be very happy if someone would lie to help.
Note: I am currently using Forge with my mod because of the very large number of images for my blocks and items.
Question 2: How do you make blocks share an ID like halfslabs. I'm still new to java so I don't understand the original halfslab code.