altrisi
17c2d601d2
Remove global server reference from Player_antiCheatDisabledMixin
2023-04-08 19:48:52 +02:00
altrisi
6b9e7aff3e
Use List.of in EquipmentInventory
...
`Arrays.asList` isn't immutable, and `List.of` can be optimized slightly better, is more readable and also removes an import
2023-04-08 16:14:47 +02:00
altrisi
a3762584f3
Use for loop for hopper counter info in HUDController
2023-04-08 16:12:38 +02:00
altrisi
fdb0936df7
Remove deprecated log4j dependent methods in c.s.SettingsManager
...
And another one that is normally a bug to use, and a field that is
broken.
Enables `runtimeOnlyLog4j` in loom
2023-04-04 15:57:59 +02:00
altrisi
cda7f791b7
Prioritize new Rule annotation when parsing if both are present
2023-04-03 21:58:16 +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
altrisi
d85c23125f
Add explicit deprecation SuppressWarnings for Gradle
2023-04-03 19:40:33 +02:00
altrisi
56e25a780c
Missed call in 5fcfc7a
2023-04-03 19:19:31 +02:00
altrisi
83e88856ab
Rename fungus growth enum given the rule is no longer about a fix
2023-04-03 19:15:08 +02:00
altrisi
431b0e68de
Cleanup to the /player command ( #1690 )
...
* Small cleanup to `/player` command
There should be no changes to users
* Use extracted `source` variable
* Inline another single-use small function
* Inline another trivial helper
* Import inner classes of the ActionPack
* Rename `literalargumentbuilder` variable
* Compact unnecessary three lines into one
* Inline `source.getServer` and pass `Vec3` to `createFake`
This gets outside of "just" the command, but it's fine
* Unpick name length constant
* Pass `Vec3` directly to `BlockPos.containing`
2023-04-03 18:41:09 +02:00
altrisi
5fcfc7aa8d
Tiny drive-by cleanup of action pack's onUpdate
2023-04-02 21:54:44 +02:00
altrisi
73260a220c
Use EnumMap in the action pack
2023-04-02 21:23:42 +02:00
altrisi
2d0a8e11da
Keep the other improvements from #1689
2023-04-02 13:26:46 +02:00
altrisi
b055b05263
Revert "Fix /player look and turn commands reversing yaw and pitch ( #1689 )"
...
This reverts commit 591153458c .
2023-04-02 12:51:22 +02:00
altrisi
591153458c
Fix /player look and turn commands reversing yaw and pitch ( #1689 )
...
* Fix `/player` `look` and `turn` commands reversing yaw and pitch
* Translate a comment to mojmap and update it a bit
2023-04-01 12:34:54 +02:00
altrisi
23b7aa0945
Require Loader 0.14.18
2023-03-23 18:09:55 +01:00
altrisi
4e94d1bc15
Enforce 1.19.4 in dependency resolution
2023-03-20 18:51:20 +01:00
altrisi
d2d7d6f421
Carpet 1.4.101
2023-03-19 19:37:03 +01:00
altrisi
1ad927da9d
Up priority in MinecraftServer_tickspeedMixin
2023-03-19 19:36:37 +01:00
altrisi
f98c2409be
Simplify enum options creation
...
Slightly optimizes it
2023-03-16 17:36:44 +01:00
altrisi
d9ec575205
Carpet 1.4.100
2023-03-14 17:42:25 +01:00
altrisi
9c82ca0ed4
Bump versions to 1.19.4
2023-03-14 17:32:33 +01:00
altrisi
0869cbb81c
Move rule change event into a rule observer and outside the Java api
...
* Move rule change event into a rule observer, without exposing it
* Fix comment
* Fix formatting changes added by my IDE
Still trying to configure it to force correctly the new style
Also remove some finals
2023-03-08 21:31:34 +01:00
altrisi
06bdbdaed2
Add arithmetic shift, use logic shift in current right shift ( #1670 )
...
* Add arithmetic shift, use logic shift in current
* State that the MSBs will be cleared to zero in logic right shift
2023-03-08 21:26:27 +01:00
altrisi
cc24f79d47
Allow scarpet function name to be different to annotated method name
2023-03-08 20:53:35 +01:00
altrisi
4801534229
Sync fillLimit rule with the equivalent gamerule
2023-03-08 20:52:44 +01:00
altrisi
13882146fc
Simplify app store rule cleaning
2023-03-08 16:41:43 +01:00
altrisi
883d887e11
Make OutputConverter.convert return Value
...
This is a breaking change, but there's only one use of the function on all github
The refactor also makes `register` take a function to `Value`, no one uses the one to `LazyValue` anyway. `registerToValue` is now deprecated
2023-03-08 14:07:50 +01:00
altrisi
93bec37dac
Simplify and optimize bit roll operations
...
Suggested in #1666 , ran many testing to check it gives the same results
2023-03-08 13:24:37 +01:00
altrisi
5ab4a9e442
Document new and deprecated methods, catch exceptions
2023-02-08 21:13:14 +01:00
altrisi
6adccfd46a
Some minor cleanup in CarpetServer
...
- Fully remove late registration handling
- That removes the reference to the command dispatcher
- Fix displaced comment
- Simplify "don't mixin to register" checking
2023-01-25 18:05:32 +01:00
altrisi
889e3b6999
Replace usages of j.u.Stack with fastutil's
...
Java's is synchronized everywhere, reducing performance given we don't need it to be. It's recommended to use `Deque` as a replacement, but given we have fastutil's, we use those
Closes #1640
2023-01-24 13:46:53 +01:00
altrisi
fb7b1f79a5
Fix unchecked removal of commands by app name
2023-01-23 22:19:07 +01:00
altrisi
c9c1e5a4dc
Fix undef docs mentioning you can undef constant literals
...
Fuxes #1566
2023-01-20 19:00:47 +01:00
altrisi
1eb25ba1b5
Improve unexpected java exception in scarpet error slightly
2023-01-20 18:53:26 +01:00
altrisi
1f38a2e89c
Remove leadFix rule
...
It's been fixed for ages, and the only code we still add is already in vanilla
2023-01-20 18:27:40 +01:00
altrisi
583a372ba4
Migrate Context usage from recently merged PR
2023-01-20 18:09:15 +01:00
altrisi
58a68739c5
Annotate source in Validator with @Nullable
...
Using it without a check happens too many times
2023-01-20 14:41:41 +01:00
altrisi
d9a4a62f7c
Fix NPE in a validator from registry access refactor
2023-01-20 14:35:45 +01:00
altrisi
914e129f6e
Merge particle caches ( #1528 )
...
* Merge particle caches
* Reset this cache on world reload
2023-01-20 13:56:16 +01:00
altrisi
3050a82b96
Replace one missed usage
...
It was also using the copy-constructor, so this way it should also be more efficient
2023-01-19 01:47:33 +01:00
altrisi
17249c3c77
Refactor code to use ListValue.wrap(Stream)
...
Simplifies code (improving readability) and unifies `Stream<Value>` to `ListValue` handling
2023-01-19 01:40:29 +01:00
altrisi
dd1dc3756a
Remove a no longer necessary mixin
...
And tiny cleanup to another one
2023-01-19 00:30:23 +01:00
altrisi
e924477558
Use enum for chainstone setting
...
And very minor cleanup in `CarpetSettings`
2023-01-18 22:44:12 +01:00
altrisi
2b95a878ad
Remove now fixed flatWorldStructureSpawning rule and cleanup some unused mixins
2023-01-18 14:41:46 +01:00
altrisi
005368c3d9
Typo fixing round
...
Light check over all scarpet docs
Resolves #1626 , resolves #1613 , resolves #1597 , some of the fixes are from these
2023-01-18 14:14:36 +01:00
altrisi
0e8b53c8d3
Add CarpetContext.s back temporarily as Deprecated for compatibility
2023-01-18 13:47:22 +01:00
altrisi
bc31faca21
Fix flipped values for tick freezing
2023-01-04 22:29:17 +01:00
altrisi
e5672dc097
Simplify logger packet sending
2023-01-04 20:58:34 +01:00
altrisi
e71cbcafab
Add comment related to previous commit
2023-01-04 20:32:20 +01:00
altrisi
cb923fbb67
Minor changes and fixes around tick warping
...
When warping and frozen the game will now run at 20 (frozen) TPS instead of as fast as possible around a loop
Frozen ticks will no longer count towards tick warping
TPS logger will now display `TPS: 0.0` when the game is frozen
2023-01-04 20:21:51 +01:00
altrisi
8a3c844b5c
Automate version filling in CarpetSettings and add date to version in mod json
2023-01-04 19:56:18 +01:00
altrisi
027d7f5808
Cancel release if version was already released
2022-12-30 15:45:08 +01:00
altrisi
2af067c26d
Carpet 1.4.93 for 1.19.3
...
Forgot to bump versions the previous
2022-12-30 13:43:05 +01:00
altrisi
0e61d67c4a
Add modrinth badge and update some links to match modrinth page
...
Still pending a better look at it
2022-12-30 12:54:32 +01:00
altrisi
7efa9df3ee
Simplify chunk refreshing and fix a bug in it
...
where block-specific distance is used instead of chunk distance
2022-12-28 16:32:01 +01:00
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