-
Notifications
You must be signed in to change notification settings - Fork 755
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Travelers shields are lightweight shields, allowing you to dash while shielding. They only block a max of 10 damage, which is sufficient against most attacks Plate shield will come in a later commit
- Loading branch information
1 parent
42a3a84
commit 278d60d
Showing
29 changed files
with
288 additions
and
7 deletions.
There are no files selected for viewing
32 changes: 32 additions & 0 deletions
32
...ata/tconstruct/advancements/recipes/tconstruct/tools/armor/building/travelers_shield.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"parent": "minecraft:recipes/root", | ||
"rewards": { | ||
"recipes": [ | ||
"tconstruct:armor/building/travelers_shield" | ||
] | ||
}, | ||
"criteria": { | ||
"has_item": { | ||
"trigger": "minecraft:inventory_changed", | ||
"conditions": { | ||
"items": [ | ||
{ | ||
"tag": "forge:ingots/copper" | ||
} | ||
] | ||
} | ||
}, | ||
"has_the_recipe": { | ||
"trigger": "minecraft:recipe_unlocked", | ||
"conditions": { | ||
"recipe": "tconstruct:armor/building/travelers_shield" | ||
} | ||
} | ||
}, | ||
"requirements": [ | ||
[ | ||
"has_item", | ||
"has_the_recipe" | ||
] | ||
] | ||
} |
19 changes: 19 additions & 0 deletions
19
src/generated/resources/data/tconstruct/recipes/armor/building/travelers_shield.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"type": "minecraft:crafting_shaped", | ||
"pattern": [ | ||
" c ", | ||
"cwc", | ||
" c " | ||
], | ||
"key": { | ||
"c": { | ||
"tag": "forge:ingots/copper" | ||
}, | ||
"w": { | ||
"tag": "minecraft:planks" | ||
} | ||
}, | ||
"result": { | ||
"item": "tconstruct:travelers_shield" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 7 additions & 0 deletions
7
src/generated/resources/data/tconstruct/recipes/armor/repair/travelers_wood_repair_kit.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "tconstruct:specialized_repair_kit", | ||
"tool": { | ||
"item": "tconstruct:travelers_shield" | ||
}, | ||
"repair_material": "tconstruct:wood" | ||
} |
7 changes: 7 additions & 0 deletions
7
src/generated/resources/data/tconstruct/recipes/armor/repair/travelers_wood_station.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"type": "tconstruct:specialized_station_repair", | ||
"tool": { | ||
"item": "tconstruct:travelers_shield" | ||
}, | ||
"repair_material": "tconstruct:wood" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
src/generated/resources/data/tconstruct/tags/items/modifiable/shields.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
{ | ||
"replace": false, | ||
"values": [] | ||
"values": [ | ||
"tconstruct:travelers_shield" | ||
] | ||
} |
33 changes: 33 additions & 0 deletions
33
src/generated/resources/data/tconstruct/tinkering/tool_definitions/travelers_shield.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{ | ||
"stats": { | ||
"base": { | ||
"tconstruct:durability": 200.0, | ||
"tconstruct:block_amount": 10.0 | ||
} | ||
}, | ||
"slots": { | ||
"upgrades": 3, | ||
"defense": 2, | ||
"abilities": 1 | ||
}, | ||
"traits": [ | ||
{ | ||
"name": "tconstruct:blocking", | ||
"level": 1 | ||
}, | ||
{ | ||
"name": "tconstruct:fast_use_item", | ||
"level": 1 | ||
} | ||
], | ||
"modules": { | ||
"tconstruct:tool_interaction": { | ||
"type": "tconstruct:preference_set_interaction", | ||
"preferred_source": "right_click", | ||
"preferred_modifiers": { | ||
"type": "tconstruct:single", | ||
"modifier": "tconstruct:blocking" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
...java/slimeknights/tconstruct/library/json/predicate/modifier/SingleModifierPredicate.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
package slimeknights.tconstruct.library.json.predicate.modifier; | ||
|
||
import com.google.gson.JsonObject; | ||
import net.minecraft.network.FriendlyByteBuf; | ||
import slimeknights.mantle.data.GenericLoaderRegistry.IGenericLoader; | ||
import slimeknights.mantle.data.predicate.IJsonPredicate; | ||
import slimeknights.mantle.util.JsonHelper; | ||
import slimeknights.tconstruct.library.modifiers.ModifierId; | ||
|
||
/** Predicate matching a single modifier */ | ||
public record SingleModifierPredicate(ModifierId modifier) implements ModifierPredicate { | ||
@Override | ||
public boolean matches(ModifierId input) { | ||
return input.equals(modifier); | ||
} | ||
|
||
@Override | ||
public IGenericLoader<? extends IJsonPredicate<ModifierId>> getLoader() { | ||
return LOADER; | ||
} | ||
|
||
public static final IGenericLoader<SingleModifierPredicate> LOADER = new IGenericLoader<>() { | ||
@Override | ||
public SingleModifierPredicate deserialize(JsonObject json) { | ||
return new SingleModifierPredicate(new ModifierId(JsonHelper.getResourceLocation(json, "modifier"))); | ||
} | ||
|
||
@Override | ||
public SingleModifierPredicate fromNetwork(FriendlyByteBuf buffer) { | ||
return new SingleModifierPredicate(new ModifierId(buffer.readResourceLocation())); | ||
} | ||
|
||
@Override | ||
public void serialize(SingleModifierPredicate object, JsonObject json) { | ||
json.addProperty("modifier", object.modifier.toString()); | ||
} | ||
|
||
@Override | ||
public void toNetwork(SingleModifierPredicate object, FriendlyByteBuf buffer) { | ||
buffer.writeResourceLocation(object.modifier); | ||
} | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.