Add loot table preview (#293)

* Initial loot table preview + item display counts

* Add loot functions without NBT

* Add loot conditions

* Render item tooltips with name and lore components

* Remove debug text component

* Disable advanced tooltips in the tree

* Minor style fixes

* Add item slot overlay and tweak tooltip offset

* Fix some items not rendering

* Translate item names and text components

* Translate params + more functions and tooltips

* Add durability bar

* Configurable stack mixing

* Correct tooltip background and border

* Add enchanting

* Enchantment glint

* Configurable luck, daytime and weather

* Improve tooltip spacing

* More tooltip spacing improvements

* Remove debug logging
This commit is contained in:
Misode
2022-10-13 02:05:33 +02:00
committed by GitHub
parent 86687ea6b9
commit ac259bb83e
24 changed files with 1630 additions and 56 deletions

14
package-lock.json generated
View File

@@ -22,7 +22,7 @@
"brace": "^0.11.1",
"buffer": "^6.0.3",
"comment-json": "^4.1.1",
"deepslate": "^0.13.0",
"deepslate": "^0.13.2",
"deepslate-1.18": "npm:deepslate@^0.9.0-beta.9",
"deepslate-1.18.2": "npm:deepslate@^0.9.0-beta.13",
"highlight.js": "^11.5.1",
@@ -1933,9 +1933,9 @@
"dev": true
},
"node_modules/deepslate": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/deepslate/-/deepslate-0.13.0.tgz",
"integrity": "sha512-16Dh/dOc8RLtiL0aQ3/h7bHUcIer+jAfFXehavhvHquEkxncQyZDq9YGktPTm9gTD2VGTDZeuIwZWAiMYkdfqw==",
"version": "0.13.2",
"resolved": "https://registry.npmjs.org/deepslate/-/deepslate-0.13.2.tgz",
"integrity": "sha512-6pa9mgPu4A+RqYoN7AH79oKzzSNfvCJsrBKHE+AQjt20Uo33qJIRNG+2+sFHx84PAPJ3Z1CCnWWV+kBniD8E2g==",
"dependencies": {
"gl-matrix": "^3.3.0",
"md5": "^2.3.0",
@@ -6621,9 +6621,9 @@
"dev": true
},
"deepslate": {
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/deepslate/-/deepslate-0.13.0.tgz",
"integrity": "sha512-16Dh/dOc8RLtiL0aQ3/h7bHUcIer+jAfFXehavhvHquEkxncQyZDq9YGktPTm9gTD2VGTDZeuIwZWAiMYkdfqw==",
"version": "0.13.2",
"resolved": "https://registry.npmjs.org/deepslate/-/deepslate-0.13.2.tgz",
"integrity": "sha512-6pa9mgPu4A+RqYoN7AH79oKzzSNfvCJsrBKHE+AQjt20Uo33qJIRNG+2+sFHx84PAPJ3Z1CCnWWV+kBniD8E2g==",
"requires": {
"gl-matrix": "^3.3.0",
"md5": "^2.3.0",