Commit Graph
20 Commits
Author SHA1 Message Date
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
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 193cf3777f fixes for 22w11a 2022-03-17 23:57:42 +01: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
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 3105d5bb71 Events are defined statically in normal classes and added handler for extensions to add their built-ins 2020-09-08 23:47:31 -03:00
gnembon 0e21942df7 Merge branch 'master' into 1.16 2020-07-13 00:41:34 -03:00
gnembon 3140a4fe53 Callback for extensions to contribute information to HUD loggers. 2020-07-12 22:34:10 -03:00
Fallen_Breath 4b8219281b HUD logger hook for carpet extensions (#370)
* qc激活->半连接激活

* Update zh_cn.json

* ui.rule_%(rule)s_not_set_restart

* added quotation marks to rule translation display

* added extension HUD logger hook
2020-07-12 22:23:48 -03:00
gnembon 86c3b001ca Merge branch 'master' into 1.16 2020-06-20 23:44:12 -03:00
gnembon be7d7ed46e moving loading of scripts to after worlds are loaded, fixes #331 2020-06-20 23:29:50 -03:00
gnembon c5841408a6 extensions trigger for resource reload. Apps will reload upon reload 2020-06-05 23:23:47 -03:00
gnembon e7170ddef9 added translation support for extensions 2020-05-22 01:19:08 -03:00
gnembon 72a7bed11a fixed logger issues #156 and #155 2020-02-23 02:25:51 -04:00
gnembon 8b1286f8af fixed missed command registration for extension, 1.3.0, added optional version. 2019-12-10 23:01:30 -04:00
gnembon 81c23c1aa2 Merge branch 'master' of https://github.com/gnembon/fabric-carpet
# Conflicts:
#	src/main/java/carpet/CarpetServer.java
2019-07-17 22:38:26 -03:00
gnembon 17a23f14dd onclosed 2019-07-17 22:36:56 -03:00
gnembon 50d1d74579 player actions 2019-07-17 03:58:16 -03:00
gnembon 95d556a978 rule management and extensibility 2019-07-04 01:54:13 -03:00