Code Monkey home page Code Monkey logo

smithery's Introduction

Smithery

Smithery is a custom plugin, inspired by Smeltery, that facilitates the forging of Alloys. This plugin requires [at least] Java 16 and CivModCore to function.

Be aware that Smithery does not dictate how Forges are made nor how Alloys are used. Server admins should use /smithery give to give themselves a Forge so that they can, for example, create a CraftEnhance recipe for it. Likewise, use /smithery list to list all parsed recipes and be able to produce each Alloy at each quality at each stage.

Config

See here for how to properly configure your Smithery plugin. Smithery also supports, to a certain extent, Smeltery's 1.4 configuration. Read more about that here.

Advice

Custom action handling

Say you have a block protection plugin and want to prevent players from extracting alloys from protected Forges they don't have permission to access, take a gander at uk.protonull.smithery.utilities.ActionHandler and create a fully custom, conditional action handler. By default, the handler allows or denies based on permissions.

Custom item handling

Say you have custom items that you wish to use as ingredients in Smithery, take a gander at uk.protonull.smithery.utilities.IngredientMatcher and create a custom finder that will return a deterministic ID if the given item matches any of your custom items. That ID can be used within the ingredients list of configured recipes.

Alloy handling

Alloy data is stored within the item's PersistentDataContainer, example below:

template:
  ==: org.bukkit.inventory.ItemStack
  v: 2586
  type: STICK
  meta:
    ==: ItemMeta
    meta-type: UNSPECIFIC
    display-name: '{"italic":false,"text":"Heavy Steel"}'
    lore:
      - '{"italic":false,"color":"white","extra":[{"color":"green","text":"GOOD"}],"text":"Quality:"}'
    enchants:
      DURABILITY: 1
    ItemFlags:
      - HIDE_ENCHANTS
    PublicBukkitValues:
      smithery:alloy:
        .:type: HSTEEL
        .:quality: GOOD

Be aware that the "type" and "quality" keys are 'ditto keys' to save space.

smithery's People

Contributors

protonull avatar

Forkers

bloof5000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.