This commit is contained in:
kalle 2025-07-16 12:31:33 +02:00
parent 6f437212ce
commit 4c4b5d4a64
10 changed files with 6 additions and 127 deletions

View file

@ -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"
]
}
}

View file

@ -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

View file

@ -198,10 +198,6 @@
"type": "minecraft:item",
"name": "superbwarfare:hpj_11_blueprint",
"weight": 2
},
{
"type": "minecraft:item",
"name": "superbwarfare:annihilator_blueprint"
}
],
"rolls": 1.0

View file

@ -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"
}
}

View file

@ -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)

View file

@ -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) {

View file

@ -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);
}

View file

@ -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<DefaultGunData> data) implements CustomPacketPayload {
@ -39,7 +40,8 @@ public record GunsDataMessage(List<DefaultGunData> 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;

View file

@ -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"
}
}
}
}

View file

@ -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
}
}