添加logo和小鸟3,4乘员位
This commit is contained in:
parent
68da4cbeae
commit
39878127c6
7 changed files with 81 additions and 28 deletions
|
@ -298,9 +298,9 @@ public class CannonShellEntity extends ThrowableItemProjectile implements GeoEnt
|
||||||
this,
|
this,
|
||||||
this.getOwner()),
|
this.getOwner()),
|
||||||
explosionDamage,
|
explosionDamage,
|
||||||
result.getLocation().x,
|
this.getX(),
|
||||||
result.getLocation().y,
|
this.getY() + 0.5 * this.getBbHeight(),
|
||||||
result.getLocation().z,
|
this.getZ(),
|
||||||
radius,
|
radius,
|
||||||
ExplosionConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).
|
ExplosionConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).
|
||||||
setDamageMultiplier(1).setFireTime(fireTime);
|
setDamageMultiplier(1).setFireTime(fireTime);
|
||||||
|
|
|
@ -107,11 +107,13 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
.zoom(false)
|
.zoom(false)
|
||||||
.heBullet(1)
|
.heBullet(1)
|
||||||
.bypassArmorRate(0.1f)
|
.bypassArmorRate(0.1f)
|
||||||
.sound(ModSounds.INTO_MISSILE.get()),
|
.sound(ModSounds.INTO_CANNON.get()),
|
||||||
new HeliRocketWeapon()
|
new HeliRocketWeapon()
|
||||||
.damage(VehicleConfig.AH_6_ROCKET_DAMAGE.get())
|
.damage(VehicleConfig.AH_6_ROCKET_DAMAGE.get())
|
||||||
.explosionDamage(VehicleConfig.AH_6_ROCKET_EXPLOSION_DAMAGE.get())
|
.explosionDamage(VehicleConfig.AH_6_ROCKET_EXPLOSION_DAMAGE.get())
|
||||||
.explosionRadius(VehicleConfig.AH_6_ROCKET_EXPLOSION_RADIUS.get()),
|
.explosionRadius(VehicleConfig.AH_6_ROCKET_EXPLOSION_RADIUS.get())
|
||||||
|
.sound(ModSounds.INTO_MISSILE.get()),
|
||||||
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -278,9 +280,13 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
@Override
|
@Override
|
||||||
public void travel() {
|
public void travel() {
|
||||||
Entity passenger = getFirstPassenger();
|
Entity passenger = getFirstPassenger();
|
||||||
|
Entity passenger2 = getNthEntity(1);
|
||||||
|
Entity passenger3 = getNthEntity(2);
|
||||||
|
Entity passenger4 = getNthEntity(3);
|
||||||
float diffX;
|
float diffX;
|
||||||
float diffY;
|
float diffY;
|
||||||
|
|
||||||
|
|
||||||
if (passenger == null) {
|
if (passenger == null) {
|
||||||
this.leftInputDown = false;
|
this.leftInputDown = false;
|
||||||
this.rightInputDown = false;
|
this.rightInputDown = false;
|
||||||
|
@ -290,6 +296,9 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
this.downInputDown = false;
|
this.downInputDown = false;
|
||||||
this.setZRot(this.roll * 0.98f);
|
this.setZRot(this.roll * 0.98f);
|
||||||
this.setXRot(this.getXRot() * 0.98f);
|
this.setXRot(this.getXRot() * 0.98f);
|
||||||
|
if (passenger2 == null && passenger3 == null && passenger4 == null) {
|
||||||
|
this.entityData.set(POWER, this.entityData.get(POWER) * 0.99f);
|
||||||
|
}
|
||||||
} else if (passenger instanceof Player) {
|
} else if (passenger instanceof Player) {
|
||||||
diffY = Math.clamp(-90f, 90f, Mth.wrapDegrees(passenger.getYHeadRot() - this.getYRot()));
|
diffY = Math.clamp(-90f, 90f, Mth.wrapDegrees(passenger.getYHeadRot() - this.getYRot()));
|
||||||
diffX = Math.clamp(-60f, 60f, Mth.wrapDegrees(passenger.getXRot() - this.getXRot()));
|
diffX = Math.clamp(-60f, 60f, Mth.wrapDegrees(passenger.getXRot() - this.getXRot()));
|
||||||
|
@ -403,17 +412,30 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void clampRotation(Entity entity) {
|
protected void clampRotation(Entity entity) {
|
||||||
float f = Mth.wrapDegrees(entity.getXRot());
|
if (entity == getNthEntity(0) || entity == getNthEntity(1)) {
|
||||||
float f1 = Mth.clamp(f, -80.0F, 80F);
|
float f = Mth.wrapDegrees(entity.getXRot());
|
||||||
entity.xRotO += f1 - f;
|
float f1 = Mth.clamp(f, -80.0F, 80F);
|
||||||
entity.setXRot(entity.getXRot() + f1 - f);
|
entity.xRotO += f1 - f;
|
||||||
|
entity.setXRot(entity.getXRot() + f1 - f);
|
||||||
|
|
||||||
entity.setYBodyRot(this.getYRot());
|
float f2 = Mth.wrapDegrees(entity.getYRot() - this.getYRot());
|
||||||
float f2 = Mth.wrapDegrees(entity.getYRot() - this.getYRot());
|
float f3 = Mth.clamp(f2, -80.0F, 80.0F);
|
||||||
float f3 = Mth.clamp(f2, -80.0F, 80.0F);
|
entity.yRotO += f3 - f2;
|
||||||
entity.yRotO += f3 - f2;
|
entity.setYRot(entity.getYRot() + f3 - f2);
|
||||||
entity.setYRot(entity.getYRot() + f3 - f2);
|
entity.setYBodyRot(this.getYRot());
|
||||||
entity.setYBodyRot(this.getYRot());
|
} else if (entity == getNthEntity(2)) {
|
||||||
|
float f2 = Mth.wrapDegrees(entity.getYRot() - this.getYRot());
|
||||||
|
float f3 = Mth.clamp(f2, 10.0F, 170.0F);
|
||||||
|
entity.yRotO += f3 - f2;
|
||||||
|
entity.setYRot(entity.getYRot() + f3 - f2);
|
||||||
|
entity.setYBodyRot(getYRot() + 90);
|
||||||
|
} else if (entity == getNthEntity(3)) {
|
||||||
|
float f2 = Mth.wrapDegrees(entity.getYRot() - this.getYRot());
|
||||||
|
float f3 = Mth.clamp(f2, -170.0F, -10.0F);
|
||||||
|
entity.yRotO += f3 - f2;
|
||||||
|
entity.setYRot(entity.getYRot() + f3 - f2);
|
||||||
|
entity.setYBodyRot(getYRot() - 90);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -445,6 +467,14 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
Vector4f worldPosition = transformPosition(transform, -x, y, z);
|
Vector4f worldPosition = transformPosition(transform, -x, y, z);
|
||||||
passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z);
|
passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z);
|
||||||
callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z);
|
callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z);
|
||||||
|
} else if (i == 2) {
|
||||||
|
Vector4f worldPosition = transformPosition(transform, -1.4f, -1.05f, 0);
|
||||||
|
passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z);
|
||||||
|
callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z);
|
||||||
|
} else if (i == 3) {
|
||||||
|
Vector4f worldPosition = transformPosition(transform, 1.4f, -1.05f, 0);
|
||||||
|
passenger.setPos(worldPosition.x, worldPosition.y, worldPosition.z);
|
||||||
|
callback.accept(passenger, worldPosition.x, worldPosition.y, worldPosition.z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (passenger != this.getFirstPassenger()) {
|
if (passenger != this.getFirstPassenger()) {
|
||||||
|
@ -455,12 +485,28 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
}
|
}
|
||||||
|
|
||||||
public void copyEntityData(Entity entity) {
|
public void copyEntityData(Entity entity) {
|
||||||
float f = Mth.wrapDegrees(entity.getYRot() - getYRot());
|
if (entity == getNthEntity(0) || entity == getNthEntity(1)) {
|
||||||
float g = Mth.clamp(f, -105.0f, 105.0f);
|
float f = Mth.wrapDegrees(entity.getYRot() - getYRot());
|
||||||
entity.yRotO += g - f;
|
float g = Mth.clamp(f, -105.0f, 105.0f);
|
||||||
entity.setYRot(entity.getYRot() + g - f);
|
entity.yRotO += g - f;
|
||||||
entity.setYHeadRot(entity.getYRot());
|
entity.setYRot(entity.getYRot() + g - f);
|
||||||
entity.setYBodyRot(getYRot());
|
entity.setYHeadRot(entity.getYRot());
|
||||||
|
entity.setYBodyRot(getYRot());
|
||||||
|
} else if (entity == getNthEntity(2)) {
|
||||||
|
float f = Mth.wrapDegrees(entity.getYRot() - getYRot());
|
||||||
|
float g = Mth.clamp(f, 10.0f, 170.0f);
|
||||||
|
entity.yRotO += g - f;
|
||||||
|
entity.setYRot(entity.getYRot() + g - f);
|
||||||
|
entity.setYHeadRot(entity.getYRot());
|
||||||
|
entity.setYBodyRot(getYRot() + 90);
|
||||||
|
} else if (entity == getNthEntity(3)) {
|
||||||
|
float f = Mth.wrapDegrees(entity.getYRot() - getYRot());
|
||||||
|
float g = Mth.clamp(f, -170.0f, -10.0f);
|
||||||
|
entity.yRotO += g - f;
|
||||||
|
entity.setYRot(entity.getYRot() + g - f);
|
||||||
|
entity.setYHeadRot(entity.getYRot());
|
||||||
|
entity.setYBodyRot(getYRot() - 90);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -636,7 +682,7 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
Vec3 vec3d = getDismountOffset(getBbWidth() * Mth.SQRT_OF_TWO, passenger.getBbWidth() * Mth.SQRT_OF_TWO);
|
Vec3 vec3d = getDismountOffset(getBbWidth() * Mth.SQRT_OF_TWO, passenger.getBbWidth() * Mth.SQRT_OF_TWO);
|
||||||
double ox = getX() + vec3d.x;
|
double ox = getX() + vec3d.x;
|
||||||
int i = this.getOrderedPassengers().indexOf(passenger);
|
int i = this.getOrderedPassengers().indexOf(passenger);
|
||||||
if (i == 0 || i == 2) {
|
if (i == 0 || i == 2 || i == 3 || i == 4) {
|
||||||
ox = getX() - vec3d.x;
|
ox = getX() - vec3d.x;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -721,7 +767,7 @@ public class Ah6Entity extends ContainerMobileVehicleEntity implements GeoEntity
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getMaxPassengers() {
|
public int getMaxPassengers() {
|
||||||
return 2;
|
return 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -64,7 +64,9 @@ import software.bernie.geckolib.core.animatable.instance.AnimatableInstanceCache
|
||||||
import software.bernie.geckolib.core.animation.AnimatableManager;
|
import software.bernie.geckolib.core.animation.AnimatableManager;
|
||||||
import software.bernie.geckolib.util.GeckoLibUtil;
|
import software.bernie.geckolib.util.GeckoLibUtil;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.Comparator;
|
||||||
|
import java.util.Objects;
|
||||||
|
import java.util.UUID;
|
||||||
|
|
||||||
public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
|
public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
|
||||||
|
|
||||||
|
@ -90,7 +92,6 @@ public class DroneEntity extends MobileVehicleEntity implements GeoEntity {
|
||||||
public int holdTickX;
|
public int holdTickX;
|
||||||
public int holdTickY;
|
public int holdTickY;
|
||||||
public int holdTickZ;
|
public int holdTickZ;
|
||||||
public Set<Long> loadedChunks = new HashSet<>();
|
|
||||||
|
|
||||||
public DroneEntity(PlayMessages.SpawnEntity packet, Level world) {
|
public DroneEntity(PlayMessages.SpawnEntity packet, Level world) {
|
||||||
this(ModEntities.DRONE.get(), world);
|
this(ModEntities.DRONE.get(), world);
|
||||||
|
|
|
@ -850,7 +850,7 @@ public class Yx100Entity extends ContainerMobileVehicleEntity implements GeoEnti
|
||||||
}
|
}
|
||||||
|
|
||||||
private PlayState cannonShootPredicate(AnimationState<Yx100Entity> event) {
|
private PlayState cannonShootPredicate(AnimationState<Yx100Entity> event) {
|
||||||
if (this.entityData.get(CANNON_FIRE_TIME) > 20) {
|
if (this.entityData.get(CANNON_FIRE_TIME) > 0) {
|
||||||
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.yx100.fire"));
|
return event.setAndContinue(RawAnimation.begin().thenPlay("animation.yx100.fire"));
|
||||||
}
|
}
|
||||||
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.yx100.idle"));
|
return event.setAndContinue(RawAnimation.begin().thenLoop("animation.yx100.idle"));
|
||||||
|
|
|
@ -17,8 +17,13 @@ public class LivingEntityRendererMixin<T extends LivingEntity> {
|
||||||
@Inject(method = "setupRotations", at = @At("TAIL"))
|
@Inject(method = "setupRotations", at = @At("TAIL"))
|
||||||
public void render(T entity, PoseStack matrices, float animationProgress, float bodyYaw, float tickDelta, CallbackInfo ci) {
|
public void render(T entity, PoseStack matrices, float animationProgress, float bodyYaw, float tickDelta, CallbackInfo ci) {
|
||||||
if (entity.getRootVehicle() != entity && entity.getRootVehicle() instanceof Ah6Entity ah6Entity) {
|
if (entity.getRootVehicle() != entity && entity.getRootVehicle() instanceof Ah6Entity ah6Entity) {
|
||||||
matrices.mulPose(Axis.XP.rotationDegrees(-ah6Entity.getViewXRot(tickDelta)));
|
if (entity == ah6Entity.getNthEntity(2) || entity == ah6Entity.getNthEntity(3)) {
|
||||||
matrices.mulPose(Axis.ZP.rotationDegrees(-ah6Entity.getRoll(tickDelta)));
|
matrices.mulPose(Axis.XP.rotationDegrees(-ah6Entity.getRoll(tickDelta)));
|
||||||
|
matrices.mulPose(Axis.ZP.rotationDegrees(ah6Entity.getViewXRot(tickDelta)));
|
||||||
|
} else {
|
||||||
|
matrices.mulPose(Axis.XP.rotationDegrees(-ah6Entity.getViewXRot(tickDelta)));
|
||||||
|
matrices.mulPose(Axis.ZP.rotationDegrees(-ah6Entity.getRoll(tickDelta)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (entity.getRootVehicle() != entity && entity.getRootVehicle() instanceof Tom6Entity tom6Entity) {
|
if (entity.getRootVehicle() != entity && entity.getRootVehicle() instanceof Tom6Entity tom6Entity) {
|
||||||
matrices.mulPose(Axis.XP.rotationDegrees(-tom6Entity.getViewXRot(tickDelta)));
|
matrices.mulPose(Axis.XP.rotationDegrees(-tom6Entity.getViewXRot(tickDelta)));
|
||||||
|
|
|
@ -7,6 +7,7 @@ modId = "superbwarfare"
|
||||||
version = "${mod_version}"
|
version = "${mod_version}"
|
||||||
displayName = "Superb Warfare"
|
displayName = "Superb Warfare"
|
||||||
authors = "${mod_authors}"
|
authors = "${mod_authors}"
|
||||||
|
logoFile = "logo.png"
|
||||||
description = "${mod_description}"
|
description = "${mod_description}"
|
||||||
|
|
||||||
[[dependencies.superbwarfare]]
|
[[dependencies.superbwarfare]]
|
||||||
|
|
BIN
src/main/resources/logo.png
Normal file
BIN
src/main/resources/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 136 KiB |
Loading…
Add table
Reference in a new issue