<commit_before>package jordan.bettercraft.init;

import java.util.Collection;
import java.util.Random;
import java.util.function.Consumer;

import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickItem;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

public class BetterEvents {

	@SubscribeEvent
	public void speedCrafting(RightClickBlock event) {
		if (event.getItemStack() != null && event.getWorld().getBlockState(event.getPos()).getBlock() != null) {
			if (event.getWorld().getBlockState(event.getPos()).getBlock().equals(BetterBlocks.ALTAR)
					&& event.getItemStack().getItem().equals(Items.SUGAR)
					&& event.getEntityPlayer().inventory.hasItemStack(new ItemStack(BetterItems.CATALYST))) {
				event.getEntityPlayer().inventory.clearMatchingItems(Items.SUGAR, 0, 1, null);
				event.getEntityPlayer().inventory.clearMatchingItems(BetterItems.CATALYST, 0, 1, null);
				event.getEntityPlayer().inventory.addItemStackToInventory(new ItemStack(BetterItems.SWIFT_ITEM));

			}

		}
	}

	@SubscribeEvent
	public void catCrafting(RightClickBlock event) {
		if (event.getItemStack() != null && event.getWorld().getBlockState(event.getPos()).getBlock() != null) {
			if (event.getWorld().getBlockState(event.getPos()).getBlock().equals(BetterBlocks.ALTAR)
					&& event.getItemStack().getItem().equals(Items.NETHER_STAR)) {
				event.getEntityPlayer().inventory.clearMatchingItems(Items.NETHER_STAR, 0, 1, null);
				event.getEntityPlayer().inventory.addItemStackToInventory(new ItemStack(BetterItems.CATALYST, 10));
			}

		}

	}

	@SubscribeEvent
	public void FlightRing(RightClickItem event) {
		if (event.getItemStack() != null) {
			if (event.getEntityPlayer().capabilities.allowFlying = false)
				if (event.getItemStack().equals(new ItemStack(BetterItems.FLYING_RING))) {
					event.getEntityPlayer().capabilities.allowFlying = false;
				} else {
					event.getEntityPlayer().capabilities.allowFlying = true;
				}
		}
	}

}<commit_msg>Minor<commit_after>package jordan.bettercraft.init;

import java.util.Collection;
import java.util.Random;
import java.util.function.Consumer;

import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickBlock;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.RightClickItem;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

public class BetterEvents {

	@SubscribeEvent
	public void speedCrafting(RightClickBlock event) {
		if (event.getItemStack() != null && event.getWorld().getBlockState(event.getPos()).getBlock() != null) {
			if (event.getWorld().getBlockState(event.getPos()).getBlock().equals(BetterBlocks.ALTAR)
					&& event.getItemStack().getItem().equals(Items.SUGAR)
					&& event.getEntityPlayer().inventory.hasItemStack(new ItemStack(BetterItems.CATALYST))) {
				event.getEntityPlayer().inventory.clearMatchingItems(Items.SUGAR, 0, 1, null);
				event.getEntityPlayer().inventory.clearMatchingItems(BetterItems.CATALYST, 0, 1, null);
				event.getEntityPlayer().inventory.addItemStackToInventory(new ItemStack(BetterItems.SWIFT_ITEM));

			}

		}
	}

	@SubscribeEvent
	public void catCrafting(RightClickBlock event) {
		if (event.getItemStack() != null && event.getWorld().getBlockState(event.getPos()).getBlock() != null) {
			if (event.getWorld().getBlockState(event.getPos()).getBlock().equals(BetterBlocks.ALTAR)
					&& event.getItemStack().getItem().equals(Items.NETHER_STAR)) {
				event.getEntityPlayer().inventory.clearMatchingItems(Items.NETHER_STAR, 0, 1, null);
				event.getEntityPlayer().inventory.addItemStackToInventory(new ItemStack(BetterItems.CATALYST, 10));
			}

		}

	}

	@SubscribeEvent
	public void FlightRing(RightClickItem event) {
		if (event.getItemStack() != null) {
			if (event.getItemStack().equals(new ItemStack(BetterItems.FLYING_RING))) {
				if (event.getEntityPlayer().capabilities.allowFlying = false) {
					event.getEntityPlayer().capabilities.allowFlying = true;
				}else{
					event.getEntityPlayer().capabilities.allowFlying = false;
				}

			}
		}
	}
}
{'fraction_non_alphanumeric': 0.13401841147505889, 'fraction_numerical': 0.003425390708627703, 'mean_word_length': 5.712643678160919, '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': '3949520', 'n_tokens_mistral': 1646, 'n_tokens_neox': 1465, 'n_words': 186}