Skip to content

Commit

Permalink
Added unarmed tag, to make it easier to make non-chestplates unarmed
Browse files Browse the repository at this point in the history
I am imaginging an addon adds gauntlets and removes chestplates from the unarmed tag
If I missed anything and you wish to add this feature, make an issue or let me know on discord
  • Loading branch information
KnightMiner committed May 3, 2022
1 parent 59c638f commit b805d1f
Show file tree
Hide file tree
Showing 43 changed files with 57 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"abilities": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"abilities": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,9 @@
"type": "tconstruct:modifier_salvage",
"tools": {
"type": "forge:difference",
"base": [
{
"tag": "tconstruct:modifiable/melee"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
}
],
"base": {
"tag": "tconstruct:modifiable/melee"
},
"subtracted": {
"item": "tconstruct:dagger"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tag": "tconstruct:modifiable/melee_or_harvest"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
}
],
"slots": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "tconstruct:modifier_salvage",
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"abilities": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tag": "tconstruct:modifiable/melee"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
}
],
"slots": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tag": "tconstruct:modifiable/melee"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
}
],
"slots": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tag": "tconstruct:modifiable/melee"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
}
],
"slots": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"tag": "tconstruct:modifiable/armor/leggings"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
}
],
"slots": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tag": "tconstruct:modifiable/melee"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
}
],
"slots": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tag": "tconstruct:modifiable/melee"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
}
],
"slots": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "tconstruct:modifier_salvage",
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "tconstruct:modifier_salvage",
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"type": "tconstruct:modifier_salvage",
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tag": "tconstruct:modifiable/melee"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
}
],
"slots": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tag": "tconstruct:modifiable/melee"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
}
],
"slots": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tag": "tconstruct:modifiable/melee"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
}
],
"slots": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tag": "tconstruct:modifiable/melee"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
}
],
"slots": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"tag": "tconstruct:modifiable/melee"
},
{
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
}
],
"slots": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"amount_per_item": 1,
"needed_per_level": 20,
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"amount_per_item": 1,
"needed_per_level": 15,
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"amount_per_item": 1,
"needed_per_level": 25,
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
],
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"amount_per_item": 1,
"needed_per_level": 25,
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"amount_per_item": 9,
"needed_per_level": 45,
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"amount_per_item": 1,
"needed_per_level": 45,
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
}
],
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
}
],
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
],
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
],
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
],
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"needed_per_level": 36,
"leftover": "minecraft:quartz",
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"amount_per_item": 1,
"needed_per_level": 36,
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"amount_per_item": 1,
"needed_per_level": 5,
"tools": {
"tag": "tconstruct:modifiable/armor/chestplate"
"tag": "tconstruct:modifiable/unarmed"
},
"slots": {
"upgrades": 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"replace": false,
"values": [
"#tconstruct:modifiable/melee",
"#tconstruct:modifiable/armor/chestplate"
"#tconstruct:modifiable/unarmed"
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"replace": false,
"values": [
"#tconstruct:modifiable/armor/chestplate"
]
}
2 changes: 2 additions & 0 deletions src/main/java/slimeknights/tconstruct/common/TinkerTags.java
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,8 @@ private static void init() {}
public static final TagKey<Item> CHESTPLATES = tag("modifiable/armor/chestplate");
/** Modifiable items that are worn as helmets */
public static final TagKey<Item> HELMETS = tag("modifiable/armor/helmets");
/** Modifiable items that boost unarmed attack damage. By default this is just chestplates, but added as a tag to make it easier for adds to change */
public static final TagKey<Item> UNARMED = tag("modifiable/unarmed");
// /** Modifiable items that support ranged attacks, such as bows */
// public static final TagKey<Item> RANGED = tag("modifiable/ranged");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import static slimeknights.tconstruct.common.TinkerTags.Items.STONE_HARVEST;
import static slimeknights.tconstruct.common.TinkerTags.Items.SWORD;
import static slimeknights.tconstruct.common.TinkerTags.Items.TWO_HANDED;
import static slimeknights.tconstruct.common.TinkerTags.Items.UNARMED;

@SuppressWarnings("unchecked")
public class ItemTagProvider extends ItemTagsProvider {
Expand Down Expand Up @@ -228,7 +229,8 @@ private void addTools() {
this.tag(MELEE).addTag(MELEE_PRIMARY).addTag(SWORD);
// modifier helper tags
this.tag(MELEE_OR_HARVEST).addTag(MELEE).addTag(HARVEST);
this.tag(MELEE_OR_UNARMED).addTag(MELEE).addTag(CHESTPLATES);
this.tag(MELEE_OR_UNARMED).addTag(MELEE).addTag(UNARMED);
this.tag(UNARMED).addTag(CHESTPLATES);
this.tag(HELD).addTag(ONE_HANDED).addTag(TWO_HANDED);
this.tag(INTERACTABLE).addTag(HELD).addTag(CHESTPLATES);
this.tag(ARMOR).addTag(BOOTS).addTag(LEGGINGS).addTag(CHESTPLATES).addTag(HELMETS);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,10 +180,10 @@ private void writeCommon(JsonObject json, @Nullable Boolean unarmed) {
}
// if true, only chestplates
if (unarmed == Boolean.TRUE) {
ingredient = Ingredient.of(TinkerTags.Items.CHESTPLATES);
ingredient = Ingredient.of(TinkerTags.Items.UNARMED);
// if null, both
} else if (unarmed == null) {
ingredient = CompoundIngredient.of(ingredient, Ingredient.of(TinkerTags.Items.CHESTPLATES));
ingredient = CompoundIngredient.of(ingredient, Ingredient.of(TinkerTags.Items.UNARMED));
}
json.add("tools", ingredient.toJson());
if (maxToolSize != ITinkerStationRecipe.DEFAULT_TOOL_STACK_SIZE) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ public static List<Component> getArmorStats(IToolStackView tool, @Nullable Playe
builder.addOptional(ToolStats.ARMOR_TOUGHNESS);
builder.addOptional(ToolStats.KNOCKBACK_RESISTANCE, 10f);
}
if (tool.hasTag(TinkerTags.Items.CHESTPLATES) && tool.getModifierLevel(TinkerModifiers.unarmed.getId()) > 0) {
if (tool.hasTag(TinkerTags.Items.UNARMED) && tool.getModifierLevel(TinkerModifiers.unarmed.getId()) > 0) {
builder.addWithAttribute(ToolStats.ATTACK_DAMAGE, Attributes.ATTACK_DAMAGE);
}

Expand Down

0 comments on commit b805d1f

Please sign in to comment.