傻逼NPE

This commit is contained in:
Light_Quanta 2025-07-16 03:35:28 +08:00
parent 9edf8784df
commit d57bd9016a
No known key found for this signature in database
GPG key ID: 11A39A1B8C890959

View file

@ -1,12 +1,12 @@
package com.atsuishio.superbwarfare.tools;
import net.minecraft.core.particles.ParticleTypes;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.level.ClipContext;
import net.minecraft.world.level.Level;
import net.minecraft.world.phys.BlockHitResult;
import net.minecraft.world.phys.HitResult;
import net.minecraft.world.phys.Vec3;
import net.minecraft.world.phys.shapes.CollisionContext;
import java.util.Optional;
@ -71,7 +71,7 @@ public class ProjectileCalculator {
end,
ClipContext.Block.COLLIDER, // 只检测碰撞方块
ClipContext.Fluid.NONE, // 忽略流体
(Entity) null // 无实体
CollisionContext.empty() // 无实体
));
// 如果检测到碰撞返回碰撞点