Commit Graph
267 Commits
Author SHA1 Message Date
gnembon 4c8e477f4b 1.19.4-pre1 2023-02-22 20:22:02 +01:00
gnembon 75d94b0570 cleanup of scarpet dependencies 2023-02-08 21:13:14 +01:00
gnembon c7d506675e 23w03a 2023-01-18 22:11:19 +01:00
gnembon bd5dfdbf9f refactor limit access to built-in registries 2023-01-18 04:07:55 +01:00
gnembon cda6994cae 45a great reg split 2022-11-10 20:51:10 +01:00
gnembon 9f776167e3 22w42a 2022-10-20 14:33:36 +02:00
altrisi 86ac49c0ae Fix autocomplete removing all upper-case letters in script run 2022-07-21 15:33:42 +02:00
altrisi 0a972d6c56 Settings rework and encapsulation (#1330)
* Settings rework and encapsulation

* Settings overhaul 3

Move everything in the new system to a new API package

Require rules using the new system to specify descriptions in their translation files

Implement temporary system on top of current translations to allow that to work properly

* Fix getRules fallback

* Final touches to settings refactor

* Mention that set shouldn't throw and remove comment

* Change translation keys to unify with translation PR

* Deprecate printAllRulesToLog to allow using any PrintStream

* Remove restriction of CarpetRules being Comparable

And fix overreaction in a deprecation message

* Bring back user input to rule observers

* Make Validator deprecation warning not spam on use

* Remove unneeded abstract methods in CarpetRule already inherited from CarpetRule

They literally do nothing, don't even force them to be implemented, and may be confusing as to why they're there or as if they are needed to be implemented

* Fix legacy SettingsManager field not being assigned correctly

* Finish fixing conflicts from future merge

* Actually fix remaining conflicts from future merge (missing imports)

* Import the newer rule in SettingsManager

* Refactor Validators

* Don't spam deprecation warnings on custom managers

* Get out the var

* Fix missing warning in old rule observers

* Update src/main/java/carpet/api/settings/Rule.java

* Remove `@ApiStatus.Experimental` annotations

* Fix incorrect `@deprecated` javadoc tags

By removing them given the class is deprecated anyway and else there's too much noise

* Add missing static import

* Remove TypedField and use a regular field

I liked that class tbh, but it's true that it wasn't really needed

* Move `field` assignment out of for removal

* Fix not following contract of `type()` returning boxed value

Previously handled by TypedField

* Fix few incorrect translation keys

* Remove resaving of comments when saving config files

Comments ignoring is still a thing when reading, so `locked` configs for example will keep comments

* Condense rule load messages in one

* Only print loaded settings message when at least one setting was changed

* Fix legacy validator detector

* Tweak and add more context to response to invalid values

* Fix strict validator not actually erroring on invalid input
2022-06-27 13:12:15 +02:00
altrisi f18cfb09d2 Fix more warnings and do some small optimizations (#1356)
* Fix more warnings and do some small optimizations

* Fix more warnings in ValueConversions

* Clean up some decompiler names and fix an unnecessary transformation around commands

* Use (way) more compact data structure for slot map

* Minor tweaks
Such as map directly in the collector

* I hate vanilla javac
Revert map changes in latest commit
2022-05-27 19:43:45 +02:00
gnembon 746c8548e9 22w16b with massive Component changes 2022-04-21 00:26:39 +02:00
gnembon e5af397e22 22w15a 2022-04-13 21:10:24 +02:00
gnembon ef3e71b9b6 22w13a 2022-03-31 20:23:49 +02:00
gnembon 302a7b4817 fixes for 22w11a 2022-03-17 20:21:55 +01:00
altrisi b1c934da28 Fix a few IDE warnings (#1345) 2022-02-20 19:16:12 +01:00
altrisi 06af9ce8b1 Migrate the Carpet codebase to Mojang Mappings 2022-01-24 20:33:16 +01:00
gnembon 529a5b358d Merge branch 'master' into future
# Conflicts:
#	gradle.properties
#	src/main/java/carpet/script/annotation/AnnotationParser.java
#	src/main/java/carpet/script/utils/BiomeInfo.java
#	src/main/resources/fabric.mod.json
2022-01-11 23:44:52 +01:00
50d9e51d3f Fake players can be spawned in survival mode while flying (#1264)
* Fixes #1263

* Update src/main/java/carpet/commands/PlayerCommand.java

Co-authored-by: James103 <37945304+James103@users.noreply.github.com>

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
Co-authored-by: James103 <37945304+James103@users.noreply.github.com>
2022-01-09 00:07:45 +01:00
altrisi 212eb07131 Give feedback when stepping ticks (#1234) 2022-01-08 21:12:23 +01:00
gnembon 5a55666f94 Merge branch 'master' into future 2021-12-11 22:30:54 +01:00
gnembon 5dca846363 fixes ranges of perimeterinfo. fixes #1207 2021-12-11 22:30:42 +01:00
gnembon fe6018a43b allowing event callbacks be added concurrently (e.g. registered event while handling some other events), with safe event pruning. fixes #1193 fixes #889 2021-12-06 01:02:37 +01:00
gnembon 9750dd9e78 Merge branch 'master' into future
# Conflicts:
#	src/main/java/carpet/fakes/ClientSettingsC2SPacketInterface.java
#	src/main/java/carpet/mixins/ClientSettingsC2SPacket_scarpetMixin.java
#	src/main/java/carpet/mixins/ServerPlayerEntity_scarpetEventMixin.java
2021-11-27 18:55:05 +01:00
altrisi d8c10c6e4a Complete removal of /info entity, it's correspondent carpet and two small changes (#1047)
* Remove no longer needed language packet mixin

* Make StringArgument properly return a StringArgument supplier, so `string` isn't `term`

Fixes gnembon/fabric-carpet#1044

* Complete removal of `/info entity` and it's correspondent carpet

Resolves gnembon/fabric-carpet#1033

* Remove yet another no longer needed mixin
2021-11-27 17:43:39 +01:00
gnembon ab989155ad Merge branch 'master' into future 2021-11-16 20:11:49 +01:00
Trumeet 6be2e51e0c support '/tick freeze on', '/tick freeze off' and '/tick freeze status'
The current implementation only allows toggling tick freeze, so scripting is hard. This patch enables users to specifically freeze or unfreeze other than just toggling. It also provides '/tick freeze status' command to dynamically check whether the game is frozen or not.

This patch preserves compatibility to the existing '/tick freeze' toggle command.
2021-10-21 19:38:07 -07:00
gnembon 31a6bd21df Merge branch 'master' into future 2021-10-20 23:24:52 -03:00
Jake Kandgnembon 50b3aa8832 fixed logger option bug (#1124)
* fixed logger option bug

* implemented strict option for logger args

* added back deprecated logger constructor

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
2021-10-20 23:16:05 -03:00
gnembon 6a03675b4f Merge branch 'master' into future 2021-10-12 23:24:41 -03:00
Yuuta Liang 14be166935 allow specifying game modes when spawning fake players (#1117)
This enables administrators to flexibly spawn players in game modes other than their current modes, and also allows administrators to spawn non-creative players from the console or rcon.

Usage: /player spawn bot in <gamemode>

Usage: /player spawn bot at ~ ~ ~ face 0 0 in minecraft:overworld in <gamemode>

Permissions required: OP Level 2 and above.

Note on flying: For spectator players, flying is always enabled. For other game modes, whether they are flying depends on the command caller. Therefore, it is possible to spawn a flying survival player when you are currently flying.
2021-09-30 00:01:56 -03:00
gnembon bc175509a2 21w37a 2021-09-18 08:46:27 -03:00
gnembon 70754dbfe8 Merge branch 'master' into future
# Conflicts:
#	gradle.properties
2021-09-17 03:15:30 -03:00
gnembon 9652573c10 removed time restrictions from /spawn test 2021-09-11 00:37:54 -03:00
gnembon 7e67966fd2 Merge branch 'master' into future 2021-08-25 15:19:30 -03:00
gnembon 3f9a73ac32 rename test to testcarpet. Fixes #1079 2021-08-25 03:00:26 -03:00
gnembon 49e4c41d2b fixed spawn command for some non-standard languages. Fixes #1073 2021-08-22 23:11:59 -03:00
gnembon 77aa52dc0e 1.18 exp 3. Changes to custom mobcap. 2021-08-11 17:04:56 -03:00
gnembon 9cdc297314 1.18 exp1 2021-07-14 01:07:19 -03:00
gnembon af368a159d Merge branch '1.17' 2021-07-14 00:26:22 -03:00
altrisi cca9d2ec7e Provide script download suggestions async (#986) 2021-07-11 07:43:11 -03:00
gnembon 702789cab5 1.17.1-rc-1 2021-07-02 00:28:49 -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
gnembon 9a4e15da48 mappings 2021-06-29 17:28:58 -03:00
gnembon 1a152ce20a Merge branch 'master' into 1.17 2021-06-25 23:50:39 -03:00
gnembon 8fa54c8146 stack overflow in scripts shouldn't crash the game, fixes #934 2021-06-25 23:31:46 -03:00
gnembon aa38fe4e85 update 2021-06-23 03:46:47 -03:00
gnembon 60d4887302 Merge branch 'master' into 1.17
# Conflicts:
#	src/main/java/carpet/patches/EntityPlayerMPFake.java
2021-06-23 03:38:40 -03:00
gnembon a77fc5c2f5 fake players will inherit caller flying status. Fixes #938 2021-06-23 03:38:12 -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