Allow to teleport on leaves
This commit is contained in:
parent
ffc56ada1a
commit
0845458921
@ -12,6 +12,7 @@ import net.minecraft.resources.ResourceLocation
|
||||
import net.minecraft.server.level.ServerPlayer
|
||||
import net.minecraft.world.level.ClipContext
|
||||
import net.minecraft.world.level.block.Block
|
||||
import net.minecraft.world.level.material.Material
|
||||
import net.minecraft.world.phys.BlockHitResult
|
||||
import net.minecraft.world.phys.HitResult
|
||||
import net.minecraft.world.phys.shapes.CollisionContext
|
||||
@ -65,7 +66,7 @@ class EnderTeleporterFeature(capability: MatteryPlayerCapability) : AndroidActiv
|
||||
}
|
||||
|
||||
private fun isValidPosition(blockPos: BlockPos): Boolean {
|
||||
if (!Block.canSupportCenter(ply.level, blockPos.below(), Direction.UP) && !Block.canSupportRigidBlock(ply.level, blockPos.below())) {
|
||||
if (!Block.canSupportCenter(ply.level, blockPos.below(), Direction.UP) && !Block.canSupportRigidBlock(ply.level, blockPos.below()) && ply.level.getBlockState(blockPos.below()).material != Material.LEAVES) {
|
||||
return false
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user