Commit Graph
2472 Commits
Author SHA1 Message Date
altrisi b0c94bcebe Remove unused CarpetServer.rand field
Resolves #1429.
2022-06-27 14:11:20 +02:00
altrisi 41991b0346 Improve error message when commands fail to be added and make commands using the new system check for masking (#1404)
* Improve error message when command already exists

* Add app's name to the message

* Add app name to any command load failure and fix commands from new system masking existing ones

* Fix duplicated app name in an error

* Update to recent snapshot changes
2022-06-27 14:09:03 +02:00
Fx Morin 286dbead14 Logger Improvements (#1399)
* Null checks & using getOptions

* Removed useless variable, and made HashMap's final

* This list & Map should not be modified.
Plus small changes

* Small things

* Fix #1398

* Apply suggestions from code review

* Remove Dead call

* Handle options being null

* Remove redundant field explainers

Those were there for when they were intermediary fields, they now have a proper name
2022-06-27 14:04:11 +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
gnembon 5e5815c66f 1.19 2022-06-07 17:37:35 +02:00
Dainternetdude f0fbe32993 spelling 2022-06-01 22:19:54 +02:00
Space Walker 7de976a0e2 fix #1454 2022-06-01 22:03:33 +02:00
gnembon 40af4f2200 1.4.78 for 1.19-pre5 2022-06-01 21:58:32 +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
gnembon fc54a8778a 1.4.77 2022-05-23 23:07:33 +02:00
gnembon 3a9e3b38dd 1.19-pre2 2022-05-23 23:06:27 +02:00
altrisi 08a65902f5 Remove updateSuppressionCrashFix and related logger (#1445) 2022-05-20 20:10:32 +02:00
gnembon b0a2f2c9f2 1.4.76 2022-05-18 21:10:15 +02:00
gnembon 2af763d029 1.19-pre1 2022-05-18 21:08:32 +02:00
altrisi 668f309f23 Change missed usage of deprecated methods from #1383 2022-05-17 21:55:22 +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
altrisi a60bc386cb Refactor Module into a single record type and fix system globals (#1383) 2022-05-17 20:11:49 +02:00
gnembon d681cb4c54 1.4.75 2022-05-13 11:28:01 +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 e5a3cdf929 1.4.74 2022-05-04 21:35:15 +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
altrisi 4662a86121 Delete unused BiomeArrayInterface 2022-04-29 20:16:03 +02:00
gnembon c2c127b958 1.4.73 2022-04-27 20:17:56 +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
altrisi 6111dece61 Ease concrete restrictions on Annotated Scarpet API and make instantiating lazy
Prevents instantiating classes with all annotated methods static, making it also more flexible in that you can put annotated functions near to other API that may be initialized
2022-04-24 13:40:09 +02:00
altrisi aafb7406fc Refactor BlockRotator (#1362)
- Removes the unused accurate block placement protocol that has been dead there for ages
- Removes the various rotate clockwise methods in favour of Direction's, that did exactly the same

No behaviour changes
2022-04-24 13:30:55 +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 d03900ac81 1.4.72 2022-04-21 00:30:35 +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
altrisi 8c2ded4c92 Simplify mod initializers and prevent extensions from mixing into Carpet just to register themselves (#1396) 2022-04-20 13:50:44 +02:00
altrisi 83b0fb1f4d Show local type in exception hover tooltips (#1397) 2022-04-20 13:29:31 +02:00
altrisi 80a5342776 Make scarpet internal and control flow exceptions stackless (#1392) 2022-04-20 13:27:25 +02:00
altrisi 76861479e0 Add support for formatted names in create_marker (#1413) 2022-04-20 13:01:58 +02:00
gnembon 0234605db0 1.4.71 2022-04-13 21:11:21 +02:00
gnembon e5af397e22 22w15a 2022-04-13 21:10:24 +02:00
altrisi f590e9d109 Fix latest commit 2022-04-11 12:59:51 +02:00
altrisi 96bb1072c4 Remove chest boat from living entities
Fixes #1405.
2022-04-11 12:51:55 +02:00
gnembon a1a41f91a9 1.4.70 2022-04-06 22:16:47 +02:00
gnembon 812d361af2 22w14a 2022-04-06 22:16:05 +02:00
BisUmTo fca98c7b37 Fixed execution offset in screens callback context (#1353)
Wrong origin in screen callbacks
2022-04-04 12:34:48 +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 ea9ea3f279 Merge branch 'master' into future
# Conflicts:
#	gradle.properties
2022-03-31 23:11:36 +02:00
gnembon bee280f696 1.4.69 2022-03-31 23:06:35 +02:00
gnembon ef3e71b9b6 22w13a 2022-03-31 20:23:49 +02:00