diff --git a/src/main/java/net/mcreator/superbwarfare/client/screens/CannonHudOverlay.java b/src/main/java/net/mcreator/superbwarfare/client/screens/CannonHudOverlay.java index 9428535f0..cb995d859 100644 --- a/src/main/java/net/mcreator/superbwarfare/client/screens/CannonHudOverlay.java +++ b/src/main/java/net/mcreator/superbwarfare/client/screens/CannonHudOverlay.java @@ -111,12 +111,12 @@ public class CannonHudOverlay { if (cannon instanceof Mk42Entity) { health = cannon.getEntityData().get(net.mcreator.superbwarfare.entity.Mk42Entity.HEALTH); - maxHealth = 500; + maxHealth = 1000; } if (cannon instanceof Mle1934Entity) { health = cannon.getEntityData().get(net.mcreator.superbwarfare.entity.Mle1934Entity.HEALTH); - maxHealth = 600; + maxHealth = 1200; } GuiGraphics guiGraphics = event.getGuiGraphics(); diff --git a/src/main/java/net/mcreator/superbwarfare/client/screens/KillMessageOverlay.java b/src/main/java/net/mcreator/superbwarfare/client/screens/KillMessageOverlay.java index e0cb467c4..70cc58f09 100644 --- a/src/main/java/net/mcreator/superbwarfare/client/screens/KillMessageOverlay.java +++ b/src/main/java/net/mcreator/superbwarfare/client/screens/KillMessageOverlay.java @@ -41,6 +41,7 @@ public class KillMessageOverlay { private static final ResourceLocation BLEEDING = ModUtils.loc("textures/screens/damage_types/bleeding.png"); private static final ResourceLocation SHOCK = ModUtils.loc("textures/screens/damage_types/shock.png"); private static final ResourceLocation BLOOD_CRYSTAL = ModUtils.loc("textures/screens/damage_types/blood_crystal.png"); + private static final ResourceLocation BURN = ModUtils.loc("textures/screens/damage_types/burn.png"); private static final ResourceLocation WORLD_PEACE_STAFF = ModUtils.loc("textures/gun_icon/compat/world_peace_staff.png"); @@ -255,7 +256,7 @@ public class KillMessageOverlay { icon = null; } else { // 如果是其他伤害,则渲染对应图标 - if (record.damageType == DamageTypes.EXPLOSION || record.damageType == DamageTypes.PLAYER_EXPLOSION || record.damageType == ModDamageTypes.PROJECTILE_BOOM) { + if (record.damageType == DamageTypes.EXPLOSION || record.damageType == DamageTypes.PLAYER_EXPLOSION || record.damageType == ModDamageTypes.PROJECTILE_BOOM || record.damageType == DamageTypes.FIREWORKS) { icon = EXPLOSION; } else if (record.damageType == DamageTypes.PLAYER_ATTACK) { icon = KNIFE; @@ -269,6 +270,8 @@ public class KillMessageOverlay { icon = BLOOD_CRYSTAL; } else if (record.damageType == ModDamageTypes.SHOCK) { icon = SHOCK; + } else if (record.damageType == ModDamageTypes.BURN || record.damageType == DamageTypes.IN_FIRE || record.damageType == DamageTypes.ON_FIRE || record.damageType == DamageTypes.LAVA) { + icon = BURN; } else { icon = GENERIC; } diff --git a/src/main/java/net/mcreator/superbwarfare/entity/ClaymoreEntity.java b/src/main/java/net/mcreator/superbwarfare/entity/ClaymoreEntity.java index ef0841069..3513f787e 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/ClaymoreEntity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/ClaymoreEntity.java @@ -228,8 +228,8 @@ public class ClaymoreEntity extends Entity implements GeoEntity, AnimatedEntity, private void triggerExplode(Entity target) { CustomExplosion explosion = new CustomExplosion(this.level(), this, - ModDamageTypes.causeMineDamage(this.level().registryAccess(), this.getOwner()), 40f, - target.getX(), target.getY(), target.getZ(), 4f, ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).setDamageMultiplier(1); + ModDamageTypes.causeMineDamage(this.level().registryAccess(), this.getOwner()), 140f, + target.getX(), target.getY(), target.getZ(), 5f, ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).setDamageMultiplier(1); explosion.explode(); net.minecraftforge.event.ForgeEventFactory.onExplosionStart(this.level(), explosion); explosion.finalizeExplosion(false); diff --git a/src/main/java/net/mcreator/superbwarfare/entity/DroneEntity.java b/src/main/java/net/mcreator/superbwarfare/entity/DroneEntity.java index 5af3de0ea..a0e69450e 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/DroneEntity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/DroneEntity.java @@ -185,6 +185,8 @@ public class DroneEntity extends LivingEntity implements GeoEntity { this.entityData.set(ROT_Z, compound.getFloat("rotZ")); } + + @Override public void baseTick() { super.baseTick(); @@ -224,7 +226,7 @@ public class DroneEntity extends LivingEntity implements GeoEntity { this.entityData.set(MOVE_Y, 1.5f); } - this.entityData.set(MOVE_Y, Mth.lerp(0.1f, this.entityData.get(MOVE_Y), 0)); + this.entityData.set(MOVE_Y, Mth.lerp(0.5f, this.entityData.get(MOVE_Y), 0)); this.setDeltaMovement(new Vec3( this.getDeltaMovement().x + -this.entityData.get(MOVE_Z) * 0.1f * this.getLookAngle().x, @@ -242,7 +244,7 @@ public class DroneEntity extends LivingEntity implements GeoEntity { Vec3 vec = this.getDeltaMovement(); if (this.getDeltaMovement().horizontalDistanceSqr() < 0.75) { if (this.move) { - this.setDeltaMovement(vec.multiply(1.04, 1, 1.04)); + this.setDeltaMovement(vec.multiply(1.04, 0.99, 1.04)); } } diff --git a/src/main/java/net/mcreator/superbwarfare/entity/Mk42Entity.java b/src/main/java/net/mcreator/superbwarfare/entity/Mk42Entity.java index de487f171..dc2be8478 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/Mk42Entity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/Mk42Entity.java @@ -49,7 +49,7 @@ public class Mk42Entity extends Entity implements GeoEntity, ICannonEntity { public static final EntityDataAccessor TYPE = SynchedEntityData.defineId(Mk42Entity.class, EntityDataSerializers.INT); public static final EntityDataAccessor HEALTH = SynchedEntityData.defineId(Mk42Entity.class, EntityDataSerializers.FLOAT); private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this); - public static final float MAX_HEALTH = 500.0f; + public static final float MAX_HEALTH = 700.0f; protected int interpolationSteps; protected double serverYRot; protected double serverXRot; @@ -283,21 +283,21 @@ public class Mk42Entity extends Entity implements GeoEntity, ICannonEntity { int durability = 0; if (stack.is(ModItems.HE_5_INCHES.get())) { - hitDamage = 180; - explosionRadius = 10; - explosionDamage = 220; + hitDamage = 400; + explosionRadius = 12; + explosionDamage = 420; fireProbability = 0.18F; fireTime = 2; durability = 1; } if (stack.is(ModItems.AP_5_INCHES.get())) { - hitDamage = 360; + hitDamage = 800; explosionRadius = 3; - explosionDamage = 100; + explosionDamage = 200; fireProbability = 0; fireTime = 0; - durability = 30; + durability = 60; } if (!player.isCreative()) { diff --git a/src/main/java/net/mcreator/superbwarfare/entity/Mle1934Entity.java b/src/main/java/net/mcreator/superbwarfare/entity/Mle1934Entity.java index f43635659..620c51cd8 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/Mle1934Entity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/Mle1934Entity.java @@ -52,7 +52,7 @@ public class Mle1934Entity extends Entity implements GeoEntity, ICannonEntity { public static final EntityDataAccessor HEALTH = SynchedEntityData.defineId(Mle1934Entity.class, EntityDataSerializers.FLOAT); private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this); - public static final float MAX_HEALTH = 600.0f; + public static final float MAX_HEALTH = 800.0f; public String animationprocedure = "empty"; @@ -282,9 +282,9 @@ public class Mle1934Entity extends Entity implements GeoEntity, ICannonEntity { boolean salvoShoot = false; if (stack.is(ModItems.HE_5_INCHES.get())) { - hitDamage = 200; + hitDamage = 450; explosionRadius = 13; - explosionDamage = 240; + explosionDamage = 480; fireProbability = 0.24F; fireTime = 5; durability = 1; @@ -292,12 +292,12 @@ public class Mle1934Entity extends Entity implements GeoEntity, ICannonEntity { } if (stack.is(ModItems.AP_5_INCHES.get())) { - hitDamage = 400; + hitDamage = 900; explosionRadius = 3.8f; - explosionDamage = 120; + explosionDamage = 220; fireProbability = 0; fireTime = 0; - durability = 50; + durability = 70; salvoShoot = stack.getCount() > 1 || player.isCreative(); } diff --git a/src/main/java/net/mcreator/superbwarfare/entity/TargetEntity.java b/src/main/java/net/mcreator/superbwarfare/entity/TargetEntity.java index 518b97a17..be21d8c9c 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/TargetEntity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/TargetEntity.java @@ -106,9 +106,9 @@ public class TargetEntity extends LivingEntity implements GeoEntity, AnimatedEnt } if (!this.level().isClientSide()) { - this.level().playSound(null, BlockPos.containing(this.getX(), this.getY(), this.getZ()), ModSounds.HIT.get(), SoundSource.BLOCKS, 3, 1); + this.level().playSound(null, BlockPos.containing(this.getX(), this.getY(), this.getZ()), ModSounds.HIT.get(), SoundSource.BLOCKS, 1, 1); } else { - this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), ModSounds.HIT.get(), SoundSource.BLOCKS, 3, 1, false); + this.level().playLocalSound(this.getX(), this.getY(), this.getZ(), ModSounds.HIT.get(), SoundSource.BLOCKS, 1, 1, false); } return super.hurt(source, amount); } diff --git a/src/main/java/net/mcreator/superbwarfare/entity/projectile/GunGrenadeEntity.java b/src/main/java/net/mcreator/superbwarfare/entity/projectile/GunGrenadeEntity.java index de74c3ae6..dcedcaa31 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/projectile/GunGrenadeEntity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/projectile/GunGrenadeEntity.java @@ -32,7 +32,7 @@ import net.minecraftforge.network.PlayMessages; public class GunGrenadeEntity extends ThrowableItemProjectile { private float monsterMultiplier = 0.0f; - private float damage = 5.0f; + private float damage = 80.0f; public GunGrenadeEntity(EntityType type, Level world) { super(type, world); @@ -83,16 +83,16 @@ public class GunGrenadeEntity extends ThrowableItemProjectile { } if (entity instanceof Monster monster) { - monster.hurt(ModDamageTypes.causeGunFireHeadshotDamage(this.level().registryAccess(), this, this.getOwner()), this.damage * damageMultiplier); + monster.hurt(ModDamageTypes.causeGunFireHeadshotDamage(this.level().registryAccess(), this, this.getOwner()), 1.6f * this.damage * damageMultiplier); } else { - entity.hurt(ModDamageTypes.causeGunFireHeadshotDamage(this.level().registryAccess(), this, this.getOwner()), this.damage); + entity.hurt(ModDamageTypes.causeGunFireHeadshotDamage(this.level().registryAccess(), this, this.getOwner()), 1.6f * this.damage); } if (this.tickCount > 0) { if (this.level() instanceof ServerLevel) { ProjectileTool.causeCustomExplode(this, ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()), - entity, this.damage * 1.8f, 7.5f, this.monsterMultiplier); + entity, this.damage * 1.4f, 7.5f, this.monsterMultiplier); } } @@ -112,7 +112,7 @@ public class GunGrenadeEntity extends ThrowableItemProjectile { if (this.level() instanceof ServerLevel) { ProjectileTool.causeCustomExplode(this, ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()), - this, this.damage * 1.8f, 7.5f, this.monsterMultiplier); + this, this.damage * 1.4f, 7.5f, this.monsterMultiplier); } } diff --git a/src/main/java/net/mcreator/superbwarfare/entity/projectile/HandGrenadeEntity.java b/src/main/java/net/mcreator/superbwarfare/entity/projectile/HandGrenadeEntity.java index f42c05d77..53a8f1b9f 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/projectile/HandGrenadeEntity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/projectile/HandGrenadeEntity.java @@ -128,7 +128,7 @@ public class HandGrenadeEntity extends ThrowableItemProjectile { if (this.fuse <= 0) { this.discard(); if (!this.level().isClientSide) { - ProjectileTool.causeCustomExplode(this, 90f, 6.5f, 1.25f); + ProjectileTool.causeCustomExplode(this, 175f, 7.25f, 2.2f); } } diff --git a/src/main/java/net/mcreator/superbwarfare/entity/projectile/JavelinMissileEntity.java b/src/main/java/net/mcreator/superbwarfare/entity/projectile/JavelinMissileEntity.java index 30c47d638..2ef9aa55c 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/projectile/JavelinMissileEntity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/projectile/JavelinMissileEntity.java @@ -55,7 +55,7 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo public String animationprocedure = "empty"; private float monsterMultiplier = 0.0f; - private float damage = 300.0f; + private float damage = 700.0f; public JavelinMissileEntity(EntityType type, Level world) { super(type, world); @@ -129,7 +129,7 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo if (this.level() instanceof ServerLevel) { ProjectileTool.causeCustomExplode(this, ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()), - entity, this.damage, 8.0f, this.monsterMultiplier); + entity, this.damage, 6.0f, this.monsterMultiplier); } } @@ -155,7 +155,7 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo if (this.level() instanceof ServerLevel) { ProjectileTool.causeCustomExplode(this, ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()), - this, this.damage, 8.0f, this.monsterMultiplier); + this, this.damage, 6.0f, this.monsterMultiplier); } } @@ -185,10 +185,10 @@ public class JavelinMissileEntity extends ThrowableItemProjectile implements Geo if (Math.sqrt(Math.pow(px - ex, 2) + Math.pow(pz - ez, 2)) > 10) { this.look(EntityAnchorArgument.Anchor.EYES, new Vec3(entity.getX(), entity.getY() + Mth.clamp(4 * this.tickCount, 0, 90), entity.getZ())); } else { - this.look(EntityAnchorArgument.Anchor.EYES, new Vec3(entity.getX(), entity.getEyeY() + (entity instanceof EnderDragon ? -3 : 1), entity.getZ())); + this.look(EntityAnchorArgument.Anchor.EYES, new Vec3(entity.getX(), entity.getEyeY() + (entity instanceof EnderDragon ? -3 : 0), entity.getZ())); } } else { - this.look(EntityAnchorArgument.Anchor.EYES, new Vec3(entity.getX(), entity.getEyeY() + (entity instanceof EnderDragon ? -3 : 1), entity.getZ())); + this.look(EntityAnchorArgument.Anchor.EYES, new Vec3(entity.getX(), entity.getEyeY() + (entity instanceof EnderDragon ? -3 : 0), entity.getZ())); } } } diff --git a/src/main/java/net/mcreator/superbwarfare/entity/projectile/MortarShellEntity.java b/src/main/java/net/mcreator/superbwarfare/entity/projectile/MortarShellEntity.java index b9f2cf75c..60923db23 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/projectile/MortarShellEntity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/projectile/MortarShellEntity.java @@ -26,7 +26,7 @@ import net.minecraftforge.network.PlayMessages; public class MortarShellEntity extends ThrowableItemProjectile { - private float damage = 150f; + private float damage = 250f; private int life = 600; private float radius = 12.5f; @@ -61,7 +61,7 @@ public class MortarShellEntity extends ThrowableItemProjectile { if (pCompound.contains("Damage")) { this.damage = pCompound.getFloat("Damage"); } else { - this.damage = 150f; + this.damage = 250f; } if (pCompound.contains("Life")) { diff --git a/src/main/java/net/mcreator/superbwarfare/entity/projectile/ProjectileEntity.java b/src/main/java/net/mcreator/superbwarfare/entity/projectile/ProjectileEntity.java index de80e51f7..850f6ab63 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/projectile/ProjectileEntity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/projectile/ProjectileEntity.java @@ -302,14 +302,13 @@ public class ProjectileEntity extends Entity implements IEntityAdditionalSpawnDa } if (fireBullet && dragonBreath && this.level() instanceof ServerLevel serverLevel) { - for (int index0 = 0; index0 < 1; index0++) { - ParticleTool.sendParticle(serverLevel, ParticleTypes.FLAME, - this.getX(), this.getY(), this.getZ(), - 0, - this.getDeltaMovement().x, this.getDeltaMovement().y, this.getDeltaMovement().z, - this.getDeltaMovement().length(), true - ); - } + double randomPos = this.tickCount * 0.08 * (Math.random() - 0.5); + ParticleTool.sendParticle(serverLevel, ParticleTypes.FLAME, + (this.xo + this.getX()) / 2 + randomPos, (this.yo + this.getY()) / 2 + randomPos, (this.zo + this.getZ()) / 2 + randomPos, + 0, + this.getDeltaMovement().x, this.getDeltaMovement().y, this.getDeltaMovement().z, + Math.max(this.getDeltaMovement().length() - 1.1 * this.tickCount, 0.2), true + ); } } diff --git a/src/main/java/net/mcreator/superbwarfare/entity/projectile/RgoGrenadeEntity.java b/src/main/java/net/mcreator/superbwarfare/entity/projectile/RgoGrenadeEntity.java index 96e6968cc..7369b34af 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/projectile/RgoGrenadeEntity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/projectile/RgoGrenadeEntity.java @@ -82,8 +82,7 @@ public class RgoGrenadeEntity extends ThrowableItemProjectile implements GeoEnti if (state.getBlock() instanceof BellBlock bell) { bell.attemptToRing(this.level(), resultPos, blockResult.getDirection()); } - - ProjectileTool.causeCustomExplode(this, 75f, 5.75f, 1.25f); + ProjectileTool.causeCustomExplode(this, 135f, 6.75f, 1.5f); break; case ENTITY: EntityHitResult entityResult = (EntityHitResult) result; @@ -98,8 +97,7 @@ public class RgoGrenadeEntity extends ThrowableItemProjectile implements GeoEnti ModUtils.PACKET_HANDLER.send(PacketDistributor.PLAYER.with(() -> player), new ClientIndicatorMessage(0, 5)); } } - - ProjectileTool.causeCustomExplode(this, entity, 75f, 5.75f, 1.25f); + ProjectileTool.causeCustomExplode(this, 150f, 4.75f, 2f); break; default: break; @@ -114,7 +112,7 @@ public class RgoGrenadeEntity extends ThrowableItemProjectile implements GeoEnti if (this.fuse <= 0) { this.discard(); if (!this.level().isClientSide) { - ProjectileTool.causeCustomExplode(this, 75f, 5.75f, 1.25f); + ProjectileTool.causeCustomExplode(this, 135f, 6.75f, 1.5f); } } diff --git a/src/main/java/net/mcreator/superbwarfare/entity/projectile/RpgRocketEntity.java b/src/main/java/net/mcreator/superbwarfare/entity/projectile/RpgRocketEntity.java index c5de41f68..9473661de 100644 --- a/src/main/java/net/mcreator/superbwarfare/entity/projectile/RpgRocketEntity.java +++ b/src/main/java/net/mcreator/superbwarfare/entity/projectile/RpgRocketEntity.java @@ -1,14 +1,15 @@ package net.mcreator.superbwarfare.entity.projectile; import net.mcreator.superbwarfare.ModUtils; +import net.mcreator.superbwarfare.config.server.ExplosionDestroyConfig; import net.mcreator.superbwarfare.entity.AnimatedEntity; import net.mcreator.superbwarfare.init.ModDamageTypes; import net.mcreator.superbwarfare.init.ModEntities; import net.mcreator.superbwarfare.init.ModItems; import net.mcreator.superbwarfare.init.ModSounds; import net.mcreator.superbwarfare.network.message.ClientIndicatorMessage; +import net.mcreator.superbwarfare.tools.CustomExplosion; import net.mcreator.superbwarfare.tools.ParticleTool; -import net.mcreator.superbwarfare.tools.ProjectileTool; import net.minecraft.core.BlockPos; import net.minecraft.core.particles.ParticleTypes; import net.minecraft.network.protocol.Packet; @@ -19,12 +20,14 @@ import net.minecraft.network.syncher.SynchedEntityData; import net.minecraft.server.level.ServerLevel; import net.minecraft.server.level.ServerPlayer; import net.minecraft.sounds.SoundSource; +import net.minecraft.world.damagesource.DamageSource; import net.minecraft.world.entity.Entity; import net.minecraft.world.entity.EntityType; import net.minecraft.world.entity.LivingEntity; import net.minecraft.world.entity.monster.Monster; import net.minecraft.world.entity.projectile.ThrowableItemProjectile; import net.minecraft.world.item.Item; +import net.minecraft.world.level.Explosion; import net.minecraft.world.level.Level; import net.minecraft.world.level.block.BellBlock; import net.minecraft.world.level.block.state.BlockState; @@ -42,6 +45,8 @@ import software.bernie.geckolib.core.animation.RawAnimation; import software.bernie.geckolib.core.object.PlayState; import software.bernie.geckolib.util.GeckoLibUtil; +import javax.annotation.Nullable; + public class RpgRocketEntity extends ThrowableItemProjectile implements GeoEntity, AnimatedEntity { public static final EntityDataAccessor ANIMATION = SynchedEntityData.defineId(RpgRocketEntity.class, EntityDataSerializers.STRING); private final AnimatableInstanceCache cache = GeckoLibUtil.createInstanceCache(this); @@ -49,7 +54,7 @@ public class RpgRocketEntity extends ThrowableItemProjectile implements GeoEntit public String animationprocedure = "empty"; private float monsterMultiplier = 0.0f; - private float damage = 150f; + private float damage = 500f; public RpgRocketEntity(EntityType type, Level world) { super(type, world); @@ -100,14 +105,14 @@ public class RpgRocketEntity extends ThrowableItemProjectile implements GeoEntit } if (entity instanceof Monster monster) { - monster.hurt(ModDamageTypes.causeCannonFireDamage(this.level().registryAccess(), this, this.getOwner()), this.damage * damageMultiplier); + monster.hurt(ModDamageTypes.causeCannonFireDamage(this.level().registryAccess(), this, this.getOwner()), 1.4f * this.damage * damageMultiplier); } else { entity.hurt(ModDamageTypes.causeCannonFireDamage(this.level().registryAccess(), this, this.getOwner()), this.damage); } if (this.tickCount > 1) { if (this.level() instanceof ServerLevel) { - ProjectileTool.causeCustomExplode(this, + causeRpgExplode(this, ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()), entity, this.damage * 0.67f, 10.0f, this.monsterMultiplier); } @@ -128,7 +133,7 @@ public class RpgRocketEntity extends ThrowableItemProjectile implements GeoEntit if (this.tickCount > 1) { if (this.level() instanceof ServerLevel) { - ProjectileTool.causeCustomExplode(this, + causeRpgExplode(this, ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()), this, this.damage * 0.67f, 10.0f, this.monsterMultiplier); } @@ -157,7 +162,7 @@ public class RpgRocketEntity extends ThrowableItemProjectile implements GeoEntit if (this.tickCount > 100 || this.isInWater()) { if (this.level() instanceof ServerLevel) { - ProjectileTool.causeCustomExplode(this, + causeRpgExplode(this, ModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()), this, this.damage * 0.67f, 10.0f, this.monsterMultiplier); } @@ -165,6 +170,16 @@ public class RpgRocketEntity extends ThrowableItemProjectile implements GeoEntit } } + public static void causeRpgExplode(ThrowableItemProjectile projectile, @Nullable DamageSource source, Entity target, float damage, float radius, float damageMultiplier) { + CustomExplosion explosion = new CustomExplosion(projectile.level(), projectile, source, damage, + target.getX(), target.getY(), target.getZ(), radius, ExplosionDestroyConfig.EXPLOSION_DESTROY.get() ? Explosion.BlockInteraction.DESTROY : Explosion.BlockInteraction.KEEP).setDamageMultiplier(damageMultiplier); + explosion.explode(); + net.minecraftforge.event.ForgeEventFactory.onExplosionStart(projectile.level(), explosion); + explosion.finalizeExplosion(false); + ParticleTool.spawnHugeExplosionParticles(projectile.level(), projectile.position()); + projectile.discard(); + } + private PlayState movementPredicate(AnimationState event) { if (this.animationprocedure.equals("empty")) { return event.setAndContinue(RawAnimation.begin().thenLoop("animation.rpg.idle")); diff --git a/src/main/java/net/mcreator/superbwarfare/event/LivingEventHandler.java b/src/main/java/net/mcreator/superbwarfare/event/LivingEventHandler.java index 3d66fefc0..f2ae08778 100644 --- a/src/main/java/net/mcreator/superbwarfare/event/LivingEventHandler.java +++ b/src/main/java/net/mcreator/superbwarfare/event/LivingEventHandler.java @@ -68,6 +68,8 @@ public class LivingEventHandler { handleGunPerksWhenDeath(event); handlePlayerKillEntity(event); handlePlayerDeathDropAmmo(event.getEntity()); + giveKillExpToWeapon(event); + } /** @@ -162,8 +164,33 @@ public class LivingEventHandler { if (!(sourceEntity instanceof Player player)) return; ItemStack stack = player.getMainHandItem(); if (!stack.is(ModTags.Items.GUN)) return; + if (event.getEntity() instanceof TargetEntity) return; - double amount = event.getAmount(); + double amount = Math.min(0.125 * event.getAmount(), event.getEntity().getMaxHealth()); + + // 先处理发射器类武器或高爆弹的爆炸伤害 + if (source.is(ModDamageTypes.PROJECTILE_BOOM)) { + if (stack.is(ModTags.Items.LAUNCHER) || PerkHelper.getItemPerkLevel(ModPerks.HE_BULLET.get(), stack) > 0) { + stack.getOrCreateTag().putDouble("Exp", stack.getOrCreateTag().getDouble("Exp") + amount); + } + } + + // 再判断是不是枪械能造成的伤害 + if (!DamageTypeTool.isGunDamage(source)) return; + + stack.getOrCreateTag().putDouble("Exp", stack.getOrCreateTag().getDouble("Exp") + amount); + } + + private static void giveKillExpToWeapon(LivingDeathEvent event) { + DamageSource source = event.getSource(); + if (source == null) return; + Entity sourceEntity = source.getEntity(); + if (!(sourceEntity instanceof Player player)) return; + ItemStack stack = player.getMainHandItem(); + if (!stack.is(ModTags.Items.GUN)) return; + if (event.getEntity() instanceof TargetEntity) return; + + double amount = 20 + 2 * event.getEntity().getMaxHealth(); // 先处理发射器类武器或高爆弹的爆炸伤害 if (source.is(ModDamageTypes.PROJECTILE_BOOM)) { @@ -185,16 +212,17 @@ public class LivingEventHandler { if (!(sourceEntity instanceof Player player)) return; ItemStack stack = player.getMainHandItem(); if (!stack.is(ModTags.Items.GUN)) return; + if (event.getEntity() instanceof TargetEntity) return; var tag = stack.getOrCreateTag(); int level = stack.getOrCreateTag().getInt("Level"); double exp = stack.getOrCreateTag().getDouble("Exp"); - double upgradeExpNeeded = 20 * Math.pow(level, 2) + 140 * level + 20; + double upgradeExpNeeded = 20 * Math.pow(level, 2) + 160 * level + 20; if (exp >= upgradeExpNeeded) { tag.putDouble("Exp", exp - upgradeExpNeeded); tag.putInt("Level", level + 1); - tag.putDouble("UpgradePoint", tag.getDouble("UpgradePoint") + 0.25); + tag.putDouble("UpgradePoint", tag.getDouble("UpgradePoint") + 0.5); } } diff --git a/src/main/java/net/mcreator/superbwarfare/event/PlayerEventHandler.java b/src/main/java/net/mcreator/superbwarfare/event/PlayerEventHandler.java index 0b6479252..f7b839edc 100644 --- a/src/main/java/net/mcreator/superbwarfare/event/PlayerEventHandler.java +++ b/src/main/java/net/mcreator/superbwarfare/event/PlayerEventHandler.java @@ -317,19 +317,19 @@ public class PlayerEventHandler { if (stack.is(ModTags.Items.USE_RIFLE_AMMO) && cap.rifleAmmo > 0) { GunsTool.reload(player, stack, GunInfo.Type.RIFLE); } - if (stack.getItem() == ModItems.TASER.get() && stack.getOrCreateTag().getInt("max_ammo") > 0) { + if (stack.getItem() == ModItems.TASER.get() && stack.getOrCreateTag().getInt("max_ammo") > 0 && stack.getOrCreateTag().getInt("ammo") == 0) { stack.getOrCreateTag().putInt("ammo", 1); player.getInventory().clearOrCountMatchingItems(p -> p.getItem() == ModItems.TASER_ELECTRODE.get(), 1, player.inventoryMenu.getCraftSlots()); } - if (stack.getItem() == ModItems.M_79.get() && stack.getOrCreateTag().getInt("max_ammo") > 0) { + if (stack.getItem() == ModItems.M_79.get() && stack.getOrCreateTag().getInt("max_ammo") > 0 && stack.getOrCreateTag().getInt("ammo") == 0) { stack.getOrCreateTag().putInt("ammo", 1); player.getInventory().clearOrCountMatchingItems(p -> p.getItem() == ModItems.GRENADE_40MM.get(), 1, player.inventoryMenu.getCraftSlots()); } - if (stack.getItem() == ModItems.RPG.get() && stack.getOrCreateTag().getInt("max_ammo") > 0) { + if (stack.getItem() == ModItems.RPG.get() && stack.getOrCreateTag().getInt("max_ammo") > 0 && stack.getOrCreateTag().getInt("ammo") == 0) { stack.getOrCreateTag().putInt("ammo", 1); player.getInventory().clearOrCountMatchingItems(p -> p.getItem() == ModItems.ROCKET.get(), 1, player.inventoryMenu.getCraftSlots()); } - if (stack.getItem() == ModItems.JAVELIN.get() && stack.getOrCreateTag().getInt("max_ammo") > 0) { + if (stack.getItem() == ModItems.JAVELIN.get() && stack.getOrCreateTag().getInt("max_ammo") > 0 && stack.getOrCreateTag().getInt("ammo") == 0) { stack.getOrCreateTag().putInt("ammo", 1); player.getInventory().clearOrCountMatchingItems(p -> p.getItem() == ModItems.JAVELIN_MISSILE.get(), 1, player.inventoryMenu.getCraftSlots()); } diff --git a/src/main/java/net/mcreator/superbwarfare/init/ModDamageTypes.java b/src/main/java/net/mcreator/superbwarfare/init/ModDamageTypes.java index a41a06a80..8b303eb2d 100644 --- a/src/main/java/net/mcreator/superbwarfare/init/ModDamageTypes.java +++ b/src/main/java/net/mcreator/superbwarfare/init/ModDamageTypes.java @@ -20,6 +20,7 @@ public class ModDamageTypes { public static final ResourceKey GUN_FIRE_ABSOLUTE = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "gunfire_absolute")); public static final ResourceKey GUN_FIRE_HEADSHOT = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "gunfire_headshot")); public static final ResourceKey GUN_FIRE_HEADSHOT_ABSOLUTE = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "gunfire_headshot_absolute")); + public static final ResourceKey BURN = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "burn")); public static final ResourceKey MINE = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "mine")); public static final ResourceKey BEAST = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "beast")); public static final ResourceKey SHOCK = ResourceKey.create(Registries.DAMAGE_TYPE, new ResourceLocation(ModUtils.MODID, "shock")); @@ -43,6 +44,10 @@ public class ModDamageTypes { return new DamageMessages(registryAccess.registry(Registries.DAMAGE_TYPE).get().getHolderOrThrow(SHOCK), attacker); } + public static DamageSource causeBurnDamage(RegistryAccess registryAccess, @Nullable Entity attacker) { + return new DamageMessages(registryAccess.registry(Registries.DAMAGE_TYPE).get().getHolderOrThrow(BURN), attacker); + } + public static DamageSource causeProjectileBoomDamage(RegistryAccess registryAccess, @Nullable Entity directEntity, @Nullable Entity attacker) { return new DamageMessages(registryAccess.registry(Registries.DAMAGE_TYPE).get().getHolderOrThrow(PROJECTILE_BOOM), directEntity, attacker); } diff --git a/src/main/java/net/mcreator/superbwarfare/init/ModSounds.java b/src/main/java/net/mcreator/superbwarfare/init/ModSounds.java index 4a46ccf22..c3ced310a 100644 --- a/src/main/java/net/mcreator/superbwarfare/init/ModSounds.java +++ b/src/main/java/net/mcreator/superbwarfare/init/ModSounds.java @@ -35,6 +35,9 @@ public class ModSounds { public static final RegistryObject EXPLOSION_CLOSE = REGISTRY.register("explosion_close", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "explosion_close"))); public static final RegistryObject EXPLOSION_FAR = REGISTRY.register("explosion_far", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "explosion_far"))); public static final RegistryObject EXPLOSION_VERY_FAR = REGISTRY.register("explosion_very_far", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "explosion_very_far"))); + public static final RegistryObject HUGE_EXPLOSION_CLOSE = REGISTRY.register("huge_explosion_close", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "huge_explosion_close"))); + public static final RegistryObject HUGE_EXPLOSION_FAR = REGISTRY.register("huge_explosion_far", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "huge_explosion_far"))); + public static final RegistryObject HUGE_EXPLOSION_VERY_FAR = REGISTRY.register("huge_explosion_very_far", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "huge_explosion_very_far"))); public static final RegistryObject EXPLOSION_WATER = REGISTRY.register("explosion_water", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "explosion_water"))); public static final RegistryObject HUNTING_RIFLE_FIRE_1P = REGISTRY.register("hunting_rifle_fire_1p", () -> SoundEvent.createVariableRangeEvent(new ResourceLocation(ModUtils.MODID, "hunting_rifle_fire_1p"))); diff --git a/src/main/java/net/mcreator/superbwarfare/mixins/LivingEntityMixin.java b/src/main/java/net/mcreator/superbwarfare/mixins/LivingEntityMixin.java index 7943de0ac..f7e0d7e35 100644 --- a/src/main/java/net/mcreator/superbwarfare/mixins/LivingEntityMixin.java +++ b/src/main/java/net/mcreator/superbwarfare/mixins/LivingEntityMixin.java @@ -24,7 +24,7 @@ public class LivingEntityMixin { private double modifyApplyKnockbackArgs(double original) { if (this.target$source.is(ModDamageTypes.GUN_FIRE) || this.target$source.is(ModDamageTypes.GUN_FIRE_HEADSHOT) || this.target$source.is(ModDamageTypes.SHOCK) || this.target$source.is(ModDamageTypes.GUN_FIRE_ABSOLUTE) - || this.target$source.is(ModDamageTypes.GUN_FIRE_HEADSHOT_ABSOLUTE)) { + || this.target$source.is(ModDamageTypes.GUN_FIRE_HEADSHOT_ABSOLUTE)|| this.target$source.is(ModDamageTypes.BURN)) { return 0.05 * original; } return original; diff --git a/src/main/java/net/mcreator/superbwarfare/mobeffect/BurnMobEffect.java b/src/main/java/net/mcreator/superbwarfare/mobeffect/BurnMobEffect.java index e82016bac..b2de8fc43 100644 --- a/src/main/java/net/mcreator/superbwarfare/mobeffect/BurnMobEffect.java +++ b/src/main/java/net/mcreator/superbwarfare/mobeffect/BurnMobEffect.java @@ -1,6 +1,7 @@ package net.mcreator.superbwarfare.mobeffect; import net.mcreator.superbwarfare.ModUtils; +import net.mcreator.superbwarfare.init.ModDamageTypes; import net.mcreator.superbwarfare.init.ModMobEffects; import net.mcreator.superbwarfare.init.ModSounds; import net.mcreator.superbwarfare.network.message.ClientIndicatorMessage; @@ -35,7 +36,7 @@ public class BurnMobEffect extends MobEffect { attacker = entity.level().getEntity(entity.getPersistentData().getInt("BurnAttacker")); } - entity.hurt(new DamageSource(entity.level().registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(DamageTypes.IN_FIRE), attacker), 0.6f + (0.3f * amplifier)); + entity.hurt(new DamageSource(entity.level().registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(ModDamageTypes.BURN), attacker), 0.6f + (0.3f * amplifier)); entity.invulnerableTime = 0; if (attacker instanceof ServerPlayer player) { @@ -100,7 +101,11 @@ public class BurnMobEffect extends MobEffect { LivingEntity living = event.getEntity(); if (living.hasEffect(ModMobEffects.BURN.get())) { - living.setSecondsOnFire(1); + living.setRemainingFireTicks(2); + } + + if (living.isInWater()) { + living.removeEffect(ModMobEffects.BURN.get()); } } } diff --git a/src/main/java/net/mcreator/superbwarfare/tools/DamageTypeTool.java b/src/main/java/net/mcreator/superbwarfare/tools/DamageTypeTool.java index c92e21ba8..16d653f13 100644 --- a/src/main/java/net/mcreator/superbwarfare/tools/DamageTypeTool.java +++ b/src/main/java/net/mcreator/superbwarfare/tools/DamageTypeTool.java @@ -9,7 +9,8 @@ public class DamageTypeTool { public static boolean isGunDamage(DamageSource source) { return source.is(ModDamageTypes.GUN_FIRE) || source.is(ModDamageTypes.GUN_FIRE_HEADSHOT) - || source.is(ModDamageTypes.GUN_FIRE_ABSOLUTE) || source.is(ModDamageTypes.GUN_FIRE_HEADSHOT_ABSOLUTE); + || source.is(ModDamageTypes.GUN_FIRE_ABSOLUTE) || source.is(ModDamageTypes.GUN_FIRE_HEADSHOT_ABSOLUTE) + || source.is(ModDamageTypes.SHOCK)|| source.is(ModDamageTypes.BURN); } public static boolean isGunDamage(ResourceKey damageType) { diff --git a/src/main/java/net/mcreator/superbwarfare/tools/ParticleTool.java b/src/main/java/net/mcreator/superbwarfare/tools/ParticleTool.java index d951611cf..9ed3ecaf3 100644 --- a/src/main/java/net/mcreator/superbwarfare/tools/ParticleTool.java +++ b/src/main/java/net/mcreator/superbwarfare/tools/ParticleTool.java @@ -53,16 +53,16 @@ public class ParticleTool { if ((level.getBlockState(BlockPos.containing(x, y, z))).getBlock() == Blocks.WATER) { level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.EXPLOSION_WATER.get(), SoundSource.BLOCKS, 3, 1); } - level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.EXPLOSION_CLOSE.get(), SoundSource.BLOCKS, 8, 1); - level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.EXPLOSION_FAR.get(), SoundSource.BLOCKS, 16, 1); - level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.EXPLOSION_VERY_FAR.get(), SoundSource.BLOCKS, 32, 1); + level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.EXPLOSION_CLOSE.get(), SoundSource.BLOCKS, 4, 1); + level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.EXPLOSION_FAR.get(), SoundSource.BLOCKS, 8, 1); + level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.EXPLOSION_VERY_FAR.get(), SoundSource.BLOCKS, 16, 1); } else { if ((level.getBlockState(BlockPos.containing(x, y, z))).getBlock() == Blocks.WATER) { - level.playLocalSound(x, (y + 1), z, ModSounds.EXPLOSION_WATER.get(), SoundSource.BLOCKS, 3, 1, false); + level.playLocalSound(x, (y + 1), z, ModSounds.EXPLOSION_WATER.get(), SoundSource.BLOCKS, 1, 1, false); } - level.playLocalSound(x, (y + 1), z, ModSounds.EXPLOSION_CLOSE.get(), SoundSource.BLOCKS, 24, 1, false); - level.playLocalSound(x, (y + 1), z, ModSounds.EXPLOSION_FAR.get(), SoundSource.BLOCKS, 24, 1, false); - level.playLocalSound(x, (y + 1), z, ModSounds.EXPLOSION_VERY_FAR.get(), SoundSource.BLOCKS, 64, 1, false); + level.playLocalSound(x, (y + 1), z, ModSounds.EXPLOSION_CLOSE.get(), SoundSource.BLOCKS, 1, 1, false); + level.playLocalSound(x, (y + 1), z, ModSounds.EXPLOSION_FAR.get(), SoundSource.BLOCKS, 1, 1, false); + level.playLocalSound(x, (y + 1), z, ModSounds.EXPLOSION_VERY_FAR.get(), SoundSource.BLOCKS, 1, 1, false); } if (level instanceof ServerLevel serverLevel) { @@ -73,10 +73,11 @@ public class ParticleTool { sendParticle(serverLevel, ParticleTypes.BUBBLE_COLUMN_UP, x, y, z, 60, 3, 0.5, 3, 0.1, true); } sendParticle(serverLevel, ParticleTypes.EXPLOSION, x, y + 1, z, 5, 0.7, 0.7, 0.7, 1, true); - sendParticle(serverLevel, ParticleTypes.CAMPFIRE_COSY_SMOKE, x, y, z, 20, 0.2, 0.7, 0.2, 0.02, true); + sendParticle(serverLevel, ParticleTypes.CAMPFIRE_COSY_SMOKE, x, y + 1, z, 20, 0.2, 1, 0.2, 0.02, true); sendParticle(serverLevel, ParticleTypes.LARGE_SMOKE, x, y + 1, z, 10, 0.4, 1, 0.4, 0.02, true); - sendParticle(serverLevel, ParticleTypes.CAMPFIRE_COSY_SMOKE, x, y, z, 20, 1, 0.001, 1, 0.01, true); - sendParticle(serverLevel, ModParticleTypes.FIRE_STAR.get(), x, y, z, 30, 0, 0, 0, 0.2, true); + sendParticle(serverLevel, ParticleTypes.CAMPFIRE_COSY_SMOKE, x, y + 0.25, z, 40, 2, 0.001, 2, 0.01, true); + sendParticle(serverLevel, ModParticleTypes.FIRE_STAR.get(), x, y + 0.2, z, 50, 0, 0, 0, 0.9, true); + sendParticle(serverLevel, ParticleTypes.FLASH, x, y + 0.5, z, 50, 0.2, 0.2, 0.2, 20, true); } } @@ -89,16 +90,16 @@ public class ParticleTool { if ((level.getBlockState(BlockPos.containing(x, y, z))).getBlock() == Blocks.WATER) { level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.EXPLOSION_WATER.get(), SoundSource.BLOCKS, 3, 1); } - level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.EXPLOSION_CLOSE.get(), SoundSource.BLOCKS, 8, 1); - level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.EXPLOSION_FAR.get(), SoundSource.BLOCKS, 16, 1); - level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.EXPLOSION_VERY_FAR.get(), SoundSource.BLOCKS, 32, 1); + level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.HUGE_EXPLOSION_CLOSE.get(), SoundSource.BLOCKS, 8, 1); + level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.HUGE_EXPLOSION_FAR.get(), SoundSource.BLOCKS, 16, 1); + level.playSound(null, BlockPos.containing(x, y + 1, z), ModSounds.HUGE_EXPLOSION_VERY_FAR.get(), SoundSource.BLOCKS, 32, 1); } else { if ((level.getBlockState(BlockPos.containing(x, y, z))).getBlock() == Blocks.WATER) { - level.playLocalSound(x, (y + 1), z, ModSounds.EXPLOSION_WATER.get(), SoundSource.BLOCKS, 3, 1, false); + level.playLocalSound(x, (y + 1), z, ModSounds.EXPLOSION_WATER.get(), SoundSource.BLOCKS, 1, 1, false); } - level.playLocalSound(x, (y + 1), z, ModSounds.EXPLOSION_CLOSE.get(), SoundSource.BLOCKS, 24, 1, false); - level.playLocalSound(x, (y + 1), z, ModSounds.EXPLOSION_FAR.get(), SoundSource.BLOCKS, 24, 1, false); - level.playLocalSound(x, (y + 1), z, ModSounds.EXPLOSION_VERY_FAR.get(), SoundSource.BLOCKS, 64, 1, false); + level.playLocalSound(x, (y + 1), z, ModSounds.HUGE_EXPLOSION_CLOSE.get(), SoundSource.BLOCKS, 1, 1, false); + level.playLocalSound(x, (y + 1), z, ModSounds.HUGE_EXPLOSION_FAR.get(), SoundSource.BLOCKS, 1, 1, false); + level.playLocalSound(x, (y + 1), z, ModSounds.HUGE_EXPLOSION_VERY_FAR.get(), SoundSource.BLOCKS, 1, 1, false); } if (level instanceof ServerLevel serverLevel) { diff --git a/src/main/java/net/mcreator/superbwarfare/tools/TooltipTool.java b/src/main/java/net/mcreator/superbwarfare/tools/TooltipTool.java index 7cb2ce5ff..30b166c17 100644 --- a/src/main/java/net/mcreator/superbwarfare/tools/TooltipTool.java +++ b/src/main/java/net/mcreator/superbwarfare/tools/TooltipTool.java @@ -295,6 +295,7 @@ public class TooltipTool { .append(Component.literal("").withStyle(ChatFormatting.RESET)) .append(Component.literal(new DecimalFormat("##.#").format(damage)).withStyle(ChatFormatting.GREEN))); + addLevelTips(tooltip, stack); int upgradePoint = Mth.floor(ItemNBTTool.getDouble(stack, "UpgradePoint", 0)); tooltip.add(Component.translatable("des.superbwarfare.tips.upgrade_point").withStyle(ChatFormatting.GRAY) diff --git a/src/main/resources/assets/superbwarfare/lang/en_us.json b/src/main/resources/assets/superbwarfare/lang/en_us.json index 87930f632..9264d202c 100644 --- a/src/main/resources/assets/superbwarfare/lang/en_us.json +++ b/src/main/resources/assets/superbwarfare/lang/en_us.json @@ -309,6 +309,9 @@ "death.attack.cannon_fire": "%1$s was cracked by a shell", "death.attack.cannon_fire.entity": "%1$s was cracked by %2$s", "death.attack.cannon_fire.item": "%1$s was cracked by %2$s using %3$s", + "death.attack.burn": "%1$s被烧糊了", + "death.attack.burn.entity": "%1$s被%2$s烧成了焦炭", + "death.attack.burn.item": "%1$s被%2$s烧成了焦炭", "gui.superbwarfare.mortar_gui.button_set": "Confirm", diff --git a/src/main/resources/assets/superbwarfare/lang/zh_cn.json b/src/main/resources/assets/superbwarfare/lang/zh_cn.json index 962ee5bd2..8222d685d 100644 --- a/src/main/resources/assets/superbwarfare/lang/zh_cn.json +++ b/src/main/resources/assets/superbwarfare/lang/zh_cn.json @@ -309,6 +309,9 @@ "death.attack.cannon_fire": "%1$s被炮弹打得四分五裂", "death.attack.cannon_fire.entity": "%1$s被%2$s用炮弹打得四分五裂", "death.attack.cannon_fire.item": "%1$s被%2$s用%3$s打得四分五裂", + "death.attack.burn": "%1$s被烧糊了", + "death.attack.burn.entity": "%1$s被%2$s烧成了焦炭", + "death.attack.burn.item": "%1$s被%2$s烧成了焦炭", "gui.superbwarfare.mortar_gui.button_set": "确认", diff --git a/src/main/resources/assets/superbwarfare/models/item/powerful_attraction.json b/src/main/resources/assets/superbwarfare/models/item/powerful_attraction.json new file mode 100644 index 000000000..933edb793 --- /dev/null +++ b/src/main/resources/assets/superbwarfare/models/item/powerful_attraction.json @@ -0,0 +1,6 @@ +{ + "parent": "item/generated", + "textures": { + "layer0": "superbwarfare:item/perk/powerful_attraction" + } +} \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/sounds.json b/src/main/resources/assets/superbwarfare/sounds.json index a2428611a..bc2856d51 100644 --- a/src/main/resources/assets/superbwarfare/sounds.json +++ b/src/main/resources/assets/superbwarfare/sounds.json @@ -2261,5 +2261,45 @@ "stream": false } ] + }, + "huge_explosion_close": { + "sounds": [ + { + "name": "superbwarfare:explosion/huge_explosion_close", + "stream": false + }, + { + "name": "superbwarfare:explosion/huge_explosion_close2", + "stream": false + } + ] + }, + "huge_explosion_far": { + "sounds": [ + { + "name": "superbwarfare:explosion/huge_explosion_far", + "stream": false + }, + { + "name": "superbwarfare:explosion/huge_explosion_far2", + "stream": false + }, + { + "name": "superbwarfare:explosion/huge_explosion_far3", + "stream": false + } + ] + }, + "huge_explosion_very_far": { + "sounds": [ + { + "name": "superbwarfare:explosion/huge_explosion_very_far", + "stream": false + }, + { + "name": "superbwarfare:explosion/huge_explosion_very_far2", + "stream": false + } + ] } } \ No newline at end of file diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_close.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_close.ogg index ad2300429..2757c5216 100644 Binary files a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_close.ogg and b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_close.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_close2.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_close2.ogg index 06e2e54bd..124765b3a 100644 Binary files a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_close2.ogg and b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_close2.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_close3.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_close3.ogg index 27f35d5b3..80bff52c9 100644 Binary files a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_close3.ogg and b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_close3.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_far.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_far.ogg index 6e2b291fd..ff94e640f 100644 Binary files a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_far.ogg and b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_far.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_far2.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_far2.ogg index c21d04254..504927ee2 100644 Binary files a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_far2.ogg and b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_far2.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_far3.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_far3.ogg index 54ccbf68e..ab5f9d4ac 100644 Binary files a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_far3.ogg and b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_far3.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_very_far.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_very_far.ogg index f917aec6a..459346ccd 100644 Binary files a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_very_far.ogg and b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_very_far.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_very_far2.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_very_far2.ogg index ad57b7680..2abae1bc7 100644 Binary files a/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_very_far2.ogg and b/src/main/resources/assets/superbwarfare/sounds/explosion/explosion_very_far2.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_close.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_close.ogg new file mode 100644 index 000000000..60928b7ce Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_close.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_close2.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_close2.ogg new file mode 100644 index 000000000..5560978c1 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_close2.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_far.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_far.ogg new file mode 100644 index 000000000..1957a7865 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_far.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_far2.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_far2.ogg new file mode 100644 index 000000000..5a62b7e2e Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_far2.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_far3.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_far3.ogg new file mode 100644 index 000000000..a0b32d77e Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_far3.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_very_far.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_very_far.ogg new file mode 100644 index 000000000..3f962aa67 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_very_far.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_very_far2.ogg b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_very_far2.ogg new file mode 100644 index 000000000..20f69a754 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/sounds/explosion/huge_explosion_very_far2.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/headshot.ogg b/src/main/resources/assets/superbwarfare/sounds/headshot.ogg index fa68a4a23..5c73b3443 100644 Binary files a/src/main/resources/assets/superbwarfare/sounds/headshot.ogg and b/src/main/resources/assets/superbwarfare/sounds/headshot.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/indication.ogg b/src/main/resources/assets/superbwarfare/sounds/indication.ogg index fda2f6a87..0ac3da9d2 100644 Binary files a/src/main/resources/assets/superbwarfare/sounds/indication.ogg and b/src/main/resources/assets/superbwarfare/sounds/indication.ogg differ diff --git a/src/main/resources/assets/superbwarfare/sounds/targetdown.ogg b/src/main/resources/assets/superbwarfare/sounds/targetdown.ogg index 711b52bc1..cd1bcad2a 100644 Binary files a/src/main/resources/assets/superbwarfare/sounds/targetdown.ogg and b/src/main/resources/assets/superbwarfare/sounds/targetdown.ogg differ diff --git a/src/main/resources/assets/superbwarfare/textures/item/perk/powerful_attraction.png b/src/main/resources/assets/superbwarfare/textures/item/perk/powerful_attraction.png new file mode 100644 index 000000000..40f3c407c Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/item/perk/powerful_attraction.png differ diff --git a/src/main/resources/assets/superbwarfare/textures/screens/damage_types/burn.png b/src/main/resources/assets/superbwarfare/textures/screens/damage_types/burn.png new file mode 100644 index 000000000..62a8d1876 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/screens/damage_types/burn.png differ diff --git a/src/main/resources/data/minecraft/tags/damage_type/is_fire.json b/src/main/resources/data/minecraft/tags/damage_type/is_fire.json new file mode 100644 index 000000000..1cc272e83 --- /dev/null +++ b/src/main/resources/data/minecraft/tags/damage_type/is_fire.json @@ -0,0 +1,6 @@ +{ + "replace": false, + "values": [ + "superbwarfare:burn" + ] +} \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/damage_type/burn.json b/src/main/resources/data/superbwarfare/damage_type/burn.json new file mode 100644 index 000000000..6cd200d08 --- /dev/null +++ b/src/main/resources/data/superbwarfare/damage_type/burn.json @@ -0,0 +1,5 @@ +{ + "exhaustion": 0, + "message_id": "burn", + "scaling": "never" +} \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/guns/abekiri.json b/src/main/resources/data/superbwarfare/guns/abekiri.json index 68c068628..4a3e25acc 100644 --- a/src/main/resources/data/superbwarfare/guns/abekiri.json +++ b/src/main/resources/data/superbwarfare/guns/abekiri.json @@ -2,7 +2,7 @@ "spread": 4, "recoil_x": 0.005, "recoil_y": 0.026, - "damage": 3, + "damage": 5, "headshot": 1.5, "velocity": 15, "mag": 2, diff --git a/src/main/resources/data/superbwarfare/guns/bocek.json b/src/main/resources/data/superbwarfare/guns/bocek.json index b373758f4..30ff97b4f 100644 --- a/src/main/resources/data/superbwarfare/guns/bocek.json +++ b/src/main/resources/data/superbwarfare/guns/bocek.json @@ -2,7 +2,7 @@ "CustomZoom": 0.75, "spread": 4, "headshot": 2.5, - "damage": 36, + "damage": 48, "weight": 3, "BypassesArmor": 0.25 } \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/guns/javelin.json b/src/main/resources/data/superbwarfare/guns/javelin.json index c971cad92..f8c180239 100644 --- a/src/main/resources/data/superbwarfare/guns/javelin.json +++ b/src/main/resources/data/superbwarfare/guns/javelin.json @@ -5,6 +5,6 @@ "mag": 1, "weight": 10, "EmptyReloadTime": 78, - "damage": 300, + "damage": 700, "BypassesArmor": 1 } \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/guns/m_79.json b/src/main/resources/data/superbwarfare/guns/m_79.json index ea56a39a1..9b6e99d9b 100644 --- a/src/main/resources/data/superbwarfare/guns/m_79.json +++ b/src/main/resources/data/superbwarfare/guns/m_79.json @@ -2,7 +2,7 @@ "spread": 1.5, "recoil_x": 0.004, "recoil_y": 0.023, - "damage": 40, + "damage": 80, "velocity": 3.75, "mag": 1, "weight": 4, diff --git a/src/main/resources/data/superbwarfare/guns/ntw_20.json b/src/main/resources/data/superbwarfare/guns/ntw_20.json index d21162475..c0c43037c 100644 --- a/src/main/resources/data/superbwarfare/guns/ntw_20.json +++ b/src/main/resources/data/superbwarfare/guns/ntw_20.json @@ -3,7 +3,7 @@ "spread": 8, "recoil_x": 0.01, "recoil_y": 0.038, - "damage": 100, + "damage": 140, "headshot": 3, "velocity": 36, "projectile_amount": 1, diff --git a/src/main/resources/data/superbwarfare/guns/rpg.json b/src/main/resources/data/superbwarfare/guns/rpg.json index a247b5929..d254fd9f5 100644 --- a/src/main/resources/data/superbwarfare/guns/rpg.json +++ b/src/main/resources/data/superbwarfare/guns/rpg.json @@ -2,7 +2,7 @@ "spread": 5, "recoil_x": 0.008, "recoil_y": 0.018, - "damage": 250, + "damage": 500, "velocity": 4, "mag": 1, "weight": 7, diff --git a/src/main/resources/data/superbwarfare/recipes/perk/powerful_attraction_perk_crafting.json b/src/main/resources/data/superbwarfare/recipes/perk/powerful_attraction_perk_crafting.json new file mode 100644 index 000000000..c106f6138 --- /dev/null +++ b/src/main/resources/data/superbwarfare/recipes/perk/powerful_attraction_perk_crafting.json @@ -0,0 +1,30 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "equipment", + "pattern": [ + "dbe", + "cac", + " c " + ], + "key": { + "a": { + "item": "superbwarfare:empty_perk" + }, + "b": { + "tag": "forge:ender_pearls" + }, + "c": { + "tag": "forge:ingots/iron" + }, + "d": { + "tag": "forge:dusts/redstone" + }, + "e": { + "tag": "forge:gems/lapis" + } + }, + "result": { + "item": "superbwarfare:powerful_attraction", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/recipes/shortcut_pack_crafting.json b/src/main/resources/data/superbwarfare/recipes/shortcut_pack_crafting.json index 3a0522ee3..cd05a27f7 100644 --- a/src/main/resources/data/superbwarfare/recipes/shortcut_pack_crafting.json +++ b/src/main/resources/data/superbwarfare/recipes/shortcut_pack_crafting.json @@ -1,25 +1,14 @@ { - "type": "minecraft:crafting_shaped", + "type": "minecraft:crafting_shapeless", "category": "misc", - "pattern": [ - "ada", - "cbc", - "ada" - ], - "key": { - "a": { - "item": "minecraft:diamond" - }, - "b": { + "ingredients": [ + { "item": "superbwarfare:epic_material_pack" }, - "c": { - "item": "minecraft:netherite_upgrade_smithing_template" - }, - "d": { + { "item": "minecraft:nether_star" } - }, + ], "result": { "item": "superbwarfare:shortcut_pack", "count": 1