Merge pull request #23 from Murturtle/patch-4

Update patches.js
This commit is contained in:
ZXMushroom63 2024-10-02 17:02:37 +08:00 committed by GitHub
commit 0e66476377
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -27,12 +27,11 @@ class PatchesRegistry {
PatchesRegistry.regSpecialEvent("render"); PatchesRegistry.regSpecialEvent("render");
PatchesRegistry.addPatch(function (input) { PatchesRegistry.addPatch(function (input) {
var output = input.replaceAll( var output = input.replaceAll(
/continue main;\s+?}\s+?if\s?\(!\$this.\$renderHand\)/gm /\$tmp = \$entity.\$getEyeHeight\(\);\s+?if \(\$rt_suspending\(\)\) {/gm
, ,
`continue main; `$tmp = $entity.$getEyeHeight();
}
ModAPI.events.callEvent("render",{partialTicks:$partialTicks}) ModAPI.events.callEvent("render",{partialTicks:$partialTicks})
if (!$this.$renderHand)` if ($rt_suspending()) {`
); );
return output; return output;
}) })