diff --git a/build.gradle b/build.gradle index de11c58..dd0cb4e 100644 --- a/build.gradle +++ b/build.gradle @@ -1,5 +1,5 @@ plugins { - id 'fabric-loom' version '1.1-SNAPSHOT' + id 'fabric-loom' version '1.7-SNAPSHOT' id 'maven-publish' } diff --git a/gradle.properties b/gradle.properties index 1e5fcc0..39571ed 100644 --- a/gradle.properties +++ b/gradle.properties @@ -2,13 +2,13 @@ org.gradle.jvmargs=-Xmx1G # Fabric Properties # check these on https://modmuss50.me/fabric.html -minecraft_version=1.20.4 -yarn_mappings=1.20.4+build.3 -loader_version=0.15.6 +minecraft_version=1.21.3 +yarn_mappings=1.21.3+build.2 +loader_version=0.16.9 # Mod Properties -mod_version=1.0.5 +mod_version=1.0.6 maven_group=dev.zenithknight.mcmods archives_base_name=expandeddata # Dependencies # check this on https://modmuss50.me/fabric.html -fabric_version=0.95.0+1.20.4 +fabric_version=0.107.3+1.21.3 \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 73bb918..967dfa6 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1 +1,6 @@ -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip +#Sun Nov 10 16:21:47 CST 2024 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git a/src/main/java/dev/zenithknight/mcmods/expandeddata/common/DataObjects/BlockStateDataObject.java b/src/main/java/dev/zenithknight/mcmods/expandeddata/common/DataObjects/BlockStateDataObject.java index 2d72dce..4485414 100644 --- a/src/main/java/dev/zenithknight/mcmods/expandeddata/common/DataObjects/BlockStateDataObject.java +++ b/src/main/java/dev/zenithknight/mcmods/expandeddata/common/DataObjects/BlockStateDataObject.java @@ -8,7 +8,6 @@ import net.minecraft.nbt.NbtCompound; import net.minecraft.nbt.NbtElement; import net.minecraft.nbt.NbtHelper; -import net.minecraft.registry.Registries; import net.minecraft.registry.RegistryKeys; import net.minecraft.server.world.ServerWorld; import net.minecraft.text.Text; @@ -40,13 +39,13 @@ public void setNbt(NbtCompound nbt) throws CommandSyntaxException { // We do this to prevent block entities from dropping contents on change if (this.entity != null) { BlockEntity blockEntity = this.world.getBlockEntity(this.pos); - blockEntity.readNbt(new NbtCompound()); + blockEntity.read(new NbtCompound(), this.entity.getWorld().getRegistryManager()); blockEntity.markDirty(); } this.world.setBlockState(this.pos, blockState); if (blockState.hasBlockEntity()){ BlockEntity blockEntity = this.world.getBlockEntity(this.pos); - blockEntity.readNbt(nbt); + blockEntity.read(nbt, this.entity.getWorld().getRegistryManager()); blockEntity.markDirty(); } } @@ -55,7 +54,7 @@ public NbtCompound getNbt() throws CommandSyntaxException { NbtCompound nbt = new NbtCompound(); // If this is a block entity, initialize nbt from there if (this.entity != null) { - nbt = this.entity.createNbtWithIdentifyingData(); + nbt = this.entity.createNbtWithIdentifyingData(this.entity.getWorld().getRegistryManager()); } else { nbt.putInt("x", this.pos.getX()); nbt.putInt("y", this.pos.getY()); diff --git a/src/main/java/dev/zenithknight/mcmods/expandeddata/mixin/NbtPredicateMixin.java b/src/main/java/dev/zenithknight/mcmods/expandeddata/mixin/NbtPredicateMixin.java index b932e02..717f484 100644 --- a/src/main/java/dev/zenithknight/mcmods/expandeddata/mixin/NbtPredicateMixin.java +++ b/src/main/java/dev/zenithknight/mcmods/expandeddata/mixin/NbtPredicateMixin.java @@ -20,20 +20,23 @@ private static void entityToNbtMixin(Entity entity, CallbackInfoReturnable