mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-11-19 10:25:00 +00:00
Moved check for fastLightingAvailable from BukkitWorld.fixAfterFastMode to fixLighting and adjusted the description for //generate.
This commit is contained in:
parent
dbc3053195
commit
0ca66ce350
@ -733,9 +733,7 @@ public class BukkitWorld extends LocalWorld {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fixAfterFastMode(Iterable<BlockVector2D> chunks) {
|
public void fixAfterFastMode(Iterable<BlockVector2D> chunks) {
|
||||||
if (fastLightingAvailable) {
|
|
||||||
fixLighting(chunks);
|
fixLighting(chunks);
|
||||||
}
|
|
||||||
|
|
||||||
for (BlockVector2D chunkPos : chunks) {
|
for (BlockVector2D chunkPos : chunks) {
|
||||||
world.refreshChunk(chunkPos.getBlockX(), chunkPos.getBlockZ());
|
world.refreshChunk(chunkPos.getBlockX(), chunkPos.getBlockZ());
|
||||||
@ -748,6 +746,10 @@ public class BukkitWorld extends LocalWorld {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void fixLighting(Iterable<BlockVector2D> chunks) {
|
public void fixLighting(Iterable<BlockVector2D> chunks) {
|
||||||
|
if (fastLightingAvailable) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Object notchWorld = CraftWorld_getHandle.invoke(world);
|
Object notchWorld = CraftWorld_getHandle.invoke(world);
|
||||||
for (BlockVector2D chunkPos : chunks) {
|
for (BlockVector2D chunkPos : chunks) {
|
||||||
|
@ -322,7 +322,7 @@ public class GenerationCommands {
|
|||||||
@Command(
|
@Command(
|
||||||
aliases = { "/generate", "/gen", "/g" },
|
aliases = { "/generate", "/gen", "/g" },
|
||||||
usage = "<block> <equation>",
|
usage = "<block> <equation>",
|
||||||
desc = "Generates a shape according to a formula. -h for hollow, -r for untransformed coordinates, -o for unscaled, but offset from placement",
|
desc = "Generates a shape according to a formula. -h for hollow, -r for raw coordinates, -o for unscaled, but offset from placement",
|
||||||
flags = "hro",
|
flags = "hro",
|
||||||
min = 1,
|
min = 1,
|
||||||
max = -1
|
max = -1
|
||||||
@ -351,7 +351,6 @@ public class GenerationCommands {
|
|||||||
shape = new ArbitraryShape(region) {
|
shape = new ArbitraryShape(region) {
|
||||||
@Override
|
@Override
|
||||||
protected boolean isInside(double x, double y, double z) {
|
protected boolean isInside(double x, double y, double z) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return expression.evaluate(x, y, z) > 0;
|
return expression.evaluate(x, y, z) > 0;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -371,7 +370,6 @@ public class GenerationCommands {
|
|||||||
shape = new ArbitraryShape(region) {
|
shape = new ArbitraryShape(region) {
|
||||||
@Override
|
@Override
|
||||||
protected boolean isInside(double x, double y, double z) {
|
protected boolean isInside(double x, double y, double z) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return expression.evaluate(x-placementX, y-placementY, z-placementZ) > 0;
|
return expression.evaluate(x-placementX, y-placementY, z-placementZ) > 0;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user