Skip to content

Commit

Permalink
Fix Vambraces of Steady Progression
Browse files Browse the repository at this point in the history
  • Loading branch information
YannickMG committed Dec 24, 2024
1 parent cc3816d commit 4becb0f
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
import net.minecraftforge.oredict.OreDictionary;

import baubles.api.BaublesApi;
import baubles.api.expanded.BaubleExpandedSlots;
import cpw.mods.fml.common.Loader;
import cpw.mods.fml.common.eventhandler.Event;
import cpw.mods.fml.common.eventhandler.EventPriority;
Expand Down Expand Up @@ -184,9 +185,10 @@ public void onPlayerAttackEntity(AttackEntityEvent event) {

@SubscribeEvent
public void onPlayerBreaking(PlayerEvent.BreakSpeed event) {
if (event.entityPlayer.getItemInUse() != null
&& event.entityPlayer.getItemInUse().getItem() instanceof ItemMagicalBaubles
&& event.entityPlayer.getItemInUse().getItemDamage() == 3) {
ItemStack gauntletSlot = BaublesApi.getBaubles(event.entityPlayer).getStackInSlot(
BaubleExpandedSlots.getIndexesOfAssignedSlotsOfType(BaubleExpandedSlots.gauntletType)[0]);
if (gauntletSlot != null && gauntletSlot.getItem() instanceof ItemMagicalBaubles
&& gauntletSlot.getItemDamage() == 3) {
Block block = event.entityPlayer.worldObj.getBlock(event.x, event.y, event.z);
if (!event.entityPlayer.onGround) event.newSpeed *= 5.0F;
if (event.entityPlayer.isInsideOfMaterial(Material.water)
Expand Down

0 comments on commit 4becb0f

Please sign in to comment.