-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
80 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
namespace Void.Proxy.API.Network; | ||
|
||
public enum Operation | ||
{ | ||
Write, | ||
Read | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
using Void.Proxy.API.Network.IO.Buffers; | ||
using Void.Proxy.API.Network.IO.Messages; | ||
|
||
namespace Void.Proxy.API.Network.Protocol; | ||
|
||
public delegate TSelf PacketDecoder<out TSelf>(ref MinecraftBuffer buffer, ProtocolVersion protocolVersion) where TSelf : IMinecraftPacket; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
20 changes: 17 additions & 3 deletions
20
src/Void.Proxy.API/Registries/Packets/IPacketRegistryHolder.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,25 @@ | ||
using Void.Proxy.API.Plugins; | ||
using Void.Proxy.API.Network; | ||
using Void.Proxy.API.Plugins; | ||
|
||
namespace Void.Proxy.API.Registries.Packets; | ||
|
||
public interface IPacketRegistryHolder | ||
{ | ||
public bool IsEmpty { get; } | ||
public IPlugin? ManagedBy { get; set; } | ||
public IPacketRegistry? ClientboundRegistry { get; set; } | ||
public IPacketRegistry? ServerboundRegistry { get; set; } | ||
public IPacketRegistry? ClientRegistry { get; set; } | ||
public IPacketRegistry? ServerRegistry { get; set; } | ||
|
||
public IPacketRegistry? GetRegistry(Direction? flow, Operation? operation) | ||
{ | ||
return (flow, operation) switch | ||
{ | ||
(Direction.Clientbound, Operation.Write) => ServerRegistry, | ||
(Direction.Serverbound, Operation.Write) => ClientRegistry, | ||
(Direction.Clientbound, Operation.Read) => ClientRegistry, | ||
(Direction.Serverbound, Operation.Read) => ServerRegistry, | ||
_ => null | ||
}; | ||
} | ||
public void Reset(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 0 additions & 23 deletions
23
...Void.Proxy.Plugins.ProtocolSupport.Java.v1_20_2_to_latest/States/Common/HandshakeState.cs
This file was deleted.
Oops, something went wrong.
31 changes: 0 additions & 31 deletions
31
src/Void.Proxy.Plugins.ProtocolSupport.Java.v1_20_2_to_latest/States/ProtocolState.cs
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters