I was wondering if anyone knew how to make a health bar for my mob like the ender dragon. Please don't tell me to just "Go look at the dragon code" because I can't find anything!
update to 1.2.3? or 1.2 works either way... also it would probably be really hard or super easy im no expert but if u or the other guys could make like the powers of the people like they shoot beams from there hands and stuff like that or mabye an easier one would be to shoot lighting? that would be rlly cool but its gettin there pretty cool so far just update to 1.2!
I'll update when this phase of updates stop. Waiting for a solid version that i'll know people will be playing on for a long time, not just a few weeks until 1.2.6 or 1.3.
I'm working on Goku for my DBZ mod, and I finally made him neutral, but I can't get him to do damage. All he does is stick to you like a magnet, what should I add?
package net.minecraft.src;
import java.util.List;
public class EntityGoku extends EntityCreature
{
private int angerLevel;
private int randomSoundDelay;
public EntityGoku(World world)
{
super(world);
texture = "/mods/goku.png";
setSize(1.5F, 1.9F);
health = 75;
}
protected boolean func_46006_aR()
{
return false;
}
public void onUpdate()
{
moveSpeed = entityToAttack == null ? 0.5F : 0.95F;
if (randomSoundDelay > 0 && --randomSoundDelay == 0)
{
worldObj.playSoundAtEntity(this, "null", getSoundVolume() * 2.0F, ((rand.nextFloat() - rand.nextFloat()) * 0.2F + 1.0F) * 1.8F);
}
super.onUpdate();
}
public boolean getCanSpawnHere()
{
return worldObj.difficultySetting > 0 && worldObj.checkIfAABBIsClear(boundingBox) && worldObj.getCollidingBoundingBoxes(this, boundingBox).size() == 0 && !worldObj.getIsAnyLiquid(boundingBox);
}
public void writeEntityToNBT(NBTTagCompound nbttagcompound)
{
super.writeEntityToNBT(nbttagcompound);
nbttagcompound.setShort("Anger", (short)angerLevel);
}
public void readEntityFromNBT(NBTTagCompound nbttagcompound)
{
super.readEntityFromNBT(nbttagcompound);
angerLevel = nbttagcompound.getShort("Anger");
}
protected Entity findPlayerToAttack()
{
if (angerLevel == 0)
{
return null;
}
else
{
return super.findPlayerToAttack();
}
}
public void onLivingUpdate()
{
super.onLivingUpdate();
}
public boolean attackEntityFrom(DamageSource damagesource, int i)
{
Entity entity = damagesource.getEntity();
if (entity instanceof EntityPlayer)
{
List list = worldObj.getEntitiesWithinAABBExcludingEntity(this, boundingBox.expand(32D, 32D, 32D));
for (int j = 0; j < list.size(); j++)
{
Entity entity1 = (Entity)list.get(j);
if (entity1 instanceof EntityPigZombie)
{
EntityPigZombie entitypigzombie = (EntityPigZombie)entity1;
}
}
becomeAngryAt(entity);
}
return super.attackEntityFrom(damagesource, i);
}
private void becomeAngryAt(Entity entity)
{
entityToAttack = entity;
angerLevel = 400 + rand.nextInt(400);
randomSoundDelay = rand.nextInt(40);
}
protected void dropFewItems(boolean flag, int i)
{
int j = rand.nextInt(2 + i);
for (int k = 0; k < j; k++)
{
dropItem(mod_trunks.bean.shiftedIndex, 1);
}
}
@Override
public int getMaxHealth() {
// TODO Auto-generated method stub
return 0;
}}
hey i downloaded the mod, and i went into creative and saw the scouter, i know that right now it's just a chain helemet, but what are your plans for it?
Just a little preview I guess, it is almost impossible to code custom armor now.
package net.minecraft.src;
import java.util.Random;
public class Blockbox extends Block
{
public Blockbox(int i)
{
super (i, Material.wood);
}
public int idDropped(int i, Random random, int j)
{
return mod_reg.soda.shiftedIndex;
}
public int getBlockTextureFromSide(int i)
{
if (i == 1 || i == 0)
return woodTexture;
return boxTexture;
}
public static final int woodTexture = ModLoader.addOverride("/terrain.png", "/mods/wood.png")),
public static final int boxTexture = ModLoader.addOverride("/terrain.png", "/mods/box.png")),
}
PS...
I got your PM, and decided to respond here. Probably first response Ive done since the first few weeks of school.
Thank you sooo much! Love your videos! keep up the good work!
0
0
0
0
0
Thank you!
0
P.S. It seems like so many people are overlooking this game, you should play it sometime, it's awesome
0
I'll update when this phase of updates stop. Waiting for a solid version that i'll know people will be playing on for a long time, not just a few weeks until 1.2.6 or 1.3.
2
0
No, neutral means if you hit him then he will attack. Like a zombie pigman. Nevermind I figured it out.
0
0
0
Just a little preview I guess, it is almost impossible to code custom armor now.
TooManyItems bro.
0
Im just going to use your ssj Goku skin. Awesome skins! :biggrin.gif:.
0
0
Thank you sooo much! Love your videos! keep up the good work!