== MCP 7.44 (data: 7.44, client: 1.5.1, server: 1.5.1) ==
# found ff, ff patches, srgs, name csvs, doc csvs, param csvs, renumber csv, ast
yle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_17\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_husialke.java:24: error: illegal start of ex
pression
public void addRenderer(Map var1)
^
src\minecraft\net\minecraft\src\mod_husialke.java:24: error: illegal start of ex
pression
public void addRenderer(Map var1)
^
src\minecraft\net\minecraft\src\mod_husialke.java:24: error: ';' expected
public void addRenderer(Map var1)
^
src\minecraft\net\minecraft\src\mod_husialke.java:24: error: ';' expected
public void addRenderer(Map var1)
^
src\minecraft\net\minecraft\src\mod_husialke.java:28: error: reached end of file
while parsing
}
^
5 errors
My codes:
mod_husialke.java
package net.minecraft.src;
import java.awt.Color;
import java.util.Map;
public class mod_husialke extends BaseMod
{
public static final Item Deena = new Item(5000).setCreativeTab(CreativeTabs.tabMisc).setUnlocalizedName("Deena");
public String getVersion()
{
return null;
}
public void load()
{
ModLoader.addName(Deena, "Husialkowe DNA");
ModLoader.addRecipe(new ItemStack(Deena, 1), new Object [] {"#%#", "#%#", "#%#", Character.valueOf('%'), Item.bone, Character.valueOf('#'), Item.leather});
ModLoader.registerEntityID(EntityGoodHusiek.class, "GoodHusiek", 12);
ModLoader.addSpawn("GoodHusiek", 5, 1, 1, EnumCreatureType.creature);
ModLoader.addLocalization("entity.GoodHusiek.name", "GoodHusiek");
EntityList.entityEggs.put(Integer.valueOf(12), new EntityEggInfo(12, 894731, (new Color(11, 12, 7)).getRGB()));
public void addRenderer(Map var1)
{
var1.put(EntityGoodHusiek.class, new RenderLiving(new ModelBiped(),.5f));
}
}
EntityGoodHusiek
package net.minecraft.src;
public class EntityGoodHusiek extends EntityAnimal//extend this to make mob hostile
{
public EntityGoodHusiek(World par1World)
{
super(par1World);//super call
this.texture = "/mob/GoodHusiek.png";//specifies texture
this.moveSpeed = .4f;//sets how fast this mob moves
//below this is all the ai tasks that specify how the mob will behave mess around with it to see what happens
this.tasks.addTask(0, new EntityAISwimming(this));
this.tasks.addTask(1, new EntityAIAttackOnCollide(this, EntityPlayer.class, this.moveSpeed, false));
this.tasks.addTask(2, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
this.tasks.addTask(3, new EntityAIWander(this, this.moveSpeed));
this.tasks.addTask(4, new EntityAILookIdle(this));
this.tasks.addTask(5, new EntityAITempt(this, 0.25F, Block.dirt, false));
this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true));
//end of ai tasks
}
//the amount of damge the mob does i think
public int func_82193_c(Entity par1Entity)
{
return 4;
}
public int getMaxHealth()//says that the mob will have a health of 20
{
return 40;
}
protected boolean isAIEnabled()//says that the tasks we told it to do before will be run
{
return true;
}
protected int getDropItemId()
{
return Deena.shiftedIndex;
}
}
Where ever it says to put ';' put it at the end of that line
For those of you who want to add a sword to your mod, here is the code:
(In the variables section)
public static final Item NAMESword = new ItemSword(3077, EnumToolMaterial.EMERALD).setUnlocalizedName("Sword")
In the public void load thingy
ModLoader.addName(NAMESword, "NAME Sword");
ModLoader.addRecipe(new ItemStack(NAMESword, 1), new Object[]
{
" * ", " * ", " X ",
'X', Item.stick, '*', (youritem)(you can also use Block. Or Item.
});
For those of you who want to add a sword to your mod, here is the code:
(In the variables section)
public static final Item NAMESword = new ItemSword(3077, EnumToolMaterial.EMERALD).setUnlocalizedName("Sword")
In the public void load thingy
ModLoader.addName(NAMESword, "NAME Sword");
ModLoader.addRecipe(new ItemStack(NAMESword, 1), new Object[]
{
" * ", " * ", " X ",
'X', Item.stick, '*', (youritem)(you can also use Block. Or Item.
});
EnumToolMaterial is the durability of the sword, EMERALD is diamond, GOLD is gold, WOOD is wood, STONE is stone, IRON is iron
For those of you who want to add a sword to your mod, here is the code:
(In the variables section)
public static final Item NAMESword = new ItemSword(3077, EnumToolMaterial.EMERALD).setUnlocalizedName("Sword")
In the public void load thingy
ModLoader.addName(NAMESword, "NAME Sword");
ModLoader.addRecipe(new ItemStack(NAMESword, 1), new Object[]
{
" * ", " * ", " X ",
'X', Item.stick, '*', (youritem)(you can also use Block. Or Item.
});
EnumToolMaterial is the durability of the sword, EMERALD is diamond, GOLD is gold, WOOD is wood, STONE is stone, IRON is iron
And to do other tools, you just replace ItemSword with Item(Axe,Pickaxe, Spade, or Hoe)
Note: The setunlocalized name thingy makes minecraft look for the texture in the minecraft.jar/textures/items not blocks
Use the crafting recipe mentioned above to use custom items or blocks
Can you do a tutorial on custom structures to randomly generate throughout the world, with a way to set if it appears only once (like the stronghold) or choose if it is rare or not to find it, but still being generated more than once.
Another thing is you don't actually show readers how every basic thing works, like in the World Generator tutorial, you don't show how to combine it with the custom biome tutorial to make it even better. I'm kind of like the microjunk guy, where you'd expect more advanced and never-before-seen tutorials. Also, last thing that would really help is spelling. Not saying you have to fix it, but it kind of bothers me a little.
Other than all that, nice job so far. Keep up the good work! Butter to you!
Could you please make a potion tutorial. need it for a mod that I am making that creates new Bouncy Boots that while you are wearing them they allow you to jump two blocks high. Thanks
you just do world.getHeightValue to get the height of the ground
what problems
It is telling me that the GUI code is wrong the one in red it actullys says that the entire code is wrongCould you do a tutorial on dimensions I really badly need one it's very vital for my mod I have searched everywhere for one and can't find it please help me.
---- Minecraft Crash Report ---- // Don't do that.
Time: 3/26/13 8:25 PM Description: Exception occured in ModLoader
java.lang.RuntimeException: Invalid shapeless recipy! at net.minecraft.src.CraftingManager.addShapelessRecipe(CraftingManager.java:243) at net.minecraft.src.ModLoader.addShapelessRecipe(ModLoader.java:448) at net.minecraft.src.mod_chrome.<init>(mod_chrome.java:60) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:525) at java.lang.Class.newInstance0(Class.java:374) at java.lang.Class.newInstance(Class.java:327) at net.minecraft.src.ModLoader.addMod(ModLoader.java:366) at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1221) at net.minecraft.src.ModLoader.init(ModLoader.java:779) at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:180) at net.minecraft.src.RenderManager.<init>(RenderManager.java:96) at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14) at net.minecraft.client.Minecraft.startGame(Minecraft.java:417) at net.minecraft.src.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:41) at net.minecraft.client.Minecraft.run(Minecraft.java:726) at java.lang.Thread.run(Thread.java:722)
Pleze respond cuz i have no idea at all wats rong
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Where ever it says to put ';' put it at the end of that line
That's all I can help you with right now
You can make them drop a certain block when mined or something along the lines of that, go look in BlockStone.java
(In the variables section)
public static final Item NAMESword = new ItemSword(3077, EnumToolMaterial.EMERALD).setUnlocalizedName("Sword")
In the public void load thingy
ModLoader.addName(NAMESword, "NAME Sword");
ModLoader.addRecipe(new ItemStack(NAMESword, 1), new Object[]
{
" * ", " * ", " X ",
'X', Item.stick, '*', (youritem)(you can also use Block. Or Item.
});
EnumToolMaterial is the durability of the sword, EMERALD is diamond, GOLD is gold, WOOD is wood, STONE is stone, IRON is iron
And to do other tools, you just replace ItemSword with Item(Axe,Pickaxe, Spade, or Hoe)
Note: The setunlocalized name thingy makes minecraft look for the texture in the minecraft.jar/textures/items not blocks
Use the crafting recipe mentioned above to use custom items or blocks
Here is my code:
I tried changing the value to something like arrows and it works. Any ideas?
My item trinityMesh is ID number 5010
Try putting 5010 in parentheses
Try putting 5010 in parentheses it works for meSorry bout the double thing it glitched up
Thank you, also to the op of this thread could you do a liquid tutorial?
Another thing is you don't actually show readers how every basic thing works, like in the World Generator tutorial, you don't show how to combine it with the custom biome tutorial to make it even better. I'm kind of like the microjunk guy, where you'd expect more advanced and never-before-seen tutorials. Also, last thing that would really help is spelling. Not saying you have to fix it, but it kind of bothers me a little.
Other than all that, nice job so far. Keep up the good work!
public static final Block DeathsCraftingTable = new GUIBlock(165).getIndirectPowerOutput("test");
Could you do a tutorial on liquids? Or maybe different types of arrows?
http://imgur.com/FRyWRPb
The error message states: "The method setUnlocalizedName(String) is undefined for the type Block"
There is a glitch (Not sure if it's a glitch) where you have to change .setUnlocalizedName to .getIndirectPowerOutput
Then just make sure you have your blocks picture in the right place and you are set!
for examples
It is telling me that the GUI code is wrong the one in red it actullys says that the entire code is wrongCould you do a tutorial on dimensions I really badly need one it's very vital for my mod I have searched everywhere for one and can't find it please help me.
---- Minecraft Crash Report ----
// Don't do that.
Time: 3/26/13 8:25 PM
Description: Exception occured in ModLoader
java.lang.RuntimeException: Invalid shapeless recipy!
at net.minecraft.src.CraftingManager.addShapelessRecipe(CraftingManager.java:243)
at net.minecraft.src.ModLoader.addShapelessRecipe(ModLoader.java:448)
at net.minecraft.src.mod_chrome.<init>(mod_chrome.java:60)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at java.lang.Class.newInstance0(Class.java:374)
at java.lang.Class.newInstance(Class.java:327)
at net.minecraft.src.ModLoader.addMod(ModLoader.java:366)
at net.minecraft.src.ModLoader.readFromClassPath(ModLoader.java:1221)
at net.minecraft.src.ModLoader.init(ModLoader.java:779)
at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:180)
at net.minecraft.src.RenderManager.<init>(RenderManager.java:96)
at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:14)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:417)
at net.minecraft.src.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:41)
at net.minecraft.client.Minecraft.run(Minecraft.java:726)
at java.lang.Thread.run(Thread.java:722)
Pleze respond cuz i have no idea at all wats rong