Can you make me a mod that adds mini trucks and car and people? I'm building a mini model of a city, and
each building space will be about 5x5 blocks. can you make a mod that adds city details like that?
I've mad an Iron Rod mod (viewtopic.php?f=1032&t=277625) and I am currently trying to make the mod only use new classes, without editing original ones. So far it's been going great, though I've had to make copies of the EnumToolMaterial, ItemPickaxe/Axe etc. and ItemTool classes. I've redirected all of my code to these classes, and everything seems to work, save for one problem - all of my pickaxes dig everything as slowly as an empty hand and don't give any drops, and all of my shovels dig snow blocks and snow layers as slowly as by hand and don't give drops. Interestingly enough, shovels still work on all other materials as they should, and the swords, axes and hoes work perfectly. I have the feeling that this has something to do with how the game determines if you have the right tool to get the drop, but I don't know where to look. Help is greatly appreciated. :smile.gif:
Alright, I've got a challenge for you. Here's the save file: http://www.mediafire.com/?pjoh9uwv7v3g7y6 it's clean except for modloader TMI and a personal mod i made, however if you just have modloader you should be able to load it without any problems.
Place a block directly above the redstone torch (or remove and replace). What happens on my end is that it flips out and eventually turns off with a hiss, which was done as a safety precaution against things like a 1 clock, or what have you. However in no way is this torch powering itself, the loop doesn't exist. Now I've been able to find that this occurs in the onNeighborBlockChange function of (presumably) the redstone torch. However i am nowhere near skilled enough to be able to fix this glitch. Think you're up to it?
The loop does exist XD
The block above a redstone torch gets powered when the torch is "ON".
And the block powers the wire witch is directly connected with the block.
I've mad an Iron Rod mod (viewtopic.php?f=1032&t=277625) and I am currently trying to make the mod only use new classes, without editing original ones. So far it's been going great, though I've had to make copies of the EnumToolMaterial, ItemPickaxe/Axe etc. and ItemTool classes. I've redirected all of my code to these classes, and everything seems to work, save for one problem - all of my pickaxes dig everything as slowly as an empty hand and don't give any drops, and all of my shovels dig snow blocks and snow layers as slowly as by hand and don't give drops. Interestingly enough, shovels still work on all other materials as they should, and the swords, axes and hoes work perfectly. I have the feeling that this has something to do with how the game determines if you have the right tool to get the drop, but I don't know where to look. Help is greatly appreciated. :smile.gif:
Hm... I saw this somewhere but I forgot where...
I'll take a look.
EDIT:
EDIT#2: Do you have this in your shovel class?
I've mad an Iron Rod mod (viewtopic.php?f=1032&t=277625) and I am currently trying to make the mod only use new classes, without editing original ones. So far it's been going great, though I've had to make copies of the EnumToolMaterial, ItemPickaxe/Axe etc. and ItemTool classes. I've redirected all of my code to these classes, and everything seems to work, save for one problem - all of my pickaxes dig everything as slowly as an empty hand and don't give any drops, and all of my shovels dig snow blocks and snow layers as slowly as by hand and don't give drops. Interestingly enough, shovels still work on all other materials as they should, and the swords, axes and hoes work perfectly. I have the feeling that this has something to do with how the game determines if you have the right tool to get the drop, but I don't know where to look. Help is greatly appreciated. :smile.gif:
Hm... I saw this somewhere but I forgot where...
I'll take a look.
EDIT:
EDIT#2:
Do you have this in your shovel class?
Yeah, I do - I just changed ItemTool to ItemToolIron(which is what my new ItemTool class is called), and all of the EnumToolMaterial to EnumToolMaterialIron. Other that the name changes, it's identical to the normal ItemSpade.
package net.minecraft.src;
public class ItemToolIron extends ItemTool
{
public ItemToolIron(int i, int j, EnumToolMaterialIron enumtoolmaterialiron, Block ablock[])
{
Item(i);
efficiencyOnProperMaterial = 12F;
toolMaterial = enumtoolmaterialiron;
blocksEffectiveAgainst = ablock;
maxStackSize = 1;
setMaxDamage(enumtoolmaterialiron.getMaxUses());
efficiencyOnProperMaterial = enumtoolmaterialiron.getEfficiencyOnProperMaterial();
damageVsEntity = j + enumtoolmaterialiron.getDamageVsEntity();
}
public float getStrVsBlock(ItemStack itemstack, Block block)
{
for(int i = 0; i < blocksEffectiveAgainst.length; i++)
{
if(blocksEffectiveAgainst[i] == block)
{
return efficiencyOnProperMaterial;
}
}
return 1.0F;
}
public boolean hitEntity(ItemStack itemstack, EntityLiving entityliving, EntityLiving entityliving1)
{
itemstack.func_25190_a(2, entityliving1);
return true;
}
public boolean func_25008_a(ItemStack itemstack, int i, int j, int k, int l, EntityLiving entityliving)
{
itemstack.func_25190_a(1, entityliving);
return true;
}
public int getDamageVsEntity(Entity entity)
{
return damageVsEntity;
}
public boolean isFull3D()
{
return true;
}
private Block blocksEffectiveAgainst[];
private float efficiencyOnProperMaterial;
private int damageVsEntity;
protected EnumToolMaterialIron toolMaterial;
}
*** Minecraft Coder Pack Version 2.11 ***
MCP 2.11 running in C:\Documents and Settings\Administrator.ILIA\Desktop\mcp2
Compiling Minecraft
sources\minecraft\net\minecraft\src\ItemToolIron.java:7: cannot find symbol
symbol : constructor ItemTool()
location: class net.minecraft.src.ItemTool
{
^
sources\minecraft\net\minecraft\src\ItemToolIron.java:8: cannot find symbol
symbol : method Item(int)
location: class net.minecraft.src.ItemToolIron
Item(i);
^
2 errors
*** minecraft_server.jar was not found, skipping
=== MCP 2.11 recompile script finished ===
Press any key to continue . . .
Ok since no1 has posted one useful thing about minecart physics I'm gunna ask here.
I'm modding, using mcp, to make powered minecarts better. I've got them running indefinitely but I'm having trouble changing the physics to make it so powered minecarts run faster, and can push a mounted minecart (or several) up a 1:1 slope. I think I understand where in entityminecart that physics is applied (on update gives powered minecarts push, and applyentitycollision for bumping into minecarts). Any help is appreciated
Modloader didn't like the names you where using.
This one worked for me:
If you get a black screen there should be a text file in .minecraft called ModLoader.txt.
Copy and paste it's contents here plox.
It's a error report file.
- I just learned about it today :biggrin.gif:
if(world.isBlockOpaqueCube(i, j, k))
{
return true;
}
if block at x, y, z is solid...
a torch can be placed.
You wan't to leave this method blank in your class so your block can be placed everywhere :biggrin.gif:
http://www.minecraftforum.net/viewtopic.php?f=1039&t=269735#p3774833
So I want to remove that code you posted? I got a little confused because you were telling me to add it :/
The loop does exist XD
The block above a redstone torch gets powered when the torch is "ON".
And the block powers the wire witch is directly connected with the block.
I believe it has to be directly connected.
See here ->
If you extend the redstone torch block class then I THINK you need to add that code to the redstone torch block class.
If you are just extending the torch block class you do not need to add the code to the redstone torch block class.
You DO need to add this to your class:
Sorry for the confusion :biggrin.gif:
Hm... I saw this somewhere but I forgot where...
I'll take a look.
EDIT:
EDIT#2:
Do you have this in your shovel class?
EDIT#3:
Actually just this to your new pickaxe and see what happens:
And this to your new shovel
Yeah, I do - I just changed ItemTool to ItemToolIron(which is what my new ItemTool class is called), and all of the EnumToolMaterial to EnumToolMaterialIron. Other that the name changes, it's identical to the normal ItemSpade.
Edited my post a bit too late >.<
You mean change
"extends ItemToolIron" to "extends ItemSpade"?
No like this:
EDIT:
Oh snap nm.
I see...
And here's what the compiler says:
And change the super(i); in ItemToolIron to
Tell me how that works.
Wait, add
to the ItemSpadeIron, or ItemToolIron?
I'm not sure...
I recommend looking at this guys code -> http://www.minecraftforum.net/viewtopic.php?f=25&t=129546
Yup.
public void addRecipe is outdated.
Add it to the constructor:
These where very helpful for me.
Keep in mind some of it is outdated.
[Creating Mods] Modding tutorials [22/3/11]
[Creating Mods]Modding Tutorials: Absolute Beginner [9/3/11]
Minecraft MCP tutorial Collection