Skip to content

Commit

Permalink
Fix shadowJar task to include API
Browse files Browse the repository at this point in the history
  • Loading branch information
Kazzuk committed Sep 29, 2024
1 parent 424143f commit c7ad681
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Java CI
on: [push, pull_request]
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
Expand All @@ -13,7 +15,7 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle Wrapper
run: ./gradlew shadowJar -x test --no-daemon
run: ./gradlew shadowJar
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
Expand Down
6 changes: 4 additions & 2 deletions server/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ extraJavaModuleInfo {
automaticModule("net.jodah:expiringmap", "net.jodah.expiringmap")
}


tasks.shadowJar {
archiveBaseName.set("Cloudburst")
archiveVersion.set("")
Expand All @@ -67,4 +66,7 @@ tasks.shadowJar {
}
transform(Log4j2PluginsCacheFileTransformer())
mergeServiceFiles()
}

dependsOn(":api:classes")
from(project(":api").sourceSets.main.get().output)
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ public void generateRuntimeIds() {

for (int i = 0; i < vanillaPalette.size(); i++) {
NbtMapBuilder builder = vanillaPalette.get(i).toBuilder();
builder.remove("name_hash"); // Temporary workaround - Added in 1.19.20
builder.remove("name_hash"); // Added in 1.19.20
builder.remove("network_id"); // Added in 1.19.80
builder.remove("block_id"); // Added in 1.20.60
NbtMap nbt = builder.build();

BlockState state = serializedStateMap.get(nbt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,9 @@ public void registerVanillaCreativeItems() {
if (item.has("block_state_b64")) {
NbtMap blockState = decodeNbt(item.get("block_state_b64").asText());
NbtMapBuilder builder = blockState.toBuilder();
builder.remove("name_hash");
builder.remove("name_hash"); // Added in 1.19.20
builder.remove("network_id"); // Added in 1.19.80
builder.remove("block_id"); // Added in 1.20.60
blockState = builder.build();

BlockState state = CloudBlockRegistry.REGISTRY.getBlock(blockState);
Expand Down

0 comments on commit c7ad681

Please sign in to comment.