Jump to content

3izzo

Members
  • Posts

    22
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

3izzo's Achievements

Tree Puncher

Tree Puncher (2/8)

2

Reputation

  1. i think your problem is here private static final ResourceLocation TEXTURE = new ResourceLocation(PlasmaCraft.MOD_ID, "textures/blocks/acidTnt.png"); try private static final ResourceLocation TEXTURE = new ResourceLocation(PlasmaCraft.MOD_ID + ":textures/blocks/acidTnt.png");
  2. IT WORKED !!!! Thank you so much ;D ;D ;D ;D
  3. @Override public boolean isEntityInvulnerable(){ return true; } this will make the entity unkillable
  4. hello there i'm working on a villagers expansion mod ,and i want to be able to access the entity from there,and if you want to use a gui handler it won't allow me to pass the entity from there
  5. why don't you use onItemRhightClick Method (used in snow balls/eggs)?
  6. try to press f3 + b ,and tell me is the hitbox for your mob bigger than the model?
  7. hello there ! i was wondering if i was able to build something like a bed ,not for sleeping,but 3 * 1 * 1 block ? and thank you.
  8. here is the one that i have do your renaming and rendirng stuff shooter package thrizzo.minibots.items; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import thrizzo.minibots.entities.throwable.EntityMiniJBullet; import thrizzo.minibots.main.MiniBotsMain; public class ItemBlasterRifle extends Item { public ItemBlasterRifle(int par1) { super(); this.maxStackSize = 1; } @Override public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) { if (par3EntityPlayer.capabilities.isCreativeMode || par3EntityPlayer.inventory.hasItem(MiniBotsMain.MiniRifleAmmo)){ if (!par3EntityPlayer.capabilities.isCreativeMode) { par3EntityPlayer.inventory.consumeInventoryItem(MiniBotsMain.MiniRifleAmmo); } par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F)); if (!par2World.isRemote) { par2World.spawnEntityInWorld(new EntityMiniJBullet(par2World, par3EntityPlayer)); } return par1ItemStack; } return par1ItemStack; } } shooten entity package thrizzo.minibots.entities.throwable; import java.util.Random; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; public class EntityMiniJBullet extends EntityThrowable { private Random rand ; int speed = 2; private double damage = 7.5D ; public EntityMiniJBullet(World par1World) { super(par1World); } public void setDamage(double par1) { this.damage = par1; } public double getDamage() { return this.damage; } public EntityMiniJBullet(World par1World, EntityLivingBase par2EntityLivingBase) { super(par1World, par2EntityLivingBase); this.motionX*=speed; this.motionY*=speed; this.motionZ*=speed; } public EntityMiniJBullet(World par1World, double par2, double par4, double par6) { super(par1World, par2, par4, par6); } @Override protected void onImpact(MovingObjectPosition movingobjectposition) { this.worldObj.createExplosion(this, this.posX, this.posY, this.posZ,(float) 0.25, true); this.setDead(); if (movingobjectposition.entityHit != null) { movingobjectposition.entityHit.attackEntityFrom(DamageSource.causeThrownDamage(this, this.getThrower()), (float) damage); } } @Override protected float getGravityVelocity() { return 0F; } } hope it works for you, it does for me
  9. for the shooting problem try to compare with the snowball code
  10. hello there i am working on a mob that would bomb the player than run away but it is not working ,its not attacking or running away here is the class package thrizzo.minibots.entities; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIAttackOnCollide; import net.minecraft.entity.ai.EntityAIAvoidEntity; import net.minecraft.entity.ai.EntityAIHurtByTarget; import net.minecraft.entity.ai.EntityAILookIdle; import net.minecraft.entity.ai.EntityAIMoveTowardsRestriction; import net.minecraft.entity.ai.EntityAINearestAttackableTarget; import net.minecraft.entity.ai.EntityAISwimming; import net.minecraft.entity.ai.EntityAIWander; import net.minecraft.entity.ai.EntityAIWatchClosest; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.world.World; public class EntityMiniBomber extends EntityMob{ private boolean HaveBombed ; private EntityAIAttackOnCollide aiAttackOnCollide = new EntityAIAttackOnCollide(this, 2.0D, false); private EntityAIAvoidEntity aiAvoideEntity = new EntityAIAvoidEntity(this, EntityPlayer.class, 16.0F, 0.8D, 1.33D); //this.tasks.addTask(4, new EntityAIAvoidEntity(this, EntityPlayer.class, 16.0F, 0.8D, 1.33D)); public EntityMiniBomber(World par1World) { super(par1World); this.getNavigator().setBreakDoors(true); this.tasks.addTask(0, new EntityAISwimming(this)); this.tasks.addTask(2, new EntityAIAttackOnCollide(this, EntityPlayer.class, 1.0D, false)); this.tasks.addTask(5, new EntityAIMoveTowardsRestriction(this, 1.0D)); this.tasks.addTask(7, new EntityAIWander(this, 1.0D)); this.tasks.addTask(8, new EntityAIWatchClosest(this, EntityPlayer.class, 8.0F)); this.tasks.addTask(8, new EntityAILookIdle(this)); this.targetTasks.addTask(1, new EntityAIHurtByTarget(this, true)); this.targetTasks.addTask(2, new EntityAINearestAttackableTarget(this, EntityPlayer.class, 0, true)); } protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.followRange).setBaseValue(40.0D); this.getEntityAttribute(SharedMonsterAttributes.movementSpeed).setBaseValue(0.2D); this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(3.0D); this.getEntityAttribute(SharedMonsterAttributes.maxHealth).setBaseValue(15.0D); } public boolean isAIEnabled() { return true; } protected void updateAITasks(){ if (!HaveBombed){ this.tasks.addTask(4, this.aiAttackOnCollide); this.tasks.removeTask(this.aiAvoideEntity); boolean flag = this.worldObj.getGameRules().getGameRuleBooleanValue("mobGriefing"); if (this.worldObj.getClosestPlayerToEntity(this, 2.0D) != null){ this.worldObj.createExplosion(this, posX, posY , posZ, 2, flag); this.HaveBombed = true; } } else{ if (HaveBombed){ this.tasks.addTask(4, this.aiAvoideEntity); this.tasks.removeTask(this.aiAttackOnCollide); if (this.worldObj.getClosestPlayerToEntity(this, 20.0D) == null){ this.HaveBombed = false; } } } } }
  11. public int quantityDropped(Random random) { return 1 + random.nextInt(3); } the one that brandon3055 wrote will always drop 4 this will give it a bit of "randomness"
  12. how can i make an entity fly? + AI please
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.