Commit Graph
284 Commits
Author SHA1 Message Date
gnembon 4e57eecf2d 24w09a 2024-02-29 11:05:15 +01:00
altrisi e1bd03cbef Simplify handling of spawning not online fake players 2023-11-04 14:47:03 +01:00
gnembon 382706a6df 23w43a 2023-10-25 19:09:20 +02:00
gnembon 1a7e8b6875 yeet most of tick 2023-10-25 17:06:53 +02:00
gnembon 08c5c3db31 fix player skins not showing properly 2023-08-07 20:04:40 +02:00
altrisi fbe37017c5 Refactor spawn reporting (#1519)
Not all that could be done for now
2023-07-28 20:57:48 +02:00
gnembon c6f52b3293 retire static TickSpeed. Use Server and Client synchronization agents. 2023-05-17 21:20:00 +02:00
gnembon 044c66388a 1.20-pre2 2023-05-16 21:16:09 +02:00
gnembon 344b0a5b7c /info command now requires gamemasters permissions to request info from unloaded chunks. 2023-05-16 21:03:59 +02:00
gnembon df786605c2 moar client-server tick speed separation 2023-05-16 10:35:40 +02:00
gnembon e0a3060339 tickspeed server - client separation. 2023-05-14 23:36:55 +02:00
altrisi 384bd37159 Remove unnecessary getPlayerOrException in TickCommand 2023-04-13 20:27:20 +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 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 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
James McCulloch e7c02ea21a shadow-single-player-owner-fix: (#1687)
* shadow-single-player-owner-fix:
* Disallow shadowing a single player server owner. Fixes #1442

* shadow-single-player-owner-fix:
* Remove some redundant calls
2023-04-01 12:22:04 +02:00
gnembon 4c8e477f4b 1.19.4-pre1 2023-02-22 20:22:02 +01:00
gnembon 75d94b0570 cleanup of scarpet dependencies 2023-02-08 21:13:14 +01:00
gnembon c7d506675e 23w03a 2023-01-18 22:11:19 +01:00
gnembon bd5dfdbf9f refactor limit access to built-in registries 2023-01-18 04:07:55 +01:00
gnembon cda6994cae 45a great reg split 2022-11-10 20:51:10 +01:00
gnembon 9f776167e3 22w42a 2022-10-20 14:33:36 +02:00
altrisi 86ac49c0ae Fix autocomplete removing all upper-case letters in script run 2022-07-21 15:33:42 +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
gnembon 746c8548e9 22w16b with massive Component changes 2022-04-21 00:26:39 +02:00
gnembon e5af397e22 22w15a 2022-04-13 21:10:24 +02:00
gnembon ef3e71b9b6 22w13a 2022-03-31 20:23:49 +02:00
gnembon 302a7b4817 fixes for 22w11a 2022-03-17 20:21:55 +01:00
altrisi b1c934da28 Fix a few IDE warnings (#1345) 2022-02-20 19:16:12 +01:00
altrisi 06af9ce8b1 Migrate the Carpet codebase to Mojang Mappings 2022-01-24 20:33:16 +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
50d9e51d3f Fake players can be spawned in survival mode while flying (#1264)
* Fixes #1263

* Update src/main/java/carpet/commands/PlayerCommand.java

Co-authored-by: James103 <37945304+James103@users.noreply.github.com>

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
Co-authored-by: James103 <37945304+James103@users.noreply.github.com>
2022-01-09 00:07:45 +01:00
altrisi 212eb07131 Give feedback when stepping ticks (#1234) 2022-01-08 21:12:23 +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 fe6018a43b allowing event callbacks be added concurrently (e.g. registered event while handling some other events), with safe event pruning. fixes #1193 fixes #889 2021-12-06 01:02:37 +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 ab989155ad Merge branch 'master' into future 2021-11-16 20:11:49 +01:00
Trumeet 6be2e51e0c support '/tick freeze on', '/tick freeze off' and '/tick freeze status'
The current implementation only allows toggling tick freeze, so scripting is hard. This patch enables users to specifically freeze or unfreeze other than just toggling. It also provides '/tick freeze status' command to dynamically check whether the game is frozen or not.

This patch preserves compatibility to the existing '/tick freeze' toggle command.
2021-10-21 19:38:07 -07:00
gnembon 31a6bd21df Merge branch 'master' into future 2021-10-20 23:24:52 -03:00
Jake Kandgnembon 50b3aa8832 fixed logger option bug (#1124)
* fixed logger option bug

* implemented strict option for logger args

* added back deprecated logger constructor

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
2021-10-20 23:16:05 -03:00
gnembon 6a03675b4f Merge branch 'master' into future 2021-10-12 23:24:41 -03:00
Yuuta Liang 14be166935 allow specifying game modes when spawning fake players (#1117)
This enables administrators to flexibly spawn players in game modes other than their current modes, and also allows administrators to spawn non-creative players from the console or rcon.

Usage: /player spawn bot in <gamemode>

Usage: /player spawn bot at ~ ~ ~ face 0 0 in minecraft:overworld in <gamemode>

Permissions required: OP Level 2 and above.

Note on flying: For spectator players, flying is always enabled. For other game modes, whether they are flying depends on the command caller. Therefore, it is possible to spawn a flying survival player when you are currently flying.
2021-09-30 00:01:56 -03:00
gnembon bc175509a2 21w37a 2021-09-18 08:46:27 -03:00
gnembon 70754dbfe8 Merge branch 'master' into future
# Conflicts:
#	gradle.properties
2021-09-17 03:15:30 -03:00
gnembon 9652573c10 removed time restrictions from /spawn test 2021-09-11 00:37:54 -03:00
gnembon 7e67966fd2 Merge branch 'master' into future 2021-08-25 15:19:30 -03:00