Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev/update - future release #718

Open
wants to merge 103 commits into
base: master
Choose a base branch
from
Open

Dev/update - future release #718

wants to merge 103 commits into from

Conversation

ShaneBeee
Copy link
Owner

@ShaneBeee ShaneBeee commented Jan 4, 2025

Temp changelog:

This update is quite large, so I have broken the changelog into a few sections, and included some spoilers.

General Changes

Here are some not so exciting general changes.

See details

FIXED:

  • Fixed a bug on older server versions where spawning particles with force threw an error
  • Fixed the team prefix/suffix expression returning empty strings when not set

CHANGED:

  • Changed how tag type of nbt expression returns list (hopefully producing the correct list type, or null)
  • Changed the chunk at coords expression to optionally allow not loading/generating said chunk
  • Changed the "Give or Return Items" expression to always return a list.

Bound Changes

Bounds got a pretty big overhaul in terms of performance

See details

CHANGED:

  • Deprecated bound coords expression (use Bound Locations/World expressions instead)
  • Changed bounds to use a new region system, see below.
  • Full bounds now don't actually stretch the locations. You can now modify if the bound is full or not afterwards.
  • Bounds now use locations 2 different ways, see below for more info.
  • Bound saving has changed:
    • Previous behaviour: each bound would save when it was created/modified.
      This could cause massive lag if creating/modifying many in a short period of time.
    • New behaviour: bounds are only saved every 5 minutes (off the main thread) and when the server stops.
      This is a massive performance boost.

ADDED:

  • Added support for set in the bound locations expression (allowing you to set greater/lesser corners)
  • Added support for add/remove in the bound locations expression (allowing you to add/remove vectors to/from greater/lesser corners to offset size)
  • Added an expression to get the world of a bound
  • Added an expression to get/set the full state of a bound

BOUND REGIONS:

Bounds internally now use a region system.
The issue before with bound events was when a player moved, ALL bounds were looped and checked if the player moved in/out of that bound.
Now, bounds are put into regions with a size of 16x16 chunks. So when a player moves, only the bounds within that region at the player are checked.
This GREATLY increases performance.

Spark Test:

  • 19200 bounds
  • 50 players (all moving)

Old System:

  • SkBee was using about 50% of server resources per tick

New System:

  • SkBee was using about 0.3% of server resources per tick

BOUND CREATION CHANGES:

When creating a bound, you have 2 options as what to pass in for your 2 points:

  • LOCATIONS: If you use locations, your bound will be created using the exact location you pass in.
    In the image on the left, locations were used, and the bound created using the exact location of the blocks.
    Example: create bound with id "test" within (location of {_a}) and (location of {_b}) (a/b representing blocks)
  • BLOCKS: If you use blocks, 1 will be added to the x/y/z axes of the bound to account for the blocks on the edge.
    In the image on the right, blocks were used. The x/y/z axes had 1 added to account for those blocks.
    Example: create bound with id "test" within {_c} and {_d} (c/d representing blocks)
Screenshot 2024-09-14 at 12 35 32 AM

Item Component Changes

Some exciting new Item Components to make your items even cooler.

See details

ADDED:

CHANGED:

  • Item Components now require Paper 1.21.3+ (Paper has a WAY better API for components than Bukkit does)
  • Overhauled food component section (using PaperAPI, and removing deprecated code)
  • Overhauled tool component section (using PaperAPI, and removing deprecated code)

Registry Additions

I have added some of Paper's registry stuff.
As of right now it's not super useful, but maybe in the future.
This all requires Paper 1.21+ (I believe, maybe 1.20.6?!?!)

See details

ADDED:

  • Added RegistryKey type
  • Added TypedKey type
  • Added TagKey type
  • Added an expression to get all values from a registry (via RegistryKey)
  • Added an expression to get all TagKeys from a registry
  • Added an expression to get a TagKey from a registry

- broken in a previous commit
- attribute flag can't be added if custom attribute mods dont exist
- currently the test passed but its probably a version issue
- ensure chunk generators can be used in the load event
- Rename class
- Also refactored code to help strip out crap code in the bound class
Dev/components - Start working on some component stuff
- The Key class handles all of this stuff that NamespacedKey didn't
- I forgot the test world on Skript is flat (bedrock, dirt, grass)
- This didn't happen locally, whoops
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
future 🚀 Something that is being worked on for a future release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant