I want water tiles with 012 animation instead of 0121

(I think I posted this in the wrong section… oops)

I'm making my own tilesets but water doesn't flow back and forth. I want them to flow in one direction in a 3-frame animation.

So I found this in rpg_core.js

Code:
Tilemap.prototype._drawAutotile = function(bitmap, tileId, dx, dy) {
...
...
        var waterSurfaceIndex = [0, 1, 2, 1][this.animationFrame % 4];
...
...
};

then I pasted that entire function to my plugin, where I change the above line to this:

Code:
        var waterSurfaceIndex = this.animationFrame % 3;

Water tiles still animate from 0, 1, 2, 1 instead of 0,1,2. I saved this even on the original rpg_core.js file, nothing changed.

I checked if i'm editing in the right folder, my game is being booted with the edited files. The plugin is active and running. Whatever is telling the game to do 0,1,2,1 has to be in a spot I missed, but where?
Also look for ShaderTilemap and make the same change there.

Which one is used depends on the platform you're deploying to.
I looked at this a while back to no avail, but it seems this might be an appropriate override for ShaderTilemap:
Code:
ShaderTilemap.prototype._hackRenderer = function(renderer) {
    var af = this.animationFrame % 3;
    renderer.plugins.tilemap.tileAnim[0] = af * this._tileWidth;
    renderer.plugins.tilemap.tileAnim[1] = (this.animationFrame % 3) * this._tileHeight;
    return renderer;
};

Original thread: https://forums.rpgmakerweb.com/threads/i-want-water-tiles-with-012-animation-instead-of-0121.105231/