Skip to content
Permalink
Browse files

Set boots water walk speed and other shit

  • Loading branch information...
sekwah41 committed Apr 1, 2018
1 parent 31c022b commit e746eea9dc06b6640e4850d19e2f41d91fee8c9d
Showing with 17 additions and 1 deletion.
  1. 0 gradlew
  2. +17 −1 src/main/java/com/github/rapture/aquatic/item/armor/HeavyIronBoots.java
0 gradlew 100644 → 100755
No changes.
@@ -8,6 +8,7 @@
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Enchantments;
import net.minecraft.init.SoundEvents;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemArmor;
@@ -16,6 +17,8 @@
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.world.World;
import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import javax.annotation.Nullable;

@@ -41,7 +44,7 @@ public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {

if (player.capabilities.isFlying) return;
//if (player.capabilities.isCreativeMode) return;
if (world.getBlockState(player.getPosition().down(1)).getMaterial() == Material.WATER) {
if (world.getBlockState(player.getPosition().down(1)).getMaterial() == Material.WATER && !player.onGround) {
ParticleUtils.spawnParticles(player, EnumParticleTypes.WATER_BUBBLE, (int) Math.round(Math.random() * 4), player.getPositionVector().x, player.getPositionVector().y, player.getPositionVector().z, (Math.random() - 0.5) * 0.8, 0.5, (Math.random() - 0.5) * 0.8, 0);
player.motionY -= 0.08F;
}
@@ -58,6 +61,19 @@ public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
super.onArmorTick(world, player, itemStack);
}

public void onUpdate(ItemStack stack, World worldIn, Entity entityIn, int itemSlot, boolean isSelected)
{
if (!stack.isItemEnchanted()) {
stack.addEnchantment(Enchantments.DEPTH_STRIDER, 3);
}
}

@SideOnly(Side.CLIENT)
public boolean hasEffect(ItemStack stack)
{
return false;
}

@Nullable
@Override
public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type) {

0 comments on commit e746eea

Please sign in to comment.
You can’t perform that action at this time.