mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 20:14:31 +00:00
Merge branch 'next-minor' into next-major
This commit is contained in:
@@ -35,7 +35,7 @@ interface AdvancedNetworkInterface extends NetworkInterface{
|
||||
/**
|
||||
* Prevents packets received from the IP address getting processed for the given timeout.
|
||||
*
|
||||
* @param int $timeout Seconds
|
||||
* @param int $timeout Seconds
|
||||
*/
|
||||
public function blockAddress(string $address, int $timeout = 300) : void;
|
||||
|
||||
|
@@ -28,7 +28,7 @@ use pocketmine\network\mcpe\protocol\ClientboundPacket;
|
||||
interface PacketBroadcaster{
|
||||
|
||||
/**
|
||||
* @param NetworkSession[] $recipients
|
||||
* @param NetworkSession[] $recipients
|
||||
* @param ClientboundPacket[] $packets
|
||||
*/
|
||||
public function broadcastPackets(array $recipients, array $packets) : void;
|
||||
|
@@ -36,6 +36,7 @@ use function get_debug_type;
|
||||
use function is_array;
|
||||
use function is_int;
|
||||
use function json_decode;
|
||||
use const JSON_THROW_ON_ERROR;
|
||||
|
||||
/**
|
||||
* Handles translation of network block runtime IDs into blockstate data, and vice versa
|
||||
@@ -50,7 +51,7 @@ final class BlockStateDictionary{
|
||||
private ?array $idMetaToStateIdLookupCache = null;
|
||||
|
||||
/**
|
||||
* @param BlockStateDictionaryEntry[] $states
|
||||
* @param BlockStateDictionaryEntry[] $states
|
||||
*
|
||||
* @phpstan-param list<BlockStateDictionaryEntry> $states
|
||||
*/
|
||||
|
@@ -34,6 +34,7 @@ use function openssl_digest;
|
||||
use function openssl_error_string;
|
||||
use function openssl_pkey_derive;
|
||||
use function str_pad;
|
||||
use const STR_PAD_LEFT;
|
||||
|
||||
final class EncryptionUtils{
|
||||
|
||||
|
@@ -306,6 +306,8 @@ class InGamePacketHandler extends PacketHandler{
|
||||
public function handleInventoryTransaction(InventoryTransactionPacket $packet) : bool{
|
||||
$result = true;
|
||||
|
||||
$this->inventoryManager->addPredictedSlotChanges($packet->trData->getActions());
|
||||
|
||||
if($packet->trData instanceof NormalTransactionData){
|
||||
$result = $this->handleNormalTransaction($packet->trData);
|
||||
}elseif($packet->trData instanceof MismatchTransactionData){
|
||||
@@ -355,7 +357,6 @@ class InGamePacketHandler extends PacketHandler{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
$this->inventoryManager->addPredictedSlotChanges($data->getActions());
|
||||
|
||||
if($isCraftingPart){
|
||||
if($this->craftingTransaction === null){
|
||||
|
@@ -52,6 +52,7 @@ use function mt_rand;
|
||||
use function random_bytes;
|
||||
use function rtrim;
|
||||
use function substr;
|
||||
use const PHP_INT_MAX;
|
||||
|
||||
class RakLibInterface implements ServerEventListener, AdvancedNetworkInterface{
|
||||
/**
|
||||
|
@@ -40,6 +40,7 @@ use function strlen;
|
||||
use function time;
|
||||
use function trim;
|
||||
use const AF_INET;
|
||||
use const AF_INET6;
|
||||
use const IPPROTO_IPV6;
|
||||
use const IPV6_V6ONLY;
|
||||
use const PHP_INT_MAX;
|
||||
|
@@ -73,6 +73,12 @@ use function sprintf;
|
||||
use function strlen;
|
||||
use function trim;
|
||||
use const AF_INET;
|
||||
use const PREG_BACKTRACK_LIMIT_ERROR;
|
||||
use const PREG_BAD_UTF8_ERROR;
|
||||
use const PREG_BAD_UTF8_OFFSET_ERROR;
|
||||
use const PREG_INTERNAL_ERROR;
|
||||
use const PREG_JIT_STACKLIMIT_ERROR;
|
||||
use const PREG_RECURSION_LIMIT_ERROR;
|
||||
use const SO_RCVTIMEO;
|
||||
use const SOCK_DGRAM;
|
||||
use const SOCKET_ETIMEDOUT;
|
||||
|
Reference in New Issue
Block a user