Skip to content

Commit db1772e

Browse files
authored
Grid modifier potions 2: the real one: definitive edition (#788)
2 parents dbc1cb4 + cafb573 commit db1772e

File tree

9 files changed

+90
-7
lines changed

9 files changed

+90
-7
lines changed

Common/src/main/java/at/petrak/hexcasting/common/lib/HexMobEffects.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public static void register(BiConsumer<MobEffect, ResourceLocation> r) {
2626
.addAttributeModifier(HexAttributes.GRID_ZOOM, "d4afaf0f-df37-4253-9fa7-029e8e4415d9",
2727
0.25, AttributeModifier.Operation.MULTIPLY_TOTAL);
2828
public static final MobEffect SHRINK_GRID = make("shrink_grid",
29-
new HexMobEffect(MobEffectCategory.HARMFUL, 0xebad1c))
29+
new HexMobEffect(MobEffectCategory.HARMFUL, 0xc0e660))
3030
.addAttributeModifier(HexAttributes.GRID_ZOOM, "1ce492a9-8bf5-4091-a482-c6d9399e448a",
3131
-0.2, AttributeModifier.Operation.MULTIPLY_TOTAL);
3232

Common/src/main/java/at/petrak/hexcasting/common/lib/HexPotions.java

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,22 @@
33
import net.minecraft.resources.ResourceLocation;
44
import net.minecraft.world.effect.MobEffectInstance;
55
import net.minecraft.world.item.alchemy.Potion;
6+
import net.minecraft.world.item.alchemy.Potions;
7+
import net.minecraft.world.item.Items;
68

79
import java.util.LinkedHashMap;
810
import java.util.Map;
911
import java.util.function.BiConsumer;
1012

1113
import static at.petrak.hexcasting.api.HexAPI.modLoc;
14+
import at.petrak.hexcasting.mixin.accessor.AccessorPotionBrewing;
1215

1316
public class HexPotions {
1417
public static void register(BiConsumer<Potion, ResourceLocation> r) {
1518
for (var e : POTIONS.entrySet()) {
1619
r.accept(e.getValue(), e.getKey());
1720
}
21+
HexPotions.addRecipes();
1822
}
1923

2024
private static final Map<ResourceLocation, Potion> POTIONS = new LinkedHashMap<>();
@@ -26,12 +30,24 @@ public static void register(BiConsumer<Potion, ResourceLocation> r) {
2630
public static final Potion ENLARGE_GRID_STRONG = make("enlarge_grid_strong",
2731
new Potion("enlarge_grid_strong", new MobEffectInstance(HexMobEffects.ENLARGE_GRID, 1800, 1)));
2832

33+
public static final Potion SHRINK_GRID = make("shrink_grid",
34+
new Potion("shrink_grid", new MobEffectInstance(HexMobEffects.SHRINK_GRID, 3600)));
35+
public static final Potion SHRINK_GRID_LONG = make("shrink_grid_long",
36+
new Potion("shrink_grid_long", new MobEffectInstance(HexMobEffects.SHRINK_GRID, 9600)));
37+
public static final Potion SHRINK_GRID_STRONG = make("shrink_grid_strong",
38+
new Potion("shrink_grid_strong", new MobEffectInstance(HexMobEffects.SHRINK_GRID, 1800, 1)));
39+
2940
public static void addRecipes() {
30-
/*
3141
AccessorPotionBrewing.addMix(Potions.AWKWARD, HexItems.AMETHYST_DUST, ENLARGE_GRID);
3242
AccessorPotionBrewing.addMix(ENLARGE_GRID, Items.REDSTONE, ENLARGE_GRID_LONG);
3343
AccessorPotionBrewing.addMix(ENLARGE_GRID, Items.GLOWSTONE_DUST, ENLARGE_GRID_STRONG);
34-
*/
44+
45+
AccessorPotionBrewing.addMix(ENLARGE_GRID, Items.FERMENTED_SPIDER_EYE, SHRINK_GRID);
46+
AccessorPotionBrewing.addMix(ENLARGE_GRID_LONG, Items.FERMENTED_SPIDER_EYE, SHRINK_GRID_LONG);
47+
AccessorPotionBrewing.addMix(ENLARGE_GRID_STRONG, Items.FERMENTED_SPIDER_EYE, SHRINK_GRID_STRONG);
48+
49+
AccessorPotionBrewing.addMix(SHRINK_GRID, Items.REDSTONE, SHRINK_GRID_LONG);
50+
AccessorPotionBrewing.addMix(SHRINK_GRID, Items.GLOWSTONE_DUST, SHRINK_GRID_STRONG);
3551
}
3652

3753
private static <T extends Potion> T make(String id, T potion) {

Common/src/main/resources/assets/hexcasting/lang/en_us.flatten.json5

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,47 @@
209209
bricks_small: "Small Quenched Allay Bricks",
210210
},
211211
},
212+
213+
"effect.hexcasting": {
214+
enlarge_grid: "Clarity",
215+
shrink_grid: "Clouding",
216+
},
217+
218+
"item.minecraft.potion.effect": {
219+
enlarge_grid: "Potion of Clarity",
220+
enlarge_grid_long: "Potion of Clarity",
221+
enlarge_grid_strong: "Potion of Clarity",
222+
shrink_grid: "Potion of Clouding",
223+
shrink_grid_long: "Potion of Clouding",
224+
shrink_grid_strong: "Potion of Clouding",
225+
},
226+
227+
"item.minecraft.splash_potion.effect": {
228+
enlarge_grid: "Splash Potion of Clarity",
229+
enlarge_grid_long: "Splash Potion of Clarity",
230+
enlarge_grid_strong: "Splash Potion of Clarity",
231+
shrink_grid: "Splash Potion of Clouding",
232+
shrink_grid_long: "Splash Potion of Clouding",
233+
shrink_grid_strong: "Splash Potion of Clouding",
234+
},
235+
236+
"item.minecraft.lingering_potion.effect": {
237+
enlarge_grid: "Lingering Potion of Clarity",
238+
enlarge_grid_long: "Lingering Potion of Clarity",
239+
enlarge_grid_strong: "Lingering Potion of Clarity",
240+
shrink_grid: "Lingering Potion of Clouding",
241+
shrink_grid_long: "Lingering Potion of Clouding",
242+
shrink_grid_strong: "Lingering Potion of Clouding",
243+
},
244+
245+
"item.minecraft.tipped_arrow.effect": {
246+
enlarge_grid: "Arrow of Clarity",
247+
enlarge_grid_long: "Arrow of Clarity",
248+
enlarge_grid_strong: "Arrow of Clarity",
249+
shrink_grid: "Arrow of Clouding",
250+
shrink_grid_long: "Arrow of Clouding",
251+
shrink_grid_strong: "Arrow of Clouding",
252+
},
212253

213254
"itemGroup.hexcasting": {
214255
"": "Hexcasting",
@@ -1117,6 +1158,7 @@
11171158
// why is this called "hexcasting"?
11181159
hexcasting: "Casting Items",
11191160
phials: "Phials of Media",
1161+
potions: "Hex Potions",
11201162
pigments: "Pigments",
11211163

11221164
edified: "Edified Trees",
@@ -1461,6 +1503,12 @@
14611503
"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.",
14621504
desc: "$(italic)Drink the milk./$",
14631505
},
1506+
1507+
potions: {
1508+
"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!",
1509+
"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.",
1510+
"effects.header": "Clarity and Clouding",
1511+
},
14641512

14651513
pigments: {
14661514
"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.\"",

Common/src/main/resources/assets/hexcasting/patchouli_books/thehexbook/en_us/entries/items/phials.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "hexcasting.entry.phials",
33
"category": "hexcasting:items",
4-
"icon": "hexcasting:battery{media:10000,max_media:10000}",
4+
"icon": "hexcasting:battery",
55
"sortnum": 7,
66
"advancement": "hexcasting:root",
77
"read_by_default": true,
@@ -21,7 +21,7 @@
2121
{
2222
"type": "patchouli:spotlight",
2323
"text": "hexcasting.page.phials.desc",
24-
"item": "hexcasting:battery{media:10000,max_media:10000}",
24+
"item": "hexcasting:battery{\"hexcasting:media\":640000,\"hexcasting:start_media\":640000}",
2525
"link_recipe": true
2626
}
2727
]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "hexcasting.entry.potions",
3+
"category": "hexcasting:items",
4+
"icon": "minecraft:potion{Potion:\"hexcasting:enlarge_grid\"}",
5+
"sortnum": 8,
6+
"advancement": "hexcasting:root",
7+
"read_by_default": true,
8+
"pages": [
9+
{
10+
"type": "patchouli:text",
11+
"text": "hexcasting.page.potions.1"
12+
},
13+
{
14+
"type": "patchouli:spotlight",
15+
"title": "hexcasting.page.potions.effects.header",
16+
"text": "hexcasting.page.potions.2",
17+
"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\"}"
18+
}
19+
]
20+
}
21+
14.5 KB
Loading
13.4 KB
Loading

Fabric/src/main/java/at/petrak/hexcasting/fabric/FabricHexInitializer.kt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,6 @@ object FabricHexInitializer : ModInitializer {
132132
HexAttributes.register(bind(BuiltInRegistries.ATTRIBUTE))
133133
HexMobEffects.register(bind(BuiltInRegistries.MOB_EFFECT))
134134
HexPotions.register(bind(BuiltInRegistries.POTION))
135-
HexPotions.addRecipes()
136135

137136
HexRecipeStuffRegistry.registerSerializers(bind(BuiltInRegistries.RECIPE_SERIALIZER))
138137
HexRecipeStuffRegistry.registerTypes(bind(BuiltInRegistries.RECIPE_TYPE))

Forge/src/main/java/at/petrak/hexcasting/forge/ForgeHexInitializer.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,6 @@ private static void initRegistry() {
131131
bind(Registries.ATTRIBUTE, HexAttributes::register);
132132
bind(Registries.MOB_EFFECT, HexMobEffects::register);
133133
bind(Registries.POTION, HexPotions::register);
134-
HexPotions.addRecipes();
135134

136135
bind(Registries.PARTICLE_TYPE, HexParticles::registerParticles);
137136

0 commit comments

Comments
 (0)