Sir, I Enjoy watching your modding tutorials and others.. then i tried out modding.. the first thing we did was making the green gem.. i did what u said no error came up but when i started minecraft it doesnt show the green gem.. i mean there was no green gem at all ..
Would you please help me?
Tnx, Alfihz
PS: I'm using MC1.4.6 and i know a lil bit about java programming since im studying it.
Sir, I Enjoy watching your modding tutorials and others.. then i tried out modding.. the first thing we did was making the green gem.. i did what u said no error came up but when i started minecraft it doesnt show the green gem.. i mean there was no green gem at all ..
Would you please help me?
Tnx, Alfihz
PS: I'm using MC1.4.6 and i know a lil bit about java programming since im studying it.
In your ItemGreenGem class, do you have:" this.setCreativeTab(CreativeTabs.tabMaterials); " under maxStackSize?
Because that (obviously) makes the item appear in the Material tab in creative.
I have two requests. Will you please show us how to edit the pumpkin class to make golems and how to make non-solid blocks? Kinda like fences or glass panes.
to set enchantment effect on your sword just put
public boolean hasEffect(ItemStack par1ItemStack){
return true;
}
in your sword class
please vote this up so scmows can see
Hey, sorry to bother you, but I have a question: My custom mobs won't spawn in the wild. They spawn with eggs, however. They did spawn with 1.4.5, but when I updated to 1.4.6, they disappeared.
mod_*******
package net.minecraft.src;
import java.util.Map;
import java.util.Random;
import java.awt.Color;
public class mod_Reiatsu extends BaseMod
{
public void load()
{
//Whole
ModLoader.registerEntityID(EntityWhole.class, "Whole", 26);//registers the mobs name and id
ModLoader.addSpawn("EntityWhole.class", 3, 3, 4, EnumCreatureType.monster);//makes the mob spawn in game see bottom
ModLoader.addLocalization("entity.Whole.name", "Whole");//adds the name of the mob to the spawn egg
EntityList.entityEggs.put(Integer.valueOf(26), new EntityEggInfo(26, 894137, (new Color(43, 85, 42)).getRGB()));//creates the spawn egg of the specified colors you will have to mess around with it
//Hollow Bat
ModLoader.registerEntityID(EntityHollowBat.class, "BatHollow", 27);//registers the mobs name and id
ModLoader.addSpawn("EntityHollowBat.class", 3, 3, 4, EnumCreatureType.monster);//makes the mob spawn in game see bottom
ModLoader.addLocalization("entity.BatHollow.name", "Hollow");//adds the name of the mob to the spawn egg
EntityList.entityEggs.put(Integer.valueOf(27), new EntityEggInfo(27, 16777215, (new Color(43, 85, 42)).getRGB()));//creates the spawn egg of the specified colors you will have to mess around with it
}
public void addRenderer(Map map)
{
map.put(EntityWhole.class, new RenderLiving(new ModelBiped(),.5f));
map.put(EntityHollowBat.class, new RenderLiving(new ModelHollowBat(),.5f));
}
public String getVersion()
{
return "1.4.6";
}
}
EntityHollowBat
package net.minecraft.src;
import java.util.Random;
public class EntityHollowBat extends EntityMob//extend this to make mob hostile
{
public EntityHollowBat(World par1World)
{
super(par1World);//super call
this.texture = "/bleachmod/mobs/hollow_bat.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 EntityAIAttackOnCollide(this, EntityWhole.class, this.moveSpeed, true));
this.tasks.addTask(3, new EntityAIMoveTwardsRestriction(this, this.moveSpeed));
this.tasks.addTask(4, new EntityAIWander(this, this.moveSpeed));
this.tasks.addTask(5, new EntityAILookIdle(this));
this.tasks.addTask(6, new EntityAILeapAtTarget(this, 0.5F));
this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, false));
this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true));
this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityWhole.class, 16.0F, 0, false));
//end of ai tasks
}
//the amount of damge the mob does i think
public int func_82193_c(Entity par1Entity)
{
return 10;
}
public int getMaxHealth()//says that the mob will have a health of 20
{
return 60;
}
protected boolean isAIEnabled()//says that the tasks we told it to do before will be run
{
return true;
}
/**
* Returns the volume for the sounds this mob makes.
*/
protected float getSoundVolume()
{
return 0.5F;
}
/**
* Gets the pitch of living sounds in living entities.
*/
protected float getSoundPitch()
{
return super.getSoundPitch() * 0.50F;
}
/**
* Returns the sound this mob makes while it's alive.
*/
protected String getLivingSound()
{
return "mob.endermen.stare";
}
/**
* Returns the sound this mob makes when it is hurt.
*/
protected String getHurtSound()
{
return "mob.endermen.death";
}
/**
* Returns the sound this mob makes on death.
*/
protected String getDeathSound()
{
return "mob.endermen.scream";
}
/**
* Returns true if this entity should push and be pushed by other entities when colliding.
*/
public boolean canBePushed()
{
return true;
}
protected boolean canTriggerWalking()
{
return false;
}
protected void fall() {}
public boolean doesEntityNotTriggerPressurePlate()
{
return true;
}
/**
* Returns the item ID for the item the mob drops on death.
*/
protected int getDropItemId()
{
return mod_Reiatsu.Reiatsu.shiftedIndex;
}
protected void dropFewItems(boolean par1, int par2)
{
this.entityDropItem(new ItemStack(mod_Reiatsu.Reiatsu, 10), 0.0F);
}
/**
* Get this Entity's EnumCreatureAttribute
*/
public EnumCreatureAttribute getCreatureAttribute()
{
return EnumCreatureAttribute.SOULS;
}
protected void dropRareDrop(int par1)
{
switch (this.rand.nextInt(3))
{
case 0:
this.dropItem(mod_Reiatsu.Reiatsu.shiftedIndex, 1);
break;
case 1:
this.dropItem(mod_Reiatsu.ReiatsuBlock.blockID, 1);
break;
case 2:
this.dropItem(mod_Reiatsu.HollowHelmet.shiftedIndex, 1);
}
}
protected void entityInit()
{
super.entityInit();
this.dataWatcher.addObject(16, new Byte((byte)0));
}
public void initCreature(){}
}
ModelHollowBat
package net.minecraft.src;
public class ModelHollowBat extends ModelBase
{
private ModelRenderer batHead;
/** The body box of the bat model. */
private ModelRenderer batBody;
/** The inner right wing box of the bat model. */
private ModelRenderer batRightWing;
/** The inner left wing box of the bat model. */
private ModelRenderer batLeftWing;
/** The outer right wing box of the bat model. */
private ModelRenderer batOuterRightWing;
/** The outer left wing box of the bat model. */
private ModelRenderer batOuterLeftWing;
public ModelHollowBat()
{
this.textureWidth = 64;
this.textureHeight = 64;
this.batHead = new ModelRenderer(this, 0, 0);
this.batHead.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6);
ModelRenderer var1 = new ModelRenderer(this, 24, 0);
var1.addBox(-4.0F, -6.0F, -2.0F, 3, 4, 1);
this.batHead.addChild(var1);
ModelRenderer var2 = new ModelRenderer(this, 24, 0);
var2.mirror = true;
var2.addBox(1.0F, -6.0F, -2.0F, 3, 4, 1);
this.batHead.addChild(var2);
this.batBody = new ModelRenderer(this, 0, 16);
this.batBody.addBox(-3.0F, 4.0F, -3.0F, 6, 12, 6);
this.batBody.setTextureOffset(0, 34).addBox(-5.0F, 16.0F, 0.0F, 10, 6, 1);
this.batRightWing = new ModelRenderer(this, 42, 0);
this.batRightWing.addBox(-12.0F, 1.0F, 1.5F, 10, 16, 1);
this.batOuterRightWing = new ModelRenderer(this, 24, 16);
this.batOuterRightWing.setRotationPoint(-12.0F, 1.0F, 1.5F);
this.batOuterRightWing.addBox(-8.0F, 1.0F, 0.0F, 8, 12, 1);
this.batLeftWing = new ModelRenderer(this, 42, 0);
this.batLeftWing.mirror = true;
this.batLeftWing.addBox(2.0F, 1.0F, 1.5F, 10, 16, 1);
this.batOuterLeftWing = new ModelRenderer(this, 24, 16);
this.batOuterLeftWing.mirror = true;
this.batOuterLeftWing.setRotationPoint(12.0F, 1.0F, 1.5F);
this.batOuterLeftWing.addBox(0.0F, 1.0F, 0.0F, 8, 12, 1);
this.batBody.addChild(this.batRightWing);
this.batBody.addChild(this.batLeftWing);
this.batRightWing.addChild(this.batOuterRightWing);
this.batLeftWing.addChild(this.batOuterLeftWing);
}
/**
* not actually sure this is size, is not used as of now, but the model would be recreated if the value changed and
* it seems a good match for a bats size
*/
public int getBatSize()
{
return 36;
}
/**
* Sets the models various rotation angles then renders the model.
*/
public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7)
{
EntityHollowBat var8 = (EntityHollowBat)par1Entity;
{
this.batHead.rotateAngleX = par6 / (180F / (float)Math.PI);
this.batHead.rotateAngleY = par5 / (180F / (float)Math.PI);
this.batHead.rotateAngleZ = 0.0F;
this.batHead.setRotationPoint(0.0F, 0.0F, 0.0F);
this.batRightWing.setRotationPoint(0.0F, 0.0F, 0.0F);
this.batLeftWing.setRotationPoint(0.0F, 0.0F, 0.0F);
this.batBody.rotateAngleX = ((float)Math.PI / 4F) + MathHelper.cos(par4 * 0.1F) * 0.15F;
this.batBody.rotateAngleY = 0.0F;
this.batRightWing.rotateAngleY = MathHelper.cos(par4 * 1.3F) * (float)Math.PI * 0.25F;
this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY;
this.batOuterRightWing.rotateAngleY = this.batRightWing.rotateAngleY * 0.5F;
this.batOuterLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY * 0.5F;
}
this.batHead.render(par7);
this.batBody.render(par7);
}
}
Someone said that it was a problem with ModLoader's Entitytracker code, but I don't know how to fix it. Any help would be wonderful.
Thanks,
LittleBreadLoaf
Of course, I did....
Can you copy and paste your error log?
I'm working on an audiomod tutorial
In your ItemGreenGem class, do you have:" this.setCreativeTab(CreativeTabs.tabMaterials); " under maxStackSize?
Because that (obviously) makes the item appear in the Material tab in creative.
Just wondering if you could show me how to create custom GUI's. It would be fantastic.....
No, I didn't i'll try that out tnx
Awesome mod
That will be added to the list!
-
View User Profile
-
View Posts
-
Send Message
Curse PremiumBut sir.... My Sword and Pickaxe shows in the creative tab even without the code.. why is that?
God Mod :D:http://www.planetminecraft.com/mod/god-mod-1779061/#comments
Because ItemSword.java and ItemPickaxe.java both include that code in their constructors.
public boolean hasEffect(ItemStack par1ItemStack){
return true;
}
in your sword class
please vote this up so scmows can see
mod_*******
package net.minecraft.src; import java.util.Map; import java.util.Random; import java.awt.Color; public class mod_Reiatsu extends BaseMod { public void load() { //Whole ModLoader.registerEntityID(EntityWhole.class, "Whole", 26);//registers the mobs name and id ModLoader.addSpawn("EntityWhole.class", 3, 3, 4, EnumCreatureType.monster);//makes the mob spawn in game see bottom ModLoader.addLocalization("entity.Whole.name", "Whole");//adds the name of the mob to the spawn egg EntityList.entityEggs.put(Integer.valueOf(26), new EntityEggInfo(26, 894137, (new Color(43, 85, 42)).getRGB()));//creates the spawn egg of the specified colors you will have to mess around with it //Hollow Bat ModLoader.registerEntityID(EntityHollowBat.class, "BatHollow", 27);//registers the mobs name and id ModLoader.addSpawn("EntityHollowBat.class", 3, 3, 4, EnumCreatureType.monster);//makes the mob spawn in game see bottom ModLoader.addLocalization("entity.BatHollow.name", "Hollow");//adds the name of the mob to the spawn egg EntityList.entityEggs.put(Integer.valueOf(27), new EntityEggInfo(27, 16777215, (new Color(43, 85, 42)).getRGB()));//creates the spawn egg of the specified colors you will have to mess around with it } public void addRenderer(Map map) { map.put(EntityWhole.class, new RenderLiving(new ModelBiped(),.5f)); map.put(EntityHollowBat.class, new RenderLiving(new ModelHollowBat(),.5f)); } public String getVersion() { return "1.4.6"; } }EntityHollowBat
package net.minecraft.src; import java.util.Random; public class EntityHollowBat extends EntityMob//extend this to make mob hostile { public EntityHollowBat(World par1World) { super(par1World);//super call this.texture = "/bleachmod/mobs/hollow_bat.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 EntityAIAttackOnCollide(this, EntityWhole.class, this.moveSpeed, true)); this.tasks.addTask(3, new EntityAIMoveTwardsRestriction(this, this.moveSpeed)); this.tasks.addTask(4, new EntityAIWander(this, this.moveSpeed)); this.tasks.addTask(5, new EntityAILookIdle(this)); this.tasks.addTask(6, new EntityAILeapAtTarget(this, 0.5F)); this.targetTasks.addTask(0, new EntityAIHurtByTarget(this, false)); this.targetTasks.addTask(1, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 16.0F, 0, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityWhole.class, 16.0F, 0, false)); //end of ai tasks } //the amount of damge the mob does i think public int func_82193_c(Entity par1Entity) { return 10; } public int getMaxHealth()//says that the mob will have a health of 20 { return 60; } protected boolean isAIEnabled()//says that the tasks we told it to do before will be run { return true; } /** * Returns the volume for the sounds this mob makes. */ protected float getSoundVolume() { return 0.5F; } /** * Gets the pitch of living sounds in living entities. */ protected float getSoundPitch() { return super.getSoundPitch() * 0.50F; } /** * Returns the sound this mob makes while it's alive. */ protected String getLivingSound() { return "mob.endermen.stare"; } /** * Returns the sound this mob makes when it is hurt. */ protected String getHurtSound() { return "mob.endermen.death"; } /** * Returns the sound this mob makes on death. */ protected String getDeathSound() { return "mob.endermen.scream"; } /** * Returns true if this entity should push and be pushed by other entities when colliding. */ public boolean canBePushed() { return true; } protected boolean canTriggerWalking() { return false; } protected void fall() {} public boolean doesEntityNotTriggerPressurePlate() { return true; } /** * Returns the item ID for the item the mob drops on death. */ protected int getDropItemId() { return mod_Reiatsu.Reiatsu.shiftedIndex; } protected void dropFewItems(boolean par1, int par2) { this.entityDropItem(new ItemStack(mod_Reiatsu.Reiatsu, 10), 0.0F); } /** * Get this Entity's EnumCreatureAttribute */ public EnumCreatureAttribute getCreatureAttribute() { return EnumCreatureAttribute.SOULS; } protected void dropRareDrop(int par1) { switch (this.rand.nextInt(3)) { case 0: this.dropItem(mod_Reiatsu.Reiatsu.shiftedIndex, 1); break; case 1: this.dropItem(mod_Reiatsu.ReiatsuBlock.blockID, 1); break; case 2: this.dropItem(mod_Reiatsu.HollowHelmet.shiftedIndex, 1); } } protected void entityInit() { super.entityInit(); this.dataWatcher.addObject(16, new Byte((byte)0)); } public void initCreature(){} }ModelHollowBat
package net.minecraft.src; public class ModelHollowBat extends ModelBase { private ModelRenderer batHead; /** The body box of the bat model. */ private ModelRenderer batBody; /** The inner right wing box of the bat model. */ private ModelRenderer batRightWing; /** The inner left wing box of the bat model. */ private ModelRenderer batLeftWing; /** The outer right wing box of the bat model. */ private ModelRenderer batOuterRightWing; /** The outer left wing box of the bat model. */ private ModelRenderer batOuterLeftWing; public ModelHollowBat() { this.textureWidth = 64; this.textureHeight = 64; this.batHead = new ModelRenderer(this, 0, 0); this.batHead.addBox(-3.0F, -3.0F, -3.0F, 6, 6, 6); ModelRenderer var1 = new ModelRenderer(this, 24, 0); var1.addBox(-4.0F, -6.0F, -2.0F, 3, 4, 1); this.batHead.addChild(var1); ModelRenderer var2 = new ModelRenderer(this, 24, 0); var2.mirror = true; var2.addBox(1.0F, -6.0F, -2.0F, 3, 4, 1); this.batHead.addChild(var2); this.batBody = new ModelRenderer(this, 0, 16); this.batBody.addBox(-3.0F, 4.0F, -3.0F, 6, 12, 6); this.batBody.setTextureOffset(0, 34).addBox(-5.0F, 16.0F, 0.0F, 10, 6, 1); this.batRightWing = new ModelRenderer(this, 42, 0); this.batRightWing.addBox(-12.0F, 1.0F, 1.5F, 10, 16, 1); this.batOuterRightWing = new ModelRenderer(this, 24, 16); this.batOuterRightWing.setRotationPoint(-12.0F, 1.0F, 1.5F); this.batOuterRightWing.addBox(-8.0F, 1.0F, 0.0F, 8, 12, 1); this.batLeftWing = new ModelRenderer(this, 42, 0); this.batLeftWing.mirror = true; this.batLeftWing.addBox(2.0F, 1.0F, 1.5F, 10, 16, 1); this.batOuterLeftWing = new ModelRenderer(this, 24, 16); this.batOuterLeftWing.mirror = true; this.batOuterLeftWing.setRotationPoint(12.0F, 1.0F, 1.5F); this.batOuterLeftWing.addBox(0.0F, 1.0F, 0.0F, 8, 12, 1); this.batBody.addChild(this.batRightWing); this.batBody.addChild(this.batLeftWing); this.batRightWing.addChild(this.batOuterRightWing); this.batLeftWing.addChild(this.batOuterLeftWing); } /** * not actually sure this is size, is not used as of now, but the model would be recreated if the value changed and * it seems a good match for a bats size */ public int getBatSize() { return 36; } /** * Sets the models various rotation angles then renders the model. */ public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { EntityHollowBat var8 = (EntityHollowBat)par1Entity; { this.batHead.rotateAngleX = par6 / (180F / (float)Math.PI); this.batHead.rotateAngleY = par5 / (180F / (float)Math.PI); this.batHead.rotateAngleZ = 0.0F; this.batHead.setRotationPoint(0.0F, 0.0F, 0.0F); this.batRightWing.setRotationPoint(0.0F, 0.0F, 0.0F); this.batLeftWing.setRotationPoint(0.0F, 0.0F, 0.0F); this.batBody.rotateAngleX = ((float)Math.PI / 4F) + MathHelper.cos(par4 * 0.1F) * 0.15F; this.batBody.rotateAngleY = 0.0F; this.batRightWing.rotateAngleY = MathHelper.cos(par4 * 1.3F) * (float)Math.PI * 0.25F; this.batLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY; this.batOuterRightWing.rotateAngleY = this.batRightWing.rotateAngleY * 0.5F; this.batOuterLeftWing.rotateAngleY = -this.batRightWing.rotateAngleY * 0.5F; } this.batHead.render(par7); this.batBody.render(par7); } }Someone said that it was a problem with ModLoader's Entitytracker code, but I don't know how to fix it. Any help would be wonderful.
Thanks,
LittleBreadLoaf
Bleach Mod
And also do I need to add a line of code to my mob so I can tame it or do I do something else?