Skip to content

Releases: WolfyScript/WolfyUtils-Spigot

Functional Crafting Recipes, Better CustomItemData & more

23 Oct 16:41

Choose a tag to compare

Changelog

  • #31 CustomItem shrink methods
  • #32 Functional Crafting Recipes
  • #30 Better CustomItem Data

Full Changelog: v4.16.7.0...v4.16.8.0

Functional Recipes, NMS improvements & more

30 Sep 20:05

Choose a tag to compare

Functional Cooking Recipes

These recipes can be used to use custom ingredient checks for cooking recipes.
(Custom Assembler and Remaining Item function are also available, but not called by MC)

You need to be very careful creating the recipes, as they do not use the Bukkit Recipe API and directly extend Minecraft recipe classes!
If any error occurs while executing any of the custom functions, the recipe is instantly unregistered!

// To create them use the builders
var builder = new FunctionalRecipeBuilderFurnace(id, resultStack, ingredientChoice); // or
var builder = new FunctionalRecipeBuilderBlasting(id, resultStack, ingredientChoice); // or
var builder = new FunctionalRecipeBuilderSmoking(id, resultStack, ingredientChoice); // or
var builder = new FunctionalRecipeBuilderCampfire(id, resultStack, ingredientChoice);

builder.setGroup(group); // Sets the group of the recipe
builder.setExperience(getExp()); // Sets the experience of the recipe
builder.setCookingTime(getCookingTime()); // Sets the cooking time in ticks
// Sets the custom ingredient check
builder.setRecipeMatcher((inventory, world) -> {
    // For cooking recipes the input is in slot 0
    ItemStack input = inventory.getItem(0);
    // Check if the item matches and return true if it does
    return true;
});

// Then call the following to register the recipe into Minecraft
builder.createAndRegister();

CustomItem Block Settings

This update introduces a new setting to change the behaviour of CustomItems placed as blocks.
Using the useCustomDrops option, you can disable the block from dropping the CustomItem.

JSON:

"blockSettings": {
    "useCustomDrops": true
}

If you are using HOCON:

blockSettings {
    useCustomDrops : true
}

Changelog

  • #27 - Dynamically Generate GUI Bytecode from CraftInventories
  • #1 - Functional Cooking Recipes
  • #28 - Fallback NMSUtil implementation
  • #29 - CustomItem Block Settings

Full Changelog: v4.16.6.1...v4.16.7

Bug Fixes

07 Sep 20:25

Choose a tag to compare

Changelog

  • Fixed MultipleChoiceButton.Builder missing stateBuilders list
  • Removed deprecated WolfyUtilities#getItemUtils
  • Deprecated GuiHandler#getApi and replaced it with #getWolfyUtils
  • Added various more javadoc to ButtonBuilders

Full Changelog: v4.16.6...v4.16.6.1

HOCON Format Support

04 Sep 14:37
09e4e4e

Choose a tag to compare

This update implements the WolfyUtilities API v4.16.1 to support the HOCON format.

HOCON stands for Human-Optimized Config Object Notation and is made by Typesafe.

HOCON is the official configuration method for Sponge servers and plugins and provides an easier to use configuration format.
Files using HOCON are saved as .conf files.

A good introduction to hocon can be found in the Sponge docs.
https://docs.spongepowered.org/stable/en/server/getting-started/configuration/hocon.html

More detailed info about the format can be found here:
https://github.com/lightbend/config

Using WolfyScript/jackson-dataformat-hocon Jackson is able to parse and generate .conf files.

Note: Plugins that depend on WolfyUtilities will still need to implement the HOCON changes to support that new format.

Changelog

  • Optimized default De-/Serializers (They no longer depend on separate ObjectMappers)
  • Fixed StackOverflow in ExecutableItemsRef#getLinkedItem
  • #26 - HOCON Format Support

Full Changelog: v4.16.5.1...v4.16.6

ChunkStorage Memory Usage & PluginIntegration Improvements

22 Aug 13:58

Choose a tag to compare

Changelog

  • ChunkStorages are cleared correctly when the Chunks are unloaded now.
  • PluginIntegrations can be ignored now when plugins fail to load.
  • Changed loading phase to Startup
  • Exclude third-party libs from jar

Full Changelog: v4.16.5.0...v4.16.5.1

Persistent Block Data & More Third-Party Plugin Support

18 Aug 18:00

Choose a tag to compare

This update introduces a whole new way of storing persistent data on blocks.
The previous CustomItemStore system, as the name suggests, was limited to storing the ID of CustomItem, that was placed at the block position. That system is now deprecated and replaced with the new, more modular system.

Persistent Data Storage

With this new system, there are a few new Classes:

  • PersistentStorage – This is the entry class that tracks the WorldStorages.
  • WorldStorage – Contains the persistent data stored in the world. One instance per world. Contains the ChunkStorages in the world.
  • ChunkStorage – Contains the persistent data stored in the chunk. One instance per chunk. Contains the BlockStorage for the blocks in the chunk.
  • BlockStorage – Stores the persistent data for the block. Can contain CustomBlockData added by plugins and is de-/serialized from/to a JSON String each.
  • CustomBlockData – Can be implemented and registered by other plugins to store and handle custom persistent data on Blocks.

You can simply access the PersistentStorage using the WolfyCoreBukkit (Which you can access through your plugins WolfyUtilities API instance):

PersistentStorage persistentStorage = ((WolfyCoreBukkit)api.getCore()).getPersistentStorage();
// Get WorldStorage
WorldStorage worldstorage = persistentStorage.getOrCreateWorldStorage(world);
// Get/Create BlockStorage
worldStorage.getOrCreateAndSetBlockStorage(location);
/*
Get/Create BlockStorage
There are methods in both the ChunkStorage and WorldStorage.
The methods in the WorldStorage are just for convenience and redirect to the ChunkStorage.
*/
BlockStorage blockStorage = worldStorage.getOrCreateAndSetBlockStorage(clicked.getLocation());

Changelog

  • #25 – More Third-Party Plugin Support
  • #24 – Improved CustomItem Block Storage

Full Changelog: v4.16.4.1...v4.16.5.0

Player Head Texture Bug Fix

25 Jun 17:59

Choose a tag to compare

Changelog

  • #23 – Fixed Player Head textures not applying to items

Full Changelog: v4.16.4.0...v4.16.4.1

New NBTQuery Util & Plugin Integration Improvements

25 Jun 12:50

Choose a tag to compare

The new NBTQuery makes it possible to query specified data from NBT. The query constructs a NBTCompound with all the specified data it fetched, and can be used for all the things you need like merging it into another NBTCompound, display the data, etc.
It is fully based on the Item-NBT-API, so the NBTCompounds etc. are part of that.
For more info, see #21

Changelog

  • #20 – Fixed Plugin Integration Detection & Initialisation
  • #21 – NBTQuery System to fetch specific NBT components

Full Changelog: v4.16.3.0...v4.16.4.0

Stable 1.19 Update & Bug Fixes

14 Jun 11:49
fd96855

Choose a tag to compare

Changelog

  • #16 – Better Player Head Texture apply method
  • #17 – Added Support for 1.19
  • #18 – Fixed ExecutableItems ItemRef Issues
  • #19 – Changed the reset of chat input prompts
  • Updated Item-NBT-API to 2.10.0
  • Fixed – AbstractItemBuilder including MiniMessage in JSON

Full Changelog: v4.16.2.0...v4.16.3.0

1.19 Update & Some Bug Fixes

09 Jun 19:51
466abfc

Choose a tag to compare

Pre-release

This version adds support for 1.19. There were no issues in testing, but it implements an unreleased dev version of the NBT-API, therefore it might be unstable. If you're using this plugin on 1.18.x or below, you should be fine.
As soon as the stable update is available, there will be another update.

Changelog

  • #16 – Better Player Head Texture apply method
  • #17 – Added Support for 1.19
  • #18 – Fixed ExecutableItems ItemRef Issues

Full Changelog: v4.16.2.0...v4.16.3.0