- Rebranded Event Dispatcher: Handle events such as player death, block placement, and block breaking, etc... That occur in the Minecraft environment
- Inventory Management: Enhanced inventory handling, without the need to get a component and then a container, like in Minecraft Bedrock Scripting API
- Dimension Wrapping: Easy manipulation of dimensions and locations, as well as vanilla methods.
- Entity Caching: Efficiently manage entities with a caching system to prevent loosing acces to decaying Entity objects
- Form Handling: Simplified form creation and handling using decorators.
- Command Dispatching: Advanced command creation and dispatching using decorators. Coming soon!
To install TeseractAPI, clone the repository and install the necessary dependencies:
git clone https://github.com/TeseractMCS/TeseractAPI.git
cd TeseractAPI
npm installCreate and dispatch custom events using decorators. Here's an example of handling a player death event:
import Teseract from "TeseractAPI/Teseract";
import PlayerDieEvent from "TeseractAPI/event/PlayerDieEvent";
import eventListener from "TeseractAPI/EventListener";
class MyPlayerDeathHandler {
@eventListener("PlayerDieEvent")
onPlayerDie(event) {
Teseract.broadcastMessage(`${event.getPlayer().getName()} has died!`);
}
}Easily create and handle forms using the form decorators:
import { buttonForm, formTitle, formBody, formButton } from "TeseractAPI/forms/Forms";
@buttonForm()
class MyForm {
@formTitle()
title = "Welcome Form";
@formBody()
body = "Please press a button.";
@formButton()
handleButtonPress(player) {
player.sendMessage("You pressed a button!");
}
}- Custom dispatchers support (for internally handling complex events)
- Form decorator-based wrapper added (base)
- PlayerEvents: Postmortal, Die, PlaceBlock, BreakBlock
- EntityEvents: Die
- ItemEvents debugged
- Inventory & PlayerInventory class refactor
- Combined vanilla Container and InventoryComponent classes
- Added dropItemStack to Inventory
- Added dropArmorItemStack to PlayerInventory
- Added EntityCache for possible decaying EntityObjects (projectiles & exploding entities, TODO: projectiles cache registering)
- TODO: EntityCache automatic decaying
- TODO: Decorator-based command dispatcher
- Finished dimension wrapping
- Added NativeParser util
- Refactored Dimension and DimensionLocation constructors
- TODO: Finish the NativeVec3 wrapping all over the API
- Exposed showForm method in Player class
- Added isCachedEntity method to Entity and CachedEntity classes
- Finished Block class wrapping
- Added BlockPermutation wrapped class
- Added getNativeHandle to all wrapped classes, for getting vanilla class instances
- Wrapped Raycast interfaces
- Wrapped various "Options" vanilla interfaces
- Added early implementation of onConsume custom component event
Contributions are welcome! Please fork the repository and submit a pull request with your changes.
This project is licensed under the MIT License. See the LICENSE file for details.
For more information and examples, please refer to the source code and the documentation within the repository.