Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

SimonSlime

Members
  • Posts

    31
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

SimonSlime's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. I tried this code now but anything is changed
  2. no , I didn't say the mob doesn't spams, I said it doesn't shoot my custom projectile, it only makes direct attack
  3. I'm trying to make a new mob who shots custom projectiles, I did all, but the mob doesn't shot anythings, here my codes: do you find any mystake? EntityIceball.java package com.simon.simonsores.mobs.entity; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import java.util.List; import net.minecraft.block.Block; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.util.AxisAlignedBB; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.util.MovingObjectPosition; import net.minecraft.util.Vec3; import net.minecraft.world.World; public abstract class EntityIceball extends Entity { private int field_145795_e = -1; private int field_145793_f = -1; private int field_145794_g = -1; private Block field_145796_h; private boolean inGround; public EntityLivingBase shootingEntity; private int ticksAlive; private int ticksInAir; public double accelerationX; public double accelerationY; public double accelerationZ; private static final String __OBFID = "CL_00001717"; public EntityIceball(World par1World) { super(par1World); this.setSize(1.0F, 1.0F); } protected void entityInit() {} /** * Checks if the entity is in range to render by using the past in distance and comparing it to its average edge * length * 64 * renderDistanceWeight Args: distance */ @SideOnly(Side.CLIENT) public boolean isInRangeToRenderDist(double par1) { double d1 = this.boundingBox.getAverageEdgeLength() * 4.0D; d1 *= 64.0D; return par1 < d1 * d1; } public EntityIceball(World par1World, double par2, double par4, double par6, double par8, double par10, double par12) { super(par1World); this.setSize(1.0F, 1.0F); this.setLocationAndAngles(par2, par4, par6, this.rotationYaw, this.rotationPitch); this.setPosition(par2, par4, par6); double d6 = (double)MathHelper.sqrt_double(par8 * par8 + par10 * par10 + par12 * par12); this.accelerationX = par8 / d6 * 0.1D; this.accelerationY = par10 / d6 * 0.1D; this.accelerationZ = par12 / d6 * 0.1D; } public EntityIceball(World par1World, EntityLivingBase par2EntityLivingBase, double par3, double par5, double par7) { super(par1World); this.shootingEntity = par2EntityLivingBase; this.setSize(1.0F, 1.0F); this.setLocationAndAngles(par2EntityLivingBase.posX, par2EntityLivingBase.posY, par2EntityLivingBase.posZ, par2EntityLivingBase.rotationYaw, par2EntityLivingBase.rotationPitch); this.setPosition(this.posX, this.posY, this.posZ); this.yOffset = 0.0F; this.motionX = this.motionY = this.motionZ = 0.0D; par3 += this.rand.nextGaussian() * 0.4D; par5 += this.rand.nextGaussian() * 0.4D; par7 += this.rand.nextGaussian() * 0.4D; double d3 = (double)MathHelper.sqrt_double(par3 * par3 + par5 * par5 + par7 * par7); this.accelerationX = par3 / d3 * 0.1D; this.accelerationY = par5 / d3 * 0.1D; this.accelerationZ = par7 / d3 * 0.1D; } /** * Called to update the entity's position/logic. */ public void onUpdate() { if (!this.worldObj.isRemote && (this.shootingEntity != null && this.shootingEntity.isDead || !this.worldObj.blockExists((int)this.posX, (int)this.posY, (int)this.posZ))) { this.setDead(); } else { super.onUpdate(); if (this.inGround) { if (this.worldObj.getBlock(this.field_145795_e, this.field_145793_f, this.field_145794_g) == this.field_145796_h) { ++this.ticksAlive; if (this.ticksAlive == 600) { this.setDead(); } return; } this.inGround = false; this.motionX *= (double)(this.rand.nextFloat() * 0.2F); this.motionY *= (double)(this.rand.nextFloat() * 0.2F); this.motionZ *= (double)(this.rand.nextFloat() * 0.2F); this.ticksAlive = 0; this.ticksInAir = 0; } else { ++this.ticksInAir; } Vec3 vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); Vec3 vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); MovingObjectPosition movingobjectposition = this.worldObj.rayTraceBlocks(vec3, vec31); vec3 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX, this.posY, this.posZ); vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(this.posX + this.motionX, this.posY + this.motionY, this.posZ + this.motionZ); if (movingobjectposition != null) { vec31 = this.worldObj.getWorldVec3Pool().getVecFromPool(movingobjectposition.hitVec.xCoord, movingobjectposition.hitVec.yCoord, movingobjectposition.hitVec.zCoord); } Entity entity = null; List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(this, this.boundingBox.addCoord(this.motionX, this.motionY, this.motionZ).expand(1.0D, 1.0D, 1.0D)); double d0 = 0.0D; for (int i = 0; i < list.size(); ++i) { Entity entity1 = (Entity)list.get(i); if (entity1.canBeCollidedWith() && (!entity1.isEntityEqual(this.shootingEntity) || this.ticksInAir >= 25)) { float f = 0.3F; AxisAlignedBB axisalignedbb = entity1.boundingBox.expand((double)f, (double)f, (double)f); MovingObjectPosition movingobjectposition1 = axisalignedbb.calculateIntercept(vec3, vec31); if (movingobjectposition1 != null) { double d1 = vec3.distanceTo(movingobjectposition1.hitVec); if (d1 < d0 || d0 == 0.0D) { entity = entity1; d0 = d1; } } } } if (entity != null) { movingobjectposition = new MovingObjectPosition(entity); } if (movingobjectposition != null) { this.onImpact(movingobjectposition); } this.posX += this.motionX; this.posY += this.motionY; this.posZ += this.motionZ; float f1 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ); this.rotationYaw = (float)(Math.atan2(this.motionZ, this.motionX) * 180.0D / Math.PI) + 90.0F; for (this.rotationPitch = (float)(Math.atan2((double)f1, this.motionY) * 180.0D / Math.PI) - 90.0F; this.rotationPitch - this.prevRotationPitch < -180.0F; this.prevRotationPitch -= 360.0F) { ; } while (this.rotationPitch - this.prevRotationPitch >= 180.0F) { this.prevRotationPitch += 360.0F; } while (this.rotationYaw - this.prevRotationYaw < -180.0F) { this.prevRotationYaw -= 360.0F; } while (this.rotationYaw - this.prevRotationYaw >= 180.0F) { this.prevRotationYaw += 360.0F; } this.rotationPitch = this.prevRotationPitch + (this.rotationPitch - this.prevRotationPitch) * 0.2F; this.rotationYaw = this.prevRotationYaw + (this.rotationYaw - this.prevRotationYaw) * 0.2F; float f2 = this.getMotionFactor(); if (this.isInWater()) { for (int j = 0; j < 4; ++j) { float f3 = 0.25F; this.worldObj.spawnParticle("bubble", this.posX - this.motionX * (double)f3, this.posY - this.motionY * (double)f3, this.posZ - this.motionZ * (double)f3, this.motionX, this.motionY, this.motionZ); } f2 = 0.8F; } this.motionX += this.accelerationX; this.motionY += this.accelerationY; this.motionZ += this.accelerationZ; this.motionX *= (double)f2; this.motionY *= (double)f2; this.motionZ *= (double)f2; this.worldObj.spawnParticle("snowballpoof", this.posX, this.posY + 0.5D, this.posZ, 0.0D, 0.0D, 0.0D); this.setPosition(this.posX, this.posY, this.posZ); } } /** * Return the motion factor for this projectile. The factor is multiplied by the original motion. */ protected float getMotionFactor() { return 0.95F; } /** * Called when this EntityFireball hits a block or entity. */ protected abstract void onImpact(MovingObjectPosition var1); /** * (abstract) Protected helper method to write subclass entity data to NBT. */ public void writeEntityToNBT(NBTTagCompound par1NBTTagCompound) { par1NBTTagCompound.setShort("xTile", (short)this.field_145795_e); par1NBTTagCompound.setShort("yTile", (short)this.field_145793_f); par1NBTTagCompound.setShort("zTile", (short)this.field_145794_g); par1NBTTagCompound.setByte("inTile", (byte)Block.getIdFromBlock(this.field_145796_h)); par1NBTTagCompound.setByte("inGround", (byte)(this.inGround ? 1 : 0)); par1NBTTagCompound.setTag("direction", this.newDoubleNBTList(new double[] {this.motionX, this.motionY, this.motionZ})); } /** * (abstract) Protected helper method to read subclass entity data from NBT. */ public void readEntityFromNBT(NBTTagCompound par1NBTTagCompound) { this.field_145795_e = par1NBTTagCompound.getShort("xTile"); this.field_145793_f = par1NBTTagCompound.getShort("yTile"); this.field_145794_g = par1NBTTagCompound.getShort("zTile"); this.field_145796_h = Block.getBlockById(par1NBTTagCompound.getByte("inTile") & 255); this.inGround = par1NBTTagCompound.getByte("inGround") == 1; if (par1NBTTagCompound.hasKey("direction", 9)) { NBTTagList nbttaglist = par1NBTTagCompound.getTagList("direction", 6); this.motionX = nbttaglist.func_150309_d(0); this.motionY = nbttaglist.func_150309_d(1); this.motionZ = nbttaglist.func_150309_d(2); } else { this.setDead(); } } /** * Returns true if other Entities should be prevented from moving through this Entity. */ public boolean canBeCollidedWith() { return true; } public float getCollisionBorderSize() { return 1.0F; } /** * Called when the entity is attacked. */ public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) { if (this.isEntityInvulnerable()) { return false; } else { this.setBeenAttacked(); if (par1DamageSource.getEntity() != null) { Vec3 vec3 = par1DamageSource.getEntity().getLookVec(); if (vec3 != null) { this.motionX = vec3.xCoord; this.motionY = vec3.yCoord; this.motionZ = vec3.zCoord; this.accelerationX = this.motionX * 0.1D; this.accelerationY = this.motionY * 0.1D; this.accelerationZ = this.motionZ * 0.1D; } if (par1DamageSource.getEntity() instanceof EntityLivingBase) { this.shootingEntity = (EntityLivingBase)par1DamageSource.getEntity(); } return true; } else { return false; } } } @SideOnly(Side.CLIENT) public float getShadowSize() { return 0.0F; } /** * Gets how bright this entity is. */ public float getBrightness(float par1) { return 1.0F; } @SideOnly(Side.CLIENT) public int getBrightnessForRender(float par1) { return 15728880; } } EntitySmallIceball.java package com.simon.simonsores.mobs.entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.init.Blocks; import net.minecraft.util.DamageSource; import net.minecraft.util.MovingObjectPosition; import net.minecraft.world.World; import com.simon.simonsores.mobs.entity.EntityIceball; public class EntitySmallIceball extends EntityIceball { private static final String __OBFID = "CL_00001721"; public EntitySmallIceball(World par1World) { super(par1World); this.setSize(0.3125F, 0.3125F); } public EntitySmallIceball(World par1World, EntityLivingBase par2EntityLivingBase, double par3, double par5, double par7) { super(par1World, par2EntityLivingBase, par3, par5, par7); this.setSize(0.3125F, 0.3125F); } public EntitySmallIceball(World par1World, double par2, double par4, double par6, double par8, double par10, double par12) { super(par1World, par2, par4, par6, par8, par10, par12); this.setSize(0.3125F, 0.3125F); } /** * Called when this EntityFireball hits a block or entity. */ protected void onImpact(MovingObjectPosition par1MovingObjectPosition) { if (!this.worldObj.isRemote) { if (par1MovingObjectPosition.entityHit != null) { par1MovingObjectPosition.entityHit.setFire(0); } } else { int i = par1MovingObjectPosition.blockX; int j = par1MovingObjectPosition.blockY; int k = par1MovingObjectPosition.blockZ; switch (par1MovingObjectPosition.sideHit) { case 0: --j; break; case 1: ++j; break; case 2: --k; break; case 3: ++k; break; case 4: --i; break; case 5: ++i; } if (this.worldObj.isAirBlock(i, j, k)) { this.worldObj.setBlock(i, j, k, Blocks.snow); } } this.setDead(); } /** * Returns true if other Entities should be prevented from moving through this Entity. */ public boolean canBeCollidedWith() { return false; } /** * Called when the entity is attacked. */ public boolean attackEntityFrom(DamageSource par1DamageSource, float par2) { return false; }} RenderIceball.java package com.simon.simonsores.mobs.render; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.texture.TextureMap; import net.minecraft.entity.Entity; import com.simon.simonsores.mobs.entity.EntityIceball; import net.minecraft.init.Items; import net.minecraft.util.IIcon; import net.minecraft.util.ResourceLocation; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; @SideOnly(Side.CLIENT) public class RenderIceball extends Render { private static final ResourceLocation textureLocation = new ResourceLocation("simonsoresmod:textures/items/Iceball.png"); private float field_77002_a; private static final String __OBFID = "CL_00000995"; public RenderIceball(float par1) { this.field_77002_a = par1; } /** * Actually renders the given argument. This is a synthetic bridge method, always casting down its argument and then * handing it off to a worker function which does the actual work. In all probabilty, the class Render is generic * (Render<T extends Entity) and this method has signature public void func_76986_a(T entity, double d, double d1, * double d2, float f, float f1). But JAD is pre 1.5 so doesn't do that. */ public void doRender(EntityIceball par1EntityIceball, double par2, double par4, double par6, float par8, float par9) { GL11.glPushMatrix(); this.bindEntityTexture(par1EntityIceball); GL11.glTranslatef((float)par2, (float)par4, (float)par6); GL11.glEnable(GL12.GL_RESCALE_NORMAL); float f2 = this.field_77002_a; GL11.glScalef(f2 / 1.0F, f2 / 1.0F, f2 / 1.0F); IIcon iicon = Items.fire_charge.getIconFromDamage(0); Tessellator tessellator = Tessellator.instance; float f3 = iicon.getMinU(); float f4 = iicon.getMaxU(); float f5 = iicon.getMinV(); float f6 = iicon.getMaxV(); float f7 = 1.0F; float f8 = 0.5F; float f9 = 0.25F; GL11.glRotatef(180.0F - this.renderManager.playerViewY, 0.0F, 1.0F, 0.0F); GL11.glRotatef(-this.renderManager.playerViewX, 1.0F, 0.0F, 0.0F); tessellator.startDrawingQuads(); tessellator.setNormal(0.0F, 1.0F, 0.0F); tessellator.addVertexWithUV((double)(0.0F - f8), (double)(0.0F - f9), 0.0D, (double)f3, (double)f6); tessellator.addVertexWithUV((double)(f7 - f8), (double)(0.0F - f9), 0.0D, (double)f4, (double)f6); tessellator.addVertexWithUV((double)(f7 - f8), (double)(1.0F - f9), 0.0D, (double)f4, (double)f5); tessellator.addVertexWithUV((double)(0.0F - f8), (double)(1.0F - f9), 0.0D, (double)f3, (double)f5); tessellator.draw(); GL11.glDisable(GL12.GL_RESCALE_NORMAL); GL11.glPopMatrix(); } public void doRender(Entity par1Entity, double par2, double par4, double par6, float par8, float par9) { this.doRender((EntityIceball)par1Entity, par2, par4, par6, par8, par9); } @Override protected ResourceLocation getEntityTexture(Entity entity) { return textureLocation; } } EntityFrost.java (who shot this projectile) package com.simon.simonsores.mobs.entity; import com.simon.simonsores.simonsoresMod; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.monster.EntityMob; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.projectile.EntitySmallFireball; import net.minecraft.entity.projectile.EntitySnowball; import net.minecraft.init.Items; import net.minecraft.item.Item; import net.minecraft.util.DamageSource; import net.minecraft.util.MathHelper; import net.minecraft.world.World; public class EntityFrost extends EntityMob { /** Random offset used in floating behaviour */ private float heightOffset = 0.5F; /** ticks until heightOffset is randomized */ private int heightOffsetUpdateTime; private int field_70846_g; private static final String __OBFID = "CL_00001682"; public EntityFrost(World par1World) { super(par1World); this.experienceValue = 15; } protected void applyEntityAttributes() { super.applyEntityAttributes(); this.getEntityAttribute(SharedMonsterAttributes.attackDamage).setBaseValue(8.0D); } protected void entityInit() { super.entityInit(); this.dataWatcher.addObject(16, new Byte((byte)0)); } /** * Returns the sound this mob makes while it's alive. */ protected String getLivingSound() { return "mob.blaze.breathe"; } /** * Returns the sound this mob makes when it is hurt. */ protected String getHurtSound() { return "mob.blaze.hit"; } /** * Returns the sound this mob makes on death. */ protected String getDeathSound() { return "mob.blaze.death"; } @SideOnly(Side.CLIENT) public int getBrightnessForRender(float par1) { return 15728880; } /** * Gets how bright this entity is. */ public float getBrightness(float par1) { return 1.0F; } /** * Called frequently so the entity can update its state every tick as required. For example, zombies and skeletons * use this to react to sunlight and start to burn. */ public void onLivingUpdate() { if (!this.worldObj.isRemote) { if (this.isWet()) { this.attackEntityFrom(DamageSource.drown, 1.0F); } --this.heightOffsetUpdateTime; if (this.heightOffsetUpdateTime <= 0) { this.heightOffsetUpdateTime = 100; this.heightOffset = 0.5F + (float)this.rand.nextGaussian() * 3.0F; } if (this.getEntityToAttack() != null && this.getEntityToAttack().posY + (double)this.getEntityToAttack().getEyeHeight() > this.posY + (double)this.getEyeHeight() + (double)this.heightOffset) { this.motionY += (0.30000001192092896D - this.motionY) * 0.30000001192092896D; } } if (this.rand.nextInt(24) == 0) { this.worldObj.playSoundEffect(this.posX + 0.5D, this.posY + 0.5D, this.posZ + 0.5D, "fire.fire", 1.0F + this.rand.nextFloat(), this.rand.nextFloat() * 0.7F + 0.3F); } if (!this.onGround && this.motionY < 0.0D) { this.motionY *= 0.6D; } for (int i = 0; i < 2; ++i) { this.worldObj.spawnParticle("snowshovel", this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width, this.posY + this.rand.nextDouble() * (double)this.height, this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width, 0.0D, 0.0D, 0.0D); } super.onLivingUpdate(); } /** * Basic mob attack. Default to touch of death in EntityCreature. Overridden by each mob to define their attack. */ protected void attackEntity(Entity par1Entity, float par2) { if (this.attackTime <= 0 && par2 < 2.0F && par1Entity.boundingBox.maxY > this.boundingBox.minY && par1Entity.boundingBox.minY < this.boundingBox.maxY) { this.attackTime = 20; this.attackEntityAsMob(par1Entity); } else if (par2 < 30.0F) { double d0 = par1Entity.posX - this.posX; double d1 = par1Entity.boundingBox.minY + (double)(par1Entity.height / 2.0F) - (this.posY + (double)(this.height / 2.0F)); double d2 = par1Entity.posZ - this.posZ; if (this.attackTime == 0) { ++this.field_70846_g; if (this.field_70846_g == 1) { this.attackTime = 60; this.func_70844_e(true); } else if (this.field_70846_g <= 4) { this.attackTime = 6; } else { this.attackTime = 100; this.field_70846_g = 0; this.func_70844_e(false); } if (this.field_70846_g > 1) { float f1 = MathHelper.sqrt_float(par2) * 0.5F; this.worldObj.playAuxSFXAtEntity((EntityPlayer)null, 1009, (int)this.posX, (int)this.posY, (int)this.posZ, 0); for (int i = 0; i < 1; ++i) { EntitySmallIceball entitysmalliceball = new EntitySmallIceball(this.worldObj, this, d0 + this.rand.nextGaussian() * (double)f1, d1, d2 + this.rand.nextGaussian() * (double)f1); entitysmalliceball.posY = this.posY + (double)(this.height / 2.0F) + 0.5D; this.worldObj.spawnEntityInWorld(entitysmalliceball); } } } this.rotationYaw = (float)(Math.atan2(d2, d0) * 180.0D / Math.PI) - 90.0F; this.hasAttacked = true; } } /** * Called when the mob is falling. Calculates and applies fall damage. */ protected void fall(float par1) {} protected Item getDropItem() { return simonsoresMod.FrostRod; } /** * Returns true if the entity is on fire. Used by render to add the fire effect on rendering. */ public boolean isBurning() { return this.func_70845_n(); } /** * Drop 0-2 items of this living's type. @param par1 - Whether this entity has recently been hit by a player. @param * par2 - Level of Looting used to kill this mob. */ protected void dropFewItems(boolean par1, int par2) { if (par1) { int j = this.rand.nextInt(2 + par2); for (int k = 0; k < j; ++k) { this.dropItem(simonsoresMod.FrostRod, 1); } } } public boolean func_70845_n() { return (this.dataWatcher.getWatchableObjectByte(16) & 1) != 0; } public void func_70844_e(boolean par1) { byte b0 = this.dataWatcher.getWatchableObjectByte(16); if (par1) { b0 = (byte)(b0 | 1); } else { b0 &= -2; } this.dataWatcher.updateObject(16, Byte.valueOf(b0)); } /** * Checks to make sure the light is not too bright where the mob is spawning */ protected boolean isValidLightLevel() { return true; } ClientProxy.java package com.simon.simonsores; import com.simon.simonsores.mobs.Frost; import com.simon.simonsores.mobs.entity.EntityFrost; import com.simon.simonsores.mobs.render.RenderFrost; import com.simon.simonsores.mobs.render.RenderIceball; import com.simon.simonsores.mobs.entity.EntityIceball; import cpw.mods.fml.client.registry.RenderingRegistry; public class ClientProxy extends CommonProxy { public void RegisterInformation() { RenderingRegistry.registerEntityRenderingHandler(EntityFrost.class, new RenderFrost(new Frost(), 0)); RenderingRegistry.registerEntityRenderingHandler(EntityIceball.class, new RenderIceball(0.5F)); } }
  4. ok here what I've done: build failed! what went wrong? what I have to do for fix it? I have to install a JDK how it say?
  5. guys I don't know how to do because I don't have the libs folder, in the folder build I have only natives and tmp, so where the jar is saved?
  6. no, for export my mod I only exported in eclipse in a jar file and I put it in the mod folder of minecraft, then I have forgotten some steps? what?
  7. I called it simonsoresMod, here the full log: ash Report ---- // My bad. Time: 13/08/14 3.39 Description: Initializing game java.lang.NoSuchFieldError: rock at com.simon.simonsores.simonsoresMod.<clinit>(simonsoresMod.java:73) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:420) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.loadMods(Loader.java:489) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:202) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:467) at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:815) at net.minecraft.client.main.Main.main(SourceFile:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at com.simon.simonsores.simonsoresMod.<clinit>(simonsoresMod.java:73) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:420) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.loadMods(Loader.java:489) at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:202) at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:467) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:815) at net.minecraft.client.main.Main.main(SourceFile:103) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.7.0_55, Oracle Corporation Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation Memory: 50516128 bytes (48 MB) / 151613440 bytes (144 MB) up to 1230569472 bytes (1173 MB) JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1214M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.03 FML v7.2.165.1065 Minecraft Forge 10.12.1.1065 9 mods loaded, 9 mods active mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed FML{7.2.165.1065} [Forge Mod Loader] (forge-1.7.2-10.12.1.1065.jar) Unloaded->Constructed Forge{10.12.1.1065} [Minecraft Forge] (forge-1.7.2-10.12.1.1065.jar) Unloaded->Constructed CodeChickenCore{rc_} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed NotEnoughItems{rc_} [Not Enough Items] (NotEnoughItems-1.7.2-rc2.jar) Unloaded->Constructed bspkrsCore{6.3(1.7.2)} [bspkrsCore] ([1.7.2]bspkrsCore-universal-6.3(1.7.2).jar) Unloaded->Constructed DamageIndicatorsMod{3.1.0} [Damage Indicators] ([1.7.2]DamageIndicatorsMod-3.1.0.jar) Unloaded->Constructed simonsoresMod{1.0} [simonsoresMod] (simonsoresMod.jar) Unloaded Waila{1.5.2_1.7.2} [Waila] (Waila-1.5.2-1.7.2-rc2.jar) Unloaded Launched Version: 1.7.2-Forge10.12.1.1065 LWJGL: 2.9.0 OpenGL: Intel Bear Lake B GL version 1.4.0 - Build 8.14.10.1930, Intel Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: Italiano (Italia) Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null Anisotropic Filtering: Off (1)
  8. I exported my mod from eclipse in a jar file, I put it in the mod folder of minecraft but when I run it crash: Minecraft Version: 1.7.2 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.7.0_55, Oracle Corporation Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation Memory: 50735584 bytes (48 MB) / 151609344 bytes (144 MB) up to 1230569472 bytes (1173 MB) JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1214M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.03 FML v7.2.165.1065 Minecraft Forge 10.12.1.1065 9 mods loaded, 9 mods active mcp{9.03} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed FML{7.2.165.1065} [Forge Mod Loader] (forge-1.7.2-10.12.1.1065.jar) Unloaded->Constructed Forge{10.12.1.1065} [Minecraft Forge] (forge-1.7.2-10.12.1.1065.jar) Unloaded->Constructed CodeChickenCore{rc_} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed NotEnoughItems{rc_} [Not Enough Items] (NotEnoughItems-1.7.2-rc2.jar) Unloaded->Constructed bspkrsCore{6.3(1.7.2)} [bspkrsCore] ([1.7.2]bspkrsCore-universal-6.3(1.7.2).jar) Unloaded->Constructed DamageIndicatorsMod{3.1.0} [Damage Indicators] ([1.7.2]DamageIndicatorsMod-3.1.0.jar) Unloaded->Constructed simonsoresMod{1.0} [simonsoresMod] (simonsoresMod.jar) Unloaded Waila{1.5.2_1.7.2} [Waila] (Waila-1.5.2-1.7.2-rc2.jar) Unloaded Launched Version: 1.7.2-Forge10.12.1.1065 LWJGL: 2.9.0 OpenGL: Intel Bear Lake B GL version 1.4.0 - Build 8.14.10.1930, Intel Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: Italiano (Italia) Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null Anisotropic Filtering: Off (1) some help?
  9. then it isn't how I have told? dxarm2 (child) -5F, 1F, -27F - dxarm1 (parent) -5F, -8F, -29F = -0F, 9F, 2F (new rotation point dxarm2) or no?
  10. i have this model: // Date: 05/08/2014 00:53:59 // Template version 1.1 // Java generated by Techne // Keep in mind that you still need to fill in some blanks // - ZeuX package com.simon.simonsores.mobs; import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; public class Amon extends ModelBase { //fields ModelRenderer head; ModelRenderer body1; ModelRenderer dxarm1; ModelRenderer sxarm1; ModelRenderer dxarm2; ModelRenderer sxarm2; ModelRenderer body2; ModelRenderer tail1; ModelRenderer tail2; ModelRenderer tail3; ModelRenderer tail4; ModelRenderer tail5; ModelRenderer tail6; ModelRenderer tail7; ModelRenderer tail8; ModelRenderer dxarm3; ModelRenderer sxarm3; public Amon() { textureWidth = 128; textureHeight = 128; head = new ModelRenderer(this, 96, 0); head.addBox(0F, 0F, 0F, 8, 8, ; head.setRotationPoint(0F, -17F, -31F); head.setTextureSize(128, 128); head.mirror = true; setRotation(head, 0F, 0F, 0F); body1 = new ModelRenderer(this, 92, 17); body1.addBox(0F, 0F, 0F, 10, 16, ; body1.setRotationPoint(-1F, -8F, -30F); body1.setTextureSize(128, 128); body1.mirror = true; setRotation(body1, 0.5948578F, 0F, 0F); dxarm1 = new ModelRenderer(this, 0, 82); dxarm1.addBox(0F, 0F, 0F, 4, 10, 4); dxarm1.setRotationPoint(-5F, -8F, -29F); dxarm1.setTextureSize(128, 128); dxarm1.mirror = true; setRotation(dxarm1, 0.1858931F, 0F, 0F); sxarm1 = new ModelRenderer(this, 0, 99); sxarm1.addBox(0F, 0F, 0F, 4, 10, 4); sxarm1.setRotationPoint(9F, -8F, -29F); sxarm1.setTextureSize(128, 128); sxarm1.mirror = true; setRotation(sxarm1, 0.1858931F, 0F, 0F); dxarm2 = new ModelRenderer(this, 21, 56); dxarm2.addBox(0F, 0F, 0F, 4, 10, 4); dxarm2.setRotationPoint(-5F, 1F, -27F); dxarm2.setTextureSize(128, 128); dxarm2.mirror = true; setRotation(dxarm2, 0F, 0F, 0F); sxarm2 = new ModelRenderer(this, 38, 56); sxarm2.addBox(0F, 0F, 0F, 4, 10, 4); sxarm2.setRotationPoint(9F, 1F, -27F); sxarm2.setTextureSize(128, 128); sxarm2.mirror = true; setRotation(sxarm2, 0F, 0F, 0F); dxarm3 = new ModelRenderer(this, 21, 72); dxarm3.addBox(0F, 0F, 0F, 4, 8, 5); dxarm3.setRotationPoint(-5F, 8F, -27F); dxarm3.setTextureSize(128, 128); dxarm3.mirror = true; setRotation(dxarm3, -0.4461433F, 0F, 0F); sxarm3 = new ModelRenderer(this, 21, 87); sxarm3.addBox(0F, 0F, 0F, 4, 8, 5); sxarm3.setRotationPoint(9F, 8F, -27F); sxarm3.setTextureSize(128, 128); sxarm3.mirror = true; setRotation(sxarm3, -0.4461433F, 0F, 0F); body2 = new ModelRenderer(this, 88, 42); body2.addBox(0F, 0F, 0F, 12, 9, ; body2.setRotationPoint(-2F, 3F, -22F); body2.setTextureSize(128, 128); body2.mirror = true; setRotation(body2, 0.4833219F, 0F, 0F); tail1 = new ModelRenderer(this, 0, 0); tail1.addBox(0F, 0F, 0F, 14, 9, ; tail1.setRotationPoint(-3F, 10F, -19F); tail1.setTextureSize(128, 128); tail1.mirror = true; setRotation(tail1, 0.7435722F, 0F, 0F); tail2 = new ModelRenderer(this, 0, 19); tail2.addBox(0F, 0F, 0F, 14, 8, ; tail2.setRotationPoint(-3F, 16F, -14F); tail2.setTextureSize(128, 128); tail2.mirror = true; setRotation(tail2, 1.003822F, 0F, 0F); tail3 = new ModelRenderer(this, 0, 36); tail3.addBox(0F, 0F, 0F, 14, 10, ; tail3.setRotationPoint(-3F, 20F, -9F); tail3.setTextureSize(128, 128); tail3.mirror = true; setRotation(tail3, 1.301251F, 0F, 0F); tail4 = new ModelRenderer(this, 45, 0); tail4.addBox(0F, 0F, 0F, 12, 10, ; tail4.setRotationPoint(-2F, 23F, 0F); tail4.setTextureSize(128, 128); tail4.mirror = true; setRotation(tail4, 1.59868F, 0F, 0F); tail5 = new ModelRenderer(this, 45, 19); tail5.addBox(0F, 0F, 0F, 10, 10, ; tail5.setRotationPoint(-1F, 23F, 9F); tail5.setTextureSize(128, 128); tail5.mirror = true; setRotation(tail5, 1.59868F, 0F, 0F); tail6 = new ModelRenderer(this, 45, 38); tail6.addBox(0F, 0F, 0F, 8, 10, 6); tail6.setRotationPoint(0F, 22F, 17F); tail6.setTextureSize(128, 128); tail6.mirror = true; setRotation(tail6, 1.59868F, 0F, 0F); tail7 = new ModelRenderer(this, 0, 56); tail7.addBox(0F, 0F, 0F, 6, 10, 4); tail7.setRotationPoint(1F, 21F, 24F); tail7.setTextureSize(128, 128); tail7.mirror = true; setRotation(tail7, 1.59868F, 0F, 0F); tail8 = new ModelRenderer(this, 0, 72); tail8.addBox(0F, 0F, 0F, 4, 5, 2); tail8.setRotationPoint(2F, 20F, 32F); tail8.setTextureSize(128, 128); tail8.mirror = true; setRotation(tail8, 1.59868F, 0F, 0F); } public void render(Entity par1Entity, float par2, float par3, float par4, float par5, float par6, float par7) { super.render(par1Entity, par2, par3, par4, par5, par6, par7); setRotationAngles(par2, par3, par4, par5, par6, par7, par1Entity); head.render(par7); body1.render(par7); dxarm1.render(par7); sxarm1.render(par7); body2.render(par7); tail1.render(par7); tail2.render(par7); tail3.render(par7); tail4.render(par7); tail5.render(par7); tail6.render(par7); tail7.render(par7); tail8.render(par7); } 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) { super.setRotationAngles(par1, par2, par3, par4, par5, par6, par7Entity); head.rotateAngleY = par4 / 57.29578F; head.rotateAngleX = par5 / 57.29578F; this.dxarm1.rotateAngleX = MathHelper.cos(par1 * 0.6662F) * 1.4F * par2; this.dxarm1.rotateAngleY = 0.0F; this.sxarm1.rotateAngleX = MathHelper.cos(par1 * 0.6662F + (float)Math.PI) * 1.4F * par2; this.sxarm1.rotateAngleY = 0.0F; this.dxarm1.addChild(dxarm2); this.dxarm2.addChild(dxarm3); this.sxarm1.addChild(sxarm2); this.sxarm2.addChild(sxarm3); } } I'm making the arms animation, I just put the addChild the I removed the renders but now I don't understund how to reset the rotation points: if the dxarm1 is -5F, -8F, -29F and dxarm2 is -5F, 1F, -27F Ihave to change dxarm2 in -0F, 9F, 2F or no? and if I change it in this, then for reset the rotation point of dxarm3 that is -5F, 8F, -27F I have to do (-5F, 8F, -27F) - (-0F, 9F, 2F) that is (-5F, -1F, -29F) or no? I tested it in game and the arms are seen as in this picture: http://i1102.photobucket.com/albums/g454/2010simoDK/mmm.png another thing you can see in the picture is the head animation isn't seen good, this because the rotation point of the head is here: http://i1102.photobucket.com/albums/g454/2010simoDK/mmmm.png so also how can I reset the rotation point of the head at the center?
  11. where I can see the codes of all special attacks? example shoot fireballs, lightnings, potion effects, explosions ecc?
  12. maybe can center the fact that the texture is 512 x 380? maybe it's too big?
  13. and in techne the mob appears correct: http://i1102.photobucket.com/albums/g454/2010simoDK/d.png
  14. in the main class of the mod: @EventHandler public void load(FMLInitializationEvent event) { proxy.RegisterInformation(); } }
×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.