47 $pos = $block->getPosition();
49 return AxisAlignedBB::one()->offset($pos->x, $pos->y, $pos->z)->calculateIntercept($start, $end);
52 return parent::calculateInterceptWithBlock($block, $start, $end);
67 parent::onHitBlock($blockHit, $hitResult);
69 $pos = $blockHit->getPosition();
70 $world = $pos->getWorld();
71 $posX = $pos->getFloorX();
72 $posY = $pos->getFloorY();
73 $posZ = $pos->getFloorZ();
75 $ice = VanillaBlocks::ICE();
76 for($x = $posX - 1; $x <= $posX + 1; $x++){
77 for($y = $posY - 1; $y <= $posY + 1; $y++){
78 for($z = $posZ - 1; $z <= $posZ + 1; $z++){
79 if($world->getBlockAt($x, $y, $z)->getTypeId() === BlockTypeIds::WATER){
80 $world->setBlockAt($x, $y, $z, $ice);