mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-26 23:13:09 +00:00
Made the Soujourner's Sash a little bit of Mana to work.
This commit is contained in:
1 parent
6e7d1463d5
commit
efd7d84af4
2 files changed
+9
-2
No files matched your search
@@ -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<String> 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
|
||||
|
||||
@@ -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.<br>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.<br>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
|
||||
|
||||
Reference in new issue
Block a user