diff --git a/build.gradle b/build.gradle index 2924986..ee33eec 100644 --- a/build.gradle +++ b/build.gradle @@ -26,7 +26,7 @@ curseforge { changelog = file('changelog.md') changelogType = 'markdown' releaseType = 'release' - addGameVersion 'Java 16' + addGameVersion 'Java 17' } } @@ -38,10 +38,10 @@ version = ver group = 'eu.gir' archivesBaseName = 'GIRC-Redstone' -java.toolchain.languageVersion = JavaLanguageVersion.of(16) +java.toolchain.languageVersion = JavaLanguageVersion.of(17) minecraft { - mappings channel: 'official', version: '1.17.1' + mappings channel: 'official', version: '1.18' runs { client { @@ -75,7 +75,7 @@ repositories { } dependencies { - minecraft 'net.minecraftforge:forge:1.17.1-37.0.84' + minecraft 'net.minecraftforge:forge:1.18-38.0.14' } jar { diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ffed3a2..84d1f85 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.1-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/src/main/java/eu/gir/gircredstone/item/Linkingtool.java b/src/main/java/eu/gir/gircredstone/item/Linkingtool.java index 619891f..ace690c 100644 --- a/src/main/java/eu/gir/gircredstone/item/Linkingtool.java +++ b/src/main/java/eu/gir/gircredstone/item/Linkingtool.java @@ -22,8 +22,6 @@ import net.minecraft.world.item.context.UseOnContext; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.Block; -import net.minecraftforge.api.distmarker.Dist; -import net.minecraftforge.api.distmarker.OnlyIn; public class Linkingtool extends Item { @@ -96,7 +94,6 @@ public InteractionResult onItemUseFirst(ItemStack stack, UseOnContext ctx) { return InteractionResult.FAIL; } - @OnlyIn(Dist.CLIENT) @Override public void appendHoverText(ItemStack stack, @Nullable Level LevelIn, List tooltip, TooltipFlag flagIn) { final CompoundTag nbt = stack.getTag(); diff --git a/src/main/java/eu/gir/gircredstone/tile/TileRedstoneEmitter.java b/src/main/java/eu/gir/gircredstone/tile/TileRedstoneEmitter.java index aa53a40..986afb9 100644 --- a/src/main/java/eu/gir/gircredstone/tile/TileRedstoneEmitter.java +++ b/src/main/java/eu/gir/gircredstone/tile/TileRedstoneEmitter.java @@ -17,14 +17,15 @@ public TileRedstoneEmitter(BlockPos pos, BlockState state) { private BlockPos linkedpos = null; @Override - public void deserializeNBT(CompoundTag nbt) { - super.deserializeNBT(nbt); - this.linkedpos = Linkingtool.readBlockPosFromNBT(nbt); + public void load(CompoundTag compound) { + super.load(compound); + this.linkedpos = Linkingtool.readBlockPosFromNBT(compound); } - + @Override - public CompoundTag serializeNBT() { - return Linkingtool.writeBlockPosToNBT(linkedpos, super.serializeNBT()); + protected void saveAdditional(CompoundTag compound) { + super.saveAdditional(compound); + Linkingtool.writeBlockPosToNBT(linkedpos, compound); } public boolean link(final BlockPos pos) { diff --git a/src/main/resources/META-INF/mods.toml b/src/main/resources/META-INF/mods.toml index 26d7348..50ee8cc 100644 --- a/src/main/resources/META-INF/mods.toml +++ b/src/main/resources/META-INF/mods.toml @@ -1,5 +1,5 @@ modLoader="javafml" -loaderVersion="[36,)" +loaderVersion="[38,)" issueTrackerURL="https://github.com/German-Immersive-Railroading-Community/GIRC-Redstone/issues" license="Apache License Version 2.0" @@ -9,22 +9,18 @@ version="${file.jarVersion}" displayName="GIRC Redstone" displayURL="https://girc.eu/" authors="MrTroble, Jeronimo" -description=''' -The official Wireless Redstone Mod for GIR. - -Works in unloaded Chunks TM. -''' +description="The official Wireless Redstone Mod for GIR.\nWorks in unloaded Chunks TM." [[dependencies.gircredstone]] modId="forge" mandatory=true - versionRange="[25,)" + versionRange="[38,)" ordering="NONE" side="BOTH" [[dependencies.gircredstone]] modId="minecraft" mandatory=true - versionRange="[1.17.1]" + versionRange="[1.18, 1.19)" ordering="NONE" side="BOTH" \ No newline at end of file diff --git a/src/main/resources/assets/gircredstone/blockstates/acceptor.json b/src/main/resources/assets/gircredstone/blockstates/acceptor.json index 8c30378..b526612 100644 --- a/src/main/resources/assets/gircredstone/blockstates/acceptor.json +++ b/src/main/resources/assets/gircredstone/blockstates/acceptor.json @@ -1 +1 @@ -{"variants": {"power=false": {"model": "gircredstone:acceptor_off"}, "power=true": {"model": "gircredstone:acceptor_on"}}} \ No newline at end of file +{"variants": {"power=false": {"model": "gircredstone:block/acceptor_off"}, "power=true": {"model": "gircredstone:block/acceptor_on"}}} \ No newline at end of file diff --git a/src/main/resources/assets/gircredstone/blockstates/emitter.json b/src/main/resources/assets/gircredstone/blockstates/emitter.json index 3c9fb64..328edad 100644 --- a/src/main/resources/assets/gircredstone/blockstates/emitter.json +++ b/src/main/resources/assets/gircredstone/blockstates/emitter.json @@ -1 +1 @@ -{"variants": {"normal": {"model": "gircredstone:emitter"}}} \ No newline at end of file +{"variants": {"": {"model": "gircredstone:block/emitter"}}} \ No newline at end of file diff --git a/src/main/resources/pack.mcmeta b/src/main/resources/pack.mcmeta index 4018267..5b94fca 100644 --- a/src/main/resources/pack.mcmeta +++ b/src/main/resources/pack.mcmeta @@ -1,7 +1,6 @@ { "pack": { - "description": "examplemod resources", - "pack_format": 3, - "_comment": "A pack_format of 3 should be used starting with Minecraft 1.11. All resources, including language files, should be lowercase (eg: en_us.lang). A pack_format of 2 will load your mod resources with LegacyV2Adapter, which requires language files to have uppercase letters (eg: en_US.lang)." - } + "description": "GIRC Redstone", + "pack_format": 8 + } }