Commit Graph
976 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
Space Walker 7de976a0e2 fix #1454 2022-06-01 22:03:33 +02:00
Luca Bertozzi 8c7dfa133e Added __on_chunk_unloaded scarpet event (#1451)
* Fixes #1403

* Use concrete type
2022-05-27 20:24:25 +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
altrisi 08a65902f5 Remove updateSuppressionCrashFix and related logger (#1445) 2022-05-20 20:10:32 +02:00
gnembon 2af763d029 1.19-pre1 2022-05-18 21:08:32 +02:00
Fx Morin 9daf72b348 Update updateSuppressionBlock for 1.19 (#1401)
* Changed Rule: `updateSuppressionBlock` to match new update suppression

* Make it easier to use

* Carpets mixin file will be the death of me

* Renamed `WorldInterface` to `LevelInterface`
Merged LevelAccessor with LevelInterface

* Fix issues with 22w14a & resolve issues

* Add `@Unique` to Level_tickMixin.java

* Naming, brackets, and description

* Return null on invalid

* Fix remaining refactoring issues
2022-05-17 21:21:46 +02:00
gnembon 1a6b1df534 22w19a 2022-05-13 11:26:47 +02:00
Ghoulboy 648ea01d15 Making deepslate generate below y=0, not y=16 (#1433)
* Fixes #1431

* Updating carpet rule description

* Making it work for cobbled deepslate
2022-05-11 19:56:25 +02:00
gnembon 217567c037 22w18a 2022-05-04 21:34:22 +02:00
Crec0 544c1a8327 Profile categories splitting and descriptions. (#1375)
* Split spawning and random ticks into separate categories

* Split blocks into tile ticks and block events

* Fix ambiguous call to tick() method
Fix package private warning

* fix: add missing sections for tile ticks and block events

* fix: wrong profiling order

* feat: add descriptions to profiler categories

* refactor: replace guava ImmutableMap with jdk Map

* fix negative time in "rest" category
2022-05-01 12:29:04 +02:00
gnembon fc8114b0c1 added 'xpFromExplosions' for xp to always drop from exploding blocks 2022-04-27 20:16:56 +02:00
gnembon aaf8e7e803 22w17a 2022-04-27 19:51:37 +02:00
Crec0 8346199281 Fix "Unable to determine descriptor" warnings by setting remap=false at some locations. (#1423)
* set remap=false for "Unable to determine descriptor" warnings

* remove suppressWarning annotation
2022-04-24 12:20:39 +02:00
gnembon 746c8548e9 22w16b with massive Component changes 2022-04-21 00:26:39 +02:00
gnembon 8101abb431 retire extreme behaviours, added moreBlueSkulls 2022-04-20 23:19:59 +02:00
gnembon e5af397e22 22w15a 2022-04-13 21:10:24 +02:00
gnembon 812d361af2 22w14a 2022-04-06 22:16:05 +02:00
Fx Morin 5e9b391ac4 Sculk sensor range (#1389)
* New Rule: `sculkSensorRange`
2022-04-03 13:17:33 +02:00
altrisi 330fd6f466 Make desertShrubs check for waterlogged blocks instead of just water blocks (#1388) 2022-04-03 13:06:29 +02:00
gnembon 842370f68d Merge branch 'master' into future
# Conflicts:
#	src/main/java/carpet/script/api/Auxiliary.java
2022-03-30 07:49:07 +02:00
gnembon c33c53c8c2 enable_hidden_dimensions is ded :( 2022-03-30 07:44:37 +02:00
gnembon ab07a6807a 22w12a 2022-03-24 21:48:29 +01:00
gnembon 7c353d40f8 Merge branch 'master' into future 2022-03-24 21:18:53 +01:00
gnembon d1f3886845 use proper registires, still issues. 2022-03-24 21:18:32 +01:00
gnembon d9c227fc43 mappings 2022-03-23 18:31:06 +01:00
gnembon cd1854a734 Merge branch 'master' into future 2022-03-23 18:21:45 +01:00
gnembon aab3de671e add reload resources after reload, still not fixing the issues 2022-03-23 18:21:15 +01:00
gnembon 302a7b4817 fixes for 22w11a 2022-03-17 20:21:55 +01:00
gnembon e9656a2ba8 fix unclosed chests, fixes #1352 2022-03-07 22:26:03 +01:00
intricate 7f4a335c97 Fix #1350 (#1351) 2022-02-28 19:45:44 +01:00
gnembon d24f711e27 1.18.2-pre3 2022-02-23 22:15:48 +01:00
gnembon 792fda70b0 api for checking existence of any structure at position 2022-02-22 22:20:28 +01:00
altrisi 1f0c609dc0 Remove log4j as much as possible (#1334) 2022-02-22 01:35:56 +01:00
gnembon b06d68186e 1.18.2-pre2 2022-02-22 01:15:43 +01:00
gnembon bb7a64b629 fix mobs not spawning in structures 2022-02-22 01:04:09 +01:00
gnembon 5a415c854a replace with explicit types 2022-02-20 19:18:49 +01:00
altrisi b1c934da28 Fix a few IDE warnings (#1345) 2022-02-20 19:16:12 +01:00
gnembon c01ad9ce9d 1.18.2-pre 2022-02-20 01:50:46 +01:00
gnembon fa1e6ce086 22w07a
- disabled "sample_noise"
2022-02-16 22:23:52 +01:00
gnembon aaea11d82d removed ability to query for entire system_info in one go. 2022-02-16 00:25:35 +01:00
replaceitemandgnembon bf00051482 Added __on_player_message event (#1312)
* Added __on_player_sends_message event

* Docs for chat message event

* Rename to __on_player_message

* Editor support

* Added event to event_test app

* Update docs/scarpet/api/Events.md

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
2022-02-16 00:07:53 +01:00
gnembon 212814f46d 22w06a 2022-02-10 03:15:53 +01:00
2No2Name 5c4e18ead1 new: creativePlayersLoadChunks carpet rule (#1314)
enabled by default: behavior like vanilla
disabled: creative players do not load chunks like spectators with gamerule spectatorsGenerateChunks false
2022-02-05 23:42:50 +01:00
2No2Name c99c92d1a7 Use vanilla cramming code when possible (#1308)
Improve compatibility with mods that manipulate how cramming works. When the carpet rule is disabled, the vanilla code can be used, allowing features from other mods to work.
2022-02-01 21:49:41 +01:00
gnembon 01367142ac remove unused mixins 2022-01-29 22:13:13 +01:00
FX - PR0CESS a547677597 Migrate Carpet Mixin names to mojang mappings 2022-01-28 16:47:18 -05:00
altrisi d2c159e59c Update to loom 0.11 to fix all issues with synthetics 2022-01-26 14:03:34 +01:00
altrisi 1af1b75dba So it turns out one mixin already was BE instead of TE
Therefore reverted it to BE again
2022-01-26 12:25:25 +01:00
altrisi a09981e807 Revert missed @Desc annotation
Those are not yet remapped on dev environment dependencies, making mods that depend on Carpet not be able to load in dev with different mappings
2022-01-26 12:16:35 +01:00