Commit Graph
336 Commits
Author SHA1 Message Date
replaceitem 24b9c386ec [Scarpet] Added ability to cancel events (#1497)
* Added ability to cancel events

* Made more events cancellable

* Added event_priority to __config

* Check for string values for performance

* Made player_finishes_using_item cancellable

* Made player_chooses_recipe cancellable

* Made player_swaps_hands cancellable

* Made player_message cancellable

* Added __on_player_placing_block (#1498)

* Added event to docs, keywords, event_test

* Added docs for event cancellation
2022-10-15 13:30:53 +02:00
gnembon 4bb4b557e5 note on 'variant' being experimental 2022-10-15 12:56:06 +02:00
gnembon c6b1f53b44 shapes 'facing' now defaults to player and player is correctly rendered facing player face, not camera plane. 2022-10-15 12:49:18 +02:00
gnembon 36aff8f9d3 cleanup and tilt-lean fixes for new shapes 2022-09-12 02:08:43 +02:00
ch-yx 179f5a6006 adding a shape that can display a item or a block (#1365)
added 'polygon', 'item' and 'block' to scarpet rendered shapes
2022-09-12 00:38:52 +02:00
ch-yx 40bc200615 add "returns null for all other entities" 2022-08-28 18:59:11 +02:00
ch-yx 4eca2e90d0 remove a space 2022-08-28 18:59:11 +02:00
ch-yx b456d4be50 Update Auxiliary.md 2022-08-28 18:59:11 +02:00
ch-yx 10249f381d adding more details in doc 2022-08-28 18:59:11 +02:00
ch-yx bf64386cfb Update Auxiliary.md 2022-08-28 18:59:11 +02:00
ch-yxandaltrisi ceeaffcaad Update docs/scarpet/api/Entities.md
Co-authored-by: altrisi <altrisi.trillosierra@gmail.com>
2022-08-28 18:59:11 +02:00
ch-yxandaltrisi 099d11d039 Update docs/scarpet/api/Entities.md
Co-authored-by: altrisi <altrisi.trillosierra@gmail.com>
2022-08-28 18:59:11 +02:00
ch-yxandaltrisi 032e0e59f9 Update docs/scarpet/api/Entities.md
Co-authored-by: altrisi <altrisi.trillosierra@gmail.com>
2022-08-28 18:59:11 +02:00
ch-yxandaltrisi cee61391c0 Update docs/scarpet/api/Entities.md
Co-authored-by: altrisi <altrisi.trillosierra@gmail.com>
2022-08-28 18:59:11 +02:00
ch-yx d3e6b7c233 more details 2022-08-28 18:59:11 +02:00
ch-yx 3f91c3b5cd rename it to item_display_name 2022-08-28 18:59:11 +02:00
ch-yx 6466bf3f5b Update Entities.md 2022-08-28 18:59:11 +02:00
ch-yx cfbc7f0409 Update Auxiliary.md 2022-08-28 18:59:11 +02:00
ch-yxandGhoulboy 344c6954e1 Update docs/scarpet/api/BlocksAndWorldAccess.md
Co-authored-by: Ghoulboy <ghoulboy27@gmail.com>
2022-08-28 18:59:11 +02:00
ch-yx 5e5ce6f7d3 is that ok now? 2022-08-28 18:59:11 +02:00
ch-yx 247835386e add document for item_display_name 2022-08-28 18:59:11 +02:00
ch-yx d1cfe79fdd Update Entities.md 2022-08-28 18:59:11 +02:00
ch-yx abe9cf825c rename to effective_light 2022-08-28 18:59:11 +02:00
ch-yx 1d8903edf0 add doc 2022-08-28 18:59:11 +02:00
Luca Bertozzi 8c7dfa133e Added __on_chunk_unloaded scarpet event (#1451)
* Fixes #1403

* Use concrete type
2022-05-27 20:24:25 +02:00
gnembon 842370f68d Merge branch 'master' into future
# Conflicts:
#	src/main/java/carpet/script/api/Auxiliary.java
2022-03-30 07:49:07 +02:00
gnembon c33c53c8c2 enable_hidden_dimensions is ded :( 2022-03-30 07:44:37 +02:00
gnembon 193cf3777f fixes for 22w11a 2022-03-17 23:57:42 +01:00
gnembon c01ad9ce9d 1.18.2-pre 2022-02-20 01:50:46 +01:00
gnembon aaea11d82d removed ability to query for entire system_info in one go. 2022-02-16 00:25:35 +01:00
replaceitemandgnembon bf00051482 Added __on_player_message event (#1312)
* Added __on_player_sends_message event

* Docs for chat message event

* Rename to __on_player_message

* Editor support

* Added event to event_test app

* Update docs/scarpet/api/Events.md

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
2022-02-16 00:07:53 +01:00
carseatheadrest 4da992dd22 Added missing EntityValue documentation (#1318) 2022-02-16 00:04:36 +01:00
gnembon bb05186f22 docs 2022-02-01 01:56:30 +01:00
intricateandgnembon 0ac214963f Add on_move Entity Event for Scarpet (#1096)
* Add ON_MOVE Entity Event for Scarpet

* Update src/main/java/carpet/script/EntityEventsGroup.java

* Add on_move to Entities.md

* Switch to ValueConversions

* Update docs/scarpet/api/Entities.md

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>

* Fix #1126

* undo last commit cause it was on the wrong branch

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
2022-01-19 21:36:16 +01:00
ch-yx 1485e8978b Update create_datapack (#1227) 2022-01-13 00:00:09 +01:00
replaceitemandreplaceitem 3f6ddc43e5 Added screen handler system (#888)
* Added screen handler value

* Added screen handler constructor and function to show to player

* Made inventory_* functions work with screen handlers

* Event callbacks and some refactoring

* Exception if screen has no inventory

* Fixed NPE

* Close screen when null

* Added screen_property

* UNKNOWN_SCREEN throwable

* Fix error when not specifying click callback

* Access to non-container screen handler slots via the inventory_* functions

* Change lectern page

* Added button event

* Added 'close' event and refactoring callback

* Beacon and Brewing screens

* Cartography table screen

* Crafting screen

* Enchantment screen

* Grindstone

* Loom

* Merchant

* Shulkerbox

* Smithing table

* Stonecutter

* Use strings as screen type instead of ScreenHandlerType

* Remove support for multiple players

* Combining create_screen and open_screen and refactoring

* Allow modifying cursor stack

* Cleanup

* Docs

* Added multiple screen examples

* Rename to screen

* Added smoker and blast furnace

* Serialize screen content

* Store host name instead of context

* Add button value special cases to docs

* Spelling and grammar fixes by @James103

* Optimize screen inventory access

* Use -1 for slot click outside the screen

* As boolean, ScreenValue equals isOpen

* Revert "Use -1 for slot click outside the screen"

This reverts commit 68c113e71bb653191cedf4cc356ab7705838dc25.

* Rework of callback function

* Improve screen functionality with drop_item

* Editor keywords

* Only check syncId

* slot_update event callback

* Screem typo

* Mistake

* toTag returns "null" NBT for  closed screen

* Use null for slot index of -999

Co-authored-by: replaceitem <replaceitem.mc@gmail.com>
2022-01-12 22:52:38 +01:00
Random J Farmer 1a96533818 updated documentation for 1.18 (#1269) 2022-01-11 23:31:21 +01:00
Ghoulboy f697924d30 Used wrong method to query world border size (#1236) 2022-01-11 23:29:03 +01:00
CommandLeo 130c8a8322 Docs fix (#1250) 2022-01-08 23:21:02 +01:00
altrisi 763abe68c9 Support more actions in Messenger (and therefore format()) (#1242)
* Support more actions in Messenger (and therefore `format()`)

* Add the new actions to docs

* New `format()` docs fixes
2022-01-08 23:16:06 +01:00
altrisi de305f4284 Allow apps to retrieve information about the source (#1229)
* Give information about the sources

* Document source related system_info properties
2022-01-08 21:08:26 +01:00
Crec0 eed64f224e Minor Docs update (#1214) 2022-01-08 20:41:54 +01:00
gnembon 1cefef82f7 no-bs world height info 2021-11-30 03:28:44 +01:00
Ghoulboyandgnembon 6c776b6131 Adding min_y, max_y and world_border_info to system_info (#1168)
* Adding min_y and max_y

* Making it return all dimensions

* Adding world_border_info as well, cos y not

* Update docs/scarpet/api/Auxiliary.md

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
2021-11-30 03:03:15 +01:00
gnembon 16e1b7952e sample_noise keywords and docs 2021-11-30 02:59:08 +01:00
gnembon 4af1d66450 docs 2021-11-28 23:33:06 +01:00
gnembon 547ed9b6b9 fixes #1178 Yo 2021-11-27 19:36:44 +01:00
gnembon 0f57bf0bc6 fixes #1187 Ye 2021-11-27 19:09:35 +01:00
gnembon 4d9c5eb391 docs 2021-11-25 21:45:53 +01:00
Sean Ferney 6321e1e9b6 Outdated comment, unable to modify NBT (#1183)
You can now modify NBT data with `modify nbt_merge` and `modify nbt`
2021-11-25 21:44:32 +01:00