package com.witchworks.common.brew;

import com.witchworks.api.brew.IBrew;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.passive.EntityWolf;
import net.minecraft.util.DamageSource;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

/**
 * This class was created by Arekkuusu on 24/04/2017.
 * It's distributed as part of Witchworks under
 * the MIT license.
 */
public class SinkingBrew implements IBrew {

	@Override
	//Fixme: Why can't I sink? This is what I get for looking at Lycanites Mobs' source code on GitHub.
	public void apply(World world, BlockPos pos, EntityLivingBase entity, int amplifier, int tick) {
		if (entity.motionY > 0.0D)
			entity.motionY -= -1.0D;
	}


	@Override
	public void onFinish(World world, BlockPos pos, EntityLivingBase entity, int amplifier) {
		//NO-OP
	}

	@Override
	public boolean isInstant() {
		return false;
	}

	@Override
	public int getColor() {
		return 0x333399;
	}

	@Override
	public String getName() {
		return "brew.sinking_brew";
	}

	@SideOnly(Side.CLIENT)
	@Override
	public void renderHUD(int x, int y, Minecraft mc) {
		render(x, y, mc, 9);
	}

}

@@ -608,104 +608,18 @@
 %0A%09//
-Fixme: Why can't I sink? This is what I get for looking at Lycanites Mobs' source code on GitHub
+Todo: Test
 .%0A%09p
@@ -740,13 +740,11 @@
 nY %3E
+=
  0
-.0D
 )%0A%09%09
@@ -763,16 +763,13 @@
 onY 
--
+*
 = -1
-.0D
 ;%0A%09%7D

Test this tomorrow