Hardcore Ender Expansion

Hardcore Ender Expansion

2M Downloads

[FIXED 1.6.6] Haste Charm Formula is Way Off

ccbrown opened this issue ยท 5 comments

commented

When using the 25% haste charm, I break blocks far, far more than 25% faster. For me, ravaged brick without the charm takes almost 20 swings for me to break. With the charm active, it breaks in a single swing.

Looking in CharmEvents.java...

public void onBreakSpeed(BreakSpeed e){
    // HASTE
    if (!e.entity.worldObj.isRemote)e.newSpeed *= 1F+getPropPercentIncrease(e.entityPlayer,"breakspd",e.originalSpeed);
}

I believe that line should be something like this instead:

if (!e.entity.worldObj.isRemote)e.newSpeed += getPropPercentIncrease(e.entityPlayer,"breakspd",e.originalSpeed);

Since in the case of using a single 25% haste charm, getPropPercentIncrease returns e.originalSpeed * 0.25.

commented

Ravaged Brick is an exception, it has different mining speed algorithm than other blocks. I might adjust it, but since you get the charms in a Ravaged Dungeon, it might be a convenience to have a way of breaking them faster (although that purpose was already put into Scorching Pickaxe).

commented

Ravaged brick is the most noticeably effected, but this is definitely an issue with all blocks. Obsidian for example, mines in 2 swings as opposed to ~13 without the charm.

commented

When I test with 25% speed increase, it takes about 9 swings. It certainly is faster than 25%, but I'm afraid there's something else going on if it only takes you two swings.

commented

It's because the formula as you currently have it coded, gives you an exponential increase in speed and I have another mining speed increase. The current formula gives me newSpeed = oldSpeed * oldSpeed * 0.25. So just to throw in some random numbers... if oldSpeed is 6, newSpeed will be 9. If oldSpeed is 10, newSpeed will be 25. So if you have another form of haste, the charm just makes things really ridiculous.

commented

Right, I forgot that takes the original speed into the algorithm and not just the percentages. Sorry, I'm sometimes a bit derpy :P will review and fix.

(also you make some of the best bug reports I've seen, quite refreshing from all the "it crashed plz halp" :D)