general.integer.invalid
Severity: error
The value provided is not a valid integer. The field expects a whole number but received a value that cannot be interpreted as one — such as a decimal number, a string, or an empty value.
This error is triggered by the language server when a value that should be an integer fails integer validation. This includes:
- Providing a floating-point number (e.g.,
1.5) where a whole number is required - Providing a non-numeric string where a number is expected
- Providing
nullor leaving the field empty when a number is required
The following JSON triggers the error because the value is a decimal where an integer is required:
Replace the value with a valid whole number (integer). Integers cannot have decimal points:
{
"minecraft:health": {
"value": 10,
"max": 20
}
}If you need a fractional value, check whether the field actually accepts a float type — some fields accept both integers and floats.
{ "minecraft:health": { "value": 10.5, // Invalid — should be a whole number like 10 "max": 20 } }