<commit_before>/*
 * Copyright  2014 - 2017 | Wurst-Imperium | All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package tk.wurst_client.utils;

import java.util.Collections;
import java.util.Comparator;

import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import tk.wurst_client.features.mods.XRayMod;

public class XRayUtils
{
	public static void initXRayBlocks()
	{
		// ores
		add(Blocks.COAL_ORE);
		add(Blocks.COAL_BLOCK);
		add(Blocks.IRON_ORE);
		add(Blocks.IRON_BLOCK);
		add(Blocks.GOLD_ORE);
		add(Blocks.GOLD_BLOCK);
		add(Blocks.LAPIS_ORE);
		add(Blocks.LAPIS_BLOCK);
		add(Blocks.REDSTONE_ORE);
		add(Blocks.LIT_REDSTONE_ORE);
		add(Blocks.REDSTONE_BLOCK);
		add(Blocks.DIAMOND_ORE);
		add(Blocks.DIAMOND_BLOCK);
		add(Blocks.EMERALD_ORE);
		add(Blocks.EMERALD_BLOCK);
		add(Blocks.QUARTZ_ORE);
		
		// sort-of ores
		add(Blocks.CLAY);
		add(Blocks.BONE_BLOCK);
		add(Blocks.GLOWSTONE);
		
		// utilities
		add(Blocks.CRAFTING_TABLE);
		add(Blocks.FURNACE);
		add(Blocks.LIT_FURNACE);
		add(Blocks.TORCH);
		add(Blocks.LADDER);
		add(Blocks.TNT);
		add(Blocks.ENCHANTING_TABLE);
		add(Blocks.BOOKSHELF);
		add(Blocks.ANVIL);
		add(Blocks.BREWING_STAND);
		add(Blocks.BEACON);
		
		// storage
		add(Blocks.CHEST);
		add(Blocks.TRAPPED_CHEST);
		add(Blocks.ENDER_CHEST);
		add(Blocks.HOPPER);
		add(Blocks.DROPPER);
		add(Blocks.DISPENSER);
		
		// liquids
		add(Blocks.WATER);
		add(Blocks.FLOWING_WATER);
		add(Blocks.LAVA);
		add(Blocks.FLOWING_LAVA);
		
		// spawners
		add(Blocks.MOSSY_COBBLESTONE);
		add(Blocks.MOB_SPAWNER);
		
		// portals
		add(Blocks.PORTAL);
		add(Blocks.END_PORTAL);
		add(Blocks.END_PORTAL_FRAME);
		
		// command blocks
		add(Blocks.COMMAND_BLOCK);
		add(Blocks.CHAIN_COMMAND_BLOCK);
		add(Blocks.REPEATING_COMMAND_BLOCK);
	}
	
	private static void add(Block block)
	{
		XRayMod.xrayBlocks.add(block);
	}
	
	public static boolean isXRayBlock(Block blockToCheck)
	{
		if(XRayMod.xrayBlocks.contains(blockToCheck))
			return true;
		return false;
	}
	
	public static void sortBlocks()
	{
		Collections.sort(XRayMod.xrayBlocks, new Comparator<Block>()
		{
			@Override
			public int compare(Block o1, Block o2)
			{
				return Block.getIdFromBlock(o1) - Block.getIdFromBlock(o2);
			}
		});
	}
}<commit_msg>Update XRayUtils<commit_after>/*
 * Copyright  2014 - 2017 | Wurst-Imperium | All rights reserved.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */
package tk.wurst_client.utils;

import java.util.Collections;

import net.minecraft.block.Block;
import net.minecraft.init.Blocks;
import tk.wurst_client.features.mods.XRayMod;

public class XRayUtils
{
	public static void initXRayBlocks()
	{
		// ores
		add(Blocks.COAL_ORE);
		add(Blocks.COAL_BLOCK);
		add(Blocks.IRON_ORE);
		add(Blocks.IRON_BLOCK);
		add(Blocks.GOLD_ORE);
		add(Blocks.GOLD_BLOCK);
		add(Blocks.LAPIS_ORE);
		add(Blocks.LAPIS_BLOCK);
		add(Blocks.REDSTONE_ORE);
		add(Blocks.LIT_REDSTONE_ORE);
		add(Blocks.REDSTONE_BLOCK);
		add(Blocks.DIAMOND_ORE);
		add(Blocks.DIAMOND_BLOCK);
		add(Blocks.EMERALD_ORE);
		add(Blocks.EMERALD_BLOCK);
		add(Blocks.QUARTZ_ORE);
		
		// sort-of ores
		add(Blocks.CLAY);
		add(Blocks.BONE_BLOCK);
		add(Blocks.GLOWSTONE);
		
		// utilities
		add(Blocks.CRAFTING_TABLE);
		add(Blocks.FURNACE);
		add(Blocks.LIT_FURNACE);
		add(Blocks.TORCH);
		add(Blocks.LADDER);
		add(Blocks.TNT);
		add(Blocks.ENCHANTING_TABLE);
		add(Blocks.BOOKSHELF);
		add(Blocks.ANVIL);
		add(Blocks.BREWING_STAND);
		add(Blocks.BEACON);
		
		// storage
		add(Blocks.CHEST);
		add(Blocks.TRAPPED_CHEST);
		add(Blocks.ENDER_CHEST);
		add(Blocks.HOPPER);
		add(Blocks.DROPPER);
		add(Blocks.DISPENSER);
		
		// liquids
		add(Blocks.WATER);
		add(Blocks.FLOWING_WATER);
		add(Blocks.LAVA);
		add(Blocks.FLOWING_LAVA);
		
		// spawners
		add(Blocks.MOSSY_COBBLESTONE);
		add(Blocks.MOB_SPAWNER);
		
		// portals
		add(Blocks.PORTAL);
		add(Blocks.END_PORTAL);
		add(Blocks.END_PORTAL_FRAME);
		
		// command blocks
		add(Blocks.COMMAND_BLOCK);
		add(Blocks.CHAIN_COMMAND_BLOCK);
		add(Blocks.REPEATING_COMMAND_BLOCK);
	}
	
	private static void add(Block block)
	{
		XRayMod.xrayBlocks.add(block);
	}
	
	public static boolean isXRayBlock(Block blockToCheck)
	{
		return XRayMod.xrayBlocks.contains(blockToCheck);
	}
	
	public static void sortBlocks()
	{
		Collections.sort(XRayMod.xrayBlocks,
			(o1, o2) -> Block.getIdFromBlock(o1) - Block.getIdFromBlock(o2));
	}
}
{'fraction_non_alphanumeric': 0.13170113972140143, 'fraction_numerical': 0.006753904601097509, 'mean_word_length': 4.123243243243243, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 5, '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': '5702001', 'n_tokens_mistral': 2100, 'n_tokens_neox': 1859, 'n_words': 292}