Skip to content

3A - Extensions update

Choose a tag to compare

@Omena0 Omena0 released this 04 Mar 06:56
· 11 commits to main since this release
Immutable release. Only release title and notes can be modified.

3A

Major expansion — extensions, tooling, networking overhaul.
Many internal changes, cleanup and optimization.

Changes

Networking

  • Switched from TCP sockets to stdin/stdout pipes for faster IPC
  • Java-side method resolution now supports snake_case → camelCase fallback
  • Version compatibility improvements and removed slow regex

New APIs

  • Entity AI: targeting, pathfinding, awareness, line of sight, look_at
  • Entity tags: add_tag, remove_tag, tags, is_tagged (Python-side, UUID-keyed)
  • Entity attributes: yaw, pitch, look_direction, equipment
  • Player: selected_slot, freeze/unfreeze (tick-based position lock), vanish/unvanish
  • Player extension shortcuts: balance, deposit, withdraw, mana, xp, player_level
  • Block/tile entity API: signs, furnaces, containers
  • Recipe API: shaped, shapeless, furnace recipes as a class
  • Firework effects API with builder pattern
  • Resource pack API on Player
  • Enchantment discovery: Enchantment.all() and Enchantment.for_item()
  • Packet API via ProtocolLib: on_packet_send, on_packet_receive, send_packet
  • Inter-script messaging: script_send, on_script_message, get_scripts
  • WorldTime class and @world.at_time() decorator for time-based events
  • World: create_explosion, entities_near, blocks_near
  • Location: + and - operators (with Location and Vector)
  • Vector: +, -, * operators (scalar, component-wise, and reverse)
  • 18 new enum types (DamageCause, Enchantment, ItemFlag, etc)
  • Respawn location override (return Location from player_respawn)
  • entity_target event return value handling: override target by returning Entity
  • @event .unregister() method to remove event handlers at runtime

New extensions

  • Paginator: multi-page menu with nav buttons
  • Quest / QuestTree: objectives, bossbar timers, branching quest lines
  • Dialog: branching conversations with timeouts and NPC linking
  • Bank: persistent balances with transaction events
  • Shop: paginated GUI with bank integration
  • TradeWindow: confirm/cancel with anti-dupe delay
  • Ability / ManaStore / CombatSystem / LevelSystem
  • Region / Party / Guild / CustomItem
  • Leaderboard / VisualEffect / PlayerDataStore
  • Dungeon: procedural room generation with WFC algorithm

Decorators & commands

  • @command: cmd_ prefix auto-stripping (def cmd_greet → /greet)
  • @command: dynamic tab completions via @my_command.tab_complete
  • @command: static tab_complete parameter with wildcard support
  • Persistent State class with auto-save on shutdown

Event system

  • Extended event payload: action, hand, from, to, cause, velocity, reason, message, new_slot, previous_slot, amount, slot, etc
  • Event.world and Event.location now auto-derive from entity/player when not directly available
  • snake_case field access auto-resolves to Java getters (getNewSlot, isPreviousSlot, etc)

Error handling

  • Java stack traces included in Python exceptions
  • 18 typed error subclasses (EntityGoneException, MethodNotFoundException, etc)

Helpers

  • Menu: race condition fix when opening a new menu from a click handler
  • ActionBarDisplay: immediate refresh on creation (no longer waits for server_boot)
  • BossBarDisplay: renamed link_cooldown to linked_to (old name kept as compat alias)
  • ManaStore: auto-cleanup on player disconnect, regen loop crash protection
  • NPC: dialog linking, player linking, range enter/exit callbacks

Tooling

  • pjb CLI tool: pjb search <query> and pjb events [filter]
  • Doc site full-text search bar with Ctrl+K shortcut
  • Gradle copyBridgePython task: auto-deploys bridge to server on build

Internals

  • Restructured bridge.py into proper Python module (connection, wrappers, helpers, types, utils, decorators)
  • Documentation for events, execution, lifecycle, and serialization internals
  • Type stubs for all extensions
  • Comprehensive Event stubs with all event-specific fields

Misc

  • MeshDisplay helper (WIP)
  • Updated wiki/docs site with all new pages