Ragnar Lothbrok Posted October 3, 2018 Posted October 3, 2018 (edited) I'm having trouble with the Entity getHeight() method returning the wrong value. Here's my code: RS2Object patch = getObjects().closest(p -> IntStream.of(p.getModelIds()).anyMatch(i -> i == 7768)); if (patch != null) { if (patch.getHeight() < 80) { // Plant Seed Code } else { // Water Code } } The problem is after the seed is planted I'm still getting 0 back for the height when is should now be 80 - this doesn't seem to be constant however as sometimes I'm getting the correct result. If I use the debug on the client I can see that the height is in-fact 80. Am I just doing something stupid here or is this a client bug? Edited October 3, 2018 by Ragnar Lothbrok
Token Posted October 3, 2018 Posted October 3, 2018 There may be a different RS2Object instance for every tile of the patch, even multiple ones on the same tile and only one visible representing the current growth cycle of the patch. That's just an idea of what to look for, I doubt that's the problem but I'm saying you should check how many of those entities are actually there and look at their properties and how they change when the seed is planted (through code).