-
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.
Added compat for wall jump, cyclic, and ensorcellation enchants
- Loading branch information
1 parent
18ae87a
commit 1c40af4
Showing
23 changed files
with
318 additions
and
3 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/autosmelt.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": "cyclic:auto_smelt", | ||
"required": false | ||
}, | ||
{ | ||
"id": "ensorcellation:smelting", | ||
"required": false | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/double_jump.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": "cyclic:launch", | ||
"required": false | ||
}, | ||
{ | ||
"id": "walljump:doublejump", | ||
"required": false | ||
} | ||
] | ||
} |
17 changes: 17 additions & 0 deletions
17
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/expanded.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,17 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{ | ||
"id": "cyclic:excavate", | ||
"required": false | ||
}, | ||
{ | ||
"id": "ensorcellation:excavating", | ||
"required": false | ||
}, | ||
{ | ||
"id": "ensorcellation:furrowing", | ||
"required": false | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/experienced.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": "cyclic:experience_boost", | ||
"required": false | ||
}, | ||
{ | ||
"id": "ensorcellation:exp_boost", | ||
"required": false | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/killager.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,9 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{ | ||
"id": "ensorcellation:damage_illager", | ||
"required": false | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
...erated/resources/data/tconstruct/tags/enchantment/modifier_like/knockback_resistance.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,9 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{ | ||
"id": "cyclic:steady", | ||
"required": false | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/luck.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,9 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{ | ||
"id": "ensorcellation:hunter", | ||
"required": false | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/magic_protection.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,9 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{ | ||
"id": "ensorcellation:magic_protection", | ||
"required": false | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/magnetic.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,9 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{ | ||
"id": "cyclic:magnet", | ||
"required": false | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/multishot.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": "cyclic:multishot", | ||
"required": false | ||
}, | ||
{ | ||
"id": "ensorcellation:volley", | ||
"required": false | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/necrotic.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": "cyclic:life_leech", | ||
"required": false | ||
}, | ||
{ | ||
"id": "ensorcellation:leech", | ||
"required": false | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/reach.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": "cyclic:reach", | ||
"required": false | ||
}, | ||
{ | ||
"id": "ensorcellation:reach", | ||
"required": false | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/revitalizing.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,9 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{ | ||
"id": "ensorcellation:vitality", | ||
"required": false | ||
} | ||
] | ||
} |
13 changes: 13 additions & 0 deletions
13
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/severing.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": "cyclic:beheading", | ||
"required": false | ||
}, | ||
{ | ||
"id": "ensorcellation:vorpal", | ||
"required": false | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/soulbound.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,9 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{ | ||
"id": "ensorcellation:soulbound", | ||
"required": false | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/step_up.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,9 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{ | ||
"id": "cyclic:step", | ||
"required": false | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/tilling.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,9 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{ | ||
"id": "ensorcellation:tilling", | ||
"required": false | ||
} | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
src/generated/resources/data/tconstruct/tags/enchantment/modifier_like/trueshot.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,9 @@ | ||
{ | ||
"replace": false, | ||
"values": [ | ||
{ | ||
"id": "ensorcellation:trueshot", | ||
"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
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
60 changes: 60 additions & 0 deletions
60
src/main/java/slimeknights/tconstruct/common/data/tags/EnchantmentTagProvider.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,60 @@ | ||
package slimeknights.tconstruct.common.data.tags; | ||
|
||
import net.minecraft.core.Registry; | ||
import net.minecraft.data.DataGenerator; | ||
import net.minecraft.data.tags.TagsProvider; | ||
import net.minecraft.resources.ResourceLocation; | ||
import net.minecraft.tags.TagKey; | ||
import net.minecraft.world.item.enchantment.Enchantment; | ||
import net.minecraftforge.common.data.ExistingFileHelper; | ||
import org.jetbrains.annotations.Nullable; | ||
import slimeknights.tconstruct.TConstruct; | ||
import slimeknights.tconstruct.library.modifiers.ModifierId; | ||
import slimeknights.tconstruct.tools.TinkerModifiers; | ||
import slimeknights.tconstruct.tools.data.ModifierIds; | ||
|
||
public class EnchantmentTagProvider extends TagsProvider<Enchantment> { | ||
public EnchantmentTagProvider(DataGenerator generator, @Nullable ExistingFileHelper existingFileHelper) { | ||
super(generator, Registry.ENCHANTMENT, TConstruct.MOD_ID, existingFileHelper); | ||
} | ||
|
||
@Override | ||
protected void addTags() { | ||
// upgrade | ||
modifierTag(TinkerModifiers.experienced.getId(), "cyclic:experience_boost", "ensorcellation:exp_boost"); | ||
modifierTag(ModifierIds.killager, "ensorcellation:damage_illager"); | ||
modifierTag(TinkerModifiers.magnetic.getId(), "cyclic:magnet"); | ||
modifierTag(TinkerModifiers.necrotic.getId(), "cyclic:life_leech", "ensorcellation:leech"); | ||
modifierTag(TinkerModifiers.severing.getId(), "cyclic:beheading", "ensorcellation:vorpal"); | ||
modifierTag(ModifierIds.stepUp, "cyclic:step"); | ||
modifierTag(TinkerModifiers.soulbound.getId(), "ensorcellation:soulbound"); | ||
modifierTag(ModifierIds.trueshot, "ensorcellation:trueshot"); | ||
|
||
// defense | ||
modifierTag(ModifierIds.knockbackResistance, "cyclic:steady"); | ||
modifierTag(TinkerModifiers.magicProtection.getId(), "ensorcellation:magic_protection"); | ||
modifierTag(ModifierIds.revitalizing, "ensorcellation:vitality"); | ||
|
||
// ability | ||
modifierTag(TinkerModifiers.autosmelt.getId(), "cyclic:auto_smelt", "ensorcellation:smelting"); | ||
modifierTag(TinkerModifiers.doubleJump.getId(), "cyclic:launch", "walljump:doublejump"); | ||
modifierTag(TinkerModifiers.expanded.getId(), "cyclic:excavate", "ensorcellation:excavating", "ensorcellation:furrowing"); | ||
modifierTag(ModifierIds.luck, "ensorcellation:hunter"); | ||
modifierTag(TinkerModifiers.multishot.getId(), "cyclic:multishot", "ensorcellation:volley"); | ||
modifierTag(ModifierIds.reach, "cyclic:reach", "ensorcellation:reach"); | ||
modifierTag(TinkerModifiers.tilling.getId(), "ensorcellation:tilling"); | ||
} | ||
|
||
/** Creates a builder for a tag for the given modifier */ | ||
private void modifierTag(ModifierId modifier, String... ids) { | ||
TagsProvider.TagAppender<Enchantment> appender = tag(TagKey.create(Registry.ENCHANTMENT_REGISTRY, TConstruct.getResource("modifier_like/" + modifier.getPath()))); | ||
for (String id : ids) { | ||
appender.addOptional(new ResourceLocation(id)); | ||
} | ||
} | ||
|
||
@Override | ||
public String getName() { | ||
return "Tinkers' Construct Block Enchantment Tags"; | ||
} | ||
} |
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.