Commit Graph
2349 Commits
Author SHA1 Message Date
gnembon f21897fab1 added custom context to be used in optimization evaluations that should expose all programmers issues, while allowing reporting errors to the error snooping entity. Fixes #875 2021-05-22 01:21:20 -03:00
gnembon deb4f78347 rotfl fixes #874 2021-05-21 23:08:33 -03:00
gnembon dbae5813f0 added framework for auto resource fetching for the apps 2021-05-21 22:31:02 -03:00
gnembon 79fb489ab7 renames 2021-05-21 14:13:50 -03:00
gnembon 22abf2fab6 minor docs 2021-05-21 04:40:32 -03:00
altrisi cc7a9c01be Annotated Scarpet (#772)
* Progress by now.

* Output conversions plus a few extra random things

* More progress, mostly list converting and a way to get converters

* Apply ValueConverters, refactor valueconverter getter to

accept types with annotations and generics, made listconverter pass
those params and annotations recursively. And probably more things.

* Some extra docs, the 100% most important thing

* Added MapConverter, strict Strings and Texts, some docs additions

and commented out heuristics

* Rework StrictParam to use SimpleTypeConverters and be saved in a map

* Minor changes and docs & added non-fully-functional context "converter"

* Added support for variable value count converters, multi-value eaters &

0 value eaters (Context).

* Docs update, enable Context converter, fix minor TODOs

* Move (most) parameter annotations into a single class,

remove deprecated ValueCaster#cast, update some docs.

* Small refactor of Param.Strict registering, added boolean to it

* Added PairConverter, moved Context and LV ValueConverters to Params

* Document public methods of AnnotationParser

* Add a lot more docs, make it ready for the first preview PR

* Move ValueConverter population outside of makeFunction,

check lv size for > max arguments, minor doc updates and workaround for
Mercury#28 until released

* Added optional parameters (declared using Java's Optional),

made evalAndConvert check for the presence of the next iteration,
updated test class

* Generalize Value OutputConverter

* ListConverter and MapConverter now follow ValueConverter contract of

incorrect value handling, returning a complete null for an incorrect
value anywhere. Also small fix to OptionalConverter and docs.
Getting ready for checking null in AnnotationParser!

* Change reflection's #invoke to a MethodHandle to boost speed by a lot

Commented

* Dedupe code, update and remove outdated todos, add 2 new ValueCasters

* Merge lambdas in display_title2 test function to be more accurate

* Check nulls somehow, I guess

* Move base function logic into a class to stop

passing hundreds of parameters into static functions and therefore simplify it

* Reduce visibility and fix a bug with PairConverter

* Hide Context provider in usage report

* Add support for primitive varargs

* Added TheLazyT converter

* Drop #getPrefixedTypeName and use 'something' as name of values

* Use value again because of varargs, document that

* Remove a completed TODO

* Remove old disabled heuristic value type name getter

* Fix TheLazyT

* Preparing locators before touching current Carpet infrastructure

* Add notes about non-implementedness of remaining locators

* Added APIs to register custom ValueConverters

* Mention new APIs in javadocs

* Adapt to new Carpet changes and deprecated non-implemented annotations

* Update example function for display_title()

* Better implementation for player_list example

* Fix example error message

* FunctionArgument no longer has generics

* Modernize Text converters

* OutputConverter is final, plus other small changes

* Few non-behavioural changes

* Rename LazyFunction to ScarpetFunction

* Drop LazyValue in parameters, not in return

Updating docs was a nightmare

* CARPET CHANGE - Make Fluff.AbstractLazyFunction.unpackArgs call unpackLazy (was duped)

* Make errors more like current Scarpet errors

* Allow customizing ContextType when evaluating arguments

* Add a few missing docs, comment out outdated ValueCaster doc

It's been a while, wow

* Fix for new Carpet signature :irritatered:

Please don't break API methods! Extensions may be using them, and they
will just crash the game or behave in unexpected ways else!

* Format all code to Carpet's. Powered by Eclipse

Reviewed to be sure it's ok. No functional changes, except from a small correction

* Always use full name for Context.Type

* Add parsing for all current Scarpet api and language classes

And remove test functions

* Allow void return type

* Fix no param methods

Whoops!

* Remove outdated comment and fix small javadoc linting problem

* Drop Param.TheLazyT in favour of just Context.Type type

And small performance improvement to varargs varargs since fastutil's toArray is crap

* Quote functions in error messages

* Make SimpleTypeConverter independent of ValueCaster

'Real world' usage demonstrated it can be annoying else, mostly for wrapper only values where you just want the wrapped object
2021-05-21 01:33:00 -03:00
gnembon 7fd49e0f04 fix client methods in biome, fixes #870 2021-05-21 04:22:18 -03:00
gnembon 4466c77780 small refactor, customizable appstore, minimize app calls. 2021-05-21 03:50:38 -03:00
gnembon 866f1f1497 moved downloader 2021-05-19 20:46:19 -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 f56b22be6a 1.4.37 2021-05-19 18:19:06 -03:00
gnembon edc90133b2 fix run position, fixes #866 2021-05-18 21:18:53 -03:00
gnembon 482170e49d Merge branch 'master' of https://github.com/gnembon/fabric-carpet 2021-05-18 01:09:18 -03:00
gnembon f32b8e4050 semicolon fixes #863 2021-05-18 01:06:55 -03:00
gnembon 7380580a3e fixes #864 2021-05-17 22:20:32 -03:00
Ghoulboyandgnembon 7536edc2b9 Adding Javadocs to CounterCommand.java and relevant files (#838)
* adding class javadoc

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
2021-05-17 19:32:57 -03:00
altrisi be0635de82 Use primitive specific Predicates instead of Function (#859) 2021-05-15 18:54:16 -03:00
altrisi 69e9e9b0bb Remove the number_classes set in favour of ClassUtils (#860) 2021-05-15 18:53:50 -03:00
gnembon fd492f334c moved exception handler, fixes #861 2021-05-14 03:34:19 -03:00
gnembon 5da6c2837a fix version 2021-05-13 10:57:12 -03:00
gnembon ac64f82a4d Merge branch 'master' of https://github.com/gnembon/fabric-carpet 2021-05-13 01:51:18 -03:00
gnembon a522e2ae37 fixed changed behaviour under java 16 2021-05-13 01:51:01 -03:00
gnembon 495a22ca0c fix concurrentModifications from Java 16 2021-05-13 01:50:29 -03:00
github-actions[bot] 08c653a5ed Merge docs for 'Carpet Mod 1.4.36 for Minecraft 1.16.5 and Minecraft 21w19a' 2021-05-12 23:44:35 +00:00
gnembon 15bba80cb5 uncomment (#857)
* uncomment

* copy from altrisi's
2021-05-12 20:08:06 -03:00
gnembon f5db84345e update toolchain to Java 16 2021-05-12 22:48:44 -03:00
gnembon 1b0fc3202f Merge branch 'master' of https://github.com/gnembon/fabric-carpet 2021-05-12 17:06:46 -03:00
gnembon a593f1cf14 1.4.36 2021-05-12 17:05:28 -03:00
Julian Wandhoven 05200ac944 Update Overview.md (#855) 2021-05-12 09:17:05 -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
gnembon 451b35b6c5 % is a proper modulus operator, not reminder. #fixes 842, #fixes 843 2021-05-10 00:49:04 -03:00
replaceitemandgnembon 6a06b0fb61 Modify look (#848)
* Added modify(e,'look',...

* Added modify(e,'look',...

* Not change yaw and pitch if vector length is 0 or straight up/down

* Added to docs

* Update docs/scarpet/api/Entities.md

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
2021-05-09 15:14:05 -03:00
gnembon 47f8e0d26b Merge branch 'master' of https://github.com/gnembon/fabric-carpet 2021-05-07 23:47:26 -03:00
gnembon 36b469f309 added drowning 2021-05-07 23:31:45 -03:00
gnembon 7063d542ff 1.4.35 2021-05-05 20:19:18 -03:00
github-actions[bot] 0a9729b381 Merge docs for 'Carpet Mod 1.4.35 for Minecraft 1.16.5 and Minecraft 21w18a' 2021-05-05 20:40:31 +00:00
gnembon d3aac224ff allow to spawn players when profile servers are down. 2021-05-05 08:33:47 -03:00
gnembon dfb1435e67 Merge pull request #836 from whats2000/patch-3
Update zh_tw.json
2021-05-05 01:30:13 -03:00
gnembon cf62890a3a Merge pull request #841 from replaceitem/text-bool-fix
Fixed boolean value of FormattedText being incorrect
2021-05-05 01:28:16 -03:00
gnembon 0f81be2e8e Merge pull request #844 from gnembon/expression_optimizer
Expression optimizer
2021-05-05 01:28:01 -03:00
gnembon 1633cca07a better reporting 2021-05-05 01:23:17 -03:00
gnembon 8d97ab26a9 script compile time optimizations. 2021-05-05 00:25:31 -03:00
replaceitem 659ad2408e Fixed boolean value of FormattedText being incorrect 2021-05-04 20:26:20 +02:00
whats2000 c465976609 Update zh_tw.json
small fix
2021-05-02 23:35:23 +08:00
whats2000 6eee47ec14 Update zh_tw.json
Add new translation to support the latest version
2021-05-02 23:22:44 +08:00
gnembon 06c9aea326 tracking module integrity when module composition changes 2021-04-29 02:17:02 -03:00
gnembon f8c3de21d3 1.4.34 2021-04-28 16:48:46 -03:00
github-actions[bot] eb5fd951ef Merge docs for 'Carpet Mod 1.4.34 for Minecraft 1.16.5 and Minecraft 21w17a' 2021-04-28 17:28:43 +00:00
gnembon 3b3ebee48b Merge branch 'master' of https://github.com/gnembon/fabric-carpet 2021-04-26 23:28:17 -03:00
gnembon 7da009fe5b docs on '...'. Addresses and fixes #833 2021-04-26 23:27:39 -03:00