Skip to content

Commit 6450b97

Browse files
authored
fix: three fixes (#1279)
* fixes #1276 * fixes #1278 * removed outdated information * more ae2 dust compat * soul gem blacklist use bosses tag
1 parent 5ff8539 commit 6450b97

File tree

17 files changed

+247
-31
lines changed

17 files changed

+247
-31
lines changed

build.gradle

+12
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,13 @@ repositories {
139139
includeGroup "dev.emi"
140140
}
141141
}
142+
maven {
143+
name = "Shadows of Fire"
144+
url "https://maven.shadowsoffire.dev/releases"
145+
content {
146+
includeGroup "dev.shadowsoffire"
147+
}
148+
}
142149
flatDir {
143150
dirs 'lib'
144151
}
@@ -188,6 +195,11 @@ dependencies {
188195
//runtimeOnly "curse.maven:perviaminvenire-449945:xyz" //
189196
//enable once available for 1.20
190197
//runtimeOnly "com.ldtteam:per_viam_invenire:1.19.3-XYZ-RELEASE:universal"
198+
199+
//Apothic Enchanting
200+
compileOnly ("dev.shadowsoffire:ApothicEnchanting:${minecraft_version}-${apothic_enchanting_version}") {transitive=false}
201+
//need more dependencies, so it doesn't run here
202+
//runtimeOnly ("dev.shadowsoffire:ApothicEnchanting:${minecraft_version}-${apothic_enchanting_version}") {transitive=false}
191203
}
192204

193205
processResources {

gradle.properties

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,6 @@ theurgy_version=1.52.0
5454
theurgy_version_range=[1.47.1,)
5555
per_viam_invenire_version_range=[0.1.57,)
5656
emi_version=1.1.14+1.21.1
57-
emi_version_range=[1.1.7+1.21,)
57+
emi_version_range=[1.1.7+1.21,)
58+
apothic_enchanting_version=1.2.5
59+
apothic_enchanting_version_range=[1.2.5,)

src/generated/resources/assets/occultism/lang/en_us.json

-2
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,6 @@
262262
"book.occultism.dictionary_of_spirits.crafting_rituals.craft_foliot_miner.magic_lamp.title": "Magic Lamp",
263263
"book.occultism.dictionary_of_spirits.crafting_rituals.craft_foliot_miner.name": "Foliot Miner",
264264
"book.occultism.dictionary_of_spirits.crafting_rituals.craft_foliot_miner.spotlight.text": "The [#](ad03fc)Foliot[#]() miner harvests block without much aim and returns anything it finds. The mining process is quite slow, due to this the Foliot expends only minor amounts of energy, damaging the lamp it is housed in slowly over time.\n",
265-
"book.occultism.dictionary_of_spirits.crafting_rituals.craft_iesnium_anvil.apothic.text": "When using [#](AA00AA)Apothic Enchanting Mod[#]() you can get all enchantments at level 10 instead of one level higher than the maximum\n",
266-
"book.occultism.dictionary_of_spirits.crafting_rituals.craft_iesnium_anvil.apothic.title": "Apotheosis Information",
267265
"book.occultism.dictionary_of_spirits.crafting_rituals.craft_iesnium_anvil.description": "Upgraded Anvil",
268266
"book.occultism.dictionary_of_spirits.crafting_rituals.craft_iesnium_anvil.name": "Iesnium Anvil",
269267
"book.occultism.dictionary_of_spirits.crafting_rituals.craft_iesnium_anvil.spotlight.text": "The [](item://occultism:iesnium_anvil) is a [#](AA00AA)Marid[#]() infusion.\nThis anvil has some improvements:\n1. Is unbreakable;\n2. Can exceed the maximum level of enchantments by 1;\n3. Marid will pay half of the showed level cost (round up);\n4. The cost increase of working with the same item is reduced;\n5. The maximum cost limit is increased;\n",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"values": [
3+
{
4+
"id": "ae2:sky_dust",
5+
"required": false
6+
}
7+
]
8+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"values": [
3+
{
4+
"id": "ae2:sky_stone_block",
5+
"required": false
6+
},
7+
{
8+
"id": "ae2:smooth_sky_stone_block",
9+
"required": false
10+
},
11+
{
12+
"id": "ae2:sky_stone_brick",
13+
"required": false
14+
},
15+
{
16+
"id": "ae2:sky_stone_small_brick",
17+
"required": false
18+
}
19+
]
20+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"neoforge:conditions": [
3+
{
4+
"type": "neoforge:not",
5+
"value": {
6+
"type": "neoforge:tag_empty",
7+
"tag": "c:ender_pearls"
8+
}
9+
},
10+
{
11+
"type": "neoforge:not",
12+
"value": {
13+
"type": "neoforge:tag_empty",
14+
"tag": "c:dusts/ender_pearl"
15+
}
16+
}
17+
],
18+
"parent": "minecraft:recipes/root",
19+
"criteria": {
20+
"has_ender_pearl": {
21+
"conditions": {
22+
"items": [
23+
{
24+
"items": "#c:ender_pearls"
25+
}
26+
]
27+
},
28+
"trigger": "minecraft:inventory_changed"
29+
},
30+
"has_the_recipe": {
31+
"conditions": {
32+
"recipe": "occultism:crushing/ender_pearl_dust_from_tag"
33+
},
34+
"trigger": "minecraft:recipe_unlocked"
35+
}
36+
},
37+
"requirements": [
38+
[
39+
"has_the_recipe",
40+
"has_ender_pearl"
41+
]
42+
],
43+
"rewards": {
44+
"recipes": [
45+
"occultism:crushing/ender_pearl_dust_from_tag"
46+
]
47+
}
48+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"neoforge:conditions": [
3+
{
4+
"type": "neoforge:not",
5+
"value": {
6+
"type": "neoforge:tag_empty",
7+
"tag": "c:sky_stones"
8+
}
9+
},
10+
{
11+
"type": "neoforge:not",
12+
"value": {
13+
"type": "neoforge:tag_empty",
14+
"tag": "c:dusts/sky_stone"
15+
}
16+
}
17+
],
18+
"parent": "minecraft:recipes/root",
19+
"criteria": {
20+
"has_sky_stone": {
21+
"conditions": {
22+
"items": [
23+
{
24+
"items": "#c:sky_stones"
25+
}
26+
]
27+
},
28+
"trigger": "minecraft:inventory_changed"
29+
},
30+
"has_the_recipe": {
31+
"conditions": {
32+
"recipe": "occultism:crushing/sky_stone_dust"
33+
},
34+
"trigger": "minecraft:recipe_unlocked"
35+
}
36+
},
37+
"requirements": [
38+
[
39+
"has_the_recipe",
40+
"has_sky_stone"
41+
]
42+
],
43+
"rewards": {
44+
"recipes": [
45+
"occultism:crushing/sky_stone_dust"
46+
]
47+
}
48+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"neoforge:conditions": [
3+
{
4+
"type": "neoforge:not",
5+
"value": {
6+
"type": "neoforge:tag_empty",
7+
"tag": "c:ender_pearls"
8+
}
9+
},
10+
{
11+
"type": "neoforge:not",
12+
"value": {
13+
"type": "neoforge:tag_empty",
14+
"tag": "c:dusts/ender_pearl"
15+
}
16+
}
17+
],
18+
"type": "occultism:crushing",
19+
"ingredient": {
20+
"tag": "c:ender_pearls"
21+
},
22+
"result": {
23+
"type": "occultism:tag",
24+
"count": 2,
25+
"tag": "c:dusts/ender_pearl"
26+
}
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"neoforge:conditions": [
3+
{
4+
"type": "neoforge:not",
5+
"value": {
6+
"type": "neoforge:tag_empty",
7+
"tag": "c:sky_stones"
8+
}
9+
},
10+
{
11+
"type": "neoforge:not",
12+
"value": {
13+
"type": "neoforge:tag_empty",
14+
"tag": "c:dusts/sky_stone"
15+
}
16+
}
17+
],
18+
"type": "occultism:crushing",
19+
"ignore_crushing_multiplier": true,
20+
"ingredient": {
21+
"tag": "c:sky_stones"
22+
},
23+
"result": {
24+
"type": "occultism:tag",
25+
"count": 1,
26+
"tag": "c:dusts/sky_stone"
27+
}
28+
}

src/generated/resources/data/occultism/tags/entity_type/soul_gem_deny_list.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
"id": "#c:capturing_not_supported",
55
"required": false
66
},
7-
"minecraft:wither",
8-
"minecraft:ender_dragon"
7+
"#c:bosses"
98
]
109
}

src/main/java/com/klikli_dev/occultism/client/gui/IesniumAnvilMenu.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.klikli_dev.occultism.client.gui;
22

3+
import com.klikli_dev.occultism.integration.apothicenchanting.ApothicEnchantingIntegration;
34
import it.unimi.dsi.fastutil.objects.Object2IntMap;
45
import net.minecraft.core.Holder;
56
import net.minecraft.core.component.DataComponents;
@@ -14,7 +15,6 @@
1415
import net.minecraft.world.item.enchantment.Enchantment;
1516
import net.minecraft.world.item.enchantment.EnchantmentHelper;
1617
import net.minecraft.world.item.enchantment.ItemEnchantments;
17-
import net.neoforged.fml.ModList;
1818
import net.neoforged.neoforge.common.NeoForge;
1919
import net.neoforged.neoforge.event.AnvilUpdateEvent;
2020
import org.jetbrains.annotations.NotNull;
@@ -145,9 +145,9 @@ public void createResult() {
145145
flag3 = true;
146146
} else {
147147
flag2 = true;
148-
if(ModList.get().isLoaded("apothic_enchanting")) {
149-
if (j2 > 9) {
150-
j2 = 10;
148+
if(ApothicEnchantingIntegration.isLoaded()) {
149+
if (j2 > ApothicEnchantingIntegration.getApothicMaxLevel(enchantment)) {
150+
j2 = ApothicEnchantingIntegration.getApothicMaxLevel(enchantment) + 1;
151151
}
152152
} else {
153153
if (j2 > enchantment.getMaxLevel()) {

src/main/java/com/klikli_dev/occultism/datagen/book/binding_rituals/IesniumAnvilEntry.java

-11
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import com.klikli_dev.modonomicon.api.datagen.EntryProvider;
66
import com.klikli_dev.modonomicon.api.datagen.book.BookIconModel;
77
import com.klikli_dev.modonomicon.api.datagen.book.page.BookSpotlightPageModel;
8-
import com.klikli_dev.modonomicon.api.datagen.book.page.BookTextPageModel;
98
import com.klikli_dev.occultism.integration.modonomicon.pages.BookRitualRecipePageModel;
109
import com.klikli_dev.occultism.registry.OccultismBlocks;
1110
import com.mojang.datafixers.util.Pair;
@@ -42,16 +41,6 @@ protected void generatePages() {
4241
.withRecipeId1(this.modLoc("ritual/craft_iesnium_anvil"))
4342
);
4443
//no text
45-
46-
this.page("apothic", () -> BookTextPageModel.create()
47-
.withTitle(this.context().pageTitle())
48-
.withText(this.context().pageText()));
49-
this.pageTitle("Apotheosis Information");
50-
this.pageText("""
51-
When using {0} you can get all enchantments at level 10 instead of one level higher than the maximum
52-
""",
53-
this.color("Apothic Enchanting Mod", ChatFormatting.DARK_PURPLE)
54-
);
5544
}
5645

5746
@Override

src/main/java/com/klikli_dev/occultism/datagen/recipe/OccultismRecipeProvider.java

+11-2
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,11 @@ private void crushingRecipes(RecipeOutput pRecipeOutput) {
407407
.setIgnoreCrushingMultiplier(true)
408408
.unlockedBy("has_coal", has(ItemTags.COALS))
409409
.save(pRecipeOutput, ResourceLocation.fromNamespaceAndPath(Occultism.MODID, "crushing/coal_dust_from_tag"));
410-
410+
CrushingRecipeBuilder.crushingRecipe(Tags.Items.ENDER_PEARLS, OccultismTags.makeItemTag(ResourceLocation.fromNamespaceAndPath("c", "dusts/" + "ender_pearl")), 200)
411+
.setAllowEmpty(false)
412+
.setResultAmount(2)
413+
.unlockedBy("has_ender_pearl", has(Tags.Items.ENDER_PEARLS))
414+
.save(pRecipeOutput, ResourceLocation.fromNamespaceAndPath(Occultism.MODID, "crushing/ender_pearl_dust_from_tag"));
411415
CrushingRecipeBuilder.crushingRecipe(Tags.Items.RODS_BLAZE, Items.BLAZE_POWDER, 200)
412416
.allowEmpty()
413417
.setResultAmount(4)
@@ -480,7 +484,12 @@ private void crushingRecipes(RecipeOutput pRecipeOutput) {
480484
.setIgnoreCrushingMultiplier(true)
481485
.setMinTier(4)
482486
.save(pRecipeOutput, ResourceLocation.fromNamespaceAndPath(Occultism.MODID, "crushing/echo_dust"));
483-
487+
CrushingRecipeBuilder.crushingRecipe(OccultismTags.makeItemTag(ResourceLocation.fromNamespaceAndPath("c", "sky_stones")), OccultismTags.makeItemTag(ResourceLocation.fromNamespaceAndPath("c", "dusts/sky_stone")), 200)
488+
.unlockedBy("has_sky_stone", has(OccultismTags.makeItemTag(ResourceLocation.fromNamespaceAndPath("c", "sky_stones"))))
489+
.setResultAmount(1)
490+
.setAllowEmpty(false)
491+
.setIgnoreCrushingMultiplier(true)
492+
.save(pRecipeOutput, ResourceLocation.fromNamespaceAndPath(Occultism.MODID, "crushing/sky_stone_dust"));
484493
}
485494

486495
private void crushingGemRecipe(String gemName, RecipeOutput recipeOutput) {

src/main/java/com/klikli_dev/occultism/datagen/tags/OccultismEntityTypeTagProvider.java

+1-4
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,6 @@ private void addOccultismTags(HolderLookup.Provider pProvider) {
125125
.add(EntityType.PLAYER)
126126
.replace(false);
127127

128-
this.tag(OccultismTags.Entities.SOUL_GEM_DENY_LIST)
129-
.add(EntityType.WITHER, EntityType.ENDER_DRAGON)
130-
.replace(false);
131128
this.tag(OccultismTags.Entities.WILD_HUNT)
132129
.add(OccultismEntities.WILD_HUNT_SKELETON_TYPE.get())
133130
.add(OccultismEntities.WILD_HUNT_WITHER_SKELETON_TYPE.get())
@@ -202,7 +199,7 @@ private void addOccultismTags(HolderLookup.Provider pProvider) {
202199
}
203200

204201
private void addCommonTags() {
205-
this.tag(OccultismTags.Entities.SOUL_GEM_DENY_LIST).addOptionalTag(Tags.EntityTypes.CAPTURING_NOT_SUPPORTED);
202+
this.tag(OccultismTags.Entities.SOUL_GEM_DENY_LIST).addOptionalTag(Tags.EntityTypes.CAPTURING_NOT_SUPPORTED).addTag(Tags.EntityTypes.BOSSES);
206203

207204
this.tag(OccultismTags.Entities.SNOW_GOLEM).add(EntityType.SNOW_GOLEM).replace(false);
208205
this.tag(OccultismTags.Entities.IRON_GOLEM).add(EntityType.IRON_GOLEM).replace(false);

src/main/java/com/klikli_dev/occultism/datagen/tags/OccultismItemTagProvider.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,17 @@ private void addOptionalOreTagsForMinerCompat(HolderLookup.Provider provider) {
6767
this.tag(this.cTag("ores/dark_gem"))
6868
.addOptional(this.loc("evilcraft:dark_ores"))
6969
.addOptionalTag(this.loc("evilcraft:ores/dark_gem")); //does not exist as of 1.21, but if they unify the pattern it will
70-
71-
this.tag(this.cTag("dusts/dark_gem"))
72-
.addOptional(this.loc("evilcraft:dark_gem_crushed"));
70+
this.tag(this.cTag("dusts/dark_gem")).addOptional(this.loc("evilcraft:dark_gem_crushed"));
7371
this.tag(this.cTag("ores/black_quartz")).addOptional(this.loc("actuallyadditions:black_quartz_ore"));
7472
this.tag(this.cTag("gems/black_quartz")).addOptional(this.loc("actuallyadditions:black_quartz"));
7573
this.tag(this.cTag("dusts/certus_quartz")).addOptional(this.loc("ae2:certus_quartz_dust"));
7674
this.tag(this.cTag("dusts/fluix")).addOptional(this.loc("ae2:fluix_dust"));
77-
this.tag(this.cTag("gems/fluix")).addOptional(this.loc("ae2:fluix_crystal"));
75+
this.tag(this.cTag("dusts/sky_stone")).addOptional(this.loc("ae2:sky_dust"));
76+
this.tag(this.cTag("sky_stones"))
77+
.addOptional(this.loc("ae2:sky_stone_block"))
78+
.addOptional(this.loc("ae2:smooth_sky_stone_block"))
79+
.addOptional(this.loc("ae2:sky_stone_brick"))
80+
.addOptional(this.loc("ae2:sky_stone_small_brick"));
7881
}
7982

8083
private void addCuriosTags(HolderLookup.Provider provider) {
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
package com.klikli_dev.occultism.integration.apothicenchanting;
2+
3+
import dev.shadowsoffire.apothic_enchanting.ApothicEnchanting;
4+
import dev.shadowsoffire.apothic_enchanting.util.MiscUtil;
5+
import net.minecraft.core.Holder;
6+
import net.minecraft.core.registries.Registries;
7+
import net.minecraft.world.item.enchantment.Enchantment;
8+
import net.neoforged.fml.ModList;
9+
10+
public class ApothicEnchantingIntegration {
11+
public static boolean isLoaded() {
12+
return ModList.get().isLoaded("apothic_enchanting");
13+
}
14+
15+
/**
16+
* Copied from Apothic Enchanting Hooks
17+
* Using a different function to call in iesnium anvil
18+
*/
19+
public static int getApothicMaxLevel(Enchantment enchantment){
20+
Holder<Enchantment> holder = MiscUtil.findHolder(Registries.ENCHANTMENT, enchantment);
21+
if (holder != null) {
22+
return ApothicEnchanting.getEnchInfo(holder).getMaxLevel();
23+
}
24+
return enchantment.getMaxLevel();
25+
}
26+
27+
}

0 commit comments

Comments
 (0)