3izzo
-
Posts
22 -
Joined
-
Last visited
Posts posted by 3izzo
-
-
IT WORKED !!!!
Thank you so much ;D ;D ;D ;D
-
i'll try to when i can
-
@Override
public boolean isEntityInvulnerable(){
return true;
}
this will make the entity unkillable
-
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
-
why don't you use onItemRhightClick Method (used in snow balls/eggs)?
-
try to press f3 + b ,and tell me is the hitbox for your mob bigger than the model?
-
thanks i'll try to
-
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.
-
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
-
for the shooting problem try to compare with the snowball code
-
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; } } } } }
-
this video will help
-
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"
-
how can i make an entity fly? + AI please
-
this.Shape19.rotateAngleY = 10.0F * par3 * par2 ;
this.Shape20.rotateAngleY = (10.0F * par3 * par2 )- 3f;
this is what have done it does the job for now
-
can you give an example code ?
-
they do hold it but it doesn't appear ,becuase you didn't set the arms /body (i guess)
sorry for crappy english
-
gradlew eclipse ?
-
adding a mini helicopter want the blades (Shape 19 ,20 ) to rotate
package thrizzo.minibots.model; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class ModelHelicopter extends ModelBase { //fields ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; ModelRenderer Shape4; ModelRenderer Shape5; ModelRenderer Shape6; ModelRenderer Shape7; ModelRenderer Shape8; ModelRenderer Shape9; ModelRenderer Shape10; ModelRenderer Shape11; ModelRenderer Shape12; ModelRenderer Shape13; ModelRenderer Shape14; ModelRenderer Shape15; ModelRenderer Shape16; ModelRenderer Shape17; ModelRenderer Shape18; ModelRenderer Shape19; ModelRenderer Shape20; public ModelHelicopter() { textureWidth = 128; textureHeight = 64; Shape1 = new ModelRenderer(this, 0, 0); Shape1.addBox(-5F, 0F, -7F, 10, 7, 7); Shape1.setRotationPoint(0F, 13F, 0F); Shape1.setTextureSize(128, 64); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); Shape2 = new ModelRenderer(this, 0, 0); Shape2.addBox(0F, 0F, 0F, 5, 7, 4); Shape2.setRotationPoint(-5F, 13F, 0F); Shape2.setTextureSize(128, 64); Shape2.mirror = true; setRotation(Shape2, 0F, 0.7853982F, 0F); Shape3 = new ModelRenderer(this, 0, 0); Shape3.addBox(-5F, 0F, 0F, 5, 7, 4); Shape3.setRotationPoint(5F, 13F, 0F); Shape3.setTextureSize(128, 64); Shape3.mirror = true; setRotation(Shape3, 0F, -0.7853982F, 0F); Shape4 = new ModelRenderer(this, 0, 0); Shape4.addBox(-2.5F, 0F, 0F, 5, 7, 5); Shape4.setRotationPoint(0F, 13F, 0F); Shape4.setTextureSize(128, 64); Shape4.mirror = true; setRotation(Shape4, 0F, 0F, 0F); Shape5 = new ModelRenderer(this, 0, 0); Shape5.addBox(-2.5F, 0F, 0F, 5, 3, 3); Shape5.setRotationPoint(0F, 13F, 5F); Shape5.setTextureSize(128, 64); Shape5.mirror = true; setRotation(Shape5, -0.7853982F, 0F, 0F); Shape6 = new ModelRenderer(this, 0, 0); Shape6.addBox(-0.5F, -0.5F, 0F, 1, 1, 6); Shape6.setRotationPoint(0F, 19F, 4F); Shape6.setTextureSize(128, 64); Shape6.mirror = true; setRotation(Shape6, 0.4363323F, 0F, 0F); Shape7 = new ModelRenderer(this, 0, 46); Shape7.addBox(-1F, -1F, 0F, 2, 2, 16); Shape7.setRotationPoint(0F, 16F, 4F); Shape7.setTextureSize(128, 64); Shape7.mirror = true; setRotation(Shape7, 0F, 0F, 0F); Shape8 = new ModelRenderer(this, 88, 0); Shape8.addBox(0F, -0.5F, -0.5F, 3, 1, 1); Shape8.setRotationPoint(0F, 14F, 22F); Shape8.setTextureSize(128, 64); Shape8.mirror = true; setRotation(Shape8, 0F, 0F, 0F); Shape9 = new ModelRenderer(this, 118, 0); Shape9.addBox(0F, -0.5F, 0F, 0, 1, 5); Shape9.setRotationPoint(3F, 14F, 22F); Shape9.setTextureSize(128, 64); Shape9.mirror = true; setRotation(Shape9, 0F, 0F, 0.2617994F); Shape10 = new ModelRenderer(this, 118, 0); Shape10.addBox(0F, 0F, 0F, 0, 1, 5); Shape10.setRotationPoint(3F, 14F, 22F); Shape10.setTextureSize(128, 64); Shape10.mirror = true; setRotation(Shape10, 0F, 3.141593F, 0.2617994F); Shape11 = new ModelRenderer(this, 0, 0); Shape11.addBox(-5F, 0F, -4F, 10, 3, 4); Shape11.setRotationPoint(0F, 17F, -7F); Shape11.setTextureSize(128, 64); Shape11.mirror = true; setRotation(Shape11, 0F, 0F, 0F); Shape12 = new ModelRenderer(this, 100, 56); Shape12.addBox(-5F, 0F, -4F, 10, 4, 4); Shape12.setRotationPoint(0F, 13F, -7F); Shape12.setTextureSize(128, 64); Shape12.mirror = true; setRotation(Shape12, 0F, 0F, 0F); Shape13 = new ModelRenderer(this, 0, 0); Shape13.addBox(-4F, -1F, -1F, 8, 2, 1); Shape13.setRotationPoint(0F, 18F, -11F); Shape13.setTextureSize(128, 64); Shape13.mirror = true; setRotation(Shape13, 0F, 0F, 0F); Shape14 = new ModelRenderer(this, 0, 0); Shape14.addBox(-3F, 0F, 0F, 6, 1, 4); Shape14.setRotationPoint(0F, 12.5F, -6F); Shape14.setTextureSize(128, 64); Shape14.mirror = true; setRotation(Shape14, 0F, 0F, 0F); Shape15 = new ModelRenderer(this, 0, 47); Shape15.addBox(-1F, -1F, 0F, 2, 2, 16); Shape15.setRotationPoint(0F, 16F, 4F); Shape15.setTextureSize(128, 64); Shape15.mirror = true; setRotation(Shape15, 0F, 0F, 0.5235988F); Shape16 = new ModelRenderer(this, 0, 46); Shape16.addBox(-1F, -1F, 0F, 2, 2, 16); Shape16.setRotationPoint(0F, 16F, 4F); Shape16.setTextureSize(128, 64); Shape16.mirror = true; setRotation(Shape16, 0F, 0F, 1.047198F); Shape17 = new ModelRenderer(this, 0, 40); Shape17.addBox(-1F, -1F, -1F, 2, 2, 5); Shape17.setRotationPoint(0F, 16F, 20F); Shape17.setTextureSize(128, 64); Shape17.mirror = true; setRotation(Shape17, 0.7853982F, 0F, 0F); Shape18 = new ModelRenderer(this, 66, 0); Shape18.addBox(-0.5F, 0F, -0.5F, 1, 2, 1); Shape18.setRotationPoint(0F, 13F, -4F); Shape18.setTextureSize(128, 64); Shape18.mirror = true; setRotation(Shape18, 3.141593F, 0F, 0F); Shape19 = new ModelRenderer(this, 66, 0);//blade Shape19.addBox(0F, 0F, 0F, 2, 0, 15); Shape19.setRotationPoint(-0.5F, 11F, -4F); Shape19.setTextureSize(128, 64); Shape19.mirror = true; setRotation(Shape19, bladerotater, 0F, 0f); Shape20 = new ModelRenderer(this, 66, 0);//blade Shape20.addBox(0F, 0F, 0F, 2, 0, 15); Shape20.setRotationPoint(0F, 11F, -4F); Shape20.setTextureSize(128, 64); Shape20.mirror = true; setRotation(Shape20, bladerotater, 3.141593F, 0.0f); } private int bladerotater = 0; 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,entity); Shape1.render(f5); Shape2.render(f5); Shape3.render(f5); Shape4.render(f5); Shape5.render(f5); Shape6.render(f5); Shape7.render(f5); Shape8.render(f5); Shape9.render(f5); Shape10.render(f5); Shape11.render(f5); Shape12.render(f5); Shape13.render(f5); Shape14.render(f5); Shape15.render(f5); Shape16.render(f5); Shape17.render(f5); Shape18.render(f5); Shape19.render(f5); Shape20.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 par1, float par2, float par3, float par4, float par5, float par6, Entity par7Entity) { }
[1.7.10] Primed Custom TNT Block Renders As White Cube
in Modder Support
Posted
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");