diff --git a/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 b/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 index 4baa8c16f..153914d87 100644 --- a/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 +++ b/src/generated/resources/.cache/b69ee8a2655365569b979911c0440daa8c470ac2 @@ -1,4 +1,4 @@ -// 1.20.1 2024-11-12T02:27:53.4617476 Item Models: superbwarfare +// 1.20.1 2024-11-28T22:29:47.24523 Item Models: superbwarfare 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/aa_12_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/ak_12_blueprint.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/ak_47_blueprint.json @@ -6,6 +6,7 @@ c993bddc0db9453ffbefa59f9ac9a74dba909038 assets/superbwarfare/models/item/ancien 4b8fe8fbe5e64c3449ad539317254e4ed7188411 assets/superbwarfare/models/item/ap_head.json 984c08ca6f6893a15721a85e30118f9e32c65c7f assets/superbwarfare/models/item/barbed_wire.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/bocek_blueprint.json +140e04e98d9d1c0ee790ca43cb28ad549900ab44 assets/superbwarfare/models/item/cannon_core.json 1e5b4637c3787516305dd3d1598f401a5e78a954 assets/superbwarfare/models/item/cemented_carbide_action.json b793716e367623d60461fc760de4f012c28fdc53 assets/superbwarfare/models/item/cemented_carbide_barrel.json b97ce523ca85cddff78abd9fd735295414ee07fd assets/superbwarfare/models/item/cemented_carbide_ingot.json @@ -46,6 +47,8 @@ f66c351b4843ad4d4e086ccfb7d4d0221227d196 assets/superbwarfare/models/item/legend 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/minigun_blueprint.json c206cd345f459733399e0be4692586849ef0aac2 assets/superbwarfare/models/item/missile_engine.json 13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/mk_14_blueprint.json +13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/mk_42_blueprint.json +13ca8d5676888ff51f3308d88e4bf67691fa34f8 assets/superbwarfare/models/item/mle_1934_blueprint.json db96dbb75327701d7901c2de48a539bda9fe31c4 assets/superbwarfare/models/item/mortar_barrel.json 3922427d3921d3de7195614780ee8f57dfc0ee6f assets/superbwarfare/models/item/mortar_base_plate.json ac9c6bc308bd741ada7f19d808d0c0722fceb976 assets/superbwarfare/models/item/mortar_bipod.json diff --git a/src/generated/resources/assets/superbwarfare/models/item/cannon_core.json b/src/generated/resources/assets/superbwarfare/models/item/cannon_core.json new file mode 100644 index 000000000..f4442feae --- /dev/null +++ b/src/generated/resources/assets/superbwarfare/models/item/cannon_core.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "superbwarfare:item/cannon_core" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/superbwarfare/models/item/mk_42_blueprint.json b/src/generated/resources/assets/superbwarfare/models/item/mk_42_blueprint.json new file mode 100644 index 000000000..c698e5dfc --- /dev/null +++ b/src/generated/resources/assets/superbwarfare/models/item/mk_42_blueprint.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "superbwarfare:item/cannon_blueprint" + } +} \ No newline at end of file diff --git a/src/generated/resources/assets/superbwarfare/models/item/mle_1934_blueprint.json b/src/generated/resources/assets/superbwarfare/models/item/mle_1934_blueprint.json new file mode 100644 index 000000000..c698e5dfc --- /dev/null +++ b/src/generated/resources/assets/superbwarfare/models/item/mle_1934_blueprint.json @@ -0,0 +1,6 @@ +{ + "parent": "minecraft:item/generated", + "textures": { + "layer0": "superbwarfare:item/cannon_blueprint" + } +} \ No newline at end of file diff --git a/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java b/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java index 09bc55ae1..85994c3bd 100644 --- a/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java +++ b/src/main/java/com/atsuishio/superbwarfare/datagen/ModItemModelProvider.java @@ -42,6 +42,7 @@ public class ModItemModelProvider extends ItemModelProvider { simpleItem(ModItems.PRIMER); simpleItem(ModItems.AP_HEAD); simpleItem(ModItems.HE_HEAD); + simpleItem(ModItems.CANNON_CORE); simpleItem(ModItems.COPPER_PLATE); simpleItem(ModItems.STEEL_INGOT); simpleItem(ModItems.LEAD_INGOT); @@ -126,6 +127,8 @@ public class ModItemModelProvider extends ItemModelProvider { blueprintItem(ModItems.K_98_BLUEPRINT); blueprintItem(ModItems.MOSIN_NAGANT_BLUEPRINT); blueprintItem(ModItems.JAVELIN_BLUEPRINT); + blueprintItem(ModItems.MK_42_BLUEPRINT); + blueprintItem(ModItems.MLE_1934_BLUEPRINT); // blocks evenSimplerBlockItem(ModBlocks.BARBED_WIRE); diff --git a/src/main/java/com/atsuishio/superbwarfare/entity/DroneEntity.java b/src/main/java/com/atsuishio/superbwarfare/entity/DroneEntity.java index 185ef7228..594da882a 100644 --- a/src/main/java/com/atsuishio/superbwarfare/entity/DroneEntity.java +++ b/src/main/java/com/atsuishio/superbwarfare/entity/DroneEntity.java @@ -267,6 +267,10 @@ public class DroneEntity extends LivingEntity implements GeoEntity { } } + if (this.isInWater()) { + this.hurt(new DamageSource(level().registryAccess().registryOrThrow(Registries.DAMAGE_TYPE).getHolderOrThrow(DamageTypes.EXPLOSION), Objects.requireNonNullElse(controller, this)), 0.25f + (float) (2 * lastTickSpeed)); + } + if (this.getPersistentData().getBoolean("firing")) { if (this.entityData.get(AMMO) > 0) { this.entityData.set(AMMO, this.entityData.get(AMMO) - 1); diff --git a/src/main/java/com/atsuishio/superbwarfare/init/ModItems.java b/src/main/java/com/atsuishio/superbwarfare/init/ModItems.java index c3467b94b..33a63cea6 100644 --- a/src/main/java/com/atsuishio/superbwarfare/init/ModItems.java +++ b/src/main/java/com/atsuishio/superbwarfare/init/ModItems.java @@ -139,6 +139,7 @@ public class ModItems { public static final RegistryObject PRIMER = ITEMS.register("primer", () -> new Item(new Item.Properties())); public static final RegistryObject AP_HEAD = ITEMS.register("ap_head", () -> new Item(new Item.Properties())); public static final RegistryObject HE_HEAD = ITEMS.register("he_head", () -> new Item(new Item.Properties())); + public static final RegistryObject CANNON_CORE = ITEMS.register("cannon_core", () -> new Item(new Item.Properties())); public static final RegistryObject COPPER_PLATE = ITEMS.register("copper_plate", () -> new Item(new Item.Properties())); public static final RegistryObject STEEL_INGOT = ITEMS.register("steel_ingot", () -> new Item(new Item.Properties())); public static final RegistryObject LEAD_INGOT = ITEMS.register("lead_ingot", () -> new Item(new Item.Properties())); @@ -214,6 +215,8 @@ public class ModItems { public static final RegistryObject K_98_BLUEPRINT = ITEMS.register("k_98_blueprint", () -> new BlueprintItem(Rarity.RARE)); public static final RegistryObject MOSIN_NAGANT_BLUEPRINT = ITEMS.register("mosin_nagant_blueprint", () -> new BlueprintItem(Rarity.RARE)); public static final RegistryObject JAVELIN_BLUEPRINT = ITEMS.register("javelin_blueprint", () -> new BlueprintItem(RarityTool.LEGENDARY)); + public static final RegistryObject MK_42_BLUEPRINT = ITEMS.register("mk_42_blueprint", () -> new BlueprintItem(RarityTool.LEGENDARY)); + public static final RegistryObject MLE_1934_BLUEPRINT = ITEMS.register("mle_1934_blueprint", () -> new BlueprintItem(RarityTool.LEGENDARY)); /** * Block diff --git a/src/main/resources/assets/superbwarfare/animations/mk14ebr.animation.json b/src/main/resources/assets/superbwarfare/animations/mk14ebr.animation.json index 9920df437..d5a182886 100644 --- a/src/main/resources/assets/superbwarfare/animations/mk14ebr.animation.json +++ b/src/main/resources/assets/superbwarfare/animations/mk14ebr.animation.json @@ -429,8 +429,8 @@ "0.075": [0, 0, 0], "0.325": [10.89249, 39.29735, -56.83022], "0.95": [10.89249, 39.29735, -56.83022], - "1.0": [-15.72695, 26.23342, 38.15368], - "1.95": [-15.72695, 26.23342, 38.15368], + "1.0": [-20.72695, 26.23342, 38.15368], + "1.95": [-20.72695, 26.23342, 38.15368], "2.175": [0, 0, 0] }, "position": { @@ -438,8 +438,8 @@ "0.075": [0, 0, 0], "0.4": [-1.4502, 2.24582, 7.3337], "0.95": [-1.4502, 2.24582, 7.3337], - "1.0": [-2.7002, -1.60418, 7.3337], - "1.95": [-2.7002, -1.60418, 7.3337], + "1.0": [-3.2002, -1.60418, 7.3337], + "1.95": [-3.2002, -1.60418, 7.3337], "2.175": [0, 0, 0] } }, @@ -776,8 +776,8 @@ "0.075": [0, 0, 0], "0.325": [10.89249, 39.29735, -56.83022], "0.95": [10.89249, 39.29735, -56.83022], - "1.0": [-15.72695, 26.23342, 38.15368], - "1.95": [-15.72695, 26.23342, 38.15368], + "1.0": [-20.72695, 26.23342, 38.15368], + "1.95": [-20.72695, 26.23342, 38.15368], "2.175": [0, 0, 0] }, "position": { @@ -785,8 +785,8 @@ "0.075": [0, 0, 0], "0.4": [-1.4502, 2.24582, 7.3337], "0.95": [-1.4502, 2.24582, 7.3337], - "1.0": [-2.7002, -1.60418, 7.3337], - "1.95": [-2.7002, -1.60418, 7.3337], + "1.0": [-3.2002, -1.60418, 7.3337], + "1.95": [-3.2002, -1.60418, 7.3337], "2.175": [0, 0, 0] } }, @@ -1891,8 +1891,8 @@ "0.075": [24.9135, 33.35378, -56.66927], "0.325": [10.89249, 39.29735, -56.83022], "0.95": [10.89249, 39.29735, -56.83022], - "1.0": [-15.72695, 26.23342, 38.15368], - "1.95": [-15.72695, 26.23342, 38.15368], + "1.0": [-20.72695, 26.23342, 38.15368], + "1.95": [-20.72695, 26.23342, 38.15368], "2.175": [24.9135, 33.35378, -56.66927] }, "position": { @@ -1900,8 +1900,8 @@ "0.075": [-1.8, 0.4, 0], "0.4": [-1.4502, 2.24582, 7.3337], "0.95": [-1.4502, 2.24582, 7.3337], - "1.0": [-2.7002, -1.60418, 7.3337], - "1.95": [-2.7002, -1.60418, 7.3337], + "1.0": [-3.2002, -1.60418, 7.3337], + "1.95": [-3.2002, -1.60418, 7.3337], "2.175": [-1.8, 0.4, 0] } }, @@ -2238,8 +2238,8 @@ "0.075": [24.9135, 33.35378, -56.66927], "0.325": [10.89249, 39.29735, -56.83022], "0.95": [10.89249, 39.29735, -56.83022], - "1.0": [-15.72695, 26.23342, 38.15368], - "1.95": [-15.72695, 26.23342, 38.15368], + "1.0": [-20.72695, 26.23342, 38.15368], + "1.95": [-20.72695, 26.23342, 38.15368], "2.175": [24.9135, 33.35378, -56.66927] }, "position": { @@ -2247,8 +2247,8 @@ "0.075": [-1.8, 0.4, 0], "0.4": [-1.4502, 2.24582, 7.3337], "0.95": [-1.4502, 2.24582, 7.3337], - "1.0": [-2.7002, -1.60418, 7.3337], - "1.95": [-2.7002, -1.60418, 7.3337], + "1.0": [-3.2002, -1.60418, 7.3337], + "1.95": [-3.2002, -1.60418, 7.3337], "2.175": [-1.8, 0.4, 0] } }, diff --git a/src/main/resources/assets/superbwarfare/lang/en_us.json b/src/main/resources/assets/superbwarfare/lang/en_us.json index 165ebe90a..29ea42fbf 100644 --- a/src/main/resources/assets/superbwarfare/lang/en_us.json +++ b/src/main/resources/assets/superbwarfare/lang/en_us.json @@ -102,6 +102,8 @@ "item.superbwarfare.k_98_blueprint": "KAR-98K Blueprint", "item.superbwarfare.mosin_nagant_blueprint": "Mosin Nagant Blueprint", "item.superbwarfare.javelin_blueprint": "Javelin Blueprint", + "item.superbwarfare.mk_42_blueprint": "5''/54 Mk42 Blueprint", + "item.superbwarfare.mle_1934_blueprint": "138.6mm50 Mle1934 R1938 Blueprint", "item.superbwarfare.common_material_pack": "Common Material Pack", "item.superbwarfare.rare_material_pack": "Rare Material Pack", @@ -172,6 +174,7 @@ "item.superbwarfare.primer": "Primer", "item.superbwarfare.ap_head": "AP Warhead", "item.superbwarfare.he_head": "HE Warhead", + "item.superbwarfare.cannon_core": "Cannon Core", "item.superbwarfare.dog_tag": "Dog Tag", "curios.identifier.dog_tag": "Dog Tag", "item.superbwarfare.shield_cell": "Cell", diff --git a/src/main/resources/assets/superbwarfare/lang/zh_cn.json b/src/main/resources/assets/superbwarfare/lang/zh_cn.json index 1e1b53634..52a363fcc 100644 --- a/src/main/resources/assets/superbwarfare/lang/zh_cn.json +++ b/src/main/resources/assets/superbwarfare/lang/zh_cn.json @@ -102,6 +102,8 @@ "item.superbwarfare.k_98_blueprint": "KAR-98K蓝图", "item.superbwarfare.mosin_nagant_blueprint": "莫辛纳甘蓝图", "item.superbwarfare.javelin_blueprint": "标枪导弹蓝图", + "item.superbwarfare.mk_42_blueprint": "5''/54 Mk42蓝图", + "item.superbwarfare.mle_1934_blueprint": "138.6mm50 Mle1934 R1938蓝图", "item.superbwarfare.common_material_pack": "普通材料包", "item.superbwarfare.rare_material_pack": "稀有材料包", @@ -172,6 +174,7 @@ "item.superbwarfare.primer": "底火", "item.superbwarfare.ap_head": "穿甲弹头", "item.superbwarfare.he_head": "高爆弹头", + "item.superbwarfare.cannon_core": "火炮核心", "item.superbwarfare.dog_tag": "狗牌", "curios.identifier.dog_tag": "狗牌", "item.superbwarfare.shield_cell": "电池", diff --git a/src/main/resources/assets/superbwarfare/textures/item/cannon_blueprint.png b/src/main/resources/assets/superbwarfare/textures/item/cannon_blueprint.png new file mode 100644 index 000000000..53c4f5214 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/item/cannon_blueprint.png differ diff --git a/src/main/resources/assets/superbwarfare/textures/item/cannon_core.png b/src/main/resources/assets/superbwarfare/textures/item/cannon_core.png new file mode 100644 index 000000000..c1dc3c9b9 Binary files /dev/null and b/src/main/resources/assets/superbwarfare/textures/item/cannon_core.png differ diff --git a/src/main/resources/data/superbwarfare/loot_tables/chests/blue_print_epic.json b/src/main/resources/data/superbwarfare/loot_tables/chests/blue_print_epic.json index fe8781d03..e5a79f905 100644 --- a/src/main/resources/data/superbwarfare/loot_tables/chests/blue_print_epic.json +++ b/src/main/resources/data/superbwarfare/loot_tables/chests/blue_print_epic.json @@ -269,6 +269,34 @@ } } ] + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mk_42_blueprint", + "weight": 10, + "functions": [ + { + "function": "set_count", + "count": { + "min": 1, + "max": 1 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mle_1934_blueprint", + "weight": 10, + "functions": [ + { + "function": "set_count", + "count": { + "min": 1, + "max": 1 + } + } + ] } ] }, diff --git a/src/main/resources/data/superbwarfare/loot_tables/chests/blue_print_rare.json b/src/main/resources/data/superbwarfare/loot_tables/chests/blue_print_rare.json index e703e5366..896df0cbb 100644 --- a/src/main/resources/data/superbwarfare/loot_tables/chests/blue_print_rare.json +++ b/src/main/resources/data/superbwarfare/loot_tables/chests/blue_print_rare.json @@ -395,6 +395,34 @@ } } ] + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mk_42_blueprint", + "weight": 5, + "functions": [ + { + "function": "set_count", + "count": { + "min": 1, + "max": 1 + } + } + ] + }, + { + "type": "minecraft:item", + "name": "superbwarfare:mle_1934_blueprint", + "weight": 5, + "functions": [ + { + "function": "set_count", + "count": { + "min": 1, + "max": 1 + } + } + ] } ] }, diff --git a/src/main/resources/data/superbwarfare/recipes/cannon_core_crafting.json b/src/main/resources/data/superbwarfare/recipes/cannon_core_crafting.json new file mode 100644 index 000000000..eafb66806 --- /dev/null +++ b/src/main/resources/data/superbwarfare/recipes/cannon_core_crafting.json @@ -0,0 +1,27 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "aaa", + "bcd", + "aaa" + ], + "key": { + "a": { + "tag":"forge:storage_blocks/steel" + }, + "b": { + "item": "minecraft:dispenser" + }, + "c": { + "item": "minecraft:nether_star" + }, + "d": { + "item": "minecraft:piston" + } + }, + "result": { + "item": "superbwarfare:cannon_core", + "count": 1 + } +} \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/recipes/drone_crafting.json b/src/main/resources/data/superbwarfare/recipes/drone_crafting.json index c2d3c50fb..5d74522e2 100644 --- a/src/main/resources/data/superbwarfare/recipes/drone_crafting.json +++ b/src/main/resources/data/superbwarfare/recipes/drone_crafting.json @@ -25,6 +25,6 @@ }, "result": { "item": "superbwarfare:drone", - "count": 1 + "count": 4 } } \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/recipes/mk_42_blueprint_crafting.json b/src/main/resources/data/superbwarfare/recipes/mk_42_blueprint_crafting.json new file mode 100644 index 000000000..728b9d2dc --- /dev/null +++ b/src/main/resources/data/superbwarfare/recipes/mk_42_blueprint_crafting.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "aba", + "aca", + "aaa" + ], + "key": { + "a": { + "item": "minecraft:diamond" + }, + "b": { + "item": "superbwarfare:mk_42_blueprint" + }, + "c": { + "item": "minecraft:lapis_lazuli" + } + }, + "result": { + "item": "superbwarfare:mk_42_blueprint", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/recipes/mk_42_smithing.json b/src/main/resources/data/superbwarfare/recipes/mk_42_smithing.json new file mode 100644 index 000000000..05f98ab19 --- /dev/null +++ b/src/main/resources/data/superbwarfare/recipes/mk_42_smithing.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:smithing_transform", + "template": { + "item": "superbwarfare:mk_42_blueprint" + }, + "base": { + "item": "superbwarfare:cannon_core" + }, + "addition": { + "tag":"forge:storage_blocks/steel" + }, + "result": { + "item": "superbwarfare:container", + "nbt": { + "EntityType": "superbwarfare:mk_42" + } + } +} \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/recipes/mle_1934_blueprint_crafting.json b/src/main/resources/data/superbwarfare/recipes/mle_1934_blueprint_crafting.json new file mode 100644 index 000000000..aa7b246d2 --- /dev/null +++ b/src/main/resources/data/superbwarfare/recipes/mle_1934_blueprint_crafting.json @@ -0,0 +1,24 @@ +{ + "type": "minecraft:crafting_shaped", + "category": "misc", + "pattern": [ + "aba", + "aca", + "aaa" + ], + "key": { + "a": { + "item": "minecraft:diamond" + }, + "b": { + "item": "superbwarfare:mle_1934_blueprint" + }, + "c": { + "item": "minecraft:lapis_lazuli" + } + }, + "result": { + "item": "superbwarfare:mle_1934_blueprint", + "count": 2 + } +} \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/recipes/mle_1934_smithing.json b/src/main/resources/data/superbwarfare/recipes/mle_1934_smithing.json new file mode 100644 index 000000000..afc2e791b --- /dev/null +++ b/src/main/resources/data/superbwarfare/recipes/mle_1934_smithing.json @@ -0,0 +1,18 @@ +{ + "type": "minecraft:smithing_transform", + "template": { + "item": "superbwarfare:mle_1934_blueprint" + }, + "base": { + "item": "superbwarfare:cannon_core" + }, + "addition": { + "tag":"forge:storage_blocks/steel" + }, + "result": { + "item": "superbwarfare:container", + "nbt": { + "EntityType": "superbwarfare:mle_1934" + } + } +} \ No newline at end of file