Trickster

Trickster

1.4k Downloads

Spell constructs do not save state

StellarWitch7 opened this issue ยท 8 comments

commented

Describe the bug
When reloading a world, spell constructs do not resume their spell, but rather restart.

To reproduce
Steps to reproduce the behaviour:

  1. Place down a spell construct with a persistent spell. Ideally, it should have a clear tell for the start of the spell
  2. Exit the world
  3. Rejoin the world
  4. The spell construct has lost its state

Expected behaviour
The construct should resume where it left off from.

Export
Modified version of the spell posted by a user in #trickster on Discord:

7VnNa1NBEN/dJOVVqsaiWBC14MmKpxbEIriEgIX2oBKEnmwsKQTbWtp66MnXlkD8AwRvlYAnL35c9PYQCh5U6Nmj4llE7+a9l/RlZ2Y/kjQ2oO/wQnZ2ZnZ/s/Ob2USMff918c756eOS7QykeYoxluL1F+Och8OMifCb4IySyabsVKusaTJb9Y8Jo8kzUMaZfAzHaowpYzd2Jj9c/zoePhOxHagxXPXTSOMHaz6ERrIm8LbaZax7uywvj6AxqbMptN5u+oHAK3CyA958nApoI+CqmdtegECRZR0oe7/fXMoulZdL86vFhfXJtaUH90ureJrdyOnEyL3F4tr63YWHq8vF+VIntk4ktrRWKlPpL8YgkjjMHgQORiP9gEP9DaijeWJezYhMSiuqfz0HYawxuQnHXk6JDByDOZOcUXJ7oXh/iowkA8jNzOg2cgMSmI9hLb8Cx7wCtYZotqfO/vRz65GyYkKn5gs0lnAvDDFLHq1FZ5r99jF8PtNWlDW4kZ8i307jfSnIJagPwXlhbXHDBK0kOcob2bOEM6jcHqtqGZ9wHqekB+KlRiq/VSHwQGeX5QMrllhr2EGLEdW/NZvC5OSmKq+hhlgPdQCmvHbMWVjYsFbOV51EcZgAcSA1SSqyFvnWTQh+1cmoAQfBr2EcMAu99bhidu/FuyctNWdlsbihrTlZAIatczCSXEy60URl7Jmvcn3kuWDy7BV2h0ioHWmzk85Qar240i3lVUK9tqiVok66n+v88GPP6hkkOOj5Sdui+GXKoJVDkIQ4TVQBk6MmlMnzB5FQNFaqapMXUzTOXluGKN299TTb7xn6O4H+HkGXS5Vvb0GlvuKZ136A2pjD5x61rehocRR1cX2IfQTTf2rsKTXi+htedIxxMfbfdqyV6PeUACzE2961y2xsMJ9CY7DbDu+lRxMyKZYJJmmDhan1ZS0pZQuEy9u6b4+llTE753MucshKNuPg32Obvg2FLviwi9vTX62vYSJPQ00qkXu4qrbPhS7yJt+uZPzPn4vDoVSn34j7Eq8wg9AveI39gLYRX9MbXGUswLG9ETSP7PXZ/kN1mu1J3efQqJj+LBmEsoP6X4GPwHnkz2RBzkexeLqr3buuYezEDlGfNH0zAjEUi8KcfJ+SV/wIFzk7F30GF2KcImETtJZ2qgXHPxY33D/vGgAA

To use it, have it on a spell construct in the offhand while using a CAD on a furnace. Then place the construct where it receives a redstone signal from a comparator and give it a knot with sufficient mana for the heating ploy. When starting up, the spell will wait n ticks before placing a highlight on itself and running properly. This delay and highlight happens after reloading the world in the example below.

Attachments

Here's the development environment's latest.log, though I doubt it's all that informative.

simplescreenrecorder.mp4

Notes

This was tested on commit 3355359 on the master branch.

commented

It should also be noted that this fix causes non-modular spell constructs to lose their spells. This might be a rendering issue due to the executor being messed with. Not certain.

commented

This fix is sufficient, but not preferable. I'll see what I can do about that, so that spell cores behave as was originally intended when making them.

commented

This fix is sufficient, but not preferable. I'll see what I can do about that, so that spell cores behave as was originally intended when making them.

I've succeeded on my local copy. I'm not sure the implementation is the best, but it does work.

commented

It should also be noted that this fix causes non-modular spell constructs to lose their spells. This might be a rendering issue due to the executor being messed with. Not certain.

Okay it was an issue with the old executor not being available and not automatically loading a new one. Shift + right click or breaking the construct works fine.

commented

Fixed as of 772ffaf.

commented

Should be fixed in b571e60

commented

Bruh project

commented

Actually, I've tested, but I think you should test too, since its a relatively major change.