package info.u_team.u_team_test.entity;

import java.util.Random;

import net.minecraft.entity.*;
import net.minecraft.entity.monster.*;
import net.minecraft.item.*;
import net.minecraft.potion.*;
import net.minecraft.util.*;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.*;

public class TestLivingEntity extends ZombieEntity {
	
	public TestLivingEntity(EntityType<? extends ZombieEntity> type, World worldIn) {
		super(type, worldIn);
	}
	
	public static boolean func_223334_b(EntityType<HuskEntity> p_223334_0_, IServerWorld p_223334_1_, SpawnReason reason, BlockPos p_223334_3_, Random p_223334_4_) {
		return canMonsterSpawnInLight(p_223334_0_, p_223334_1_, reason, p_223334_3_, p_223334_4_) && (reason == SpawnReason.SPAWNER || p_223334_1_.canSeeSky(p_223334_3_));
	}
	
	@Override
	protected boolean shouldBurnInDay() {
		return false;
	}
	
	@Override
	protected SoundEvent getAmbientSound() {
		return SoundEvents.BLOCK_LODESTONE_PLACE;
	}
	
	@Override
	protected SoundEvent getHurtSound(DamageSource source) {
		return SoundEvents.ENTITY_ARROW_SHOOT;
	}
	
	@Override
	protected SoundEvent getDeathSound() {
		return SoundEvents.ENTITY_DONKEY_DEATH;
	}
	
	@Override
	protected SoundEvent getStepSound() {
		return SoundEvents.ENTITY_HOGLIN_HURT;
	}
	
	@Override
	public boolean attackEntityAsMob(Entity entity) {
		final boolean flag = super.attackEntityAsMob(entity);
		if (flag && getHeldItemMainhand().isEmpty() && entity instanceof LivingEntity) {
			final float localDifficulty = world.getDifficultyForLocation(getPosition()).getAdditionalDifficulty();
			((LivingEntity) entity).addPotionEffect(new EffectInstance(Effects.LEVITATION, (int) (500 * localDifficulty)));
		}
		return flag;
	}
	
	@Override
	protected boolean shouldDrown() {
		return false;
	}
	
	@Override
	protected ItemStack getSkullDrop() {
		return new ItemStack(Items.GHAST_TEAR);
	}
}

@@ -485,56 +485,56 @@
 ean 
-func_223334_b(EntityType%3CHuskEntity%3E p_223334_0_
+canSpawn(EntityType%3CTestLivingEntity%3E entityType
 , IS
@@ -544,27 +544,21 @@
 erWorld 
-p_223334_1_
+world
 , SpawnR
@@ -585,132 +585,92 @@
 os p
-_223334_3_, Random p_223334_4_) %7B%0A%09%09return canMonsterSpawnInLight(p_223334_0_, p_223334_1_, reason, p_223334_3_, p_223334_4_
+os, Random random) %7B%0A%09%09return canMonsterSpawn(entityType, world, reason, pos, random
 ) &&
@@ -708,19 +708,13 @@
  %7C%7C 
-p_223334_1_
+world
 .can
@@ -725,18 +725,10 @@
 ky(p
-_223334_3_
+os
 ));%0A

Rename canSpawn function