Commit Graph
22 Commits
Author SHA1 Message Date
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
gnembon 746c8548e9 22w16b with massive Component changes 2022-04-21 00:26:39 +02:00
gnembon 302a7b4817 fixes for 22w11a 2022-03-17 20:21:55 +01:00
altrisi 06af9ce8b1 Migrate the Carpet codebase to Mojang Mappings 2022-01-24 20:33:16 +01:00
altrisi 212eb07131 Give feedback when stepping ticks (#1234) 2022-01-08 21:12:23 +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
altrisi 6d3ac93e4c Use setters and getters for frozen state, separate superHot and
don't tick regular tick events
2020-12-29 16:00:07 +01:00
altrisi 33347baaf7 Freezing Scarpet
And the client
2020-12-21 00:14:20 +01:00
altrisiandgnembon ba1071a8d1 Javadocs, cleanup, extension's client rules, built-in BundledModules generators, etc (#544)
* Add javadocs to many methods

* Added built-in ways to generate BundledModules and documented them

* Add Eclipse launch files to .gitignore and fix 11 warnings

* Remove many unused imports

* Remove some dead and unused code around app loading

* Allow extensions to have client-side rules in their SettingsManager

Also change tabs to spaces when those changed

* Remove unnecessary classloader param in BundledModule

* Change max tickwarp duration to Integer.MAX_VALUE

* Move RulePrinter into the source so it can be managed by the IDE

* Properly reset hopperCounters when changing worlds

Also change tabs to spaces again and minor tweaks to javadocs

* Run mergedocs even if Full.md was modified

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

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
2020-11-16 09:30:59 -04:00
gnembon 8a2ddcbf2a 1.4.12 2020-10-01 14:14:01 -03:00
gnembon 3167fe06f3 cleanup unused code and mixins 2020-08-18 01:54:24 -03:00
gnembon b3484fd012 fixed missing client side server references. fixes #311 2020-06-06 20:39:25 -03:00
gnembon e540f9e238 carpet client synchronizations and protocols 2020-05-28 00:06:28 -03:00
gnembon 3e76adbdaa added deep frozen state where chunk tickets will not be expiring as well, preventing chunks from unloading. Fixes #204 2020-04-14 01:28:00 -03:00
gnembon 85a34fdefa added profile command 2020-02-06 09:33:46 -04:00
gnembon 55065a38a6 moved CarpetSettings up from settings manager, should be easier to find later. 2019-12-10 23:08:40 -04:00
gnembon b52b5c335f ops options for commands 2019-12-01 01:04:58 -04:00
gnembon 8a01ebea41 profiler remembers requestee, and better rounding in scarpet 2019-08-23 06:04:13 +02:00
gnembon 734dc95dab settings ported to the annotation based system 2019-06-11 23:01:09 -03:00
gnembon f3da8b2576 updated to 1.14.3 pre 2, still issues with fabric spawn tracking mappings 2019-06-07 11:51:11 -03:00
gnembon 03b78b52c1 tick complete 2019-05-17 23:58:33 -03:00
gnembon ecced620a4 moved a bunch of stuff 2019-05-12 01:48:19 -03:00