Jump to content
  • Home
  • Files
  • Docs
  • Merch
Status Updates
  • All Content

  • Advanced Search
  • Existing user? Sign In  

    Sign In



    • Not recommended on shared computers


    • Forgot your password?

  • Sign Up
  • All Activity
  • Home
  • naitdog15

naitdog15

Members
 View Profile  See their activity
  • Content Count

    3
  • Joined

    December 22, 2016
  • Last visited

    January 23, 2017

Community Reputation

0 Neutral

About naitdog15

  • Rank
    Tree Puncher

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!
  1. naitdog15 started following [1.8] [1.7.10] Implementing Guardians | onLivingUpdate() failure February 1, 2017
  2. naitdog15

    [1.8] [1.7.10] Implementing Guardians | onLivingUpdate() failure

    naitdog15 replied to naitdog15's topic in Modder Support

    Is there somewhere I can post it?
    • December 22, 2016
    • 3 replies
  3. naitdog15

    [1.8] [1.7.10] Implementing Guardians | onLivingUpdate() failure

    naitdog15 posted a topic in Modder Support

    I'm still heavy into to the 1.7.10 code, with my modpack design and majority of the mods still staying there. I decided to incorporate some 1.8 elements into 1.7.10. Guardians included and the ones that became the most difficult. I've so far been copying and pasting pieces of 1.8 code across to 1.7.10. Downgrading where necessary and using 'extenders' for additional code. I'd successfully made the model and render, however, the AI system just simply doesn't work and the mob just says in one spot. Just looking for assistance with trying to work the ai system of the guardian, since its so unique and different to other modded mobs. If you can spot the problem please let me know. I managed to narrow down the problem to the onLivingUpdate() algorithm. (the EntityGuardian.class onLivingUpdate() code below) public void onLivingUpdate() { if (this.worldObj.isRemote) { this.field_175484_c = this.field_175482_b; if (!this.isInWater()) { this.field_175483_bk = 2.0F; if (this.motionY > 0.0D && this.field_175480_bp) { this.worldObj.playSound(this.posX, this.posY, this.posZ, "TemogAesthetics:flop", 1.0F, 1.0F, false); } this.field_175480_bp = this.motionY < 0.0D; } else if (this.func_175472_n()) { if (this.field_175483_bk < 0.5F) { this.field_175483_bk = 4.0F; } else { this.field_175483_bk += (0.5F - this.field_175483_bk) * 0.1F; } } else { this.field_175483_bk += (0.125F - this.field_175483_bk) * 0.2F; } this.field_175482_b += this.field_175483_bk; this.field_175486_bm = this.field_175485_bl; if (!this.isInWater()) { this.field_175485_bl = this.rand.nextFloat(); } else if (this.func_175472_n()) { this.field_175485_bl += (0.0F - this.field_175485_bl) * 0.25F; } else { this.field_175485_bl += (1.0F - this.field_175485_bl) * 0.06F; } if (this.func_175472_n() && this.isInWater()) { Vec3 vec3 = this.getLook(0.0F); for (int i = 0; i < 2; ++i) { this.worldObj.spawnParticle("bubble", this.posX + (this.rand.nextDouble() - 0.5D) * (double)this.width - vec3.xCoord * 1.5D, this.posY + this.rand.nextDouble() * (double)this.height - vec3.yCoord * 1.5D, this.posZ + (this.rand.nextDouble() - 0.5D) * (double)this.width - vec3.zCoord * 1.5D, 0.0D, 0.0D, 0.0D); } } if (this.hasTargetedEntity()) { if (this.field_175479_bo < this.func_175464_ck()) { ++this.field_175479_bo; } EntityLivingBase entitylivingbase = this.getTargetedEntity(); if (entitylivingbase != null) { this.getLookHelper().setLookPositionWithEntity(entitylivingbase, 90.0F, 90.0F); this.getLookHelper().onUpdateLook(); double d5 = (double)this.func_175477_p(0.0F); double d0 = entitylivingbase.posX - this.posX; double d1 = entitylivingbase.posY + (double)(entitylivingbase.height * 0.5F) - (this.posY + (double)this.getEyeHeight()); double d2 = entitylivingbase.posZ - this.posZ; double d3 = Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2); d0 = d0 / d3; d1 = d1 / d3; d2 = d2 / d3; double d4 = this.rand.nextDouble(); while (d4 < d3) { d4 += 1.8D - d5 + this.rand.nextDouble() * (1.7D - d5); this.worldObj.spawnParticle("bubble", this.posX + d0 * d4, this.posY + d1 * d4 + (double)this.getEyeHeight(), this.posZ + d2 * d4, 0.0D, 0.0D, 0.0D); } } } }
    • December 22, 2016
    • 3 replies
  • All Activity
  • Home
  • naitdog15
  • Theme
  • Contact Us
  • Discord

Copyright © 2019 ForgeDevelopment LLC · Ads by Curse Powered by Invision Community