Verified Commit a63472ad authored by Bixilon's avatar Bixilon
Browse files

Merge branch 'development'

parents a6f1411d 3585f73e
Pipeline #695 passed with stage
in 2 minutes and 9 seconds
......@@ -73,6 +73,35 @@
<compilerArgs>--enable-preview</compilerArgs>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.3.0</version>
<configuration>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<archive>
<manifest>
<mainClass>de.bixilon.minosoft.Minosoft</mainClass>
</manifest>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
......@@ -82,7 +111,7 @@
<maven.compiler.source>15</maven.compiler.source>
<maven.compiler.target>15</maven.compiler.target>
<javafx.version>16-ea+6</javafx.version>
<kotlin.version>1.4.21</kotlin.version>
<kotlin.version>1.4.30</kotlin.version>
</properties>
......@@ -151,7 +180,7 @@
<dependency>
<groupId>org.jline</groupId>
<artifactId>jline</artifactId>
<version>3.18.0</version>
<version>3.19.0</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
......@@ -164,6 +193,11 @@
<version>${kotlin.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-runtime</artifactId>
<version>1.2.71</version>
</dependency>
<dependency>
<groupId>com.github.Bixilon</groupId>
<artifactId>ascii-table</artifactId>
......
......@@ -160,9 +160,18 @@ public final class ChunkUtil {
for (int nibbleZ = 0; nibbleZ < ProtocolDefinition.SECTION_WIDTH_Z; nibbleZ++) {
for (int nibbleX = 0; nibbleX < ProtocolDefinition.SECTION_WIDTH_X; nibbleX++) {
int blockNumber = (((nibbleY * ProtocolDefinition.SECTION_HEIGHT_Y) + nibbleZ) * ProtocolDefinition.SECTION_WIDTH_X) + nibbleX;
int startLong = (blockNumber * palette.getBitsPerBlock()) / 64;
int startOffset = (blockNumber * palette.getBitsPerBlock()) % 64;
int endLong = ((blockNumber + 1) * palette.getBitsPerBlock() - 1) / 64;
int startLong;
int startOffset;
int endLong;
if (buffer.getVersionId() < V_20W49A) { // ToDo: When did this changed? is just a guess
startLong = (blockNumber * palette.getBitsPerBlock()) / 64;
startOffset = (blockNumber * palette.getBitsPerBlock()) % 64;
endLong = ((blockNumber + 1) * palette.getBitsPerBlock() - 1) / 64;
} else {
startLong = endLong = blockNumber / (64 / palette.getBitsPerBlock());
startOffset = (blockNumber % (64 / palette.getBitsPerBlock())) * palette.getBitsPerBlock();
}
int blockId;
if (startLong == endLong) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment