Updated 1.17 support be compiled with Paper

This commit is contained in:
OmerBenGera 2021-10-15 18:01:34 +03:00
parent a787fdd72a
commit 1cea49c111
3 changed files with 3 additions and 19 deletions

View File

@ -7,7 +7,7 @@ java {
} }
dependencies { dependencies {
compileOnly "org.spigotmc:v1_17_R1:latest" compileOnly "org.spigotmc:v1_17_R1-Paper:latest"
compileOnly project(":API") compileOnly project(":API")
compileOnly parent compileOnly parent
} }

View File

@ -68,11 +68,6 @@ public final class ChunkLoaderNPC_v1_17_R1 extends EntityPlayer implements Chunk
} }
private static void removePlayer(WorldServer worldServer, EntityPlayer entityPlayer){ private static void removePlayer(WorldServer worldServer, EntityPlayer entityPlayer){
// Chunk currentChunk = entityPlayer.getCurrentChunk();
// if (currentChunk != null)
// currentChunk.b(entityPlayer);
// TODO: Paper
worldServer.a(entityPlayer, RemovalReason.d); worldServer.a(entityPlayer, RemovalReason.d);
} }

View File

@ -210,12 +210,6 @@ public final class NMSAdapter_v1_17_R1 implements NMSAdapter {
loaderBlock = world.getType(blockPosition).getBlock(); loaderBlock = world.getType(blockPosition).getBlock();
// try {
// // Not a method of Spigot - fixes https://github.com/OmerBenGera/WildLoaders/issues/2
// setCurrentChunk(world.getChunkAtWorldCoords(blockPosition));
// }catch (Throwable ignored){}
// TODO: Paper
if(!this.chunkLoader.isInfinite()) { if(!this.chunkLoader.isInfinite()) {
long timeLeft = chunkLoader.getTimeLeft(); long timeLeft = chunkLoader.getTimeLeft();
@ -311,13 +305,8 @@ public final class NMSAdapter_v1_17_R1 implements NMSAdapter {
} }
private static class TileEntityChunkLoaderTicker implements TickingBlockEntity{ private record TileEntityChunkLoaderTicker(
TileEntityChunkLoader tileEntityChunkLoader) implements TickingBlockEntity {
private final TileEntityChunkLoader tileEntityChunkLoader;
TileEntityChunkLoaderTicker(TileEntityChunkLoader tileEntityChunkLoader){
this.tileEntityChunkLoader = tileEntityChunkLoader;
}
@Override @Override
public void a() { public void a() {