Commit Graph
348 Commits
Author SHA1 Message Date
gnembon 51fae27708 single argument print(foo) in player scoped apps will always target the player instance for chat message output. 2023-04-20 20:46:33 +02:00
gnembon 9a5c2d5fc3 deprecation of material(...), fix map_colour(...) 2023-04-05 20:09:52 +02:00
gnembon 41e33503fb 23w06a 2023-02-08 21:44:15 +01:00
gnembon 2133675ac7 renamed sample_density with 'sample_noise'. sample noise values directly from the local router if possible. 2023-01-30 18:02:08 +01:00
gnembon ec2b56183a renamed compute_density_function with 'sample_density' and tweaked its use 2023-01-28 19:54:41 +01:00
gnembon 659f0106e3 renamed compute_density_function with 'sample_density' and tweaked its use 2023-01-28 19:51:13 +01:00
Crec0 f2c658bf03 Add compute_density_function to replace removed `sample_noise (#1591) 2023-01-25 17:08:36 +01:00
Ghoulboy 811b330446 Adding system_info('world_min_spawning_light') (#1475) 2023-01-20 14:01:37 +01:00
altrisi 005368c3d9 Typo fixing round
Light check over all scarpet docs

Resolves #1626, resolves #1613, resolves #1597, some of the fixes are from these
2023-01-18 14:14:36 +01:00
Ghoulboy 43bb84437f Add event for commands and make __on_player_message not trigger for them (#1525)
* Restoring old behaviour of __on_player_message

Fixes #1511

* Changed to PLAYER_COMMAND

* Updated docs

* Updated event_test.sc

* Updated editor keywords

* Fixed issue
2022-12-26 15:30:50 +01:00
altrisi 7e6405d67a Fix a typo in Scarpet entity docs
Found by @lucifiel1618, closes #1594.
2022-11-12 11:03:33 +01:00
gnembon 9f776167e3 22w42a 2022-10-20 14:33:36 +02:00
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