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
<?php | |
/** | |
* MIT licensed. | |
*/ | |
namespace Minimum\Minecraft; | |
class McpePing | |
{ |
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
import random | |
from socket import socket, AF_INET, SOCK_DGRAM | |
from struct import pack | |
MAGIC = "\x00\xff\xff\x00\xfe\xfe\xfe\xfe\xfd\xfd\xfd\xfd\x12\x34\x56\x78" | |
def get_random_long(): | |
return random.getrandbits(48) |
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
#!/bin/bash | |
# Clean up the existing phar | |
rm -f *.phar | |
# Check if phar.readonly is Off | |
if [ `php -r 'print ini_get("phar.readonly") ? "false" : "true";'` == false ]; then | |
echo "PHAR creation is not enabled in your php.ini. Please set phar.readonly = Off and try again." | |
exit 1 | |
fi |
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
public static McpeBatch CreateBatchPacket(byte[] input, CompressionLevel compressionLevel, bool writeLen = false) | |
{ | |
return CreateBatchPacket(input, 0, input.Length, compressionLevel, writeLen); | |
} | |
public static McpeBatch CreateBatchPacket(byte[] input, int offset, int length, CompressionLevel compressionLevel, bool writeLen = false) | |
{ | |
var packet = McpeBatch.CreateObject(); | |
using (MemoryStream stream = MiNetServer.MemoryStreamManager.GetStream()) |
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
Benchmark (registeredHandlers) Mode Samples Score Score error Units | |
i.m.m.t.MyBenchmark.chmEventBusThrpt 1 thrpt 5 58697.231 1508.560 ops/ms | |
i.m.m.t.MyBenchmark.chmEventBusThrpt 2 thrpt 5 36404.255 591.099 ops/ms | |
i.m.m.t.MyBenchmark.chmEventBusThrpt 4 thrpt 5 20787.649 940.794 ops/ms | |
i.m.m.t.MyBenchmark.chmEventBusThrpt 8 thrpt 5 11264.201 563.496 ops/ms | |
i.m.m.t.MyBenchmark.chmEventBusThrpt 16 thrpt 5 5794.505 383.392 ops/ms | |
i.m.m.t.MyBenchmark.cowEventBusThrpt 1 thrpt 5 40330.393 168.569 ops/ms | |
i.m.m.t.MyBenchmark.cowEventBusThrpt 2 thrpt 5 37808.660 313.190 ops/ms | |
i.m.m.t.MyBenchmark.cowEventBusThrpt 4 thrpt 5 29194.572 343.492 ops/ms | |
i.m.m.t |
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
Benchmark (registeredHandlers) Mode Samples Score Score error Units | |
i.m.m.t.MyBenchmark.newEventBusThrpt 1 thrpt 5 40278.584 1186.440 ops/ms | |
i.m.m.t.MyBenchmark.newEventBusThrpt 2 thrpt 5 29964.507 266.045 ops/ms | |
i.m.m.t.MyBenchmark.newEventBusThrpt 4 thrpt 5 25575.948 305.020 ops/ms | |
i.m.m.t.MyBenchmark.newEventBusThrpt 8 thrpt 5 18186.726 224.811 ops/ms | |
i.m.m.t.MyBenchmark.newEventBusThrpt 16 thrpt 5 11726.754 91.007 ops/ms | |
i.m.m.t.MyBenchmark.oldEventBusThrpt 1 thrpt 5 58407.225 1601.781 ops/ms | |
i.m.m.t.MyBenchmark.oldEventBusThrpt 2 thrpt 5 36357.648 1171.894 ops/ms | |
i.m.m.t.MyBenchmark.oldEventBusThrpt 4 thrpt 5 20917.831 857.317 ops/ms | |
i.m.m.t.MyBenchmark.oldEventBusThrpt |
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
Benchmark (registeredHandlers) Mode Samples Score Score error Units | |
i.m.m.t.MyBenchmark.newEventBusThrpt 1 thrpt 5 63289.322 549.906 ops/ms | |
i.m.m.t.MyBenchmark.newEventBusThrpt 2 thrpt 5 36638.232 469.280 ops/ms | |
i.m.m.t.MyBenchmark.newEventBusThrpt 4 thrpt 5 12233.679 854.688 ops/ms | |
i.m.m.t.MyBenchmark.newEventBusThrpt 8 thrpt 5 6168.185 109.885 ops/ms | |
i.m.m.t.MyBenchmark.newEventBusThrpt 16 thrpt 5 5671.031 129.891 ops/ms | |
i.m.m.t.MyBenchmark.oldEventBusThrpt 1 thrpt 5 46689.622 2969.250 ops/ms | |
i.m.m.t.MyBenchmark.oldEventBusThrpt 2 thrpt 5 24353.546 638.708 ops/ms | |
i.m.m.t.MyBenchmark.oldEventBusThrpt 4 thrpt 5 11633.577 235.883 ops/ms | |
i.m.m.t.MyBenchmark.oldEventBusThrpt |
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:52:24 [SEVERE] [PaulaBean] <-> DownstreamBridge <-> [lobby] - encountered exception | |
java.lang.IndexOutOfBoundsException: readerIndex(5) + length(1) exceeds writerIndex(5): SlicedAbstractByteBuf(ridx: 5, widx: 5, cap: 5/5, unwrapped: PooledUnsafeDirectByteBuf(ridx: 7, widx: 19, cap: 64)) | |
at io.netty.buffer.AbstractByteBuf.checkReadableBytes0(AbstractByteBuf.java:1178) | |
at io.netty.buffer.AbstractByteBuf.readByte(AbstractByteBuf.java:587) | |
at net.md_5.bungee.protocol.DefinedPacket.readVarInt(DefinedPacket.java:111) | |
at net.md_5.bungee.protocol.DefinedPacket.readVarInt(DefinedPacket.java:101) | |
at net.md_5.bungee.entitymap.EntityMap.rewriteVarInt(EntityMap.java:88) | |
at net.md_5.bungee.entitymap.EntityMap_1_8.rewriteClientbound(EntityMap_1_8.java:77) | |
at net.md_5.bungee.entitymap.EntityMap_1_8.rewriteInternal(EntityMap_1_8.java:55) | |
at net.md_5.bungee.entitymap.EntityMap.rewrite(EntityMap.java:106) |
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:51:13 [SEVERE] [PaulaBean] <-> DownstreamBridge <-> [lobby2] - encountered exception | |
java.lang.IndexOutOfBoundsException: writerIndex(3) + minWritableBytes(40) exceeds maxCapacity(42): SlicedAbstractByteBuf(ridx: 1, widx: 3, cap: 42/42, unwrapped: PooledUnsafeDirectByteBuf(ridx: 1813, widx: 2048, cap: 2048)) | |
at io.netty.buffer.AbstractByteBuf.ensureWritable0(AbstractByteBuf.java:259) | |
at io.netty.buffer.AbstractByteBuf.ensureWritable(AbstractByteBuf.java:249) | |
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:866) | |
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:858) | |
at io.netty.buffer.AbstractByteBuf.writeBytes(AbstractByteBuf.java:848) | |
at net.md_5.bungee.entitymap.EntityMap.rewriteVarInt(EntityMap.java:96) | |
at net.md_5.bungee.entitymap.EntityMap.rewriteInternal(EntityMap.java:116) | |
at net.md_5.bungee.entitymap.EntityMap_1_8.rewriteInternal(EntityMap_1_8.java:52) |
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:45:33 [SEVERE] [/127.0.0.1:36400] <-> InitialHandler - encountered exception | |
io.netty.handler.codec.DecoderException: io.netty.util.IllegalReferenceCountException: refCnt: 0 | |
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:391) | |
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:244) | |
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:318) | |
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:304) | |
at io.netty.handler.codec.ByteToMessageDecoder.handlerRemoved(ByteToMessageDecoder.java:216) | |
at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved0(DefaultChannelPipeline.java:527) | |
at io.netty.channel.DefaultChannelPipeline.callHandlerRemoved(DefaultChannelPipeline.java:521) | |
at io.netty.channel.DefaultChannelPipeline.remove0(DefaultChannelPipeline.java:351) |
NewerOlder