Hey, I'm trying to add a new mob, but I'm stuck at the beginning. I want it to be neutral unless provoked. So what should it extend, EntityMob or EntityCreature? And what code do i add for it to become aggressive on hit?
Have a look at EntityPigZombie.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
You mainly need to change your references now, wherever they may be. So anything in your mod_* class or anywhere in the tool classes you created (sword, pickaxe, etc) that references EnumToolMaterial should be changed to EnumToolMaterialLead.
Example:
public static final Item LeadPickaxe = new ItemLeadPickaxe(402, EnumToolMaterialLead.LEAD).setItemName("LeadPickaxe");
I am having the same issue. Except its the block that is causing a crash. When I recompile it, it has no errors, but when I start client it crashes. Its not the tools that is crashing him. It is the block. At one point my block did work, but then it stopped for some odd reason.
I am having the same issue. Except its the block that is causing a crash. When I recompile it, it has no errors, but when I start client it crashes. Its not the tools that is crashing him. It is the block. At one point my block did work, but then it stopped for some odd reason.
It may have stopped if you accidentally gave the block the same ID as another, or if you forgot to change the name while declaring its parts. If you copy and paste bits of your code a lot (declarations and such), make sure to look at each addition closely. You may have forgotten to change something in one of the bits that defines your block, like these areas:
public static final Block blockExample= new Block(134, 0).setBlockName("blockExample").setHardness(1.5F).setResistance(10F).setStepSound(Block.soundStoneFootstep);
Honestly, I'm bad at reading error reports. Though, if you show me the code you have in your class files (All of them, the mod_*, your tools, your EnumToolMaterialLead...) I could try and help pinpoint the problem. If you'd prefer, you can send them in a private message. Else, post them here. Someone besides me may provide the solution. It's up to you. Just make sure to put each code in its own separate spoiler.
Code 1:
[spoiler]-Code 1-[/spoiler]
Code 2:
[spoiler]-Code 2-[/spoiler]
Code 3:
[spoiler]-Code 3-[/spoiler]
Rollback Post to RevisionRollBack
I used to maintain the Minecraft Forums Mod List. However, life has stepped in the way of that. Perhaps later...
Honestly, I'm bad at reading error reports. Though, if you show me the code you have in your class files (All of them, the mod_*, your tools, your EnumToolMaterialLead...) I could try and help pinpoint the problem. If you'd prefer, you can send them in a private message. Else, post them here. Someone besides me may provide the solution. It's up to you. Just make sure to put each code in its own separate spoiler.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Hey dude I was just wondering if you could add me on skype, I'm having trouble with something and skype would be the easiest way to fix it fast my skype is zachripper add me when you can
Hey dude I was just wondering if you could add me on skype, I'm having trouble with something and skype would be the easiest way to fix it fast my skype is zachripper add me when you can
I don't do Skype, ever.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
== MCP 6.2 (data: 6.2, client: 1.2.5, server: 1.2.5) ==
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_04\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\mod_tutorials.java:11: error: cannot find symbol
public static final Item LeadPickaxe = new ItemLeadPickaxe(402, EnumTool
Material.LEAD).setItemName("LeadPickaxe");
^
symbol: variable LEAD
location: class EnumToolMaterial
src\minecraft\net\minecraft\src\mod_tutorials.java:12: error: cannot find symbol
public static final Item LeadAxe = new ItemLeadAxe(403, EnumToolMaterial
.LEAD).setItemName("LeadAxe");
^
symbol: variable LEAD
location: class EnumToolMaterial
src\minecraft\net\minecraft\src\mod_tutorials.java:13: error: cannot find symbol
public static final Item LeadSpade = new ItemLeadSpade(404, EnumToolMate
rial.LEAD).setItemName("LeadSpade");
^
symbol: variable LEAD
location: class EnumToolMaterial
src\minecraft\net\minecraft\src\mod_tutorials.java:14: error: cannot find symbol
public static final Item LeadHoe = new ItemLeadHoe(405, EnumToolMaterial
.LEAD).setItemName("LeadHoe");
^
symbol: variable LEAD
location: class EnumToolMaterial
src\minecraft\net\minecraft\src\mod_tutorials.java:15: error: cannot find symbol
public static final Item LeadSword = new ItemLeadSword(406, EnumToolMate
rial.LEAD).setItemName("LeadSword");
^
symbol: variable LEAD
location: class EnumToolMaterial
src\minecraft\net\minecraft\src\mod_tutorials.java:28: error: cannot find symbol
LeadPickaxe.ModLoader.addOverride("/gui/items.png", "/PbPickaxe.
png");
^
symbol: variable ModLoader
location: variable LeadPickaxe of type Item
src\minecraft\net\minecraft\src\mod_tutorials.java:33: error: cannot find symbol
LeadAxe.ModLoader.addOverride("/gui/items.png", "/PbAxe.png");
^
symbol: variable ModLoader
location: variable LeadAxe of type Item
src\minecraft\net\minecraft\src\mod_tutorials.java:38: error: cannot find symbol
LeadSpade.ModLoader.addOverride("/gui/items.png", "/PbSpade.png"
);
^
symbol: variable ModLoader
location: variable LeadSpade of type Item
src\minecraft\net\minecraft\src\mod_tutorials.java:43: error: cannot find symbol
LeadHoe.ModLoader.addOverride("/gui/items.png", "/PbHoe.png");
^
symbol: variable ModLoader
location: variable LeadHoe of type Item
src\minecraft\net\minecraft\src\mod_tutorials.java:45: error: cannot find symbol
ModLoader.addRecipe(new ItemStack(LeaddHoe, 1), new Object[]{
^
symbol: variable LeaddHoe
location: class mod_tutorials
src\minecraft\net\minecraft\src\mod_tutorials.java:48: error: cannot find symbol
LeadSword.ModLoader.addOverride("/gui/items.png", "/PbSword.png"
);
^
symbol: variable ModLoader
location: variable LeadSword of type Item
11 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
My coding:
Your code is still referencing EnumToolMaterial. Did you make your own class that has the LEAD type in it?
Have a look at EntityPigZombie.
together they are powerful beyond imagination."
Yes Ive made an 'EnumToolMaterialLead'
You mainly need to change your references now, wherever they may be. So anything in your mod_* class or anywhere in the tool classes you created (sword, pickaxe, etc) that references
EnumToolMaterialshould be changed to EnumToolMaterialLead.Example:
Post them. In spoilers preferably.
# found jad, jad patches, ff patches, osx patches, srgs, name csvs, doc csvs, pa
ram csvs, astyle, astyle config
== Recompiling client ==
> Cleaning bin
> Recompiling
'"C:\Program Files\Java\jdk1.7.0_04\bin\javac" -Xlint:-options -deprecation -g -
source 1.6 -target 1....' failed : 1
== ERRORS FOUND ==
src\minecraft\net\minecraft\src\ItemLeadTool.java:12: error: cannot find symbol
toolMaterial = par3EnumToolMaterialLead;
^
symbol: variable par3EnumToolMaterialLead
location: class ItemLeadTool
src\minecraft\net\minecraft\src\ItemLeadTool.java:15: error: cannot find symbol
setMaxDamage(par3EnumToolMaterialLead.getMaxUses());
^
symbol: variable par3EnumToolMaterialLead
location: class ItemLeadTool
src\minecraft\net\minecraft\src\ItemLeadTool.java:16: error: cannot find symbol
efficiencyOnProperMaterial = par3EnumToolMaterialLead.getEfficiencyOnPro
perMaterial();
^
symbol: variable par3EnumToolMaterialLead
location: class ItemLeadTool
src\minecraft\net\minecraft\src\ItemLeadTool.java:17: error: cannot find symbol
damageVsEntity = j + par3EnumToolMaterialLead.getDamageVsEntity();
^
symbol: variable par3EnumToolMaterialLead
location: class ItemLeadTool
src\minecraft\net\minecraft\src\ItemLeadAxe.java:7: error: constructor ItemLeadT
ool in class ItemLeadTool cannot be applied to given types;
super(par1, 3, par2EnumToolMaterialLead, blocksEffectiveAgainst);
^
required: int,int,EnumToolMaterial,Block[]
found: int,int,EnumToolMaterialLead,Block[]
reason: actual argument EnumToolMaterialLead cannot be converted to EnumToolMa
terial by method invocation conversion
src\minecraft\net\minecraft\src\ItemLeadPickaxe.java:7: error: constructor ItemL
eadTool in class ItemLeadTool cannot be applied to given types;
super(par1, 2, par2EnumToolMaterialLead, blocksEffectiveAgainst);
^
required: int,int,EnumToolMaterial,Block[]
found: int,int,EnumToolMaterialLead,Block[]
reason: actual argument EnumToolMaterialLead cannot be converted to EnumToolMa
terial by method invocation conversion
src\minecraft\net\minecraft\src\ItemLeadSpade.java:7: error: constructor ItemLea
dTool in class ItemLeadTool cannot be applied to given types;
super(par1, 1, par2EnumToolMaterialLead, blocksEffectiveAgainst)
;
^
required: int,int,EnumToolMaterial,Block[]
found: int,int,EnumToolMaterialLead,Block[]
reason: actual argument EnumToolMaterialLead cannot be converted to EnumToolMa
terial by method invocation conversion
src\minecraft\net\minecraft\src\mod_tutorials.java:28: error: cannot find symbol
LeadPickaxe.ModLoader.addOverride("/gui/items.png", "/PbPickaxe.
png");
^
symbol: variable ModLoader
location: variable LeadPickaxe of type Item
src\minecraft\net\minecraft\src\mod_tutorials.java:33: error: cannot find symbol
LeadAxe.ModLoader.addOverride("/gui/items.png", "/PbAxe.png");
^
symbol: variable ModLoader
location: variable LeadAxe of type Item
src\minecraft\net\minecraft\src\mod_tutorials.java:38: error: cannot find symbol
LeadSpade.ModLoader.addOverride("/gui/items.png", "/PbSpade.png"
);
^
symbol: variable ModLoader
location: variable LeadSpade of type Item
src\minecraft\net\minecraft\src\mod_tutorials.java:43: error: cannot find symbol
LeadHoe.ModLoader.addOverride("/gui/items.png", "/PbHoe.png");
^
symbol: variable ModLoader
location: variable LeadHoe of type Item
src\minecraft\net\minecraft\src\mod_tutorials.java:45: error: cannot find symbol
ModLoader.addRecipe(new ItemStack(LeaddHoe, 1), new Object[]{
^
symbol: variable LeaddHoe
location: class mod_tutorials
src\minecraft\net\minecraft\src\mod_tutorials.java:48: error: cannot find symbol
LeadSword.ModLoader.addOverride("/gui/items.png", "/PbSword.png"
);
^
symbol: variable ModLoader
location: variable LeadSword of type Item
13 errors
==================
!! Can not find server sources, try decompiling !!
Press any key to continue . . .
What are the names of your tool classes? Do you just have it set to LeadSword, LeadPickaxe, etc, or something?
In the following line, "ItemLeadPickaxe" (after "= new") should be the name of your pickaxe class.
Same goes for the other tools, respectively.
It may have stopped if you accidentally gave the block the same ID as another, or if you forgot to change the name while declaring its parts. If you copy and paste bits of your code a lot (declarations and such), make sure to look at each addition closely. You may have forgotten to change something in one of the bits that defines your block, like these areas:
public static final Block blockExample= new Block(134, 0).setBlockName("blockExample").setHardness(1.5F).setResistance(10F).setStepSound(Block.soundStoneFootstep);
ModLoader.registerBlock(blockExample);
blockExample.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/Example/Blocks/blockExample.png");
ModLoader.addName(blackBasalt, "Black Basalt");
ModLoader.addRecipe(new ItemStack(blockExample, 4), new Object [] {"#", Character.valueOf('#'), Block.dirt});
Honestly, I'm bad at reading error reports. Though, if you show me the code you have in your class files (All of them, the mod_*, your tools, your EnumToolMaterialLead...) I could try and help pinpoint the problem. If you'd prefer, you can send them in a private message. Else, post them here. Someone besides me may provide the solution. It's up to you. Just make sure to put each code in its own separate spoiler.
Code 1:
Code 2:
Code 3:
I sent you a message.
Put this in the constructor of the biome file. The three numbers mean the same as they do in the ModLoader.addSpawn line.
together they are powerful beyond imagination."
I don't do Skype, ever.
together they are powerful beyond imagination."