Skip to content

Commit

Permalink
Ritual fixes (#453)
Browse files Browse the repository at this point in the history
* ritual-related data changes

* solve the ever-present celestial prism ritual problem by finally creating a proper air-like light block

* adjust spell unlock gametests

* apparently BlockBehaviour.Properties#copy doesn't copy noLootTable(), so we need to fix that

* run datagen
  • Loading branch information
IchHabeHunger54 authored Jun 1, 2024
1 parent 6f4ac30 commit 41ca848
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected void addBooks(HolderLookup.Provider provider, Consumer<BookBuilder<?,
.addEntry("black_aurem", "Black Aurem", new ItemStack(AMItems.BLACK_AUREM.get()))
.addSimpleTextPage("The Black Aurem is the $(l:blocks/obelisk)Obelisk's$() dark counterpart, used to generate dark $(l:mechanics/etherium)Etherium$(). Instead of $(l:blocks/ores#vinteum)vinteum$(), it consumes the lifes of animals.$(br2)Similarly, it can be supported by a multiblock structure, which builds up in levels. The structure's different levels are shown on the later pages.")
.addSimpleSpotlightPage(new ItemStack(AMItems.BLACK_AUREM.get()), "The Black Aurem cannot be obtained through crafting. Instead, it must be created through a special corruption ritual. This ritual requires a multiblock structure, seen on the next page. Once built, throw a piece of $(l:blocks/ores#sunstone)Sunstone$() somewhere into the structure.")
.addSimpleMultiblockPage("Corruption Ritual", "Finally, to initiate the ritual, you must $(l:components/fire_damage)severely burn$() the Obelisk.", PatchouliCompat.CORRUPTION_RITUAL)
.addSimpleMultiblockPage("Corruption Ritual", "Finally, to initiate the ritual, you must $(l:components/fire_damage)severely burn$() the bottom of the Obelisk.", PatchouliCompat.CORRUPTION_RITUAL)
.addSimpleMultiblockPage("Black Aurem Chalk", PatchouliCompat.BLACK_AUREM_CHALK)
.addSimpleMultiblockPage("Black Aurem Level 1", PatchouliCompat.BLACK_AUREM_PILLAR1)
.addSimpleMultiblockPage("Black Aurem Level 2", PatchouliCompat.BLACK_AUREM_PILLAR2)
Expand All @@ -119,7 +119,7 @@ protected void addBooks(HolderLookup.Provider provider, Consumer<BookBuilder<?,
.addEntry("celestial_prism", "Celestial Prism", new ItemStack(AMItems.CELESTIAL_PRISM.get()))
.addSimpleTextPage("The Celestial Prism is the $(l:blocks/obelisk)Obelisk's$() light counterpart, used to generate light $(l:mechanics/etherium)Etherium$(). Instead of $(l:blocks/ores#vinteum)vinteum$(), it utilizes the sun's power.$(br2)Similarly, it can be supported by a multiblock structure, which builds up in levels. The structure's different levels are shown on the later pages.")
.addSimpleSpotlightPage(new ItemStack(AMItems.CELESTIAL_PRISM.get()), "The Celestial Prism cannot be obtained through crafting. Instead, it must be created through a special purification ritual. This ritual requires a multiblock structure, seen on the next page. Once built, throw a piece of $(l:blocks/ores#moonstone)Moonstone$() somewhere into the structure.")
.addSimpleMultiblockPage("Purification Ritual", "Finally, to initiate the ritual, simply place some $(l:components/light)light$() on the Obelisk.", PatchouliCompat.PURIFICATION_RITUAL)
.addSimpleMultiblockPage("Purification Ritual", "Finally, to initiate the ritual, simply place some $(l:components/light)light$() on the bottom of the Obelisk.", PatchouliCompat.PURIFICATION_RITUAL)
.addSimpleMultiblockPage("Celestial Prism Chalk", PatchouliCompat.CELESTIAL_PRISM_CHALK)
.addSimpleMultiblockPage("Celestial Prism Level 1", PatchouliCompat.CELESTIAL_PRISM_PILLAR1)
.addSimpleMultiblockPage("Celestial Prism Level 2", PatchouliCompat.CELESTIAL_PRISM_PILLAR2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,19 +99,19 @@ public void generate() {
.with(new ItemRequirement(List.of(Ingredient.of(AMItems.SUNSTONE.get())), 3))
.build());
add("unlock_blizzard", builder(new LearnSkillRitualEffect(AMSpellParts.BLIZZARD.get()),
new SpellComponentCastRitualTrigger(List.of(AMSpellParts.FROST_DAMAGE.get(), AMSpellParts.FROST.get(), AMSpellParts.STORM.get()), List.of(AMSpellParts.DAMAGE.get())))
new SpellComponentCastRitualTrigger(List.of(AMSpellParts.FROST_DAMAGE.get(), AMSpellParts.FROST.get(), AMSpellParts.STORM.get())))
.build());
add("unlock_daylight", builder(new LearnSkillRitualEffect(AMSpellParts.DAYLIGHT.get()),
new SpellComponentCastRitualTrigger(List.of(AMSpellParts.DIVINE_INTERVENTION.get(), AMSpellParts.TRUE_SIGHT.get()), List.of(AMSpellParts.SOLAR.get())))
.build());
add("unlock_dismembering", builder(new LearnSkillRitualEffect(AMSpellParts.DISMEMBERING.get()),
new SpellComponentCastRitualTrigger(List.of(AMSpellParts.PHYSICAL_DAMAGE.get()), List.of(AMSpellParts.DAMAGE.get(), AMSpellParts.PIERCING.get())))
new SpellComponentCastRitualTrigger(List.of(AMSpellParts.PHYSICAL_DAMAGE.get()), List.of(AMSpellParts.DAMAGE.get(), AMSpellParts.HEALING.get(), AMSpellParts.PIERCING.get())))
.build());
add("unlock_effect_power", builder(new LearnSkillRitualEffect(AMSpellParts.EFFECT_POWER.get()),
new SpellComponentCastRitualTrigger(List.of(AMSpellParts.AGILITY.get(), AMSpellParts.FLIGHT.get(), AMSpellParts.REFLECT.get(), AMSpellParts.SHRINK.get(), AMSpellParts.SWIFT_SWIM.get(), AMSpellParts.TEMPORAL_ANCHOR.get())))
.build());
add("unlock_falling_star", builder(new LearnSkillRitualEffect(AMSpellParts.FALLING_STAR.get()),
new SpellComponentCastRitualTrigger(List.of(AMSpellParts.ASTRAL_DISTORTION.get(), AMSpellParts.MAGIC_DAMAGE.get()), List.of(AMSpellParts.SOLAR.get())))
new SpellComponentCastRitualTrigger(List.of(AMSpellParts.ASTRAL_DISTORTION.get(), AMSpellParts.MAGIC_DAMAGE.get()), List.of(AMSpellParts.GRAVITY.get())))
.build());
add("unlock_fire_rain", builder(new LearnSkillRitualEffect(AMSpellParts.FIRE_RAIN.get()),
new SpellComponentCastRitualTrigger(List.of(AMSpellParts.FIRE_DAMAGE.get(), AMSpellParts.IGNITION.get(), AMSpellParts.STORM.get())))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// 1.20.1 2024-05-09T13:02:29.3884779 vanilla/Languages: en_us
1b639b0c7f3f549341043f26d963bb04683ad358 assets/arsmagicalegacy/lang/en_us.json
// 1.20.1 2024-06-01T17:00:49.2030864 vanilla/Languages: en_us
421e5d03dcd1e4694de38932af94853a7b019366 assets/arsmagicalegacy/lang/en_us.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.1 2024-05-09T19:18:11.8830001 vanilla/Registries
// 1.20.1 2024-06-01T17:00:49.1931206 vanilla/Registries
eae1dfc92ac50f1836c6895f54a76e376de43673 data/arsmagicalegacy/arsmagicalegacy/ability/clarity.json
78df5cdde19973be3e1e2f7da9b2c1060d37f368 data/arsmagicalegacy/arsmagicalegacy/ability/enderman_pumpkin.json
c9009d7042d9f8a21354875ce2694eb70c0a4495 data/arsmagicalegacy/arsmagicalegacy/ability/enderman_thorns.json
Expand Down Expand Up @@ -149,11 +149,11 @@ d5d016553f87404b0595ccb6d060a289039866c6 data/arsmagicalegacy/arsmagicalegacy/ri
b9303f24d0f09c8aa1c4456a6b3a79af5aa03361 data/arsmagicalegacy/arsmagicalegacy/ritual/spawn_life_guardian.json
3e7b92796a67e17086ec8bf5da6f6bb0b4b7913d data/arsmagicalegacy/arsmagicalegacy/ritual/spawn_lightning_guardian.json
e407d88f882d2b2859d95e3951e1e1073e4af148 data/arsmagicalegacy/arsmagicalegacy/ritual/spawn_water_guardian.json
e2562c91e54515ac19c4e552d50b0a10bca9ea04 data/arsmagicalegacy/arsmagicalegacy/ritual/unlock_blizzard.json
f178a48c72dee27abf6e2f032580ac316547fb57 data/arsmagicalegacy/arsmagicalegacy/ritual/unlock_blizzard.json
736522e9c463f8854c74f5f64d433107bf505cad data/arsmagicalegacy/arsmagicalegacy/ritual/unlock_daylight.json
12cf7ea08b21964c22c4033ea020203755573c24 data/arsmagicalegacy/arsmagicalegacy/ritual/unlock_dismembering.json
2ac7ba4d65cdf38b3d1cef446a42017404c67d49 data/arsmagicalegacy/arsmagicalegacy/ritual/unlock_dismembering.json
6a5a620bfeb6de02024e9911b3c3aa0fa70c30b8 data/arsmagicalegacy/arsmagicalegacy/ritual/unlock_effect_power.json
85dc9fb66ddd43dc9aaf5503e0d536044614bc86 data/arsmagicalegacy/arsmagicalegacy/ritual/unlock_falling_star.json
28acdd52eafbbca390bf18b999b871f9f45841f8 data/arsmagicalegacy/arsmagicalegacy/ritual/unlock_falling_star.json
a301a518a3224b20b9d2a1b39d92ef7e21fea58c data/arsmagicalegacy/arsmagicalegacy/ritual/unlock_fire_rain.json
fb75ecee90337e1ee9bc84f0106c47a15124759a data/arsmagicalegacy/arsmagicalegacy/ritual/unlock_health_boost.json
7f9d3e55b46c0ec413541d1583a29d89e98040fa data/arsmagicalegacy/arsmagicalegacy/ritual/unlock_mana_blast.json
Expand Down
4 changes: 2 additions & 2 deletions src/main/generated/assets/arsmagicalegacy/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@
"item.arsmagicalegacy.arcane_compendium.blocks.black_aurem.name": "Black Aurem",
"item.arsmagicalegacy.arcane_compendium.blocks.black_aurem.page0.text": "The Black Aurem is the $(l:blocks/obelisk)Obelisk's$() dark counterpart, used to generate dark $(l:mechanics/etherium)Etherium$(). Instead of $(l:blocks/ores#vinteum)vinteum$(), it consumes the lifes of animals.$(br2)Similarly, it can be supported by a multiblock structure, which builds up in levels. The structure's different levels are shown on the later pages.",
"item.arsmagicalegacy.arcane_compendium.blocks.black_aurem.page1.text": "The Black Aurem cannot be obtained through crafting. Instead, it must be created through a special corruption ritual. This ritual requires a multiblock structure, seen on the next page. Once built, throw a piece of $(l:blocks/ores#sunstone)Sunstone$() somewhere into the structure.",
"item.arsmagicalegacy.arcane_compendium.blocks.black_aurem.page2.text": "Finally, to initiate the ritual, you must $(l:components/fire_damage)severely burn$() the Obelisk.",
"item.arsmagicalegacy.arcane_compendium.blocks.black_aurem.page2.text": "Finally, to initiate the ritual, you must $(l:components/fire_damage)severely burn$() the bottom of the Obelisk.",
"item.arsmagicalegacy.arcane_compendium.blocks.black_aurem.page2.title": "Corruption Ritual",
"item.arsmagicalegacy.arcane_compendium.blocks.black_aurem.page3.title": "Black Aurem Chalk",
"item.arsmagicalegacy.arcane_compendium.blocks.black_aurem.page4.title": "Black Aurem Level 1",
Expand All @@ -326,7 +326,7 @@
"item.arsmagicalegacy.arcane_compendium.blocks.celestial_prism.name": "Celestial Prism",
"item.arsmagicalegacy.arcane_compendium.blocks.celestial_prism.page0.text": "The Celestial Prism is the $(l:blocks/obelisk)Obelisk's$() light counterpart, used to generate light $(l:mechanics/etherium)Etherium$(). Instead of $(l:blocks/ores#vinteum)vinteum$(), it utilizes the sun's power.$(br2)Similarly, it can be supported by a multiblock structure, which builds up in levels. The structure's different levels are shown on the later pages.",
"item.arsmagicalegacy.arcane_compendium.blocks.celestial_prism.page1.text": "The Celestial Prism cannot be obtained through crafting. Instead, it must be created through a special purification ritual. This ritual requires a multiblock structure, seen on the next page. Once built, throw a piece of $(l:blocks/ores#moonstone)Moonstone$() somewhere into the structure.",
"item.arsmagicalegacy.arcane_compendium.blocks.celestial_prism.page2.text": "Finally, to initiate the ritual, simply place some $(l:components/light)light$() on the Obelisk.",
"item.arsmagicalegacy.arcane_compendium.blocks.celestial_prism.page2.text": "Finally, to initiate the ritual, simply place some $(l:components/light)light$() on the bottom of the Obelisk.",
"item.arsmagicalegacy.arcane_compendium.blocks.celestial_prism.page2.title": "Purification Ritual",
"item.arsmagicalegacy.arcane_compendium.blocks.celestial_prism.page3.title": "Celestial Prism Chalk",
"item.arsmagicalegacy.arcane_compendium.blocks.celestial_prism.page4.title": "Celestial Prism Level 1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
"arsmagicalegacy:frost",
"arsmagicalegacy:storm"
],
"modifiers": [
"arsmagicalegacy:damage"
]
"modifiers": []
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
],
"modifiers": [
"arsmagicalegacy:damage",
"arsmagicalegacy:healing",
"arsmagicalegacy:piercing"
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"arsmagicalegacy:magic_damage"
],
"modifiers": [
"arsmagicalegacy:solar"
"arsmagicalegacy:gravity"
]
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import net.minecraft.world.effect.MobEffects;
import net.minecraft.world.entity.EntityType;
import net.minecraft.world.level.BlockGetter;
import net.minecraft.world.level.block.AirBlock;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.level.block.BushBlock;
Expand Down Expand Up @@ -73,6 +74,7 @@ public interface AMBlocks {
RegistryObject<BlackAuremBlock> BLACK_AUREM = BLOCKS.register("black_aurem", BlackAuremBlock::new);
RegistryObject<WizardsChalkBlock> WIZARDS_CHALK = BLOCKS.register("wizards_chalk", WizardsChalkBlock::new);
RegistryObject<SpellRuneBlock> SPELL_RUNE = BLOCKS.register("spell_rune", SpellRuneBlock::new);
RegistryObject<AirBlock> SPELL_LIGHT = BLOCKS.register("spell_light", () -> new AirBlock(BlockBehaviour.Properties.copy(Blocks.AIR).noLootTable().lightLevel($ -> 15)));
RegistryObject<Block> CHIMERITE_ORE = BLOCKS.register("chimerite_ore", () -> new Block(BlockBehaviour.Properties.of().requiresCorrectToolForDrops().strength(3F, 3F)));
RegistryObject<Block> DEEPSLATE_CHIMERITE_ORE = BLOCKS.register("deepslate_chimerite_ore", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.DEEPSLATE).requiresCorrectToolForDrops().strength(4.5F, 3F).sound(SoundType.DEEPSLATE)));
RegistryObject<Block> CHIMERITE_BLOCK = BLOCKS.register("chimerite_block", () -> new Block(BlockBehaviour.Properties.of().mapColor(MapColor.COLOR_PINK).requiresCorrectToolForDrops().strength(3F, 3F)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
import com.github.minecraftschurlimods.arsmagicalegacy.api.spell.ISpell;
import com.github.minecraftschurlimods.arsmagicalegacy.api.spell.ISpellModifier;
import com.github.minecraftschurlimods.arsmagicalegacy.api.spell.SpellCastResult;
import com.github.minecraftschurlimods.arsmagicalegacy.common.init.AMBlocks;
import com.github.minecraftschurlimods.arsmagicalegacy.common.init.AMMobEffects;
import net.minecraft.core.BlockPos;
import net.minecraft.core.Direction;
import net.minecraft.world.entity.Entity;
import net.minecraft.world.entity.LivingEntity;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.Blocks;
import net.minecraft.world.phys.BlockHitResult;
import org.jetbrains.annotations.Nullable;

Expand All @@ -26,7 +26,7 @@ public SpellCastResult invoke(ISpell spell, LivingEntity caster, @Nullable Entit
Direction direction = target.getDirection();
BlockPos pos = target.getBlockPos().offset(direction.getStepX(), direction.getStepY(), direction.getStepZ());
if (level.getBlockState(pos).isAir()) {
level.setBlock(pos, Blocks.LIGHT.defaultBlockState(), Block.UPDATE_ALL);
level.setBlock(pos, AMBlocks.SPELL_LIGHT.get().defaultBlockState(), Block.UPDATE_ALL);
return SpellCastResult.SUCCESS;
}
return SpellCastResult.EFFECT_FAILED;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ private static void test(GameTestHelper helper, ResourceLocation skill, ISpellPa

@GameTest(template = "empty", batch = BATCH)
public static void testUnlockBlizzard(GameTestHelper helper) {
test(helper, AMSpellParts.BLIZZARD.getId(), AMSpellParts.SELF.get(), AMSpellParts.FROST_DAMAGE.get(), AMSpellParts.DAMAGE.get(), AMSpellParts.FROST.get(), AMSpellParts.STORM.get());
test(helper, AMSpellParts.BLIZZARD.getId(), AMSpellParts.SELF.get(), AMSpellParts.FROST_DAMAGE.get(), AMSpellParts.FROST.get(), AMSpellParts.STORM.get());
}

@GameTest(template = "empty", batch = BATCH)
Expand All @@ -46,7 +46,7 @@ public static void testUnlockDaylight(GameTestHelper helper) {

@GameTest(template = "empty", batch = BATCH)
public static void testUnlockDismembering(GameTestHelper helper) {
test(helper, AMSpellParts.DISMEMBERING.getId(), AMSpellParts.SELF.get(), AMSpellParts.PHYSICAL_DAMAGE.get(), AMSpellParts.DAMAGE.get(), AMSpellParts.PIERCING.get());
test(helper, AMSpellParts.DISMEMBERING.getId(), AMSpellParts.SELF.get(), AMSpellParts.PHYSICAL_DAMAGE.get(), AMSpellParts.DAMAGE.get(), AMSpellParts.HEALING.get(), AMSpellParts.PIERCING.get());
}

@GameTest(template = "empty", batch = BATCH)
Expand All @@ -56,7 +56,7 @@ public static void testUnlockEffectPower(GameTestHelper helper) {

@GameTest(template = "empty", batch = BATCH)
public static void testUnlockFallingStar(GameTestHelper helper) {
test(helper, AMSpellParts.FALLING_STAR.getId(), AMSpellParts.SELF.get(), AMSpellParts.ASTRAL_DISTORTION.get(), AMSpellParts.MAGIC_DAMAGE.get(), AMSpellParts.SOLAR.get());
test(helper, AMSpellParts.FALLING_STAR.getId(), AMSpellParts.SELF.get(), AMSpellParts.ASTRAL_DISTORTION.get(), AMSpellParts.MAGIC_DAMAGE.get(), AMSpellParts.GRAVITY.get());
}

@GameTest(template = "empty", batch = BATCH)
Expand Down

0 comments on commit 41ca848

Please sign in to comment.