Skip to content

Commit b481cd1

Browse files
committed
feat: update to braking changes of Occultism 1.64.0
1 parent 2abd6f1 commit b481cd1

File tree

6 files changed

+172
-149
lines changed

6 files changed

+172
-149
lines changed

gradle.properties

+5-5
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ systemProp.net.minecraftforge.gradle.check.certs=false
77
## Environment Properties
88

99
# The Minecraft version must agree with the Forge version to get a valid artifact
10-
minecraft_version_major=1.21
10+
minecraft_version_major=1.21.1
1111
minecraft_version=1.21.1
1212
# The Minecraft version range can use any release version of Minecraft as bounds.
1313
# Snapshots, pre-releases, and release candidates are not guaranteed to sort properly
@@ -16,12 +16,12 @@ minecraft_version_range=[1.21,1.22)
1616

1717
## Neo
1818
# The neo version must agree with the Minecraft version to get a valid artifact
19-
neo_version=21.1.13
19+
neo_version=21.1.66
2020
# The neo version range can use any version of neo as bounds or match the loader version range
2121
neo_version_range=[21.0.110-beta,)
2222
# The loader version range can only use the major version of Neo/FML as bounds
2323
neo_loader_version_range=[3,)
24-
neogradle_version=7.0.160
24+
neogradle_version=7.0.165
2525

2626
# neo directly reads these properties
2727
# the version the mappings were created for, does not need to match the current mc version
@@ -42,8 +42,8 @@ mod_description=KubeJS Plugin for Occultism
4242
kubejs_version=2101.7.0-build.171
4343
kubejs_version_range=[2101.7.0-build.171,)
4444

45-
occultism_version=1.161.0
46-
occultism_version_range=[1.161.0,)
45+
occultism_version=1.164.0
46+
occultism_version_range=[1.164.0,)
4747
#curios_version=5.2.0-beta.3
4848
#jei_version=15.2.0.23
4949
#geckolib_version=4.4

runs/client/kubejs/server_scripts/example.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ ServerEvents.recipes((event) => {
2828
],
2929
'#c:stones',
3030
'occultism:craft_afrit'
31-
).dummy("kubejs:dummy_ritual_thing")
31+
)
32+
// kubejs:dummy_ritual_thing is created in ../startup_scripts/example.js
33+
// if omitted defaults to occultism:ritual_dummy/custom_ritual_misc
34+
.dummy("kubejs:dummy_ritual_thing")
3235
.useItem('minecraft:egg')
3336
.entityToSacrifice(EntityToSacrifice.of("minecraft:cows", "Cows"))//it would be better to use a translation key instead of "Cows" to allow translating to other languages. E.g. "tags.entities.cows" -> but that also needs a corresponding translation in en_us.json and other lang files.
3437
.condition(IsInBiomeCondition.of("minecraft:plains"))// Optional start condition. Unlike the neo conditions array this does not prevent loading the recipe, but rather prevents the start of the ritual (with a reasonable error message to the player). Wrappers provided by OccultismKubeJS: IsInBiomeCondition, IsInBiomeWithTagCondition, IsInDimensionCondition, IsInDimensionTypeCondition. Also supports neoforge default conditions, but there is no kubejs wrapper for them yet.

runs/client/kubejs/startup_scripts/example.js

+1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ console.info('Hello, World! (Loaded startup scripts)')
66

77
StartupEvents.registry('item', (event) => {
88
event.create('dummy_ritual_thing', 'occultism:ritual_dummy')
9+
.pentacleType("craft") //Determines the dummy texture, valid options are Valid options are: "misc", "craft", "summon", "possess", default is "misc".
910
.displayName('Hey Lois Look At Me I\'m A Minecraft Item Hehehehehe')
1011
.ritualTooltip('This is a dummy item for testing purposes.')
1112
})

src/main/java/com/klikli_dev/occultism_kubejs/RitualDummyItemType.java

+10-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public RitualDummyItemType(ResourceLocation rl) {
4343
//make the item just use the ritual dummy parent mode
4444
//Note: we are not using this.parentModel() because it causes textures to be overwritten with a texture location corresponding to the item id unless the correct one is manually specified again
4545
//Note: We now use parentModel because this.itemModel is gone, instead we fix the texture issue in generateAssets
46-
this.parentModel(ResourceLocation.parse("occultism:item/ritual_dummy"));
46+
this.parentModel(ResourceLocation.parse("occultism:item/pentacle_misc"));
4747
}
4848

4949
@Override
@@ -64,7 +64,6 @@ public void generateAssets(KubeAssetGenerator generator) {
6464
});
6565
}
6666

67-
6867
@Override
6968
public void generateLang(LangKubeEvent lang) {
7069
super.generateLang(lang);
@@ -74,6 +73,15 @@ public void generateLang(LangKubeEvent lang) {
7473
}
7574
}
7675

76+
@Info("""
77+
Determines the type of texture shown for the ritual dummy.
78+
Valid options are: "misc", "craft", "summon", "possess".
79+
""")
80+
public RitualDummyItemType pentacleType(String pentacleType) {
81+
this.parentModel(ResourceLocation.parse("occultism:item/pentacle_" + pentacleType));
82+
return this;
83+
}
84+
7785
@Info("""
7886
Sets the tooltip to display for the ritual dummy.
7987
It should explain what the ritual does.

src/main/java/com/klikli_dev/occultism_kubejs/RitualRecipeSchema.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.klikli_dev.occultism_kubejs;
22

33
import com.klikli_dev.occultism.crafting.recipe.RitualRecipe;
4+
import com.klikli_dev.occultism.registry.OccultismItems;
45
import com.klikli_dev.occultism_kubejs.component.ConditionComponent;
56
import com.klikli_dev.occultism_kubejs.component.EntityToSacrificeComponent;
67
import dev.latvian.mods.kubejs.recipe.RecipeKey;
@@ -31,7 +32,8 @@ public interface RitualRecipeSchema {
3132
RecipeKey<String> SPIRIT_JOB_TYPE = StringComponent.ID.inputKey("spirit_job_type").alt("spiritJobType").alt("jobType").defaultOptional();
3233
RecipeKey<ItemStack> RITUAL_DUMMY = ItemStackComponent.ITEM_STACK.outputKey("ritual_dummy").alt("ritualDummy").alt("dummyItem").alt("dummy")
3334
// apparently there is never any static reference to this item, so let's just hope klikli never changes this lmao
34-
.optional(new ItemStack(BuiltInRegistries.ITEM.get(ResourceLocation.parse("occultism:ritual_dummy/custom_ritual"))))
35+
// klikli: I did change it ... and it broke. I am ashamed.
36+
.optional(new ItemStack(BuiltInRegistries.ITEM.get(ResourceLocation.parse("occultism:ritual_dummy/custom_ritual_misc"))))
3537
.alwaysWrite();
3638

3739
RecipeKey<RitualRecipe.EntityToSacrifice> ENTITY_TO_SACRIFICE = EntityToSacrificeComponent.ENTITY_TO_SACRIFICE
Original file line numberDiff line numberDiff line change
@@ -1,142 +1,151 @@
11
{
2-
"keys": [
3-
{
4-
"name": "result",
5-
"role": "output",
6-
"type": "item_stack",
7-
"allow_empty": true
8-
},
9-
{
10-
"name": "ingredients",
11-
"role": "input",
12-
"type": "ingredient[]"
13-
},
14-
{
15-
"name": "activation_item",
16-
"role": "input",
17-
"type": "ingredient",
18-
"alternative_names": [
19-
"activationItem"
20-
]
21-
},
22-
{
23-
"name": "pentacle_id",
24-
"role": "input",
25-
"type": "id",
26-
"alternative_names": [
27-
"pentacleId",
28-
"pentacle"
29-
]
30-
},
31-
{
32-
"name": "duration",
33-
"role": "input",
34-
"type": "ticks",
35-
"optional": 30
36-
},
37-
{
38-
"name": "spirit_max_age",
39-
"role": "input",
40-
"type": "int",
41-
"optional": -1,
42-
"alternative_names": [
43-
"spiritMaxAge",
44-
"maxAge"
45-
]
46-
},
47-
{
48-
"name": "spirit_job_type",
49-
"role": "input",
50-
"type": "id",
51-
"optional": null,
52-
"alternative_names": [
53-
"spiritJobType",
54-
"jobType"
55-
]
56-
},
57-
{
58-
"name": "ritual_dummy",
59-
"role": "output",
60-
"type": "item_stack",
61-
"optional": {
62-
"id": "occultism:ritual_dummy/custom_ritual",
63-
"count": 1
64-
},
65-
"alternative_names": [
66-
"ritualDummy",
67-
"dummyItem",
68-
"dummy"
69-
],
70-
"always_write": true
71-
},
72-
{
73-
"name": "ritual_type",
74-
"role": "input",
75-
"type": "id",
76-
"optional": "occultism:craft",
77-
"alternative_names": [
78-
"ritualType"
79-
],
80-
"always_write": true
81-
},
82-
{
83-
"name": "entity_to_summon",
84-
"role": "input",
85-
"type": "id",
86-
"optional": null,
87-
"alternative_names": [
88-
"entityToSummon",
89-
"summon"
90-
]
91-
},
92-
{
93-
"name": "entity_tag_to_summon",
94-
"role": "input",
95-
"type": "entity_type_tag",
96-
"optional": null,
97-
"alternative_names": [
98-
"entityTagToSummon",
99-
"summonTag"
100-
]
101-
},
102-
{
103-
"name": "entity_nbt",
104-
"role": "input",
105-
"type": "string",
106-
"optional": null,
107-
"alternative_names": [
108-
"entityNbt"
109-
]
110-
},
111-
{
112-
"name": "entity_to_sacrifice",
113-
"role": "input",
114-
"type": "occultism:entity_to_sacrifice",
115-
"optional": null,
116-
"alternative_names": [
117-
"entityToSacrifice",
118-
"sacrifice"
119-
]
120-
},
121-
{
122-
"name": "item_to_use",
123-
"role": "input",
124-
"type": "ingredient",
125-
"optional": [],
126-
"alternative_names": [
127-
"itemToUse",
128-
"useItem"
129-
],
130-
"allow_empty": true
131-
},
132-
{
133-
"name": "command",
134-
"role": "input",
135-
"type": "string",
136-
"optional": null
137-
}
138-
],
139-
"unique": [
140-
"ritual_dummy"
141-
]
2+
"keys": [
3+
{
4+
"name": "result",
5+
"role": "output",
6+
"type": "item_stack",
7+
"allow_empty": true
8+
},
9+
{
10+
"name": "ingredients",
11+
"role": "input",
12+
"type": "ingredient[]"
13+
},
14+
{
15+
"name": "activation_item",
16+
"role": "input",
17+
"type": "ingredient",
18+
"alternative_names": [
19+
"activationItem"
20+
]
21+
},
22+
{
23+
"name": "pentacle_id",
24+
"role": "input",
25+
"type": "id",
26+
"alternative_names": [
27+
"pentacleId",
28+
"pentacle"
29+
]
30+
},
31+
{
32+
"name": "duration",
33+
"role": "input",
34+
"type": "ticks",
35+
"optional": 30
36+
},
37+
{
38+
"name": "spirit_max_age",
39+
"role": "input",
40+
"type": "int",
41+
"optional": -1,
42+
"alternative_names": [
43+
"spiritMaxAge",
44+
"maxAge"
45+
]
46+
},
47+
{
48+
"name": "spirit_job_type",
49+
"role": "input",
50+
"type": "id",
51+
"optional": null,
52+
"alternative_names": [
53+
"spiritJobType",
54+
"jobType"
55+
]
56+
},
57+
{
58+
"name": "ritual_dummy",
59+
"role": "output",
60+
"type": "item_stack",
61+
"optional": {
62+
"id": "occultism:ritual_dummy/custom_ritual_misc",
63+
"count": 1
64+
},
65+
"alternative_names": [
66+
"ritualDummy",
67+
"dummyItem",
68+
"dummy"
69+
],
70+
"always_write": true
71+
},
72+
{
73+
"name": "ritual_type",
74+
"role": "input",
75+
"type": "id",
76+
"optional": "occultism:craft",
77+
"alternative_names": [
78+
"ritualType"
79+
],
80+
"always_write": true
81+
},
82+
{
83+
"name": "entity_to_summon",
84+
"role": "input",
85+
"type": "id",
86+
"optional": null,
87+
"alternative_names": [
88+
"entityToSummon",
89+
"summon"
90+
]
91+
},
92+
{
93+
"name": "entity_tag_to_summon",
94+
"role": "input",
95+
"type": "entity_type_tag",
96+
"optional": null,
97+
"alternative_names": [
98+
"entityTagToSummon",
99+
"summonTag"
100+
]
101+
},
102+
{
103+
"name": "entity_nbt",
104+
"role": "input",
105+
"type": "string",
106+
"optional": null,
107+
"alternative_names": [
108+
"entityNbt"
109+
]
110+
},
111+
{
112+
"name": "entity_to_sacrifice",
113+
"role": "input",
114+
"type": "occultism:entity_to_sacrifice",
115+
"optional": null,
116+
"alternative_names": [
117+
"entityToSacrifice",
118+
"sacrifice"
119+
]
120+
},
121+
{
122+
"name": "item_to_use",
123+
"role": "input",
124+
"type": "ingredient",
125+
"optional": [],
126+
"alternative_names": [
127+
"itemToUse",
128+
"useItem"
129+
],
130+
"allow_empty": true
131+
},
132+
{
133+
"name": "command",
134+
"role": "input",
135+
"type": "string",
136+
"optional": null
137+
},
138+
{
139+
"name": "condition",
140+
"role": "input",
141+
"type": "occultism:condition",
142+
"optional": null,
143+
"alternative_names": [
144+
"startCondition"
145+
]
146+
}
147+
],
148+
"unique": [
149+
"ritual_dummy"
150+
]
142151
}

0 commit comments

Comments
 (0)