BKCommonLib icon

BKCommonLib -----

Common utility library adding unique new features and API's




  • [+] Added support for Minecraft 1.21.2 - 1.21.5
  • [+] Added support for Leaf server
  • [+] Added support for the new resource pack format (item models)
  • [+] Added support for all the item component changes / custom model data
  • [+] Added player instance phase API for checking for disposed player instances
  • [+] Added ChatText from and to NBT serialization API
  • [+] Added an api to swap out the packet in listeners
  • [ ∗  ] Changed the escaping rules when writing YAML
  • [ ! ] Fixed a random deadlock freeze issue during initialization
  • [ ! ] Fixed an issue with map display markers duplicating
  • [ ! ] Fixed an issue with held map displays in creative with rapid map id changes
  • [ ! ] Fixed a couple of performance and stability related issues
----------, Apr 27, 2025

  • [+] Added support for Minecraft 1.21 and 1.21.1
  • [+] Added support for Java 22
  • [ ! ] Fixed Paper issue that caused frozen carts in TrainCarts
  • [ ! ] Fixed issue with DataWatcher clone on Spigot
  • [ ! ] Fixed a missing method error issues on MC 1.14 and before
  • [ ! ] Fixed CommonItemStack hideTooltip API
  • [+] Added Cloud argument parser API for quoted arguments
  • [+] Added player customization datawatcher key
  • [ ! ] Fixed ItemStack JSON Deserialization not working for player head items
----------, Sep 21, 2024

This build has existed for a while on dev, but now 1.21 is out, I'm pushing this out there in preparation.

  • [+] Added support for Minecraft 1.20.5 and 1.20.6
  • [+] Added new CommonItemStack API, replacing a lot of ItemUtil methods
  • [+] Added DataWatcher Prototype mechanism for more performant creation
  • [+] Added isEquipmentSlotSupported API to fix recent spigot changes
  • [ ˄ ] Improved performance of sign text tracking on Paper
  • [ ∗  ] Changed shaded cloud version to cloud v2, added BOM for easier use
  • [ ∗  ] Changed the API version of ViaVersion that is targeted
  • [+] Added cloud quoted argument parser API
----------, Jun 13, 2024

  • [ ! ] Fixed a bug related to advancement progress cancelling (MyWorlds)
  • [ ! ] Fixed world border min/max height incorrect calculation
  • [ ! ] Fixed Entity onDie() not being handled, causing weird bugs (TrainCarts)
  • [ ! ] Fixed entity push callback not hooked due to recent Paper server changes
  • [ ! ] Fixed map displays not rendering in when players spawn in the same chunk as them
  • [+] Added support for mojmap Paper server jars
  • [+] Added Entity Controller position passenger API (TrainCarts)
  • [+] Added compatibility for Carbon server (1.8)
  • [+] Added support for some plugins/mods that alter the player class instance type
----------, Apr 23, 2024

  • [ ! ] Fixed checkFinite not found error on very old (1.8) versions of bukkit
  • [+] Added api for looking up the player viewers of a chunk's changes
  • [+] Added api for getting and setting formatted text of signs (ChatText)
  • [ ∗  ] Changed version of the softdependency lib, which adds support for pre-identification filters
  • [ ∗  ] Changed the HTTP headers used for requesting resource packs to fix broken downloads
----------, Feb 3, 2024

Adds a new advancement progress event that the new MyWorlds version 1.20.4-v3 can use to disable advancements on a world. This feature broke on Minecraft 1.20.3/1.20.4.
----------, Jan 3, 2024

  • [+] Added support for Minecraft 1.20.3 and 1.20.4
  • [ ˄ ] Improved performance of loading images into map textures
  • [ ∗  ] Changed a few characters in the tiny map font
  • [ ! ] Fixed list removals not being notified to YAML config listeners
----------, Dec 17, 2023

  • [+] Added support for recent changes in Paper/Purpur
  • [ ! ] Fixed an incompatibility with Spigot 1.20.1
  • [ ! ] Fixed setBlockDataFast changes not persisting in chunks
  • [ ˄ ] Improved performance of luckperms permission checking
----------, Nov 22, 2023

  • [+] Added support for Minecraft 1.20.2
  • [+] Added advancement reward disabling API (My Worlds)
  • [+] Added Sound packet API for stop sound
  • [ ! ] Fixed some template warnings/errors on older versions of Minecraft
  • [ ∗  ] Changed version of included SoftDependency lib to v1.0.2, adding a service dependency API
  • [ ∗  ] Changed version of included Cloud API to v1.8.4
  • [+] Added Cloud argument type for sound effect names (+brig)
  • [ ∗  ] Changed appearance of a few tiny map font sprites that were ugly, improved spacing
  • [ ! ] Fixed a bug in map display setVisible() not propagating child widgets
----------, Oct 8, 2023

  • [+] Added compatibility with ImageFrame plugin to avoid an empty map display bug
  • [+] Added some helper methods for building map display items (map color and title)
  • [+] Added SoftDependency library
  • [ ! ] Fixed an issue in WorldBorder API that caused incorrect bounds checks
  • [ ! ] Fixed an issue in the YAML library that caused copy-overwrite to not shorten lists
  • [ ∗  ] Changed BlockData state key types and added a few blockdata apis
----------, Sep 21, 2023

  • [ ! ] Fixed sign dialog not working on Minecraft 1.20+ servers
  • [ ! ] Fixed error on spigot for anvil dialog ("Title not set")
  • [ ! ] Fixed an init error on old minecraft versions (pre-1.12) involving 'heatable' materials
  • [+] Added API to fix broken serialization of equipment packets on Minecraft 1.8
  • [ ! ] Fixed issue teleporting entities between worlds on Paper servers (recent breakage)
  • [ ! ] Fixed an itemstack serialization bug for some items that have deeper metadata
----------, Aug 7, 2023

  • [+] Added support for Minecraft 1.20 and 1.20.1 and SnakeYaml v2
  • [+] Added api for tracking, reading and writing both sign sides
  • [+] Added support for hanging signs in the ordinary sign API
  • [ ! ] Fixed an error with the anvil text input menu on Spigot
  • [+] Added bStats metrics
----------, Jun 21, 2023

  • [+] Added support for recent Paper changes to CraftSign
  • [ ! ] Fixed a circular dependency problem that sometimes occurred with Vault
  • [−] Removed network controller 'isViewable' logic to avoid potential bugs in future paper updates
  • [+] Added support for namespaces when playing sounds
  • [+] Added a proper Brightness api for display entities
----------, Jun 6, 2023

  • [+] Added support for Spigot/Paper 1.19.4
  • [+] Added API for the new display entities and bundle packet
  • [ ! ] Fixed resource pack model override listing bug for unbreakable items
  • [ ! ] Fixed a map display widget bug that caused re-drawing every tick
  • [ ˄ ] Improved YAML ItemStack deserialization so that pre-1.13 can load post-1.13 items
  • [ ˄ ] Improved map player input so that flight isn't toggled while controlling the map
----------, Apr 7, 2023

  • [ ! ] Fixed BKCommonLib incorrectly parsing every plugin's plugin.yml to check for preloaders while handling dependencies
  • [ ! ] Fixed some problems in the YAML library (change notifications, formatting of token words)
  • [ ! ] Fixed entity move event not firing because the entity last-position fields were wrong (newer mc only)
  • [ ! ] Fixed resource pack downloading timing out too soon
  • [ ! ] Fixed resource pack overrides not applying damage to items properly
----------, Mar 14, 2023

  • [+] Added full support for the new paper plugin loader feature
  • [+] Added resource pack model override listing API
  • [+] Added a couple new APIs (slime size meta, anvil dialog, absorption)
  • [ ! ] Fixed an issue that caused some materials to fail parsing by name
  • [ ! ] Fixed a few startup/initialization deadlock bugs due to multi-threading optimizations
  • [ ! ] Fixed some incompatibilities with forge-based hybrid servers
  • [ ! ] Fixed some rendering issues when map display widgets are re-positioned
  • [ ! ] Fixed a bug in oriented bounding box (caused mis-clicks on carts in TrainCarts)
  • [ ∗  ] Changed entity network controller to take Bukkits Entity canSee into account
  • [ ˄ ] Improved startup time of BKCommonLib in a few places
  • [ ˄ ] Improved error reporting of missed ForcedChunk close() on JDK9+
  • [ ˄ ] Improved player game version checks by adding an instance to hold player state (caching)
----------, Feb 22, 2023

If you're using TrainCarts, it should be updated as well due to a breaking API change.
  • [+] Added Minecraft 1.19.3 support for spigot/paper and all forks
  • [ ! ] Fixed storage minecart not being listed as a valid minecart type
  • [ ˄ ] Improved forced chunk API to detect when close() isn't being called by a plugin
  • [+] Added support for bungeecord 'x' hex color formatting
  • [ ! ] Fixed compatibility problems due to changes in TacoSpigot, WineSpigot, PandaSpigot and MohistMC
  • [ ! ] Fixed a bug that occurred in getMobEffectListId on Minecraft 1.8
  • [ ! ] Fixed a YAML bug when using "1_2_3" style String values or keys
  • [ ˄ ] Improved error reporting when an unshaded jar of BKCommonLib is used by mistake
----------, Dec 26, 2022

Fixes a bug with paper's chunk system changes that caused custom entities to not be ticked. Other fixes.
  • [+] Added support for Arclight 1.18
  • [ ! ] Fixed a sign tracking bug on magma/catserver 1.12.2
  • [ ! ] Fixed entity not being ticked after being replaced with paper 1.19.2 chunk system changes
  • [ ! ] Fixed an issue on 1.8-1.12.2 where the forced chunk api caused a concurrent modification error in the server
----------, Oct 30, 2022

Changes
  • Performance improvements (collections, blockdata, yaml, background processes)
  • Added support for Paper's new Chunk System changes
  • Fixed entity controllers glitching out at Y [-16..0]
  • Added radius option to ForcedChunk API
  • Fixed rare Concurrent Modification bug in Chunk Future API
  • Fixed item display names showing weird translatable tag strings
  • Fixed Mohist 1.12.2 bug with the sign change tracker
  • Added custom payload packet handle
  • Added support for newlines in ChatText API
  • Improvements to Map Display Resource Packs
    • Adds support for CustomModelData predicates
    • Adds support for resource path namespaces
    • Fixes error when deserializing a null json element
----------, Oct 4, 2022

Adds support for paper/spigot 1.19.2. Also fixes a problem with Cloud commands related to brigadier that affected MC 1.19.1/1.19.2
----------, Aug 7, 2022

Adds support for Paper/Spigot Minecraft 1.19.1.
----------, Jul 30, 2022

Changes
  • [Fixed] Bugfixes for Arclight and Mohist
  • [Added] Sign Dialog helper class to display a sign input dialog to a Player
  • [Improved] Anvil dialog window title can now be set, defaulting to description for map displays
  • [Added] Player inventory get/set equipment by EquipmentSlot helper methods (multiversion)
  • [Improved] Minor improvements to array-based utility methods
----------, Jul 24, 2022

Changes
  • [Added] Support for Minecraft 1.19
  • [Fixed] Forced chunk unload cancelling bugged out on Minecraft 1.13 and before
  • [Added] Multi-version ParticleType API for use with the PacketPlayOutWorldParticles packet
  • [Added] MultiBlockChangeEvent with WorldEdit/FAWE support
  • [Improved] Sign Change tracker can now also track changes in sign block data
  • [Added] LongHashMap extra adding/putting method overloads
  • [Fixed] isMethodOverrided did not take multiple levels of sub-classes into account
  • [Added] PluginBase classdepend plugin.yml feature: support loading classes from other plugins without changing load order
----------, Jun 19, 2022

Changes
  • [Fixed] Support for ProtocolLib 5.0
  • [Improved] Use ProtocolLib Marker API to send packets during packet handling, rather than using the packet queue/tick task
  • [Fixed] Fix light not applying to all-empty chunk slices (MC 1.8 - MC 1.13.2)
  • [Fixed] Close POI files when closing world streams (MyWorlds world unloading fix)
  • [Improved] Forge Support
    • Support for modded block emission and opacity (littletiles, for example)
    • Now supports Arclight 1.15.2/1.16.5 and Mohist 1.16.5
    • Fixes for CatServer/ArcLight/Mohist/Magma 1.12.2
  • [Fixed] Bugfixes for supporting Paper/Spigot 1.17.1 and before
  • [Fixed] Hoppers not interacting with minecarts on Nachospigot/Tacospigot (Traincarts)
  • [Fixed] Memory leak in forced chunk manager when worlds are unloaded, and forced chunks remain
----------, Jun 7, 2022

Adds support for Spigot/Paper 1.18.2. Other changes:
  • Fixes a bug of not finding sendPos on MC 1.8.8 and before
  • Fixes spigot class name remapper bug on MC 1.17.1 since the 1.18 versions due to guava bimap forcePut bug
  • Fixes a bug in the SortedIdentityCache (performance enhancement added previous release)
----------, Mar 5, 2022

Changes
  • [Improved] Several performance optimizations
  • [Fixed] Redstone and tile entities weren't being ticked for forced-chunk loaded chunks
  • [Added] Method for creating player-profile skull items (cross-version compatible)
  • [Added] Spectator mode switching API in VehicleMountController
  • [Added] Support for Dionysus and newer version of NachoSpigot
  • [Fixed] Not all worlds were always listed on some forge servers
  • [Fixed] Support for JDK 13 and later when on MC 1.12 and older
  • [Fixed] Boat type metadata wasn't working (affected Traincarts)
  • [Fixed] Cubic Chunks Heightmap related error
  • [Fixed] [Map Display] Anvil dialog was shown to all viewers, not just those holding the display
  • [Added] [Map Display] Method to fill multiple item frames with a map item
  • [Fixed] Players dismounting when sending a position packet on MC 1.16
  • [Added] Support http -> https redirect when downloading resource packs
  • [Added] Startup logs now include the last 32 logged messages
----------, Feb 24, 2022

Makes Minecraft server 1.17 and 1.18 much more stable, so I strongly recommend updating!
  • [Fixed] Entities with controllers were not saving on 1.17/1.18, resulting in them disappearing when unloading
  • [Fixed] Entities with controllers were sometimes not ticked (affected Traincarts hopper minecarts not working)
  • [Fixed] Entities with controllers had the onDie() callback called when teleporting between worlds
  • [Added] Support for NachoSpigot (MC 1.8.8)
  • [Added] CloudLocalizedException class for sending a message to sender and silently throwing (Cloud Command Framework)
  • [Fixed] Error in in use entity packet handling (init moving object error)
  • [Fixed] Bug on plugin startup when AsyncWorldEditInjector was installed
  • [Improved] Enforce package paths during server loading, fixes Thirst breaking things with their net.minecraft class
  • [Improved] Improved performance of (asynchronous) BlockData lookup by removing a mutex
  • [Added] API for reading the default portal search and create radius (Paper support)
  • [Added] OfflineWorld and OfflineBlock API. Migrated from Traincarts as it reached maturity.
  • [Improved] Faster server initialization when using BKCommonLib in unit tests
  • [Fixed] "DUMMY" world creation showing up on plugin load (spigot)
----------, Dec 25, 2021

It's been stable for 1.18 for a few days, but now it's finally on Spigot. This adds support for 1.18 and 1.18.1, spigot/paper/purpur tested. Forge-based forks are probably not supported yet.

Also fixes some incompatibility problems with older versions of Minecraft, such as startup warnings or minor errors in version-specific code.

This jar is a lot larger because it includes the Cloud Command Framework which will be used by a lot more plugins going forward. Read more about it here. Traincarts will no longer be including it, and will instead use the one in BKCommonLib. Expect cloud command migrations in other plugins in the near future.

Besides that, a new API was added for modifying packets to alter the contents of Block States (Tile Entities) on all versions of Minecraft. SignLink now uses this new API, and must be updated.
----------, Dec 11, 2021

With 1.18 around the corner I'm releasing a final 1.17 release build before I get started with that.

Changes:
  • [Fixed] Compatibility fixes for (forge) CatServer, Magma and Mohist
  • [Improved] Performance improvements in a few areas
  • [Added] ChunkFutureProvider API to efficiently run code when chunk (entities) load or unload
  • [Fixed] NPE Error in region handler
  • [Added] Map display texture down-sampling function
  • [Improved] Better handling of plugin startup/failure error reporting (preloader)
  • [Improved] Performance improvements in map display item frame updater
  • [Added] Configuration option to turn map display item frame support off (performance)
  • [Added] IntCuboid class and World border API to figure out the dimensions of a world
  • [Fixed] Light heightmap bug on worlds that used special datapacks on 1.17
----------, Nov 28, 2021

  • [Improved] Add support for the newly added EntitiesLoadEvent
  • [Fixed] Add support for recent change in CraftBlockEntityState
  • [Fixed] Entities spawned with controller sometimes didn't get tracked, causing a delayed addEntity error and invisible entities
  • [Improved] PluginBase now features a self-reporting error feature so players can see ingame when plugins fail to load
  • [Fixed] Some logging had namespaces shown twice
  • [Fixed] Fix error when MapDisplay updateItem is used with a Bukkit ItemStack
----------, Oct 2, 2021

  • [Fixed] Add support for recent Tuinity merge into Paper (fixes 'ticklist' errors)
  • [Fixed] Add support for recent Mohist 1.12.2 changes
  • [Fixed] Clicking on invisible item frames resulted in slightly incorrect x/y pixel coordinates in the click events
----------, Sep 5, 2021

Note: re-upload as a problem was discovered with map displays right after I had submitted the v2.
  • [Fixed] getHandle not instrumented error on spigot/paper builds newer than august 14
  • [Fixed] EntityController onItemSet not being fired, caused some triggers to not fire in Traincarts
  • [Improved] Type conversion was slow in some places, performance improved
  • [Fixed] Large map displays crossing chunk boundaries were re-initializing multiple times as chunks load/unload at different resolutions
  • [Added] Map display flushCanvasChanges added/exposed so that partial changes can be flushed earlier
----------, Aug 27, 2021

  • [Fixed] getHandle not instrumented error on spigot/paper builds newer than august 14. Caused sign-related apis to not work right.
  • [Fixed] EntityController onItemSet not being fired, caused some triggers to not fire in Traincarts
  • [Improved] Type conversion was slow in some places, performance improved
  • [Fixed] Large map displays crossing chunk boundaries were re-initializing multiple times as chunks load/unload at different resolutions
  • [Added] Map display flushCanvasChanges added/exposed so that partial changes can be flushed earlier
----------, Aug 27, 2021

  • [Added] Adds support for Minecraft 1.17
  • [Changed] All handle classes have changed package location, dependencies must be updated!
  • [Changed] Map display click events no longer ignored when player sneaks, is now up to event handlers to do that
  • [Improved] Map display clicks work when clicking near edges at an angle
  • [Added] Player game version supplier, with ViaVersion integration
  • [Improved] Better handle *-perms with LuckPerms
  • [Added] ChunkLoadEntitiesEvent for handling asynchronous entity loading as of 1.17
  • [Fixed] AsyncTextWriter no longer uses async nio but a threadpool, hopefully fixing write corruptions
  • [Fixed] Compatibility fixes for Mohist 1.12.2
  • [Added] Support for CubicChunks new ICubicStorage API in recent snapshots
----------, Aug 21, 2021

Since the MC 1.17 update will be quite some work, I'm releasing a 1.16 stable support update early on.

Not MC 1.17 compatible

Changes:
  • [Fixed] JDK16 support + fix illegal access warnings
  • [Fixed] Several field reflection warnings
  • [Fixed] Trailing whitespace was not persisted in YAML configuration
  • [Fixed] Lighting handler timing out when chunks needed to be loaded
  • [Fixed] Fix portal-related errors on MC 1.15
  • [Improved] The /debug (/commondebug) command is no longer registered when not used
  • [Fixed] [Forge] CubicChunk server crash due to null player
  • [Fixed] [Forge] ArcLight compatibility fixes
  • [Fixed] [Forge] Error when many block types were registered
  • [Improved] Vector3f performance improvement
  • [Improved] MapDisplay API more flexible with (lack of) custom constructors
  • [Fixed] MapDisplay recovery when server is reloaded
  • [Fixed] Lever BlockData state was not always correct, resulting in weird glitches
  • [Fixed] UltraPerms compatibility fix, prevents slow initialization lag
----------, Jun 11, 2021

Bugfixes
  • Fixes Protocollib TemporaryPlayer causing errors
  • Restores support for the Tuinity Starlight engine
  • Restores compatibility with ArcLight 1.15.2 and 1.16.5
  • Fixes getBlockData() not working on Forge CubicChunks
  • Fixes incorrect FishingHook HOOKED_ENTITY data key
----------, Jan 30, 2021

  • [Added] Support for Minecraft 1.16.5
  • [Added] Lighting handler support for Tuinity Starlight engine
  • [Added] Compatibility for Mohist 1.12.2 namespace changes
  • [Added] YAML change listeners and cloning functions
  • [Added] Clickable run and suggested commands to ChatText API
  • [Added] IPermissionEnum interface alternative to PermissionEnum
  • [Improved] Extra hardening against I/O errors when reading YAML
  • [Improved] Make BlockData cache multithread-safe
  • [Improved] Squash warnings about cross-plugin access when using the ClassInterceptor
  • [Fixed] 'Buffer clear method not found' error
  • [Fixed] Cast error in PlayerChunk on MC 1.8.8 and older
  • [Fixed] NPE when non-mapdisplay maps end up triggering map show events
  • [Fixed] Occasional server crash when writing lighting data to chunks
  • [Fixed] 'Dimension is not registered' errors for custom dimensions
  • [Fixed] Permission defaults not loaded right when a permission has 'default' in the name
  • [Changed] Map Displays
    • Add double-precision x/y pixel coordinates to MapClickEvent
    • Fix up-facing or down-facing item frames not supporting clicks
    • Add function to find the coordinates on a map a player is looking at
    • Add MapDisplay getter by UUID
----------, Jan 17, 2021

Small update this time to address some problems. The previous release broke on some builds of Spigot 1.15.2. In addition there was a problem with setBlockFast, which caused placement of upside-down rails to fail in Traincarts. Both have been fixed.

An important new feature is added that teleports players near their seat while they sneak, preventing them from wandering off. If there's any problems, it can be turned off in the config.yml of BKCommonLib.
----------, Nov 7, 2020

Changes
  • Adds support for Spigot/Paper 1.16.4
  • Fixes asynchronous chunk loading bug on forge
  • Adds support for CubicChunks (light cleaner)
  • Fixes toLegacy reflection error on some builds of 1.15.2
  • Removed TabView API, had too many (performance) problems
  • Map Displays
    • Fixes UI sounds being played to non-holders of the map
    • Adds method to create map items with certain properties set
  • Javadoc and sources jar should now be available from our repository
----------, Nov 4, 2020

Changes:
  • Added minecraft 1.16.3 support
  • Added support for 1.16.2 changes in tuinity and purpur
  • Fix opaque faces for doors, trapdoors, carpet and others (affects light cleaner)
  • Fix light heightmap calculations for 1.14 and later (affects light cleaner)
  • Fix error on 1.13.2 and earlier when initializing block data
  • Fix map rendering of vine blocks
  • Other minor changes and additions
----------, Sep 20, 2020

Changes:
  • Add support for Minecraft 1.16.2
  • Add forge support for Magma 1.12.2
  • Add forge support for Mohist 1.12.2
  • Add forge support for CatServer 1.12.2
  • Add forge support for Arclight 1.15.2
  • Add BlockData API for retrieving the opaque faces of a block
  • Add 1.16 Map Color Palette format support
  • Add MapDisplay Marker (Map Icon) support
  • Add PlayerRespawnPoint API
  • Add complete end platform and nether portal searching & creation support
----------, Sep 4, 2020

Changes
  • [Added] Support for Minecraft 1.16.1
  • [Fixed] Compatibility with recent changes in Paperspigot, Purpur and Tuinity
  • [Fixed] Internal error some people had when run on OpenJDK
  • [Changed] Dimension and SoundEffect API now use Resource Keys, changed class paths
  • [Changed] EntityController onInteract return type was changed to better reflect 1.16 changes
  • [Fixed] ForcedChunk asynchronous loading looped endlessly when closed before chunk is loaded
  • [Fixed] A NPE occurred inside a third-party Entity class implementation
  • [Fixed] Unresolved declaration in VoxelShape on Minecraft 1.8.8 and earlier
  • [Fixed] Error in VehicleMountController when multiple passengers were put in a mount
  • [Fixed] Widgets were invalidating areas outside their clip area when using parent clip
  • [Improved] MapDisplay solid color filling is now faster
  • [Added] MaterialUtil ISAIR constant for handling AIR/CAVE_AIR Material types
  • [Added] Entity spawn and despawn logic in VehicleMountController
  • [Added] Workaround implementation for the shift vehicle exit client bug on 1.16
  • [Added] BlockData canSupportOnFace method
  • [Added] ChatText API clickable links and hover text
  • [Added] Boat entity wood type metadata API
  • [Added] Clone() methods for IntHashMap, LongObjectHashMap and LongHashSet
  • [Added] Matrix4x4 multiply method overloads
----------, Jul 26, 2020

Important compatibility update for recent changes in Paperspigot. Fixes support for the lighting handler (Light Cleaner) and fixes some errors that occurred because of changes in the server PlayerChunkMap.

Fixes
  • Fixed move handler firing block collision events with incorrect BlockFace
  • Fixed incompatibility problem with ProtocolSupport
  • Fixed several different errors that occurred in the map display handler
  • Fixed potential corrupted minecraft client when download is aborted
  • Fixed template error happening on Minecraft 1.9
  • Fixed compatibility problems with recent builds of Paperspigot (lighting engine, chunks)
  • Fixed missing clone() functionality for NBT (caused error transferring items)
  • Fixed no such class errors that occurred for some people on linux server hardware
  • Fixed mount health bar showing up when navigating map displays
Additions
  • Added map widget clip parent property (only renders on top of parent area)
  • Added support for fishing hook entity spawn packets
  • Added EntityController onEntityBump callback
  • Added some new BlockData BlockState API methods so states can be queried/set
  • Added Matrix4x4 and Quaternion diff methods
  • Added getPluginExecutor() method to schedule completion tasks using a bukkit task
  • Added ObjectCache, a simple thread-safe cache for re-using objects
  • Added packet API for disabling the health bar when sitting in vehicles
  • Added JsonSerializer helper class for deserializing and serializing ItemStack and BlockData
  • Updated links in automatically generated localization and permission default files
----------, May 31, 2020

Some breakages occurred as paperspigot was updated, as well as some forks ended up breaking compatibility. This has been resolved.

An important fix: fixes custom entities (Traincarts trains) disappearing when they are unloaded and reloaded, especially during server restart. This was especially a problem on Paperspigot.

Changes
  • Added support for Purpur server fork
  • Added support for Tuinity server fork
  • Added support for recent changes in Paperspigot (getVisibleChunk)
  • Fix custom entities despawning after chunk unload or server restart
  • Fix NPE when hasDisplayName input item is null
  • Fixed water renderer showing warning on 1.8.8 and earlier
  • Added map display block and item rendering for skulls, barrier blocks, signs, clock item and compass item, fixing glitches on older versions of Minecraft
  • Fixed concurrent modification error server crash on paperspigot 1.13
  • Fixed oak and stone button not producing correct metadata for up and down facing (didn't trigger signs in Traincarts)
  • Fixed rare server freeze due to VehicleMountHandler queue packet deadlock
  • Fixed error when vehicle mount handler is used with temporary players (protocollib)
  • Fix entity remove queue not working on paperspigot, causing glitches when spawning custom entities with custom network spawn packets
  • Have ExtendedEntity getChunk() api make use of special feature in Paperspigot
  • Added option to config.yml to entirely disable the map displays API to improve performance when map displays aren't used
  • Added ForcedChunk clone() method
  • Added onItemDrop callback to MapDisplay and MapWidget
  • New optimizations in Matrix4x4 vector math
----------, Apr 8, 2020

A rather severe memory leak was uncovered when BKCommonLib was used together with Traincarts. Besides patching this bug, performance was improved in a lot of areas found through profiling the server.

Memory Usage
  • [Fixed] Severe memory leak when spawning and teleporting entities because of glitch in ClassHook thread local cleanup
  • [Fixed] Input streams were not closed when loading map texture resources
  • [Improved] Reduced memory consumption of the YAML API

Performance
  • [Improved] nextTick scheduling made more efficient with less locking
  • [Improved] Server item frame vanilla map refreshing is disabled when a map display is displayed on it
  • [Improved] Reduced overhead converting vectors to Minecraft vector types
  • [Improved] DataWatcher (not bound to entity) set() performance improved
  • [Improved] Entity location and velocity setting and getting overhead reduced
  • [Improved] Entity Move event change detection overhead reduced
  • [Improved] Minor performance boost of WorldUtil getBlockData(world, x, y, z)
  • [Improved] Changes to code generation engine eliminates unneeded casts and boxing overhead
  • [Improved] Reduced number of invoke/invokeVA stack frames

Other
  • [Added] Entity Controller setBlockActivationEnabled option, which newer builds of TrainCarts uses to disable unneeded block collision tests
  • [Fixed] Negative position error in AsyncTextWriter occurred in some environments
  • [Fixed] Errors and server crashes when saving/unloading a world (affected Light Cleaner and MyWorlds delete/unload commands)
  • [Fixed] Writing chunk lighting information was not synchronized right, resulting in rare errors
  • [Fixed] Template error in entity tracker entry, caused errors on some versions of Minecraft
  • [Added] Support for Purpur server fork
  • [Added] Issue on paperspigot was fixed in ProtocolLib, support was added for these changes
  • [Added] Quaternion and Matrix4x4 getYaw/getPitch/getRoll component functions
----------, Mar 13, 2020

Highlights
  • Adds support for Minecraft 1.15, 1.15.1 and 1.15.2
  • Important fixes for compatibility with FAWE, EpicWorldGenerator, SlimeWorldManager and older versions of (Paper)Spigot
  • Performance improvements and fixes for ItemFrame MapDisplay logic
  • Completely rewritten YAML engine that saves asynchronously and handles partial content updates better
  • Entity controller fixes, fixing entities disappearing on server shutdown
  • New Octree implementation, for mapping many objects to positions and querying cuboid areas
Compatibility
  • [Added] Support for Minecraft 1.15, 1.15.1 and 1.15.2
  • [Changed] Only hook ChunkGenerator when CreaturePreSpawnEvent is used, and when the chunk generator class is not final (fixes incompatibility with EpicWorldGenerator) [BKCommonLib Issue #75]
  • [Fixed] incompatibility with newer version of FastAsyncWorldEdit due to their custom class loader
  • [Fixed] Missing entity remove queue field error on paperspigot 1.8.8 and earlier
  • [Fixed] Added several entities to the entity category lists that were missing (affected MyWorlds world spawn rules)
  • [Fixed] Entity already tracked server crash on 1.14 and later [TrainCarts Issue #323]
  • [Fixed] Incorrect EntityShulker template field declarations causing errors for some versions of Minecraft
  • [Added] Safety net for if ProtocolLib has a linkage error to avoid complete breakage
  • [Fixed] Missing ChunkProviderServer cast in getChunkIfLoaded template for some versions of 1.13.2
  • [Improved] Packets were sometimes skipping packet monitors on PaperSpigot+ProtocolLib, causing seat entering glitches in TrainCarts
  • [Improved] Multiple passengers were supported since 1.9, but Bukkit only added full working support since 1.11.2. Now the entire range of versions is supported.
  • [Fixed] EntityTrackerEntry field in Entity on PaperSpigot was not updated when a custom network controller was set, causing strange errors [TrainCarts Issue #321]
  • [Fixed] EntityRemoveFromServer event was firing when entities teleported between worlds on 1.14 and later
  • [Added] Support for changes done by TacoSpigot server fork
  • [Fixed] Heightmap on 1.12.2 and earlier used an incorrect 2 block offset, causing glitches in LightCleaner
  • [Fixed] MapDisplay createItem was not storing MapId metadata in item, causing crash with SlimeWorldManager [Maplands Issue #21]
Map Displays
  • [Fixed] ConcurrentModificationError inside Map Display ItemFrame controller [BKCommonLib Issue #76]
  • [Fixed] Players twitching when standing on the edge of a block controlling a map display
  • [Improved] Performance of Map Display ItemFrame tracking much better, no longer causes chunk loads, with a config option to turn it off entirely if unused [BKCommonLib Issue #83]
  • [Fixed] Several glitches with the Map Display ItemFrame clustering (large displays) not initializing correctly
  • [Improved] Map Display no longer re-initializes when resized without active viewers, improving performance
  • [Added] Map Canvas function to save the pixels as an indexed buffered image (gif)
Other
  • [Fixed] Several network synchronization glitches when players or entities teleport between worlds or (re)spawn
  • [Fixed] Slabs, planks and some other materials not parsable by name
  • [Added] Support for spawning entities using CommonEntity that lack a world-coords constructor
  • [Added] Hastebin utility class for uploading/downloading text data, with special support for stream compression
  • [Added] Extra safeguard against server crash when a plugin implementing PlayerFileData hook throws an error
  • [Fixed] NullPointerException in DataWatcher when watched items are empty
  • [Fixed] Quaternion rotateYawPitchRoll Vector function having x and y coordinates swapped
  • [Fixed] Errors occurring when an entity network controller was detached
  • [Added] Octree and DoubleOctree implementations for mapping to point cloud data
  • [Fixed] Start AsyncTask threads with daemon=true to prevent the server stalling if a task isn't terminated on shutdown
  • [Added] Debug utility logStackTraceAsynchronously to debug hangs on plugin enable/disable
  • [Added] DataWatcher getFlag and setFlag functions for byte mask manipulations
  • [Fixed] Made ResourceKey name format error handling more consistent
  • [Added] Fail earlier with exceptions rather than silently when setting invalid entity types in spawn packets [TrainCarts Issue #311]
  • [Fixed] Preserve chat formatting characters at the end of a message when storing in a ChatText object
  • [Added] New YAML implementation that allows for more efficient saving, writes to file asynchronously, speeding up autosave in plugins
  • [Added] Function to write text to files asynchronously with a callback to know when writing finishes
  • [Added] YAML can now parse ItemStack data saved on future versions of Minecraft
  • [Improved] Library initialization of the test server much faster, making tests run faster too
  • [Improved] Block to BlockState conversion much faster by not creating snapshots anymore
  • [Fixed] Entities with entity controller stopping completely when moving very slowly
  • [Improved] Performance of EntityTypes lookup on 1.14 and later was improved significantly
  • [Fixed] Missing field error for PacketPlayOutWorldParticles on older versions of Minecraft
  • [Improved] Use entitiesById instead of entitiesByUUID field for world entity list, improves performance of synchronizeList function
  • [Fixed] Entities with controllers sometimes disappearing from the server on shutdown due to chunk not marked for saving
  • [Fixed] Entity tracker for players was reset when teleporting, causing some strange glitches and lag because chunks were resent [TrainCarts Issue #329]
  • [Improved] Legacy AttachEntity packet now has cleaner API functions for the legacy mount and still used leash logic
  • [Added] VehicleMountController, taken over from TrainCarts and significantly improved. Used to mount virtual entities onto one another
----------, Feb 17, 2020

It took a little while to release this, because Minecraft 1.14 had such a chaotic release cycle. But an official version for
Minecraft 1.14 - 1.14.4 is now here. A lot of changes were made to both the API and the implementation to work properly
on 1.14 due to various serious deadlock issues in the server. Some bugfixes for earlier Minecraft versions are also included.

General bugfixes and changes
General bugfixes and changes not deserving of its own category.
  • Add support for Minecraft 1.14, 1.14.1, 1.14.2, 1.14.3 and 1.14.4
  • Add support for newer builds of 1.13.2 Spigot and PaperSpigot
  • Fix Tile Entity List error that occurred on older PaperSpigot versions
  • Fix compatibility problems with Java 11 and Java 12, including a reflective access warning that was displayed
  • Fix ProtocolLib-related bug that caused problems on older versions of Minecraft
  • Fix broken entity movement when block collision is disabled for entities (affected TrainCarts)
  • Fix player disconnecting when packet listeners or monitors throw errors handling a packet
  • Fix runtime errors that occurred when run on a machine with Turkish locale
  • Fix rare random error when binding the default network packet handler
  • Fix unhandled methods when converting some tile entities to their BlockState (Command blocks, structure blocks)
  • Fix poor performance of TileEntity -> BlockState conversion because of snapshotting
  • Fix LongHashSet unable to store the values 0 and Long.MIN_VALUE due to implementation flaw in CraftBukkit
  • Fix rare internal error due to two at-runtime generated classes getting the same name
  • Fix rare deadlock on 1.13 when a chunk is requested and another plugin is loading a chunk on another thread
  • Fix World getBlockStates returning BlockStates from chunks that have already unloaded, which caused chunk loads when accessed
  • Fix several instances where chunks were retrieved inside the ChunkLoad and ChunkUnload events, which caused server deadlocks on 1.14 - 1.14.3. This also improves performance.

Map Display API
Changes that impact Map Displays
  • Fix held map displays not updating on Minecraft 1.8
  • Add support for top-face and bottom-face map displays in item frames
  • Fix Map Display internal logic bug that caused rare random corrupted display on item frames
  • Fix runtime error when the Anvil MapWidget was used on CraftBukkit server (not on Spigot server)
  • Fix MapWidget focus change not always causing a redraw of the widget
  • Fix MapWidget focus of non-focusable widgets will now focus first child widget
  • Add MapWidget callback function to override and handle widget navigation
  • Add MapDisplay getFocusedWidget method

New features
New additions to the library
  • Add NBT fromMojangson (mojang's JSON) parser function
  • Add CommonUtil getServerProperty function to read settings from server.properties
  • Add ForcedChunk API to keep chunks loaded (Minecraft 1.14+ support)
  • Changes to the Block and Sky Lighting API (Minecraft 1.14+ support)
  • Changes to the IN_FLYING, IN_USE_ITEM and OUT_OPEN_WINDOW packets (Minecraft 1.14+ support)
----------, Aug 4, 2019

Recent changes to Paperspigot and Spigot itself broke compatibility with v2, which v3 addresses. Also included are some bugfixes for bugs that have been reported in this past period.

General bugfixes
General bugfixes not deserving of its own category.
  • Entity movement error on newer builds of 1.13.2 spigot server
  • Template loading error on newer builds of 1.13.2 paperspigot server
  • An error on 1.13+ when retrieving block data inside a chunk load event (cyclic chunk load bug)
  • Initialization errors when used on Java 12 due to changes in security manager
  • Dimension field initialized null for custom entities on some worlds, causing entities to disappear when reloaded
  • World provider 'is dark world' property incorrect, caused light fixing to malfunction on some worlds (Light cleaner)
  • Too strict field/method modifier matching, made more loose to allow for changes in custom server implementations
  • Error when an item is set to empty/null inside a (hopper) inventory using ItemUtil
  • Missing user agent for when downloading resource packs. Some ftp/servers block such downloads as a result.
  • Item transfer bug that caused lava buckets to stay when transferring
  • MaterialData <> BlockData translation glitch for 1.13+ new button types, caused these buttons to malfunction in Traincarts
  • Akarin paperspigot fork not detected as a paperspigot server

Map Display API bugfixes
Relatively new, it deserves its own section because of the many bugs that have been fixed for it.
  • Map contents not sent when players die or change world
  • Map contents not sent on player join when the anti-xray feature is enabled on Paperspigot (Protocollib bug, workaround installed)
  • A bug in the internal controller caused a silent internal server bug when maps were loaded crossing a chunk border
  • Block update state (map rendering) for some block types caused random block physics events. Disabled those and added detection for other block types that may cause it in the future
  • Cyclical texture loading loop bug in resource packs that caused a crash, when a texture refers to itself.
  • Rendering bug of slab blocks on 1.13+
  • Incorrect map display UV texture code caused some 3d models to render incorrectly
  • Inefficient rendering of voxel-based (1x1 texture) models. Has been optimized to speed up rendering.
  • Texture loading for animated textures returning incorrect data, now picks the first frame of the animation instead
  • Incorrectly initializing map displays before the owner plugin is actually enabled
  • Minor performance issue with BlockRenderOptions hashCode function (used frequently for lookup)
  • Glitch that occurs when a player is teleported that is at the same time controlling a map display using movement controls
  • Some JVM instances unable to load certain resource pack zip files. Fixed by using the Java ZipFile API instead of JarFile API when loading resource packs, since zip-support of JarFile could not be guaranteed.
New features
Some new goodies.
  • Added Shulker entity packet datawatcher API, for sending a fake shulker entity to a player
  • Added crystal entity datawatcher API, for sending and updating the end crystal
  • Added extra helper methods for retrieving Map Display instances from Item Frames
  • Extra overloads for DebugUtil (command-controlled variables)
----------, Apr 11, 2019

Recent changes in the Spigot server broke a few things. Besides restoring compatibility with the newer builds, some improvements have been made to make the library easier to use during testing.

This build remains compatible with older versions of Spigot and Paperspigot.

Changes
  • Stop using trove int-object hashmaps, since trove has been phased out by Spigot devs in the newer builds
  • Automatically use the new deobfuscated names for some NMS methods that were pushed to Spigot
  • Fix pom.xml of mountiplex so that there are no ClassNotFound errors for ASM classes when running tests individually
  • Handle classes automatically initialize the template class declaration resolver they require, so that bootstrap() is no longer needed.
  • Avoid early initialization of the test Spigot server instance and static state, speeding up running of smaller tests independently that don't rely on this
  • Speed up parsing of templates, which helps during testing, but only reduces enable time by a very small amount
  • Experimental speed-up for the DataWatcher set() method, which should help performance in Traincarts when a lot of item model attachments are used that require pose changes
----------, Jan 2, 2019

Adds support for Spigot/CraftBukkit/PaperSpigot 1.13.2.

Some people reported high tps% usage of the FramedMapUpdater background task because of the many item frames on their server. This problem has been significantly minimized so that most of the usage only occurs when actual Map Displays are used.

Highlights
  • Adds support for Spigot/CraftBukkit/PaperSpigot 1.13.2
  • Performance improvements and bugfixes
Changes
  • [Added] Metadata rules can now be specified when using the ItemParser. This means you can now use $metaname==value on item transfer signs in TrainCarts. Multiple can be set, also supporting >= and others for numbers.
  • [Added] Bukkit helper method 'unregisterListener', to remove an event listener previously registered using Bukkit's API
  • [Added] Anvil GUI map widget to allow text input from players
  • [Fixed] High tps% usage in the framed map updater background task by employing many small caching and micro-optimization tricks
  • [Fixed] Incorrect separator character used for the world region folder (caused some strange behavior in MyWorlds)
  • [Fixed] Support patch for PaperSpigot (removeItemAnySlot function)
  • [Fixed] Redstone wire did not translate to legacy MaterialData correctly, causing redstone power to TrainCarts signs to not function on 1.13+
  • [Fixed] Default protocol fallback failed to enable on Spigot 1.8 and people needed to use ProtocolLib
  • [Fixed] A few potential out of range exceptions in the Map Display drawing logic when drawing outside the viewport
  • [Fixed] Null dimension on some world types (flat world) due to CraftBukkit using a World Dimension Manager that is not internally mapped. Caused entity saving errors
  • [Fixed] isMainThread check now also keeps into account the watchdog thread used when the server crashes, preventing errors in other plugins during shutdown.
  • [Fixed] Performance improvements, avoiding use of conversion logic when up- or down-casting object types when invoking methods/fields
  • [Fixed] ProtocolLib-caused error when pre-authenticated clients send packets listened to by plugins that expect a logged-in player to be around
----------, Dec 24, 2018

Unfortunately 1.13.1-v3 was shown still contain several bugs on various versions of MC conditionally, which had to be fixed. Many are very specific to other plugins of ours, so those will be mentioned.

Fixes
  • Heightmap calculation was incorrect on MC 1.12.2 and earlier. This caused Light Cleaner to malfunction on older versions of Minecraft.
  • Changing weather did not work on MC 1.13 and later. This caused My Worlds weather changes to no longer function on >1.13.
  • Performance problem with the world listener hook impacting all versions of MC, when a lot of block physics occur. Performance loss here has been greatly minimized.
  • Template initialization error on MC 1.9 - MC 1.11. This caused Traincarts to not function on these versions of MC.
  • Entity world border field could not be set on MC 1.9.4
  • Item frame DATA datawatcher key nonfunctional. May have caused strange item-frame map display glitches on MC 1.9 - 1.10.2.
  • Player position is maintained when switching between controlling a map display map or walking around. Also fixes a random bug where a player is partially submerged inside a block when controlling.
----------, Oct 15, 2018

Quick update that fixes a few things that were found or caused only very recently:
  • Custom entities were not saved with the correct name on MC 1.11 - 1.12.2, resulting in 'Skipping Entity with id' warnings
  • Failed to instrument the new PaperSpigot ChunkProviderServer because of an outdated CGLib version. This now works again.
----------, Oct 6, 2018

There was a runtime error running BKCommonLib on Java 9/10. In addition a dependency has been updated so that Java 11 is also supported.

In addition there's a couple bugfixes, with improved support for older versions of Minecraft and newer builds of Paperspigot.

Highlights
  • Adds support for java 9, 10 and 11
  • Adds support for new Paperspigot
  • Improves performance (in Traincarts) with asynchronous chunk loading working again on 1.13.1 (limited function on 1.13)
Changes
  • [Fixed] Replaced Stream.of with something that also works reliably on Java 9 and onwards
  • [Fixed] Upgraded Javassist to 3.23.1-GA, adding support for Java 11
  • [Fixed] Error when spawning redstone dust particles on MC 1.12.2 and earlier
  • [Fixed] Asynchronous chunk loading was not truly async on 1.13+, it now uses the proper new async API, also supporting the changes in Paperspigot.
  • [Fixed] Implicitly shared set and list is now multi-threading compatible, fixing a few rare errors that occurred
  • [Fixed] Mark chunk for saving when a (custom) entity is moved out of it, fixing a potential entity duplication bug
  • [Fixed] NPE when a network controller is ticked and no entity exists
  • [Fixed] Lava rendering on map canvas was incorrect
  • [Fixed] Misc: pom.xml cleanup to make BKCommonLib easier to integrate with javadoc, sources and api. Thank you, Gabriele C.!
  • [Added] BlockData canSupportTop method, for checking whether a particular Block supports carrying blocks on top
----------, Oct 1, 2018

A lot of changes internal to the plugin to support Spigot 1.13 and 1.13.1 fully. Most notably, changes to better support the legacy and new material API. Some changes to the exposed API have been made, so depending plugins may have to be updated to support these changes.

Highlights
  • Adds support for Spigot 1.13 and 1.13.1
  • Some bugfixes supporting spigot 1.8 - 1.8.8
Changes
  • [Added] Support for Spigot 1.13 and 1.13.1
  • [Fixed] Error updating metadata of entities on some versions of Minecraft because of incorrect Optional handling
  • [Fixed] Map display items not preserving state when protocollib is not installed
  • [Added] Helper method for spawning colored redstone dust particles
  • [Added] EntityType setters for entity spawn packets, avoiding the need to use entity type id's
  • [Fixed] Performance enhancements in BlockData API, EntityMoveHandler and sendPacket
  • [Added] Basic support for NMS HeightMap logic
  • [Added] MaterialUtil getMaterial functions to access legacy material types safely
----------, Sep 2, 2018

This v5 release fixes a lot of bugs and issues, also adding a few new APIs. Plugins that use BKCommonLib dont have to be updated and will work with this version of BKCommonLib all the same.

This version is not compatible with the new Minecraft 1.13-pre7 dev builds of Spigot. Development is now shifting to adding support for MC 1.13 for a future new release of BKCommonLib.

Highlights
  • Performance improvements when using map displays
  • Fixes that mainly impact the Traincarts plugin
  • Fixes some errors that occurred on MC versions < 1.11.2
Changes
  • [Fixed] High per-tick time spent in MapDisplay run() due to bug in packet constructor
  • [Fixed] Timings not displaying right on paperspigot
  • [Added] LongHashMap clear and add functions
  • [Added] DebugLogger
  • [Fixed] Error when loading index.json (resource pack cache) fails
  • [Fixed] Server crash on MC 1.11 due to incorrect itemstack usage
  • [Fixed] WorldUtil.getBlockStates broken on MC 1.8.8 and before (SignLink signs not initializing at startup)
  • [Fixed] Vehicles of passengers sometimes becoming invisible (network controller, Traincarts)
  • [Fixed] Broken re-mounting when teleporting vehicles with passengers in them (Traincarts)
  • [Added] Entity Controller block/entity collision enable/disable option (performance)
  • [Added] Entity Controller block collision bounding box property (performance)
  • [Added] Entity preventBlockPlace property (allow placement of blocks inside the entity)
  • [Added] Packet and entity metadata for NMS handles
  • [Added] Immutable player set, for low memory footprint large set count logic
  • [Fixed] Metadata error due to use of Optional in MC 1.9.4 (caused broken tiling of map displays on item frames)
  • [Fixed] Map display item metadata lost when switching item between slots in creative mode
  • [Fixed] SetLeversAroundBlock now also toggles levers attached to the bottom of blocks
  • [Fixed] receivePacket not working properly when ProtocolLib is NOT installed (caused client d/c)
  • [Fixed] Fixed block model / item texture rendering of shulker boxes
  • [Fixed] Entities with entity controllers can now be targeted using command(blocks) with @e{type=minecart} and so on
  • [Fixed] Commandblock minecart item not resolving to an appropriate entity type.
  • [Fixed] Entities with entity controllers not showing a correct name in opened GUI windows
----------, Jul 21, 2018

A very big update with a lot of changes that accumulated over the past months. It took a while for all plugins to become stable again after introducing so many new things, but now is the day I can finally release all of these things :)

Most plugins will not have to be updated, but TrainCarts may lose backwards compatibility and will need to be updated.

Highlights
  • Map display widgets like textboxes and buttons! Finally UI-worthy!
  • Adds support for MC 1.8 - 1.8.7
  • Quaternion and 4x4 Matrix maths
Changes
  • [Fixed] Full support for MC1.8-MC1.8.7, as well as a bugfix for MC1.8.8
  • [Added] [Map Display] Map canvas drawing functions added
  • [Added] [Map Display] Map widgets system implemented
    • Map display input propagation with activation/focussing
    • Callbacks when focussing/blurring/input/attach/detach
    • Rendering, invalidation, resizing logic
    • Recursive widgets (widgets with children)
    • Standard window, text, button and tab view widgets
    • Key input + repeat counter + fixes for MC ~1.8
  • [Fixed] [Map Display] Map rendering of items
    • Patch glitches with high-resolution textures
    • Basic support for item colors (leather armor, potions, etc.)
  • [Fixed] [Map Display] Map resource pack loading bugs
    • Automatic downloading from URL
    • Recursive model loading ('reference self')
    • Improve logging, some errors were vague
  • [Added] [Map Display] New tiny 5x3 font
  • [Fixed] [Map Display] Performance improvements and bugfixes for framed map displays
  • [Added] [Map Display] New convenience functions for getting map displays bound to items / from player viewers
  • [Added] [Math] Matrix/Quaternion 3D maths
  • [Fixed] [Entity] Entity network controller initial spawning logic on bind
  • [Added] [Entity] Bounding box set size methods
  • [Added] [Entity] World property for EntityAdd/EntityRemove event
  • [Added] [Configuration] getNodeList for storing node lists in yaml
  • [Added] [Configuration] toString() (useful for debug)
  • [Fixed] [World] getChunkAsync not actually async and not calling Runnable callback
  • [Fixed] [World] isDarkWorld() property not correct on all server versions (affects Light Cleaner)
  • [Fixed] [World] Performance issues in BlockData for getRawData/getType methods
  • [Fixed] [Mountiplex] Multithreading-related glitch when initializing templates (rare bug)
  • [Fixed] [Mountiplex] Performance improvement of enum parsing from String
  • [Added] Timings API using aikar's timings library (spigot timings)
  • [Added] Implicitly shared set and list, for efficient defensive copying of collections
----------, Jan 22, 2018

This update will be required for the next release of TrainCarts, since many new APIs that TC will need for soon-to-be-announced features are added in this update.

Changes for 1.12.2-v2:
  • Changes in Mountiplex to significantly speed up function calls performed on *Handles, particularly when parameters or return types are primitives. There will also be less temporary lag when instances are first created.
  • Cleanup of old deprecated code, moving more of it to the new Handle based implementations instead of the old reflection system
  • Fixes setBlockDataFast not cancelling physics correctly when used
  • Fixes BlockUtil doPhysics 'self' parameter not working
  • Fixes BlockData getStepSound() not working correctly
  • Change all matrix maths to use doubles instead of floats, since it will also be used outside of maps. This also has some effect on map rendering.
  • Add handle classes for the PlayerInfo packet
  • Add handle classes for GameProfile Property system
  • Several performance tweaks made after profiling
Changes for 1.12.2-v3:
  • Fix Minecart forwardMovement field for >= 1.12
  • Fixes sound API to work on all minecraft versions
  • Fixes to onSyncPassengers (network controller)
  • Fixes compatibility issues introduced with 1.12.2-v2
----------, Oct 14, 2017

This new version adds official support for Minecraft 1.12.2. Besides that, there are a lot of changes involving map displays:
  • Fix block rendering of carpet, redstone, pistons, leaves, grass, sloped rails, flowers and plants
  • Fixes an error that occurred with some custom block models
  • Map Texture image loading receives a very significant speed boost and has less memory overhead
  • No longer uses Bukkit's API for the conversion between R/G/B color and map colors. It now uses a sophisticated algorithm based on hard science.
  • This significantly improves color display over before, improving color contrast and reducing the 'grey-ness' of displayed images
Improved color palette
color_map_changes.png

Fixes rendering of certain blocks
ed9b55ac0c.png
----------, Sep 24, 2017

This release features some much needed changes for the upcoming Maplands plugin. It also retroactively affects other plugins because of performance adjustments made to the all-encompassing 'get block data' function.

Map Display and Map Canvas
  • Now supports dynamic size displays with automatic tiling. Putting the same map next to another in item frames extends the display fully automatically.
  • Fixes Map Display onDetached not being called at shutdown
  • Now includes a properties field for easily getting and setting properties for a display. The properties are automatically saved in the map item, and are thus persistent across restarts.
  • Canvas depth buffer has some fixes and additions
  • Canvas now has a 'movePixels' function to move all pixels, and depth buffer information, at an offset.
General
  • WorldUtil.getBlockData and ChunkUtil.getBlockData performance has been significantly improved. A speedup of 30% has been observed, mostly due to the removal of a temporary object that caused rapid memory usage. This will in particular improve performance of map rendering, but also for TrainCarts (who uses it for train physics)
  • CommonTagCompound has some changes to make it easier to use. It will automatically store UUID/BlockLocation/IntVector3 in appropriate fields, without requiring specific functions for it.
  • Error reporting for missing fields and methods has been improved. When things are missing on the server for whatever reason, it will give more detailed information about what.
----------, Sep 10, 2017

A lot of changes in the Map Display API department! And some bugfixes.

Map Display API has many new features:

  • 3D model rendering for map canvas
    • Vanilla Minecraft client/Resource pack model and texture loading
    • Minecraft blocks can be rendered onto maps
    • Depth buffer, directional/ambient lighting
  • Map Display persistent items
    • Persistent map display items with UUID
    • Only uses map durability 0 for all virtual map items
    • Automatically creates the map display instance based on item metadata
    • Show the same Map Display instance to multiple viewers automatically (or not, and keep it unique per player)
    • onMapItemChanged callback function
    • Changing the map item updates it in all player's inventories and item frames that show the item
  • Glitches have been fixed
    • Item frame playing 'pop' sounds when the item in it is changed
    • Player held map closing and opening rapidly when item is changed
    • Ghost map items staying in player inventories when controlling
Bugfixes:
  • Supports the very latest development builds of Spigot 1.12.1, which introduced some breaking changes
  • Fixed some tile entities not converting to BlockState resulting in errors
  • Fixes a glitch on MC 1.8.8 where players collide with their vehicle, not handled by Entity Controllers (affects TrainCarts)
  • Fix entity class name lookup failure on MC 1.8.8
  • No longer exposes the Spigot server implementation as dependency. Only uses it under test. This prevents potential issues for depending plugins when classes can not be found, such as GameProfile.
  • Added 'isShuttingDown' property allowing plugins to check whether it is being disabled, or reloaded.
  • Potential memory leaks during reloading have been fixed
----------, Sep 3, 2017

This new release version adds support for the new 1.12.1 Minecraft version. In addition to supporting all prior Spigot server versions, this release also supports all CraftBukkit versions of the server. This means you can now use BKCommonLib on many more servers!

In addition to this new support, some important bugfixes:
  • Corrects an invalid PermissionDefaults.yml being generated for depending plugins. This caused bugs that resulted in players to have no permissions to do anything. For example, in TrainCarts players couldn't place down signs or minecarts. If you suffer from this issue, update BKCommonLib and delete the TrainCarts PermissionDefaults.yml so a correct version can be generated.
  • Fixes an error related to LongObjectHashMap casting, resulting in some problems in TrainCarts. This was a bug happening on an earlier development build (not release)
----------, Aug 9, 2017

This update reduces found cpu usage hotspots in Entity controllers. It will improve performance for plugins like TrainCarts, in particular addressing performance loss handling VehicleCollisionEvent in that plugin.

In addition a new experimental runtime code generation system is included to reduce runtime version checking for Block properties. This may slightly improve performance of Light Cleaner.

Dependant plugins do not require updating and there are no breaking changes.
----------, Jul 12, 2017

There were several bugs and problems when using BKCommonLib with ProtocolLib. These issues have been fixed:
  • Handle silent ignoring of non-existent packets (fixes SignLink initialization bug)
  • Incorrect registration of packet listeners, causing complete lack of handling sent packets
  • Non-async packet listener registration in ProtocolLib bugs out for some packets. It now registers explicitly ASYNC, requiring synchronization / thread-safety on those using listeners. (this was already intended)
  • Fixes compatibility with BannerBoard (tested)
  • Added internal synchronization to avoid problems handling asynchronous packets
----------, Jul 1, 2017

This is a fairly big update adding support for older Spigot/Minecraft versions all the way from MC 1.8.8. Plugins that use BKCommonLib will very likely have to be updated. These plugins include our TrainCarts, SignLink and MyWorlds.

Changelog
  • Large rewrite to enable full backwards support for Minecraft versions 1.8.8, 1.9, 1.9.2, 1.9.4, 1.10.2, 1.11
  • Still includes support for Minecraft versions 1.11.2, 1.12
  • Fix stack overflow error in InventoryBase: getContents()
  • Fix hopper minecarts not sucking in items from hoppers/tossed items
  • Fix crafting recipes not functioning
  • Add name alias for Material plank -> wood
  • Re-introduced packet API from older versions (OUT_UPDATE_SIGN)
----------, Jun 30, 2017

There were a few compatibility issues (field warnings) with the 1.11.2-v2 build for Spigot 1.12, those have been fixed.

This build is backwards compatible with MC1.11.2, and the pre-release versions of MC 1.12. No plugin updates should be required.

Changes
  • Error reporting has been improved to show better error messages when fields/classes are missing, and provide better alternative field/method/etc. suggestions in the log based on similarity. Not very important when nothing is wrong.
  • Compiled with Java 8
----------, Jun 11, 2017

A lot has changed in this version of BKCommonLib. It is also the very first version to support multiple minecraft versions in the same plugin! This version supports 1.11.2 and (tested) MC1.12-pre5 and MC1.12-pre6. Once an official 1.12 build of spigot rolls out, an official 1.12 BKCommonLib will be posted as well.

Note: re-uploaded due to a zero-day bug involving the entity network controller

Bugfixes:
  • Minecart displayed Block data was not working
  • Fix concurrent modification bug when iterating world block states
  • CreaturePreSpawnEvent fixes, MyWorlds spawn rules should work
  • User disconnect bugs when errors occur in entity controllers
  • Simplify TileEntity<>BlockState conversion, this will fix many errors
  • Fix NPE that happened on an earlier 1.11.2 Bukkit build related to passengers
  • Fixed all missing field errors on Paperspigot 1.11.2
  • Fixes many other field naming errors that resulted in rare to find bugs
New features:
  • Full 1.12-pre5 and 1.12-pre6 support on top of 1.11.2
  • Significant performance enhancements by generating java bytecode for public member access, beating Java Reflection tenfold
Removed features:
  • Removed ChunkProviderServerHook performance timings, which will impact NoLagg examine. These hooks dragged the performance down even when not monitoring for some plugins
  • Removed some networking API's to do with reading packet sizes, which required an unstable form of field access
  • Removed the hacky way getChunk was implemented, reading directly from the LongObjectHashMap. Now relies on default Bukkit implementations.

Implementation details:
  • Reflection, class generation and conversion utilities have all been moved to a new, Minecraft-agnostic project called "Mountiplex". Mountiplex is included in BKCommonLib.
  • All interaction with the server internals is now done using a customized reflection template system, allowing dynamic changes of fields/methods/classes enabling cross-server compatibility.
  • Future use of NMS reflection code is discouraged, as it will be subject to change.
----------, Jun 5, 2017

Resource Information
Author:
----------
Total Downloads: 206,086
First Release: Apr 17, 2017
Last Update: Apr 27, 2025
Category: ---------------
All-Time Rating:
56 ratings
Version -----
Released: --------------------
Downloads: ------
Version Rating:
----------------------
-- ratings