diff --git a/build.gradle b/build.gradle index c827e4c..540541a 100644 --- a/build.gradle +++ b/build.gradle @@ -93,7 +93,7 @@ curseforge { changelogType = "html" changelog = file("changelog.txt") releaseType = "release" - addGameVersion "1.20.2" + addGameVersion "1.20.4" addGameVersion "Fabric" mainArtifact(file("${project.buildDir}/libs/${archivesBaseName}-${version}.jar")) diff --git a/changelog.txt b/changelog.txt index 800ac82..b453ba8 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,2 +1,2 @@ -
A changelog can be found at: https://www.wimods.net/mo-glass/mo-glass-1-7/
-Note: This mod requires Fabric API for Minecraft 1.20.2.
+A changelog can be found at: https://www.wimods.net/mo-glass/mo-glass-1-7/
+Note: This mod requires Fabric API for Minecraft 1.20.4.
diff --git a/gradle.properties b/gradle.properties index 593a1ce..174dff6 100644 --- a/gradle.properties +++ b/gradle.properties @@ -5,15 +5,15 @@ org.gradle.parallel=true # Fabric Properties # check these at https://fabricmc.net/develop/ and # https://www.curseforge.com/minecraft/mc-mods/fabric-api -minecraft_version=1.20.2 -yarn_mappings=1.20.2+build.4 +minecraft_version=1.20.4 +yarn_mappings=1.20.4+build.2 loader_version=0.15.1 #Fabric api -fabric_version=0.91.2+1.20.2 +fabric_version=0.91.2+1.20.4 # Mod Properties -mod_version = 1.7-MC1.20.2 +mod_version = 1.7-MC1.20.4 maven_group = net.wurstclient.glass archives_base_name = Mo-Glass diff --git a/src/main/java/net/wurstclient/glass/mixin/GlassBlockMixin.java b/src/main/java/net/wurstclient/glass/mixin/GlassBlockMixin.java index 2b4f88a..99b28c3 100644 --- a/src/main/java/net/wurstclient/glass/mixin/GlassBlockMixin.java +++ b/src/main/java/net/wurstclient/glass/mixin/GlassBlockMixin.java @@ -9,11 +9,12 @@ import org.spongepowered.asm.mixin.Mixin; -import net.minecraft.block.AbstractGlassBlock; import net.minecraft.block.BlockState; -import net.minecraft.block.GlassBlock; +import net.minecraft.block.Blocks; import net.minecraft.block.SlabBlock; import net.minecraft.block.StairsBlock; +import net.minecraft.block.TranslucentBlock; +import net.minecraft.block.TransparentBlock; import net.minecraft.block.enums.BlockHalf; import net.minecraft.block.enums.SlabType; import net.minecraft.block.enums.StairShape; @@ -21,8 +22,8 @@ import net.wurstclient.glass.MoGlass; import net.wurstclient.glass.MoGlassBlocks; -@Mixin(GlassBlock.class) -public class GlassBlockMixin extends AbstractGlassBlock +@Mixin(TransparentBlock.class) +public abstract class GlassBlockMixin extends TranslucentBlock { private GlassBlockMixin(MoGlass moGlass, Settings settings) { @@ -33,14 +34,17 @@ private GlassBlockMixin(MoGlass moGlass, Settings settings) public boolean isSideInvisible(BlockState state, BlockState stateFrom, Direction direction) { - if(stateFrom.getBlock() == MoGlassBlocks.GLASS_SLAB) - if(isInvisibleToGlassSlab(state, stateFrom, direction)) - return true; - - if(stateFrom.getBlock() == MoGlassBlocks.GLASS_STAIRS) - if(isInvisibleToGlassStairs(state, stateFrom, direction)) - return true; - + if(state.getBlock() == Blocks.GLASS) + { + if(stateFrom.getBlock() == MoGlassBlocks.GLASS_SLAB) + if(isInvisibleToGlassSlab(state, stateFrom, direction)) + return true; + + if(stateFrom.getBlock() == MoGlassBlocks.GLASS_STAIRS) + if(isInvisibleToGlassStairs(state, stateFrom, direction)) + return true; + } + return super.isSideInvisible(state, stateFrom, direction); } diff --git a/src/main/java/net/wurstclient/glass/mixin/StainedGlassBlockMixin.java b/src/main/java/net/wurstclient/glass/mixin/StainedGlassBlockMixin.java index 540eceb..2eced15 100644 --- a/src/main/java/net/wurstclient/glass/mixin/StainedGlassBlockMixin.java +++ b/src/main/java/net/wurstclient/glass/mixin/StainedGlassBlockMixin.java @@ -11,13 +11,12 @@ import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; -import net.minecraft.block.AbstractGlassBlock; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.SlabBlock; -import net.minecraft.block.Stainable; import net.minecraft.block.StainedGlassBlock; import net.minecraft.block.StairsBlock; +import net.minecraft.block.TransparentBlock; import net.minecraft.block.enums.BlockHalf; import net.minecraft.block.enums.SlabType; import net.minecraft.block.enums.StairShape; @@ -28,8 +27,7 @@ import net.wurstclient.glass.StainedGlassStairsBlock; @Mixin(StainedGlassBlock.class) -public abstract class StainedGlassBlockMixin extends AbstractGlassBlock - implements Stainable +public abstract class StainedGlassBlockMixin extends TransparentBlock { @Shadow @Final diff --git a/src/main/java/net/wurstclient/glass/mixin/TintedGlassBlockMixin.java b/src/main/java/net/wurstclient/glass/mixin/TintedGlassBlockMixin.java index 7fd4ab3..624d01d 100644 --- a/src/main/java/net/wurstclient/glass/mixin/TintedGlassBlockMixin.java +++ b/src/main/java/net/wurstclient/glass/mixin/TintedGlassBlockMixin.java @@ -9,11 +9,11 @@ import org.spongepowered.asm.mixin.Mixin; -import net.minecraft.block.AbstractGlassBlock; import net.minecraft.block.BlockState; import net.minecraft.block.SlabBlock; import net.minecraft.block.StairsBlock; import net.minecraft.block.TintedGlassBlock; +import net.minecraft.block.TransparentBlock; import net.minecraft.block.enums.BlockHalf; import net.minecraft.block.enums.SlabType; import net.minecraft.block.enums.StairShape; @@ -22,7 +22,7 @@ import net.wurstclient.glass.MoGlassBlocks; @Mixin(TintedGlassBlock.class) -public class TintedGlassBlockMixin extends AbstractGlassBlock +public abstract class TintedGlassBlockMixin extends TransparentBlock { private TintedGlassBlockMixin(MoGlass moGlass, Settings settings) { diff --git a/src/main/resources/fabric.mod.json b/src/main/resources/fabric.mod.json index 39eeaac..8ad5afa 100644 --- a/src/main/resources/fabric.mod.json +++ b/src/main/resources/fabric.mod.json @@ -34,8 +34,8 @@ "depends": { "fabricloader": ">=0.15.0", - "fabric-api": ">=0.79.1", - "minecraft": "~1.20-alpha.23.17.a", + "fabric-api": ">=0.90.5", + "minecraft": "~1.20.3-alpha.23.43.a", "java": ">=17" }, "suggests": {