Skip to content

Commit

Permalink
Set boots water walk speed and other shit
Browse files Browse the repository at this point in the history
  • Loading branch information
sekwah committed Apr 1, 2018
1 parent 31c022b commit e746eea
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Empty file modified gradlew
100644 → 100755
Empty file.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import net.minecraft.entity.EntityLiving; import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer; import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Enchantments;
import net.minecraft.init.SoundEvents; import net.minecraft.init.SoundEvents;
import net.minecraft.inventory.EntityEquipmentSlot; import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemArmor; import net.minecraft.item.ItemArmor;
Expand All @@ -16,6 +17,8 @@
import net.minecraft.util.EnumParticleTypes; import net.minecraft.util.EnumParticleTypes;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.common.util.EnumHelper; import net.minecraftforge.common.util.EnumHelper;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;


import javax.annotation.Nullable; import javax.annotation.Nullable;


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


if (player.capabilities.isFlying) return; if (player.capabilities.isFlying) return;
//if (player.capabilities.isCreativeMode) 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); 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; player.motionY -= 0.08F;
} }
Expand All @@ -58,6 +61,19 @@ public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
super.onArmorTick(world, player, 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 @Nullable
@Override @Override
public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type) { public String getArmorTexture(ItemStack stack, Entity entity, EntityEquipmentSlot slot, String type) {
Expand Down

0 comments on commit e746eea

Please sign in to comment.