Skip to content

Commit 32b962f

Browse files
committed
1.19.3
2 parents 77be131 + f5d41ed commit 32b962f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+939
-302
lines changed

.github/workflows/build-on-pr.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
- name: Set up JDK 17
16-
uses: actions/setup-java@v2
16+
uses: actions/setup-java@v3
1717
with:
1818
distribution: 'temurin'
1919
java-version: 17
@@ -22,7 +22,7 @@ jobs:
2222
run: chmod +x gradlew
2323
- name: Build with Gradle
2424
run: ./gradlew build
25-
- uses: actions/upload-artifact@v2
25+
- uses: actions/upload-artifact@v3
2626
with:
2727
name: "Compiled artifacts for Pull Request #${{github.event.number}}"
2828
path: build/libs

.github/workflows/devbuild.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
- name: Set up JDK 17
16-
uses: actions/setup-java@v2
16+
uses: actions/setup-java@v3
1717
with:
1818
distribution: 'temurin'
1919
java-version: 17
@@ -22,7 +22,7 @@ jobs:
2222
run: chmod +x gradlew
2323
- name: Build with Gradle
2424
run: ./gradlew build
25-
- uses: actions/upload-artifact@v2
25+
- uses: actions/upload-artifact@v3
2626
with:
2727
name: Compiled artifacts for ${{ github.sha }}
2828
path: build/libs

build.gradle

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
plugins {
2-
id 'fabric-loom' version '0.12-SNAPSHOT'
2+
id 'fabric-loom' version '1.0-SNAPSHOT'
33
id 'io.github.juuxel.loom-quiltflower' version '1.7.3'
44
}
55

@@ -23,7 +23,7 @@ dependencies {
2323

2424
// Fabric API. This is technically optional, but you probably want it anyway.
2525
//modImplementation "net.fabricmc:fabric:${project.fabric_version}"
26-
modCompileOnly fabricApi.module("fabric-rendering-v1", project.fabric_version)
26+
//modCompileOnly fabricApi.module("fabric-rendering-v1", project.fabric_version)
2727

2828
// PSA: Some older mods, compiled on Loom 0.2.1, might have outdated Maven POMs.
2929
// You may need to force-disable transitiveness on them.

docs/scarpet/Full.md

+135-37
Large diffs are not rendered by default.

docs/scarpet/api/Auxiliary.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ Optional shared shape attributes:
9292
instance makes so that the shape follows the entity, but stays at the same, absolute Y coordinate. Preceeding an axis
9393
with `d`, like `dxdydz` would make so that entity position is treated discretely (rounded down).
9494
* `debug` - if True, it will only be visible when F3+B entity bounding boxes is enabled.
95+
* `facing` - applicable only to `'text'`, `'block'` or '`item'` shapes, where its facing. Possible options are:
96+
* `player`: Default. Element always rotates to face the player eye position,
97+
* `camera`: Element is placed on the plane orthogonal to player look vector,
98+
* `north`, `south`, `east`, `west`, `up`, `down`: obvious
9599

96100
Available shapes:
97101
* `'line'` - draws a straight line between two points.
@@ -141,8 +145,6 @@ Available shapes:
141145
display smoothly dynamic elements where value of an element is constantly
142146
changing and updates to it are being sent from the server.
143147
* `size` - float. Default font size is 10.
144-
* `facing` - text direction, where its facing. Possible options are: `player` (default, text
145-
always rotates to face the player), `north`, `south`, `east`, `west`, `up`, `down`
146148
* `doublesided` - if `true` it will make the text visible from the back as well. Default is `false` (1.16+)
147149
* `align` - text alignment with regards to `pos`. Default is `center` (displayed text is
148150
centered with respect to `pos`), `left` (`pos` indicates beginning of text), and `right` (`pos`
@@ -157,8 +159,6 @@ Available shapes:
157159
* `pos` - position of the object.
158160
* `block` - the object to show. It is a block value or a name of a block with optional NBT data.
159161
* Optional attributes:
160-
* `facing` - object's direction, where its facing. Possible options are: `player` (it
161-
rotates to face the player), `north`(default), `south`, `east`, `west`, `up`, `down`
162162
* `tilt`, `lean`, `turn` - additional rotations along all three axis. It uses the block center as the origin.
163163
* `scale` - scale of it in 3 axis-direction. should be a number or a list of 3 numbers (x,y,z).
164164
* `skylight`, `blocklight` - light level. omit it to use local light level. should between 0~15.
@@ -168,14 +168,13 @@ Available shapes:
168168
* `pos` - position of the object.
169169
* `item` - the object to show. It is an item tuple or a string identified item that may have NBT data.
170170
* Optional attributes:
171-
* `facing` - object's direction, where its facing. Possible options are: `player` (it
172-
always rotates to face the player), `north`(default), `south`, `east`, `west`, `up`, `down`
173171
* `tilt`, `lean`, `turn` - additional rotations along all three axis. for `block`, it use its block center as the origin.
174172
* `scale` - scale of it in 3 axis-direction. should be a number or a list of 3 numbers (x,y,z).
175173
* `skylight`, `blocklight` - light level. omit it to use local light level. should between 0~15.
176174
* `variant` - one of `'none'`, `'third_person_left_hand'`, `'third_person_right_hand'`, `'first_person_left_hand'`,
177175
`'first_person_right_hand'`, `'head'`, `'gui'`, `'ground'`, `'fixed'`. In addition to the literal meaning,
178-
it can also be used to use special models of tridents and telescopes.
176+
it can also be used to use special models of tridents and telescopes.
177+
This attribute is experimental and use of it will change in the future.
179178

180179
181180
### `create_marker(text, pos, rotation?, block?, interactive?)`

docs/scarpet/api/Entities.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ the center point/area. Uses the same `type` selectors as `entities_list`.
7373
also be represented as a block, in this case the search box will be centered on the middle of the block, or an entity - in this case
7474
entire bounding box of the entity serves as a 'center' of search which is then expanded in all directions with the `'distance'` vector.
7575

76-
In any case - returns all entities which bounding box collides with the bounding box defined by `'center'` and `'disteance'`.
76+
In any case - returns all entities which bounding box collides with the bounding box defined by `'center'` and `'distance'`.
7777

7878
entity_area is simpler than `entity_selector` and runs about 20% faster, but is limited to predefined selectors and
7979
cuboid search area.

docs/scarpet/api/Events.md

+40-1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,14 @@ partially handle the event before it happens and handle the rest after. While in
2222
confusion (like handling the respawn event still referring to player's original position and dimension), but gives much
2323
more control over these events.
2424

25+
Some events also provide the ability to cancel minecraft's processing of the event by returning `'cancel'` from the event handler.
26+
This only works for particular events that are triggered before they take an effect in the game.
27+
However, cancelling the event will also stop events from subsequent apps from triggering.
28+
The order of events being executed can be changed by specifying an `'event_priority'` in the app config,
29+
with the highest value being executed first.
30+
Note that cancelling some events might introduce a desynchronization to the client from the server,
31+
creating ghost items or blocks. This can be solved by updating the inventory or block to the client, by using `inventory_set` or `set`.
32+
2533
Programmers can also define their own events and signal other events, including built-in events, and across all loaded apps.
2634

2735
## App scopes and event distribution
@@ -142,6 +150,8 @@ Triggers with a right click action. Event is triggered right after a server rece
142150
game manages to do anything about it. Event triggers when player starts eating food, or starts drawing a bow.
143151
Use `player_finishes_using_item`, or `player_releases_item` to capture the end of these events.
144152

153+
This event can be cancelled by returning `'cancel'`, which prevents the item from being used.
154+
145155
Event is not triggered when a player places a block, for that use
146156
`player_right_clicks_block` or `player_places_block` event.
147157

@@ -156,21 +166,34 @@ Player using of an item is done. This is controlled server side and is responsib
156166
eating. The event is triggered after confirming that the action is valid, and sending the feedback back
157167
to the client, but before triggering it and its effects in game.
158168

169+
This event can be cancelled by returning `'cancel'`, which prevents the player from finishing using the item.
170+
159171
### `__on_player_clicks_block(player, block, face)`
160172
Representing left-click attack on a block, usually signifying start of breaking of a block. Triggers right after the server
161-
receives a client packet, before anything happens on the server side.
173+
receives a client packet, before anything happens on the server side.
174+
175+
This event can be cancelled by returning `'cancel'`, which stops the player from breaking a block.
162176

163177

164178
### `__on_player_breaks_block(player, block)`
165179
Called when player breaks a block, right before any changes to the world are done, but the decision is made to remove the block.
166180

181+
This event can be cancelled by returning `'cancel'`, which prevents the block from being placed.
182+
167183
### `__on_player_right_clicks_block(player, item_tuple, hand, block, face, hitvec)`
168184
Called when player right clicks on a block with anything, or interacts with a block. This event is triggered right
169185
before other interaction events, like `'player_interacts_with_block'` or `'player_places_block'`.
186+
187+
This event can be cancelled by returning `'cancel'`, which prevents the player interaction.
170188

171189
### `__on_player_interacts_with_block(player, hand, block, face, hitvec)`
172190
Called when player successfully interacted with a block, which resulted in activation of said block,
173191
right after this happened.
192+
193+
### `__on_player_placing_block(player, item_tuple, hand, block)`
194+
Triggered when player places a block, before block is placed in the world.
195+
196+
This event can be cancelled by returning `'cancel'`, which prevents the block from being placed.
174197

175198
### `__on_player_places_block(player, item_tuple, hand, block)`
176199
Triggered when player places a block, after block is placed in the world, but before scoreboard is triggered or player inventory
@@ -181,6 +204,8 @@ Triggered when player right clicks (interacts) with an entity, even if the entit
181204
the item they are holding. The event is invoked after receiving a packet from the client, before anything happens server side
182205
with that interaction.
183206

207+
This event can be cancelled by returning `'cancel'`, which prevents the player interacting with the entity.
208+
184209
### `__on_player_trades(player, entity, buy_left, buy_right, sell)`
185210
Triggered when player trades with a merchant. The event is invoked after the server allow the trade, but before the inventory
186211
changes and merchant updates its trade-uses counter.
@@ -195,13 +220,17 @@ on the player.
195220
Triggered when a player clicks a recipe in the crafting window from the crafting book, after server received
196221
a client request, but before any items are moved from its inventory to the crafting menu.
197222

223+
This event can be cancelled by returning `'cancel'`, which prevents the recipe from being moved into the crafting grid.
224+
198225
### `__on_player_switches_slot(player, from, to)`
199226
Triggered when a player changes their selected hotbar slot. Applied right after the server receives the message to switch
200227
the slot.
201228

202229
### `__on_player_swaps_hands(player)`
203230
Triggered when a player sends a command to swap their offhand item. Executed before the effect is applied on the server.
204231

232+
This event can be cancelled by returning `'cancel'`, which prevents the hands from being swapped.
233+
205234
### `__on_player_swings_hand(player, hand)`
206235
Triggered when a player starts swinging their hand. The event typically triggers after a corresponding event that caused it
207236
(`player_uses_item`, `player_breaks_block`, etc.), but it triggers also after some failed events, like attacking the air. When
@@ -210,15 +239,21 @@ swinging continues as an effect of an action, no new swinging events will be iss
210239
### `__on_player_attacks_entity(player, entity)`
211240
Triggered when a player attacks entity, right before it happens server side.
212241

242+
This event can be cancelled by returning `'cancel'`, which prevents the player from attacking the entity.
243+
213244
### `__on_player_takes_damage(player, amount, source, source_entity)`
214245
Triggered when a player is taking damage. Event is executed right after potential absorbtion was applied and before
215246
the actual damage is applied to the player.
216247

248+
This event can be cancelled by returning `'cancel'`, which prevents the player from taking damage.
249+
217250
### `__on_player_deals_damage(player, amount, entity)`
218251
Triggered when a player deals damage to another entity. Its applied in the same moment as `player_takes_damage` if both
219252
sides of the event are players, and similar for all other entities, just their absorbtion is taken twice, just noone ever
220253
notices that ¯\_(ツ)_
221254

255+
This event can be cancelled by returning `'cancel'`, which prevents the damage from being dealt.
256+
222257
### `__on_player_dies(player)`
223258
Triggered when a player dies. Player is already dead, so don't revive them then. Event applied before broadcasting messages
224259
about players death and applying external effects (like mob anger etc).
@@ -267,6 +302,8 @@ Four events triggered when player controls for sneaking and sprinting toggle.
267302
Triggered when the game receives the request from a player to drop one item or full stack from its inventory.
268303
Event happens before anything is changed server side.
269304

305+
These events can be cancelled by returning `'cancel'`, which prevents the player dropping the items.
306+
270307
### `__on_player_picks_up_item(player, item)`
271308
Triggered AFTER a player successfully ingested an item in its inventory. Item represents the total stack of items
272309
ingested by the player. The exact position of these items is unknown as technically these
@@ -281,6 +318,8 @@ Triggered when a player sends a disconnect package or is forcefully disconnected
281318
### `__on_player_message(player, message)`
282319
Triggered when a player sends a chat message or runs a command.
283320

321+
This event can be cancelled by returning `'cancel'`, which prevents the message from being sent.
322+
284323
### `__on_statistic(player, category, event, value)`
285324
Triggered when a player statistic changes. Doesn't notify on periodic an rhythmic events, i.e.
286325
`time_since_death`, `time_since_rest`, and `played_one_minute` since these are triggered every tick. Event

docs/scarpet/api/Inventories.md

-12
Original file line numberDiff line numberDiff line change
@@ -53,18 +53,6 @@ stack_limit('ender_pearl') => 16
5353
stack_limit('stone') => 64
5454
</pre>
5555

56-
### `item_category(item)`
57-
58-
Returns the string representing the category of a given item, like `building_blocks`, `combat`, or `tools`.
59-
60-
Throws `unknown_item` if item doesn't exist.
61-
62-
<pre>
63-
item_category('wooden_axe') => tools
64-
item_category('ender_pearl') => misc
65-
item_category('stone') => building_blocks
66-
</pre>
67-
6856
### `recipe_data(item, type?)`, `recipe_data(recipe, type?)`
6957

7058
returns all recipes matching either an `item`, or represent actual `recipe` name. In vanilla datapack, for all items

docs/scarpet/api/Overview.md

+2
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ To access global/server state for a player app, which you shouldn't do, you need
6060
so either use a command block, or any
6161
arbitrary entity: `/execute as @e[type=bat,limit=1] run script in <app> globals` for instance, however
6262
running anything in the global scope for a `'player'` scoped app is not intended.
63+
* `'event_priority'`: defaults to `0`. This specifies the order in which events will be run, from highest to lowest.
64+
This is need since cancelling an event will stop executing the event in subsequent apps with lower priority.
6365
* `'stay_loaded'`: defaults to `true`. If true, and `/carpet scriptsAutoload` is turned on, the following apps will
6466
stay loaded after startup. Otherwise, after reading the app the first time, and fetching the config, server will drop them down.
6567
WARNING: all apps will run once at startup anyways, so be aware that their actions that are called

docs/scarpet/resources/editors/idea/2.txt

-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ inventory_get
5656
inventory_remove
5757
inventory_set
5858
inventory_size
59-
item_category
6059
item_display_name
6160
item_list
6261
item_tags

docs/scarpet/resources/editors/idea/4.txt

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ __on_player_interacts_with_block(player, hand, block, face, hitvec) ->
1717
__on_player_interacts_with_entity(player, entity, hand) ->
1818
__on_player_jumps(player) ->
1919
__on_player_picks_up_item(player, item) ->
20+
__on_player_placing_block(player, item_tuple, hand, block) ->
2021
__on_player_places_block(player, item_tuple, hand, block) ->
2122
__on_player_releases_item(player, item_tuple, hand) ->
2223
__on_player_rides(player, forward, strafe, jumping, sneaking) ->

docs/scarpet/resources/editors/npp/scarpet.xml

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777

7878
player spawn entity_id entity_list entity_area entity_selector query modify entity_event entity_load_handler entity_types
7979

80-
item_list item_tags stack_limit item_category recipe_data crafting_remaining_item item_display_name
80+
item_list item_tags stack_limit recipe_data crafting_remaining_item item_display_name
8181

8282
inventory_size inventory_has_items inventory_get inventory_set inventory_find inventory_remove drop_item
8383

@@ -120,6 +120,7 @@
120120
__on_player_interacts_with_entity(player, entity, hand) ->
121121
__on_player_jumps(player) ->
122122
__on_player_picks_up_item(player, item) ->
123+
__on_player_placing_block(player, item_tuple, hand, block) ->
123124
__on_player_places_block(player, item_tuple, hand, block) ->
124125
__on_player_releases_item(player, item_tuple, hand) ->
125126
__on_player_rides(player, forward, strafe, jumping, sneaking) ->

gradle.properties

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,25 @@ org.gradle.jvmargs=-Xmx1G
44
# Fabric Properties
55
# check these on https://fabricmc.net/use
66
# or better: https://modmuss50.me/fabric.html
7-
minecraft_version=1.19.2
8-
loader_version=0.14.9
9-
fabric_version=0.58.6+1.19.2
7+
minecraft_version=1.19.3
8+
loader_version=0.14.11
9+
fabric_version=0.67.1+1.19.3
1010

1111
# Mod Properties
12-
mod_version = 1.4.83
12+
mod_version = 1.4.91
1313
maven_group = carpet
1414
archives_base_name = fabric-carpet
1515

1616
# Release Action properties for Curseforge and Snapshots
1717
# The Curseforge versions "names" or ids for the main branch (comma separated: 1.16.4,1.16.5)
1818
# This is needed because CF uses too vague names for prereleases and release candidates
1919
# Can also be the version ID directly coming from https://minecraft.curseforge.com/api/game/versions?token=[API_TOKEN]
20-
release-curse-versions = Minecraft 1.19:1.19.2
20+
release-curse-versions = Minecraft 1.19:1.19.3
2121
# Whether or not to build another branch on release
2222
release-extra-branch = false
2323
# The name of the second branch to release
2424
release-extra-branch-name = future
2525
# The "name" or id of the Curseforge version for the secondary branch
2626
# This is needed because CF uses too vague names for snapshots
2727
# Can also be the version ID directly coming from https://minecraft.curseforge.com/api/game/versions?token=[API_TOKEN]
28-
release-extra-curse-version = Minecraft 1.19:1.19.2
28+
release-extra-curse-version = Minecraft 1.19:1.19.3

gradle/wrapper/gradle-wrapper.jar

2.32 KB
Binary file not shown.
+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip
4+
networkTimeout=10000
45
zipStoreBase=GRADLE_USER_HOME
56
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)