调整配方,限制炮手视角。添加爆炸超压伤害
This commit is contained in:
parent
b3524d203a
commit
c5e6399d9e
14 changed files with 33 additions and 12 deletions
|
@ -348,6 +348,17 @@ public class Mk42Entity extends PathfinderMob implements GeoEntity, ICannonEntit
|
|||
public static void init() {
|
||||
}
|
||||
|
||||
protected void clampRotation(Entity entity) {
|
||||
float f = Mth.wrapDegrees(entity.getXRot());
|
||||
float f1 = Mth.clamp(f, -85.0F, 15.0F);
|
||||
entity.xRotO += f1 - f;
|
||||
entity.setXRot(entity.getXRot() + f1 - f);
|
||||
}
|
||||
@Override
|
||||
public void onPassengerTurned(Entity entity) {
|
||||
this.clampRotation(entity);
|
||||
}
|
||||
|
||||
public static AttributeSupplier.Builder createAttributes() {
|
||||
return Mob.createMobAttributes()
|
||||
.add(Attributes.MOVEMENT_SPEED, 0)
|
||||
|
|
|
@ -377,6 +377,16 @@ public class Mle1934Entity extends PathfinderMob implements GeoEntity, ICannonEn
|
|||
|
||||
public static void init() {
|
||||
}
|
||||
protected void clampRotation(Entity entity) {
|
||||
float f = Mth.wrapDegrees(entity.getXRot());
|
||||
float f1 = Mth.clamp(f, -30.0F, 4.0F);
|
||||
entity.xRotO += f1 - f;
|
||||
entity.setXRot(entity.getXRot() + f1 - f);
|
||||
}
|
||||
@Override
|
||||
public void onPassengerTurned(Entity entity) {
|
||||
this.clampRotation(entity);
|
||||
}
|
||||
|
||||
public static AttributeSupplier.Builder createAttributes() {
|
||||
return Mob.createMobAttributes()
|
||||
|
|
|
@ -90,7 +90,7 @@ public class MortarShellEntity extends ThrowableItemProjectile {
|
|||
super.tick();
|
||||
if (this.level() instanceof ServerLevel serverLevel) {
|
||||
ParticleTool.sendParticle(serverLevel, ParticleTypes.CAMPFIRE_COSY_SMOKE, this.xo, this.yo, this.zo,
|
||||
2, 0, 0, 0, 0.02, true);
|
||||
1, 0, 0, 0, 0.001, true);
|
||||
}
|
||||
if (this.tickCount > 600 || this.isInWater()) {
|
||||
if (this.level() instanceof ServerLevel) {
|
||||
|
|
|
@ -143,7 +143,7 @@ public class CustomExplosion extends Explosion {
|
|||
xDistance /= distance;
|
||||
yDistance /= distance;
|
||||
zDistance /= distance;
|
||||
double seenPercent = getSeenPercent(position, entity);
|
||||
double seenPercent = Mth.clamp(getSeenPercent(position, entity),0.25,Double.POSITIVE_INFINITY);
|
||||
double damagePercent = (1.0D - distanceRate) * seenPercent;
|
||||
|
||||
double damageFinal = (damagePercent * damagePercent + damagePercent) / 2.0D * damage;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"item": "minecraft:iron_ingot"
|
||||
},
|
||||
"c": {
|
||||
"item": "superbwarfare:ingot_steel"
|
||||
"tag":"forge:ingots/steel"
|
||||
},
|
||||
"d": {
|
||||
"item": "superbwarfare:tungsten_rod"
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
"item": "minecraft:iron_ingot"
|
||||
},
|
||||
"c": {
|
||||
"item": "superbwarfare:ingot_steel"
|
||||
"tag":"forge:ingots/steel"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"item": "superbwarfare:ingot_steel"
|
||||
"tag":"forge:ingots/steel"
|
||||
},
|
||||
"b": {
|
||||
"item": "minecraft:stick"
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"item": "superbwarfare:fusee"
|
||||
},
|
||||
"b": {
|
||||
"item": "superbwarfare:ingot_steel"
|
||||
"tag":"forge:ingots/steel"
|
||||
},
|
||||
"c": {
|
||||
"item": "superbwarfare:high_energy_explosives"
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"item": "superbwarfare:ingot_steel"
|
||||
"tag":"forge:ingots/steel"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"item": "superbwarfare:ingot_steel"
|
||||
"tag":"forge:ingots/steel"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"item": "superbwarfare:ingot_steel"
|
||||
"tag":"forge:ingots/steel"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"item": "minecraft:tripwire_hook"
|
||||
},
|
||||
"b": {
|
||||
"item": "superbwarfare:ingot_steel"
|
||||
"tag":"forge:ingots/steel"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
"item": "minecraft:target"
|
||||
},
|
||||
"b": {
|
||||
"item": "superbwarfare:ingot_steel"
|
||||
"tag":"forge:ingots/steel"
|
||||
},
|
||||
"c": {
|
||||
"item": "minecraft:armor_stand"
|
||||
|
|
Loading…
Add table
Reference in a new issue