How do you check if a value is a number?

Started by thepearlking(t… on

Topic category: Help with Minecraft modding (Java Edition)

How do you check if a value is a number?

I was trying to code a gui with a text input. i was trying to make it only work if the value inside was a number, as it was a shopping system. 

The problem is i was searching through all the blocks, but i couldnt find a single one related to this.

 

I'm on 2025.5 on a 1.21.1 neoforge mod.

Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
2025.5? lol this is…
Mon, 09/15/2025 - 08:56

2025.5? lol

this is probably the best you can do without using custom code