altrisi
4496241524
Use constants for a few magic numbers in rules
2022-12-26 16:22:09 +01:00
altrisi
09155fd54c
Deduplicate and slightly improve renewableCoral, fix crash
...
Fixes #1608
2022-12-26 15:11:26 +01:00
altrisi
d05d08ba7c
Update to Gradle 7.6
2022-11-26 11:00:50 +01:00
altrisi
176b576c30
Improve empty shulker box merging a bit
...
- Prevents boxes with different nbt from stacking. Fixes #1596
- Makes stacks partially be able merge to max size when sum would be greater than it (by keeping both entities around, but lowering its count)
Pending for the future: Checking why client doesn't render stack size changes
2022-11-22 12:48:04 +01:00
altrisi
7e6405d67a
Fix a typo in Scarpet entity docs
...
Found by @lucifiel1618, closes #1594 .
2022-11-12 11:03:33 +01:00
altrisi
48c804fcaa
Don't copy (and allocate) ByteBuf when reading Carpet packets
...
Should fix #1589
2022-11-10 13:14:03 +01:00
altrisi
1466006638
Don't compute tree size and depth with debugging disabled ( #1588 )
2022-11-09 09:59:00 +01:00
altrisi
da5bccb5c5
Fix placed empty shulker boxes not stacking
...
Fixes #1587
2022-11-05 12:05:40 +01:00
altrisi
c51f59c799
Check writable in CarpetRulePrinter
...
By using joptsimple's own converter
2022-10-30 17:40:55 +01:00
altrisi
1c2b1dfa2a
Migrate from deprecated set-output in release action
...
Only missing one in `update-release-asset`, but that's an archived repo so it's a bit more difficult...
2022-10-23 14:16:58 +02:00
altrisi
ab9f7992b7
Use Java's Math constants for Scarpet math constants
2022-10-16 14:33:38 +02:00
altrisi
8e38619f61
Don't hold Context variables for the lifetime of scheduled calls
...
Fixes #1568
2022-10-15 12:34:55 +02:00
altrisi
1a6febc6c0
Tweak wiki text for strict rules
2022-10-15 11:11:28 +02:00
altrisi
635fb586c4
Allow rules to declare they only accept a set of options ( #1560 )
2022-10-12 16:13:59 +02:00
altrisi
b798d76d10
Make fillUpdates and gen checks ThreadLocals final
2022-10-12 15:44:29 +02:00
altrisi
0f82305b36
Bump action versions
2022-10-12 13:17:23 +02:00
altrisi
1fa2e515e5
Make CarpetContext's new constructor take a CarpetScriptHost
...
Many users assume it is, and all callers pass it anyway. At some point `host` access could be made a function so CC could override it and return `CarpetScriptHost` without requiring casts
2022-10-12 12:45:13 +02:00
altrisi
0c8e1d1653
Fix in (~) operator producing broken values
2022-10-10 20:36:44 +02:00
altrisi
a50a0d7328
Fix wrong line numbers by not trimming the start of expressions
...
We still trim the end because else `Tokenizer` crashes...
But trimming the end doesn't matter because there's it doesn't affect anything.
2022-10-09 13:13:37 +02:00
altrisi
3f5eac7472
Simplify ExpressionException.errorMaker
...
Why was this a lambda?
2022-10-08 14:57:32 +02:00
altrisi
db031b175b
Optimize ListValue::new(Collection) slightly for best-case scenarios ( #1565 )
2022-10-08 14:31:21 +02:00
altrisi
24385f28c2
Fix crash when scarpet rules are set permanently
...
Fixes #1562
2022-10-05 10:21:07 +02:00
altrisi
4f9bd3ab78
Simplify and standarize some conversions with ValueConversions
2022-10-02 18:49:49 +02:00
altrisi
be1cb6888a
Remove redundant null checks in string concat
2022-10-02 18:11:15 +02:00
altrisi
3247b83272
Simplify and slightly optimize EntityClassDescriptor
...
Could probably also be a record, though I'll look into that at another time
2022-10-02 15:29:34 +02:00
altrisi
b1c29efa2b
Expose origin-less constructors and methods ( #1556 )
2022-10-02 13:57:29 +02:00
altrisi
f63c6acb05
Fully remove scarpet commands when apps are unloaded ( #1452 )
...
Using new Loader 0.14+ features
2022-10-02 13:32:27 +02:00
altrisi
e9f1509a1d
Fix log spam on outdated extension SettingsManager
2022-09-28 10:57:09 +02:00
altrisi
ce69c7dfbe
Fix rule printer but better
2022-09-17 13:39:50 +02:00
altrisi
9c73b64630
Revert "Fix language fallbacks for rules not being available early"
...
This reverts commit 5a4ceb68c6 .
2022-09-17 13:39:24 +02:00
altrisi
fce4918c87
Fix handling files with uppercase letters in case-sensitive systems
2022-08-28 21:01:48 +02:00
altrisi
d273d4ffb8
Fix some resource leaks
2022-08-28 18:34:39 +02:00
altrisi
2a4d678aa7
Remove the last few File usages
...
Barring one, given I've heard in hot code `Files.exists()` is slower than toFile().exists() if in the default `FileSystem`
2022-08-28 18:34:39 +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
c6941b840f
Map from id in system_info('server_mods')
2022-08-19 07:32:46 +02:00
altrisi
7bdd1a534b
Fix typo in readme
...
Spotted by @ZeroKun265. Closes #1500
2022-08-11 12:38:00 +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
5b720cbeb5
Don't add Mod to CF release to prevent cutting game version
2022-08-01 23:21:32 +02:00
altrisi
feb0dc1efb
Remove another duplicated mixin entry
...
This time for `DistanceManager_spawnChunksMixin`
2022-07-29 14:26:00 +02:00
altrisi
f2a270b261
Remove duplicated mixin entry for ServerLevel_spawnChunksMixin
2022-07-29 13:57:32 +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
b677cd73c8
Remove old deprecated Module type and subtypes
...
They were deprecated in #1382
2022-07-25 22:35:24 +02:00
altrisi
97c4cc9c7d
Simplify threading and networking in download suggester ( #1512 )
...
* Simplify threading in download suggester
This also makes it more robust against race conditions
* Simplify network requests around app store
2022-07-25 21:59:50 +02:00
altrisi
c08d857821
Don't refresh local app store repo on world change
...
Relates to #1508 .
2022-07-23 23:56:13 +02:00
altrisi
86ac49c0ae
Fix autocomplete removing all upper-case letters in script run
2022-07-21 15:33:42 +02:00
altrisi
c2788f0f85
Allow modded structures in overlay's structure renderer ( #1504 )
2022-07-21 15:12:58 +02:00
altrisi
5a4ceb68c6
Fix language fallbacks for rules not being available early
...
Fixes #1483
2022-07-07 11:45:37 +02:00
altrisi
ee4bc332e3
Remove catchall in action pack update
...
Resolves #1446 .
2022-06-27 14:30:34 +02:00
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
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
140cb15b53
Make newline in release message using zero-width character
...
()
2022-06-01 22:37:39 +02:00
altrisi and Crec0
c10149ba55
Publish changelogs to Discord when releasing ( #1428 )
...
Co-authored-by: Crec0 <83436716+Crec0@users.noreply.github.com >
2022-05-28 13:07:08 +02:00
altrisi
d088ee477e
Set mixin compatibility level to Java 17
2022-05-27 19:44:39 +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
e4dc080657
Bump Loader requirement in fabric.mod.json too
2022-05-24 15:26:31 +02:00
altrisi
08a65902f5
Remove updateSuppressionCrashFix and related logger ( #1445 )
2022-05-20 20:10:32 +02:00
altrisi
bbe770184e
Autogenerate refmap field in mixins json and remove empty server field
...
Not explicitly specifying the refmap here also removes the log entry in dev environments where Mixin complains about missing refmap.
2022-05-17 22:06:49 +02:00
altrisi
668f309f23
Change missed usage of deprecated methods from #1383
2022-05-17 21:55:22 +02:00
altrisi
a60bc386cb
Refactor Module into a single record type and fix system globals ( #1383 )
2022-05-17 20:11:49 +02:00
altrisi
4662a86121
Delete unused BiomeArrayInterface
2022-04-29 20:16:03 +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
altrisi
c1141ddede
Fix latest commit about publishing, forgot a few blocks...
2022-04-21 18:02:22 +02:00
altrisi
91fbb44ccb
Fix publishing warn, go back to loom 0.11 as 0.12 is not yet recommended
...
See https://github.com/FabricMC/fabric-example-mod/commit/8adede095a379f0f18984d1ec2b4a46a4b5d29a7
2022-04-21 18:00:22 +02:00
altrisi
b2cb70c133
Remove cotton maven given lQF is now on the Gradle plugin portal ( #1420 )
...
* Bump QuilfFlower version
* Remove cotton maven given loom QuiltFlower is now in the Gradle plugin portal
2022-04-20 14:57:50 +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
altrisi
b6fa6579ae
Highlight scarpet files with github's highlighter for python ( #1407 )
2022-04-15 19:39:07 +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
altrisi
6ebef9b41d
Simplify cache in action workflows ( #1359 )
...
* Simplify `build-on-pr` workflow
* Simplify `devbuild` workflow
* Simplify `publish-release` action
2022-04-04 10:28:08 +02:00
altrisi
330fd6f466
Make desertShrubs check for waterlogged blocks instead of just water blocks ( #1388 )
2022-04-03 13:06:29 +02:00
altrisi
1f0c609dc0
Remove log4j as much as possible ( #1334 )
2022-02-22 01:35:56 +01:00
altrisi
69574468d9
Print a warning when an extension registers late ( #1333 )
2022-02-20 19:24:51 +01:00
altrisi
b1c934da28
Fix a few IDE warnings ( #1345 )
2022-02-20 19:16:12 +01:00
altrisi
e011f65e75
Fix unhandled exceptions when evaluating operators ( #1344 )
2022-02-20 19:15:54 +01:00
altrisi
53f456320c
Implement missing method in BlockValue.PlacementContext to fix exceptions in place_item ( #1329 )
2022-02-16 00:03:44 +01:00
altrisi
d57323e14f
Fix stay_loaded being false in apps with no config ( #1295 )
2022-01-30 19:01:21 +01:00
altrisi
50c70de7e5
Improve Annotated Scarpet runtime performance ( #1273 )
...
- Change valueConverters list to array
- Remove references to `Class.cast` and use direct casts instead
2022-01-29 23:44:50 +01: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
altrisi
1f1e454445
Remove missed imports at CarpetServer
2022-01-26 11:43:56 +01:00
altrisi
3b14f9d325
Revert missed Movable TE changes
2022-01-26 11:28:25 +01:00
altrisi
06af9ce8b1
Migrate the Carpet codebase to Mojang Mappings
2022-01-24 20:33:16 +01:00
altrisi
ec47dea267
Make fake players compatible with adventure platform lib and minor refactor around them ( #1235 )
...
* Make fake players compatible with adventure platform and minor refactor around them
Cleaner approach
* Remove no longer needed enderpearl mixin for fake players
Their ClientConnection now has an open channel so isOpen returns true
2022-01-19 21:28:36 +01:00
altrisi
8a278e46de
Fix deprecated last_tick_times ( #1265 )
2022-01-09 00:08:55 +01:00
altrisi
34e32973fa
Use Fabric's newly exposed version APIs for app requirement parsing, expand it to allow wildcards and change load stopping to be a special exception ( #1252 )
2022-01-08 23:26:14 +01:00
altrisi
212b6a792e
Remove a few no longer needed mixins ( #1243 )
2022-01-08 23:18:13 +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
altrisi
8f265f4e52
Improve performance of player() related methods ( #1240 )
2022-01-08 23:11:10 +01:00
altrisi
9fb6ec91cb
Minor improvements to scarpet annotation API ( #1239 )
2022-01-08 23:05:21 +01:00
altrisi
212eb07131
Give feedback when stepping ticks ( #1234 )
2022-01-08 21:12:23 +01:00
altrisi
f2989d51fd
Improve CarpetExpressionException error messages ( #1230 )
2022-01-08 21:09:15 +01:00
altrisi
de305f4284
Allow apps to retrieve information about the source ( #1229 )
...
* Give information about the sources
* Document source related system_info properties
2022-01-08 21:08:26 +01:00