Skip to content

Commit

Permalink
Switch from Block to TransparentBlock
Browse files Browse the repository at this point in the history
TransparentBlock handles getAmbientOcclusionLightLevel and getCameraCollisionShape
which solves two issues that the block had:
1. Darkness on inside faces.
2. The camera not being allowed to be on the other side of the block.
  • Loading branch information
JoshuaWierenga committed Jun 10, 2024
1 parent dc47c6a commit 8ff5e29
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package au.com.programmingclub.hardenedglass
import net.fabricmc.api.ModInitializer
import net.fabricmc.fabric.api.itemgroup.v1.ItemGroupEvents
import net.minecraft.block.AbstractBlock
import net.minecraft.block.Block
import net.minecraft.block.TransparentBlock
import net.minecraft.item.BlockItem
import net.minecraft.item.Item
import net.minecraft.item.ItemGroups
Expand All @@ -18,7 +18,7 @@ object HardenedGlass : ModInitializer {
private val logger = LoggerFactory.getLogger(namespace)

private val HardenedGlassIdentifier = Identifier(namespace, "hardened_glass")
public val HardenedGlassBlock = Block(
public val HardenedGlassBlock = TransparentBlock(
AbstractBlock.Settings.create()
.hardness(10f)
.resistance(9f)
Expand Down

0 comments on commit 8ff5e29

Please sign in to comment.