Open DefinitlyEvil opened 9 years ago
The way my plugin overcomes these problems is that I use ProtocolLib to send raw PC packets to show the player, break blocks etc. I don't like the idea of a session and player because I feel that then the player class is unneeded. Pocketmine handles packets in ther class.
On Saturday, January 3, 2015, The Evil Man notifications@github.com wrote:
- The spliiter seems correct.
- You shouldn't put chunk encoder into the FullChunkPacket.
- Check your PocketPlayer class line number 77 and 78.
- According to my research, it's not possible to make a exteral server plugin for Bukkit unless you change the Bukkit API. If you use the original API, you have to deal with a lot of problems that bukkit already done but just not open for developers, such as session management, block action management.
- Do not put session creation part into the PocketPlayer class, maybe make a PocketSession class.
- I am still looking for more.
— Reply to this email directly or view it on GitHub https://github.com/jython234/MCBridge/issues/1.
@DefinitlyEvil I know the package issue, it's fine for now, I will change it later once it works. The chunk encoder is in WholeChunk.java
@jython234 Okay, the client doesn't send break block packet when holding nothing in hand, how do you deal with this? XD
I'm confused... What do you mean?
On Saturday, January 3, 2015, The Evil Man notifications@github.com wrote:
@jython234 https://github.com/jython234 Okay, the client doesn't send break block packet when holding nothing in hand, how do you deal with this? XD
— Reply to this email directly or view it on GitHub https://github.com/jython234/MCBridge/issues/1#issuecomment-68613491.
@jython234 Client only send start-break-block when holding something. It will not send anything when start breaking block if nothing holding on hand(air).
Then how do the other clients see their hand?
On Sunday, January 4, 2015, The Evil Man notifications@github.com wrote:
@jython234 https://github.com/jython234 Client only send start-break-block when holding something. It will not send anything when start breaking block if nothing holding on hand(air).
— Reply to this email directly or view it on GitHub https://github.com/jython234/MCBridge/issues/1#issuecomment-68626955.
Btw I'm not sure if you tested my plugin, but some of my packers have weird 8 bytes before the custom packet even starts.
On Sunday, January 4, 2015, Alejandro Zeise atzeise@gmail.com wrote:
Then how do the other clients see their hand?
On Sunday, January 4, 2015, The Evil Man <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:
@jython234 https://github.com/jython234 Client only send start-break-block when holding something. It will not send anything when start breaking block if nothing holding on hand(air).
— Reply to this email directly or view it on GitHub https://github.com/jython234/MCBridge/issues/1#issuecomment-68626955.
@jython234 I just looked into code. And what weird 8 bytes? Have you checked out the packet encoder? I will look your code today in detail.
That's what's strange, I don't see anything in my code, yet it does... I suggest you grab a copy of spigot or craft bukkit and test my plugin out. Don't forget to use Wireshark.
On Sunday, January 4, 2015, The Evil Man notifications@github.com wrote:
@jython234 https://github.com/jython234 I just looked into code. And what weird 8 bytes? Have you checked out the packet encoder? I will look your code today in detail.
— Reply to this email directly or view it on GitHub https://github.com/jython234/MCBridge/issues/1#issuecomment-68654435.
@jython234 WTF, you haven't tested this plugin yet? Send me a pre-built jar please, I don't know how to build a project unless it's eclipse project. XD
And could you please post what the 8 bytes are? I will look into code to find the problem. Debugging is the most confusing and boring part of development. xD
Damn it, I can't find anywhere wrong! There must be something wrong but I just can't find it. Btw you can upload the wireshark log to the repo.
Of course, I will upload everything when I get home from school. Btw I always test my code before uploading, I just want you to see what's wrong :). You do know how to build spigot 1.8 correct? You will also need protocol lib (use google).
On Monday, January 5, 2015, The Evil Man notifications@github.com wrote:
Damn it, I can't find anywhere wrong! There must be something wrong but I just can't find it. Btw you can upload the wireshark log to the repo.
— Reply to this email directly or view it on GitHub https://github.com/jython234/MCBridge/issues/1#issuecomment-68697732.
Yea, I knew about ProtocolLib, it sends packet for you. I will wait for your upload. Btw, why don't you join my project? It's awesome to have a codemate!
@DefinitlyEvil Of course I would love to join your project, however I am not sure what I could do, and I prefer that instead of using glow stone, you create your own PC server (I could help!). I have done a bit of MCPC networking but I havnt sent any chunks before. Now I understand more, and I'm sure we could get it to work.
On Monday, January 5, 2015, The Evil Man notifications@github.com wrote:
Yea, I knew about ProtocolLib, it sends packet for you. I will wait for your uploading. Btw, why don't you join my project? It's awesome to have a codemate!
— Reply to this email directly or view it on GitHub https://github.com/jython234/MCBridge/issues/1#issuecomment-68723428.
@jython234 Actually, we don't need to know any of the MC PC networking, Glowstone handles that part. We only need to do the PE networking part. ;) And btw MCProHosting will probably sponsor me! :D
@DefinitlyEvil you are missing the point that the demand is for a cross platform server that can handle plugins that affect both platforms. Also, you did make sure that you put glow stones license in the repo right? We don't want to get DMCA'd :).
On Monday, January 5, 2015, The Evil Man notifications@github.com wrote:
@jython234 https://github.com/jython234 Actually, we don't need to know any of the MC PC networking, Glowstone handles that part. We only need to do the PE networking part. ;) And btw MCProHosting will probably sponsor me! :D
— Reply to this email directly or view it on GitHub https://github.com/jython234/MCBridge/issues/1#issuecomment-68800314.
We could also be a duo, I work on pc and you do pe! But we would still work together.
On Monday, January 5, 2015, Alejandro Zeise atzeise@gmail.com wrote:
@DefinitlyEvil you are missing the point that the demand is for a cross platform server that can handle plugins that affect both platforms. Also, you did make sure that you put glow stones license in the repo right? We don't want to get DMCA'd :).
On Monday, January 5, 2015, The Evil Man <notifications@github.com javascript:_e(%7B%7D,'cvml','notifications@github.com');> wrote:
@jython234 https://github.com/jython234 Actually, we don't need to know any of the MC PC networking, Glowstone handles that part. We only need to do the PE networking part. ;) And btw MCProHosting will probably sponsor me! :D
— Reply to this email directly or view it on GitHub https://github.com/jython234/MCBridge/issues/1#issuecomment-68800314.
Yep, I have them credits. I think everything is fine. :D
Ok, did you look at the dump I uploaded?
On Tuesday, January 6, 2015, The Evil Man notifications@github.com wrote:
Yep, I have them credits. I think everything is fine. :D
— Reply to this email directly or view it on GitHub https://github.com/jython234/MCBridge/issues/1#issuecomment-68844459.
@jython234 It's your wireshark's problem. Your data sending is fine. IPv4 packets have headers too so that 8 bytes might be IPv4 packet header.
And as for this question Then how do the other clients see their hand?
, the client sends ItemHoldPacket or something named like that which only includes the item the player holding.
@DefinitlyEvil That still doesn't answer my problem: If the client isn't holding anything, then how do the other clients know it's empty?
@jython234 Nothing=Air(ID=0) ;)
Then I can send an item hold packet (PC) and set the block to 0.
On Tuesday, January 6, 2015, The Evil Man notifications@github.com wrote:
And as for this question Then how do the other clients see their hand?, the client sends ItemHoldPacket or something named like that which only includes the item the player holding.
— Reply to this email directly or view it on GitHub https://github.com/jython234/MCBridge/issues/1#issuecomment-68880258.
You can, but client can use hacks to cheat. Such as instant break.
@DefinitlyEvil I do not see your meaning. How does an ItemHold packet allow instant break?
You can't know when did the player start breaking and you only know when did the player stop breaking, Player can cheat by sending stop break block continuely.
But how do the other servers prevent that?
On Wednesday, January 7, 2015, The Evil Man notifications@github.com wrote:
You can't know when did the player start breaking and you only know when did the player stop breaking, Player can cheat by sending stop break block continuely.
— Reply to this email directly or view it on GitHub https://github.com/jython234/MCBridge/issues/1#issuecomment-69043659.
I don't know yet, I am still trying to figure that out.
@DefinitlyEvil You can see the difference of the time between the packets depending on the block.
The spliiter seems correct.
You shouldn't put chunk encoder into the FullChunkPacket.
Check your PocketPlayer class line number 77 and 78.
According to my research, it's not possible to make a exteral server plugin for Bukkit unless you change the Bukkit API. If you use the original API, you have to deal with a lot of problems that bukkit already done but just not open for developers, such as session management, block action management.
Do not put session creation part into the PocketPlayer class, maybe make a PocketSession class.
Package name should be like 'io.github.{username}.{project}' but not just simply a software name. It's not as same as PHP development.
I am still looking for more.