所有载具添加第三人称移动相机距离
This commit is contained in:
parent
8a36bdf073
commit
94e1bed1e8
12 changed files with 32 additions and 16 deletions
|
@ -152,8 +152,8 @@ public class ClickHandler {
|
||||||
|
|
||||||
double scroll = event.getScrollDeltaY();
|
double scroll = event.getScrollDeltaY();
|
||||||
|
|
||||||
// 按下自由视角键时,为具有自由视角功能的载具调整相机距离
|
// 按下自由视角键时,为载具调整相机距离
|
||||||
if (player.getVehicle() instanceof VehicleEntity vehicle && vehicle.allowFreeCam() && player == vehicle.getFirstPassenger() && ModKeyMappings.FREE_CAMERA.isDown()) {
|
if (player.getVehicle() instanceof VehicleEntity vehicle && player == vehicle.getFirstPassenger() && ModKeyMappings.FREE_CAMERA.isDown()) {
|
||||||
ClientMouseHandler.custom3pDistance = Mth.clamp(ClientMouseHandler.custom3pDistance - event.getScrollDeltaY(), -3, 8);
|
ClientMouseHandler.custom3pDistance = Mth.clamp(ClientMouseHandler.custom3pDistance - event.getScrollDeltaY(), -3, 8);
|
||||||
event.setCanceled(true);
|
event.setCanceled(true);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -11,6 +11,7 @@ import com.atsuishio.superbwarfare.entity.vehicle.base.ThirdPersonCameraPosition
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.LaserWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.LaserWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
||||||
|
import com.atsuishio.superbwarfare.event.ClientMouseHandler;
|
||||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||||
import com.atsuishio.superbwarfare.init.ModItems;
|
import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
import com.atsuishio.superbwarfare.init.ModSounds;
|
import com.atsuishio.superbwarfare.init.ModSounds;
|
||||||
|
@ -90,7 +91,7 @@ public class AnnihilatorEntity extends EnergyVehicleEntity implements GeoEntity,
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
||||||
return new ThirdPersonCameraPosition(16, 1.3, 0);
|
return new ThirdPersonCameraPosition(16 + 2 * ClientMouseHandler.custom3pDistanceLerp, 1.3, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -13,6 +13,7 @@ import com.atsuishio.superbwarfare.entity.vehicle.weapon.ProjectileWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.SmallCannonShellWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.SmallCannonShellWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.WgMissileWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.WgMissileWeapon;
|
||||||
|
import com.atsuishio.superbwarfare.event.ClientMouseHandler;
|
||||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||||
import com.atsuishio.superbwarfare.init.ModItems;
|
import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
import com.atsuishio.superbwarfare.init.ModSounds;
|
import com.atsuishio.superbwarfare.init.ModSounds;
|
||||||
|
@ -118,7 +119,7 @@ public class Bmp2Entity extends ContainerMobileVehicleEntity implements GeoEntit
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
||||||
return new ThirdPersonCameraPosition(3, 1, 0);
|
return new ThirdPersonCameraPosition(3 + ClientMouseHandler.custom3pDistanceLerp, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -318,7 +319,7 @@ public class Bmp2Entity extends ContainerMobileVehicleEntity implements GeoEntit
|
||||||
var smallCannonShell = ((SmallCannonShellWeapon) getWeapon(0)).create(player);
|
var smallCannonShell = ((SmallCannonShellWeapon) getWeapon(0)).create(player);
|
||||||
|
|
||||||
smallCannonShell.setPos(worldPosition.x - 1.1 * this.getDeltaMovement().x, worldPosition.y, worldPosition.z - 1.1 * this.getDeltaMovement().z);
|
smallCannonShell.setPos(worldPosition.x - 1.1 * this.getDeltaMovement().x, worldPosition.y, worldPosition.z - 1.1 * this.getDeltaMovement().z);
|
||||||
smallCannonShell.shoot(getBarrelVector(1).x, getBarrelVector(1).y + 0.005f, getBarrelVector(1).z, 20,
|
smallCannonShell.shoot(getBarrelVector(1).x, getBarrelVector(1).y + 0.005f, getBarrelVector(1).z, 35,
|
||||||
0.25f);
|
0.25f);
|
||||||
this.level().addFreshEntity(smallCannonShell);
|
this.level().addFreshEntity(smallCannonShell);
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ import com.atsuishio.superbwarfare.entity.vehicle.base.*;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.SmallCannonShellWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.SmallCannonShellWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
||||||
|
import com.atsuishio.superbwarfare.event.ClientMouseHandler;
|
||||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||||
import com.atsuishio.superbwarfare.init.ModItems;
|
import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
import com.atsuishio.superbwarfare.item.ContainerBlockItem;
|
import com.atsuishio.superbwarfare.item.ContainerBlockItem;
|
||||||
|
@ -106,7 +107,7 @@ public class Hpj11Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
||||||
return new ThirdPersonCameraPosition(2, 0.75, 0);
|
return new ThirdPersonCameraPosition(2 + 0.75 * ClientMouseHandler.custom3pDistanceLerp, 0.75, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -12,6 +12,7 @@ import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.ProjectileWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.ProjectileWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.SmallCannonShellWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.SmallCannonShellWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
||||||
|
import com.atsuishio.superbwarfare.event.ClientMouseHandler;
|
||||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||||
import com.atsuishio.superbwarfare.init.ModItems;
|
import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
import com.atsuishio.superbwarfare.init.ModSounds;
|
import com.atsuishio.superbwarfare.init.ModSounds;
|
||||||
|
@ -99,7 +100,7 @@ public class Lav150Entity extends ContainerMobileVehicleEntity implements GeoEnt
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
||||||
return new ThirdPersonCameraPosition(2.75, 1, 0);
|
return new ThirdPersonCameraPosition(2.75 + ClientMouseHandler.custom3pDistanceLerp, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -226,7 +227,7 @@ public class Lav150Entity extends ContainerMobileVehicleEntity implements GeoEnt
|
||||||
var smallCannonShell = ((SmallCannonShellWeapon) getWeapon(0)).create(player);
|
var smallCannonShell = ((SmallCannonShellWeapon) getWeapon(0)).create(player);
|
||||||
|
|
||||||
smallCannonShell.setPos(worldPosition.x - 1.1 * this.getDeltaMovement().x, worldPosition.y, worldPosition.z - 1.1 * this.getDeltaMovement().z);
|
smallCannonShell.setPos(worldPosition.x - 1.1 * this.getDeltaMovement().x, worldPosition.y, worldPosition.z - 1.1 * this.getDeltaMovement().z);
|
||||||
smallCannonShell.shoot(getBarrelVector(1).x, getBarrelVector(1).y + 0.005f, getBarrelVector(1).z, 20,
|
smallCannonShell.shoot(getBarrelVector(1).x, getBarrelVector(1).y + 0.005f, getBarrelVector(1).z, 35,
|
||||||
0.25f);
|
0.25f);
|
||||||
this.level().addFreshEntity(smallCannonShell);
|
this.level().addFreshEntity(smallCannonShell);
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.atsuishio.superbwarfare.entity.vehicle.base.VehicleEntity;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.CannonShellWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.CannonShellWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
||||||
|
import com.atsuishio.superbwarfare.event.ClientMouseHandler;
|
||||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||||
import com.atsuishio.superbwarfare.init.ModItems;
|
import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
import com.atsuishio.superbwarfare.init.ModSounds;
|
import com.atsuishio.superbwarfare.init.ModSounds;
|
||||||
|
@ -103,7 +104,7 @@ public class Mk42Entity extends VehicleEntity implements GeoEntity, CannonEntity
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
||||||
return new ThirdPersonCameraPosition(8, 1, 0);
|
return new ThirdPersonCameraPosition(8 + ClientMouseHandler.custom3pDistanceLerp, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -10,6 +10,7 @@ import com.atsuishio.superbwarfare.entity.vehicle.base.VehicleEntity;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.CannonShellWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.CannonShellWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
||||||
|
import com.atsuishio.superbwarfare.event.ClientMouseHandler;
|
||||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||||
import com.atsuishio.superbwarfare.init.ModItems;
|
import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
import com.atsuishio.superbwarfare.init.ModSounds;
|
import com.atsuishio.superbwarfare.init.ModSounds;
|
||||||
|
@ -95,7 +96,7 @@ public class Mle1934Entity extends VehicleEntity implements GeoEntity, CannonEnt
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
||||||
return new ThirdPersonCameraPosition(10, 1.3, 0);
|
return new ThirdPersonCameraPosition(10 + 1.25 * ClientMouseHandler.custom3pDistanceLerp, 1.3, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -11,6 +11,7 @@ import com.atsuishio.superbwarfare.entity.vehicle.base.WeaponVehicleEntity;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.LaserWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.LaserWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
||||||
|
import com.atsuishio.superbwarfare.event.ClientMouseHandler;
|
||||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||||
import com.atsuishio.superbwarfare.init.ModSounds;
|
import com.atsuishio.superbwarfare.init.ModSounds;
|
||||||
import com.atsuishio.superbwarfare.network.message.receive.ClientIndicatorMessage;
|
import com.atsuishio.superbwarfare.network.message.receive.ClientIndicatorMessage;
|
||||||
|
@ -100,7 +101,7 @@ public class PrismTankEntity extends ContainerMobileVehicleEntity implements Geo
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
||||||
return new ThirdPersonCameraPosition(4, 1, 1);
|
return new ThirdPersonCameraPosition(4 + ClientMouseHandler.custom3pDistanceLerp, 1, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -8,6 +8,7 @@ import com.atsuishio.superbwarfare.entity.vehicle.base.*;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
import com.atsuishio.superbwarfare.entity.vehicle.damage.DamageModifier;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.ProjectileWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.ProjectileWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
||||||
|
import com.atsuishio.superbwarfare.event.ClientMouseHandler;
|
||||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||||
import com.atsuishio.superbwarfare.init.ModItems;
|
import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
import com.atsuishio.superbwarfare.init.ModSounds;
|
import com.atsuishio.superbwarfare.init.ModSounds;
|
||||||
|
@ -80,7 +81,7 @@ public class SpeedboatEntity extends ContainerMobileVehicleEntity implements Geo
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
||||||
return new ThirdPersonCameraPosition(3, 1, 0);
|
return new ThirdPersonCameraPosition(3 + ClientMouseHandler.custom3pDistanceLerp, 1, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -4,6 +4,8 @@ import com.atsuishio.superbwarfare.Mod;
|
||||||
import com.atsuishio.superbwarfare.config.server.ExplosionConfig;
|
import com.atsuishio.superbwarfare.config.server.ExplosionConfig;
|
||||||
import com.atsuishio.superbwarfare.config.server.VehicleConfig;
|
import com.atsuishio.superbwarfare.config.server.VehicleConfig;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.base.MobileVehicleEntity;
|
import com.atsuishio.superbwarfare.entity.vehicle.base.MobileVehicleEntity;
|
||||||
|
import com.atsuishio.superbwarfare.entity.vehicle.base.ThirdPersonCameraPosition;
|
||||||
|
import com.atsuishio.superbwarfare.event.ClientMouseHandler;
|
||||||
import com.atsuishio.superbwarfare.init.ModCriteriaTriggers;
|
import com.atsuishio.superbwarfare.init.ModCriteriaTriggers;
|
||||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||||
import com.atsuishio.superbwarfare.init.ModItems;
|
import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
|
@ -68,6 +70,11 @@ public class WheelChairEntity extends MobileVehicleEntity implements GeoEntity {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
||||||
|
return new ThirdPersonCameraPosition(0.5 * ClientMouseHandler.custom3pDistanceLerp, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void addAdditionalSaveData(CompoundTag compound) {
|
public void addAdditionalSaveData(CompoundTag compound) {
|
||||||
super.addAdditionalSaveData(compound);
|
super.addAdditionalSaveData(compound);
|
||||||
|
|
|
@ -14,6 +14,7 @@ import com.atsuishio.superbwarfare.entity.vehicle.weapon.CannonShellWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.ProjectileWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.ProjectileWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.SwarmDroneWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.SwarmDroneWeapon;
|
||||||
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
import com.atsuishio.superbwarfare.entity.vehicle.weapon.VehicleWeapon;
|
||||||
|
import com.atsuishio.superbwarfare.event.ClientMouseHandler;
|
||||||
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
import com.atsuishio.superbwarfare.init.ModDamageTypes;
|
||||||
import com.atsuishio.superbwarfare.init.ModItems;
|
import com.atsuishio.superbwarfare.init.ModItems;
|
||||||
import com.atsuishio.superbwarfare.init.ModSounds;
|
import com.atsuishio.superbwarfare.init.ModSounds;
|
||||||
|
@ -171,8 +172,8 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
||||||
@Override
|
@Override
|
||||||
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
public ThirdPersonCameraPosition getThirdPersonCameraPosition(int index) {
|
||||||
return switch (index) {
|
return switch (index) {
|
||||||
case 0 -> new ThirdPersonCameraPosition(5, 1.5, -0.8669625);
|
case 0 -> new ThirdPersonCameraPosition(5 + ClientMouseHandler.custom3pDistanceLerp, 1.5, -0.8669625);
|
||||||
case 1 -> new ThirdPersonCameraPosition(-1, 0.5, 0);
|
case 1 -> new ThirdPersonCameraPosition(-1 + 0.5 * ClientMouseHandler.custom3pDistanceLerp, 0.5, 0);
|
||||||
default -> null;
|
default -> null;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,9 +19,9 @@ public class CameraTool {
|
||||||
Vec3 toVec = vehiclePosVec3.vectorTo(maxCameraPosVec3);
|
Vec3 toVec = vehiclePosVec3.vectorTo(maxCameraPosVec3);
|
||||||
|
|
||||||
if (player != null) {
|
if (player != null) {
|
||||||
HitResult hitresult = player.level().clip(new ClipContext(vehiclePosVec3, vehiclePosVec3.add(toVec), ClipContext.Block.VISUAL, ClipContext.Fluid.NONE, player));
|
HitResult hitresult = player.level().clip(new ClipContext(vehiclePosVec3, vehiclePosVec3.add(toVec).add(toVec.normalize().scale(1)), ClipContext.Block.VISUAL, ClipContext.Fluid.NONE, player));
|
||||||
if (hitresult.getType() == HitResult.Type.BLOCK) {
|
if (hitresult.getType() == HitResult.Type.BLOCK) {
|
||||||
return hitresult.getLocation().add(toVec.normalize().scale(-0.25));
|
return hitresult.getLocation().add(toVec.normalize().scale(-1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return maxCameraPosVec3;
|
return maxCameraPosVec3;
|
||||||
|
|
Loading…
Add table
Reference in a new issue