Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/colorizer/ancient"
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"parent": "minecraft:item/generated",
"textures": {
"layer0": "hexcasting:item/colorizer/uuid"
"layer0": "hexcasting:item/colorizer/default"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ public record FrozenPigment(ItemStack item, UUID owner) {
public static final Supplier<FrozenPigment> DEFAULT =
() -> new FrozenPigment(new ItemStack(HexItems.DEFAULT_PIGMENT), Util.NIL_UUID);

public static final Supplier<FrozenPigment> ANCIENT =
() -> new FrozenPigment(new ItemStack(HexItems.ANCIENT_PIGMENT), Util.NIL_UUID);

public CompoundTag serializeToNBT() {
var out = new CompoundTag();
out.put(TAG_STACK, this.item.save(new CompoundTag()));
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package at.petrak.hexcasting.common.items.pigment;

import at.petrak.hexcasting.api.addldata.ADPigment;
import at.petrak.hexcasting.api.item.PigmentItem;
import at.petrak.hexcasting.api.pigment.ColorProvider;
import net.minecraft.world.item.Item;
import net.minecraft.world.item.ItemStack;
import net.minecraft.world.phys.Vec3;

import java.util.UUID;

public class ItemAmethystPigment extends Item implements PigmentItem {
public ItemAmethystPigment(Properties pProperties) {
super(pProperties);
}

@Override
public ColorProvider provideColor(ItemStack stack, UUID owner) {
return colorProvider;
}

protected MyColorProvider colorProvider = new MyColorProvider();

protected class MyColorProvider extends ColorProvider {
@Override
protected int getRawColor(float time, Vec3 position) {
return 0xff_ab65eb;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
import at.petrak.hexcasting.common.items.ItemLoreFragment;
import at.petrak.hexcasting.common.items.ItemStaff;
import at.petrak.hexcasting.common.items.magic.*;
import at.petrak.hexcasting.common.items.pigment.ItemAmethystAndCopperPigment;
import at.petrak.hexcasting.common.items.pigment.ItemDyePigment;
import at.petrak.hexcasting.common.items.pigment.ItemPridePigment;
import at.petrak.hexcasting.common.items.pigment.ItemUUIDPigment;
import at.petrak.hexcasting.common.items.pigment.*;
import at.petrak.hexcasting.common.items.storage.*;
import at.petrak.hexcasting.xplat.IXplatAbstractions;
import com.google.common.base.Suppliers;
Expand Down Expand Up @@ -136,6 +133,8 @@ public static void registerItemCreativeTab(CreativeModeTab.Output r, CreativeMod

public static final Item UUID_PIGMENT = make("uuid_colorizer", new ItemUUIDPigment(unstackable()));
public static final Item DEFAULT_PIGMENT = make("default_colorizer",
new ItemAmethystPigment(unstackable()));
public static final Item ANCIENT_PIGMENT = make("ancient_colorizer",
new ItemAmethystAndCopperPigment(unstackable()));

// BUFF SANDVICH
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,15 @@
import at.petrak.hexcasting.api.utils.HexUtils;
import at.petrak.hexcasting.api.item.VariantItem;
import at.petrak.hexcasting.api.misc.MediaConstants;
import at.petrak.hexcasting.api.pigment.FrozenPigment;
import at.petrak.hexcasting.common.items.magic.ItemAncientCypher;
import at.petrak.hexcasting.common.items.magic.ItemPackagedHex;
import at.petrak.hexcasting.common.lib.HexItems;
import at.petrak.hexcasting.common.lib.HexLootFunctions;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import net.minecraft.Util;
import net.minecraft.util.RandomSource;
import net.minecraft.nbt.ListTag;
import net.minecraft.nbt.CompoundTag;
Expand Down Expand Up @@ -49,11 +53,14 @@ public static ItemStack doStatic(ItemStack stack, RandomSource rand) {
}

var tag = new CompoundTag();

tag.putString(ItemAncientCypher.TAG_HEX_NAME, hex.getFirst());
tag.put(ItemAncientCypher.TAG_PATTERNS, patsTag);
tag.put(ItemPackagedHex.TAG_PIGMENT, FrozenPigment.ANCIENT.get().serializeToNBT());
tag.putLong(ItemAncientCypher.TAG_MEDIA, 32*MediaConstants.SHARD_UNIT);
tag.putLong(ItemAncientCypher.TAG_MAX_MEDIA, 32*MediaConstants.SHARD_UNIT);
tag.putInt(VariantItem.TAG_VARIANT, rand.nextInt(8));
tag.put(ItemAncientCypher.TAG_PATTERNS, patsTag);

stack.getOrCreateTag().merge(tag);

return stack;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ public void buildRecipes(Consumer<FinishedRecipe> recipes) {

ring(RecipeCategory.MISC, HexItems.UUID_PIGMENT, 1, HexItems.AMETHYST_DUST, Items.AMETHYST_SHARD)
.unlockedBy("has_item", hasItem(HexItems.AMETHYST_DUST)).save(recipes);
ring(RecipeCategory.MISC, HexItems.DEFAULT_PIGMENT, 1, HexItems.AMETHYST_DUST, Items.COPPER_INGOT)
ringCornerless(RecipeCategory.MISC, HexItems.DEFAULT_PIGMENT, 1, HexItems.AMETHYST_DUST, Items.AMETHYST_SHARD)
.unlockedBy("has_item", hasItem(HexItems.AMETHYST_DUST)).save(recipes);
ringCornerless(RecipeCategory.MISC, HexItems.ANCIENT_PIGMENT, 1, HexItems.AMETHYST_DUST, Items.COPPER_INGOT)
.unlockedBy("has_item", hasItem(HexItems.AMETHYST_DUST)).save(recipes);

ShapedRecipeBuilder.shaped(RecipeCategory.DECORATIONS, HexItems.SCROLL_SMOL)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@

uuid_colorizer: "Soulglimmer Pigment",
default_colorizer: "Vacant Pigment",
ancient_colorizer: "Ancient Pigment",

creative_unlocker: {
"": "The Media Cube",
Expand Down Expand Up @@ -1563,7 +1564,8 @@

ancient_cyphers: {
"1": "While adventuring, I've come across what appear to be $(l:items/hexcasting)$(item)Cyphers/$ created by the Hexcasters of the ancient past. These $(item)Ancient Cyphers/$ work just like the ones I can craft: they can't be recharged, and will break when their reserve of _Media runs out. However, unlike my own $(l:items/hexcasting)$(item)Cyphers/$, their decayed structure allows me to glimpse the _Hex stored within.",
"2": "These may be useful for learning new techniques - who better to teach me than ancient masters of the art?$(br2)Alternatively, I could erase the contents of one and store my own _Hex inside, creating a casting item that clearly displays its own function."
"2": "These may be useful for learning new techniques - who better to teach me than ancient masters of the art?$(br2)Alternatively, I could erase the contents of one and store my own _Hex inside, creating a casting item that clearly displays its own function.",
"3": "The $(l:items/pigments)$(item)Pigment/$ baked into these relics is a unique blend of purple and orange, matching their copper-and-amethyst appearance. I can replicate it using the above recipe.",
},

phials: {
Expand All @@ -1586,7 +1588,7 @@
"colored.crafting.header": "Chromatic Pigments",
"colored.crafting.desc": "Pigments in all the colors of the rainbow.",

special: "And finally, a pair of special pigments. $(item)Soulglimmer Pigment/$ shines with colors wholly unique to me, and $(item)Vacant Pigment/$ restores my original purplish-orange spread.$(br2)$(italic)And all the colors I am inside have not been invented yet./$",
special: "And finally, a pair of special pigments. $(item)Soulglimmer Pigment/$ shines with colors wholly unique to me, and $(item)Vacant Pigment/$ restores my original amethyst hue.$(br2)$(italic)And all the colors I am inside have not been invented yet./$",
},

edified: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
"type": "patchouli:spotlight",
"text": "hexcasting.page.ancient_cyphers.2",
"item": "hexcasting:ancient_cypher{variant:0},hexcasting:ancient_cypher{variant:1},hexcasting:ancient_cypher{variant:2},hexcasting:ancient_cypher{variant:3},hexcasting:ancient_cypher{variant:4},hexcasting:ancient_cypher{variant:5},hexcasting:ancient_cypher{variant:6},hexcasting:ancient_cypher{variant:7}"
},
{
"type": "patchouli:crafting",
"recipe": "hexcasting:ancient_colorizer",
"text": "hexcasting.page.ancient_cyphers.3"
}
]
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
{
"animation": {
"interpolate": false,
"frames": [
{
"index": 0,
"time": 10
},
{
"index": 1,
"time": 2
},
{
"index": 2,
"time": 2
},
{
"index": 3,
"time": 2
},
{
"index": 4,
"time": 2
},
{
"index": 5,
"time": 2
},
{
"index": 6,
"time": 2
},
{
"index": 7,
"time": 2
},
{
"index": 8,
"time": 1
},
{
"index": 9,
"time": 1
},
{
"index": 10,
"time": 1
},
{
"index": 11,
"time": 1
},
{
"index": 12,
"time": 1
},
{
"index": 13,
"time": 10
},
{
"index": 14,
"time": 1
},
{
"index": 15,
"time": 4
},
{
"index": 16,
"time": 1
},
{
"index": 17,
"time": 1
},
{
"index": 18,
"time": 1
},
{
"index": 19,
"time": 1
},
{
"index": 20,
"time": 1
},
{
"index": 21,
"time": 1
},
{
"index": 22,
"time": 1
},
{
"index": 23,
"time": 1
},
{
"index": 24,
"time": 1
},
{
"index": 25,
"time": 1
},
{
"index": 26,
"time": 1
},
{
"index": 27,
"time": 1
},
{
"index": 28,
"time": 1
},
{
"index": 29,
"time": 1
}
]
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"animation": {
"interpolate": false,
"frames": [
{
"index": 0,
"time": 20
},
{
"index": 1,
"time": 4
},
{
"index": 2,
"time": 2
},
{
"index": 3,
"time": 2
},
{
"index": 4,
"time": 2
},
{
"index": 5,
"time": 1
},
{
"index": 6,
"time": 1
},
{
"index": 7,
"time": 1
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"parent": "minecraft:recipes/root",
"criteria": {
"has_item": {
"conditions": {
"items": [
{
"items": [
"hexcasting:amethyst_dust"
]
}
]
},
"trigger": "minecraft:inventory_changed"
},
"has_the_recipe": {
"conditions": {
"recipe": "hexcasting:ancient_colorizer"
},
"trigger": "minecraft:recipe_unlocked"
}
},
"requirements": [
[
"has_item",
"has_the_recipe"
]
],
"rewards": {
"recipes": [
"hexcasting:ancient_colorizer"
]
},
"sends_telemetry_event": false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"type": "minecraft:crafting_shaped",
"category": "misc",
"key": {
"C": {
"item": "hexcasting:amethyst_dust"
},
"I": {
"item": "minecraft:copper_ingot"
}
},
"pattern": [
" C ",
"CIC",
" C "
],
"result": {
"item": "hexcasting:ancient_colorizer"
},
"show_notification": true
}
Loading
Loading