Commit Graph
245 Commits
Author SHA1 Message Date
gnembon 07033af7dd 23w17a 2023-04-26 22:58:59 +02:00
gnembon d68c252180 23w16a 2023-04-20 22:13:32 +02:00
altrisi 51f213fa15 Cleanup counter command (#1695)
- Import `Commands.literal`
- Use more readable syntax for Brigadier command
- Use `DyeColor` directly instead of toString -> fromString everywhere
  - Also updates `WoolTool` to use the new `HopperCounter` getter that supports it
- Split `resetCounter` in two, one for single and one for all

Also: HopperCounter now uses `.overworld()` and its `//OW` comments are removed
2023-04-08 20:14:26 +02:00
altrisi 8cd60db5e4 Random cleanups to users of Level.OVERWORLD and reduce minecraft_server usage (#1697)
- Use `overworld()` instead of `getLevel(Level.OVERWORLD)` when convenient
- Remove now unnecessary `// OW` comments, from when it had no mappings
- Make spawn chunk size and light batches not depend on global server instance
- Merge all spawn chunk size logic into SpawnChunks instead of methods in the validator
- Remove unneeded `withWorld(OVERWORLD)` with just-created server `CommandSource`s
- Use enhanced for in light batch application
2023-04-08 20:01:30 +02:00
gnembon 1751f103f9 23w14a 2023-04-05 20:12:21 +02:00
altrisi 50c22b6fe2 Log exceptions in notifyPlayersCommandsChanged
I want to remove this try-catch if possible, but don't know why it's
triggered
2023-04-03 21:47:30 +02:00
altrisi 3ae913c3e6 Use enhanced switch in CommandHelper 2023-04-03 21:42:44 +02:00
gnembon 4171f9b784 23w13a 2023-03-29 18:44:12 +02:00
gnembon 2ff1f4fb71 refactored nonscarpet references yeet 2023-02-11 01:33:23 +01:00
gnembon 75d94b0570 cleanup of scarpet dependencies 2023-02-08 21:13:14 +01:00
gnembon bd5dfdbf9f refactor limit access to built-in registries 2023-01-18 04:07:55 +01:00
gnembon f7d9f662fd yeet fabric, not needed, 1.19.3-pre1 2022-11-22 18:23:31 +01:00
gnembon cda6994cae 45a great reg split 2022-11-10 20:51:10 +01:00
altrisi c51f59c799 Check writable in CarpetRulePrinter
By using joptsimple's own converter
2022-10-30 17:40:55 +01:00
altrisi ce69c7dfbe Fix rule printer but better 2022-09-17 13:39:50 +02:00
altrisi df240159ff Merge a few put(get()+n) into fastutil's addTo to remove hash operations 2022-08-28 18:27:47 +02:00
altrisi 4db1dd8f87 Implement a command line, configurable rule printer (#1357)
* Implement a command line, configurable rule printer

* Update publish action to rule printer

* Bump loom and lqf versions
2022-08-09 20:44:35 +02:00
altrisi 1734930f7e Remove some unused code (#1521) 2022-08-09 16:21:01 +02:00
altrisi da06e30c3b Minor SpawnReporter cleanup (#1517)
Mostly removes unused methods
2022-07-29 13:12:26 +02:00
altrisi 8f7e45387e Resolve raw type warnings (#1516)
Also very small optimization to hopper counters and removal of redundant casts in `PerimeterDiagnostics`
2022-07-29 13:12:09 +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
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
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 aaf8e7e803 22w17a 2022-04-27 19:51:37 +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 812d361af2 22w14a 2022-04-06 22:16:05 +02:00
gnembon ab07a6807a 22w12a 2022-03-24 21:48:29 +01:00
gnembon 302a7b4817 fixes for 22w11a 2022-03-17 20:21:55 +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 bb7a64b629 fix mobs not spawning in structures 2022-02-22 01:04:09 +01:00
altrisi b1c934da28 Fix a few IDE warnings (#1345) 2022-02-20 19:16:12 +01:00
gnembon 212814f46d 22w06a 2022-02-10 03:15:53 +01:00
altrisi 06af9ce8b1 Migrate the Carpet codebase to Mojang Mappings 2022-01-24 20:33:16 +01:00
gnembon 9f5ac8f52b Merge branch 'master' into future 2022-01-13 01:58:34 +01:00
gnembon 35d095c92f added missing sounds, colors and materials. fixes #1228 2022-01-13 01:58:12 +01:00
gnembon 529a5b358d Merge branch 'master' into future
# Conflicts:
#	gradle.properties
#	src/main/java/carpet/script/annotation/AnnotationParser.java
#	src/main/java/carpet/script/utils/BiomeInfo.java
#	src/main/resources/fabric.mod.json
2022-01-11 23:44:52 +01:00
altrisi 763abe68c9 Support more actions in Messenger (and therefore format()) (#1242)
* Support more actions in Messenger (and therefore `format()`)

* Add the new actions to docs

* New `format()` docs fixes
2022-01-08 23:16:06 +01:00
gnembon 5a55666f94 Merge branch 'master' into future 2021-12-11 22:30:54 +01:00
gnembon 5dca846363 fixes ranges of perimeterinfo. fixes #1207 2021-12-11 22:30:42 +01:00
gnembon 9750dd9e78 Merge branch 'master' into future
# Conflicts:
#	src/main/java/carpet/fakes/ClientSettingsC2SPacketInterface.java
#	src/main/java/carpet/mixins/ClientSettingsC2SPacket_scarpetMixin.java
#	src/main/java/carpet/mixins/ServerPlayerEntity_scarpetEventMixin.java
2021-11-27 18:55:05 +01:00
altrisi d8c10c6e4a Complete removal of /info entity, it's correspondent carpet and two small changes (#1047)
* Remove no longer needed language packet mixin

* Make StringArgument properly return a StringArgument supplier, so `string` isn't `term`

Fixes gnembon/fabric-carpet#1044

* Complete removal of `/info entity` and it's correspondent carpet

Resolves gnembon/fabric-carpet#1033

* Remove yet another no longer needed mixin
2021-11-27 17:43:39 +01:00
gnembon 6a03675b4f Merge branch 'master' into future 2021-10-12 23:24:41 -03:00
altrisi 7486670918 Report stack traces through the logger (#1050) 2021-10-11 03:37:30 -03:00
gnembon e849cdf6c1 21w38a 2021-09-24 09:29:13 -03:00
gnembon 77aa52dc0e 1.18 exp 3. Changes to custom mobcap. 2021-08-11 17:04:56 -03:00
gnembon 92063fa891 Handles rogue spawn reports with an error message. Fixes #1052 2021-08-09 00:36:09 -03:00
altrisi 7fb5e47da5 Use newer Java features in places where it makes sense and more (#1009) 2021-08-03 07:32:40 -03:00