靶子的碰撞箱会根据状态变化了
This commit is contained in:
parent
76e22bbcc6
commit
e4d854cf19
1 changed files with 10 additions and 0 deletions
|
@ -26,6 +26,7 @@ import net.minecraft.world.entity.player.Player;
|
|||
import net.minecraft.world.entity.projectile.ThrownPotion;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
import net.minecraft.world.phys.Vec3;
|
||||
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
|
@ -213,6 +214,15 @@ public class TargetEntity extends LivingEntity implements GeoEntity, AnimatedEnt
|
|||
protected void pushEntities() {
|
||||
}
|
||||
|
||||
@Override
|
||||
protected AABB makeBoundingBox() {
|
||||
if (this.entityData.get(DOWN_TIME) > 0) {
|
||||
return super.makeBoundingBox().inflate(0, -0.85, 0).move(0, -0.85, 0);
|
||||
}
|
||||
|
||||
return super.makeBoundingBox();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setNoGravity(boolean ignored) {
|
||||
super.setNoGravity(true);
|
||||
|
|
Loading…
Add table
Reference in a new issue