<commit_before>package k2b6s9j.boatcraft.api.registry

import java.util.{HashMap, List, Map}

import scala.collection.JavaConversions.asScalaBuffer

import k2b6s9j.boatcraft.api.traits.Modifier
import k2b6s9j.boatcraft.core.materials.Empty
import net.minecraft.item.ItemStack

/** Contains the methods needed to register Materials with BoatCraft:Core. */
object ModifierRegistry
{
  /** The Map containing all of the registered Modifiers for BoatCraft:Core to create boats with. */
  var modifiers: Map[String, Modifier] = new HashMap[String, Modifier]

  /** Adds a single Modifier to the Map used by BoatCraft:Core for boat creation.
    *
    * @param newModifier the Modifier being registered
    */
  def addModifier(newModifier: Modifier)
	{
		modifiers put(newModifier toString, newModifier)
	}

  /** Adds a List of Modifiers to the Map used by BoatCraft:Core for boat creation.
    *
    * @param newModifiers list of Modifiers being registered
    */
	def addModifiers(newModifiers: List[Modifier])
	{
		for (modifier <- newModifiers)
			modifiers put(modifier toString, modifier)
	}

  /** Returns a registered Modifier associated with a certain name.
    *
    * @param name name of registered Modifier
    * @return registered Modifier
    */
	def getModifier(name: String) =
		modifiers get name

  /** Returns a registered Modifier associated with a certain ItemStack.
   *
   * @param stack ItemStack of registered Modifier
   * @return registered Modifier
   */
	def getModifier(stack: ItemStack) =
		if (stack.stackTagCompound == null) Empty
		else modifiers get (stack.stackTagCompound getString "modifier")
}<commit_msg>Deprecated Modifier Registry<commit_after>package k2b6s9j.boatcraft.api.registry

import java.util.{HashMap, List, Map}

import scala.collection.JavaConversions.asScalaBuffer

import k2b6s9j.boatcraft.api.traits.Modifier
import k2b6s9j.boatcraft.core.materials.Empty
import net.minecraft.item.ItemStack
import k2b6s9j.boatcraft.api.Registry

/** Contains the methods needed to register Materials with BoatCraft:Core. */
@deprecated
object ModifierRegistry
{
  /** The Map containing all of the registered Modifiers for BoatCraft:Core to create boats with. */
  @deprecated
  var modifiers: Map[String, Modifier] = Registry.modifiers

  /** Adds a single Modifier to the Map used by BoatCraft:Core for boat creation.
    *
    * @param newModifier the Modifier being registered
    */
  @deprecated
  def addModifier(newModifier: Modifier)
	{
		Registry register newModifier
	}

  /** Adds a List of Modifiers to the Map used by BoatCraft:Core for boat creation.
    *
    * @param newModifiers list of Modifiers being registered
    */
	def addModifiers(newModifiers: List[Modifier])
	{
		Registry register newModifiers
	}

  /** Returns a registered Modifier associated with a certain name.
    *
    * @param name name of registered Modifier
    * @return registered Modifier
    */
	def getModifier(name: String) =
		modifiers get name

  /** Returns a registered Modifier associated with a certain ItemStack.
   *
   * @param stack ItemStack of registered Modifier
   * @return registered Modifier
   */
	def getModifier(stack: ItemStack) =
		if (stack.stackTagCompound == null) Empty
		else modifiers get (stack.stackTagCompound getString "modifier")
}
{'fraction_non_alphanumeric': 0.07825295723384895, 'fraction_numerical': 0.006369426751592357, 'mean_word_length': 4.058282208588957, 'pattern_counts': {'":': 0, '<': 4, '<?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': '2405280', 'n_tokens_mistral': 997, 'n_tokens_neox': 980, 'n_words': 316}