Commit Graph
180 Commits
Author SHA1 Message Date
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
gnembon 302a7b4817 fixes for 22w11a 2022-03-17 20:21:55 +01:00
gnembon c01ad9ce9d 1.18.2-pre 2022-02-20 01:50:46 +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
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 06eda1052f boi 2021-11-30 03:35:48 +01:00
Ghoulboy 49dff77ebe Missing semicolon in draw_beta.sc (#1151) 2021-11-22 22:47:32 +01:00
gnembon 3ff7e1d4cb Merge branch 'master' into 1.17 2021-06-17 21:20:53 -03:00
gnembon 3a83a94361 added despawn timer 2021-06-17 21:20:11 -03:00
gnembon a48a7df386 added perf command support 2021-06-06 10:32:22 -03:00
gnembon b80b555781 Merge branch 'master' into 1.17
# Conflicts:
#	src/main/java/carpet/script/utils/SnoopyCommandSource.java
#	src/main/java/carpet/utils/WoolTool.java
2021-05-18 21:23:15 -03:00
gnembon f32b8e4050 semicolon fixes #863 2021-05-18 01:06:55 -03:00
gnembon 1a7acd519e Merge branch 'master' into 1.17 2021-05-07 23:50:44 -03:00
gnembon 36b469f309 added drowning 2021-05-07 23:31:45 -03:00
gnembon 820c9b6489 Merge branch 'master' into 1.17 2021-05-05 01:31:00 -03:00
whats2000 c465976609 Update zh_tw.json
small fix
2021-05-02 23:35:23 +08:00
whats2000 6eee47ec14 Update zh_tw.json
Add new translation to support the latest version
2021-05-02 23:22:44 +08:00
gnembon 8f2c935fe6 Merge branch 'master' into 1.17
# Conflicts:
#	src/main/java/carpet/network/ClientNetworkHandler.java
#	src/main/resources/assets/carpet/scripts/ai_tracker.sc
2021-04-17 01:37:40 -03:00
gnembon 18705e44ba fixed distance_beta app 2021-04-16 23:23:42 -03:00
gnembon f517d2b79d Merge pull request #741 from Ghoulboy78/distance_beta-upgrade
Update distance_beta.sc
2021-04-16 23:08:19 -03:00
gnembon 6ef85437a9 fixed ai_tracker commands 2021-04-16 23:07:00 -03:00
gnembon 0fd7057138 Merge pull request #739 from Ghoulboy78/ai_tracker-upgrade
Update ai_tracker.sc
2021-04-16 22:51:00 -03:00
gnembon d0fa948a46 Merge branch 'master' into 1.17 2021-04-16 13:02:12 -03:00
gnembon df26e9853a fixed camera's commands 2021-04-16 12:34:11 -03:00
gnembon 388a3de577 Merge branch 'master' into 1.17
# Conflicts:
#	src/main/java/carpet/mixins/ServerWorld_scarpetMixin.java
#	src/main/java/carpet/script/api/WorldAccess.java
2021-04-09 01:40:38 -03:00
gnembon e063748e83 added create_explosion and more event handlers. 2021-04-09 01:38:00 -03:00
Ghoulboy e3f1302be0 Removing random line of code... 2021-04-08 18:03:45 +02:00
Ghoulboy 0a54176383 removing random variable declaration 2021-03-31 16:05:53 +02:00
gnembon 8be832a74c Merge branch 'master' into 1.17 2021-03-23 20:15:44 -03:00
gnembon ff4b292871 Merge pull request #742 from Ghoulboy78/draw_beta-upgrade
Update draw_beta.sc
2021-03-23 08:36:42 -03:00
Ghoulboy 36f766ae75 Removing return statements to improve performance by a few microprocessor ticks to satisfy @altrisi 2021-03-12 22:36:25 +01:00
Ghoulboy78 6d7f7a7bdc improving prims not to calculate blocks unnecessarily (thx @Firigion) 2021-03-05 22:24:42 +01:00
Ghoulboy a957af32d1 removing _carpets stuff to detach from carpet rules 2021-03-02 18:32:04 +01:00
Ghoulboy 356f3e94d6 fixing editing oopsies 2021-03-02 18:29:55 +01:00
gnembon a58dface03 Merge branch 'master' into 1.17 2021-03-02 09:17:13 -04:00
gnembon 8f592735ca fixes 2021-03-02 09:16:56 -04:00
gnembon 34bfe32e39 Merge branch 'master' into 1.17 2021-03-02 08:48:46 -04:00
Ghoulboy78 41186c1da3 using in-built distance func (cos previous one wasnt even used lol) 2021-02-24 12:33:50 +01:00
Ghoulboy78 facac439cf compacting hollow code 2021-02-24 12:11:51 +01:00
Ghoulboy78 467767a8e7 using bresenham algorithm for circles to make it more efficient 2021-02-24 12:06:17 +01:00
Ghoulboy78 fa75401278 minor editing tweaks 2021-02-24 10:17:06 +01:00
Ghoulboy78 eafc618792 oboi, remember that caching bs? I apparently forgot to remove this bit lol 2021-02-24 10:14:57 +01:00
Ghoulboy78 ac031090ef making the shapes in shapes.scl purely mathematical, no strings attached, only returning a set of the positions to iterate over. 2021-02-24 10:14:28 +01:00
Ghoulboy78 8eba0b9b8a removed debug and easter egg 2021-02-24 09:46:28 +01:00
Ghoulboy78 180b2285f9 moved drawing commands to separate library app
now gotta import, and fix issues
2021-02-24 09:44:43 +01:00
Ghoulboy78 96bce75db1 Update draw_beta.sc 2021-02-24 09:40:20 +01:00
Ghoulboy78 5287fed712 Update distance_beta.sc 2021-02-24 09:39:04 +01:00
Ghoulboy78 b649f5c830 Update camera.sc 2021-02-24 09:37:21 +01:00