Skip to content

Commit

Permalink
Update to 1.21
Browse files Browse the repository at this point in the history
compatible with >=1.21 (current latest 1.21.1)
  • Loading branch information
chsbuffer committed Aug 31, 2024
1 parent 2c1bee5 commit d3464d3
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ processResources {
}

tasks.withType(JavaCompile).configureEach {
it.options.release = 17
it.options.release = 21
}

java {
Expand All @@ -65,8 +65,8 @@ java {
// If you remove this line, sources will not be generated.
withSourcesJar()

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

jar {
Expand Down
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ org.gradle.parallel=true

# Fabric Properties
# check these on https://fabricmc.net/develop
minecraft_version=1.19.4
yarn_mappings=1.19.4+build.2
minecraft_version=1.21
yarn_mappings=1.21+build.9
loader_version=0.16.3

# Mod Properties
Expand All @@ -14,6 +14,6 @@ maven_group=com.gmail.gorayan3838
archives_base_name=NoteBetterFabric

# Dependencies
fabric_version=0.87.2+1.19.4
fabric_version=0.102.0+1.21
#* check this on https://www.curseforge.com/minecraft/mc-mods/cloth-config/files
cloth_version=10.1.105
cloth_version=15.0.130
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ private void injected(World world, @Nullable PlayerEntity player, double x, doub
BlockPos pos = new BlockPos((int) Math.floor(x), (int) Math.floor(y), (int) Math.floor(z));
SoundConfig.Mapping[] mappings = NoteBetterFabricClient.CONFIG.getMappings();
List<SoundConfig.Mapping> filteredMappings = Arrays.stream(mappings)
.filter(mapping -> world.getBlockState(pos.down()).getBlock().equals(Registries.BLOCK.get(new Identifier(mapping.getBlock()))))
.filter(mapping -> world.getBlockState(pos.down()).getBlock().equals(Registries.BLOCK.get(Identifier.of(mapping.getBlock()))))
.toList();
filteredMappings.forEach(mapping -> {
SoundConfig.Sound soundInfo = mapping.getSound();
Expand All @@ -36,7 +36,7 @@ private void injected(World world, @Nullable PlayerEntity player, double x, doub
x,
y,
z,
SoundEvent.of(new Identifier(soundInfo.getSound())),
SoundEvent.of(Identifier.of(soundInfo.getSound())),
SoundCategory.RECORDS,
soundInfo.getVolume(),
soundInfo.getPitch() * pitch,
Expand Down
2 changes: 1 addition & 1 deletion src/client/resources/NoteBetterFabric.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"required": true,
"minVersion": "0.8",
"package": "com.gmail.gorayan3838.notebetterfabric.mixin",
"compatibilityLevel": "JAVA_17",
"compatibilityLevel": "JAVA_21",
"mixins": [
"NoteBlockMixin"
],
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/fabric.mod.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
"depends": {
"fabricloader": "*",
"fabric": "*",
"minecraft": ">=1.19.3",
"java": ">=17",
"minecraft": ">=1.21",
"java": ">=21",
"cloth-config": "*"
}
}

0 comments on commit d3464d3

Please sign in to comment.