Basically, that code there is supposed to trigger every time the player walks over the block that has it’s coordinates hard-coded into the plugin (hard coded only for testing purposes to see if the code would actually trigger). It’s the only thing in the Sponge docs I have seen (after doing multiple searches) that closely replicates Skript’s ‘on walking on’ function.
The code is supposed to have a 3% chance of triggering, with rngs deciding what happens (what Pokemon is spawned basically) if the RNG picks the number that says “run the spawn code” basically. So, to avoid having the issue of can only spawn if the 3% chance fires, we have that block capable of spawning any Pokemon that appears in that area. The last RNG used is for deciding if the Pokemon that is spawned is spawned in it’s rare ‘shiny’ form, which is why the RNG for that one is set to 1-8192. As inexperienced with Java as I am, even I can see that there are better ways to write this code. This is as simple as it can be written, I would think. If I had used variables instead of hard-coded it, I would have came across the issue of wondering what wasn’t working (variable a, variable b, variable c, or the whole code in general, etc) and would have spent longer trying to discover what wasn’t working.
I noticed that the MoveEntityEvent wasn’t listed with the event listeners, and I found that as strange because, according to the Sponge docs, it get called when an entity makes a move, so it should have a listener, I would think.
I set the entity to player because I need the code to only execute when a player steps on the block, and I couldn’t figure out any other way to convert from ‘Entity’ to ‘Player’.
So, if this won’t trigger on it’s own, what can you (nicely please :P) suggest I should do to get it to trigger just so I can test it?