Commit Graph
52 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 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 f18cc1c836 more thread safe carpet globs 2021-05-25 17:24:14 -03:00
gnembon 8a2ddcbf2a 1.4.12 2020-10-01 14:14:01 -03:00
gnembon e67ec14285 mappings 2020-07-20 21:06:03 -03:00
gnembon cbeb75c8ed fix 2020-05-18 23:02:49 -03:00
gnembon dcac57a1a2 Merge branch 'master' into 1.16
# Conflicts:
#	src/main/java/carpet/mixins/ServerPlayerEntity_scarpetEventMixin.java
2020-05-18 22:18:29 -03:00
GhoulboyandGhoulboy78 a272725928 Cylinders n cuboids (#284)
Co-authored-by: Ghoulboy78 <53367549+Ghoulboy-78@users.noreply.github.com>
2020-05-18 17:24:19 -03:00
gnembon cc668fd122 1.16 bump 2020-04-28 03:00:19 -03:00
gnembon f70850889d Merge branch 'master' into 1.16 2020-04-28 02:55:48 -03:00
gnembon 714bf1ce19 refactor and fix new draw shapes 2020-04-28 02:55:26 -03:00
Nameless-123 a1b6ef204a moved everything to switch statement
It all works now
2020-04-24 16:19:35 +02:00
Nameless-123 33f6b90839 I removed the ++i statement and like crashed the world! 2020-04-24 14:12:59 +02:00
Nameless-123 6146ff8ed8 Let's see if this works 2020-04-24 13:36:41 +02:00
Nameless-123 c2e09d48e5 improved definitions
COs messing about
2020-04-24 11:12:26 +02:00
Nameless-123 890617c8ba Added error messages
cos no throw statements available
2020-04-22 11:11:20 +02:00
Nameless-123 0ee96174b8 apparently you can't input 0
otherwise its fine
2020-04-22 10:56:14 +02:00
Nameless-123 0fd6f559ac undoingn egyptian braces
seriously gnemobn, what do you have against them?
2020-04-22 10:38:07 +02:00
Nameless-123 e8c8e68333 moved it all to ints
less intuitive but code syntax is much better!
2020-04-22 10:34:42 +02:00
Ghoulboy 8d41bfa167 Undid egyptian bracing
cos gnembon hates egyptians
2020-04-21 11:15:55 +02:00
Nameless-123 fcf2a6775c Added square based pyramid
also edited command tree to make it more understandable. Cones are, after all, simply circular-based pyramids. I may or may not add octagons in the future.
2020-04-20 21:29:19 +02:00
Nameless-123 2f78068875 figured out why it wasnt showing proper affected blocks 2020-04-20 17:41:45 +02:00
Nameless-123 582f39b98d Renamed drawCone and added further steps toward pyramids 2020-04-20 17:41:21 +02:00
Nameless-123 36797a79e2 Made cone actually return affected blocks
I forgot for some reason
2020-04-20 17:22:56 +02:00
Nameless-123 94a0f55840 undid eqyptian braces
I hope you're happy now
https://github.com/gnembon/fabric-carpet/pull/232#discussion_r411022932
2020-04-20 17:20:15 +02:00
Nameless-123 e0828513fa Added pyramid literal
FIrst step towards adding other shape pyramids
2020-04-20 17:00:51 +02:00
Nameless-123 fe0ecccd4f Made drawCone WAY more fficient and code WAY less messy 2020-04-20 13:44:49 +02:00
Nameless-123 aa94ec0ebc forgot to remove testing stuff
I knew this would happen
2020-04-20 11:54:52 +02:00
Nameless-123 7783f60f64 This should be about 300% faster
I completely revamped it, only iterate over necessary blocks, and it returns correct value
2020-04-20 11:52:07 +02:00
Nameless-123 4a02bb1572 The stupid way
At least it works
2020-04-19 10:33:42 +02:00
Nameless-123 b16c0abc54 I tried this way
But it wont detect strings ofr some reason!?
2020-04-19 10:23:53 +02:00
Nameless-123 771fc8a437 added specific return statements
I dont even know why
2020-04-19 10:03:11 +02:00
Nameless-123 40dcd31bb0 added direction dtection
and command running based on that
2020-04-19 10:01:30 +02:00
Nameless-123 5aea313479 Added drawConex and drawConez methods
But they're not used yet
2020-04-19 09:36:15 +02:00
Nameless-123 25e8543a11 changing name to drawConey
So later I can add drawConex and draw Conez methods
2020-04-19 09:32:41 +02:00
Nameless-123 6d5c7ed3bd Ok, NOW it works! 2020-04-19 09:29:41 +02:00
Nameless-123 432c2a8394 Now it works
But if it is pointing up, it has a flat top
2020-04-19 09:23:47 +02:00
Nameless-123 776eec05b2 I think that fixed it
But now its conctantly crashing
2020-04-19 09:10:32 +02:00
Nameless-123 11f1ce61b7 Added cone
y not
2020-04-18 22:23:34 +02:00
Nameless-123 fe9ad4b297 I hope this works
I copy pasted above code and edited a bit to see if it works
(Btw, that is basically how I did #224)
2020-04-18 18:31:18 +02:00
Nameless-123 08e42523ba I thinks this helped? 2020-04-18 14:12:26 +02:00
Nameless-123 dab41bb0ce FIxed some stuff
Still borken asf, but im not sure how to fix
2020-04-18 14:07:24 +02:00
Nameless-123 67e3ed3229 Added draw command 2020-04-18 13:49:07 +02:00
gnembon 286913ebd7 mapping update, fixed missing target mixins 2020-03-11 00:01:59 -03:00
gnembon f7a2b8202b boi, 20w10a 2020-03-04 17:43:26 -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 cd4ae14448 1.14.4pre1 2019-07-03 16:38:12 -03:00