-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
67 changed files
with
1,034 additions
and
362 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
120 changes: 120 additions & 0 deletions
120
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher.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,120 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"overrides": [ | ||
{ | ||
"model": "hexcasting:item/ancient_cypher", | ||
"predicate": { | ||
"hexcasting:has_patterns": -0.01, | ||
"hexcasting:variant": 0.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_0_filled", | ||
"predicate": { | ||
"hexcasting:has_patterns": 0.99, | ||
"hexcasting:variant": 0.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_1", | ||
"predicate": { | ||
"hexcasting:has_patterns": -0.01, | ||
"hexcasting:variant": 1.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_1_filled", | ||
"predicate": { | ||
"hexcasting:has_patterns": 0.99, | ||
"hexcasting:variant": 1.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_2", | ||
"predicate": { | ||
"hexcasting:has_patterns": -0.01, | ||
"hexcasting:variant": 2.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_2_filled", | ||
"predicate": { | ||
"hexcasting:has_patterns": 0.99, | ||
"hexcasting:variant": 2.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_3", | ||
"predicate": { | ||
"hexcasting:has_patterns": -0.01, | ||
"hexcasting:variant": 3.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_3_filled", | ||
"predicate": { | ||
"hexcasting:has_patterns": 0.99, | ||
"hexcasting:variant": 3.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_4", | ||
"predicate": { | ||
"hexcasting:has_patterns": -0.01, | ||
"hexcasting:variant": 4.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_4_filled", | ||
"predicate": { | ||
"hexcasting:has_patterns": 0.99, | ||
"hexcasting:variant": 4.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_5", | ||
"predicate": { | ||
"hexcasting:has_patterns": -0.01, | ||
"hexcasting:variant": 5.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_5_filled", | ||
"predicate": { | ||
"hexcasting:has_patterns": 0.99, | ||
"hexcasting:variant": 5.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_6", | ||
"predicate": { | ||
"hexcasting:has_patterns": -0.01, | ||
"hexcasting:variant": 6.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_6_filled", | ||
"predicate": { | ||
"hexcasting:has_patterns": 0.99, | ||
"hexcasting:variant": 6.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_7", | ||
"predicate": { | ||
"hexcasting:has_patterns": -0.01, | ||
"hexcasting:variant": 7.0 | ||
} | ||
}, | ||
{ | ||
"model": "hexcasting:item/ancient_cypher_7_filled", | ||
"predicate": { | ||
"hexcasting:has_patterns": 0.99, | ||
"hexcasting:variant": 7.0 | ||
} | ||
} | ||
], | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/0_ancient_cypher" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_0_filled.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 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/0_ancient_cypher", | ||
"layer1": "hexcasting:item/cad/0_ancient_cypher_overlay" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_1.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,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/1_ancient_cypher" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_1_filled.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 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/1_ancient_cypher", | ||
"layer1": "hexcasting:item/cad/1_ancient_cypher_overlay" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_2.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,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/2_ancient_cypher" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_2_filled.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 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/2_ancient_cypher", | ||
"layer1": "hexcasting:item/cad/2_ancient_cypher_overlay" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_3.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,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/3_ancient_cypher" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_3_filled.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 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/3_ancient_cypher", | ||
"layer1": "hexcasting:item/cad/3_ancient_cypher_overlay" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_4.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,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/4_ancient_cypher" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_4_filled.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 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/4_ancient_cypher", | ||
"layer1": "hexcasting:item/cad/4_ancient_cypher_overlay" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_5.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,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/5_ancient_cypher" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_5_filled.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 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/5_ancient_cypher", | ||
"layer1": "hexcasting:item/cad/5_ancient_cypher_overlay" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_6.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,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/6_ancient_cypher" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_6_filled.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 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/6_ancient_cypher", | ||
"layer1": "hexcasting:item/cad/6_ancient_cypher_overlay" | ||
} | ||
} |
6 changes: 6 additions & 0 deletions
6
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_7.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,6 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/7_ancient_cypher" | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
Common/src/generated/resources/assets/hexcasting/models/item/ancient_cypher_7_filled.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 @@ | ||
{ | ||
"parent": "minecraft:item/generated", | ||
"textures": { | ||
"layer0": "hexcasting:item/cad/7_ancient_cypher", | ||
"layer1": "hexcasting:item/cad/7_ancient_cypher_overlay" | ||
} | ||
} |
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
59 changes: 59 additions & 0 deletions
59
Common/src/main/java/at/petrak/hexcasting/common/items/magic/ItemAncientCypher.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,59 @@ | ||
package at.petrak.hexcasting.common.items.magic; | ||
|
||
import at.petrak.hexcasting.api.casting.iota.IotaType; | ||
import at.petrak.hexcasting.api.utils.NBTHelper; | ||
import net.minecraft.nbt.CompoundTag; | ||
import net.minecraft.nbt.Tag; | ||
import net.minecraft.ChatFormatting; | ||
import net.minecraft.network.chat.Component; | ||
import net.minecraft.world.item.ItemStack; | ||
import net.minecraft.world.item.TooltipFlag; | ||
import net.minecraft.world.level.Level; | ||
import org.jetbrains.annotations.Nullable; | ||
|
||
import java.util.List; | ||
|
||
public class ItemAncientCypher extends ItemCypher { | ||
public static final String TAG_PATTERNS = "patterns"; | ||
public static final String TAG_HEX_NAME = "hex_name"; | ||
|
||
public ItemAncientCypher(Properties pProperties) { | ||
super(pProperties); | ||
} | ||
|
||
@Override | ||
public void clearHex(ItemStack stack) { | ||
super.clearHex(stack); | ||
NBTHelper.remove(stack, TAG_HEX_NAME); | ||
} | ||
|
||
@Override | ||
public Component getName(ItemStack pStack) { | ||
var descID = this.getDescriptionId(pStack); | ||
var hexName = NBTHelper.getString(pStack, TAG_HEX_NAME); | ||
if (hexName != null) { | ||
return Component.translatable(descID + ".preset", Component.translatable(hexName)); | ||
} else { | ||
return Component.translatable(descID); | ||
} | ||
} | ||
|
||
@Override | ||
public void appendHoverText(ItemStack pStack, @Nullable Level pLevel, List<Component> pTooltipComponents, | ||
TooltipFlag pIsAdvanced) { | ||
// display media fullness as usual | ||
super.appendHoverText(pStack, pLevel, pTooltipComponents, pIsAdvanced); | ||
|
||
// also show contained spell | ||
var patternsTag = NBTHelper.getList(pStack, TAG_PATTERNS, Tag.TAG_COMPOUND); | ||
if (patternsTag != null) { | ||
var storedHex = Component.translatable("hexcasting.tooltip.stored_hex"); | ||
for (var iotaTag : patternsTag) { | ||
var iotaTagC = NBTHelper.getAsCompound(iotaTag); | ||
var iotaComponent = IotaType.getDisplay(iotaTagC).copy(); | ||
storedHex.append(iotaComponent.withStyle(ChatFormatting.DARK_PURPLE)); | ||
} | ||
pTooltipComponents.add(storedHex); | ||
} | ||
} | ||
} |
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.