Contents
- Description
- Nested Class Summary
- Field Summary
- Constructor Summary
- Method Summary
- Constructor Details
- Method Details
- getAvailableRecipesForCategory(String, String)
- isValidCraftingMaterialForBench(Bench, ItemStack)
- isValidUpgradeMaterialForBench(Bench, int, ItemStack)
- getBenchRecipes(Bench)
- getBenchRecipes(BenchType, String)
- getBenchRecipes(BenchType, String, String)
- learnRecipe(Ref, String, ComponentAccessor)
- forgetRecipe(Ref, String, ComponentAccessor)
- sendKnownRecipes(Ref, ComponentAccessor)
- getCraftingManagerComponentType()
- getBenchBlockComponentType()
- getProcessingBenchBlockComponentType()
- get()
Class CraftingPlugin
java.lang.Object
com.hypixel.hytale.server.core.plugin.PluginBase
com.hypixel.hytale.server.core.plugin.JavaPlugin
com.hypixel.hytale.builtin.crafting.CraftingPlugin
- All Implemented Interfaces:
CommandOwner
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classA ref system that handles sending known recipes to newly added players. -
Field Summary
Fields inherited from class PluginBase
METRICS_REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanforgetRecipe(Ref<EntityStore> ref, String itemId, ComponentAccessor<EntityStore> componentAccessor) Called to forget a recipe for the given item ID as the given player.static CraftingPluginget()getAvailableRecipesForCategory(String benchId, String benchCategoryId) static List<CraftingRecipe> getBenchRecipes(BenchType benchType, String name) static List<CraftingRecipe> getBenchRecipes(BenchType benchType, String benchId, String category) static List<CraftingRecipe> getBenchRecipes(Bench bench) static booleanisValidCraftingMaterialForBench(Bench bench, ItemStack itemStack) static booleanisValidUpgradeMaterialForBench(Bench bench, int tierLevel, ItemStack itemStack) static booleanlearnRecipe(Ref<EntityStore> ref, String recipeId, ComponentAccessor<EntityStore> componentAccessor) Called to learn the recipe for the given item ID as the given player.static voidsendKnownRecipes(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) Called to send all known recipes to the player.Methods inherited from class JavaPlugin
getClassLoader, getFile, getTypeMethods inherited from class PluginBase
getAssetRegistry, getBasePermission, getChunkStoreRegistry, getClientFeatureRegistry, getCodecRegistry, getCodecRegistry, getCodecRegistry, getCommandRegistry, getDataDirectory, getEntityRegistry, getEntityStoreRegistry, getEventRegistry, getIdentifier, getLogger, getManifest, getName, getState, getTaskRegistry, isDisabled, isEnabled, preLoad
-
Constructor Details
-
CraftingPlugin
-
-
Method Details
-
getAvailableRecipesForCategory
-
isValidCraftingMaterialForBench
-
isValidUpgradeMaterialForBench
-
getBenchRecipes
-
getBenchRecipes
-
getBenchRecipes
@Nonnull public static List<CraftingRecipe> getBenchRecipes(BenchType benchType, String benchId, @Nullable String category) -
learnRecipe
public static boolean learnRecipe(@Nonnull Ref<EntityStore> ref, @Nonnull String recipeId, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Called to learn the recipe for the given item ID as the given player.- Parameters:
ref- The entity reference of the player entity.recipeId- The recipe ID that we are attempting to learn.componentAccessor- TheComponentAccessorinstance for component access.- Returns:
trueif learning was successful,falseotherwise.
-
forgetRecipe
public static boolean forgetRecipe(@Nonnull Ref<EntityStore> ref, @Nonnull String itemId, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Called to forget a recipe for the given item ID as the given player.- Parameters:
ref- The entity reference of the player entity.itemId- The item ID that we are attempting to learn.componentAccessor- TheComponentAccessorinstance for component access.- Returns:
trueif unlearning the recipe was successful,falseotherwise.
-
sendKnownRecipes
public static void sendKnownRecipes(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) Called to send all known recipes to the player.- Parameters:
ref- The entity reference of the player entity.componentAccessor- TheComponentAccessorinstance for component access.
-
getCraftingManagerComponentType
-
getBenchBlockComponentType
-
getProcessingBenchBlockComponentType
-
get
-