WinDanesz / AncientSpellcraft

An extension mod for the Electroblob's Wizardry Minecraft 1.12.2 mod
https://www.curseforge.com/minecraft/mc-mods/ancient-spellcraft
GNU General Public License v3.0
7 stars 15 forks source link

[Bug] Conceal Object makes the block interact oddly with player and attached items #178

Open KnightCa opened 1 year ago

KnightCa commented 1 year ago

Is there an existing issue for this?

Observed behaviour

After using Conceal Object on a block, the block interacts oddly with the player and items attached to it.

Examples:

  1. Used on a Crafting Table or Anvil, you cannot interact with the interface while it is "gone"
  2. Used on a Grass block under flowers/grass, the grass and flowers pop off the "gone" block.

On the other hand:

  1. Ladders connected to the "gone" block stay in place
  2. Vines stay on "gone" blocks.

Expected behaviour

I expected the block to become invisible, but continue to interact with the player and attached objects in the same way.

Steps to reproduce

  1. Join Server
  2. Cast Conceal Object on a Grass block under grass, notice what happens to grass.
  3. Cast Conceal Object on a Crafting Table or Anvil and try to interact with it

Crashlog

No response

Environment (Singleplayer/Server, etc.)

Issue present on both sides

Mod version

1.5.10

Forge version

1.12.2-forge-14.23.5.2860

Other mods

No response

WinDanesz commented 1 year ago

Expected behaviour

I expected the block to become invisible, but continue to interact with the player and attached objects in the same way.

Sadly this isn't possible. You can't retain the original block and disable its rendering. The concealed block is an invisible technical block that stores the data of the replaced block. I can make right-clicking it restore the original block, and therefore end the spell's effect, but that also means you need to cast the spell again after each interaction. Another possibility would be to render a more translucent variant of the replaced block, (perhaps only for the caster) when the caster steps close to its position. Yet another possibility is to use a secondary block somewhere nearby that places an invisible tileentity that stores the info of "block xyz was revealed, hide it again once the caster is not within N blocks distance to it". I don't like this, it's too unpredictable where it could be placed. Yet another possibility is to store this info in playerdata. E.g. if the player approaches a concealed block, said block's tileentity registers itself into the player's playerdata, then reverts to its usual block form. The playerdata would periodically check the registered blocks, and revert them based on proximity. I think this last option would make this spell quite useful

KnightCa commented 1 year ago

Great options,

It would be ideal if the caster didn’t need to recast the spell. It sounds like it might be possible to have the block appear for the caster when getting close to its position, then disappear again when the caster moves further away. One block distance would be ideal, since that would allow the spell to continue to function as windows at longer distances.

For both of these options, would the block revert to being invisible after the caster moves away? Would another caster casting the same spell still revert the block to its normal visible state?

I like the first option better, since a slightly translucent block still can be partially seen through and maintains the feel of the spell being in effect (as long as interaction is possible). Both options could work though.

Option 1: render a more translucent variant of the replaced block, only for the caster, when the caster steps close to its position.

Option 2: store this info in playerdata. E.g. if the player approaches a concealed block, said block's tileentity registers itself into the player's playerdata, then reverts to its usual block form. The playerdata would periodically check the registered blocks, and revert them based on proximity.

On Nov 30, 2023, at 1:09 AM, WinDanesz @.***> wrote:

render a more translucent variant of the replaced block, (perhaps only for the caster) when the caster steps close to its position. Yet another possibility is to use a secondary block somewhere nearby that places an invisible tileentity that stores the info of "block xyz was revealed, hide it again once the caster is not within N blocks distance to it". I don't like this, it's too unpredictable where it could be placed. Yet another possibility is to store this info in playerdata. E.g. if the player approaches a concealed block, said block's tileentity registers itself into the player's playerdata, then reverts to its usual block form. The playerdata would periodically check the registered blocks, and revert them based on proximity. I think this last option would make this spell quite useful

WinDanesz commented 1 year ago

Interactions are not possible against the original block if with the facade block in place, so a translucent block cannot be used for anything

KnightCa commented 1 year ago

It sounds like option 2 would have a non-facade block you could interact with that would disappear again when moving away. Sound right? If so, that’s the most appealing optionOn Nov 30, 2023, at 8:31 AM, WinDanesz @.***> wrote: Interactions are not possible against the original block if with the facade block in place, so a translucent block cannot be used for anything

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

WinDanesz commented 1 year ago

Correct