Commit Graph
313 Commits
Author SHA1 Message Date
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
Gnotteroandgnembon 775e923252 Added player abilities actions to the entity API (#1160)
* Added 'mayfly' and 'fly_speed' actions to the modify() function

* Added 'mayfly' and 'fly_speed' actions to the modify() function

* Added a query and a modify action for each of the abilities. Added the  modify action. Modified the docs to include all the new actions and queries

* Fixed an error with mod version

* Saving changes

* Modified the docs and fix an issue with float type variables

* Modified the docs and fixed an issue with float type variables

* Update src/main/java/carpet/script/value/EntityValue.java

* Update gradle.properties

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
2021-11-22 22:46:02 +01:00
altrisi d034b8945a Move some functions into system_info (#1084)
* Move some functions into `system_info`

* Add docs for new `system_info()` properties
2021-10-05 21:21:29 -03:00
gnembon 77ecc6975d note on biome API changes for 1.18 2021-09-18 12:36:55 -03:00
gnembon 0e9df3701f rework for events and other stored functions. Fixes #984 2021-07-22 22:22:38 -03:00
gnembon 62f2b97303 marked 1.18 inaccessible options. 2021-07-14 01:09:51 -03:00
gnembon 4f77327b6c Merge branch 'master' into 1.17
# Conflicts:
#	src/main/java/carpet/script/utils/AppStoreManager.java
2021-06-30 13:33:10 -03:00
altrisi 97e69d347e Change how resource type works, allow proper app and library installation (#956)
* Change how app store types work, allow proper app and library installation

* Add node for resources in dependencies and docs

* Fix NPE without `type`

* Fix docs trying to change location of app type resource

* Separate libraries and apps and add trash for them

* Update docs

* Create trash directory if it doesn't exist
2021-06-30 12:42:24 -03:00
altrisi d92b412c0a Document entities argument type (#968) 2021-06-30 12:30:55 -03:00
gnembon 092766b820 Merge branch 'master' into 1.17 2021-06-26 23:20:30 -03:00
gnembon b1b7956ea9 added chunk_loaded event and fixed handling these events on 1.17 2021-06-26 23:20:13 -03:00
gnembon 2127c3ac8e Merge branch 'master' into 1.17
# Conflicts:
#	src/main/java/carpet/mixins/ServerWorld_scarpetMixin.java
#	src/main/java/carpet/script/CarpetEventServer.java
2021-06-25 20:12:45 -03:00
gnembon 448fde1f36 changes to entity load handler keeping it backwards compatible 2021-06-25 20:09:15 -03:00
gnembon 85d60b283f more flexible dealing with custom argument types, allowing _ in custom types. Fixes #936 2021-06-23 13:36:14 -03:00
gnembon 8314072f9d Merge branch 'master' into 1.17 2021-06-23 13:37:29 -03:00
gnembon 979032688d docs 2021-06-23 04:26:13 -03:00
gnembon e2dfbc5bdd Merge branch 'master' into 1.17 2021-05-27 01:56:13 -03:00
gnembon 328ded0537 added /script remove app command 2021-05-27 01:54:26 -03:00
gnembon cab37358ed Merge branch 'master' into 1.17 2021-05-25 00:41:29 -03:00
gnembon db9039c02a added app resources for apps from appstores 2021-05-25 00:41:06 -03:00
gnembon 84dd972758 Merge branch 'master' into 1.17 2021-05-21 04:42:21 -03:00
Ghoulboy 5f16ffd933 Adding /script download (#826)
This reverts commit e98adb77a52d1e274ec320e0cafab34b24c1c738.

* First attempt at creating download system...

* Last try, I had uncommitted changes which I forgot to add.

If it fails now i swear imma delete my fork of fabric carpet.

* OK, this is the last chance. I have checked and double checked, this should not fail.

Todo make them more detailed, Im not the best person to do that tbh...

* Towards a suggestion builder

(Also committing stuff in ScriptDownloader incase it crashes)

* Finished first theoretically functional draft of suggestion builder

* improving suggestion building with actual github api

* Collapsing identical error messages

* Got suggestions to work!

Now gotta get the actual file to save to disk properly

* replacing whitespace with url whitespace to make it read form 'creativ building tools' etc

* Successfully downloaded script into folder location!

* only clients can access global scripts folder, so don't want to cause error message

* Compacting code and updating docs

* Fixed getting folders from file names
2021-05-19 17:30:39 -03:00
gnembon 4a6f21c18b Merge branch 'master' into 1.17 2021-05-12 12:13:15 -03:00
replaceitemandgnembon a343c5d9f2 Switch out l() syntax to [] in docs (#851)
* Switch out l() syntax to [] in docs

* Using map syntactic sugar as well.

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
2021-05-10 22:40:49 -03:00