调整载具碰撞
This commit is contained in:
parent
53a1536d34
commit
b944e27619
1 changed files with 4 additions and 4 deletions
|
@ -438,7 +438,7 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements
|
|||
|
||||
public void baseCollideBlock() {
|
||||
if (level() instanceof ServerLevel) {
|
||||
AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.5, 1).move(this.getDeltaMovement().scale(0.6));
|
||||
AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.5 , 1).move(this.getDeltaMovement().scale(1.2));
|
||||
BlockPos.betweenClosedStream(aabb).forEach((pos) -> {
|
||||
BlockState blockstate = this.level().getBlockState(pos);
|
||||
if (blockstate.is(Blocks.LILY_PAD) ||
|
||||
|
@ -452,7 +452,7 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements
|
|||
|
||||
public void collideBlock() {
|
||||
if (!VehicleConfig.COLLISION_DESTROY_BLOCKS.get()) return;
|
||||
AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.5, 1).move(this.getDeltaMovement().scale(0.6));
|
||||
AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.5 , 1).move(this.getDeltaMovement().scale(1.2));
|
||||
BlockPos.betweenClosedStream(aabb).forEach((pos) -> {
|
||||
BlockState blockstate = this.level().getBlockState(pos);
|
||||
if (blockstate.is(ModTags.Blocks.SOFT_COLLISION)) {
|
||||
|
@ -463,7 +463,7 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements
|
|||
|
||||
public void collideHardBlock() {
|
||||
if (!VehicleConfig.COLLISION_DESTROY_HARD_BLOCKS.get()) return;
|
||||
AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.5, 1).move(this.getDeltaMovement().scale(0.6));
|
||||
AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.5 , 1).move(this.getDeltaMovement().scale(1.2));
|
||||
BlockPos.betweenClosedStream(aabb).forEach((pos) -> {
|
||||
BlockState blockstate = this.level().getBlockState(pos);
|
||||
if (blockstate.is(ModTags.Blocks.HARD_COLLISION)) {
|
||||
|
@ -475,7 +475,7 @@ public abstract class MobileVehicleEntity extends EnergyVehicleEntity implements
|
|||
|
||||
public void collideBlockBeastly() {
|
||||
if (!VehicleConfig.COLLISION_DESTROY_BLOCKS_BEASTLY.get()) return;
|
||||
AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.52, 1).move(this.getDeltaMovement().scale(0.6));
|
||||
AABB aabb = getBoundingBox().inflate(0.25, 1, 0.25).expandTowards(0, 0.52 , 1).move(this.getDeltaMovement().scale(1.2));
|
||||
BlockPos.betweenClosedStream(aabb).forEach((pos) -> {
|
||||
BlockState blockstate = this.level().getBlockState(pos);
|
||||
float hardness = blockstate.getBlock().defaultDestroyTime();
|
||||
|
|
Loading…
Add table
Reference in a new issue