fix some typos

This commit is contained in:
Bixilon 2021-05-14 00:30:55 +02:00
parent 11c0f38fe2
commit e31fa26617
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
3 changed files with 12 additions and 12 deletions

View File

@ -55,7 +55,7 @@ I always try to add support for the newest version of minecraft. Mostly it is pr
### Supported versions ### Supported versions
Almost all versions (and snapshots!) between 1.7 and the latest one (21w17a as of writing this, snapshot for 1.17). I plan to maintain Minosoft to at least version 1.20, so stay tuned. Support for older protocols will not be dropped as newer protocols are added. And I can only recommend using the latest stable version. Almost all versions (and snapshots!) between 1.7 and the latest one (21w17a as of writing this, snapshot for 1.17). I plan to maintain Minosoft to at least version 1.20, so stay tuned. Support for older protocols will not be dropped as newer protocols are added. And can still only recommend using the latest stable version, should be the most stable one.
### Unsupported versions ### Unsupported versions
@ -84,7 +84,7 @@ See [Credits](Credits.md).
## Releases and beta ## Releases and beta
No clue, but still waiting for !21. Also, some features need to be implemented, so not soo soon (but we are getting closer). If you want to get notified about cool new changes, feel free to subscribe to our dev news telegram channel [@MinosoftDevNews]((https://t.me/MinosoftDevNews)) No clue, but still waiting for !21. Also, some features need to be implemented, so not soo soon (but we are getting closer). If you want to get notified about cool new changes, feel free to subscribe to our dev news telegram channel [@MinosoftDevNews](https://t.me/MinosoftDevNews)
## Compiling and running ## Compiling and running
1. Install Maven and java 15 (On Ubuntu based distributions: `sudo apt install maven openjdk-15-jdk`). 1. Install Maven and java 15 (On Ubuntu based distributions: `sudo apt install maven openjdk-15-jdk`).

View File

@ -56,7 +56,7 @@ open class InByteBuffer {
get() = size - pointer get() = size - pointer
inline fun <reified T> readArray(length: Int = readVarInt(), reader: () -> T): Array<T> { inline fun <reified T> readArray(length: Int = readVarInt(), reader: () -> T): Array<T> {
check(length <= size) { "Trying to allocate to much memory!" } check(length <= size) { "Trying to allocate too much memory!" }
val array: MutableList<T> = mutableListOf() val array: MutableList<T> = mutableListOf()
for (i in 0 until length) { for (i in 0 until length) {
array.add(i, reader()) array.add(i, reader())
@ -69,7 +69,7 @@ open class InByteBuffer {
} }
open fun readByteArray(length: Int = readVarInt()): ByteArray { open fun readByteArray(length: Int = readVarInt()): ByteArray {
check(length <= bytes.size) { "Trying to allocate to much memory!" } check(length <= bytes.size) { "Trying to allocate too much memory!" }
val array = ByteArray(length) val array = ByteArray(length)
System.arraycopy(bytes, pointer, array, 0, length) System.arraycopy(bytes, pointer, array, 0, length)
pointer += length pointer += length
@ -86,7 +86,7 @@ open class InByteBuffer {
} }
fun readShortArray(length: Int = readVarInt()): ShortArray { fun readShortArray(length: Int = readVarInt()): ShortArray {
check(length <= bytes.size / Short.SIZE_BYTES) { "Trying to allocate to much memory!" } check(length <= bytes.size / Short.SIZE_BYTES) { "Trying to allocate too much memory!" }
val array = ShortArray(length) val array = ShortArray(length)
for (i in 0 until length) { for (i in 0 until length) {
array[i] = readShort() array[i] = readShort()
@ -108,7 +108,7 @@ open class InByteBuffer {
} }
fun readIntArray(length: Int = readVarInt()): IntArray { fun readIntArray(length: Int = readVarInt()): IntArray {
check(length <= bytes.size / Int.SIZE_BYTES) { "Trying to allocate to much memory!" } check(length <= bytes.size / Int.SIZE_BYTES) { "Trying to allocate too much memory!" }
val array = IntArray(length) val array = IntArray(length)
for (i in 0 until length) { for (i in 0 until length) {
array[i] = readInt() array[i] = readInt()
@ -138,7 +138,7 @@ open class InByteBuffer {
@JvmOverloads @JvmOverloads
fun readVarIntArray(length: Int = readVarInt()): IntArray { fun readVarIntArray(length: Int = readVarInt()): IntArray {
check(length <= bytes.size) { "Trying to allocate to much memory!" } check(length <= bytes.size) { "Trying to allocate too much memory!" }
val array = IntArray(length) val array = IntArray(length)
for (i in 0 until length) { for (i in 0 until length) {
array[i] = readVarInt() array[i] = readVarInt()
@ -156,7 +156,7 @@ open class InByteBuffer {
} }
fun readLongArray(length: Int = readVarInt()): LongArray { fun readLongArray(length: Int = readVarInt()): LongArray {
check(length <= bytes.size / Long.SIZE_BYTES) { "Trying to allocate to much memory!" } check(length <= bytes.size / Long.SIZE_BYTES) { "Trying to allocate too much memory!" }
val array = LongArray(length) val array = LongArray(length)
for (i in 0 until length) { for (i in 0 until length) {
array[i] = readLong() array[i] = readLong()
@ -180,7 +180,7 @@ open class InByteBuffer {
} }
fun readVarLongArray(length: Int = readVarInt()): LongArray { fun readVarLongArray(length: Int = readVarInt()): LongArray {
check(length <= bytes.size) { "Trying to allocate to much memory!" } check(length <= bytes.size) { "Trying to allocate too much memory!" }
val array = LongArray(length) val array = LongArray(length)
for (i in 0 until length) { for (i in 0 until length) {
array[i] = readVarLong() array[i] = readVarLong()
@ -193,7 +193,7 @@ open class InByteBuffer {
} }
fun readFloatArray(length: Int = readVarInt()): FloatArray { fun readFloatArray(length: Int = readVarInt()): FloatArray {
check(length <= bytes.size / Float.SIZE_BYTES) { "Trying to allocate to much memory!" } check(length <= bytes.size / Float.SIZE_BYTES) { "Trying to allocate too much memory!" }
val array = FloatArray(length) val array = FloatArray(length)
for (i in 0 until length) { for (i in 0 until length) {
array[i] = readFloat() array[i] = readFloat()
@ -207,7 +207,7 @@ open class InByteBuffer {
} }
fun readDoubleArray(length: Int = readVarInt()): DoubleArray { fun readDoubleArray(length: Int = readVarInt()): DoubleArray {
check(length <= bytes.size / Double.SIZE_BYTES) { "Trying to allocate to much memory!" } check(length <= bytes.size / Double.SIZE_BYTES) { "Trying to allocate too much memory!" }
val array = DoubleArray(length) val array = DoubleArray(length)
for (i in 0 until length) { for (i in 0 until length) {
array[i] = readDouble() array[i] = readDouble()

View File

@ -150,7 +150,7 @@ class PlayInByteBuffer : InByteBuffer {
} }
} }
check(length <= ProtocolDefinition.PROTOCOL_PACKET_MAX_SIZE) { "Trying to allocate to much memory" } check(length <= ProtocolDefinition.PROTOCOL_PACKET_MAX_SIZE) { "Trying to allocate too much memory" }
val ret: MutableList<Biome> = mutableListOf() val ret: MutableList<Biome> = mutableListOf()
for (i in 0 until length) { for (i in 0 until length) {