Thread: [Apollo] Event Decoder in JRuby wont work?

Results 1 to 3 of 3
  1. #1 [Apollo] Event Decoder in JRuby wont work? 
    Registered Member DarkSlayerz's Avatar
    Join Date
    Nov 2008
    Posts
    928
    Thanks given
    88
    Thanks received
    44
    Rep Power
    46
    Hi guys, im having a small problem with a packet, and i cant find out how to fix this.

    This is the error:

    Code:
    okt 02, 2013 3:03:32 PM org.apollo.net.ApolloHandler exceptionCaught
    WARNING: Exception occured for channel: [id: 0x0e37b910, /192.168.1.102:54262 => /192.168.1.102:43594], closing...
    org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `get_event_encoder' for nil:NilClass
    	at RUBY.(root)(Server\.\data\plugins\encoders\positions.rb:134)
    	at RUBY.each(jar:file:Server/deps/jruby-8.jar!/jruby/java/java_ext/java.util.rb:7)
    	at RUBY.(root)(Server\.\data\plugins\encoders\positions.rb:133)
    	at org.jruby.RubyProc.call(org/jruby/RubyProc.java:249)
    	at ProcEventEncoder.encode(Server\.\data\plugins\bootstrap.rb:86)
    Code:
    on :encode, 317, :region_update do |event|
      builder = GamePacketBuilder.new 60, PacketType::VARIABLE_SHORT
      base = event.base
      pos = event.position
      builder.put DataType::BYTE, pos.local_y(base)
      builder.put DataType::BYTE, DataTransformation::NEGATE, pos.local_x(base)
      event.events.each do |e|
        encoder = World.world.get_release.get_event_encoder e.class 
        packet = encoder.encode e
        builder.put DataType::BYTE, packet.opcode
        builder.put_bytes packet.payload
      end
      builder.to_game_packet
    end
    While i got this in my Release class

    Code:
    	@SuppressWarnings("unchecked")
    	public <E extends Event> EventEncoder<E> getEventEncoder(Class<E> type) {
    		return (EventEncoder<E>) encoders.get(type);
    	}
    any ideas?
    Reply With Quote  
     

  2. #2  
    Registered Member DarkSlayerz's Avatar
    Join Date
    Nov 2008
    Posts
    928
    Thanks given
    88
    Thanks received
    44
    Rep Power
    46
    bump need this
    Reply With Quote  
     

  3. #3  
    Registered Member DarkSlayerz's Avatar
    Join Date
    Nov 2008
    Posts
    928
    Thanks given
    88
    Thanks received
    44
    Rep Power
    46
    bump
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [Apollo] #317 Chat Event Decoder - Bug Fix
    By Major in forum Snippets
    Replies: 2
    Last Post: 06-11-2013, 11:08 AM
  2. run.bat in client fix works for everyone
    By Arvid in forum Tutorials
    Replies: 5
    Last Post: 02-22-2008, 05:03 PM
  3. model viewer wont work!
    By R4ND0M in forum Models
    Replies: 2
    Last Post: 02-22-2008, 04:16 AM
  4. Downloaded text wont work with photoshop
    By Casella in forum General
    Replies: 7
    Last Post: 02-17-2008, 03:39 AM
  5. Replies: 2
    Last Post: 08-18-2007, 05:49 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •