Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/quiltmc/1.20.5-pre1' into …
Browse files Browse the repository at this point in the history
…registries-and-inventory

# Conflicts:
#	gradle/libs.versions.toml
#	mappings/net/minecraft/inventory/Inventory.mapping
  • Loading branch information
ix0rai committed Apr 14, 2024
2 parents f41a378 + 7e5b99d commit cf8e335
Show file tree
Hide file tree
Showing 115 changed files with 414 additions and 392 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
build:
strategy:
matrix:
java: [17, 19]
java: [21]
runs-on: ubuntu-latest
container:
image: eclipse-temurin:${{ matrix.java }}
Expand All @@ -19,7 +19,7 @@ jobs:
- uses: gradle/wrapper-validation-action@v2
- run: ./gradlew build javadocJar --stacktrace
- name: Build artifacts
if: ${{ matrix.java == 17 }}
if: ${{ matrix.java == 21 }}
continue-on-error: true
uses: actions/upload-artifact@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/generate-diff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ jobs:
diff:
strategy:
matrix:
java: [17]
java: [21]
runs-on: ubuntu-latest
container:
image: eclipse-temurin:${{ matrix.java }}
Expand All @@ -18,7 +18,7 @@ jobs:
distribution: temurin
- uses: gradle/wrapper-validation-action@v2
- run: ./gradlew decompileVineflower decompileTargetVineflower --stacktrace
if: ${{ matrix.java == 17 }}
if: ${{ matrix.java == 21 }}
- name: Check Target Decompiled
id: can-create-diff
uses: andstor/file-existence-action@v3
Expand All @@ -30,7 +30,7 @@ jobs:
continue-on-error: true
- name: Create diff comment
uses: ./.github/actions/diff-uploader/
if: ${{ matrix.java == 17 }}
if: ${{ matrix.java == 21 }}
id: diff-uploader
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
if: ${{ github.repository_owner == 'QuiltMC' }}
runs-on: ubuntu-latest
container:
image: eclipse-temurin:17
image: eclipse-temurin:21
options: --user root
steps:
- uses: actions/checkout@v4
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update-base.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ jobs:
with:
ref: ${{ github.head_ref }}
repository: ${{ github.event.pull_request.head.repo.full_name }}
# The container image openjdk:17 doesn't have git installed
# The container image openjdk:21 doesn't have git installed
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
java-version: '21'
- name: Drop invalid mappings
run: ./gradlew dropInvalidMappings --stacktrace
- name: Check for changes in the mappings directory
Expand Down
6 changes: 3 additions & 3 deletions CONVENTIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ Since enigma format does not support `package-info.java` file creation, Quilt Ma

### Tooling

Quilt-hosted Javadocs are generated using [JDK 17 Standard Doclet](https://docs.oracle.com/en/java/javase/17/docs/specs/javadoc/doc-comment-spec.html) and can use any feature it supports. For example, it has a [list of supported tags](https://docs.oracle.com/en/java/javase/17/docs/specs/javadoc/doc-comment-spec.html#where-tags-can-be-used). You can personally build the documentation with a newer Java version. See [the 'Checking Javadoc' section](#checking-javadoc) for how to build the documentation locally.
Quilt-hosted Javadocs are generated using [JDK 21 Standard Doclet](https://docs.oracle.com/en/java/javase/21/docs/specs/javadoc/doc-comment-spec.html) and can use any feature it supports. For example, it has a [list of supported tags](https://docs.oracle.com/en/java/javase/21/docs/specs/javadoc/doc-comment-spec.html#where-tags-can-be-used). You can personally build the documentation with a newer Java version. See [the 'Checking Javadoc' section](#checking-javadoc) for how to build the documentation locally.

### Custom tags

Expand All @@ -175,9 +175,9 @@ A class is assumed to be imported in the following scenarios:

- If it is from the `java.lang` package
- If it is from the same package as the currently documented class
- If it is used as part of its API, such as in the signature of the class or its members (methods and fields). See Javadoc's definition of "use" in its [`-use` command line option specification](https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#options-for-javadoc).
- If it is used as part of its API, such as in the signature of the class or its members (methods and fields). See Javadoc's definition of "use" in its [`-use` command line option specification](https://docs.oracle.com/en/java/javase/21/docs/specs/man/javadoc.html#options-for-javadoc).

If it does not fulfill one of these scenarios, use the [full binary name](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/lang/ClassLoader.html#binary-name), such as `com.google.common.collect.Lists` rather than simply `Lists`. Unlike class naming in enigma, do not use `/` to separate packages; use `.` instead.
If it does not fulfill one of these scenarios, use the [full binary name](https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/ClassLoader.html#binary-name), such as `com.google.common.collect.Lists` rather than simply `Lists`. Unlike class naming in enigma, do not use `/` to separate packages; use `.` instead.

Use Quilt Mappings when referencing Minecraft members, such as `net.minecraft.server.world.ThreadedChunkManager` rather than `net.minecraft.unmapped.C_ccazprxg`. The Javadoc task will warn if some links no longer work after a rename.

Expand Down
32 changes: 13 additions & 19 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ buildscript {
name "Fabric Repository"
url 'https://maven.fabricmc.net'
}
// remove when ASM fix is released
maven {
url = "https://repository.ow2.org/nexus/content/repositories/snapshots/"
}
mavenCentral()
mavenLocal()
}
Expand Down Expand Up @@ -61,9 +65,9 @@ repositories {
name "Quilt Snapshot Repository"
url "https://maven.quiltmc.org/repository/snapshot"
}
// remove when ASM fix is released
maven {
// Vineflower snapshots
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = "https://repository.ow2.org/nexus/content/repositories/snapshots/"
}
mavenLocal()
}
Expand Down Expand Up @@ -131,13 +135,13 @@ remapUnpickDefinitions {
}

java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

tasks.withType(JavaCompile).configureEach {
it.options.encoding = "UTF-8"
it.options.release = 17
it.options.release = 21
}

sourceSets {
Expand Down Expand Up @@ -170,7 +174,7 @@ task unpickHashedJar(type: UnpickJarTask) {
unpickDefinition.set remapUnpickDefinitions.output.get()
unpickConstantsJar.set constantsJar.archiveFile

dependsOn MapPerVersionMappingsJarTask.TASK_NAME, "constantsJar", remapUnpickDefinitions
dependsOn MapPerVersionMappingsJarTask.TASK_NAME/*, "constantsJar", remapUnpickDefinitions*/
}

task mappingsUnpicked(type: EnigmaMappingsTask, dependsOn: unpickHashedJar) {
Expand All @@ -183,7 +187,7 @@ task mappings(type: EnigmaMappingsTask, dependsOn: "mapPerVersionMappingsJar") {

// Only build jars for package infos if we need to actually expose stuff like annotation in the future.

build.dependsOn constantsJar, generatePackageInfoMappings
build.dependsOn /*constantsJar,*/ generatePackageInfoMappings

task v2UnmergedMappingsJar(type: MappingsV2JarTask, dependsOn: [insertAutoGeneratedMappings, combineUnpickDefinitions]) {
archiveFileName = "${Constants.MAPPINGS_NAME}-${Constants.MAPPINGS_VERSION}-v2.jar"
Expand Down Expand Up @@ -224,16 +228,6 @@ task buildIntermediary {
task eraseBytecode(type: TransformJarClassesTask, dependsOn: mapNamedJar) {
jarFile = mappings.fileConstants.namedJar
output = file(".gradle/temp/erased-classes/")
// TODO: https://github.com/Vineflower/vineflower/issues/297
visitor { new ClassVisitor(Opcodes.ASM9, it) {
@Override
void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
if (superName == "java/lang/Record") {
access |= Opcodes.ACC_RECORD
}
super.visit(version, access, name, signature, superName, interfaces)
}
} }

visitor(DraftsmanAdapterClassVisitor::new)
// Set protected/package-private classes to public so that we don't have any access compile errors.
Expand Down Expand Up @@ -375,7 +369,7 @@ javadoc {
// verbose = true // enable to debug
options {
// verbose() // enable to debug
source = "17"
source = "21"
encoding = 'UTF-8'
charSet = 'UTF-8'
memberLevel = JavadocMemberLevel.PRIVATE
Expand Down Expand Up @@ -407,7 +401,7 @@ javadoc {
"https://javadoc.quiltmc.org/quilt-loader/${libs.versions.quilt.loader.get()}/",
"https://docs.oracle.com/en/java/javase/${project.java}/docs/api/"
)
// https://docs.oracle.com/en/java/javase/17/docs/specs/man/javadoc.html#additional-options-provided-by-the-standard-doclet
// https://docs.oracle.com/en/java/javase/21/docs/specs/man/javadoc.html#additional-options-provided-by-the-standard-doclet
addBooleanOption 'Xdoclint:html', true
addBooleanOption 'Xdoclint:syntax', true
addBooleanOption 'Xdoclint:reference', true
Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ repositories {
name "Mojang"
url 'https://libraries.minecraft.net/'
}
// remove when ASM fix is released
maven {
// Vineflower snapshots
url = "https://s01.oss.sonatype.org/content/repositories/snapshots/"
url = "https://repository.ow2.org/nexus/content/repositories/snapshots/"
}
mavenLocal()
}
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/quilt/internal/Constants.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package quilt.internal;

public class Constants {
public static final String MINECRAFT_VERSION = "24w14a";
public static final String MINECRAFT_VERSION = "1.20.5-pre1";

public static final String MAPPINGS_NAME = "quilt-mappings";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,12 @@ public MapNamedJarTask() {

getInputs().files(getTaskByName(DownloadMinecraftLibrariesTask.TASK_NAME).getOutputs().getFiles().getFiles());

inputJar.convention(() -> fileConstants.unpickedJar);
//inputJar.convention(() -> fileConstants.unpickedJar);
inputJar.convention(() -> fileConstants.perVersionMappingsJar); // remove when reenabling unpick
mappingsFile.convention(() -> this.<AddProposedMappingsTask>getTaskByName("insertAutoGeneratedMappings").getOutputMappings());
outputJar.convention(() -> fileConstants.namedJar);

this.dependsOn("insertAutoGeneratedMappings", "unpickHashedJar");
this.dependsOn("insertAutoGeneratedMappings"/*, "unpickHashedJar"*/);
}

public Map<String, String> getAdditionalMappings() {
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ org.gradle.jvmargs=-Xmx3G
commons_codec=1.15
commons_compress=1.21
gson=2.9.1
java=17
java=21
netty=4.1.68.Final
8 changes: 4 additions & 4 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,21 @@ download_task = "4.1.1"
guava = "31.1-jre"
jackson_xml = "2.14.1"
launchermeta_parser = "1.0.0"
enigma = "2.2.1+local"
enigma_plugin = "2.2.0"
enigma = "2.3.0"
enigma_plugin = "2.2.1"
tiny_remapper = "0.7.2"
stitch = "0.6.1"
unpick = "3.0.7"
mapping_io = "0.3.0"
javadoc_draftsman = "1.2.3"

quilt_loader = "0.20.0-beta.9"
quilt_loader = "0.23.0"
jetbrains_annotations = "23.0.0"
jsr305 = "3.0.2"
gson = "2.9.1"
netty = "4.1"

vineflower = "1.10.0-20230713.053900-2"
vineflower = "1.10.0"
cfr = "0.2.0"

junit = "5.9.1"
Expand Down
8 changes: 8 additions & 0 deletions mappings/com/mojang/blaze3d/vertex/VertexConsumer.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ CLASS net/minecraft/unmapped/C_igthdzux com/mojang/blaze3d/vertex/VertexConsumer
ARG 5 z
METHOD m_etjvwphb light (I)Lnet/minecraft/unmapped/C_igthdzux;
ARG 1 uv
METHOD m_goritysv vertex (Lnet/minecraft/unmapped/C_cnszsxvd$C_pqokfevb;FFF)Lnet/minecraft/unmapped/C_igthdzux;
ARG 2 x
ARG 3 y
ARG 4 z
METHOD m_ifjtzebj unfixColor ()V
METHOD m_lfedagne normal (Lnet/minecraft/unmapped/C_cnszsxvd$C_pqokfevb;FFF)Lnet/minecraft/unmapped/C_igthdzux;
ARG 2 x
ARG 3 y
ARG 4 z
METHOD m_llqefzuv overlay (II)Lnet/minecraft/unmapped/C_igthdzux;
ARG 1 u
ARG 2 v
Expand Down
14 changes: 0 additions & 14 deletions mappings/net/minecraft/block/EnchantingTableBlock.mapping

This file was deleted.

4 changes: 2 additions & 2 deletions mappings/net/minecraft/block/dispenser/DispenserBlock.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ CLASS net/minecraft/unmapped/C_sridforj net/minecraft/block/dispenser/DispenserB
FIELD f_febfgklv CODEC Lcom/mojang/serialization/MapCodec;
FIELD f_kigvivjn FACING Lnet/minecraft/unmapped/C_tcujuvjb;
FIELD f_mqswtdqm TRIGGERED Lnet/minecraft/unmapped/C_xhwijdsd;
METHOD m_fnobacze getBehaviorForItem (Lnet/minecraft/unmapped/C_sddaxwyk;)Lnet/minecraft/unmapped/C_ooeeaffg;
ARG 1 stack
METHOD m_fnobacze getBehaviorForItem (Lnet/minecraft/unmapped/C_cdctfzbn;Lnet/minecraft/unmapped/C_sddaxwyk;)Lnet/minecraft/unmapped/C_ooeeaffg;
ARG 2 stack
METHOD m_jiinrsul registerBehavior (Lnet/minecraft/unmapped/C_gmbqjnle;Lnet/minecraft/unmapped/C_ooeeaffg;)V
ARG 0 provider
ARG 1 behavior
Expand Down
20 changes: 20 additions & 0 deletions mappings/net/minecraft/block/entity/BlockEntity.mapping
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,24 @@ CLASS net/minecraft/unmapped/C_kvegafmh net/minecraft/block/entity/BlockEntity
METHOD m_culdahst readBlockPosFromNbt (Lnet/minecraft/unmapped/C_hhlwcnih;)Lnet/minecraft/unmapped/C_hynzadkk;
ARG 0 nbt
METHOD m_dzrbmfhv toIdentifiedNbt (Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)Lnet/minecraft/unmapped/C_hhlwcnih;
ARG 1 lookupProvider
METHOD m_escrnqip toSyncedNbt (Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)Lnet/minecraft/unmapped/C_hhlwcnih;
COMMENT Serializes the state of this block entity that is observable by clients.
COMMENT It is sent alongside the initial chunk data, as well as when the block
COMMENT entity implements {@link #toUpdatePacket} and decides to use the
COMMENT shorthand implementation as described in its javadoc.
ARG 1 lookupProvider
METHOD m_ftinwujz markRemoved ()V
METHOD m_ghbzlfof toNbt (Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)Lnet/minecraft/unmapped/C_hhlwcnih;
ARG 1 lookupProvider
METHOD m_gmqocbcr (Lnet/minecraft/unmapped/C_hhlwcnih;Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)V
ARG 1 nbt
ARG 2 lookupProvider
METHOD m_idcywgkm createFromNbt (Lnet/minecraft/unmapped/C_hynzadkk;Lnet/minecraft/unmapped/C_txtbiemp;Lnet/minecraft/unmapped/C_hhlwcnih;Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)Lnet/minecraft/unmapped/C_kvegafmh;
ARG 0 pos
ARG 1 state
ARG 2 nbt
ARG 3 lookupProvider
METHOD m_jcglyghm writeIdentifyingLocatingData (Lnet/minecraft/unmapped/C_hhlwcnih;)V
ARG 1 nbt
METHOD m_jlguerjg copyItemDataRequiresOperator ()Z
Expand All @@ -48,21 +55,34 @@ CLASS net/minecraft/unmapped/C_kvegafmh net/minecraft/block/entity/BlockEntity
COMMENT {@link net.minecraft.network.packet.s2c.play.BlockEntityUpdateS2CPacket#of(BlockEntity) BlockEntityUpdateS2CPacket.of(this)}.
COMMENT <p>
COMMENT The NBT will be passed to (TODO: restore link) on the client.
METHOD m_pcgjfrqh (Lnet/minecraft/unmapped/C_hhlwcnih;)V
ARG 1 nbt
METHOD m_phlhitmt markDirty ()V
COMMENT Marks this block entity as "dirty", in other words it marks it as needing to be saved to disk.
METHOD m_pnogyfzc hasWorld ()Z
METHOD m_pvqmpwkq writeNbtToStack (Lnet/minecraft/unmapped/C_sddaxwyk;Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)V
ARG 1 stack
ARG 2 lookupProvider
METHOD m_qihknhoq getPos ()Lnet/minecraft/unmapped/C_hynzadkk;
METHOD m_qmckaiuk (Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)Lnet/minecraft/unmapped/C_hhlwcnih;
ARG 1 lookupProvider
METHOD m_qopnimsa writeNbt (Lnet/minecraft/unmapped/C_hhlwcnih;Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)V
COMMENT Writes this block entity's custom data to the given NBT compound.
ARG 1 nbt
COMMENT the NBT to write to
ARG 2 lookupProvider
METHOD m_qrmwzmws onSyncedBlockEvent (II)Z
ARG 1 type
ARG 2 data
METHOD m_rjyhuhsi (Lnet/minecraft/unmapped/C_hhlwcnih;Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)V
ARG 1 nbt
ARG 2 lookupProvider
METHOD m_rtxjwbev getWorld ()Lnet/minecraft/unmapped/C_cdctfzbn;
METHOD m_trzmaydr (Lnet/minecraft/unmapped/C_hhlwcnih;Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)V
ARG 1 nbt
ARG 2 lookupProvider
METHOD m_xokvytvt toIdentifiedLocatedNbt (Lnet/minecraft/unmapped/C_vtbxyypo$C_etmlgbig;)Lnet/minecraft/unmapped/C_hhlwcnih;
ARG 1 lookupProvider
METHOD m_yymkkcjv populateCrashReport (Lnet/minecraft/unmapped/C_qympisds;)V
ARG 1 crashReportSection
METHOD m_zasadoxf writeIdentifyingData (Lnet/minecraft/unmapped/C_hhlwcnih;Lnet/minecraft/unmapped/C_wgqvodus;)V
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ CLASS net/minecraft/unmapped/C_sqxxaglx net/minecraft/block/entity/BrewingStandB
ARG 1 pos
ARG 2 state
ARG 3 blockEntity
METHOD m_zxndtyxk canCraft (Lnet/minecraft/unmapped/C_rnrfftze;)Z
ARG 0 slots
METHOD m_zxndtyxk canCraft (Lnet/minecraft/unmapped/C_ilssplzn;Lnet/minecraft/unmapped/C_rnrfftze;)Z
ARG 1 slots

This file was deleted.

Loading

0 comments on commit cf8e335

Please sign in to comment.