“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
I need help i wan't my custom mob mod to like, when he walks hes legs move you know what i mean??
here's my codes
mod_CheesModel
package net.minecraft.src;
import java.util.Map;
public class mod_CheesModel extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityCheesModel.class, "CheesModel", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityCheesModel.class, 5, 5, 7, EnumCreatureType.creature);
}
public void addRenderer(Map map)
{
map.put(EntityCheesModel.class, new RenderCheesModel(new ModelCheesModel(), 0.5F));
}
public String getVersion()
{
return "1.1";
}
}
EntityCheesModel
package net.minecraft.src;
import java.util.Random;
public class EntityCheesModel extends EntityMob {
public EntityCheesModel(World world)
{
super(world);
texture = "/Chees/CheesModel.png";
moveSpeed = 0.5F;
isImmuneToFire = false;
attackStrength = 4; //This line can only be here if the class extends EntityMob above ^^^. If it doesn't, just delete this whole line
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.human.deafult";
}
protected String getHurtSound()
{
return "mob.human.defaulthurt";
}
protected String getDeathSound()
{
return "mob.human.defaultdeath";
}
public int getMaxHealth1()
{
return 5001;
}
{
}
}
I need help i wan't my custom mob mod to like, when he walks hes legs move you know what i mean??
here's my codes
mod_CheesModel
package net.minecraft.src;
import java.util.Map;
public class mod_CheesModel extends BaseMod
{
public void load()
{
ModLoader.registerEntityID(EntityCheesModel.class, "CheesModel", ModLoader.getUniqueEntityId());
ModLoader.addSpawn(EntityCheesModel.class, 5, 5, 7, EnumCreatureType.creature);
}
public void addRenderer(Map map)
{
map.put(EntityCheesModel.class, new RenderCheesModel(new ModelCheesModel(), 0.5F));
}
public String getVersion()
{
return "1.1";
}
}
EntityCheesModel
package net.minecraft.src;
import java.util.Random;
public class EntityCheesModel extends EntityMob {
public EntityCheesModel(World world)
{
super(world);
texture = "/Chees/CheesModel.png";
moveSpeed = 0.5F;
isImmuneToFire = false;
attackStrength = 4; //This line can only be here if the class extends EntityMob above ^^^. If it doesn't, just delete this whole line
}
public int getMaxHealth()
{
return 20;
}
protected String getLivingSound()
{
return "mob.human.deafult";
}
protected String getHurtSound()
{
return "mob.human.defaulthurt";
}
protected String getDeathSound()
{
return "mob.human.defaultdeath";
}
public int getMaxHealth1()
{
return 5001;
}
{
}
}
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\client\Minecraft.java:45: error: cannot access GuiIn
gameMenu
import net.minecraft.src.GuiIngameMenu;
^
bad source file: src\minecraft\net\minecraft\src\GuiIngameMenu.java
file does not contain class net.minecraft.src.GuiIngameMenu
Please remove or make sure it appears in the correct subdirectory of the sou
rcepath.
Hey Dude, I really love your tutorials. But.... (not a bad thing)
can you make a tutorial on how to make a block generate on the surface. I'm making a mod and im trying to make a bush. I just dont know how to make it generate on the surface. Much less, Generate at all. And I dont know how to make the block drop a item.
Please Please Please Pretty Please? Help!!
However, when i attempt to recompile it gives me 34 errors, most of them saying "illegal start of type" or "; expected" or "<identifier> expected". I have in fact modified EnumToolMaterial as well, if you want I can post the changed version too.
package net.minecraft.src;
public class mod_ObsidianTools extends BaseMod
{
public String getVersion( )
{
return "1.2_03";
}
public static final Item blackPick = new ItemPickaxe(350, EnumToolMaterial.OBSIDIAN).setItemName("blackPick");
public static final Item blackSpade = new ItemSpade(351, EnumToolMaterial.OBSIDIAN).setItemName("blackSpade");
public static final Item blackAxe = new ItemAxe(352, EnumToolMaterial.OBSIDIAN).setItemName("blackAxe");
public static final Item blackHoe = new ItemHoe(353, EnumToolMaterial.OBSIDIAN).setItemName("blackHoe");
public static final Item blackSword = new ItemSword(354, EnumToolMaterial.OBSIDIAN).setItemName("blackSword");
public static void AddRecipe(new ItemStack(blackPick, 1), new Object [] {"###"," X "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick });
public static void AddRecipe(new ItemStack(blackSpade, 1), new Object [] {" # "," X "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick });
public static void AddRecipe(new ItemStack(blackAxe, 1), new Object [] {"## ","#X "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick });
public static void AddRecipe(new ItemStack(blackHoe, 1), new Object [] {"## "," X "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick });
public static void AddRecipe(new ItemStack(blackSword, 1), new Object [] {" # "," # "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick });
public mod_ObsidianTools( )
{
blackPick.iconIndex = ModLoader.addOverride("/gui/items.png", "/platypus364/blackPick.png");
blackSpade.iconIndex = Modloader.addOverride("/gui/items.png", "/platypus364/blackSpade.png");
blackAxe.iconIndex = Modloader.addOverride("/gui/items.png", "/platypus364/blackAxe.png");
blackHoe.iconIndex = Modloader.addOverride("/gui/items.png", "/platypus364/blackHoe.png");
blackSword.iconIndex = Modloader.addOverride("/gui/items.png", "/platypus364/blackSword.png");
Modloader.AddName(blackPick, "Obsidian Pickaxe");
Modloader.AddName(blackSpade, "Obsidian Shovel");
Modloader.AddName(blackAxe, "Obsidian Axe");
Modloader.AddName(blackHoe, "Obsidian Hoe");
Modloader.AddName(blackSword, "Obsidian Sword");
}
}
EDIT: I just looked back at the original post you made, some of this should be in a 'public void load' shouldn't it? Sorry, I used to use an old tut that was outdated and didn't mention the 'public void load' thing.
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\client\Minecraft.java:45: error: cannot access GuiIn
gameMenu
import net.minecraft.src.GuiIngameMenu;
^
bad source file: src\minecraft\net\minecraft\src\GuiIngameMenu.java
file does not contain class net.minecraft.src.GuiIngameMenu
Please remove or make sure it appears in the correct subdirectory of the sou
rcepath.
this is whut i get...
Decompile minecraft in another MCP elsewhere, get the GuiIngameMenu class from src and put it in the src of the MCP that you are making your mod with.
Hey Dude, I really love your tutorials. But.... (not a bad thing)
can you make a tutorial on how to make a block generate on the surface. I'm making a mod and im trying to make a bush. I just dont know how to make it generate on the surface. Much less, Generate at all. And I dont know how to make the block drop a item.
Please Please Please Pretty Please? Help!!
I'll make a block/ore gen tutorial this afternoon. For the block dropping the item, just change what the idDropped method returns in your block class.
public int idDropped(Random random)
{
return Item.itemname.shiftedIndex
}
or
public int idDropped(Random random)
{
return mod_Namehere.itemname.shiftedIndex
}
That sort of thing. Just make sure you are referencing to the item correctly and you are using shiftedIndex.
I was talking to TheInstitution a while ago, and he said his dimension tut would be mainly base class editing. He could have changed his plans by now but just a heads up
However, when i attempt to recompile it gives me 34 errors, most of them saying "illegal start of type" or "; expected" or "<identifier> expected". I have in fact modified EnumToolMaterial as well, if you want I can post the changed version too.
package net.minecraft.src;
public class mod_ObsidianTools extends BaseMod
{
public String getVersion( )
{
return "1.2_03";
}
public static final Item blackPick = new ItemPickaxe(350, EnumToolMaterial.OBSIDIAN).setItemName("blackPick");
public static final Item blackSpade = new ItemSpade(351, EnumToolMaterial.OBSIDIAN).setItemName("blackSpade");
public static final Item blackAxe = new ItemAxe(352, EnumToolMaterial.OBSIDIAN).setItemName("blackAxe");
public static final Item blackHoe = new ItemHoe(353, EnumToolMaterial.OBSIDIAN).setItemName("blackHoe");
public static final Item blackSword = new ItemSword(354, EnumToolMaterial.OBSIDIAN).setItemName("blackSword");
public static void AddRecipe(new ItemStack(blackPick, 1), new Object [] {"###"," X "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick });
public static void AddRecipe(new ItemStack(blackSpade, 1), new Object [] {" # "," X "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick });
public static void AddRecipe(new ItemStack(blackAxe, 1), new Object [] {"## ","#X "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick });
public static void AddRecipe(new ItemStack(blackHoe, 1), new Object [] {"## "," X "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick });
public static void AddRecipe(new ItemStack(blackSword, 1), new Object [] {" # "," # "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick });
public mod_ObsidianTools( )
{
blackPick.iconIndex = ModLoader.addOverride("/gui/items.png", "/platypus364/blackPick.png");
blackSpade.iconIndex = Modloader.addOverride("/gui/items.png", "/platypus364/blackSpade.png");
blackAxe.iconIndex = Modloader.addOverride("/gui/items.png", "/platypus364/blackAxe.png");
blackHoe.iconIndex = Modloader.addOverride("/gui/items.png", "/platypus364/blackHoe.png");
blackSword.iconIndex = Modloader.addOverride("/gui/items.png", "/platypus364/blackSword.png");
Modloader.AddName(blackPick, "Obsidian Pickaxe");
Modloader.AddName(blackSpade, "Obsidian Shovel");
Modloader.AddName(blackAxe, "Obsidian Axe");
Modloader.AddName(blackHoe, "Obsidian Hoe");
Modloader.AddName(blackSword, "Obsidian Sword");
}
}
Change all the
ModLoader.AddRecipe
to
ModLoader.addRecipe
and
ModLoader.AddName
to
ModLoader.addName
Risugami changed the ModLoader methods in 1.2 to the correct 'camel casing' format.
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
Thanks for making these tutorials, TechGuy! They're a great help.
I'm looking forward to your tutorial on world generation stuff. On that subject, I was wondering about something. Is it possible to generate not just a vein of a block, but a whole layer? E.g. a new type of stone that replaces all regular stone (but not the ores and stuff, of course) below a certain height.
It might be possible, haven't really tried anything like that before so I'm not sure.
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
that's easy
instead of Block.fence.blockID
put mod_***.(Ur item/block).shiftedIndex/blockID
.shiftedIndex is for Items you made, .blockID is for the block's you made
thanx!
Problem Solved:)What do I have to type in addRecipe if I want to use cocoa beans to make some other stuff?
It doesn't work if I just type in Item.dyePowder......
What do I have to type in addRecipe if I want to use cocoa beans to make some other stuff?
It doesn't work if I just type in Item.dyePowder......
Look in the recipes section under "Using Dyes"
Rollback Post to RevisionRollBack
“Computers are incredibly fast, accurate and stupid; humans are incredibly slow, inaccurate and brilliant; together they are powerful beyond imagination."
To post a comment, please login or register a new account.
together they are powerful beyond imagination."
here's my codes
mod_CheesModel
package net.minecraft.src; import java.util.Map; public class mod_CheesModel extends BaseMod { public void load() { ModLoader.registerEntityID(EntityCheesModel.class, "CheesModel", ModLoader.getUniqueEntityId()); ModLoader.addSpawn(EntityCheesModel.class, 5, 5, 7, EnumCreatureType.creature); } public void addRenderer(Map map) { map.put(EntityCheesModel.class, new RenderCheesModel(new ModelCheesModel(), 0.5F)); } public String getVersion() { return "1.1"; } }EntityCheesModel
package net.minecraft.src; import java.util.Random; public class EntityCheesModel extends EntityMob { public EntityCheesModel(World world) { super(world); texture = "/Chees/CheesModel.png"; moveSpeed = 0.5F; isImmuneToFire = false; attackStrength = 4; //This line can only be here if the class extends EntityMob above ^^^. If it doesn't, just delete this whole line } public int getMaxHealth() { return 20; } protected String getLivingSound() { return "mob.human.deafult"; } protected String getHurtSound() { return "mob.human.defaulthurt"; } protected String getDeathSound() { return "mob.human.defaultdeath"; } public int getMaxHealth1() { return 5001; } { } }RenderCheesModel
package net.minecraft.src; import org.lwjgl.opengl.GL11; public class RenderCheesModel extends RenderLiving { protected ModelCheesModel ModelCheesModelMain; protected float field_40296_d; public RenderCheesModel(ModelCheesModel ModelCheesModel, float f) { this(ModelCheesModel, f, 1.0F); ModelCheesModelMain = ModelCheesModel; } public RenderCheesModel(ModelCheesModel ModelCheesModel, float f, float f1) { super(ModelCheesModel, f); ModelCheesModelMain = ModelCheesModel; field_40296_d = f1; } }ModelCheesModel
package net.minecraft.src; public class ModelCheesModel extends ModelBase { //fields ModelRenderer head; ModelRenderer body; ModelRenderer rightarm; ModelRenderer leftarm; ModelRenderer rightleg; ModelRenderer leftleg; public ModelCheesModel () { textureWidth = 64; textureHeight = 32; head = new ModelRenderer(this, 0, 0); head.addBox(-4F, -8F, -4F, 8, 8, 8); head.setRotationPoint(0F, 12F, 0F); head.setTextureSize(64, 32); head.mirror = true; setRotation(head, 0F, 0F, 0F); body = new ModelRenderer(this, 16, 16); body.addBox(-4F, 8F, -2F, 8, 12, 4); body.setRotationPoint(0F, 4F, 0F); body.setTextureSize(64, 32); body.mirror = true; setRotation(body, 0F, 0F, 0F); rightarm = new ModelRenderer(this, 40, 16); rightarm.addBox(-3F, -2F, -2F, 4, 12, 4); rightarm.setRotationPoint(-5F, 14F, 0F); rightarm.setTextureSize(64, 32); rightarm.mirror = true; setRotation(rightarm, -0.7004588F, -0.0255982F, 0F); leftarm = new ModelRenderer(this, 40, 16); leftarm.addBox(-1F, 11F, 3F, 4, 12, 4); leftarm.setRotationPoint(5F, 0F, 0F); leftarm.setTextureSize(64, 32); leftarm.mirror = true; setRotation(leftarm, -0.395608F, 0F, 0F); rightleg = new ModelRenderer(this, 0, 16); rightleg.addBox(-2F, 0F, -4F, 4, 12, 4); rightleg.setRotationPoint(-2F, 20F, 0F); rightleg.setTextureSize(64, 32); rightleg.mirror = true; setRotation(rightleg, 1.570796F, 0F, 0F); rightleg.mirror = false; leftleg = new ModelRenderer(this, 0, 16); leftleg.addBox(-2F, 0F, -2F, 4, 12, 4); leftleg.setRotationPoint(2F, 22F, 0F); leftleg.setTextureSize(64, 32); leftleg.mirror = true; setRotation(leftleg, 1.583595F, 0F, 0F); } public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5); head.render(f5); body.render(f5); rightarm.render(f5); leftarm.render(f5); rightleg.render(f5); leftleg.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5) { super.setRotationAngles(f, f1, f2, f3, f4, f5); } }Is the model any different to a biped?
together they are powerful beyond imagination."
Errorlog:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
at net.minecraft.client.Minecraft.main(Minecraft.java:2511)
at Start.main(Start.java:22)
before i just gained a java.nullpointerexception from Eclipse in a window saying that it was an internal error, but it doesnt pop up atm...
http://www.minecraftsao.org/
Check it out!
Delete your ModelCheesModel and RenderCheesModel files, then do this is your mod_ class
public void addRenderer(Map map) { map.put(EntityCheesModel.class, new RenderBiped(new ModelBiped(), 0.5F)); }Run the recompile.bat in MCP, then try and run through Eclipse again. That always works for me when that happens.
together they are powerful beyond imagination."
its still recompiling but:
== ERRORS FOUND ==
warning: [options] bootstrap class path not set in conjunction with -source 1.6
src\minecraft\net\minecraft\client\Minecraft.java:45: error: cannot access GuiIn
gameMenu
import net.minecraft.src.GuiIngameMenu;
^
bad source file: src\minecraft\net\minecraft\src\GuiIngameMenu.java
file does not contain class net.minecraft.src.GuiIngameMenu
Please remove or make sure it appears in the correct subdirectory of the sou
rcepath.
http://www.minecraftsao.org/
Check it out!
How would i do it if i had a base?
Somebody is making one this week! Here!> http://www.minecraftforum.net/topic/1030464-creating-mods-123-advanced-modding-tutorials/page__gopid__12877705#entry12877705
can you make a tutorial on how to make a block generate on the surface. I'm making a mod and im trying to make a bush. I just dont know how to make it generate on the surface. Much less, Generate at all. And I dont know how to make the block drop a item.
Please Please Please Pretty Please? Help!!
However, when i attempt to recompile it gives me 34 errors, most of them saying "illegal start of type" or "; expected" or "<identifier> expected". I have in fact modified EnumToolMaterial as well, if you want I can post the changed version too.
package net.minecraft.src; public class mod_ObsidianTools extends BaseMod { public String getVersion( ) { return "1.2_03"; } public static final Item blackPick = new ItemPickaxe(350, EnumToolMaterial.OBSIDIAN).setItemName("blackPick"); public static final Item blackSpade = new ItemSpade(351, EnumToolMaterial.OBSIDIAN).setItemName("blackSpade"); public static final Item blackAxe = new ItemAxe(352, EnumToolMaterial.OBSIDIAN).setItemName("blackAxe"); public static final Item blackHoe = new ItemHoe(353, EnumToolMaterial.OBSIDIAN).setItemName("blackHoe"); public static final Item blackSword = new ItemSword(354, EnumToolMaterial.OBSIDIAN).setItemName("blackSword"); public static void AddRecipe(new ItemStack(blackPick, 1), new Object [] {"###"," X "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick }); public static void AddRecipe(new ItemStack(blackSpade, 1), new Object [] {" # "," X "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick }); public static void AddRecipe(new ItemStack(blackAxe, 1), new Object [] {"## ","#X "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick }); public static void AddRecipe(new ItemStack(blackHoe, 1), new Object [] {"## "," X "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick }); public static void AddRecipe(new ItemStack(blackSword, 1), new Object [] {" # "," # "," X ", Character.valueOf('#'), Block.obsidian, Character.valueOf('X'), Item.stick }); public mod_ObsidianTools( ) { blackPick.iconIndex = ModLoader.addOverride("/gui/items.png", "/platypus364/blackPick.png"); blackSpade.iconIndex = Modloader.addOverride("/gui/items.png", "/platypus364/blackSpade.png"); blackAxe.iconIndex = Modloader.addOverride("/gui/items.png", "/platypus364/blackAxe.png"); blackHoe.iconIndex = Modloader.addOverride("/gui/items.png", "/platypus364/blackHoe.png"); blackSword.iconIndex = Modloader.addOverride("/gui/items.png", "/platypus364/blackSword.png"); Modloader.AddName(blackPick, "Obsidian Pickaxe"); Modloader.AddName(blackSpade, "Obsidian Shovel"); Modloader.AddName(blackAxe, "Obsidian Axe"); Modloader.AddName(blackHoe, "Obsidian Hoe"); Modloader.AddName(blackSword, "Obsidian Sword"); } }EDIT: I just looked back at the original post you made, some of this should be in a 'public void load' shouldn't it? Sorry, I used to use an old tut that was outdated and didn't mention the 'public void load' thing.
If I helped you at all or made a nice post, go ahead and click the green plus over there if you want.
Decompile minecraft in another MCP elsewhere, get the GuiIngameMenu class from src and put it in the src of the MCP that you are making your mod with.
What do you mean?
What do you mean?
I'll make a block/ore gen tutorial this afternoon. For the block dropping the item, just change what the idDropped method returns in your block class.
public int idDropped(Random random) { return Item.itemname.shiftedIndex }or
public int idDropped(Random random) { return mod_Namehere.itemname.shiftedIndex }That sort of thing. Just make sure you are referencing to the item correctly and you are using shiftedIndex.
I was talking to TheInstitution a while ago, and he said his dimension tut would be mainly base class editing. He could have changed his plans by now but just a heads up
Change all the
to
and
to
Risugami changed the ModLoader methods in 1.2 to the correct 'camel casing' format.
And change
to
together they are powerful beyond imagination."
Yay, it works perfectly! The only issue is that the background in my textures is white, not transparent o.o
Thanks!
If I helped you at all or made a nice post, go ahead and click the green plus over there if you want.
your like the only person that keeps responding to everyones errors and stuff. you deserve alot more attention.
package net.minecraft.src; public class mod_UraniumOre extends BaseMod { public static final Block UraniumOre = new BlockUraniumOre(1455, 0).setBlockName("Uranium Ore").setHardness(3F).setResistance(7F).setLightValue(1F); public void load() { UraniumOre.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/New/UraniumOre.png"); ModLoader.registerBlock(UraniumOre); ModLoader.addName(UraniumOre, "Uranium Ore"); ModLoader.addRecipe(new ItemStack(UraniumOre, 1), new Object [] {"#", "#", Character.valueOf('#'), Block.dirt}); } public String getVersion() { return "1.1"; } }Error (NOTE: I get no errors when recompiling just when running minecraft)
Any Idea Whats Going on?
public boolean interact(EntityPlayer par1EntityPlayer)
{
ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem();
if (!func_48139_F_())
{
if (itemstack != null && itemstack.itemID == Item.bone.shiftedIndex && !isAngry())
{
itemstack.stackSize--;
if (itemstack.stackSize <= 0)
{
par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null);
}
if (!worldObj.isRemote)
{
if (rand.nextInt(3) == 0)
{
func_48138_b(true);
setPathToEntity(null);
func_48092_c(null);
field_48146_a.func_48407_a(true);
setEntityHealth(20);
func_48143_a(par1EntityPlayer.username);
func_48142_a(true);
worldObj.setEntityState(this, (byte)7);
}
else
{
func_48142_a(false);
worldObj.setEntityState(this, (byte)6);
}
}
return true;
}
}
else
{
if (itemstack != null && (Item.itemsList[itemstack.itemID] instanceof ItemFood))
{
ItemFood itemfood = (ItemFood)Item.itemsList[itemstack.itemID];
if (itemfood.isWolfsFavoriteMeat() && dataWatcher.getWatchableObjectInt(18) < 20)
{
itemstack.stackSize--;
heal(itemfood.getHealAmount());
if (itemstack.stackSize <= 0)
{
par1EntityPlayer.inventory.setInventorySlotContents(par1EntityPlayer.inventory.currentItem, null);
}
return true;
}
}
if (par1EntityPlayer.username.equalsIgnoreCase(func_48145_ag()) && !worldObj.isRemote && !isWheat(itemstack))
{
field_48146_a.func_48407_a(!func_48141_af());
isJumping = false;
setPathToEntity(null);
}
}
return super.interact(par1EntityPlayer);
}
public void handleHealthUpdate(byte par1)
{
if (par1 == 8)
{
field_25052_g = true;
timeWolfIsShaking = 0.0F;
prevTimeWolfIsShaking = 0.0F;
}
else
{
super.handleHealthUpdate(par1);
}
}
public float setTailRotation()
{
if (isAngry())
{
return 1.53938F;
}
if (func_48139_F_())
{
return (0.55F - (float)(20 - dataWatcher.getWatchableObjectInt(18)) * 0.02F) * (float)Math.PI;
}
else
{
return ((float)Math.PI / 5F);
}
}
/**
* Checks if the parameter is an wheat item.
*/
public boolean isWheat(ItemStack par1ItemStack)
{
if (par1ItemStack == null)
{
return false;
}
if (!(Item.itemsList[par1ItemStack.itemID] instanceof ItemFood))
{
return false;
}
else
{
return ((ItemFood)Item.itemsList[par1ItemStack.itemID]).isWolfsFavoriteMeat();
}
}
ID's still need to be below 255 in 1.2. Even though they have been extended to 4096. It's a bug, and should be fixed soonish.
Should be, just try it and see if it works.
together they are powerful beyond imagination."
It might be possible, haven't really tried anything like that before so I'm not sure.
together they are powerful beyond imagination."
thanx!
Problem Solved:)What do I have to type in addRecipe if I want to use cocoa beans to make some other stuff?
It doesn't work if I just type in Item.dyePowder......
Look in the recipes section under "Using Dyes"
together they are powerful beyond imagination."