diff --git a/src/generated/resources/data/superbwarfare/advancement/recipes/misc/annihilator_blueprint.json b/src/generated/resources/data/superbwarfare/advancement/recipes/misc/annihilator_blueprint.json deleted file mode 100644 index c4bf8ed77..000000000 --- a/src/generated/resources/data/superbwarfare/advancement/recipes/misc/annihilator_blueprint.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "parent": "minecraft:recipes/root", - "criteria": { - "has_annihilator_blueprint": { - "conditions": { - "items": [ - { - "items": "superbwarfare:annihilator_blueprint" - } - ] - }, - "trigger": "minecraft:inventory_changed" - }, - "has_the_recipe": { - "conditions": { - "recipe": "superbwarfare:annihilator_blueprint" - }, - "trigger": "minecraft:recipe_unlocked" - } - }, - "requirements": [ - [ - "has_the_recipe", - "has_annihilator_blueprint" - ] - ], - "rewards": { - "recipes": [ - "superbwarfare:annihilator_blueprint" - ] - } -} \ No newline at end of file diff --git a/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json index 7a29f74e4..4cc25aa44 100644 --- a/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json +++ b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_epic.json @@ -103,11 +103,6 @@ "type": "minecraft:item", "name": "superbwarfare:hpj_11_blueprint", "weight": 5 - }, - { - "type": "minecraft:item", - "name": "superbwarfare:annihilator_blueprint", - "weight": 5 } ], "rolls": 1.0 diff --git a/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json index 742eedbc0..6d8c1371e 100644 --- a/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json +++ b/src/generated/resources/data/superbwarfare/loot_table/chests/blue_print_rare.json @@ -198,10 +198,6 @@ "type": "minecraft:item", "name": "superbwarfare:hpj_11_blueprint", "weight": 2 - }, - { - "type": "minecraft:item", - "name": "superbwarfare:annihilator_blueprint" } ], "rolls": 1.0 diff --git a/src/generated/resources/data/superbwarfare/recipe/annihilator_blueprint.json b/src/generated/resources/data/superbwarfare/recipe/annihilator_blueprint.json deleted file mode 100644 index d71cb7dd9..000000000 --- a/src/generated/resources/data/superbwarfare/recipe/annihilator_blueprint.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "category": "misc", - "key": { - "#": { - "item": "minecraft:diamond" - }, - "C": { - "item": "minecraft:lapis_lazuli" - }, - "S": { - "item": "superbwarfare:annihilator_blueprint" - } - }, - "pattern": [ - "#S#", - "#C#", - "###" - ], - "result": { - "count": 2, - "id": "superbwarfare:annihilator_blueprint" - } -} \ No newline at end of file diff --git a/src/main/java/com/atsuishio/superbwarfare/datagen/ModCustomLootProvider.java b/src/main/java/com/atsuishio/superbwarfare/datagen/ModCustomLootProvider.java index 8ac9df0ca..afc8c4fc4 100644 --- a/src/main/java/com/atsuishio/superbwarfare/datagen/ModCustomLootProvider.java +++ b/src/main/java/com/atsuishio/superbwarfare/datagen/ModCustomLootProvider.java @@ -145,8 +145,7 @@ public class ModCustomLootProvider implements LootTableSubProvider { new ItemEntry(ModItems.AURELIA_SCEPTRE_BLUEPRINT.get(), 2), new ItemEntry(ModItems.MK_42_BLUEPRINT.get(), 3), new ItemEntry(ModItems.MLE_1934_BLUEPRINT.get(), 2), - new ItemEntry(ModItems.HPJ_11_BLUEPRINT.get(), 2), - new ItemEntry(ModItems.ANNIHILATOR_BLUEPRINT.get(), 1) + new ItemEntry(ModItems.HPJ_11_BLUEPRINT.get(), 2) )) .withPool(multiItems(2, 0, new ItemEntry(ModItems.HANDGUN_AMMO_BOX.get(), 12) @@ -190,8 +189,7 @@ public class ModCustomLootProvider implements LootTableSubProvider { new ItemEntry(ModItems.AURELIA_SCEPTRE_BLUEPRINT.get(), 10), new ItemEntry(ModItems.MK_42_BLUEPRINT.get(), 10), new ItemEntry(ModItems.MLE_1934_BLUEPRINT.get(), 10), - new ItemEntry(ModItems.HPJ_11_BLUEPRINT.get(), 5), - new ItemEntry(ModItems.ANNIHILATOR_BLUEPRINT.get(), 5) + new ItemEntry(ModItems.HPJ_11_BLUEPRINT.get(), 5) )) .withPool(multiItems(2, 0, new ItemEntry(ModItems.HANDGUN_AMMO_BOX.get(), 12) diff --git a/src/main/java/com/atsuishio/superbwarfare/datagen/ModRecipeProvider.java b/src/main/java/com/atsuishio/superbwarfare/datagen/ModRecipeProvider.java index 613919003..9da2f6cb7 100644 --- a/src/main/java/com/atsuishio/superbwarfare/datagen/ModRecipeProvider.java +++ b/src/main/java/com/atsuishio/superbwarfare/datagen/ModRecipeProvider.java @@ -190,7 +190,6 @@ public class ModRecipeProvider extends RecipeProvider { copyBlueprint(writer, ModItems.MK_42_BLUEPRINT.get()); copyBlueprint(writer, ModItems.MLE_1934_BLUEPRINT.get()); copyBlueprint(writer, ModItems.HPJ_11_BLUEPRINT.get()); - copyBlueprint(writer, ModItems.ANNIHILATOR_BLUEPRINT.get()); } public static void copyBlueprint(RecipeOutput writer, ItemLike result) { diff --git a/src/main/java/com/atsuishio/superbwarfare/event/LivingEventHandler.java b/src/main/java/com/atsuishio/superbwarfare/event/LivingEventHandler.java index 51d85df8c..7fbdf5230 100644 --- a/src/main/java/com/atsuishio/superbwarfare/event/LivingEventHandler.java +++ b/src/main/java/com/atsuishio/superbwarfare/event/LivingEventHandler.java @@ -144,6 +144,7 @@ public class LivingEventHandler { if (armor != ItemStack.EMPTY && tag.contains("ArmorPlate")) { double armorValue = tag.getDouble("ArmorPlate"); tag.putDouble("ArmorPlate", Math.max(armorValue - damage, 0)); + NBTTool.saveTag(armor, tag); damage = Math.max(damage - armorValue, 0); } diff --git a/src/main/java/com/atsuishio/superbwarfare/network/message/receive/GunsDataMessage.java b/src/main/java/com/atsuishio/superbwarfare/network/message/receive/GunsDataMessage.java index aaa79d196..f7bbd44fc 100644 --- a/src/main/java/com/atsuishio/superbwarfare/network/message/receive/GunsDataMessage.java +++ b/src/main/java/com/atsuishio/superbwarfare/network/message/receive/GunsDataMessage.java @@ -11,6 +11,7 @@ import net.neoforged.neoforge.network.handling.IPayloadContext; import org.jetbrains.annotations.NotNull; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; public record GunsDataMessage(List data) implements CustomPacketPayload { @@ -39,7 +40,8 @@ public record GunsDataMessage(List data) implements CustomPacket } public static void handler(final GunsDataMessage message, final IPayloadContext context) { - GunsTool.gunsData.clear(); +// GunsTool.gunsData.clear(); + GunsTool.gunsData = new HashMap<>(); for (var entry : message.data) { if (GunsTool.gunsData.containsKey(entry.id)) continue; diff --git a/src/main/resources/data/superbwarfare/recipe/annihilator_crafting.json b/src/main/resources/data/superbwarfare/recipe/annihilator_crafting.json deleted file mode 100644 index 162500218..000000000 --- a/src/main/resources/data/superbwarfare/recipe/annihilator_crafting.json +++ /dev/null @@ -1,35 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "category": "misc", - "pattern": [ - "aaa", - "bbb", - "dce" - ], - "key": { - "a": { - "item": "minecraft:beacon" - }, - "b": { - "item": "superbwarfare:cannon_core" - }, - "c": { - "item": "superbwarfare:annihilator_blueprint" - }, - "d": { - "item": "minecraft:netherite_block" - }, - "e": { - "item": "superbwarfare:large_battery_pack" - } - }, - "result": { - "id": "superbwarfare:container", - "components": { - "minecraft:block_entity_data": { - "id": "superbwarfare:container", - "EntityType": "superbwarfare:annihilator" - } - } - } -} \ No newline at end of file diff --git a/src/main/resources/data/superbwarfare/recipe/perk/intelligent_chip_perk_crafting.json b/src/main/resources/data/superbwarfare/recipe/perk/intelligent_chip_perk_crafting.json deleted file mode 100644 index b03bc05e0..000000000 --- a/src/main/resources/data/superbwarfare/recipe/perk/intelligent_chip_perk_crafting.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "type": "minecraft:crafting_shaped", - "category": "equipment", - "pattern": [ - "bbb", - "bab", - "bbb" - ], - "key": { - "a": { - "item": "superbwarfare:empty_perk" - }, - "b": { - "item": "superbwarfare:ancient_cpu" - } - }, - "result": { - "id": "superbwarfare:intelligent_chip", - "count": 1 - } -} \ No newline at end of file