-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added passable leaves, sources, and issues
- Loading branch information
1 parent
57b32b1
commit f4586c2
Showing
8 changed files
with
50 additions
and
6 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
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
25 changes: 25 additions & 0 deletions
25
src/main/java/dev/hephaestus/tweaks/mixin/plants/LeavesBlockMixin.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,25 @@ | ||
package dev.hephaestus.tweaks.mixin.plants; | ||
|
||
import dev.hephaestus.tweaks.Tweaks; | ||
import net.minecraft.block.Block; | ||
import net.minecraft.block.BlockState; | ||
import net.minecraft.block.LeavesBlock; | ||
import net.minecraft.entity.EntityContext; | ||
import net.minecraft.util.math.BlockPos; | ||
import net.minecraft.util.shape.VoxelShape; | ||
import net.minecraft.util.shape.VoxelShapes; | ||
import net.minecraft.world.BlockView; | ||
import org.spongepowered.asm.mixin.Mixin; | ||
|
||
@Mixin(LeavesBlock.class) | ||
public class LeavesBlockMixin extends Block{ | ||
|
||
public LeavesBlockMixin(Settings settings) { | ||
super(settings); | ||
} | ||
|
||
@Override | ||
public VoxelShape getCollisionShape(BlockState state, BlockView view, BlockPos pos, EntityContext context) { | ||
return Tweaks.CONFIG.passableLeaves ? VoxelShapes.empty() : super.getCollisionShape(state, view, pos, context); | ||
} | ||
} |
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
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