forked from GeyserMC/Geyser
Remove IntelliJ files @EOT3000 added... and more chunk changes.
This commit is contained in:
parent
d8388d0315
commit
ed7213d7c7
7 changed files with 10 additions and 162 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -223,3 +223,4 @@ nbdist/
|
|||
|
||||
### Geyser ###
|
||||
config.yml
|
||||
logs/
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="Encoding">
|
||||
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/api" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/api" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/common" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/common" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/connector" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/connector" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/plugin" charset="UTF-8" />
|
||||
<file url="file://$PROJECT_DIR$/plugin" charset="UTF-8" />
|
||||
</component>
|
||||
</project>
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/api/api.iml" filepath="$PROJECT_DIR$/api/api.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/common/common.iml" filepath="$PROJECT_DIR$/common/common.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/connector/connector.iml" filepath="$PROJECT_DIR$/connector/connector.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/geyser-parent.iml" filepath="$PROJECT_DIR$/geyser-parent.iml" />
|
||||
<module fileurl="file://$PROJECT_DIR$/plugin/plugin.iml" filepath="$PROJECT_DIR$/plugin/plugin.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
|
@ -1,69 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/../target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/../target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="api" />
|
||||
<orderEntry type="library" name="Maven: com.google.code.gson:gson:2.8.2" level="project" />
|
||||
<orderEntry type="module" module-name="common" />
|
||||
<orderEntry type="library" name="Maven: com.auth0:java-jwt:3.3.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: commons-codec:commons-codec:1.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.23" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-core:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-annotations:2.9.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.fasterxml.jackson.core:jackson-databind:2.9.8" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.sentry:sentry:1.7.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.minecrell:terminalconsoleappender:1.0.0" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-core:2.8.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.8.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jline:jline-reader:3.5.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.jline:jline-terminal:3.5.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: org.jline:jline-terminal-jna:3.5.1" level="project" />
|
||||
<orderEntry type="library" scope="RUNTIME" name="Maven: net.java.dev.jna:jna:4.2.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-simple:1.6.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.projectlombok:lombok:1.18.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.fusesource.jansi:jansi:1.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.nukkitx.protocol:bedrock-v361:2.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.nukkitx.protocol:bedrock-common:2.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.nukkitx.protocol:common:2.1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.nukkitx.network:common:1.6.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-buffer:4.1.36.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport-native-epoll:linux-x86_64:4.1.36.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport-native-unix-common:4.1.36.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport-native-kqueue:osx-x86_64:4.1.36.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: cn.nukkit:nukkit-natives:1.0.1-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.nukkitx:nbt:1.3.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.flowpowered:flow-math:1.0.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.sf.trove4j:trove:3.1.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.sf.trove4j:trove-generator:3.1.0-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.nukkitx.network:raknet:1.6.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-handler:4.1.36.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-common:4.1.36.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-transport:4.1.36.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-resolver:4.1.36.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-codec:4.1.36.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.nimbusds:nimbus-jose-jwt:4.41.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.stephenc.jcip:jcip-annotations:1.0-1" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.minidev:json-smart:2.3" level="project" />
|
||||
<orderEntry type="library" name="Maven: net.minidev:accessors-smart:1.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.ow2.asm:asm:5.0.4" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.nukkitx:fastutil-lite:8.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.steveice10:opennbt:1.3-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.steveice10:packetlib:1.4-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: io.netty:netty-all:4.1.25.Final" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.steveice10:mcauthlib:1.1-SNAPSHOT" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.googlecode.json-simple:json-simple:1.1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: junit:junit:4.10" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.hamcrest:hamcrest-core:1.1" level="project" />
|
||||
<orderEntry type="library" name="Maven: com.github.steveice10:mcprotocollib:1.14.4-SNAPSHOT" level="project" />
|
||||
</component>
|
||||
</module>
|
|
@ -23,7 +23,7 @@ public class JavaChunkDataTranslator extends PacketTranslator<ServerChunkDataPac
|
|||
ByteBuf byteBuf = Unpooled.buffer(32);
|
||||
ChunkSection[] sections = chunkData.sections;
|
||||
|
||||
int sectionCount = 16;
|
||||
int sectionCount = sections.length - 1;
|
||||
while (sections[sectionCount].isEmpty()) {
|
||||
sectionCount--;
|
||||
}
|
||||
|
|
|
@ -13,55 +13,16 @@ public class ChunkUtils {
|
|||
|
||||
public static ChunkData translateToBedrock(Column column) {
|
||||
ChunkData chunkData = new ChunkData();
|
||||
chunkData.sections = new ChunkSection[16];
|
||||
for (int i = 0; i < 16; i++) {
|
||||
|
||||
Chunk[] chunks = column.getChunks();
|
||||
int chunkSectionCount = chunks.length;
|
||||
chunkData.sections = new ChunkSection[chunkSectionCount];
|
||||
for (int i = 0; i < chunkSectionCount; i++) {
|
||||
chunkData.sections[i] = new ChunkSection();
|
||||
}
|
||||
|
||||
/*
|
||||
for (int y = 0; y < 256; y++) {
|
||||
int chunkY = y >> 4;
|
||||
|
||||
Chunk chunk = null;
|
||||
try {
|
||||
chunk = column.getChunks()[chunkY];
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
|
||||
if (chunk == null || chunk.isEmpty())
|
||||
continue;
|
||||
|
||||
BlockStorage storage = chunk.getBlocks();
|
||||
for (int x = 0; x < 16; x++) {
|
||||
for (int z = 0; z < 16; z++) {
|
||||
BlockState block = storage.get(x, chunkY, z);
|
||||
if (block == null)
|
||||
block = new BlockState(0);
|
||||
|
||||
BedrockItem bedrockBlock = TranslatorsInit.getItemTranslator().getBedrockBlock(block);
|
||||
|
||||
ChunkSection section = chunkData.sections[chunkY];
|
||||
|
||||
//org.geysermc.connector.world.chunk.BlockStorage blockStorage = new org.geysermc.connector.world.chunk.BlockStorage();
|
||||
int runtimeId = GlobalBlockPalette.getOrCreateRuntimeId(bedrockBlock.getId(), bedrockBlock.getData());
|
||||
section.setFullBlock(x, y >> 4, z, 0, runtimeId << 2 | bedrockBlock.getData());
|
||||
|
||||
//section.getBlockStorageArray()[0] = blockStorage;
|
||||
//section.getBlockStorageArray()[1] = blockStorage;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
for (int chunkY = 0; chunkY < 16; chunkY++) {
|
||||
Chunk chunk = null;
|
||||
try {
|
||||
chunk = column.getChunks()[chunkY];
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
for (int chunkY = 0; chunkY < chunkSectionCount; chunkY++) {
|
||||
Chunk chunk = chunks[chunkY];
|
||||
|
||||
if (chunk == null || chunk.isEmpty())
|
||||
continue;
|
||||
|
@ -69,9 +30,6 @@ public class ChunkUtils {
|
|||
BlockStorage storage = chunk.getBlocks();
|
||||
ChunkSection section = chunkData.sections[chunkY];
|
||||
|
||||
section.getBlockStorageArray()[0] = new org.geysermc.connector.world.chunk.BlockStorage();
|
||||
section.getBlockStorageArray()[1] = new org.geysermc.connector.world.chunk.BlockStorage(BitArrayVersion.V1);
|
||||
|
||||
for (int x = 0; x < 16; x++) {
|
||||
for (int y = 0; y < 16; y++) {
|
||||
for (int z = 0; z < 16; z++) {
|
||||
|
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="waterfall-294" level="project" />
|
||||
</component>
|
||||
</module>
|
Loading…
Reference in a new issue