CraftingPlugin

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

final BenchRecipeRegistry benchRecipeRegistry

Field benchRecipeRegistry.

nextLevelUpgradeMaterials

final BenchUpgradeRequirement nextLevelUpgradeMaterials

Field nextLevelUpgradeMaterials.

resourceTypeId

final ItemResourceType[] resourceTypeId

Field resourceTypeId.

entityStoreRegistry

final ComponentRegistryProxy entityStoreRegistry

Field entityStoreRegistry.

blockStateRegistry

final BlockStateRegistry blockStateRegistry

Field blockStateRegistry.

recipesToLoad

final List recipesToLoad

Field recipesToLoad.

generatedRecipes

final List generatedRecipes

Field generatedRecipes.

generatedIds

final List generatedIds

Field generatedIds.

id

final String id

Field id.

registry

final BenchRecipeRegistry registry

Field registry.

list

final List list

Field list.

benchRequirement

final BenchRequirement[] benchRequirement

Field benchRequirement.

playerComponent

final Player playerComponent

Field playerComponent.

playerConfigData

final PlayerConfigData playerConfigData

Field playerConfigData.

knownRecipes

final Set knownRecipes

Field knownRecipes.

playerRefComponent

final PlayerRef playerRefComponent

Field playerRefComponent.

item

final Item item

Field item.

incomingRecipes

final Iterable incomingRecipes

Field incomingRecipes.

recipe

final CraftingRecipe recipe

Field recipe.

Method Detail

CraftingPlugin

public public CraftingPlugin (@Nonnull final JavaPluginInit init)

Method CraftingPlugin.

Parameters:
@Nonnull final JavaPluginInit init

getAvailableRecipesForCategory

static Set getAvailableRecipesForCategory (final String benchId, final String benchCategoryId)

Method getAvailableRecipesForCategory.

Parameters:
final String benchId
final String benchCategoryId

isValidCraftingMaterialForBench

static boolean isValidCraftingMaterialForBench (final BenchState benchState, final ItemStack itemStack)

Method isValidCraftingMaterialForBench.

Parameters:
final BenchState benchState
final ItemStack itemStack

isValidUpgradeMaterialForBench

static boolean isValidUpgradeMaterialForBench (final BenchState benchState, final ItemStack itemStack)

Method isValidUpgradeMaterialForBench.

Parameters:
final BenchState benchState
final ItemStack itemStack

setup

protected void setup ()

Method setup.

RecipeCommand

public new RecipeCommand ()

Method RecipeCommand.

PlayerAddedSystem

public new PlayerAddedSystem ()

Method PlayerAddedSystem.

onItemAssetLoad

static void onItemAssetLoad (final LoadedAssetsEvent> event)

Method onItemAssetLoad.

Parameters:
final LoadedAssetsEvent> event

onItemAssetRemove

static void onItemAssetRemove (@Nonnull final RemovedAssetsEvent> event)

Method onItemAssetRemove.

Parameters:
@Nonnull final RemovedAssetsEvent> event

onRecipeLoad

static void onRecipeLoad (final LoadedAssetsEvent> event)

Method onRecipeLoad.

Parameters:
final LoadedAssetsEvent> event

onRecipeRemove

static void onRecipeRemove (final RemovedAssetsEvent> event)

Method onRecipeRemove.

Parameters:
final RemovedAssetsEvent> event

computeBenchRecipeRegistries

static void computeBenchRecipeRegistries ()

Method computeBenchRecipeRegistries.

getBenchRecipes

static List getBenchRecipes (@Nonnull final Bench bench)

Method getBenchRecipes.

Parameters:
@Nonnull final Bench bench

hasCategory

static boolean hasCategory (@Nonnull final CraftingRecipe recipe, final String category)

Method hasCategory.

Parameters:
@Nonnull final CraftingRecipe recipe
final String category

learnRecipe

static boolean learnRecipe (@Nonnull final Ref ref, @Nonnull final String recipeId, @Nonnull final ComponentAccessor componentAccessor)

Method learnRecipe.

Parameters:
@Nonnull final Ref ref
@Nonnull final String recipeId
@Nonnull final ComponentAccessor componentAccessor

forgetRecipe

static boolean forgetRecipe (@Nonnull final Ref ref, @Nonnull final String itemId, @Nonnull final ComponentAccessor componentAccessor)

Method forgetRecipe.

Parameters:
@Nonnull final Ref ref
@Nonnull final String itemId
@Nonnull final ComponentAccessor componentAccessor

sendKnownRecipes

static void sendKnownRecipes (@Nonnull final Ref ref, @Nonnull final ComponentAccessor componentAccessor)

Method sendKnownRecipes.

Parameters:
@Nonnull final Ref ref
@Nonnull final ComponentAccessor componentAccessor

UpdateKnownRecipes

public new UpdateKnownRecipes (knownRecipes)

Method UpdateKnownRecipes.

Parameters:
knownRecipes knownRecipes

getCraftingManagerComponentType

public CraftingManager> getCraftingManagerComponentType ()

Method getCraftingManagerComponentType.

get

static CraftingPlugin get ()

Method get.

getQuery

public Query getQuery ()

Method getQuery.

onEntityAdded

public void onEntityAdded (@Nonnull final Ref ref, @Nonnull final AddReason reason, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method onEntityAdded.

Parameters:
@Nonnull final Ref ref
@Nonnull final AddReason reason
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer

onEntityRemove

public void onEntityRemove (@Nonnull final Ref ref, @Nonnull final RemoveReason reason, @Nonnull final Store store, @Nonnull final CommandBuffer commandBuffer)

Method onEntityRemove.

Parameters:
@Nonnull final Ref ref
@Nonnull final RemoveReason reason
@Nonnull final Store store
@Nonnull final CommandBuffer commandBuffer