-
-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Issue type:
- ➕ Feature request
Short description:
if you create a variable of 1.0 double, it will be returned as a 1 integer, resulting in type failure in the ID network components
similarly, if you take in a int var card in a function, and use integerIntegerToDouble() to cast it to double, it will then immediately be self-cast back to int again
this ends up being a pretty severe functionality failure given that all components in an ID network require strict types, and cards set to cast to a given type will fail for the same reason that they only exist as strict type input to output, basically making scripts entirely useless
Steps to reproduce the problem:
example A for return type;
"return 1.0"
cast it from double to long
example B for mathematical;
use integerIntegerToDouble() on a pair of integer input cards, divide them, and then observe the returned output has undefined behaviour and cant decide what type it will actually be, nor will the division itself necessarily return an actual division, it might just be "0" or "1"
example C;
integer input card, and then multiply it by 0.5, behaviour is undefined but more often than not it returns an integer, which results in the majority of the value being lost, and of course, a casting error
Expected behaviour:
two points;
- base javascript doesn't actually have a concept of integer types, so this isn't standard javascript like what the manual suggests, which makes things very confusing
- this is strictly typed "javascript", but the necessary type controls that are of course needed for it to work correctly seem to be missing? so while you have the idcontext cast operators available, these functionally don't actually work here because of the "undefined type selection" behaviour, and similarly the type methods of <> and "as" are not implemented
Versions:
- This mod: 1.0.21
- Minecraft: 1.21.1
- Mod loader version: neo 21.1.217
Log file:
Metadata
Metadata
Assignees
Labels
Type
Projects
Status