forked from Lykrast/Glassential-Fabric
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cull sides of blocks if adjacent to same overall type
- Loading branch information
Showing
10 changed files
with
95 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
src/main/java/dev/upcraft/glassential/mixin/TintedGlassBlockMixin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package dev.upcraft.glassential.mixin; | ||
|
||
import dev.upcraft.glassential.Glassential; | ||
import net.minecraft.block.AbstractGlassBlock; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.TintedGlassBlock; | ||
import net.minecraft.util.math.Direction; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
@Mixin(TintedGlassBlock.class) | ||
public abstract class TintedGlassBlockMixin extends AbstractGlassBlock { | ||
|
||
private TintedGlassBlockMixin(Settings settings) { | ||
super(settings); | ||
throw new UnsupportedOperationException(); | ||
} | ||
|
||
@Override | ||
public boolean isSideInvisible(BlockState state, BlockState stateFrom, Direction direction) { | ||
return stateFrom.isIn(Glassential.TINTED_GLASS_NO_CULL) || super.isSideInvisible(state, stateFrom, direction); | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
src/main/resources/data/glassential/tags/blocks/no_cull/ethereal.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"glassential:ethereal_glass", | ||
"glassential:reverse_ethereal_glass" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/data/glassential/tags/blocks/no_cull/ghostly.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"glassential:ghostly_glass" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/data/glassential/tags/blocks/no_cull/light.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"glassential:light_glass" | ||
] | ||
} |
6 changes: 6 additions & 0 deletions
6
src/main/resources/data/glassential/tags/blocks/no_cull/redstone.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"glassential:redstone_glass" | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
src/main/resources/data/glassential/tags/blocks/no_cull/tinted.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"minecraft:tinted_glass", | ||
"glassential:tinted_ethereal_glass", | ||
"glassential:tinted_reverse_ethereal_glass" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,5 +38,8 @@ | |
"fabric-api": "*", | ||
"minecraft": "1.20.x", | ||
"java": ">=17" | ||
} | ||
}, | ||
"mixins": [ | ||
"glassential.mixins.json" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"required": true, | ||
"minVersion": "0.8", | ||
"package": "dev.upcraft.glassential.mixin", | ||
"compatibilityLevel": "JAVA_17", | ||
"mixins": [ | ||
"TintedGlassBlockMixin" | ||
], | ||
"injectors": { | ||
"defaultRequire": 1 | ||
} | ||
} |