简化弹药配方
This commit is contained in:
parent
56d43058b5
commit
3417cd381c
7 changed files with 79 additions and 51 deletions
|
@ -72,7 +72,7 @@ public class FragEntity extends ThrowableItemProjectile {
|
|||
TargetMod.PACKET_HANDLER.send(PacketDistributor.PLAYER.with(() -> player), new ClientIndicatorMessage(0, 5));
|
||||
|
||||
entity.hurt(TargetModDamageTypes.causeProjectileBoomDamage(this.level().registryAccess(), this, this.getOwner()),
|
||||
5 - (float) Mth.clamp(0.2 * this.position0.distanceTo(entity.position())
|
||||
5 - (float) Mth.clamp(0.1 * this.position0.distanceTo(entity.position())
|
||||
* (entity instanceof LivingEntity livingEntity ? livingEntity.getMaxHealth() / 100 + 1 : 1), 0, 4.5));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -178,7 +178,7 @@ public class GunGrenadeEntity extends ThrowableItemProjectile {
|
|||
explosion.finalizeExplosion(false);
|
||||
|
||||
ParticleTool.spawnMediumExplosionParticles(this.level(), this.position());
|
||||
for (int index0 = 0; index0 < 50; index0++) {
|
||||
for (int index0 = 0; index0 < 100; index0++) {
|
||||
fragShoot();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -68,19 +68,19 @@ public class GunRecycleGuiButtonMessage {
|
|||
if (gun.is(TargetModTags.Items.GUN)) {
|
||||
// 普通稀有度
|
||||
var material = switch (gun.getRarity()) {
|
||||
case COMMON -> Items.IRON_INGOT;
|
||||
case RARE -> TargetModItems.INGOT_STEEL.get();
|
||||
case EPIC -> TargetModItems.CEMENTED_CARBIDE_INGOT.get();
|
||||
case COMMON -> TargetModItems.COMMON_MATERIAL_PACK.get();
|
||||
case RARE -> TargetModItems.RARE_MATERIAL_PACK.get();
|
||||
case EPIC -> TargetModItems.EPIC_MATERIAL_PACK.get();
|
||||
default -> null;
|
||||
};
|
||||
if (material != null) ItemHandlerHelper.giveItemToPlayer(player, new ItemStack(material));
|
||||
|
||||
// 特殊稀有度
|
||||
if (gun.is(TargetModTags.Items.LEGENDARY_GUN)) {
|
||||
ItemHandlerHelper.giveItemToPlayer(player, new ItemStack(Items.NETHERITE_INGOT));
|
||||
ItemHandlerHelper.giveItemToPlayer(player, new ItemStack(TargetModItems.LEGENDARY_MATERIAL_PACK.get()));
|
||||
}
|
||||
if (gun.is(TargetModTags.Items.SPECIAL_GUN)) {
|
||||
ItemHandlerHelper.giveItemToPlayer(player, new ItemStack(TargetModItems.SOUL_STEEL_INGOT.get()));
|
||||
ItemHandlerHelper.giveItemToPlayer(player, new ItemStack(TargetModItems.SPECIAL_MATERIAL_PACK.get()));
|
||||
}
|
||||
|
||||
// 高等级额外奖励
|
||||
|
|
|
@ -1,19 +1,26 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"category": "misc",
|
||||
"pattern": [
|
||||
"aaa",
|
||||
"aaa",
|
||||
"bbb"
|
||||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "target:handgun_ammo"
|
||||
},
|
||||
"b": {
|
||||
"item": "minecraft:paper"
|
||||
}
|
||||
{
|
||||
"item": "target:handgun_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:handgun_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:handgun_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:handgun_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:handgun_ammo"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "target:handgun_ammo_box",
|
||||
"count": 1
|
||||
|
|
|
@ -1,19 +1,26 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"category": "misc",
|
||||
"pattern": [
|
||||
"aaa",
|
||||
"aaa",
|
||||
"bbb"
|
||||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "target:rifle_ammo"
|
||||
},
|
||||
"b": {
|
||||
"item": "minecraft:paper"
|
||||
}
|
||||
{
|
||||
"item": "target:rifle_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:rifle_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:rifle_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:rifle_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:rifle_ammo"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "target:rifle_ammo_box",
|
||||
"count": 1
|
||||
|
|
|
@ -1,19 +1,26 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"category": "misc",
|
||||
"pattern": [
|
||||
"aaa",
|
||||
"aaa",
|
||||
"bbb"
|
||||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "target:shotgun_ammo"
|
||||
},
|
||||
"b": {
|
||||
"item": "minecraft:paper"
|
||||
}
|
||||
{
|
||||
"item": "target:shotgun_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:shotgun_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:shotgun_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:shotgun_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:shotgun_ammo"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "target:shotgun_ammo_box",
|
||||
"count": 1
|
||||
|
|
|
@ -1,19 +1,26 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"category": "misc",
|
||||
"pattern": [
|
||||
"aaa",
|
||||
"aaa",
|
||||
"bbb"
|
||||
],
|
||||
"key": {
|
||||
"a": {
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "target:sniper_ammo"
|
||||
},
|
||||
"b": {
|
||||
"item": "minecraft:paper"
|
||||
}
|
||||
{
|
||||
"item": "target:sniper_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:sniper_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:sniper_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:sniper_ammo"
|
||||
},
|
||||
{
|
||||
"item": "target:sniper_ammo"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "target:sniper_ammo_box",
|
||||
"count": 1
|
||||
|
|
Loading…
Add table
Reference in a new issue