mirror of
https://github.com/TeamMidnightDust/CullLeaves.git
synced 2025-12-16 22:25:09 +01:00
First version!
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
package eu.midnightdust.fastleaves.mixin;
|
||||
|
||||
import net.fabricmc.api.EnvType;
|
||||
import net.fabricmc.api.Environment;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.LeavesBlock;
|
||||
import net.minecraft.util.math.Direction;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
|
||||
@Mixin(LeavesBlock.class)
|
||||
@Environment(EnvType.CLIENT)
|
||||
public class MixinLeavesBlock extends Block {
|
||||
|
||||
public MixinLeavesBlock(Settings settings) {
|
||||
super(settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public boolean isSideInvisible(BlockState state, BlockState neighborState, Direction offset) {
|
||||
return neighborState.getBlock() instanceof LeavesBlock;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user