Commit Graph
657 Commits
Author SHA1 Message Date
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 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 c2788f0f85 Allow modded structures in overlay's structure renderer (#1504) 2022-07-21 15:12:58 +02:00
Ghoulboy 6019f812d3 Making portal_timer and portal_cooldown return portal timer and portal cooldown in that order (#1476)
* This error is so dumb I must have done it

* Update ai_tracker.sc
2022-06-27 20:37:44 +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
Space Walker 7de976a0e2 fix #1454 2022-06-01 22:03:33 +02:00
altrisi d088ee477e Set mixin compatibility level to Java 17 2022-05-27 19:44:39 +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
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
gnembon 217567c037 22w18a 2022-05-04 21:34:22 +02:00
gnembon fc8114b0c1 added 'xpFromExplosions' for xp to always drop from exploding blocks 2022-04-27 20:16:56 +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
Fx Morin 5e9b391ac4 Sculk sensor range (#1389)
* New Rule: `sculkSensorRange`
2022-04-03 13:17:33 +02:00
gnembon cd1854a734 Merge branch 'master' into future 2022-03-23 18:21:45 +01:00
gnembon aab3de671e add reload resources after reload, still not fixing the issues 2022-03-23 18:21:15 +01:00
gnembon 302a7b4817 fixes for 22w11a 2022-03-17 20:21:55 +01:00
intricate 7f4a335c97 Fix #1350 (#1351) 2022-02-28 19:45:44 +01:00
gnembon c01ad9ce9d 1.18.2-pre 2022-02-20 01:50:46 +01:00
Crec0 702022bce0 remove removed class from AW (#1339) 2022-02-17 14:00:10 +01:00
replaceitemandgnembon bf00051482 Added __on_player_message event (#1312)
* Added __on_player_sends_message event

* Docs for chat message event

* Rename to __on_player_message

* Editor support

* Added event to event_test app

* Update docs/scarpet/api/Events.md

Co-authored-by: gnembon <41132274+gnembon@users.noreply.github.com>
2022-02-16 00:07:53 +01:00
2No2Name 5c4e18ead1 new: creativePlayersLoadChunks carpet rule (#1314)
enabled by default: behavior like vanilla
disabled: creative players do not load chunks like spectators with gamerule spectatorsGenerateChunks false
2022-02-05 23:42:50 +01:00
ishland 8a7ca3a876 Feature: simulationDistance rule (#1280)
* simulationDistance rule

Closes gnembon/fabric-carpet#1200

* Update translation of zh_cn for simulationDistance
2022-01-30 20:12:14 +01:00
gnembon 01367142ac remove unused mixins 2022-01-29 22:13:13 +01:00
FX - PR0CESS a547677597 Migrate Carpet Mixin names to mojang mappings 2022-01-28 16:47:18 -05: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 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
gnembon f469810fbc 22w03a 2022-01-20 00:20:52 +01:00
gnembon 0de2d74ef0 Merge branch 'master' into future 2022-01-19 21:46:37 +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
gnembon 74f6e57edc Merge branch 'master' into future 2022-01-12 22:53:45 +01:00
replaceitemandreplaceitem 3f6ddc43e5 Added screen handler system (#888)
* Added screen handler value

* Added screen handler constructor and function to show to player

* Made inventory_* functions work with screen handlers

* Event callbacks and some refactoring

* Exception if screen has no inventory

* Fixed NPE

* Close screen when null

* Added screen_property

* UNKNOWN_SCREEN throwable

* Fix error when not specifying click callback

* Access to non-container screen handler slots via the inventory_* functions

* Change lectern page

* Added button event

* Added 'close' event and refactoring callback

* Beacon and Brewing screens

* Cartography table screen

* Crafting screen

* Enchantment screen

* Grindstone

* Loom

* Merchant

* Shulkerbox

* Smithing table

* Stonecutter

* Use strings as screen type instead of ScreenHandlerType

* Remove support for multiple players

* Combining create_screen and open_screen and refactoring

* Allow modifying cursor stack

* Cleanup

* Docs

* Added multiple screen examples

* Rename to screen

* Added smoker and blast furnace

* Serialize screen content

* Store host name instead of context

* Add button value special cases to docs

* Spelling and grammar fixes by @James103

* Optimize screen inventory access

* Use -1 for slot click outside the screen

* As boolean, ScreenValue equals isOpen

* Revert "Use -1 for slot click outside the screen"

This reverts commit 68c113e71bb653191cedf4cc356ab7705838dc25.

* Rework of callback function

* Improve screen functionality with drop_item

* Editor keywords

* Only check syncId

* slot_update event callback

* Screem typo

* Mistake

* toTag returns "null" NBT for  closed screen

* Use null for slot index of -999

Co-authored-by: replaceitem <replaceitem.mc@gmail.com>
2022-01-12 22:52:38 +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 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
gnembon 0177ef4298 Merge branch 'master' into future 2021-11-30 03:36:00 +01:00
gnembon 06eda1052f boi 2021-11-30 03:35:48 +01:00
Crec0 aa57b586cb Multi noise support for scarpet (#1176)
* fix: infinite params bug in AnnotationParser
feat: scarpet function query_noise()

* refactor: remove Method reflection

* fix: use BiomeCoords

* update: game version to 1.18-pre5

* feat: biome lookup from multinoise
fix: noise lookup wrongly scaled

* fix: jagged noise. Thanks, @Starmute

* fix: cave cheese and layer. Thanks, @Starmute

* fix: revert formatting
fix: caveLayer and caveCheese
feat: add terrain support

* more formatting reverts

* fix mapping issue

* use BlockPos

* docs: add documentation for query_noise

* docs: add documentation for biome(noise_map)
2021-11-30 02:47:28 +01:00
gnembon 6150e1f29c Merge branch 'master' into future 2021-11-29 00:10:47 +01:00
Crec0 28a5e7acf1 XpNoCooldown and combineXpOrbs refactor (#1149)
* - Fix xpNoCooldown to work as it did in 1.17-
- Remove XPcombine
- Use vanilla merge methods

* Remove debug code

* fix: rollback sort carpet.mixins.json

* rework: nerf xp cooldown absorption a little

* remove: combineXpOrbs
fix: xpCooldown

* revert renames

* fix newlines

* fix: wrong implementation for absorption

* add missing `private` keyword

* fix: player xp cooldown set wrongly

* fix: injection point to be within condition
2021-11-28 23:39:13 +01:00
gnembon a990be607f allowed plopping of all sorts of structures regardless of required conditions 2021-11-28 20:23:41 +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 ff44e847c0 Merge branch 'master' into future 2021-11-23 22:03:43 +01:00
Ghoulboy 49dff77ebe Missing semicolon in draw_beta.sc (#1151) 2021-11-22 22:47:32 +01:00