alejzeis / MCBridge

A bukkit plugin to allow MCPE connections to a PC server.
GNU General Public License v2.0
3 stars 0 forks source link

Problems & Info #1

Open DefinitlyEvil opened 9 years ago

DefinitlyEvil commented 9 years ago
  1. The spliiter seems correct.
  2. You shouldn't put chunk encoder into the FullChunkPacket.
  3. Check your PocketPlayer class line number 77 and 78.
  4. 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.
  5. Do not put session creation part into the PocketPlayer class, maybe make a PocketSession class.
  6. Package name should be like 'io.github.{username}.{project}' but not just simply a software name. It's not as same as PHP development.
  7. I am still looking for more.
alejzeis commented 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:

  1. The spliiter seems correct.
  2. You shouldn't put chunk encoder into the FullChunkPacket.
  3. Check your PocketPlayer class line number 77 and 78.
  4. 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.
  5. Do not put session creation part into the PocketPlayer class, maybe make a PocketSession class.
  6. I am still looking for more.

— Reply to this email directly or view it on GitHub https://github.com/jython234/MCBridge/issues/1.

alejzeis commented 9 years ago

@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

DefinitlyEvil commented 9 years ago

@jython234 Okay, the client doesn't send break block packet when holding nothing in hand, how do you deal with this? XD

alejzeis commented 9 years ago

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.

DefinitlyEvil commented 9 years ago

@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).

alejzeis commented 9 years ago

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.

alejzeis commented 9 years ago

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.

DefinitlyEvil commented 9 years ago

@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.

alejzeis commented 9 years ago

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.

DefinitlyEvil commented 9 years ago

@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

DefinitlyEvil commented 9 years ago

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

DefinitlyEvil commented 9 years ago

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.

alejzeis commented 9 years ago

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.

DefinitlyEvil commented 9 years ago

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!

alejzeis commented 9 years ago

@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.

DefinitlyEvil commented 9 years ago

@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

alejzeis commented 9 years ago

@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.

alejzeis commented 9 years ago

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.

DefinitlyEvil commented 9 years ago

Yep, I have them credits. I think everything is fine. :D

alejzeis commented 9 years ago

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.

DefinitlyEvil commented 9 years ago

@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.

DefinitlyEvil commented 9 years ago

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.

alejzeis commented 9 years ago

@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?

DefinitlyEvil commented 9 years ago

@jython234 Nothing=Air(ID=0) ;)

alejzeis commented 9 years ago

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.

DefinitlyEvil commented 9 years ago

You can, but client can use hacks to cheat. Such as instant break.

alejzeis commented 9 years ago

@DefinitlyEvil I do not see your meaning. How does an ItemHold packet allow instant break?

DefinitlyEvil commented 9 years ago

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.

alejzeis commented 9 years ago

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.

DefinitlyEvil commented 9 years ago

I don't know yet, I am still trying to figure that out.

alejzeis commented 9 years ago

@DefinitlyEvil You can see the difference of the time between the packets depending on the block.