LiquidBounce's ScriptApi defines non-function as function
Solved
ScriptAPI
-
LiquidBounce's ScriptApi JavaDoc (https://scriptapi.liquidbounce.net/net/minecraft/network/play/server/S38PacketPlayerListItem.html) tells me that func_179768_b() is defined on S38PacketPlayerListItem and returns some S38PacketPlayerListItem.Action
but when i call it, it throws an error.. any ideas?
var tablistItem = Java.type('net.minecraft.network.play.server.S38PacketPlayerListItem') script.registerModule({ name: 'Example', category: 'Misc', description: '' }, function (module) { module.on('packet', function(e) { var packet = e.getPacket() if (packet instanceof tablistItem) { var action = packet.func_179768_b() // throws TypeError: packet.func_179768_b is not a function } }) })
-
@somedudeyouveneverheardof According to mcp-stable_22.srg located in LiquidBounce-1.8.9 folder, you should call
getAction()
instead offunc_179768_b()
.MD: net/Minecraft/network/play/server/S38PacketPlayerListItem/getAction ()Lnet/Minecraft/network/play/server/S38PacketPlayerListItem$Action; net/minecraft/network/play/server/S38PacketPlayerListItem/func_179768_b ()Lnet/Minecraft/network/play/server/S38PacketPlayerListItem$Action;
-