Closed SonicX8000 closed 6 years ago
Thanks for referring the problem as well to the other mod author. As far as I'm concerned, I do not actually edit anything that is related to mining speed, I just hook into forge's provided BreakSpeed event and add onto the provided speed. Any consequent additions from other mods, that add to the breakspeed, should only give more breakspeed, as it would be added multiplicatively , or additively, unless someone sets the given value, instead of adding onto the given value.
private void getEmeraldRingEffect1(BreakSpeed event) {
if(event.getEntityPlayer() != null)
{
RpgInventoryData inventory = RpgInventoryData.get(event.getEntityPlayer());
ItemStack ring = inventory.getRing_2();
float modifier = 1;
float speed = event.getOriginalSpeed();
if (!ring.isEmpty())
if(inventory.getRing_2().getItem().getUnlocalizedName().contains("emerald"))
modifier = 4;
float level = (float)cloakLevel(inventory, LootEvent.CLOAK_MINING);
if(level > 0)
modifier = modifier == 1 ? level*1.35f : 2 + level * 1.35f;
event.setNewSpeed(speed*modifier);
}
}
replace your float speed = event.getOriginalSpeed();
with float speed = event.getNewSpeed();
will do. marking this as solved !
Minecraft: 1.12.2 Forge: 14.23.2.2654
Mods: HammerCore-1.12.2-1.9.9.1 ImprovableSkills_1.12.2-3.3.2r rpginventory-1.12-5.3.0.0 subcommonlib-sublib-1.12.2-1.2.0.4 theoneprobe-1.12-1.4.22
It seems that the Mining Speed Increase from the mod 'Improvable Skills' which allows you to spend your XP to increase certain skills, one of which affects Mining Speed isn't working correctly.
In one other case... that mod overwrites the Mining Speed Buff that you get from wearing the Buffed Ring or Cloak with a Emerald Mining Side Lining although I had a lot more mods installed when that happened. Before installing Improvable Skills the Ring & Cloak worked normally.
I tried to replicate that with only the listed mods above on newer worlds where Imrpovable Skills overwritten the Speed Buff from the Ring/Cloak but I couldn't get it to happen, sadly.
I am using "The One Probe" which allows me to view the Block Breaking Progress. I also only tap the Left Mouse Button to mine the block in one tick to get the speeds marked down.
Mods: rpginventory-1.12-5.3.0.0 subcommonlib-sublib-1.12.2-1.2.0.4 theoneprobe-1.12-1.4.22
Using a Diamond Pickaxe on a Stone or Obsidian Block. These are speeds I get in one tick.
Stone Default - 17% Mining Speed Buff from Ring - 71%
Obsidian Default - 0% Mining Speed Buff from Ring - 2%
Now let's add in the mods 'ImprovableSkills_1.12.2-3.3.2r & HammerCore-1.12.2-1.9.9.1' and try that again, same set up but with Mining Level increased.
Stone Mining Speed Buff from Ring + Mining Level 00 - 71% Mining Speed Buff from Ring + Mining Level 25 - 71%
Obsidian Mining Speed Buff from Ring + Mining Level 00 - 2% Mining Speed Buff from Ring + Mining Level 25 - 2%
It seems that the Mining Speed increase doesn't do anything with the Mining Speed Buff from the Ring/Cloak, even if you aren't wearing them. Like it canceled it out.
I should mention that Improvable Skills has sub-categories for Cutting Speed & Digging Speed instead of just Mining Speed. I think the Ring/Cloak affects overall speed no matter what if I recall?
https://github.com/APengu/ImprovableSkills/issues/9 Just in case...