修复弹药补给音效,调整战利品表和部分配方,简化摧毁迫击炮后的物品掉落

This commit is contained in:
Atsuihsio 2024-06-19 23:43:44 +08:00
parent c9bea4933b
commit 27cecb76cb
29 changed files with 514 additions and 169 deletions

View file

@ -286,15 +286,9 @@ public class MortarEntity extends PathfinderMob implements GeoEntity, AnimatedEn
var y = this.getY(); var y = this.getY();
var z = this.getZ(); var z = this.getZ();
level.explode(null, x, y, z, 0, Level.ExplosionInteraction.NONE); level.explode(null, x, y, z, 0, Level.ExplosionInteraction.NONE);
ItemEntity barrel = new ItemEntity(level, x, (y + 1), z, new ItemStack(TargetModItems.MORTAR_BARREL.get())); ItemEntity mortar = new ItemEntity(level, x, (y + 1), z, new ItemStack(TargetModItems.MORTAR_DEPLOYER.get()));
barrel.setPickUpDelay(10); mortar.setPickUpDelay(10);
level.addFreshEntity(barrel); level.addFreshEntity(mortar);
ItemEntity bipod = new ItemEntity(level, x, (y + 1), z, new ItemStack(TargetModItems.MORTAR_BIPOD.get()));
bipod.setPickUpDelay(10);
level.addFreshEntity(bipod);
ItemEntity plate = new ItemEntity(level, x, (y + 1), z, new ItemStack(TargetModItems.MORTAR_BASE_PLATE.get()));
plate.setPickUpDelay(10);
level.addFreshEntity(plate);
} }
} }
} }

View file

@ -26,7 +26,7 @@ public abstract class AmmoSupplierItem extends Item {
@Override @Override
public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) { public InteractionResultHolder<ItemStack> use(Level level, Player player, InteractionHand hand) {
ItemStack stack = player.getItemInHand(hand); ItemStack stack = player.getItemInHand(hand);
player.getCooldowns().addCooldown(this, 20); player.getCooldowns().addCooldown(this, 10);
stack.shrink(1); stack.shrink(1);
player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> { player.getCapability(TargetModVariables.PLAYER_VARIABLES_CAPABILITY, null).ifPresent(capability -> {

View file

@ -1207,7 +1207,7 @@
} }
] ]
}, },
"bulletsupply": { "bullet_supply": {
"sounds": [ "sounds": [
{ {
"name": "target:bullet_supply", "name": "target:bullet_supply",

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/simple_dungeon" "loot_table_id": "minecraft:chests/simple_dungeon"
} }
], ],
"lootTable": "target:chests/blueprint_common_chest" "lootTable": "target:chests/blue_print_common"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/abandoned_mineshaft" "loot_table_id": "minecraft:chests/abandoned_mineshaft"
} }
], ],
"lootTable": "target:chests/blueprint_common_chest" "lootTable": "target:chests/blue_print_common"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/shipwreck_map" "loot_table_id": "minecraft:chests/shipwreck_map"
} }
], ],
"lootTable": "target:chests/blueprint_common_chest" "lootTable": "target:chests/blue_print_common"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/shipwreck_supply" "loot_table_id": "minecraft:chests/shipwreck_supply"
} }
], ],
"lootTable": "target:chests/blueprint_common_chest" "lootTable": "target:chests/blue_print_common"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/shipwreck_treasure" "loot_table_id": "minecraft:chests/shipwreck_treasure"
} }
], ],
"lootTable": "target:chests/blueprint_common_chest" "lootTable": "target:chests/blue_print_common"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/ruined_portal" "loot_table_id": "minecraft:chests/ruined_portal"
} }
], ],
"lootTable": "target:chests/blueprint_common_chest" "lootTable": "target:chests/blue_print_common"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/pillager_outpost" "loot_table_id": "minecraft:chests/pillager_outpost"
} }
], ],
"lootTable": "target:blue_print_epic" "lootTable": "target:chests/blue_print_epic"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/stronghold_library" "loot_table_id": "minecraft:chests/stronghold_library"
} }
], ],
"lootTable": "target:blue_print_epic" "lootTable": "target:chests/blue_print_epic"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/woodland_mansion" "loot_table_id": "minecraft:chests/woodland_mansion"
} }
], ],
"lootTable": "target:blue_print_epic" "lootTable": "target:chests/blue_print_epic"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/end_city_treasure" "loot_table_id": "minecraft:chests/end_city_treasure"
} }
], ],
"lootTable": "target:blue_print_epic" "lootTable": "target:chests/blue_print_epic"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/ancient_city" "loot_table_id": "minecraft:chests/ancient_city"
} }
], ],
"lootTable": "target:blue_print_rare" "lootTable": "target:chests/blue_print_rare"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/jungle_temple_dispenser" "loot_table_id": "minecraft:chests/jungle_temple_dispenser"
} }
], ],
"lootTable": "target:blue_print_rare" "lootTable": "target:chests/blue_print_rare"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/ancient_city_ice_box" "loot_table_id": "minecraft:chests/ancient_city_ice_box"
} }
], ],
"lootTable": "target:blue_print_rare" "lootTable": "target:chests/blue_print_rare"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/bastion_bridge" "loot_table_id": "minecraft:chests/bastion_bridge"
} }
], ],
"lootTable": "target:blue_print_rare" "lootTable": "target:chests/blue_print_rare"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/bastion_hoglin_stable" "loot_table_id": "minecraft:chests/bastion_hoglin_stable"
} }
], ],
"lootTable": "target:blue_print_rare" "lootTable": "target:chests/blue_print_rare"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/bastion_other" "loot_table_id": "minecraft:chests/bastion_other"
} }
], ],
"lootTable": "target:blue_print_rare" "lootTable": "target:chests/blue_print_rare"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/buried_treasure" "loot_table_id": "minecraft:chests/buried_treasure"
} }
], ],
"lootTable": "target:blue_print_rare" "lootTable": "target:chests/blue_print_rare"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/desert_pyramid" "loot_table_id": "minecraft:chests/desert_pyramid"
} }
], ],
"lootTable": "target:blue_print_rare" "lootTable": "target:chests/blue_print_rare"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/igloo" "loot_table_id": "minecraft:chests/igloo"
} }
], ],
"lootTable": "target:blue_print_rare" "lootTable": "target:chests/blue_print_rare"
} }

View file

@ -6,5 +6,5 @@
"loot_table_id": "minecraft:chests/jungle_temple" "loot_table_id": "minecraft:chests/jungle_temple"
} }
], ],
"lootTable": "target:blue_print_rare" "lootTable": "target:chests/blue_print_rare"
} }

View file

@ -243,7 +243,124 @@
] ]
} }
] ]
},
{
"rolls": 2,
"entries": [
{
"type": "minecraft:item",
"name": "target:handgun_ammo",
"weight": 12,
"functions": [
{
"function": "set_count",
"count": {
"min": 4,
"max": 10
}
}
]
},
{
"type": "minecraft:item",
"name": "target:rifle_ammo",
"weight": 20,
"functions": [
{
"function": "set_count",
"count": {
"min": 4,
"max": 8
}
}
]
},
{
"type": "minecraft:item",
"name": "target:sniper_ammo",
"weight": 10,
"functions": [
{
"function": "set_count",
"count": {
"min": 2,
"max": 5
}
}
]
},
{
"type": "minecraft:item",
"name": "target:shotgun_ammo",
"weight": 17,
"functions": [
{
"function": "set_count",
"count": {
"min": 2,
"max": 6
}
}
]
},
{
"type": "minecraft:item",
"name": "target:grenade_40mm",
"weight": 6,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 3
}
}
]
},
{
"type": "minecraft:item",
"name": "target:rocket",
"weight": 4,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 2
}
}
]
},
{
"type": "minecraft:item",
"name": "target:mortar_shells",
"weight": 6,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 4
}
}
]
},
{
"type": "minecraft:item",
"name": "target:claymore_mine",
"weight": 3,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 3
}
}
]
}
]
} }
], ],
"random_sequence": "target:chests/blueprint_common_chest" "random_sequence": "target:chests/blue_print_common"
} }

View file

@ -4,76 +4,6 @@
{ {
"rolls": 1, "rolls": 1,
"entries": [ "entries": [
{
"type": "minecraft:item",
"name": "target:m_79_blueprint",
"weight": 14,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:m_4_blueprint",
"weight": 15,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:sks_blueprint",
"weight": 15,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:marlin_blueprint",
"weight": 15,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:ak_47_blueprint",
"weight": 15,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{ {
"type": "minecraft:item", "type": "minecraft:item",
"name": "target:hunting_rifle_blueprint", "name": "target:hunting_rifle_blueprint",
@ -186,20 +116,6 @@
} }
] ]
}, },
{
"type": "minecraft:item",
"name": "target:m_870_blueprint",
"weight": 15,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{ {
"type": "minecraft:item", "type": "minecraft:item",
"name": "target:m_98b_blueprint", "name": "target:m_98b_blueprint",
@ -231,7 +147,7 @@
{ {
"type": "minecraft:item", "type": "minecraft:item",
"name": "target:trachelium_blueprint", "name": "target:trachelium_blueprint",
"weight": 5, "weight": 60,
"functions": [ "functions": [
{ {
"function": "set_count", "function": "set_count",
@ -245,7 +161,7 @@
{ {
"type": "minecraft:item", "type": "minecraft:item",
"name": "target:aa_12_blueprint", "name": "target:aa_12_blueprint",
"weight": 5, "weight": 60,
"functions": [ "functions": [
{ {
"function": "set_count", "function": "set_count",
@ -259,7 +175,49 @@
{ {
"type": "minecraft:item", "type": "minecraft:item",
"name": "target:sentinel_blueprint", "name": "target:sentinel_blueprint",
"weight": 5, "weight": 60,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:kraber_blueprint",
"weight": 30,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:bocek_blueprint",
"weight": 30,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:minigun_blueprint",
"weight": 30,
"functions": [ "functions": [
{ {
"function": "set_count", "function": "set_count",
@ -271,7 +229,124 @@
] ]
} }
] ]
},
{
"rolls": 2,
"entries": [
{
"type": "minecraft:item",
"name": "target:handgun_ammo",
"weight": 12,
"functions": [
{
"function": "set_count",
"count": {
"min": 16,
"max": 40
}
}
]
},
{
"type": "minecraft:item",
"name": "target:rifle_ammo",
"weight": 20,
"functions": [
{
"function": "set_count",
"count": {
"min": 16,
"max": 32
}
}
]
},
{
"type": "minecraft:item",
"name": "target:sniper_ammo",
"weight": 10,
"functions": [
{
"function": "set_count",
"count": {
"min": 8,
"max": 20
}
}
]
},
{
"type": "minecraft:item",
"name": "target:shotgun_ammo",
"weight": 17,
"functions": [
{
"function": "set_count",
"count": {
"min": 8,
"max": 24
}
}
]
},
{
"type": "minecraft:item",
"name": "target:grenade_40mm",
"weight": 6,
"functions": [
{
"function": "set_count",
"count": {
"min": 4,
"max": 12
}
}
]
},
{
"type": "minecraft:item",
"name": "target:rocket",
"weight": 4,
"functions": [
{
"function": "set_count",
"count": {
"min": 4,
"max": 8
}
}
]
},
{
"type": "minecraft:item",
"name": "target:mortar_shells",
"weight": 6,
"functions": [
{
"function": "set_count",
"count": {
"min": 4,
"max": 8
}
}
]
},
{
"type": "minecraft:item",
"name": "target:claymore_mine",
"weight": 3,
"functions": [
{
"function": "set_count",
"count": {
"min": 4,
"max": 12
}
}
]
}
]
} }
], ],
"random_sequence": "target:blue_print_rare" "random_sequence": "target:chests/blue_print_epic"
} }

View file

@ -4,6 +4,76 @@
{ {
"rolls": 1, "rolls": 1,
"entries": [ "entries": [
{
"type": "minecraft:item",
"name": "target:m_79_blueprint",
"weight": 14,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:m_4_blueprint",
"weight": 15,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:sks_blueprint",
"weight": 15,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:marlin_blueprint",
"weight": 15,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:ak_47_blueprint",
"weight": 15,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{ {
"type": "minecraft:item", "type": "minecraft:item",
"name": "target:hunting_rifle_blueprint", "name": "target:hunting_rifle_blueprint",
@ -116,6 +186,20 @@
} }
] ]
}, },
{
"type": "minecraft:item",
"name": "target:m_870_blueprint",
"weight": 15,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{ {
"type": "minecraft:item", "type": "minecraft:item",
"name": "target:m_98b_blueprint", "name": "target:m_98b_blueprint",
@ -147,7 +231,7 @@
{ {
"type": "minecraft:item", "type": "minecraft:item",
"name": "target:trachelium_blueprint", "name": "target:trachelium_blueprint",
"weight": 60, "weight": 5,
"functions": [ "functions": [
{ {
"function": "set_count", "function": "set_count",
@ -161,7 +245,7 @@
{ {
"type": "minecraft:item", "type": "minecraft:item",
"name": "target:aa_12_blueprint", "name": "target:aa_12_blueprint",
"weight": 60, "weight": 5,
"functions": [ "functions": [
{ {
"function": "set_count", "function": "set_count",
@ -175,49 +259,7 @@
{ {
"type": "minecraft:item", "type": "minecraft:item",
"name": "target:sentinel_blueprint", "name": "target:sentinel_blueprint",
"weight": 60, "weight": 5,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:kraber_blueprint",
"weight": 30,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:bocek_blueprint",
"weight": 30,
"functions": [
{
"function": "set_count",
"count": {
"min": 1,
"max": 1
}
}
]
},
{
"type": "minecraft:item",
"name": "target:minigun_blueprint",
"weight": 30,
"functions": [ "functions": [
{ {
"function": "set_count", "function": "set_count",
@ -229,7 +271,124 @@
] ]
} }
] ]
},
{
"rolls": 2,
"entries": [
{
"type": "minecraft:item",
"name": "target:handgun_ammo",
"weight": 12,
"functions": [
{
"function": "set_count",
"count": {
"min": 8,
"max": 20
}
}
]
},
{
"type": "minecraft:item",
"name": "target:rifle_ammo",
"weight": 20,
"functions": [
{
"function": "set_count",
"count": {
"min": 8,
"max": 16
}
}
]
},
{
"type": "minecraft:item",
"name": "target:sniper_ammo",
"weight": 10,
"functions": [
{
"function": "set_count",
"count": {
"min": 4,
"max": 10
}
}
]
},
{
"type": "minecraft:item",
"name": "target:shotgun_ammo",
"weight": 17,
"functions": [
{
"function": "set_count",
"count": {
"min": 4,
"max": 12
}
}
]
},
{
"type": "minecraft:item",
"name": "target:grenade_40mm",
"weight": 6,
"functions": [
{
"function": "set_count",
"count": {
"min": 2,
"max": 6
}
}
]
},
{
"type": "minecraft:item",
"name": "target:rocket",
"weight": 4,
"functions": [
{
"function": "set_count",
"count": {
"min": 2,
"max": 4
}
}
]
},
{
"type": "minecraft:item",
"name": "target:mortar_shells",
"weight": 6,
"functions": [
{
"function": "set_count",
"count": {
"min": 2,
"max": 8
}
}
]
},
{
"type": "minecraft:item",
"name": "target:claymore_mine",
"weight": 3,
"functions": [
{
"function": "set_count",
"count": {
"min": 2,
"max": 6
}
}
]
}
]
} }
], ],
"random_sequence": "target:blue_print_epic" "random_sequence": "target:chests/blue_print_rare"
} }

View file

@ -7,7 +7,7 @@
"item": "target:rare_material_pack" "item": "target:rare_material_pack"
}, },
"addition": { "addition": {
"item": "target:ingot_steel" "tag": "minecraft:logs"
}, },
"result": { "result": {
"item": "target:marlin" "item": "target:marlin"

View file

@ -22,6 +22,6 @@
}, },
"result": { "result": {
"item": "target:mortar_shells", "item": "target:mortar_shells",
"count": 1 "count": 2
} }
} }

View file

@ -7,7 +7,7 @@
"item": "target:rare_material_pack" "item": "target:rare_material_pack"
}, },
"addition": { "addition": {
"item": "target:ingot_steel" "tag": "minecraft:logs"
}, },
"result": { "result": {
"item": "target:sks" "item": "target:sks"