Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/20/17 in all areas

  1. That's because it is always true for generated leaves. Trees are generated with their leaves 'ready to decay', but the leaves stay as long as there is a log nearby - then decay as soon as logs are removed. I haven't found a better way of finding leaves' decay state than to copy the convoluted vanilla code in BlockLeaves#updateTick to do the same check manually.
    1 point
  2. An update for anyone who's interested. I've made a searching algorithm that finds all connected trunk blocks, and connected leaves up to a certain count, starting closest to the trunk. I use it in this method, (and use the search results to make all the tree blocks fall). If anyone has ideas on how to improve the performance I'd be grateful - I know I've used several different collections to keep track of all the checking but I couldn't think of any way to reduce that further.
    1 point
  3. Take a closer look at EntityArrows onUpdate() method, your missing a lot of stuff in yours, for example that would be where you call onHit() after doing some raytracing and/or calling findEntityOnPath(). You should also check out EntityFireball, mainly how onUpdate() is written in there and how its different than EntityArrows onUpdate(). You could also just extend EntityThrowable and change some stuff in it to suit your needs, like getGravityVelocity to something smaller and override onImpact() to handle what it does on impact.
    1 point
  4. BTW: String.valueOf(targetField.get(object).toString()).toString() How many times do you really need to convert to a string?
    1 point
  5. This isn't realted to your problem but, public EntityBullet(World worldIn, EntityLivingBase shooter, float size, double speed, float damage) { this.damage = ItemGun.damage; Why the hell do you pass the damage to the constructor and then get the damage from the item? public static float damage; public ItemGun(float damage, float spread, double speed) { ItemGun.damage = damage; Second, why the hell is the variable static? As soon as you try to create two guns with different damage values, the second one will overwrite the first. Now: protected void onHit(RayTraceResult raytraceResultIn) This method is protected meaning that it can't be called by any class outside of this class (and any subclasses). You are not calling this method meaning that it is never called. What did you expect to happen?
    1 point
  6. Your ClientProxy#init needs to call super, otherwise it doesn't do anything in the CommonProxy#init.
    1 point
×
×
  • Create New...

Important Information

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