Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.

Commit

Permalink
Merge branch '1.20.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander01998 committed Dec 13, 2023
2 parents 8a1a947 + 84ddef7 commit 6842a46
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 27 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"))
Expand Down
4 changes: 2 additions & 2 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
<p>A changelog can be found at:&nbsp;<a href="https://www.wimods.net/mo-glass/mo-glass-1-7/?mc=1.20.2&utm_source=CurseForge&utm_medium=Mo+Glass&utm_campaign=Changelog&utm_content=Mo+Glass+MC1.20.2">https://www.wimods.net/mo-glass/mo-glass-1-7/</a></p>
<p><strong>Note:</strong> This mod requires <a href="https://www.curseforge.com/minecraft/mc-mods/fabric-api/files/4940225" target="_blank" rel="noopener noreferrer">Fabric API for Minecraft 1.20.2</a>.</p>
<p>A changelog can be found at:&nbsp;<a href="https://www.wimods.net/mo-glass/mo-glass-1-7/?mc=1.20.4&utm_source=CurseForge&utm_medium=Mo+Glass&utm_campaign=Changelog&utm_content=Mo+Glass+MC1.20.4">https://www.wimods.net/mo-glass/mo-glass-1-7/</a></p>
<p><strong>Note:</strong> This mod requires <a href="https://www.curseforge.com/minecraft/mc-mods/fabric-api/files/4940245" target="_blank" rel="noopener noreferrer">Fabric API for Minecraft 1.20.4</a>.</p>
8 changes: 4 additions & 4 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
28 changes: 16 additions & 12 deletions src/main/java/net/wurstclient/glass/mixin/GlassBlockMixin.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,21 @@

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;
import net.minecraft.util.math.Direction;
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)
{
Expand All @@ -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);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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)
{
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 @@ -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": {
Expand Down

0 comments on commit 6842a46

Please sign in to comment.