-
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.
Implement modifier and material tags
Modifier tags can be used in modifier entries as part of the compound logic. They also are needed for a future feature Material tags work in random materials and as a filter for the book
- Loading branch information
1 parent
945f79e
commit 288eb4d
Showing
22 changed files
with
804 additions
and
38 deletions.
There are no files selected for viewing
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
25 changes: 25 additions & 0 deletions
25
src/generated/resources/data/tconstruct/tinkering/tags/materials/nether.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,25 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
"tconstruct:wood", | ||
"tconstruct:flint", | ||
"tconstruct:rock", | ||
"tconstruct:bone", | ||
"tconstruct:leather", | ||
"tconstruct:vine", | ||
"tconstruct:string", | ||
"tconstruct:iron", | ||
"tconstruct:scorched_stone", | ||
"tconstruct:slimewood", | ||
"tconstruct:necrotic_bone", | ||
"tconstruct:bloodbone", | ||
"tconstruct:chain", | ||
"tconstruct:nahuatl", | ||
"tconstruct:cobalt", | ||
"tconstruct:darkthread", | ||
"tconstruct:manyullyn", | ||
"tconstruct:queens_slime", | ||
"tconstruct:blazing_bone", | ||
"tconstruct:ancient_hide" | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
src/generated/resources/data/tconstruct/tinkering/tags/modifiers/gems.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,13 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{ | ||
"id": "tconstruct:diamond", | ||
"required": false | ||
}, | ||
{ | ||
"id": "tconstruct:emerald", | ||
"required": false | ||
} | ||
] | ||
} |
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
37 changes: 37 additions & 0 deletions
37
src/main/java/slimeknights/tconstruct/common/data/tags/MaterialTagProvider.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,37 @@ | ||
package slimeknights.tconstruct.common.data.tags; | ||
|
||
import net.minecraft.data.DataGenerator; | ||
import net.minecraftforge.common.data.ExistingFileHelper; | ||
import slimeknights.tconstruct.TConstruct; | ||
import slimeknights.tconstruct.common.TinkerTags; | ||
import slimeknights.tconstruct.library.data.tinkering.AbstractMaterialTagProvider; | ||
import slimeknights.tconstruct.tools.data.material.MaterialIds; | ||
|
||
public class MaterialTagProvider extends AbstractMaterialTagProvider { | ||
public MaterialTagProvider(DataGenerator generator, ExistingFileHelper existingFileHelper) { | ||
super(generator, TConstruct.MOD_ID, existingFileHelper); | ||
} | ||
|
||
@Override | ||
protected void addTags() { | ||
tag(TinkerTags.Materials.NETHER).add( | ||
// tier 1 | ||
MaterialIds.wood, MaterialIds.flint, MaterialIds.rock, MaterialIds.bone, | ||
MaterialIds.leather, MaterialIds.vine, MaterialIds.string, | ||
// tier 2 | ||
MaterialIds.iron, MaterialIds.scorchedStone, MaterialIds.slimewood, MaterialIds.necroticBone, MaterialIds.bloodbone, | ||
MaterialIds.chain, | ||
// tier 3 | ||
MaterialIds.nahuatl, MaterialIds.cobalt, | ||
MaterialIds.darkthread, | ||
// tier 4 | ||
MaterialIds.manyullyn, MaterialIds.queensSlime, MaterialIds.blazingBone, | ||
MaterialIds.ancientHide | ||
); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "Tinkers' Construct Material Tag Provider"; | ||
} | ||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/slimeknights/tconstruct/common/data/tags/ModifierTagProvider.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,24 @@ | ||
package slimeknights.tconstruct.common.data.tags; | ||
|
||
import net.minecraft.data.DataGenerator; | ||
import net.minecraftforge.common.data.ExistingFileHelper; | ||
import slimeknights.tconstruct.TConstruct; | ||
import slimeknights.tconstruct.common.TinkerTags; | ||
import slimeknights.tconstruct.library.data.tinkering.AbstractModifierTagProvider; | ||
import slimeknights.tconstruct.tools.data.ModifierIds; | ||
|
||
public class ModifierTagProvider extends AbstractModifierTagProvider { | ||
public ModifierTagProvider(DataGenerator generator, ExistingFileHelper existingFileHelper) { | ||
super(generator, TConstruct.MOD_ID, existingFileHelper); | ||
} | ||
|
||
@Override | ||
protected void addTags() { | ||
tag(TinkerTags.Modifiers.GEMS).addOptional(ModifierIds.diamond, ModifierIds.emerald); | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "Tinkers' Construct Modifier Tag Provider"; | ||
} | ||
} |
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.