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 Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ComponentType<EntityStore, com.hypixel.hytale.builtin.crafting.component.CraftingManager> private static CraftingPluginprivate static final Map<String, BenchRecipeRegistry> Fields inherited from class com.hypixel.hytale.server.core.plugin.PluginBase
METRICS_REGISTRY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidstatic booleanforgetRecipe(Ref<EntityStore> ref, String itemId, ComponentAccessor<EntityStore> componentAccessor) 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) ComponentType<EntityStore, com.hypixel.hytale.builtin.crafting.component.CraftingManager> private static booleanhasCategory(CraftingRecipe recipe, String category) static booleanisValidCraftingMaterialForBench(BenchState benchState, ItemStack itemStack) static booleanisValidUpgradeMaterialForBench(BenchState benchState, ItemStack itemStack) static booleanlearnRecipe(Ref<EntityStore> ref, String recipeId, ComponentAccessor<EntityStore> componentAccessor) private static voidprivate static voidprivate static voidprivate static voidonRecipeRemove(RemovedAssetsEvent<String, CraftingRecipe, DefaultAssetMap<String, CraftingRecipe>> event) static voidsendKnownRecipes(Ref<EntityStore> ref, ComponentAccessor<EntityStore> componentAccessor) protected voidsetup()Methods inherited from class com.hypixel.hytale.server.core.plugin.JavaPlugin
getClassLoader, getFile, getType, start0Methods inherited from class com.hypixel.hytale.server.core.plugin.PluginBase
getAssetRegistry, getBasePermission, getBlockStateRegistry, getChunkStoreRegistry, getClientFeatureRegistry, getCodecRegistry, getCodecRegistry, getCodecRegistry, getCommandRegistry, getDataDirectory, getEntityRegistry, getEntityStoreRegistry, getEventRegistry, getIdentifier, getLogger, getManifest, getName, getState, getTaskRegistry, isDisabled, isEnabled, preLoad, setup0, shutdown, shutdown0, start, withConfig, withConfig
-
Field Details
-
instance
-
registries
-
itemGeneratedRecipes
-
craftingManagerComponentType
private ComponentType<EntityStore,com.hypixel.hytale.builtin.crafting.component.CraftingManager> craftingManagerComponentType
-
-
Constructor Details
-
CraftingPlugin
-
-
Method Details
-
getAvailableRecipesForCategory
-
isValidCraftingMaterialForBench
-
isValidUpgradeMaterialForBench
-
setup
protected void setup()- Overrides:
setupin classPluginBase
-
onItemAssetLoad
private static void onItemAssetLoad(LoadedAssetsEvent<String, Item, DefaultAssetMap<String, Item>> event) -
onItemAssetRemove
private static void onItemAssetRemove(@Nonnull RemovedAssetsEvent<String, Item, DefaultAssetMap<String, Item>> event) -
onRecipeLoad
private static void onRecipeLoad(LoadedAssetsEvent<String, CraftingRecipe, DefaultAssetMap<String, CraftingRecipe>> event) -
onRecipeRemove
private static void onRecipeRemove(RemovedAssetsEvent<String, CraftingRecipe, DefaultAssetMap<String, CraftingRecipe>> event) -
computeBenchRecipeRegistries
private static void computeBenchRecipeRegistries() -
getBenchRecipes
-
getBenchRecipes
-
getBenchRecipes
@Nonnull public static List<CraftingRecipe> getBenchRecipes(BenchType benchType, String benchId, @Nullable String category) -
hasCategory
-
learnRecipe
public static boolean learnRecipe(@Nonnull Ref<EntityStore> ref, @Nonnull String recipeId, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
forgetRecipe
public static boolean forgetRecipe(@Nonnull Ref<EntityStore> ref, @Nonnull String itemId, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
sendKnownRecipes
public static void sendKnownRecipes(@Nonnull Ref<EntityStore> ref, @Nonnull ComponentAccessor<EntityStore> componentAccessor) -
getCraftingManagerComponentType
public ComponentType<EntityStore,com.hypixel.hytale.builtin.crafting.component.CraftingManager> getCraftingManagerComponentType() -
get
-