Incorporate environment into the main plugin
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<parent>
|
||||
<artifactId>mc-mesh-master</artifactId>
|
||||
<artifactId>mc-mesh-plugin</artifactId>
|
||||
<groupId>com.aaaaahhhhhhh.bananapuncher714</groupId>
|
||||
<version>1.0.0</version>
|
||||
<version>0.0.1</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<artifactId>mc-mesh-plugin</artifactId>
|
||||
<artifactId>mc-mesh-plugin-environment</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<build>
|
||||
<plugins>
|
||||
@@ -29,25 +29,13 @@
|
||||
<release>21</release>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>3.5.0</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<addClasspath>true</addClasspath>
|
||||
<mainClass>com.aaaaahhhhhhh.bananapuncher714.minietest.MeshingTest6</mainClass>
|
||||
</manifest>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.21.10-R0.1-SNAPSHOT</version>
|
||||
<version>1.21.11-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
@@ -67,25 +55,17 @@
|
||||
<groupId>org.ow2.asm</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>lz4-java</artifactId>
|
||||
<groupId>at.yawk.lz4</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>jackson-core</artifactId>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>jackson-databind</artifactId>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>azure-json</artifactId>
|
||||
<groupId>com.azure</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>oshi-core</artifactId>
|
||||
<groupId>com.github.oshi</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>jcip-annotations</artifactId>
|
||||
<groupId>com.github.stephenc.jcip</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>msal4j</artifactId>
|
||||
<groupId>com.microsoft.azure</groupId>
|
||||
@@ -110,22 +90,6 @@
|
||||
<artifactId>logging</artifactId>
|
||||
<groupId>com.mojang</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>content-type</artifactId>
|
||||
<groupId>com.nimbusds</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>lang-tag</artifactId>
|
||||
<groupId>com.nimbusds</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>nimbus-jose-jwt</artifactId>
|
||||
<groupId>com.nimbusds</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>oauth2-oidc-sdk</artifactId>
|
||||
<groupId>com.nimbusds</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<groupId>commons-io</groupId>
|
||||
@@ -135,7 +99,11 @@
|
||||
<groupId>io.netty</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>netty-codec</artifactId>
|
||||
<artifactId>netty-codec-base</artifactId>
|
||||
<groupId>io.netty</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>netty-codec-compression</artifactId>
|
||||
<groupId>io.netty</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
@@ -162,6 +130,10 @@
|
||||
<artifactId>netty-transport-classes-epoll</artifactId>
|
||||
<groupId>io.netty</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>netty-transport-classes-kqueue</artifactId>
|
||||
<groupId>io.netty</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<groupId>io.netty</groupId>
|
||||
@@ -170,6 +142,14 @@
|
||||
<artifactId>netty-transport-native-epoll</artifactId>
|
||||
<groupId>io.netty</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>netty-transport-native-kqueue</artifactId>
|
||||
<groupId>io.netty</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>netty-transport-native-kqueue</artifactId>
|
||||
<groupId>io.netty</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>netty-transport-native-unix-common</artifactId>
|
||||
<groupId>io.netty</groupId>
|
||||
@@ -186,14 +166,6 @@
|
||||
<artifactId>jna-platform</artifactId>
|
||||
<groupId>net.java.dev.jna</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>accessors-smart</artifactId>
|
||||
<groupId>net.minidev</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>json-smart</artifactId>
|
||||
<groupId>net.minidev</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>jopt-simple</artifactId>
|
||||
<groupId>net.sf.jopt-simple</groupId>
|
||||
@@ -215,8 +187,8 @@
|
||||
<groupId>org.apache.logging.log4j</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>lz4-java</artifactId>
|
||||
<groupId>org.lz4</groupId>
|
||||
<artifactId>jspecify</artifactId>
|
||||
<groupId>org.jspecify</groupId>
|
||||
</exclusion>
|
||||
<exclusion>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
<dependency>
|
||||
<groupId>org.spigotmc</groupId>
|
||||
<artifactId>spigot</artifactId>
|
||||
<version>1.21.10-R0.1-SNAPSHOT</version>
|
||||
<version>1.21.11-R0.1-SNAPSHOT</version>
|
||||
<scope>provided</scope>
|
||||
</dependency>
|
||||
<dependency>
|
||||
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.aaaaahhhhhhh.bananapuncher714.mesh.environment;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
|
||||
import com.aaaaahhhhhhh.bananapuncher714.mesh.environment.objects.ChunkLocation;
|
||||
import com.aaaaahhhhhhh.bananapuncher714.mesh.environment.objects.ChunkMesh;
|
||||
import com.aaaaahhhhhhh.bananapuncher714.mesh.environment.util.ChunkMeshUtil;
|
||||
|
||||
public class ChunkMeshCache {
|
||||
File directory;
|
||||
|
||||
public ChunkMeshCache( File directory ) {
|
||||
this.directory = directory;
|
||||
}
|
||||
|
||||
public ChunkMesh load( ChunkLocation location ) {
|
||||
final File file = new File( directory, location.getWorldName() + "/" + location.getX() + "/" + location.getZ() + ".cmesh" );
|
||||
if ( file.exists() ) {
|
||||
try {
|
||||
final byte[] data = Files.readAllBytes( file.toPath() );
|
||||
final ChunkMesh mesh = ChunkMeshUtil.deserialize( data );
|
||||
|
||||
return mesh;
|
||||
} catch ( IOException e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public void save( ChunkLocation location, ChunkMesh mesh ) {
|
||||
final File file = new File( directory, location.getWorldName() + "/" + location.getX() + "/" + location.getZ() + ".cmesh" );
|
||||
file.getParentFile().mkdirs();
|
||||
|
||||
final byte[] data = ChunkMeshUtil.serialize( mesh );
|
||||
|
||||
try {
|
||||
Files.write( file.toPath(), data, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.CREATE, StandardOpenOption.WRITE );
|
||||
} catch ( IOException e ) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -2,8 +2,8 @@ package com.aaaaahhhhhhh.bananapuncher714.mesh.environment.util;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.block.data.BlockData;
|
||||
import org.bukkit.craftbukkit.v1_21_R6.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_21_R6.block.data.CraftBlockData;
|
||||
import org.bukkit.craftbukkit.v1_21_R7.CraftWorld;
|
||||
import org.bukkit.craftbukkit.v1_21_R7.block.data.CraftBlockData;
|
||||
import org.bukkit.util.BoundingBox;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
name: MC-Mesh-Environment
|
||||
name: Mc-Mesh-Environment
|
||||
main: com.aaaaahhhhhhh.bananapuncher714.mesh.environment.McMeshEnvironmentPlugin
|
||||
version: 0.0.1
|
||||
description: BulletJME and MC-Mesh integration
|
||||
author: BananaPuncher714
|
||||
api-version: 1.13
|
||||
api-version: 1.13
|
||||
load: STARTUP
|
||||
Reference in New Issue
Block a user