Temporary fix on the ChunkSnapshot for 1.12 and lower until I recode it

This commit is contained in:
BuildTools 2019-09-22 01:48:39 -06:00
parent 847e23bf0f
commit cf1567a1db
4 changed files with 7 additions and 36 deletions

View File

@ -147,4 +147,9 @@
<attribute name="gradle_used_by_scope" value="main,test"/> <attribute name="gradle_used_by_scope" value="main,test"/>
</attributes> </attributes>
</classpathentry> </classpathentry>
<classpathentry kind="lib" path="C:/Users/Sean Grover/OneDrive/Projects/workspace/Skyblock/libraries/Skyblock-LegacyChunkSnapshot.jar">
<attributes>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
</classpath> </classpath>

View File

@ -88,6 +88,8 @@ dependencies {
// Songoda Updater // Songoda Updater
shade (group: 'com.songoda', name: 'songodaupdater', version: '1') shade (group: 'com.songoda', name: 'songodaupdater', version: '1')
shade fileTree(dir: 'libraries', include: '*.jar')
} }
processResources { processResources {

View File

@ -1,23 +0,0 @@
package com.songoda.skyblock.levelling;
import org.bukkit.Material;
public class LegacyChunkSnapshotData {
private Material material;
private int data;
public LegacyChunkSnapshotData(Material material, int data) {
this.material = material;
this.data = data;
}
public Material getMaterial() {
return this.material;
}
public int getData() {
return this.data;
}
}

View File

@ -1,13 +0,0 @@
package com.songoda.skyblock.levelling;
import org.bukkit.ChunkSnapshot;
public class LegacyChunkSnapshotFetcher {
// Uses a 1.12.2 jar in a separate project to avoid needing to use reflection during level scanning, much faster.
@SuppressWarnings("deprecation")
public static LegacyChunkSnapshotData fetch(ChunkSnapshot snapshot, int x, int y, int z) {
return new LegacyChunkSnapshotData(snapshot.getBlockType(x, y, z), snapshot.getData(x, y, z));
}
}