<commit_before>package com.allforfunmc.enchantments;

import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
import net.minecraft.client.Minecraft;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;

public class ServerTickHandler {
// note this class registers enchantments for natural minecraft stuff
	
	/*this is for each individual class
	 * 
	 *     @Override
	public void onArmorTick(World world, EntityPlayer player, ItemStack stack){
		if(stack.getItem() == MyItems.LightningBoots){
			int j = EnchantmentHelper.getEnchantmentLevel(MainRegistry.speedboost.effectId, stack);
			if(j > 0){
				player.addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 50, j - 1));
			}
		}
		
	}
	 * 
	 */
	
	private Minecraft mc;
	
	public ServerTickHandler(Minecraft mc){
		this.mc = mc;
	}
	
	@SubscribeEvent
	public void onPlayerTick(PlayerTickEvent event){
		if(event.player.getCurrentArmor(0) != null){
			ItemStack boots = event.player.getCurrentArmor(0);
			
			if(boots.getItem() == Items.diamond_boots || boots.getItem() == Items.golden_boots || boots.getItem() == Items.iron_boots || boots.getItem() == Items.leather_boots || boots.getItem() == Items.chainmail_boots){
				int j = EnchantmentHelper.getEnchantmentLevel(MainRegistry.speedboost.effectId, boots);
				if(j > 0){
					event.player.addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 50, j - 1));
					
				}
			}
		}	
	}
	
	@SubscribeEvent
	public void onPlayerTick1(PlayerTickEvent event){
		boolean b = event.player.isSwingInProgress;
		if(b != false){
			ItemStack item = event.player.getCurrentEquippedItem();
			
			if(item.getItem() == Items.diamond_sword || item.getItem() == Items.golden_sword || item.getItem() == Items.iron_sword || item.getItem() == Items.stone_sword || item.getItem() == Items.wooden_sword){
				int a = EnchantmentHelper.getEnchantmentLevel(MainRegistry.explodingarrows.effectId, item);
				if(a > 0){
					//penne12 can you make this explode whenever the player hits an object
					//the explosion is on the object

				}
			}
		}	
	}
	
}<commit_msg>BUT IT'S Dead.<commit_after>package com.allforfunmc.enchantments;

import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.common.gameevent.TickEvent.PlayerTickEvent;
import net.minecraft.client.Minecraft;
import net.minecraft.enchantment.EnchantmentHelper;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.world.World;

public class ServerTickHandler {
// note this class registers enchantments for natural minecraft stuff
	
	/*this is for each individual class
	 * 
	 *     @Override
	public void onArmorTick(World world, EntityPlayer player, ItemStack stack){
		if(stack.getItem() == MyItems.LightningBoots){
			int j = EnchantmentHelper.getEnchantmentLevel(MainRegistry.speedboost.effectId, stack);
			if(j > 0){
				player.addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 50, j - 1));
			}
		}
		
	}
	 * 
	 */
	
	private Minecraft mc;
	
	public ServerTickHandler(Minecraft mc){
		this.mc = mc;
	}
	
	@SubscribeEvent
	public void onPlayerTick(PlayerTickEvent event){
		if(event.player.getCurrentArmor(0) != null){
			ItemStack boots = event.player.getCurrentArmor(0);
			
			if(boots.getItem() == Items.diamond_boots || boots.getItem() == Items.golden_boots || boots.getItem() == Items.iron_boots || boots.getItem() == Items.leather_boots || boots.getItem() == Items.chainmail_boots){
				int j = EnchantmentHelper.getEnchantmentLevel(MainRegistry.speedboost.effectId, boots);
				if(j > 0){
					event.player.addPotionEffect(new PotionEffect(Potion.moveSpeed.getId(), 50, j - 1));
					
				}
			}
		}	
	}
	
	@SubscribeEvent
	public void onPlayerTick1(PlayerTickEvent event){
		boolean b = event.player.isSwingInProgress;
		boolean d = event.player.isDead;
		if(b && !d){
			ItemStack item = event.player.getCurrentEquippedItem();
			
			if(item.getItem() == Items.diamond_sword || item.getItem() == Items.golden_sword || item.getItem() == Items.iron_sword || item.getItem() == Items.stone_sword || item.getItem() == Items.wooden_sword){
				int a = EnchantmentHelper.getEnchantmentLevel(MainRegistry.explodingarrows.effectId, item);
				if(a > 0){
					
				}
			}
		}	
	}
	
}
{'fraction_non_alphanumeric': 0.12356828193832599, 'fraction_numerical': 0.005726872246696035, 'mean_word_length': 4.323563892145369, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '981448', 'n_tokens_mistral': 1689, 'n_tokens_neox': 1501, 'n_words': 279}