mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fix 1.7 block placer
This commit is contained in:
parent
c8c144b6da
commit
4d4950090d
@ -25,7 +25,9 @@ public class BukkitLocalQueue_1_7 extends BukkitLocalQueue<PlotBlock[]> {
|
|||||||
private final ReflectionUtils.RefClass classChunk = getRefClass("{nms}.Chunk");
|
private final ReflectionUtils.RefClass classChunk = getRefClass("{nms}.Chunk");
|
||||||
private final ReflectionUtils.RefClass classWorld = getRefClass("{nms}.World");
|
private final ReflectionUtils.RefClass classWorld = getRefClass("{nms}.World");
|
||||||
private final ReflectionUtils.RefClass classCraftWorld = getRefClass("{cb}.CraftWorld");
|
private final ReflectionUtils.RefClass classCraftWorld = getRefClass("{cb}.CraftWorld");
|
||||||
|
private final ReflectionUtils.RefClass classCraftChunk = getRefClass("{cb}.CraftChunk");
|
||||||
private final ReflectionUtils.RefMethod methodGetHandle;
|
private final ReflectionUtils.RefMethod methodGetHandle;
|
||||||
|
private final ReflectionUtils.RefMethod methodGetHandleChunk;
|
||||||
private final ReflectionUtils.RefMethod methodGetChunkAt;
|
private final ReflectionUtils.RefMethod methodGetChunkAt;
|
||||||
private final ReflectionUtils.RefMethod methodA;
|
private final ReflectionUtils.RefMethod methodA;
|
||||||
private final ReflectionUtils.RefMethod methodGetById;
|
private final ReflectionUtils.RefMethod methodGetById;
|
||||||
@ -40,6 +42,7 @@ public class BukkitLocalQueue_1_7 extends BukkitLocalQueue<PlotBlock[]> {
|
|||||||
this.methodGetChunkAt = this.classWorld.getMethod("getChunkAt", int.class, int.class);
|
this.methodGetChunkAt = this.classWorld.getMethod("getChunkAt", int.class, int.class);
|
||||||
this.methodA = this.classChunk.getMethod("a", int.class, int.class, int.class, this.classBlock, int.class);
|
this.methodA = this.classChunk.getMethod("a", int.class, int.class, int.class, this.classBlock, int.class);
|
||||||
this.methodGetById = this.classBlock.getMethod("getById", int.class);
|
this.methodGetById = this.classBlock.getMethod("getById", int.class);
|
||||||
|
this.methodGetHandleChunk = this.classCraftChunk.getMethod("getHandle");
|
||||||
this.methodInitLighting = this.classChunk.getMethod("initLighting");
|
this.methodInitLighting = this.classChunk.getMethod("initLighting");
|
||||||
this.sendChunk = new SendChunk();
|
this.sendChunk = new SendChunk();
|
||||||
TaskManager.runTaskRepeat(new Runnable() {
|
TaskManager.runTaskRepeat(new Runnable() {
|
||||||
@ -87,7 +90,7 @@ public class BukkitLocalQueue_1_7 extends BukkitLocalQueue<PlotBlock[]> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fixChunkLighting(int x, int z) {
|
public void fixChunkLighting(int x, int z) {
|
||||||
Object c = this.methodGetHandle.of(getChunk(x, z)).call();
|
Object c = this.methodGetHandleChunk.of(getChunk(x, z)).call();
|
||||||
this.methodInitLighting.of(c).call();
|
this.methodInitLighting.of(c).call();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,8 +2,6 @@ package com.plotsquared.bukkit.uuid;
|
|||||||
|
|
||||||
import com.google.common.collect.HashBiMap;
|
import com.google.common.collect.HashBiMap;
|
||||||
import com.google.common.collect.Sets;
|
import com.google.common.collect.Sets;
|
||||||
import com.google.common.io.ByteSource;
|
|
||||||
import com.google.common.io.InputSupplier;
|
|
||||||
import com.intellectualcrafters.plot.PS;
|
import com.intellectualcrafters.plot.PS;
|
||||||
import com.intellectualcrafters.plot.config.C;
|
import com.intellectualcrafters.plot.config.C;
|
||||||
import com.intellectualcrafters.plot.config.Settings;
|
import com.intellectualcrafters.plot.config.Settings;
|
||||||
|
Loading…
Reference in New Issue
Block a user