Hex Casting

Hex Casting

7M Downloads

inconsistent results from duplicated lists

Fl4ng opened this issue ยท 5 comments

commented

Modloader

Fabric

Minecraft version

1.20.1

Hex Casting version

0.11.2

Modloader version

Fabric Loader 1.16.10

Modpack info

No response

The latest.log file

No response

Issue description

Inconsistency with duplicated lists.
It seems that the Gemini Decomposition duplication does not properly duplicate lists.

Steps to reproduce

  1. create a list of numbers
  2. duplicate list
  3. use Thoth's gambit that simply does something like multiply/add by a value
  4. see difference for if list is a duplicate or not

Other information

I am not familiar with minecraft modding but i assume this is simply because it makes a shallow copy
and that it is in the offending file is: Common/src/main/java/at/petrak/hexcasting/common/casting/arithmetic/operator/list/OperatorSlice.kt.

Overall this is just a guess.

commented

Can I see a screenshot reproducing the issue? I'm not really sure how to interpret these steps.

commented

Are you expecting modifying the duplicated list to modify the initial list? If so, that is not how hex works. Iotas are generally immutable, modifying a list is really just making a new list with different values.

commented

Image

when not duplicate

Image

commented

nevermind i think i know what my mistake is

commented

I forgot it duplicates the stack