diff --git a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemTravelBelt.java b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemTravelBelt.java index 3032110d8..a75a1ae1a 100644 --- a/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemTravelBelt.java +++ b/src/main/java/vazkii/botania/common/item/equipment/bauble/ItemTravelBelt.java @@ -27,6 +27,7 @@ import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent; import org.lwjgl.opengl.GL11; import vazkii.botania.api.item.IBaubleRender; +import vazkii.botania.api.mana.ManaItemHandler; import vazkii.botania.client.lib.LibResources; import vazkii.botania.common.lib.LibItemNames; import baubles.api.BaubleType; @@ -42,6 +43,9 @@ public class ItemTravelBelt extends ItemBauble implements IBaubleRender { @SideOnly(Side.CLIENT) private static ModelBiped model; + private static final int COST = 1; + private static final int COST_INTERVAL = 10; + public static List playersWithStepup = new ArrayList(); final float speed; @@ -80,6 +84,9 @@ public class ItemTravelBelt extends ItemBauble implements IBaubleRender { if(player.isSneaking()) player.stepHeight = 0.50001F; // Not 0.5F because that is the default else player.stepHeight = 1F; + + if(player.ticksExisted % COST_INTERVAL == 0) + ManaItemHandler.requestManaExact(belt, player, COST, true); } else { player.stepHeight = 0.5F; playersWithStepup.remove(s); @@ -106,7 +113,7 @@ public class ItemTravelBelt extends ItemBauble implements IBaubleRender { private boolean shouldPlayerHaveStepup(EntityPlayer player) { ItemStack armor = PlayerHandler.getPlayerBaubles(player).getStackInSlot(3); - return armor != null && armor.getItem() instanceof ItemTravelBelt; + return armor != null && armor.getItem() instanceof ItemTravelBelt && ManaItemHandler.requestManaExact(armor, player, COST, false); } @SubscribeEvent diff --git a/src/main/resources/assets/botania/lang/en_US.lang b/src/main/resources/assets/botania/lang/en_US.lang index 10fb30f79..7cc61cfbc 100644 --- a/src/main/resources/assets/botania/lang/en_US.lang +++ b/src/main/resources/assets/botania/lang/en_US.lang @@ -2470,7 +2470,7 @@ botania.page.auraRing2=Upgrading the ring # -- SOUJOURNER'S SASH botania.entry.travelBelt=Soujourner's Sash -botania.page.travelBelt0=Traversing terrain sometimes proves to be a hassle. The &1Soujourner's Sash&0 can be equipped in the &4Belt&0 slot, and when worn will increase the movement speed, jump height and resistance to fall damage of the wearer.
Lastly, if not sneaking, it also allows the wearer to walk over 1 block high gaps without jumping with ease. +botania.page.travelBelt0=Traversing terrain sometimes proves to be a hassle. The &1Soujourner's Sash&0 can be equipped in the &4Belt&0 slot, and when worn will increase the movement speed, jump height and resistance to fall damage of the wearer. This power comes at a small &4Mana&0 cost.
Lastly, if not sneaking, it also allows the wearer to walk over 1 block high gaps without jumping with ease. botania.page.travelBelt1=...everell # -- TECTONIC GIRDLE