mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-20 02:45:00 +00:00
Fixed checkLoadedChunk
This commit is contained in:
parent
b89ede09a6
commit
050eef8dc7
@ -160,7 +160,7 @@ public class EditSession {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
world.checkLoadedChuck(pt);
|
world.checkLoadedChunk(pt);
|
||||||
|
|
||||||
// No invalid blocks
|
// No invalid blocks
|
||||||
if (!world.isValidBlockType(type)) {
|
if (!world.isValidBlockType(type)) {
|
||||||
@ -394,7 +394,7 @@ public class EditSession {
|
|||||||
* @return BaseBlock
|
* @return BaseBlock
|
||||||
*/
|
*/
|
||||||
public BaseBlock rawGetBlock(Vector pt) {
|
public BaseBlock rawGetBlock(Vector pt) {
|
||||||
world.checkLoadedChuck(pt);
|
world.checkLoadedChunk(pt);
|
||||||
|
|
||||||
int type = world.getBlockType(pt);
|
int type = world.getBlockType(pt);
|
||||||
int data = world.getBlockData(pt);
|
int data = world.getBlockData(pt);
|
||||||
|
@ -298,7 +298,7 @@ public abstract class LocalWorld {
|
|||||||
*
|
*
|
||||||
* @param pt Position to check
|
* @param pt Position to check
|
||||||
*/
|
*/
|
||||||
public abstract void checkLoadedChuck(Vector pt);
|
public void checkLoadedChunk(Vector pt) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Compare if the other world is equal.
|
* Compare if the other world is equal.
|
||||||
|
@ -680,7 +680,7 @@ public class BukkitWorld extends LocalWorld {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void checkLoadedChuck(Vector pt) {
|
public void checkLoadedChunk(Vector pt) {
|
||||||
if (!world.isChunkLoaded(pt.getBlockX() >> 4, pt.getBlockZ() >> 4)) {
|
if (!world.isChunkLoaded(pt.getBlockX() >> 4, pt.getBlockZ() >> 4)) {
|
||||||
world.loadChunk(pt.getBlockX() >> 4, pt.getBlockZ() >> 4);
|
world.loadChunk(pt.getBlockX() >> 4, pt.getBlockZ() >> 4);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user