添加高爆弹的贴图,配方
This commit is contained in:
parent
ce65b14776
commit
74857554e2
11 changed files with 46 additions and 8 deletions
|
@ -195,6 +195,7 @@ public class GunEventHandler {
|
|||
if (!player.level().isClientSide()) {
|
||||
float headshot = (float) heldItem.getOrCreateTag().getDouble("headshot");
|
||||
float damage = (float) (heldItem.getOrCreateTag().getDouble("damage") + heldItem.getOrCreateTag().getDouble("sentinelChargeDamage")) * (float) heldItem.getOrCreateTag().getDouble("levelDamageMultiple");
|
||||
float velocity = (float) heldItem.getOrCreateTag().getDouble("velocity");
|
||||
boolean zoom = player.getCapability(ModVariables.PLAYER_VARIABLES_CAPABILITY, null).orElse(new ModVariables.PlayerVariables()).zoom;
|
||||
var perk = PerkHelper.getPerkByType(heldItem, Perk.Type.AMMO);
|
||||
|
||||
|
@ -238,6 +239,7 @@ public class GunEventHandler {
|
|||
} else if (perk == ModPerks.HE_BULLET.get()) {
|
||||
int level = PerkHelper.getItemPerkLevel(perk, heldItem);
|
||||
projectile.heBullet(true, level);
|
||||
velocity *= 0.6f;
|
||||
}
|
||||
|
||||
var dmgPerk = PerkHelper.getPerkByType(heldItem, Perk.Type.DAMAGE);
|
||||
|
@ -247,7 +249,7 @@ public class GunEventHandler {
|
|||
}
|
||||
|
||||
projectile.setPos(player.getX() - 0.1 * player.getLookAngle().x, player.getEyeY() - 0.1 - 0.1 * player.getLookAngle().y, player.getZ() + -0.1 * player.getLookAngle().z);
|
||||
projectile.shoot(player.getLookAngle().x, player.getLookAngle().y + 0.0005f, player.getLookAngle().z, 1 * (float) heldItem.getOrCreateTag().getDouble("velocity"),
|
||||
projectile.shoot(player.getLookAngle().x, player.getLookAngle().y + 0.0005f, player.getLookAngle().z, velocity,
|
||||
(float) spared);
|
||||
player.level().addFreshEntity(projectile);
|
||||
}
|
||||
|
|
|
@ -168,7 +168,7 @@ public class Aa12Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void appendHoverText(ItemStack stack, @Nullable Level level, List<Component> list, TooltipFlag flag) {
|
||||
TooltipTool.addShotgunTips(list, stack, 8);
|
||||
TooltipTool.addShotgunTips(list, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -159,7 +159,7 @@ public class AbekiriItem extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void appendHoverText(ItemStack stack, @Nullable Level level, List<Component> list, TooltipFlag flag) {
|
||||
TooltipTool.addShotgunTips(list, stack, 8);
|
||||
TooltipTool.addShotgunTips(list, stack);
|
||||
}
|
||||
|
||||
public static ItemStack getGunInstance() {
|
||||
|
|
|
@ -158,7 +158,7 @@ public class M870Item extends GunItem implements GeoItem, AnimatedItem {
|
|||
|
||||
@Override
|
||||
public void appendHoverText(ItemStack stack, @Nullable Level level, List<Component> list, TooltipFlag flag) {
|
||||
TooltipTool.addShotgunTips(list, stack, 12);
|
||||
TooltipTool.addShotgunTips(list, stack);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -225,6 +225,7 @@ public class FireMessage {
|
|||
} else if (perk == ModPerks.HE_BULLET.get()) {
|
||||
int level = PerkHelper.getItemPerkLevel(perk, heldItem);
|
||||
projectile.heBullet(true, level);
|
||||
velocity *= 0.6f;
|
||||
}
|
||||
|
||||
var dmgPerk = PerkHelper.getPerkByType(heldItem, Perk.Type.DAMAGE);
|
||||
|
@ -348,6 +349,7 @@ public class FireMessage {
|
|||
} else if (perk == ModPerks.HE_BULLET.get()) {
|
||||
int level = PerkHelper.getItemPerkLevel(perk, heldItem);
|
||||
projectile.heBullet(true, level);
|
||||
velocity *= 0.6f;
|
||||
}
|
||||
|
||||
var dmgPerk = PerkHelper.getPerkByType(heldItem, Perk.Type.DAMAGE);
|
||||
|
|
|
@ -43,7 +43,7 @@ public class TooltipTool {
|
|||
addPerkTips(tooltip, stack);
|
||||
}
|
||||
|
||||
public static void addShotgunTips(List<Component> tooltip, ItemStack stack, int count) {
|
||||
public static void addShotgunTips(List<Component> tooltip, ItemStack stack) {
|
||||
tooltip.add(Component.literal(""));
|
||||
|
||||
double damage = ItemNBTTool.getDouble(stack, "damage", 0)
|
||||
|
@ -51,7 +51,7 @@ public class TooltipTool {
|
|||
|
||||
tooltip.add(Component.translatable("des.superbwarfare.tips.damage").withStyle(ChatFormatting.GRAY)
|
||||
.append(Component.literal("").withStyle(ChatFormatting.RESET))
|
||||
.append(Component.literal(new DecimalFormat("##.#").format(damage) + " * " + count).withStyle(ChatFormatting.GREEN)));
|
||||
.append(Component.literal(new DecimalFormat("##.#").format(damage) + " * " + new DecimalFormat("##").format(ItemNBTTool.getDouble(stack, "projectile_amount", 0))).withStyle(ChatFormatting.GREEN)));
|
||||
|
||||
addLevelTips(tooltip, stack);
|
||||
addBypassTips(tooltip, stack);
|
||||
|
|
|
@ -220,7 +220,9 @@
|
|||
"item.superbwarfare.longer_wire": "Longer Wire",
|
||||
"des.superbwarfare.longer_wire": "Increases the range of Taser Gun",
|
||||
"item.superbwarfare.jhp_bullet": "JHP Bullet",
|
||||
"des.superbwarfare.jhp_bullet": "增加对低护甲目标的伤害",
|
||||
"des.superbwarfare.jhp_bullet": "增加对无护甲目标的伤害,但伤害会随着护甲值上升而迅速降低",
|
||||
"item.superbwarfare.he_bullet": "Explosion Bullet",
|
||||
"des.superbwarfare.he_bullet": "子弹在命中后会爆炸",
|
||||
|
||||
"item.superbwarfare.heal_clip": "Heal Clip",
|
||||
"des.superbwarfare.heal_clip": "Reloading after dealing a final blow will heal you and your nearby allies",
|
||||
|
|
|
@ -220,7 +220,9 @@
|
|||
"item.superbwarfare.longer_wire": "延长导线",
|
||||
"des.superbwarfare.longer_wire": "增加泰瑟枪的射程",
|
||||
"item.superbwarfare.jhp_bullet": "空尖弹",
|
||||
"des.superbwarfare.jhp_bullet": "增加对低护甲目标的伤害",
|
||||
"des.superbwarfare.jhp_bullet": "增加对无护甲目标的伤害,但伤害会随着护甲值上升而迅速降低",
|
||||
"item.superbwarfare.he_bullet": "爆炸子弹",
|
||||
"des.superbwarfare.he_bullet": "子弹在命中后会爆炸",
|
||||
|
||||
"item.superbwarfare.heal_clip": "治疗弹匣",
|
||||
"des.superbwarfare.heal_clip": "最后一击后短时间内填装,可治疗自身和附近队友",
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"parent": "item/generated",
|
||||
"textures": {
|
||||
"layer0": "superbwarfare:item/perk/he_bullet"
|
||||
}
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 876 B |
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"category": "equipment",
|
||||
"pattern": [
|
||||
"cbc",
|
||||
"bab",
|
||||
"cbc"
|
||||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"item": "superbwarfare:empty_perk"
|
||||
},
|
||||
"b": {
|
||||
"item":"minecraft:tnt"
|
||||
},
|
||||
"c": {
|
||||
"item": "superbwarfare:high_energy_explosives"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "superbwarfare:he_bullet",
|
||||
"count": 1
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue