public class CraftingPlugin extends JavaPlugin
The main plugin class for Crafting. This plugin provides gameplay features for the Hytale server. Extend this class to create a plugin.
java.lang.Object > JavaPlugin > CraftingPlugin
Field Summary
benchRecipeRegistry
Field benchRecipeRegistry.
nextLevelUpgradeMaterials
Field nextLevelUpgradeMaterials.
resourceTypeId
Field resourceTypeId.
entityStoreRegistry
Field entityStoreRegistry.
blockStateRegistry
Field blockStateRegistry.
recipesToLoad
Field recipesToLoad.
generatedRecipes
Field generatedRecipes.
generatedIds
Field generatedIds.
id
Field id.
registry
Field registry.
list
Field list.
benchRequirement
Field benchRequirement.
playerComponent
Field playerComponent.
playerConfigData
Field playerConfigData.
knownRecipes
Field knownRecipes.
playerRefComponent
Field playerRefComponent.
item
Field item.
incomingRecipes
Field incomingRecipes.
recipe
Field recipe.
Method Detail
getAvailableRecipesForCategory
Set
getAvailableRecipesForCategory
(final String benchId, final String benchCategoryId)
Method getAvailableRecipesForCategory.
- Parameters:
final StringbenchIdfinal StringbenchCategoryId
isValidCraftingMaterialForBench
boolean
isValidCraftingMaterialForBench
(final BenchState benchState, final ItemStack itemStack)
Method isValidCraftingMaterialForBench.
- Parameters:
final BenchStatebenchStatefinal ItemStackitemStack
isValidUpgradeMaterialForBench
boolean
isValidUpgradeMaterialForBench
(final BenchState benchState, final ItemStack itemStack)
Method isValidUpgradeMaterialForBench.
- Parameters:
final BenchStatebenchStatefinal ItemStackitemStack
setup
void
setup
()
Method setup.
RecipeCommand
new
RecipeCommand
()
Method RecipeCommand.
PlayerAddedSystem
new
PlayerAddedSystem
()
Method PlayerAddedSystem.
computeBenchRecipeRegistries
void
computeBenchRecipeRegistries
()
Method computeBenchRecipeRegistries.
hasCategory
Method hasCategory.
- Parameters:
@Nonnull final CraftingReciperecipefinal Stringcategory
learnRecipe
boolean
learnRecipe
(@Nonnull final Ref ref, @Nonnull final String recipeId, @Nonnull final ComponentAccessor componentAccessor)
Method learnRecipe.
- Parameters:
@Nonnull final Refref@Nonnull final StringrecipeId@Nonnull final ComponentAccessorcomponentAccessor
forgetRecipe
boolean
forgetRecipe
(@Nonnull final Ref ref, @Nonnull final String itemId, @Nonnull final ComponentAccessor componentAccessor)
Method forgetRecipe.
- Parameters:
@Nonnull final Refref@Nonnull final StringitemId@Nonnull final ComponentAccessorcomponentAccessor
sendKnownRecipes
void
sendKnownRecipes
(@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)
Method sendKnownRecipes.
- Parameters:
@Nonnull final Refref@Nonnull final ComponentAccessorcomponentAccessor
UpdateKnownRecipes
new
UpdateKnownRecipes
(knownRecipes)
Method UpdateKnownRecipes.
- Parameters:
knownRecipesknownRecipes
getCraftingManagerComponentType
CraftingManager>
getCraftingManagerComponentType
()
Method getCraftingManagerComponentType.
onEntityAdded
void
onEntityAdded
(@Nonnull final Ref ref, @Nonnull final AddReason reason, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method onEntityAdded.
- Parameters:
@Nonnull final Refref@Nonnull final AddReasonreason@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer
onEntityRemove
void
onEntityRemove
(@Nonnull final Ref ref, @Nonnull final RemoveReason reason, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)
Method onEntityRemove.
- Parameters:
@Nonnull final Refref@Nonnull final RemoveReasonreason@Nonnull final Storestore@Nonnull final CommandBuffercommandBuffer