These are chat archives for MylesIsCool/ViaVersion

10th
Mar 2016
lenis0012
@lenis0012
Mar 10 2016 02:17 UTC
Made PR
@MylesIsCool
lenis0012
@lenis0012
Mar 10 2016 02:45 UTC
With my PR withers and endersragons no longer crash clients. And they also display their health
Possibly also supports boss bar plugins for 1.8
lenis0012
@lenis0012
Mar 10 2016 11:40 UTC
I made another PR handling chunk bulk packets in a better way
should fix protocollib support and everything that sync-chunk fixed
Hugo Kerstens
@hugokerstens
Mar 10 2016 11:41 UTC
Wow thank you so much again!
lenis0012
@lenis0012
Mar 10 2016 11:49 UTC
yup
essentially
You are unable with the encoder to encode one packet into multiple buffer objects
due to the fact that the other encoders would break
but earlier in the pipeline, you can modify the packet directly and return a list of packets, allowing you to read one chunk buld, and write a list of single packets
this logic is also used in mojang's packet splitter
Hugo Kerstens
@hugokerstens
Mar 10 2016 12:00 UTC
Ahh yeah I never looked at it this thoroughly
But really good effort you put into this
I'll be home in 1.5 hours then I'll test and merge it ;)
Myles
@MylesIsCool
Mar 10 2016 13:16 UTC
Solid work @lennis0012, :) <3
lenis0012
@lenis0012
Mar 10 2016 13:22 UTC
:)
ridalarry
@ridalarry
Mar 10 2016 13:30 UTC
so now if I have a plugin that use wither boss bars for announcements, it should work?
Myles
@MylesIsCool
Mar 10 2016 13:30 UTC
Correct
if you're using latest dev build that is
ridalarry
@ridalarry
Mar 10 2016 13:30 UTC
Great job
what is the link for it?
Myles
@MylesIsCool
Mar 10 2016 13:31 UTC
check out the unofficial build servers in description of the github thing ;)
?
Myles
@MylesIsCool
Mar 10 2016 13:33 UTC
ya
Did you ever find anything to do with your bug @lenis0012 ?
ridalarry
@ridalarry
Mar 10 2016 13:38 UTC
didnt work
Hugo Kerstens
@hugokerstens
Mar 10 2016 13:39 UTC
Did it throw an error?
ridalarry
@ridalarry
Mar 10 2016 13:39 UTC
ya
Hugo Kerstens
@hugokerstens
Mar 10 2016 13:40 UTC
Can you report an issue? ;(
ridalarry
@ridalarry
Mar 10 2016 13:40 UTC
I will upload it in a min
1 min for the log
Hugo Kerstens
@hugokerstens
Mar 10 2016 13:41 UTC
Thanks for the clear video :)
np
Myles
@MylesIsCool
Mar 10 2016 13:41 UTC
Yeah
this is an issue is why I didn't patch bossbars
for some reason bossbars have a weird metadata of 11
ridalarry
@ridalarry
Mar 10 2016 13:42 UTC
so its not fixable?
or will need more time
Myles
@MylesIsCool
Mar 10 2016 13:42 UTC
more time ofc
I'll work on a patch
ridalarry
@ridalarry
Mar 10 2016 13:43 UTC
thank you so much
Myles
@MylesIsCool
Mar 10 2016 13:46 UTC
What bar plugin are you using
ridalarry
@ridalarry
Mar 10 2016 13:47 UTC
AnimeX
its all in 1 plugin
The author of this plugin is probably better than the AAC author
lenis0012
@lenis0012
Mar 10 2016 14:06 UTC
ill fix the wither bug
what boss bar plugin did you use
Myles
@MylesIsCool
Mar 10 2016 14:06 UTC
I've got it dw
lenis0012
@lenis0012
Mar 10 2016 14:07 UTC
okay
i just missed the wither flag field
same as in enderdragon
should be set to 0
Myles
@MylesIsCool
Mar 10 2016 14:07 UTC
Oh I fixed BarAPI
if you wanna resync and fix other bug then sure
lenis0012
@lenis0012
Mar 10 2016 14:09 UTC
no you did it right
Myles
@MylesIsCool
Mar 10 2016 14:09 UTC
I just summoned a wither and it has no name on bossbar oh
lenis0012
@lenis0012
Mar 10 2016 14:10 UTC
myles
when you change the title of a boss bar
it does update it right?
Myles
@MylesIsCool
Mar 10 2016 14:10 UTC
It should do
lenis0012
@lenis0012
Mar 10 2016 14:11 UTC
hmm
ima debug
Myles
@MylesIsCool
Mar 10 2016 14:11 UTC
I mean I have the plugin working with BarAPI and a welcome plugin
lenis0012
@lenis0012
Mar 10 2016 14:13 UTC
[15:12:46 INFO]: Updating boss bar with title 'Wither'
[15:12:46 INFO]: Updating boss bar with title 'Wither'
[15:12:46 INFO]: Updating boss bar with title 'Wither'
doesn't seem to be updating
oh oops
PRing
Myles
@MylesIsCool
Mar 10 2016 14:15 UTC
oh
lenis0012
@lenis0012
Mar 10 2016 14:15 UTC
i defined a default title but wasn't using it
Myles
@MylesIsCool
Mar 10 2016 14:16 UTC
Well at least we got that sorted fast haha
Myles
@MylesIsCool
Mar 10 2016 14:18 UTC
@ridalarry Are you able to test the latest dev build and confirm that animation plugin works?
lenis0012
@lenis0012
Mar 10 2016 14:19 UTC
also @MylesIsCool
I figured out the cause of the chunk glitch
just didn't figure a solution out yet
Minecraft's renderer bugs out when you don't send the chunks it is expecting to get sent.
And chunks in void worlds are filtered out as "empty chunks" and therefor not sent
so the issue only occurs in void worlds
Myles
@MylesIsCool
Mar 10 2016 14:23 UTC
Yeah chunks are definitely one of the trickiest things
Good job on finding the cause though
lenis0012
@lenis0012
Mar 10 2016 14:25 UTC
lol have you ever defeated the ender dragon with ViaVersion?
Myles
@MylesIsCool
Mar 10 2016 14:25 UTC
nope
lenis0012
@lenis0012
Mar 10 2016 14:25 UTC
instead of disappearing normally
Myles
@MylesIsCool
Mar 10 2016 14:25 UTC
does it bug
lenis0012
@lenis0012
Mar 10 2016 14:25 UTC
he spins around in circles
like a spass
Myles
@MylesIsCool
Mar 10 2016 14:28 UTC
is that not the new fancy animation ;) just seen it now
lenis0012
@lenis0012
Mar 10 2016 14:29 UTC
I think its because his phase is still set to 0
0=circling, 1=strafing (preparing to shoot a fireball), 2=flying to the portal to land (part of transition to landed state), 3=landing on the portal (part of transition to landed state), 4=taking off from the portal (part of transition out of landed state), 5=landed, performing breath attack, 6=landed, looking for a player for breath attack, 7=landed, roar before beginning breath attack, 8=charging player, 9=flying to portal to die, 10=hovering
Myles
@MylesIsCool
Mar 10 2016 14:31 UTC
I don't think we can fix that, it's not that much of a bug really
lenis0012
@lenis0012
Mar 10 2016 14:31 UTC
i know
but it spretty funny
Myles
@MylesIsCool
Mar 10 2016 14:31 UTC
we'll call it a feature ;)
lenis0012
@lenis0012
Mar 10 2016 14:32 UTC
put it on the feature list
"Download now and get a free spastic ender dragon"
ridalarry
@ridalarry
Mar 10 2016 14:51 UTC
sorry i was out
@MylesIsCool I will test it now
lenis0012
@lenis0012
Mar 10 2016 14:51 UTC
@ridalarry what plugin are you using
ridalarry
@ridalarry
Mar 10 2016 14:52 UTC
AnimeX
lenis0012
@lenis0012
Mar 10 2016 14:52 UTC
whats that
ridalarry
@ridalarry
Mar 10 2016 14:52 UTC
Its an all in 1 plugin
lenis0012
@lenis0012
Mar 10 2016 14:53 UTC
nice
Does it work?
ridalarry
@ridalarry
Mar 10 2016 14:54 UTC
I just added it
I will restart now
as I had to enable the boss bars again
no
didnt work
this is the latest version?
lenis0012
@lenis0012
Mar 10 2016 14:57 UTC
yea
what error did you get
ridalarry
@ridalarry
Mar 10 2016 14:57 UTC
not working
lenis0012
@lenis0012
Mar 10 2016 14:57 UTC
no errors?
ridalarry
@ridalarry
Mar 10 2016 14:58 UTC
there is
1 min
@lenis0012
ridalarry
@ridalarry
Mar 10 2016 15:06 UTC
@MylesIsCool I have contacted the dev of AnimeX

this was his reply

"Hey,

have you contacted the dev yet? If so, please let him know I can adjust the plugin if there is any API in his plugin which allows me to determine which version is the player connecting with.

~kangarko "

Myles
@MylesIsCool
Mar 10 2016 15:07 UTC
I'd prefer just to patch it for all plugins using wither bars
ridalarry
@ridalarry
Mar 10 2016 15:07 UTC
its still bugged for now
Myles
@MylesIsCool
Mar 10 2016 15:08 UTC
When I'm back at PC I'll look into it if lenis doesn't beat me
ridalarry
@ridalarry
Mar 10 2016 15:09 UTC
ok cool
File14
@File14
Mar 10 2016 15:10 UTC
Hello
File14 is here ;3
lenis0012
@lenis0012
Mar 10 2016 15:11 UTC
hehe
lenis0012
@lenis0012
Mar 10 2016 15:18 UTC
fixeeed
allthough i cant test because i dont have AnimeX
ridalarry
@ridalarry
Mar 10 2016 15:19 UTC
I will test it
its not merged yet so you have to grab it from my drive
ridalarry
@ridalarry
Mar 10 2016 15:22 UTC
oh
lenis0012
@lenis0012
Mar 10 2016 15:25 UTC
does it work?
ridalarry
@ridalarry
Mar 10 2016 15:26 UTC
one min
working but
it keep resetting the boss health
lenis0012
@lenis0012
Mar 10 2016 15:30 UTC
whats the log output?
@ridalarry
ridalarry
@ridalarry
Mar 10 2016 15:31 UTC
in console?
lenis0012
@lenis0012
Mar 10 2016 15:31 UTC
yes
it should spam a lot of messages
ridalarry
@ridalarry
Mar 10 2016 15:31 UTC
1 min i will relog
nothing
lenis0012
@lenis0012
Mar 10 2016 15:32 UTC
oh we already removed the debug
ridalarry
@ridalarry
Mar 10 2016 15:33 UTC
Thank you so much for this fix
run that version and show the console messages
I think its the plugin
ridalarry
@ridalarry
Mar 10 2016 15:35 UTC
ok sure
300 and 0
lenis0012
@lenis0012
Mar 10 2016 15:37 UTC
300 is wither max health
0 is min health
i think your plugin is acting a little weird
ridalarry
@ridalarry
Mar 10 2016 15:38 UTC
how do I turn of the debug?
or I need to download another version?
lenis0012
@lenis0012
Mar 10 2016 15:39 UTC
not
ridalarry
@ridalarry
Mar 10 2016 15:39 UTC
not?
there
use that one for now
theres nothing i can do about the bug you're having
at least it works now :)
ridalarry
@ridalarry
Mar 10 2016 15:41 UTC
Thank you again
lenis0012
@lenis0012
Mar 10 2016 15:45 UTC
@ridalarry actually
i think i got a fix
edit config.yml
set bossbar-anti-flicker to true
tell me if it works
ridalarry
@ridalarry
Mar 10 2016 15:46 UTC
ok
lenis0012
@lenis0012
Mar 10 2016 15:47 UTC

so paste this at the bottom of your config:

bossbar-anti-flicker: true

ridalarry
@ridalarry
Mar 10 2016 15:49 UTC
fixed
you are the best
is there a command to reload config?
as my config only has 2 options
lenis0012
@lenis0012
Mar 10 2016 15:50 UTC
delete and restart server
lol
ridalarry
@ridalarry
Mar 10 2016 15:59 UTC
lol
ridalarry
@ridalarry
Mar 10 2016 16:08 UTC
my server crashed
lenis0012
@lenis0012
Mar 10 2016 16:09 UTC
oh
any errors?
ridalarry
@ridalarry
Mar 10 2016 16:09 UTC
1 min
not sure if its related to it
but its the only bug i got
lenis0012
@lenis0012
Mar 10 2016 16:14 UTC
looks like your plot plugin
maybe a db timeout
ridalarry
@ridalarry
Mar 10 2016 16:17 UTC
actually it seems like its my wifi xD
cuz when I crashed I pressed restart and when I went to the log that was the only error
Myles
@MylesIsCool
Mar 10 2016 16:21 UTC
Am I cool to roll out boss bars & the new chunk handler?
I'll just roll it out :P
lenis0012
@lenis0012
Mar 10 2016 16:23 UTC
@MylesIsCool Well i do have one more change ready to PR
Myles
@MylesIsCool
Mar 10 2016 16:23 UTC
Is it the one I just pulled?
lenis0012
@lenis0012
Mar 10 2016 16:24 UTC
nah
Myles
@MylesIsCool
Mar 10 2016 16:24 UTC
Oh? what is it :O?
lenis0012
@lenis0012
Mar 10 2016 16:24 UTC
its a config update
adding all new values to the config.yml
without removing the comments or current values
Myles
@MylesIsCool
Mar 10 2016 16:24 UTC
Ah okay
lenis0012
@lenis0012
Mar 10 2016 16:25 UTC
its pretty neat
bukkit's config system doesn't support option-based comments
so i wrote my own parser
Myles
@MylesIsCool
Mar 10 2016 16:30 UTC
Sounds cool, poke me when you PR
lenis0012
@lenis0012
Mar 10 2016 16:41 UTC
@MylesIsCool cone
Myles
@MylesIsCool
Mar 10 2016 16:48 UTC
Really nice work @lenis0012 <3
lenis0012
@lenis0012
Mar 10 2016 16:48 UTC
:)
Myles
@MylesIsCool
Mar 10 2016 16:52 UTC
0.6.3 is now out https://www.spigotmc.org/resources/viaversion.19254/ Thanks @lenis0012
Hugo Kerstens
@hugokerstens
Mar 10 2016 16:53 UTC
Nice! :D
Just got back from work
lenis0012
@lenis0012
Mar 10 2016 17:14 UTC
woooh
now just the chunk issue
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:16 UTC
Okay I created a packet cacher, but for some reason even with 1 player online it says it sends the same packets over and over
Is this normal?
lenis0012
@lenis0012
Mar 10 2016 17:17 UTC
packet cacher?
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:19 UTC
It caches transformed packets, and checks if this packet has been transformed before, if so it takes it from the cache
So if you have multiple players receiving the same packets it won't have to waste resources on transforming it twice
lenis0012
@lenis0012
Mar 10 2016 17:20 UTC
its pretty rare for packets to be exactly the same tho
only the smallest ones are
like keepAlive
actually
its not that bad
anyway
pretty much no packets are exactly the same if theres only one player online
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:21 UTC
Yeah I use hashcodes to identify bytebufs, is that wrong?
Because according to the hashcodes loads of packets are the same
Everything still works though
lenis0012
@lenis0012
Mar 10 2016 17:22 UTC
how are you identifying them
send a gist or pastebin
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:22 UTC
just input.hashcode()
And a hashmap with a limited size
lenis0012
@lenis0012
Mar 10 2016 17:24 UTC
what why would you use a hashmap?
use guava caches
ChacheBuilder.newBuilder().x.y.build()
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:24 UTC
Yeah sorry I'm not that advanced, I'm not even following any computer science course or whatever
But thanks for your help, will look into it ;)
lenis0012
@lenis0012
Mar 10 2016 17:26 UTC
Cache<Integer, Object> cache = CacheBuilder.newBuilder().expireAfterAccess(30L, TimeUnit.SECONDS).maximumSize(1500L).build();
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:26 UTC
Thanks ;) Will update my code
Guava is from Google right? Is it already in our dependencies?
Ah yeah it is
lenis0012
@lenis0012
Mar 10 2016 17:27 UTC
its a dependency in bukkit
since 1.8 spigot updated it to Guava 17.0
1.7 and under use Guava 11
which is deprecated
but anyway
im not sure if using hashCode on ByteBuf is a good idea
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:29 UTC
Yeah because the hashcode is a lot smaller than the actual content
lenis0012
@lenis0012
Mar 10 2016 17:29 UTC
well obviously
its an integer
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:29 UTC
So there could be an occurence of two packets with the same hashcode
lenis0012
@lenis0012
Mar 10 2016 17:30 UTC
yea but i dont think the hash code is consistent on buffers
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:30 UTC
What would you recommend using then? .equals for 100+ objects is quite performance heavy
nah you're fine
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:34 UTC
Yeah I looked it up indeed, but still there could be an occurence of the same hashcode
lenis0012
@lenis0012
Mar 10 2016 17:34 UTC
true
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:34 UTC
But that's the same for example hashes of passwords of 32+ characters in length
lenis0012
@lenis0012
Mar 10 2016 17:35 UTC
packets are much larger than passwords tho
You could perform a hashing algorithm on the packet data
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:35 UTC
Yeah and the hashcodes are even smaller than hashes, so the odds are much larger
Yeah but a hashing algorithm could be almost as heavy as the transforming itself xd Most of the transforming is just input.readInt writeVarint(output for example
lenis0012
@lenis0012
Mar 10 2016 17:36 UTC
or you could do a byte + int
packed into a long
packetID & hashcode
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:36 UTC
Yeah that would be a good idea, let me fix my git and I'll start working on it :D
but the packetid is an integer right?
lenis0012
@lenis0012
Mar 10 2016 17:37 UTC
it is actually
which isn't a problem
public static long toLong(int msw, int lsw) {
return ((long)msw << 32) + (long)lsw - -2147483648L;
}
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:38 UTC
Okay that would work ;)
lenis0012
@lenis0012
Mar 10 2016 17:38 UTC
copied straight from craftbukkit lol
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:38 UTC
Ughh how do you force to cancel a merge in git?
or how do I confirm a merge
lenis0012
@lenis0012
Mar 10 2016 17:39 UTC
?
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:39 UTC
Well I want to switch from branch, but I need to merge a file first, I'll just google it xd
lenis0012
@lenis0012
Mar 10 2016 17:40 UTC
ok
im heading to the snackbar
later
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:40 UTC
Enjoy your meal ;)
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:52 UTC
So still with 1 player online there is a lot of packets being get from the cache, but it works I guess :D
Mats
@Matsv
Mar 10 2016 17:54 UTC
Awesome, but are you ignoring some packets? Like move? That'll reach 100 in a few seconds @HugoDaBosss
Myles
@MylesIsCool
Mar 10 2016 17:55 UTC
I'd like to indicate hashcodes are not good
I once had a friend use them for encrypting passwords (which is really bad)
I wrote a program to calculate alternative passwords
It's like the password cat could be broken by something like h2g
(that example doesn't work dw)
But they have alot of collisions
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:56 UTC
Yeah but I combine them with the packet id @MylesIsCool
Yeah, but the cache expires in 1 second, so the chances are very very small
UUID.randomUUID() could return the same uuid as well
Myles
@MylesIsCool
Mar 10 2016 17:56 UTC
Then what's the point of caching?
You waste more time calculating hashcodes and checking
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:57 UTC
I'll do some timings with and without
Myles
@MylesIsCool
Mar 10 2016 17:57 UTC
The slowest part of our code is reflection
Hugo Kerstens
@hugokerstens
Mar 10 2016 17:58 UTC
Well it's more for example the same packets being sent to multiple clients, for example block change packets, player animations and stuff
lenis0012
@lenis0012
Mar 10 2016 17:59 UTC
@MylesIsCool I can improve the performance of the reflection
Myles
@MylesIsCool
Mar 10 2016 17:59 UTC
Of course it can be improved, a lot of the code could be stored in a class called ReflectionConstants so we're not constantly requesting things from the class pool
lenis0012
@lenis0012
Mar 10 2016 17:59 UTC
fields actually shouldn't be generated on runtime
yeah that lol
Myles
@MylesIsCool
Mar 10 2016 18:00 UTC
I mean there's no really really big issue cause the amount you save is not relatively that much considering how fast processors and things are, you can if you want
lenis0012
@lenis0012
Mar 10 2016 18:00 UTC
I think performance isn't the biggest issue
1) network threads run async
2) its a protocol hack
Its more important to fix the bugs
Myles
@MylesIsCool
Mar 10 2016 18:01 UTC
yep ;)
lenis0012
@lenis0012
Mar 10 2016 18:03 UTC
ill be looking into the chunks thing tomorrow if it isn't fixed yet
Hugo Kerstens
@hugokerstens
Mar 10 2016 18:05 UTC
Okay I'm stupid, netty threads aren't shown in timings right?
lenis0012
@lenis0012
Mar 10 2016 18:05 UTC
yeah
they aren't
Myles
@MylesIsCool
Mar 10 2016 18:05 UTC
The easiest way is to use System.nanoTime() or what
or use a java profiler
;)
Hugo Kerstens
@hugokerstens
Mar 10 2016 18:06 UTC
I'm going to have dinner, will do some more testing when I get back
HugoDaBosss/ViaVersion@a7eadb1
fillefilip8
@fillefilip8
Mar 10 2016 18:37 UTC
@MylesIsCool check my pull request?
Hugo Kerstens
@hugokerstens
Mar 10 2016 19:13 UTC
What java profiler would you recommend @MylesIsCool ?
fillefilip8
@fillefilip8
Mar 10 2016 19:27 UTC
FilleProfiler.exe (jk)
@HugoDaBosss
Hugo Kerstens
@hugokerstens
Mar 10 2016 19:35 UTC
Yeah but there are dozens of them x.x
Myles
@MylesIsCool
Mar 10 2016 19:41 UTC
I use YourKit but that's cause I have a license
(from other open sauce plugins)
VisualVM works fine i hear
pretty sure your fix mat won't fix issue
I believe the issue is bungee stores teams across servers
Mats
@Matsv
Mar 10 2016 19:43 UTC
It does remove it on server change right?
Myles
@MylesIsCool
Mar 10 2016 19:44 UTC
Well when it does I looked into code and thought I fixed it when I moved the main code to Join Game packet
Mats
@Matsv
Mar 10 2016 19:44 UTC
Because with plugins like 'NameManager' the create team get somehow activated twice, and you'll get kicked
Myles
@MylesIsCool
Mar 10 2016 19:44 UTC
I'll still merge it
Mats
@Matsv
Mar 10 2016 19:46 UTC
Why does Bungeecord even store teams?
For the tablist?
Myles
@MylesIsCool
Mar 10 2016 19:46 UTC
no idea
why is there only 4 bugs
:'(
where did they all go
my children
Mats
@Matsv
Mar 10 2016 19:48 UTC
Yeah it sucks I don't know what to do :P
Hugo Kerstens
@hugokerstens
Mar 10 2016 19:48 UTC
You can still visit them as a distant memory in the closed section...
lenis0012
@lenis0012
Mar 10 2016 19:49 UTC
@MylesIsCool where they went?
:)
Myles
@MylesIsCool
Mar 10 2016 19:49 UTC
I guess to some extent we start planning how we change viaversion from being a tool for 1.8 -> 1.9 to being a tool for every version, and designing an API which makes it easy to remap packets intercept when necessary and possibly developing tools to speed up the process :)
lenis0012
@lenis0012
Mar 10 2016 19:50 UTC
and while we are add it add 1.7 support?
lol
Myles
@MylesIsCool
Mar 10 2016 19:50 UTC
ew 1.8
*1.7
we don't wanna copy protocolsupport ;)
lenis0012
@lenis0012
Mar 10 2016 19:59 UTC
never heard of it
Myles
@MylesIsCool
Mar 10 2016 19:59 UTC
it ports like
1.5, 1.6, 1.7, 1.8 to 1.9 lol
lenis0012
@lenis0012
Mar 10 2016 19:59 UTC
but where does it run on?
Myles
@MylesIsCool
Mar 10 2016 19:59 UTC
but you need to have 1.9 server
bukkit ofc
lenis0012
@lenis0012
Mar 10 2016 19:59 UTC
ah
that sucks
Ryan James
@rj0495
Mar 10 2016 19:59 UTC
Umm Guys the sign bug is back
lenis0012
@lenis0012
Mar 10 2016 19:59 UTC
sign bug?
Myles
@MylesIsCool
Mar 10 2016 20:00 UTC
i'm blaming lenis
he touched chunks
Ryan James
@rj0495
Mar 10 2016 20:00 UTC
Signs are blank
lenis0012
@lenis0012
Mar 10 2016 20:00 UTC
thats impossible
Ryan James
@rj0495
Mar 10 2016 20:00 UTC
Test for yourself
lenis0012
@lenis0012
Mar 10 2016 20:00 UTC
hang on 1 sec
Ryan James
@rj0495
Mar 10 2016 20:00 UTC
We had this problem before
Myles
@MylesIsCool
Mar 10 2016 20:00 UTC
@rj0495 works for me fine
I'm running it on my server fine
Ryan James
@rj0495
Mar 10 2016 20:01 UTC
Ok set a sign 50 blocks from where you are
Then walk back and quit
Then rejoin and look at the sign
It's blank
lenis0012
@lenis0012
Mar 10 2016 20:02 UTC
its fine for me
Ryan James
@rj0495
Mar 10 2016 20:02 UTC
What version?
Myles
@MylesIsCool
Mar 10 2016 20:02 UTC
I agree with @lenis0012 seeing no issues
Ryan James
@rj0495
Mar 10 2016 20:02 UTC
1 second
lenis0012
@lenis0012
Mar 10 2016 20:03 UTC
i even tried to fly out of view distance
still working fine
both sign posts and wall signs
Ryan James
@rj0495
Mar 10 2016 20:03 UTC
You need to quit and rejoin
lenis0012
@lenis0012
Mar 10 2016 20:03 UTC
I did
obviously
Ryan James
@rj0495
Mar 10 2016 20:04 UTC
Ill make a gif now
lenis0012
@lenis0012
Mar 10 2016 20:04 UTC
besides
all i changed is splitting chunk bulks up before they reach the decoder
if anything that makes it better
Myles
@MylesIsCool
Mar 10 2016 20:05 UTC
Could you post your tps rj
./tps
Ryan James
@rj0495
Mar 10 2016 20:05 UTC
1 sec
lenis0012
@lenis0012
Mar 10 2016 20:05 UTC
initially it broke because of sync-chunk
Ryan James
@rj0495
Mar 10 2016 20:05 UTC
20
TPS
lenis0012
@lenis0012
Mar 10 2016 20:05 UTC
meaning that the chunks were being sent after the signs
causing the client to not load the signs properly
now its loaded sync but not delayed
like it should be
Relogging
While standing next to signs
Hugo Kerstens
@hugokerstens
Mar 10 2016 20:08 UTC
Btw, the most heavy thing in our transformer right now is the finding the PacketType for the old packet id....
Myles
@MylesIsCool
Mar 10 2016 20:08 UTC
What plugins do you use?
it's not too heavy hugo runs
lenis0012
@lenis0012
Mar 10 2016 20:09 UTC
you can easily make that faster
just map it
Hugo Kerstens
@hugokerstens
Mar 10 2016 20:09 UTC
Yeah indeed
lenis0012
@lenis0012
Mar 10 2016 20:09 UTC
but i doubt it makes much of a difference
Hugo Kerstens
@hugokerstens
Mar 10 2016 20:10 UTC
It is on average 1/3 of the transform time, so any improvements are welcome
Myles
@MylesIsCool
Mar 10 2016 20:10 UTC
But transform time is low
you realise I optimised our operations other day right?
Hugo Kerstens
@hugokerstens
Mar 10 2016 20:11 UTC
Yeah I know, but still
That's the signs after relog and spawning next to them
Myles
@MylesIsCool
Mar 10 2016 20:12 UTC
rj can you answer my question, "What plugins do you use?"
Hugo Kerstens
@hugokerstens
Mar 10 2016 20:12 UTC
Oh wait it's even more than 1/3, because 1/5 right now is the printing in my debug version, so 3/7 is for the packet finding
Ryan James
@rj0495
Mar 10 2016 20:12 UTC
A Load. I'll disable cosmetic things
sign posts and walll signs working on all angles
Ryan James
@rj0495
Mar 10 2016 20:14 UTC
What plugins you running?
lenis0012
@lenis0012
Mar 10 2016 20:14 UTC
ViaVersion & Essentials
v0.6.3
do /ver ViaVersion
Ryan James
@rj0495
Mar 10 2016 20:14 UTC
I am 0.6.3
lenis0012
@lenis0012
Mar 10 2016 20:15 UTC
minecraft is trolling you
try to downgrade
to 0.6.1
Myles
@MylesIsCool
Mar 10 2016 20:15 UTC
it's herobrine!
lenis0012
@lenis0012
Mar 10 2016 20:15 UTC
see if it still happens
Ryan James
@rj0495
Mar 10 2016 20:16 UTC
Doesn't happen there
lenis0012
@lenis0012
Mar 10 2016 20:16 UTC
thats so unlikely
how do you know
please just try
my brain will implode if that change actually caused the bug
Myles
@MylesIsCool
Mar 10 2016 20:17 UTC
prepares for implosion
Ryan James
@rj0495
Mar 10 2016 20:18 UTC
Ok I am going to retest again
Ok. So it all works there
Ryan James
@rj0495
Mar 10 2016 20:24 UTC
Now with 0.6.3 I have invisible signs
lenis0012
@lenis0012
Mar 10 2016 20:26 UTC
...
Ryan James
@rj0495
Mar 10 2016 20:26 UTC
I am going to try 1 more thing
lenis0012
@lenis0012
Mar 10 2016 20:26 UTC
Why can I not reproduce
Hugo Kerstens
@hugokerstens
Mar 10 2016 20:26 UTC
Wow Herobrine is definitely back...
Myles
@MylesIsCool
Mar 10 2016 20:27 UTC
I think it's either TPS issue or plugin issue
lenis0012
@lenis0012
Mar 10 2016 20:27 UTC
What plugins do you have
Ryan James
@rj0495
Mar 10 2016 20:27 UTC
I am going to try with 0.6.3
But with the full plugin dir
lenis0012
@lenis0012
Mar 10 2016 20:28 UTC
Full plugin dir?
Ryan James
@rj0495
Mar 10 2016 20:29 UTC
I use Protocollib and I think that is causing the issue
Myles
@MylesIsCool
Mar 10 2016 20:30 UTC
I've got it on my server and it works fine shrug
Ryan James
@rj0495
Mar 10 2016 20:30 UTC
What version of Protocollib?
lenis0012
@lenis0012
Mar 10 2016 20:31 UTC
Try with just essentials and via
If that works
Myles
@MylesIsCool
Mar 10 2016 20:31 UTC
the one made for 1.8?
3.6.3-SNAPSHOT
lenis0012
@lenis0012
Mar 10 2016 20:31 UTC
List all plugins that utilise protocollib
Ryan James
@rj0495
Mar 10 2016 20:32 UTC
BlockParticles, Vehicles, PlugMan, Pixelator, ViaVersion, HideStream, AsyncWorldEditInjector, CoreProtect, MinecraftMarket, FrameProtect, WorldEdit, NoRain, CustomEnderChest, Essentials, Decorations, Frame_Protector, NoCheatPlus, AsyncWorldEdit, CommandRun, EssentialsChat, PermissionsEx, CustomJoinItems, ForceEC, Vault, BKCommonLib, WorldGuard, BlockHider, PlayEffect, ArmorStandTools, NoFlyZone
That's the plugin list + Protlib
lenis0012
@lenis0012
Mar 10 2016 20:32 UTC
which ones utilise protocollib
wait you have BKCommonLib installed?
Myles
@MylesIsCool
Mar 10 2016 20:33 UTC
try without BKCommonLib?
Ryan James
@rj0495
Mar 10 2016 20:34 UTC
I will try now
I haven't had a issue with BKCommonLib before. But it bugs out with Protlib enabled
lenis0012
@lenis0012
Mar 10 2016 20:36 UTC
i maintained BKCommonLib for 2 years
took it over from my friend bergerkiller
I made 1.6 and 1.7 support
im honestly surprised someone updated it to 1.8
Ryan James
@rj0495
Mar 10 2016 20:37 UTC
I am using this one for 1.8
BlockParticles, Vehicles, PlugMan,Pixelator, ViaVersion, HideStream, AsyncWorldEditInjector, CoreProtect, MinecraftMarket, FrameProtect, WorldEdit, NoRain, CustomEnderChest, Essentials, Frame_Protector, ProtocolLib, LibsDisguises, NoCheatPlus, AsyncWorldEdit, EssentialsChat, PermissionsEx, CustomJoinItems, ForceEC, Vault, BKCommonLib, HideAndCustomPlugins, WorldGuard, BlockHider, Achievements, EssentialsSpawn, WirelessRedstone, TitleManager, ChatManagerReloaded, Citizens, Train_Carts, ArmorStandTools, NoFlyZone
Please can you guys tell me which ones are using Protocollib
lenis0012
@lenis0012
Mar 10 2016 20:38 UTC
disable protocollib
join server
type /pl
look at red names
:P
Ryan James
@rj0495
Mar 10 2016 20:40 UTC
Ok :P
Nothing has turned red
LibsDisguises, BlockHider That is all I believe
Hugo Kerstens
@hugokerstens
Mar 10 2016 20:44 UTC
Does anyone have any idea why this doesn't work?
HugoDaBosss/ViaVersion@4908bc7
I think it returns the wrong PacketType, because when I use it it throws all kinds of readerindex errors in outgoingtransformer
Ryan James
@rj0495
Mar 10 2016 20:49 UTC
@lenis0012 I cannot seem to find the issue
Because it works fine in 0.6.1
lenis0012
@lenis0012
Mar 10 2016 20:49 UTC
try with onyl essentials and via
does that work?
Ryan James
@rj0495
Mar 10 2016 20:52 UTC
1 second then
Works fine there
So it's protocollib
Even though it worked 2 versions back
Hugo Kerstens
@hugokerstens
Mar 10 2016 21:17 UTC
Okay Java's got to be trolling me right now....
lenis0012
@lenis0012
Mar 10 2016 21:19 UTC
I KNOW IT
why its not working
Myles
@MylesIsCool
Mar 10 2016 21:19 UTC
hm
it it cause maybe prot lib installs their own handlers?
;)
Ryan James
@rj0495
Mar 10 2016 21:19 UTC
Why??
test please :)
Ryan James
@rj0495
Mar 10 2016 21:21 UTC
1 moment then I need to start my computer
What did you change?
Myles
@MylesIsCool
Mar 10 2016 21:22 UTC
i'm excited ^^
lenis0012
@lenis0012
Mar 10 2016 21:24 UTC
oh wait
oops
let me quick fix
Ryan James
@rj0495
Mar 10 2016 21:24 UTC
Ok
Myles
@MylesIsCool
Mar 10 2016 21:24 UTC
You able to say what you assume the fix is @lenis0012
@MylesIsCool the sign issue
see currently the order is this
channel.writeAndFlush -> chunk_handler -> packet_handler -> encoder -> ect.
should be
channelwriteAndFlush -> packet_handler -> chunk_handler -> encoder -> ect.
we're splitting the packet before it reaches the listener
Ryan James
@rj0495
Mar 10 2016 21:28 UTC
Just grabbing all the plugins I was testing with earlier
lenis0012
@lenis0012
Mar 10 2016 21:28 UTC
ok
Ryan James
@rj0495
Mar 10 2016 21:30 UTC
ok testing now.
I think the issue is fixed!
lenis0012
@lenis0012
Mar 10 2016 21:35 UTC
im a wizard
Myles
@MylesIsCool
Mar 10 2016 21:36 UTC
is the code change just repositioning the handler?
lenis0012
@lenis0012
Mar 10 2016 21:36 UTC
yup
socketChannel.pipeline().addAfter("encoder", "viaversion_chunk_handler", chunkHandler);
Myles
@MylesIsCool
Mar 10 2016 21:36 UTC
lel
thanks lenis ;)
lenis0012
@lenis0012
Mar 10 2016 21:37 UTC
NO
YOU WONT
</3
Myles
@MylesIsCool
Mar 10 2016 21:38 UTC
what's wrong lenis :(
lenis0012
@lenis0012
Mar 10 2016 21:38 UTC
lol nothing
commit it
or i can PR
Ryan James
@rj0495
Mar 10 2016 21:38 UTC
I need to try 1 more thing
ok Protocol lib is still causing the issue
Myles
@MylesIsCool
Mar 10 2016 21:39 UTC
rip
lenis0012
@lenis0012
Mar 10 2016 21:43 UTC
rio
rip
Ryan James
@rj0495
Mar 10 2016 21:50 UTC
It is definitely to do with ProtocolLib
Myles
@MylesIsCool
Mar 10 2016 21:50 UTC
I mean the hacky soluton
*solution
is prolonging all the sign packets in the netty eventloop scheduler
;)
lenis0012
@lenis0012
Mar 10 2016 21:52 UTC
but why would it send the sign packets before the chunk ones
it makes no sense
Myles
@MylesIsCool
Mar 10 2016 21:52 UTC
shrug
lenis0012
@lenis0012
Mar 10 2016 21:56 UTC
wasn't it that chunks had a lower priority or something?
could that be it?
Myles
@MylesIsCool
Mar 10 2016 21:56 UTC
hmhm?
lenis0012
@lenis0012
Mar 10 2016 21:56 UTC
you have a low priority and high priority queue
i think
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:10 UTC
Optimized packet searching by > 4x :D
One question though, when Java is searching for a key in a hashmap, and the key is a Long, does it always check all bytes, or does it go to the next one as soon as it reads a byte which doesn't match?
Myles
@MylesIsCool
Mar 10 2016 22:12 UTC
in a hashmap
it compares hashcodes
tbh we should use BiMaps really haha
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:13 UTC
Hmm so the order I bitshift values into a long doesn't really matter?
Is this okay?
Myles
@MylesIsCool
Mar 10 2016 22:16 UTC
why are they longs
lenis0012
@lenis0012
Mar 10 2016 22:17 UTC
im wondering the same thing
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:17 UTC
What's wrong? You could make it an int, but it would break a lot faster with larger numbers
Should I combine those 3 values in 1 int?
lenis0012
@lenis0012
Mar 10 2016 22:18 UTC
if it fits
which i think it does
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:19 UTC
It could fit, 1 bit for the direction, 2 for the state, and 8 for the id
lenis0012
@lenis0012
Mar 10 2016 22:20 UTC
so it would fit in a short
then use short
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:20 UTC
Oh wow sorry, had in my mind short is 8 bit xd But short is 16, int 32, long 64
right?
lenis0012
@lenis0012
Mar 10 2016 22:21 UTC
yea
Myles
@MylesIsCool
Mar 10 2016 22:22 UTC
might aswell just use a bimap ayoo
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:22 UTC
Let me check on Bimap
What would be the advantage?
We are only checking for the keys, never for the values
Would this be right?
return (short) ((id << 8) | ((direction << 4) & 0xFF) | state & 0xFF);
Myles
@MylesIsCool
Mar 10 2016 22:26 UTC
bitwise is just so ugly puke puke
:D
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:27 UTC
Yeah I hate it xd But I never really looked into it
So I'm just combining what I see :)
Myles
@MylesIsCool
Mar 10 2016 22:28 UTC
to be honest bungee works by just a simple integer array
shrug
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:29 UTC
We can do better than that! :D
Myles
@MylesIsCool
Mar 10 2016 22:29 UTC
wait
why dont we just use a byte array
:|
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:30 UTC
A byte array as a key?
Myles
@MylesIsCool
Mar 10 2016 22:31 UTC
byte[] incoming = new byte[xyz];
byte[] outgoing = new byte[xyz];
not a lot of overhead ;)
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:32 UTC
I don't get it xd Where would you use this?
Myles
@MylesIsCool
Mar 10 2016 22:32 UTC
so then you'd have this
PacketType getIncomingPacket(int id) {
return PacketType.values()[incoming[id]];
}
maybe
idk
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:33 UTC
Yeah but we still have to deal with the states
Myles
@MylesIsCool
Mar 10 2016 22:33 UTC
tbh states should just be in seperate sub classes or what
PacketType.Play.XYZ
design decisions
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:34 UTC
Yeah, but as long as we don't release an API we can change that
Myles
@MylesIsCool
Mar 10 2016 22:34 UTC
this is when you realise, the whole system could be redesigned
haha
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:35 UTC
Yeah that would fix a lot of things
Myles
@MylesIsCool
Mar 10 2016 22:35 UTC
we could just use final static's instead of enums
hmmhmh
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:36 UTC
Yeah but how would we handle the new/old packet id?
Myles
@MylesIsCool
Mar 10 2016 22:36 UTC
public static final MAP_CHUNK_BULK = new PacketType(0x00, 0x01);
hm good point
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:36 UTC
And we should prepare for more versions, like 3 or 4 different versions
Myles
@MylesIsCool
Mar 10 2016 22:36 UTC
well it's all eventually gonna get rewritten
evil laugh
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:37 UTC
But for now, just everything in 1 short?
Myles
@MylesIsCool
Mar 10 2016 22:38 UTC
I don't think bungee do it bad
then again they don't use enums of what :T
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:39 UTC
Yeah that supportedVersions list is smart
easily expandable for more versions
Myles
@MylesIsCool
Mar 10 2016 22:40 UTC
k i got it
look pro
wait i forgot
my bad lemme open intellij
as an example ofc array sizes etc are wrong
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:47 UTC
Ohh sour packet ;)
Myles
@MylesIsCool
Mar 10 2016 22:48 UTC
that way at static run time
you don't do it in constructor
but you compile all the enums into byte arrays
and it's glorius mwhaha
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:48 UTC
Yeah that would work ;)
Myles
@MylesIsCool
Mar 10 2016 22:48 UTC
it's rather minimal as well
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:48 UTC
But then we would need a seperate constructor for incoming packets
Myles
@MylesIsCool
Mar 10 2016 22:48 UTC
well you don't do it in the constructor
you more od it like
*do

static {
for(NewPacket p : values()){
add to incoming etc
}

}

sorry no pastebin cause meh
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:49 UTC
Yeah I get it ;)
But I really gotta go now, parents meh
Myles
@MylesIsCool
Mar 10 2016 22:49 UTC
I mean the issue is the 2nd dimension of the array could be made too big hm :(
see you hugo ;) have fun
Hugo Kerstens
@hugokerstens
Mar 10 2016 22:50 UTC
Yeah, 'fun', but cya :D
Myles
@MylesIsCool
Mar 10 2016 22:57 UTC
Gonna goto bed aha, good work today @lenis0012 <3
lenis0012
@lenis0012
Mar 10 2016 23:09 UTC
yay
:)