package info.u_team.u_team_test.effect;

import java.util.Random;

import info.u_team.u_team_test.init.TestDamageSources;
import net.minecraft.client.gui.font.glyphs.BakedGlyph.Effect;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.potion.EffectType;
import net.minecraft.world.entity.LivingEntity;

public class RadiationEffect extends Effect {
	
	private final Random random;
	
	public RadiationEffect() {
		super(EffectType.HARMFUL, 0x0B7A14);
		random = new Random();
	}
	
	@Override
	public void performEffect(LivingEntity entityLiving, int amplifier) {
		amplifier += 2;
		entityLiving.attackEntityFrom(TestDamageSources.RADIATION, random.nextInt(amplifier));
		if (entityLiving instanceof PlayerEntity) {
			final PlayerEntity player = (PlayerEntity) entityLiving;
			player.addExhaustion(0.005F * amplifier);
		}
	}
	
	@Override
	public boolean isReady(int duration, int amplifier) {
		return random.nextInt(Math.max(20 - (amplifier * 2), 2)) == 0;
	}
}

@@ -140,137 +140,131 @@
 aft.
-client.gui.font.glyphs.BakedGlyph.Effect;%0Aimport net.minecraft.entity.player.PlayerEntity;%0Aimport net.minecraft.potion.EffectType
+world.effect.MobEffect;%0Aimport net.minecraft.world.effect.MobEffectCategory;%0Aimport net.minecraft.world.entity.LivingEntity
 ;%0Aim
@@ -295,28 +295,29 @@
 .entity.
-LivingEntity
+player.Player
 ;%0A%0Apubli
@@ -348,16 +348,19 @@
 extends 
+Mob
 Effect %7B
@@ -434,18 +434,25 @@
 per(
+Mob
 Effect
-Type
+Category
 .HAR
@@ -526,21 +526,23 @@
 oid 
-perform
+apply
 Effect
+Tick
 (Liv
@@ -619,24 +619,12 @@
 ing.
-attackEntityFrom
+hurt
 (Tes
@@ -717,77 +717,18 @@
 ayer
-Entity) %7B%0A%09%09%09final PlayerEntity player = (PlayerEntity) entityLiving;
+ player) %7B
 %0A%09%09%09
@@ -734,18 +734,24 @@
 %09player.
-ad
+causeFoo
 dExhaust
@@ -817,13 +817,26 @@
 n is
-Ready
+DurationEffectTick
 (int

Fix effect