Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

LiquidBounce Forum

  1. Home
  2. ScriptAPI
  3. LiquidBounce's ScriptApi defines non-function as function

LiquidBounce's ScriptApi defines non-function as function

Scheduled Pinned Locked Moved Solved ScriptAPI
3 Posts 2 Posters 385 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • kaduvertK Offline
    kaduvertK Offline
    kaduvert
    wrote on last edited by kaduvert
    #1

    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
    		}
    	})
    })
    
    CzechHekC 1 Reply Last reply
    0
    • kaduvertK kaduvert

      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
      		}
      	})
      })
      
      CzechHekC Offline
      CzechHekC Offline
      CzechHek
      wrote on last edited by
      #2

      @somedudeyouveneverheardof According to mcp-stable_22.srg located in LiquidBounce-1.8.9 folder, you should call getAction() instead of func_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;
      
      kaduvertK 1 Reply Last reply
      0
      • kaduvertK kaduvert has marked this topic as solved on
      • CzechHekC CzechHek

        @somedudeyouveneverheardof According to mcp-stable_22.srg located in LiquidBounce-1.8.9 folder, you should call getAction() instead of func_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;
        
        kaduvertK Offline
        kaduvertK Offline
        kaduvert
        wrote on last edited by kaduvert
        #3

        @CzechHek thanks! that worked

        but why is the scriptapi incorrect? couldn't it be fixed?

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        About
        • Terms of Service
        • Privacy Policy
        • Status
        • Contact Us
        Downloads
        • Releases
        • Source code
        • License
        Docs
        • Tutorials
        • CustomHUD
        • AutoSettings
        • ScriptAPI
        Community
        • Forum
        • Guilded
        • YouTube
        • Twitter
        • D.Tube
        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups