Occultism

Occultism

19M Downloads

[Help] creating a custom ritual and a recipe that uses it

Shibva opened this issue ยท 12 comments

commented

Describe your problem
Hello, long time no see ^w^

anyhow im trying to make a datapack that would do the following with occultism

  • A custom ritual
  • a recipe that uses the custom ritual
  • a way to include an entry into the book

if the first 2 are possible todo using datapacks please send me a message confirming it
(atm in currently stuck on the structure syntax)

System (please complete the following information):

  • Minecraft Version: 1.18.2
commented

The first two are possible!
You could check with the Enigmatica 6 guys (or check their github) they are doing it using kubejs, but a regular datapack also works.

The builtin pentacles can be found here: https://github.com/klikli-dev/occultism/tree/version/1.18/src/generated/resources/data/occultism/occultism_pentacles

A readme on pentacles here: https://github.com/klikli-dev/occultism/blob/version/1.18/src/main/resources/data/occultism/occultism_pentacles/00_readme.md

Builtin ritual recipes here: https://github.com/klikli-dev/occultism/tree/version/1.18/src/main/resources/data/occultism/recipes/ritual

Readme on recipes here: https://github.com/klikli-dev/occultism/blob/version/1.18/src/main/resources/data/occultism/recipes/ritual/00_readme.md

Including the entry into the book should be possible because patchouli provides an extension mechanic, but I have never used it so you would have to dig through their documentation/examplemods/discord.

Going to close this so it doesn't show up on my radar as active todo, but feel free to keep commenting here :)

commented

ok, first thing you can do is help me; I tried and it keeps on invalidating the pack

could you take a look at it?

{
    "pattern": [
        "   RRRRR   ",
        "  R CXC R ",
        " RISSVSSIR ",
        "R SLG GLS R",
        "RCSGPBPGSCR",
        "RXV B0B VXR",
        "RCSGPBPGSCR",
        "R SLG GLS R",
        " RISSVSSIR ",
        "  R CXC R  ",
        "   RRRRR   "
    ],
    "mapping": {
      "0": "occultism:golden_sacrificial_bowl",
      "R": "occultism:chalk_glyph_red",
      "W": "occultism:chalk_glyph_white",
      "G": "occultism:chalk_glyph_gold",
      "P": "occultism:chalk_glyph_purple",
      "S": "occultism:spirit_attuned_crystal",
      "B": "malum:twisted_iridescent_ether_brazier",
      "V": "minecraft:soul_campfire",
      "L": "occultism:spirit_campfire",
      "C": {
        "tag": "minecraft:candles",
        "display": "occultism:candle_white"
      },
      "X": {
        "tag": "tombstone:decorative_graves"
      }
    }
  }
commented

also is there a way that I can check to see if the pattern does exist?

commented

Please provide your log file for when you try to load a world with that pentacle in there, there should be error messages

what do you mean with if the pattern does exist?

commented

ok, ill try to run it again and give you the game log yes? or do you want a specific part of the game log? give me a hour or two and ill post back

as for if the pattern exist; I meant is there some way for me to see if the ritual patter was added into the game?

commented

ok that was a typo but is not the issue; but your tip still hold effective

@klikli-dev tbh, it might not be a bad idea to include in the debug mode a chat printout on any sort of data issue that might happen with pentacles and other related things if it were to detect it. it would be a QoL sort of recomendation

commented

image

heres the image of the petacle

also I got it... thanks for the tip

	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:315) ~[?:?]
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:320) ~[?:?]
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:722) ~[?:?]
	at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?]
	at net.minecraft.server.packs.resources.SimpleReloadInstance.m_143940_(SimpleReloadInstance.java:69) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:198) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:799) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:164) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:163) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:782) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:776) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:176) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.MinecraftServer.m_129861_(MinecraftServer.java:1340) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.commands.ReloadCommand.m_138235_(ReloadCommand.java:22) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.commands.ReloadCommand.m_138228_(ReloadCommand.java:53) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:263) ~[brigadier-1.0.18.jar%2332!/:?]
	at net.minecraft.commands.Commands.m_82117_(Commands.java:234) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.m_9957_(ServerGamePacketListenerImpl.java:1151) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.m_143628_(ServerGamePacketListenerImpl.java:1129) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.m_7388_(ServerGamePacketListenerImpl.java:1115) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.network.protocol.game.ServerboundChatPacket.m_5797_(ServerboundChatPacket.java:30) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.network.protocol.game.ServerboundChatPacket.m_5797_(ServerboundChatPacket.java:7) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.network.protocol.PacketUtils.lambda$checkThreadAndEnqueue$0(PacketUtils.java:40) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.optifine.util.PacketRunnable.run(PacketRunnable.java:28) ~[OptiFine_1.18.2_HD_U_H7.jar%23244!/:?]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:198) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:799) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:164) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:163) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:782) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:776) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:176) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:762) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:689) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:261) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at java.lang.Thread.run(Thread.java:833) [?:?]
Caused by: java.lang.IllegalArgumentException: Pentacle pattern can not have rows with different lengths
	at com.github.klikli_dev.occultism.common.ritual.pentacle.Pentacle.<init>(Pentacle.java:66) ~[occultism-1.18.2-1.35.0.jar%23178!/:1.18.2-1.35.0]
	at com.github.klikli_dev.occultism.common.ritual.pentacle.Pentacle.fromJson(Pentacle.java:115) ~[occultism-1.18.2-1.35.0.jar%23178!/:1.18.2-1.35.0]
	at com.github.klikli_dev.occultism.common.ritual.pentacle.PentacleManager.apply(PentacleManager.java:94) ~[occultism-1.18.2-1.35.0.jar%23178!/:1.18.2-1.35.0]
	at com.github.klikli_dev.occultism.common.ritual.pentacle.PentacleManager.m_5787_(PentacleManager.java:49) ~[occultism-1.18.2-1.35.0.jar%23178!/:1.18.2-1.35.0]
	at net.minecraft.server.packs.resources.SimplePreparableReloadListener.m_10789_(SimplePreparableReloadListener.java:13) ~[client-1.18.2-20220404.173914-srg.jar%23238!/:?]
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?]
	... 36 more```
commented

(sorry had a second thought and hit enter too soon)

If I could make a recommendation, include some way to tell the user in the log when a requirement for a tag is missing

for example if you use the TAG (that happens to need a display) and a display is missing, it would give a more clear log message

so instead of java.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.block.Block.m_49966_()" because "display" is null
it would read ava.lang.NullPointerException: Cannot invoke "net.minecraft.world.level.block.Block.m_49966_()" because "display" was missing from (erroring line)

commented

I was going to say another issue, but I made a realization after looking at it again

It seems that there's a addonal requirement in order to use the TAG flag, otherwise it will error

commented

That's sadly not trivial (because loading of the jsons is handled outside the mod).
I am working on a different multiblock solution that will replace patchouli and that will try to provide a bit more context in the error messages, however it still won't be 100% watertight

commented

alr

also question; is it possable to silently execute commands upon ritual completion

Example case: tombstone has a command that resets the cooldown of a item (that has a 3 hour cooldown) and I want this specific command to execute quietly (no message on sucess unless specified by commands that result in a output [/say, /tellraw] upon the completion of a ritual

commented

Not currently, no. With an addon mod you could add a new ritual type, then you have full control, but the builtin system cannot do it