diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexMobEffects.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexMobEffects.java index fe1e0499c4..6398bfea27 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexMobEffects.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexMobEffects.java @@ -26,7 +26,7 @@ public static void register(BiConsumer r) { .addAttributeModifier(HexAttributes.GRID_ZOOM, "d4afaf0f-df37-4253-9fa7-029e8e4415d9", 0.25, AttributeModifier.Operation.MULTIPLY_TOTAL); public static final MobEffect SHRINK_GRID = make("shrink_grid", - new HexMobEffect(MobEffectCategory.HARMFUL, 0xebad1c)) + new HexMobEffect(MobEffectCategory.HARMFUL, 0xc0e660)) .addAttributeModifier(HexAttributes.GRID_ZOOM, "1ce492a9-8bf5-4091-a482-c6d9399e448a", -0.2, AttributeModifier.Operation.MULTIPLY_TOTAL); diff --git a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexPotions.java b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexPotions.java index f970235b5d..e86409e77c 100644 --- a/Common/src/main/java/at/petrak/hexcasting/common/lib/HexPotions.java +++ b/Common/src/main/java/at/petrak/hexcasting/common/lib/HexPotions.java @@ -3,18 +3,22 @@ import net.minecraft.resources.ResourceLocation; import net.minecraft.world.effect.MobEffectInstance; import net.minecraft.world.item.alchemy.Potion; +import net.minecraft.world.item.alchemy.Potions; +import net.minecraft.world.item.Items; import java.util.LinkedHashMap; import java.util.Map; import java.util.function.BiConsumer; import static at.petrak.hexcasting.api.HexAPI.modLoc; +import at.petrak.hexcasting.mixin.accessor.AccessorPotionBrewing; public class HexPotions { public static void register(BiConsumer r) { for (var e : POTIONS.entrySet()) { r.accept(e.getValue(), e.getKey()); } + HexPotions.addRecipes(); } private static final Map POTIONS = new LinkedHashMap<>(); @@ -26,12 +30,24 @@ public static void register(BiConsumer r) { public static final Potion ENLARGE_GRID_STRONG = make("enlarge_grid_strong", new Potion("enlarge_grid_strong", new MobEffectInstance(HexMobEffects.ENLARGE_GRID, 1800, 1))); + public static final Potion SHRINK_GRID = make("shrink_grid", + new Potion("shrink_grid", new MobEffectInstance(HexMobEffects.SHRINK_GRID, 3600))); + public static final Potion SHRINK_GRID_LONG = make("shrink_grid_long", + new Potion("shrink_grid_long", new MobEffectInstance(HexMobEffects.SHRINK_GRID, 9600))); + public static final Potion SHRINK_GRID_STRONG = make("shrink_grid_strong", + new Potion("shrink_grid_strong", new MobEffectInstance(HexMobEffects.SHRINK_GRID, 1800, 1))); + public static void addRecipes() { - /* AccessorPotionBrewing.addMix(Potions.AWKWARD, HexItems.AMETHYST_DUST, ENLARGE_GRID); AccessorPotionBrewing.addMix(ENLARGE_GRID, Items.REDSTONE, ENLARGE_GRID_LONG); AccessorPotionBrewing.addMix(ENLARGE_GRID, Items.GLOWSTONE_DUST, ENLARGE_GRID_STRONG); - */ + + AccessorPotionBrewing.addMix(ENLARGE_GRID, Items.FERMENTED_SPIDER_EYE, SHRINK_GRID); + AccessorPotionBrewing.addMix(ENLARGE_GRID_LONG, Items.FERMENTED_SPIDER_EYE, SHRINK_GRID_LONG); + AccessorPotionBrewing.addMix(ENLARGE_GRID_STRONG, Items.FERMENTED_SPIDER_EYE, SHRINK_GRID_STRONG); + + AccessorPotionBrewing.addMix(SHRINK_GRID, Items.REDSTONE, SHRINK_GRID_LONG); + AccessorPotionBrewing.addMix(SHRINK_GRID, Items.GLOWSTONE_DUST, SHRINK_GRID_STRONG); } private static T make(String id, T potion) { diff --git a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 index 7807a6e802..a942aa8cf8 100644 --- a/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 +++ b/Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5 @@ -209,6 +209,47 @@ bricks_small: "Small Quenched Allay Bricks", }, }, + + "effect.hexcasting": { + enlarge_grid: "Clarity", + shrink_grid: "Clouding", + }, + + "item.minecraft.potion.effect": { + enlarge_grid: "Potion of Clarity", + enlarge_grid_long: "Potion of Clarity", + enlarge_grid_strong: "Potion of Clarity", + shrink_grid: "Potion of Clouding", + shrink_grid_long: "Potion of Clouding", + shrink_grid_strong: "Potion of Clouding", + }, + + "item.minecraft.splash_potion.effect": { + enlarge_grid: "Splash Potion of Clarity", + enlarge_grid_long: "Splash Potion of Clarity", + enlarge_grid_strong: "Splash Potion of Clarity", + shrink_grid: "Splash Potion of Clouding", + shrink_grid_long: "Splash Potion of Clouding", + shrink_grid_strong: "Splash Potion of Clouding", + }, + + "item.minecraft.lingering_potion.effect": { + enlarge_grid: "Lingering Potion of Clarity", + enlarge_grid_long: "Lingering Potion of Clarity", + enlarge_grid_strong: "Lingering Potion of Clarity", + shrink_grid: "Lingering Potion of Clouding", + shrink_grid_long: "Lingering Potion of Clouding", + shrink_grid_strong: "Lingering Potion of Clouding", + }, + + "item.minecraft.tipped_arrow.effect": { + enlarge_grid: "Arrow of Clarity", + enlarge_grid_long: "Arrow of Clarity", + enlarge_grid_strong: "Arrow of Clarity", + shrink_grid: "Arrow of Clouding", + shrink_grid_long: "Arrow of Clouding", + shrink_grid_strong: "Arrow of Clouding", + }, "itemGroup.hexcasting": { "": "Hexcasting", @@ -1117,6 +1158,7 @@ // why is this called "hexcasting"? hexcasting: "Casting Items", phials: "Phials of Media", + potions: "Hex Potions", pigments: "Pigments", edified: "Edified Trees", @@ -1461,6 +1503,12 @@ "3": "Unfortunately, the art of actually $(italic)making/$ the things seems to have been lost to time. I've found a $(l:patterns/great_spells/make_battery#hexcasting:craft/battery)$(thing)hint at the pattern used to craft it/$, but the technique is irritatingly elusive, and I can't seem to do it successfully. I suspect I will figure it out with study and practice, though. For now, I will simply deal with the wasted _media...$(br2)But I won't settle for it forever.", desc: "$(italic)Drink the milk./$", }, + + potions: { + "1": "Peering through a $(l:items/lens)$(item)Scrying Lens/$ allows me to fit more patterns onto my casting grid. But what if I want to improve my casting even further? Alchemy has an answer.$(br2)By adding a pinch of Amethyst Dust to an $(item)Awkward Potion/$, I can create a brew that increases the size of my grid in much the same way as the Lens. I can even use both at once for the ultimate grid!", + "2": "The Potion of Clarity can be extended, strengthened, and modified like any other potion.$(br2)It can also be corrupted with a $(item)Fermented Spider Eye/$ to produce a variant with the opposite effect. This may be useful for dealing with enemy casters.", + "effects.header": "Clarity and Clouding", + }, pigments: { "1": "The old practitioners of my art sometimes identified themselves by a color, emblematic of them and their _Hexes. Although their names have faded, their colors remain. It seems a special kind of pigment, offered to Nature in the right way, would \"[...] paint one's thoughts in a manner pleasing to Nature, inducing a miraculous change in personal colour.\"", diff --git a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/phials.json b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/phials.json index f0100e8432..0f930d1ec8 100644 --- a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/phials.json +++ b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/phials.json @@ -1,7 +1,7 @@ { "name": "hexcasting.entry.phials", "category": "hexcasting:items", - "icon": "hexcasting:battery{media:10000,max_media:10000}", + "icon": "hexcasting:battery", "sortnum": 7, "advancement": "hexcasting:root", "read_by_default": true, @@ -21,7 +21,7 @@ { "type": "patchouli:spotlight", "text": "hexcasting.page.phials.desc", - "item": "hexcasting:battery{media:10000,max_media:10000}", + "item": "hexcasting:battery{\"hexcasting:media\":640000,\"hexcasting:start_media\":640000}", "link_recipe": true } ] diff --git a/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/potions.json b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/potions.json new file mode 100644 index 0000000000..a0db5dd70b --- /dev/null +++ b/Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/potions.json @@ -0,0 +1,21 @@ +{ + "name": "hexcasting.entry.potions", + "category": "hexcasting:items", + "icon": "minecraft:potion{Potion:\"hexcasting:enlarge_grid\"}", + "sortnum": 8, + "advancement": "hexcasting:root", + "read_by_default": true, + "pages": [ + { + "type": "patchouli:text", + "text": "hexcasting.page.potions.1" + }, + { + "type": "patchouli:spotlight", + "title": "hexcasting.page.potions.effects.header", + "text": "hexcasting.page.potions.2", + "item": "minecraft:potion{Potion:\"hexcasting:enlarge_grid\"},minecraft:potion{Potion:\"hexcasting:enlarge_grid_long\"},minecraft:potion{Potion:\"hexcasting:enlarge_grid_strong\"},minecraft:potion{Potion:\"hexcasting:shrink_grid\"},minecraft:potion{Potion:\"hexcasting:shrink_grid_long\"},minecraft:potion{Potion:\"hexcasting:shrink_grid_strong\"}" + } + ] + } + \ No newline at end of file diff --git a/Common/src/main/resources/assets/hexcasting/textures/mob_effect/enlarge_grid.png b/Common/src/main/resources/assets/hexcasting/textures/mob_effect/enlarge_grid.png index 58a621a495..032d89263b 100644 Binary files a/Common/src/main/resources/assets/hexcasting/textures/mob_effect/enlarge_grid.png and b/Common/src/main/resources/assets/hexcasting/textures/mob_effect/enlarge_grid.png differ diff --git a/Common/src/main/resources/assets/hexcasting/textures/mob_effect/shrink_grid.png b/Common/src/main/resources/assets/hexcasting/textures/mob_effect/shrink_grid.png index cf592ff52f..21cc17bb2e 100644 Binary files a/Common/src/main/resources/assets/hexcasting/textures/mob_effect/shrink_grid.png and b/Common/src/main/resources/assets/hexcasting/textures/mob_effect/shrink_grid.png differ diff --git a/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt b/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt index e7d3163458..19e676136c 100644 --- a/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt +++ b/Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt @@ -132,7 +132,6 @@ object FabricHexInitializer : ModInitializer { HexAttributes.register(bind(BuiltInRegistries.ATTRIBUTE)) HexMobEffects.register(bind(BuiltInRegistries.MOB_EFFECT)) HexPotions.register(bind(BuiltInRegistries.POTION)) - HexPotions.addRecipes() HexRecipeStuffRegistry.registerSerializers(bind(BuiltInRegistries.RECIPE_SERIALIZER)) HexRecipeStuffRegistry.registerTypes(bind(BuiltInRegistries.RECIPE_TYPE)) diff --git a/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java b/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java index 8fa6affec6..16bc2a0549 100644 --- a/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java +++ b/Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java @@ -131,7 +131,6 @@ private static void initRegistry() { bind(Registries.ATTRIBUTE, HexAttributes::register); bind(Registries.MOB_EFFECT, HexMobEffects::register); bind(Registries.POTION, HexPotions::register); - HexPotions.addRecipes(); bind(Registries.PARTICLE_TYPE, HexParticles::registerParticles);