<commit_before>package com.lothrazar.event;

import com.lothrazar.samscontent.ModLoader;
import com.lothrazar.util.Reference;

import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

public class HandlerPlayerDeath 
{
	@SubscribeEvent
	public void onPlayerDeath(LivingDropsEvent event)
	{
		System.out.println("onPlayerDeath");
		if(ModLoader.settings.dropPlayerSkullOnDeath){return;}
		
		if(event.entity instanceof EntityPlayer == false){return;}
		
		EntityPlayer player = (EntityPlayer)event.entity;
		 
		ItemStack skull =  new ItemStack(Blocks.skull,1,Reference.skull_player);
		if(skull.getTagCompound() == null) skull.setTagCompound(new NBTTagCompound());
		skull.getTagCompound().setString("SkullOwner",player.getDisplayNameString());
		
		EntityItem ei = new EntityItem(event.entity.worldObj, 0, 0, 0,skull);
		 
		event.drops.add(ei);
	
	} 
}<commit_msg>player skull on death: fix drop by adding pos and using Item skull and such<commit_after>package com.lothrazar.event;

import com.lothrazar.samscontent.ModLoader;
import com.lothrazar.util.Reference;

import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraftforge.event.entity.living.LivingDropsEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

public class HandlerPlayerDeath 
{
	@SubscribeEvent
	public void onPlayerDeath(LivingDropsEvent event)
	{
		//System.out.println("onPlayerDeath " + ModLoader.settings.dropPlayerSkullOnDeath);
		if(ModLoader.settings.dropPlayerSkullOnDeath == false){return;}
		
		//System.out.println(event.entity.getClass().getName());
		//System.out.println(event.entityLiving.getClass().getName());
		
		if(event.entity instanceof EntityPlayer == false){return;}//is EntityPlayerMP a subclass
		
		EntityPlayer player = (EntityPlayer)event.entity;
		 
		ItemStack skull =  new ItemStack(Items.skull,1,Reference.skull_player);
		if(skull.getTagCompound() == null) skull.setTagCompound(new NBTTagCompound());
		skull.getTagCompound().setString("SkullOwner",player.getDisplayNameString());
		
		EntityItem ei = new EntityItem(event.entity.worldObj, player.posX, player.posY, player.posZ,skull);
		 
		event.drops.add(ei);
		System.out.println("skullskullskull");
	
	} 
}
{'fraction_non_alphanumeric': 0.11760299625468165, 'fraction_numerical': 0.0018726591760299626, 'mean_word_length': 5.901808785529716, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '11824', 'n_tokens_mistral': 924, 'n_tokens_neox': 845, 'n_words': 132}