Everything posted by BoonieQuafter-CrAfTeR
-
How to make a ranged Mob? 1.7.10
hey guys, im trying to make a ranged mob that throws my custom entity throwable, or a rangedmob, I've Looked at skeleton and witch code. but so far it hasn't helped much except how to make an attack timer. I was wondering if someone could point me at a tutorial, or show me how to do this. thanks
-
Lightning striking entity [1.7.10]
there isn't event.ammount in 1.7.10. anymore help?
-
Lightning striking entity [1.7.10]
how do I specifically set the damage for the lightning not the entityThrowable? if(Pos.entityHit != null) { byte b0 = 100; if (Pos.entityHit instanceof EntityLightningBolt) { b0 = 100; } Pos.entityHit.attackEntityFrom(DamageSource.causeIndirectMagicDamage(this, this.getThrower()), b0);
-
Lightning striking entity [1.7.10]
also does anybody know how I can increase the amount of damage done to an entity by a lightning bolt
-
Lightning striking entity [1.7.10]
It does need to hit a block.. How exactly do I cauculate the block under the entity?
-
Lightning striking entity [1.7.10]
what I mean is the lighning isn't rendering
-
Lightning striking entity [1.7.10]
I made an entity that strikes a large amount of lightning. problem is, when ever the entity makes contact with an entity it doesn't render on the screen. it only renders when it hits a block. how should I fix this. here is the code. package com.OlympiansMod.entity; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.projectile.EntityLargeFireball; import net.minecraft.entity.projectile.EntityThrowable; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; public class EntityMasterBolt extends EntityThrowable{ public EntityMasterBolt(World p_i1776_1_) { super(p_i1776_1_); } public EntityMasterBolt(World world, EntityLivingBase entity){ super(world, entity); } @Override protected void onImpact(MovingObjectPosition p_70184_1_) { for(int i = 0; i < 25; i++){ this.worldObj.spawnParticle("largesmoke", this.posX, this.posY, this.posZ, 0f, 0f, 0f); this.setDead(); EntityLightningBolt undead = new EntityLightningBolt(worldObj, 10, 10, 10); undead.setPosition(this.posX, this.posY, this.posZ); worldObj.spawnEntityInWorld(undead); } if (!this.worldObj.isRemote){ this.setDead(); //his.worldObj.createExplosion((Entity) null, this.posX, this.posY, this.posZ, 3.0f, true); } } }
-
[Resolved]get were the player is looking 1.7.10
okay so I get what your saying but I definitely agree with you, I need to learn more about it so yeah. basically for now I made an entity type throwable that spawns the lightning in on impack
-
[Resolved]get were the player is looking 1.7.10
your quote is blank?
-
[Resolved]get were the player is looking 1.7.10
ok gotcha coolAlias this isn't working for me in my craft. package com.OlympiansMod.Item; import com.OlympiansMod.entity.EntityThunderBolt; import com.OlympiansMod.entity.EntityUndead; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.monster.EntitySlime; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; public class ZThunderBolt extends Item{ public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player){ if(!player.capabilities.isCreativeMode){ --itemstack.stackSize; } //world.playSoundAtEntity(player, "random.fizz", 0.7f, 0.8f); if(!world.isRemote){ Vec3 posVec = Vec3.createVectorHelper(player.posX, player.posY + player.getEyeHeight(), player.posZ); Vec3 lookVec = player.getLookVec(); MovingObjectPosition mop = world.rayTraceBlocks(posVec, lookVec); int x = mop.blockX; int y = mop.blockY; int z = mop.blockZ; System.out.println(x + ","+ y + ","+ z + " " + world.getBlock(x, y, z)); EntitySlime Bolt = new EntitySlime(world); Bolt.setPosition(player.posX + x , player.posY + y , player.posZ + z); world.spawnEntityInWorld(Bolt); } return itemstack; } } is there anything you think I should change to make it work.
-
[Resolved]get were the player is looking 1.7.10
also how does this method work? Vec3.createVectorHelper(p_72443_0_, p_72443_2_, p_72443_4_); what are the correct args im not sure what they are.
-
[Resolved]get were the player is looking 1.7.10
okay guys but that's not the problem. I did have a typo but im getting current errors in my code specifically on new Vec3. I don't exactly know how that works. and I do know that the override goes above the method. but at this point im desperate and new to java so.. anyway what else can I do. and I have the raytraceblocks so that it finds the block that the player is looking at and defines the other int.
-
[Resolved]get were the player is looking 1.7.10
can someone just tell me how to do it because so far nothing is working. public class ZThunderBolt extends Item{ public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player){ if(!player.capabilities.isCreativeMode){ --itemstack.stackSize; } //world.playSoundAtEntity(player, "random.fizz", 0.7f, 0.8f); //if(!world.isRemote){ @Override Vec3 posVec = new Vec3(player.posX, player.posY, player.posZ); Vec3 lookVec = player.getLookVec(); MovingObjectPosition mop = world.rayTraceBlocks(posVec, lookVec); int x = mop.blockX; int y = mop.blockY; int z = mop.blockZ; EntityLightningBolt Bolt = new EntityLightningBolt(world, 5, 5, 5); Bolt.setPosition(player.posX = x , player.posY + y , player.posZ + z);; world.spawnEntityInWorld(Bolt); //} return itemstack; } }
-
[Resolved]get were the player is looking 1.7.10
nothing is working I think I need to write a new method. do you know any tutorials for 1.7.10 im confused with the new code. ive looked but I cant seem to find a tutorial anywere.
-
[Resolved]get were the player is looking 1.7.10
I want to make an item that spawns lightning were the player is looking. problem is I don't have the right code, I think its out dated because I cant find these things in the vec3 class. here is my code package com.OlympiansMod.Item; import com.OlympiansMod.entity.EntityThunderBolt; import com.OlympiansMod.entity.EntityUndead; import net.minecraft.entity.effect.EntityLightningBolt; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntityArrow; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; public class ZThunderBolt extends Item{ public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player){ if(!player.capabilities.isCreativeMode){ --itemstack.stackSize; } //world.playSoundAtEntity(player, "random.fizz", 0.7f, 0.8f); //if(!world.isRemote){ Vec3 posVec = world.getWorldVec3Pool().getVec3FromPool(player.posX, player.posY + player.getEyeHeight(), player.posZ); Vec3 lookVec = player.getLookVec(); MovingObjectPosition mop = world.rayTraceBlocks(posVec, lookVec); int x = mop.blockX; int y = mop.blockY; int z = mop.blockZ; EntityLightningBolt Bolt = new EntityLightningBolt(world, 5, 5, 5); Bolt.setPosition(player.posX = x , player.posY + y , player.posZ + z);; world.spawnEntityInWorld(Bolt); //} return itemstack; } } so yeah what do I do to fix it? btw syntax error on world.getWorldVec3Pool().getVec3FromPool
-
Animating mob attacks 1.7.10
okay, thanks. I was also wondering another thing. how do you get the position that the player is staring, looking or facing.
-
Animating mob attacks 1.7.10
I failed I know what the problem is there needed to be a method in my class for the entity. how to you get the method for when the entity attacks.
-
Animating mob attacks 1.7.10
ok, so this is some code that I put together from the iron golem class, problem is there is a syntax error on armR.attackTimer, what's wrong with it? public void setLivingAnimations(EntityLivingBase p_78086_1_, float p_78086_2_, float p_78086_3_, float p_78086_4_){ EntityUndead undead = (EntityUndead)undead; int i = ((EntityIronGolem) ArmR).getAttackTimer(); if (i > 0) { this.ArmR.rotateAngleX = -2.0F + 1.5F * this.func_78172_a((float)i - p_78086_2_, 10.0F); } } private float func_78172_a(float p_78172_1_, float p_78172_2_){ // TODO Auto-generated method stub return 0; }
-
Animating mob attacks 1.7.10
Bump
-
Animating mob attacks 1.7.10
So I want to make an animation for a attack for my mob, the problem is I don't know how, I've looked at the code for the iron golems model, but there are methods I haven't seen before there, so I don't know how to adapt the code. I also haven't been able to find any tutorials on it either (or at least ones that are not out dated). can someone explain it to me or show me how to create these animations? if so that would be great. thanks for your time.
-
1.7.10 Spawn egg/ Spawn Item is spawning ghost entitys which cause extreme lag
no lol its a typo its fixed
-
1.7.10 Spawn egg/ Spawn Item is spawning ghost entitys which cause extreme lag
ok I changed it but it still is not working package com.OlympiansMod.Item; import com.OlympiansMod.entity.EntityUndead; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; public class DioceltiansSepter extends Item{ public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player){ if(player.capabilities.isCreativeMode){ } if(!world.isRemote); for (int i = 0 ; i < 5 ; i++){ EntityUndead undead = new EntityUndead(world); undead.setPosition(player.posX, player.posY, player.posZ); world.spawnEntityInWorld(undead); } return itemstack; } }
-
1.7.10 Spawn egg/ Spawn Item is spawning ghost entitys which cause extreme lag
okay I have a OnRightclick method that spawns 5 entitys into the world, the problem is, is that the item spawns 5 ghost entitys as well, here's my code. package com.OlympiansMod.Item; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.world.World; import com.OlympiansMod.entity.EntitySGolem; import com.OlympiansMod.entity.EntityUndead; public class UndeadRomanSpawn extends Item{ public ItemStack onItemRightClick(ItemStack itemstack, World world, EntityPlayer player){ if(!player.capabilities.isCreativeMode){ --itemstack.stackSize; } EntityUndead undead = new EntityUndead(world); undead.setPosition(player.posX, player.posY, player.posZ); world.spawnEntityInWorld(undead); return itemstack; } }
-
[1.7.10]Make Mob not attack itself
Nvrm I fixed it my self
-
[1.7.10]Make Mob not attack itself
public boolean shouldExecute() { EntityLivingBase entitylivingbase = ((EntityLiving) this.attacker).getAttackTarget(); if (entitylivingbase == null) { return false; } else if (!entitylivingbase.isEntityAlive()) { return false; } else if (entitylivingbase instanceof EntityUndead) { return false; } else{ return true; } } } I wrote this method, the only thing different from yours is that I had to define the attacker as entity living it doesn't work.
IPS spam blocked by CleanTalk.