These are chat archives for MylesIsCool/ViaVersion

26th
Mar 2016
Myles
@MylesIsCool
Mar 26 2016 00:03 UTC
There is a proper cache builder for some things yeah
but it's generally based on time
:)
Hugo Kerstens
@hugokerstens
Mar 26 2016 00:05 UTC
Yeah that's what I want ;) But the google guava cache is for HashMaps
I want one for arrays...
But I found some sort of solution
Hugo Kerstens
@hugokerstens
Mar 26 2016 00:26 UTC
I'm working on a fix for #199
It's almost working, just some small position conversions which are wrong xd
Myles
@MylesIsCool
Mar 26 2016 00:39 UTC
<3
Myles
@MylesIsCool
Mar 26 2016 12:33 UTC
You can now use http://myles.us/ViaVersion/ViaVersion-0.7.0-ALPHA-3.jar for the latest alpha, it fixes an issue with items which aren't in bukkits material db
Hugo Kerstens
@hugokerstens
Mar 26 2016 13:26 UTC
int x = -20;
Math.floor(x/8);
WHY does this return -2.0
I'm so fucking done with minecraft coordinates
Myles
@MylesIsCool
Mar 26 2016 13:28 UTC
what
-20 / 8 is -2.5
round down is -2?
Hugo Kerstens
@hugokerstens
Mar 26 2016 13:29 UTC
-3.0 is smaller than -2.0
Myles
@MylesIsCool
Mar 26 2016 13:29 UTC
oh
use 8.0
instead of 8
;)
Hugo Kerstens
@hugokerstens
Mar 26 2016 13:30 UTC
Does java seriously consider (x/8) as an integer?
Yeah it's working now I guess.... Thanks @MylesIsCool ;)
There is still one small bug, if you place blocks on plants you will hear a double sound because the block doesn't go where I suspect it to go....
Then it will be placed at the location of the plant you clicked, not next to it
Hugo Kerstens
@hugokerstens
Mar 26 2016 13:53 UTC
If I use a bukkit listener, it doesn't always work, but like 95% of the time
Hugo Kerstens
@hugokerstens
Mar 26 2016 14:27 UTC
#275 @MylesIsCool
Myles
@MylesIsCool
Mar 26 2016 14:28 UTC
1 issue
otherwise good job on using api
needs to be
if(plugin.isPorted(e.getPlayer())) {
after
UserConnection userConnection = ((ViaVersionPlugin) ViaVersion.getInstance()).getConnection(player);
if (userConnection == null) return;
if (!userConnection.get(ProtocolInfo.class).getPipeline().contains(Protocol1_9TO1_8.class)) return;
etc
needs to ensure that it's got the 1.9.1 to 1.8.1 in pipeline
:)
Hugo Kerstens
@hugokerstens
Mar 26 2016 14:30 UTC
Oh yeah, forgot about that
But isPorted is deprecated now? Or does it still contain all modified players
Nvm
Myles
@MylesIsCool
Mar 26 2016 14:33 UTC
use both
just for speed
haha
Hugo Kerstens
@hugokerstens
Mar 26 2016 14:34 UTC
Yeah but isPorted checks if it contains right?
Myles
@MylesIsCool
Mar 26 2016 14:34 UTC
yeah
so contains
then use
you dont need to check for null then
Hugo Kerstens
@hugokerstens
Mar 26 2016 14:34 UTC
So if you then use get, you would have to iterate twice? Or am I wrong
Myles
@MylesIsCool
Mar 26 2016 14:35 UTC
show me?
Hugo Kerstens
@hugokerstens
Mar 26 2016 14:35 UTC
How does containsKey work? It iterates through all values and returns true as soon as there is a match right?
Myles
@MylesIsCool
Mar 26 2016 14:36 UTC
Do you understand how a map works
and why it's fast
Maps work by using the .hashcode?
and it just uses array indexes
so a simple map would be
Hugo Kerstens
@hugokerstens
Mar 26 2016 14:36 UTC
No :D I never followed any programming classes, just programming ;)
Myles
@MylesIsCool
Mar 26 2016 14:37 UTC
magicArray[userConnection.hashCode()];
it doesnt search the array
it just checks the index
which is why maps are fast
Hugo Kerstens
@hugokerstens
Mar 26 2016 14:37 UTC
Oh wow learned another thing today ;) Knew they were fast but not why :D
So it's faster to first check if it contains the key, and then get it
THAN
get the key, then check if the value is null
Myles
@MylesIsCool
Mar 26 2016 14:37 UTC
That's the simple version it's a bit more complex
contains is slightly faster
Hugo Kerstens
@hugokerstens
Mar 26 2016 14:38 UTC
Ah okay, thanks ;D
Myles
@MylesIsCool
Mar 26 2016 14:38 UTC
The only difference between the real thing is
it's a 2d array
cause some things have same hash value
Hugo Kerstens
@hugokerstens
Mar 26 2016 14:39 UTC
Should be fine now then ;)
And what's the difference between a map and a hashmap? Is the only difference that it overwrites the value if it already contains the key?
Myles
@MylesIsCool
Mar 26 2016 14:41 UTC
a map is a hashmap
hashmap is an implementation of it
there are different maps
they hold the data in different ways
some can be faster for certain uses
I only tend to use hash
Hugo Kerstens
@hugokerstens
Mar 26 2016 14:42 UTC
Yeah I use hashmaps as well for most of the time
Myles
@MylesIsCool
Mar 26 2016 14:49 UTC
do we use hashmaps for enums
anywhere
Hugo Kerstens
@hugokerstens
Mar 26 2016 14:49 UTC
Yeah, I guess so, let me check
Myles
@MylesIsCool
Mar 26 2016 14:50 UTC
we should try using EnumMap
says it has better performance
Hugo Kerstens
@hugokerstens
Mar 26 2016 14:50 UTC
SoundEffect
EnumMap uses the ordinal instead of the hashcode?
Myles
@MylesIsCool
Mar 26 2016 14:51 UTC
Yeah
Hugo Kerstens
@hugokerstens
Mar 26 2016 14:51 UTC
I gtg, will be back in ~30 min, and my PR is ready
Myles
@MylesIsCool
Mar 26 2016 14:51 UTC
ty
<3
Mats
@Matsv
Mar 26 2016 17:53 UTC
Hey guys
Hugo Kerstens
@hugokerstens
Mar 26 2016 18:04 UTC
Hi :D
fillefilip8
@fillefilip8
Mar 26 2016 18:20 UTC
rip pc
installed new keyboard
and my mouse died
rip
Mats
@Matsv
Mar 26 2016 18:20 UTC
Lol how did that happen?
fillefilip8
@fillefilip8
Mar 26 2016 18:20 UTC
the mouse doesnt work
the lights shows
:D
but i cant use it
Mats
@Matsv
Mar 26 2016 18:21 UTC
Wireless mouse?
Or wired
fillefilip8
@fillefilip8
Mar 26 2016 18:21 UTC
wired
razer deathadder
chroma
it was working before i installed my razer blackwindow chroma
maybe i should restart?
Mats
@Matsv
Mar 26 2016 18:22 UTC
Yeah try to restart, and if that doesn't work, unplug and plug it again in, might need some drivers
fillefilip8
@fillefilip8
Mar 26 2016 18:24 UTC
it installed drivers
when i started the pc
i guess razer loves restarts XD
haha
i will try restart
when i have done a thing
Mats
@Matsv
Mar 26 2016 18:46 UTC
Does anyone know a good desktop app to get notifications from github?
Hugo Kerstens
@hugokerstens
Mar 26 2016 18:46 UTC
Well you could maybe install something to receive notifications from email? And enable all email notifications from github?
I don't know of any good github desktop client...
Mats
@Matsv
Mar 26 2016 18:47 UTC
Yeah, thought about that. There is a chrome extension, 'Notifier for Github' but it doesn't give notifications :worried:
Hugo Kerstens
@hugokerstens
Mar 26 2016 18:47 UTC
Ahh that's a shame
Are you sure your chrome does give any notifiactions at all? For example from whatsapp web?
Mats
@Matsv
Mar 26 2016 18:48 UTC
Well gitter gives notifications ;)
But looked at their Github page, it's not supported
(yet)?
Hugo Kerstens
@hugokerstens
Mar 26 2016 18:49 UTC
Yeah there is a development version of gitter, 'Gitter Next', but it doesn't seem to work in the desktop client
If I visit it in my browser the new gitter version works fine though
Mats
@Matsv
Mar 26 2016 18:49 UTC
Yeah saw it, I like the design of it :)
Hugo Kerstens
@hugokerstens
Mar 26 2016 18:49 UTC
But I'm not sure if gitter next supports notifications for github
Although you can see the activity, just no notifications
Mats
@Matsv
Mar 26 2016 18:50 UTC
Or I write a simple nodejs app that notify me on gitter if there is a github notification :D, they both have pretty good api's
Let me try
Hugo Kerstens
@hugokerstens
Mar 26 2016 18:51 UTC
There is a node webkit on gitter desktop client
JoshK_
@JoshTheDev
Mar 26 2016 20:43 UTC
Ermm, what happened to the description on spigot?
Myles
@MylesIsCool
Mar 26 2016 20:44 UTC
What needs doing for 0.7.0?
..
Myles
@MylesIsCool
Mar 26 2016 20:45 UTC
Oh
my account got hacked
fml
oh
JoshK_
@JoshTheDev
Mar 26 2016 20:45 UTC
that's not good
Mats
@Matsv
Mar 26 2016 20:45 UTC
Lol don't you have 2 steps verification setup?
Your profile ^
Myles
@MylesIsCool
Mar 26 2016 20:46 UTC
Yeah I got banned
I don't have 2 step
JoshK_
@JoshTheDev
Mar 26 2016 20:46 UTC
Have you emailed?
Mats
@Matsv
Mar 26 2016 20:49 UTC
:worried:, did you use that password only for spigotmc.org?
Myles
@MylesIsCool
Mar 26 2016 20:52 UTC
The pass I used I suspect was broken into like
few months back
I've never found it published online
and I use it rarely
only steam + a few other sites
but I changed steam few weeks ago
i didnt realise i used on spigot
Myles
@MylesIsCool
Mar 26 2016 20:57 UTC
I've got control of my acc back
working on restoring it all
after securing
Mats
@Matsv
Mar 26 2016 21:02 UTC
Ah nice :)
2 steps verification is a life saver :P
Myles
@MylesIsCool
Mar 26 2016 21:04 UTC
Everything should be restored
I mean tbh, i'm happy nothing further like losing the resource happened
Mats
@Matsv
Mar 26 2016 21:06 UTC
true, is it easy to delete spigot resources?
Myles
@MylesIsCool
Mar 26 2016 21:06 UTC
Not sure
but he could of done far worse
than what happened
Myles
@MylesIsCool
Mar 26 2016 22:06 UTC
Okay good news finished changing some of my passes haha
Mats
@Matsv
Mar 26 2016 22:37 UTC
Nice :)
Hugo Kerstens
@hugokerstens
Mar 26 2016 23:54 UTC
Phew close one @MylesIsCool xd
Just your account picture is not yet back https://www.spigotmc.org/members/mylescomputer.2897/