Releases: okocraft/Box
Version 5.3.1
New Features
Add support for Folia
Added support for Folia, a multi-threaded server software by PaperMC. Please note that this is experimental and there may still be bugs.
Add goat horns
Removed the goat horn with no metadata (GOAT_HORN
) from the default item and added goat horns available in normal survival.
- Old goat horn (
GOAT_HORN
) will be converted toPONDER_GOAT_HORN
automatically (same as the vanilla) - The new goat horns will be added to
mob-drops
category in default
API Changes
Deprecate some methods that are not working on Folia
TaskFactory#run
andTaskFactory#supply
have been deprecated (but not marked for removal)- These methods throw
UnsupportedOperationException
on Folia
- These methods throw
- For entity tasks, use
TaskFactory#runEntityTask
andTaskFactory#supplyFromEntity
- Other operations are not provided in this API (as they are not used in this project)
Other
- Add
Folia
class for checking if the server softwere is Folia - Add
MCDataVersion#of
andMCDataVersion#isBetween
Fixes
- Ignore the illegal stack when withdrawing items to the inventory
- Unload player data synchronously on disabling
Version 5.3.0
New Features
New Player Command: /box stocklist
It has the same functionality as /boxadmin stock list
, but the players can only see their own stock.
Box Stick: Click on a block to get its item
This is only available in Minecraft 1.19.4 (or later) because used API is added in that version.
Hold the Box Stick and click on the block while sneaking to withdraw the block's items from the Box to the main-hand.
The following list gives concrete specifications:
- Box Stick is in the off-hand and the main-hand is empty
- The item of the clicked block will be withdrawn from Box to the main-hand
- Note: This method is already used for depositing/withdrawing items from/to the container, so the item of the container block cannot be deposited
- Box Stick is in the main-hand and the off-hand is empty
- Box Stick will be moved to the off-hand
- The item of the clicked block will be withdrawn from Box to the main-hand
- Box Stick is in the main-hand and the off-hand is not empty
- If the item in the off-hand can not be deposited to Box, nothing to happen
- When step 1 is passed, the item in the off-hand will be deposited to Box
- Box Stick will be moved to the off-hand
- The item of the clicked block will be withdrawn from Box to the main-hand
New Storage Feature
MySQL
MySQL (MariaDB) is now supported as a data storage.
To use MySQL, configure the following in config.yml
:
storage:
type: "mysql"
mysql:
table-prefix: "box_" # The prefix of the tables
address: "localhost" # The host of the database
port: 3306 # The port to connect to the database
database-name: "box" # The database name (You need to create the database before starting the server)
username: "" # The username to connect to the database
password: "" # The password to connect to the database
Migrator
Added feature to migrate data between different storage types.
For more information, check wiki page (Japanese).
API
StockHolder#stockDataStream
InventoryTransaction#depositItemsInInventory(Inventory, Predicate)
Changes
- Use
sqlite.table-prefix
instead ofdatabase.table_prefix
inconfig.yml
database.table_prefix
is still valid unlesssqlite.table-prefix
is not present
- Delay player data loading to one second after logging in
Improvements
- Set the initial capacity of the list and reduce the expansion of the list
- Call
InventoryClickEvent
before depositing/withdrawing items from/to the inventory - Log picking up items to CoreProtect
Fixes
- Don't set
idleTimeout
to SQLite connection config - Some fixes and improvements for language files
Version 5.2.0
New Features
LWC Protection Type SUPPLY
Support
This protection type is currently available in OKOCRAFT version of LWCX.
StockEvent Cause API
Added StockEvent.Cause
interface to indicate why a StockEvent fired.
About StockEvent.Cause
This is an interface, so the developers can extend this to pass additional information to the event.
If no additional information is needed, an instance can be created via Cause#create(String)
.
StockEvent.Cause
List
Cause
of the StockEvent
called by the bundled features such as Command Execution, Craft, GUI, Box Stick, etc. are already implemented.
The list of Causes by bundled modules can be found in Javadoc.
Add more argument types of BoxAPI#isDisabledWorld
Added BoxAPI#isDIsabledWorld(World)
and BoxAPI#isDIsabledWorld(String)
Changes
- Remove old category API
- Change
docTitle
and setwindowTitle
(Javadoc) - Return an default replacement item to Box directly such as bowl, glass bottle, and bucket
- Refactor StickListener
Version 5.1.0
New Features
-
Minecraft 1.19.3 Support (Added new items to default
categories.yml
)- Experimental Items that was added as experimentally are categorized dynamically to
Experimental Items
category - These items is not added to default
categories.yml
. When Mojang added them as officially, Box will add them to appropriate category - We have addressed this because it is not possible to exclude these items from Box, although future updates may make them incompatible
- Experimental Items that was added as experimentally are categorized dynamically to
-
Box Stick: More containers (furnaces and a brewing stand) support
- Furnace, BlastFurnace, and Smoker
- If you don't have items in your main hand, take out the refined items from the furnace
- If you have items that can be smelted or used as a fuel in your main hand, put them from Box into the furnace
- Brewing Stand
- If you don't have items in your main hand, take out the potions from the brewing stand
- If you have potions or blaze powders in your main hand, put them from Box into the brewing stand
- Furnace, BlastFurnace, and Smoker
Changes
- Unify the order of tree types in default "wood" category
- Only in the creative mode, the click on the block with the Box Stick is now canceled.
API Changes
- API: Expose MCDataVersion class (#166)
- Auto Store: clarify that
PerItemSetting#getEnabledItems
is unmodifiable - Category: New Category API (see: #164)
net.okocraft.box.feature.category.model.Category
andCategoryHolder
are deprecated, and marked as for removal in the next major update.
- Added Javadocs for autostore, category, and stick module
Version 5.1.0 Release Candidate 1
Version 5.0.0
Breaking Changes
For Box Users
- Box is now required Java 17
- Box depends on Paper 1.19.2; In Paper 1.17 ~ 1.18.2, Box can probably work. 1.16.5 and below are not supported.
- Yaml storage's structure has been changed.
- It will be migrated automatically, but cannot be downgraded to v4.
/boxadmin <give/set/take>
moved under/boxadmin stock
/boxadmin reset
renamed to/boxadmin resetall
For Developers (API Users)
- The project name (artifactId) now has a
box-
prefix- API users will need to change the artifactId when updating to v5.
- Update event4j to v3 (from v2)
- Please check 3.0.0 release for details on the changes and how to migrate methods.
- Move stock events (
StockEvent
,StockDecreaseEvent
,StockIncreaseEvent
, andStockSetEvent
) undernet.okocraft.box.api.event.stockholder.stock
package.
New Features
- SQLite storage
- In the future, I will add a command to BoxMigrater to migrate between different storage types.
- More LWC supports
- Add checks for DONATION and DISPLAY protections to restrict depositing/withdrawing items.
- Direct Autostore
- This feature directly stores dropped items into Box when the player performs some action to drop items, such as destroying a block.
- To enable this feature, run
/box autostore direct
(alias:/b a d
).
- Add setting to allow nagative amount of stock
- Set
allow-minus-stock
totrue
in config.yml to allow negative amount due to stock manipulation by the command. - Set to
false
to force the stock to 0 when it tries to go negative. - If it overflows (over 2,147,483,648), it will be negative regardless of the setting. If this happens under normal use, please contact Box Issues.
- Set
Improvements
/box iteminfo
is now showing the item id
Bug Fixes
/box autostore all
does not send the message when the mode is already all mode- Incorrect mode name is sent when changing autostore mode
- Only one firework is created by the craft
- Fix
AutoStoreSetting#toString
Internal Improvements
- Refactor category module (rewrite categorizer)
- Refactor autostore module
- Call AutoStoreSettingChangeEvent at more places
- Cleaned up StockInfoCommand and StockListCommand
- Remove ClassCanBeRecord suppression as it is no longer needed
New API
BoxAPI#getFeature(Class)
to get the feature instance of the specified classStockEvent#getAmount
andStockEvent#getItem
StockHolder#reset
StockHolderResetEvent
UserDataResetEvent
AbstractStockHolder
StickFeature#getBoxStickItem
- Storage modules:
box-storage-api
,box-storage-yaml
, andbox-storage-database
- Expose ConfigAPI and Event4J (see Relocate ConfigAPI and Event4J in README)
Contributers
Version 4.4.1
Fixes
- firework recipe can make three fireworks (5073acd)
4.4.0
Changes
box.autostore
,box.craft
権限の追加- Bedrock Edition のプレイヤー向けの GUI 操作モードを追加
- クラフト機能のメモリ使用量を削減
- 依存の更新
Version 4.3.0
New Features
- チェストへ (から) の在庫一括取り出し / 預け入れ機能
/boxadmin stock
コマンド/box gui {other player}
and/box iteminfo {item}
のタブ補完- レシピ機能の設定ファイル (
recipes.yml
)- カスタムレシピの追加機能
- レシピ無効化機能
- メッセージファイルの自動更新 (足りないメッセージを自動追加)
New API
API
BoxEvent#toDebugLog
- 簡潔かつ短いデバッグ用のログを作成するためのメソッド
config.yml
でデバッグを有効化すると、イベント発火ごとにこのメソッドを呼び出しロギングする
Disableable
interface for BoxFeatureconfig.yml
で無効化可能な BoxFeature であることを示すインターフェース
BoxFeature#getDependencies
- 依存している他の BoxFeature のクラスを返すためのメソッド
- 指定した BoxFeature が有効化されていない場合は登録されない
InventoryTransaction#depositItemsInTopInventory(InventoryView)
InventoryTransaction#withdraw(InventoryView)
TabCompleter
,UserStockHolderOperator
- command モジュールからの移動
Craft
RecipeImportEvent
BoxCraftEvent
Improvements
- UserStockHolder の読み込み/保存システムの改善
Updates
Dependencies
- Gradle 7.3.3
- shadow 7.1.2
- TranslationLoader 2.0.2
- ConfigAPI 4.6.0
CI
- actions/setup-java 2.5.0
- actions/upload-artifact 2.3.0
Version 4.2.1
Updates
- 1.18 での動作確認
- カテゴリーのデフォルト設定ファイル (
categories.yml
) に 1.18 の新アイテムを追加