Applied-Energistics-2-tiler.../src/api/java/appeng/api/features/IRecipeHandlerRegistry.java
thatsIch 322b296639 Fixes #1786: Locale critical code now uses the english local for transmission. Fixes Turkish Problem.
Applied English Locale where localization is not expected as in internal recipe handling and IMC handling, basically which interacts with public API where we either require to enforce the incoming text with regex ([a-z0-9]) or just expect proper usage of the API, but with just using upper cases in recipe files it would break in Turkish Locale like

ALIAS

another option would have been to use `equalsIgnoreCase` in some cases, but not all applicable
2015-08-10 13:34:31 +02:00

86 lines
2.4 KiB
Java

/*
* The MIT License (MIT)
*
* Copyright (c) 2013 - 2015 AlgorithmX2
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package appeng.api.features;
import javax.annotation.Nullable;
import appeng.api.recipes.ICraftHandler;
import appeng.api.recipes.IRecipeHandler;
import appeng.api.recipes.ISubItemResolver;
/**
* @author AlgorithmX2
* @author thatsIch
* @version rv3 - 10.08.2015
* @since rv0
*/
public interface IRecipeHandlerRegistry
{
/**
* Add a new Recipe Handler to the parser.
*
* MUST BE CALLED IN PRE-INIT
*
* @param name name of crafthandler
* @param handler class of crafthandler
*/
void addNewCraftHandler( String name, Class<? extends ICraftHandler> handler );
/**
* Add a new resolver to the parser.
*
* MUST BE CALLED IN PRE-INIT
*
* @param sir sub item resolver
*/
void addNewSubItemResolver( ISubItemResolver sir );
/**
* @param name name of crafting handler
*
* @return A recipe handler by name, returns null on failure.
*/
@Nullable
ICraftHandler getCraftHandlerFor( String name );
/**
* @return a new recipe handler, which can be used to parse, and read recipe files.
*/
IRecipeHandler createNewRecipehandler();
/**
* resolve sub items by name.
*
* @param nameSpace namespace of item
* @param itemName full name of item
*
* @return ResolverResult or ResolverResultSet or null if could not resolve
*/
@Nullable
Object resolveItem( String nameSpace, String itemName );
}