CraftTweaker

CraftTweaker

151M Downloads

IData @ZenOperator(OperatorType.EQUALS) in application to DataMap

kimitsu opened this issue ยท 2 comments

commented

Issue Description:

It seems to be impossible to test two DataMaps for equality, even though the code for @ZenOperator(OperatorType.EQUALS) is present in IData and DataMap.

What happens:

When I try to compare two IDatas, that are DataMaps, (if (t1 == t2) { ... } ) the game crashes with UnsupportedOperatorException (in the moment when the crafting function gets called, i.e. when crafting the recipe). That happens because ZenScript doesn't seem to parse anything into EQUALS operator. It parses "==" into COMPARE operator, which throws the exception for DataMaps.

What you expected to happen:

I expected some syntax to be interpreted into EQUALS operator, so you could actually invoke the code for comparing two DataMaps. For exampe "t1 == t2" or "t1 === t2" or "t1 #= t2" etc.

Script used (Please Pastebin or gist your script, posting an unpasted or ungist'd script will automatically close this issue):

https://pastebin.com/r785gdSA

Minetweaker.log file (Please Pastebin or gist your file, posting an unpasted or ungist'd file will automatically close this issue):

https://pastebin.com/0YzMkFiR


Affected Versions (Do not use "latest"):

  • Minecraft: 1.7.10
  • Forge: 1.7.10-Forge10.13.4.1614-1.7.10
  • Crafttweaker: CraftTweaker-1.7.10-3.0.13.jar

Your most recent log file where the issue was present:

https://pastebin.com/YyvpUVvG

Crash Report: https://pastebin.com/vzbwtheJ

commented

1.7.10 is no longer supported.

Try calling t1.equals(t2)

commented

It doesn't work like that. 1.7.10 not supported? Grave news.