Skip to content

Changelog

adepierre edited this page Jun 16, 2024 · 50 revisions

Changelog

Here you can track the history of the project from the time I started this page. Only main points are added when I don't forget, see commit history for a complete version.

06/24 : ProtocolCraft refactoring (Part I)

  • huge refactoring in protocolCraft code to simplify packets definition and reduce human errors
  • add missing current dimension getter to World class
  • add missing 1.20.5+ entity Poses
  • fix error in potion Component types
  • fix protocol issue for 1.20.4
  • fix various compilers warning
  • add support for 1.21

05/24

  • Support for 1.20.5 and 1.20.6
  • Fix assets copy issues when cmake is not in path
  • Fix physics in powder snow
  • Add max durability info to all items
  • Fix reconfigure cmake error when using local openssl
  • Refactoring of particle and recipes system in protocolCraft
  • Fix warning log when slime entities are created

04/24

  • Add a new GoToDouble task to go to arbitrary X/Z world position instead of just blocks center
  • Improve physics accuracy regarding vanilla game from 1e-4 to 1e-6
  • Fix wall colliders for 1.12.2 as best as possible
  • Fix slot swapping task when source slot == destination slot
  • Fix physics not being applied to the player in case of multiple login for the same client (non vanilla servers)
  • Fix chat not being written properly to protocol for versions > 1.20.2
  • Fix some issues in github actions

03/24: Pathfinding update

  • Improved pathfinding algorithm to handle blocks with different height (carpets, snow layers, wall, fences...)
  • Switch light block state to not solid
  • Fix compilation for 1.15.2 < versions < 1.19
  • Fix crash when loading NBT metadata on entity for versions 1.20.2+
  • Fix dimension properties loading for 1.18.2 < versions < 1.20.2
  • Improve error message when trying to access a missing blackboard key

02/24: Accurate physics update

  • collision shapes added to Block_info.json asset file for blocks that have different collision/rendering shapes
  • add ability to have different solid state for same blockstate with different properties (fence gate, snow layers...)
  • add vanilla-accurate offsets for bamboo/dripstone colliders
  • fix efficiency/aqua affinity enchantment detection when computing digging time
  • fix sneaking speed
  • fix crash when non-vanilla server asks to close player inventory
  • vanilla-like jump/start/stop flying (creative and elytra) in physics
  • add rocket boosting to physics when gliding with elytra
  • fix collision bug when colliding on X and Z in the same tick
  • add automatic step-up when walking toward small blocks (ex. slab)
  • add tests to validate parity with vanilla physics

01/24: Physics Update

  • new vanilla physics system to replace the old one, see wiki page
  • blockstates have new properties that can be checked for physics related blocks
  • POTENTIALLY BREAKING pathfinding uses the new physics
  • BREAKING moving game mode and related properties (flying ability, invulnerability...) from ManagersClient to LocalPlayer
  • BREAKING StartSprinting and StopSprinting have been replaced by a bool in GoTo function
  • BREAKING GoTo function signature has changed, speed parameter is now a multiplicative boost instead of an absolute value
  • ManagersClient has a direct GetLocalPlayer without needing to call GetEntityManager first

12/23

  • add support for 1.20.4
  • add support for 1.20.3
  • fix crash when minimizing OpenGL window
  • fix compilation for 1.12.2
  • add dynamic size support to entities (slime/player poses)
  • fix protocolCraft typo and wrong packet ID for 1.14-1.14.4
  • add attribute support to entities
  • add wall/fence/fence gate to blockstate data

11/23: Thread-safety and RAM optimisation

  • big RAM optimisation when compiled without GUI support (<5 Mb for AFK bots, <(30 + 60 * num loaded worlds) Mb for non-AFK bots)
  • Rework some classes to make them thread-safe:
    • EntitiesManager
    • LocalPlayer
    • InventoryManager
  • add UUID to entities
  • add connected player name list to ManagersClient
  • fix pathfinding when exceeding search budget
  • many small typos and consistency fixes

10/23: World Update

  • 1.20.2 support
  • BREAKING big refactoring of World class
    • class is now fully thread-safe, no more mutex to lock when using it
    • chunk loading time has been optimized (see table below for details)
    • RAM usage of loaded chunks has been highly reduced (-32% when compiled with GUI support, -46% otherwise)
    • GetBlock directly returns a Blockstate* instead of a Block instance
    • shared world works even if bots are not loading the same area (still require to be in the same dimension)
  • refactoring of github build actions
  • fix smithing inventory layout for 1.20+
  • fix biome loading for versions < 1.18
  • fix online tests for versions > 1.12.2 and < 1.18
  • remove entity collision check before block placing attempt

(same hardware, same 1.20.1 world, average of 10 runs of 453 chunks).

Botcraft version September October
Average chunk loading time, compiled with GUI (ms) 3.76 ± 1.2 1.99 ± 0.9
Average chunk loading time, compiled w/o GUI (ms) 3.33 ± 0.7 1.26 ± 0.4

09/23: Misc fixes

  • fix chest interactions for versions < 1.17
  • fix world not loaded when example 7 is used with only 1 bot
  • fix catch2 and glfw dependencies not found on NixOS
  • fix automatic build process notifications
  • fix biomes being incorrect in versions > 1.19.2
  • add version comment to document all PROTOCOL_VERSION preprocessor

08/23: World eating update

  • add new full example: world eater. See dedicated wiki page
  • better caching in github action build process
  • fix compilation for 1.19.1 and 1.19.2
  • better pathfinding
    • add sprinting ability
    • speed is automatically calculated from sprint and beacon speed effect if not specified
    • new parameter to specify min distance on X/Z plane only when using GoTo function
    • add ability to detect some changes in the terrain while pathfinding to avoid falling if a block has been removed
  • add max item durability information for tools
  • add IsWaterLogged function to blockstate

07/23: misc improvements update

  • add new enum stringifyer utils to convert enum values to string at compile-time
  • new blackboard visual debugger next to behaviour tree one
  • pathfinding improvements:
    • dedicated wiki page
    • fix pathfinding in creative mode
    • survival and creative pathfinding differ (e.g. survival will avoid magma/lava blocks)
    • no more "walking on water"
    • changing walking speed now also change climbing speed
  • merge #104 for automatic block placement face detection
  • switching protocolCraft from static to shared lib
  • wiki pages will now be mirrored in the documentation
  • better looking readme with new logo
  • fix crash when sending chat messages with more than 15 characters

06/23: plugin update

  • add plugin system to protocolCraft for mod support, see the plugin repo and the wiki page
  • fix crash when connecting to modded server with unknown enum values
  • fix day time when light cycle is off on server
  • add 1.20 compatibility
  • test name written on both sides of signs on the test server (when compiled for 1.20+ versions)

05/23: documentation update

  • new automatically generated documentation available
  • fix some pathfinding issues in world download of example 6

04/23: testing update

  • new SyncAction function in behaviour clients, will block until action is done (or fails)
  • add support for gzip compressed nbt files
  • new online test framework (see dedicated wiki page) with tests for
    • block interaction
    • block mining
    • entities handling
    • inventory management
    • chest interaction
    • crafting
    • pathfinding
    • physics
    • world data

03/23

  • GAME_VERSION renamed to BOTCRAFT_GAME_VERSION for consistency with other options
  • BOTCRAFT_USE_IMGUI is fully internal (no need to define it when linking to botcraft)
  • client jar file URL is automatically retrieved during cmake configure instead of hardcoded for each version
  • Fix block entities data not loaded to the right position in world
  • Big rewrite of internal code generation tools to simplify/speed-up update process on new minecraft version
  • many value fixes in assets json files (block hardness, item stack size etc...)
  • fix crash when receiving a packet containing a sculk vibration particle
  • new issue form available to automatically trigger library build for any supported MC version
  • Add 1.19.4 compatibility, including 1.20 preview features (Cherry Grove biome/blocks and sniffer entity)

02/23 : behaviour tree update

  • log an error when trying to connect to online mode with offline account
  • bots are now right-handed
  • add custom stack trace when exception happens during behaviour tree execution
  • added behaviour tree visualizer and debugger window
  • compile time validation of tree structure when declared with the Builder
  • behaviour tree nodes can be named when declared with the Builder
  • (BREAKING) less verbose tree declaration when using the Builder
Old Builder New Builder
auto tree = Builder<SimpleBehaviourClient>()
    .sequence()
        .inverter()
            .leaf(Foo)
        .end()
        .succeeder()
            .leaf(Bar)
        .end()
    .end()
.build();
auto tree = Builder<SimpleBehaviourClient>("My tree")
    .sequence("Root sequence")
        .inverter().leaf("Foo leaf", Foo) // anonymous inverter applied to named leaf
        .succeeder("My succeeder").leaf(Bar) // named succeeder applied to anonymous leaf
    .end();

01/23

  • Add a new github action to generate precompiled versions for any minecraft version (on demand)
  • Big refactor of protocolCraft, bumping its requirements from C++11 to C++17 (matching botcraft). No big interface changes, but cleaner internal code
  • Replacing nlohmann json dependency with ad-hoc class with similar interface
  • Refactoring ugly NBT class using C++17 features to get a new and shiny interface
  • Optimizing the build process. The following tables present the building time of the solution for various compilers (same hardware, no parallelization, with compression and encryption enabled)

MSVC (Windows)

Target 2022 01/2023 Diff
protocolCraft 38s 34s -11% ↓
botcraft 251s 74s -71% ↓
examples 53s 58s +9% ↑
total 342s 166s -52% ↓

Clang (Linux)

Target 2022 01/2023 Diff
protocolCraft 39s 32s -18% ↓
botcraft 293s 117s -60% ↓
examples 51s 56s +10% ↑
total 383s 205s -46% ↓

GCC (Linux)

Target 2022 01/2023 Diff
protocolCraft 38s 41s +8% ↑
botcraft 319s 265s -17% ↓
examples 55s 56s +2% ↑
total 412s 362s -12% ↓

12/22

  • Add a function to send commands to server for all versions
  • Add 1.19.3 compatibility, including 1.20 preview features
  • Fix MSVC compiler warnings for a clean compile output

11/22

  • Add effects to entities (slowness, haste, etc...)
  • Add best tool data to all blockstates
  • Digging task now uses accurate breaking time based on tool, block, effects etc...
  • Add previously missing TadPole entity (fixing dispenser farm example)
  • Add automatic test framework to the project

10/22

  • Improving block placement task to be more vanilla like (togglable midair placement)

09/22

  • Add support for signed chat in 1.19.1+
  • Add automatic release generation

08/22

  • Update to 1.19.1 and 1.19.2
  • Add support to connect to enforce-secure-profile=true servers for 1.19+

07/22

  • Physics now works with climbable blocks (ladder/vines/scaffholding etc...)
  • Pathfinding can use climbable blocks to go up/down and free fall without taking damages
  • New detailed compilation guide in the wiki

06/22

  • Update to 1.19
  • Fix chat parsing on modified servers (like Paper)

04/22

  • More chunk loading optimizations. The following table presents the average loading time of chunks in ms (same hardware, same world, average of 5 runs of 461 chunks).
Botcraft version 2021 01/2022 04/2022
Average chunk loading time (ms) 7.77 ± 1.3 5.28 ± 1.4 3.2 ± 0.6

03/22

  • Add item max stack size information
  • Add block variable info to blockstates ("age" for crops, "facing" for pistons etc...)
  • Improve inventory related behaviour tasks
    • Add trading (version 1.14+ only)
    • Add crafting (in inventory and with a crafting table)
    • Add right click for inventory
    • Various bug fixing
  • New full example available: fully automatic dispenser farm

02/22

  • Add basic logger
  • Add 1.18.2 support

01/22

  • Add entity system
  • Add entity bounding box rendering
  • Many code optimizations to reduce bottlenecks:
    • chunk data loading
    • game assets loading
    • chunk rendering faces generation