mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 21:26:45 +01:00
Fixed road regen
This commit is contained in:
parent
dadab42575
commit
d143296d5e
@ -10,6 +10,7 @@ import com.intellectualcrafters.plot.object.Location;
|
|||||||
import com.intellectualcrafters.plot.object.Plot;
|
import com.intellectualcrafters.plot.object.Plot;
|
||||||
import com.intellectualcrafters.plot.object.PlotBlock;
|
import com.intellectualcrafters.plot.object.PlotBlock;
|
||||||
import com.intellectualcrafters.plot.object.PlotId;
|
import com.intellectualcrafters.plot.object.PlotId;
|
||||||
|
import com.intellectualcrafters.plot.object.PlotLoc;
|
||||||
import com.intellectualcrafters.plot.object.PlotManager;
|
import com.intellectualcrafters.plot.object.PlotManager;
|
||||||
import com.intellectualcrafters.plot.util.BlockManager;
|
import com.intellectualcrafters.plot.util.BlockManager;
|
||||||
import com.intellectualcrafters.plot.util.ChunkManager;
|
import com.intellectualcrafters.plot.util.ChunkManager;
|
||||||
@ -127,22 +128,22 @@ public abstract class HybridUtils {
|
|||||||
if (absZ < 0) {
|
if (absZ < 0) {
|
||||||
absZ += size;
|
absZ += size;
|
||||||
}
|
}
|
||||||
final boolean gx = absX > plotworld.PATH_WIDTH_LOWER;
|
|
||||||
final boolean gz = absZ > plotworld.PATH_WIDTH_LOWER;
|
|
||||||
final boolean lx = absX < plotworld.PATH_WIDTH_UPPER;
|
|
||||||
final boolean lz = absZ < plotworld.PATH_WIDTH_UPPER;
|
|
||||||
boolean condition;
|
boolean condition;
|
||||||
if (toCheck) {
|
if (toCheck) {
|
||||||
condition = manager.getPlotId(plotworld, x + X, 1, z + Z) == null;
|
condition = manager.getPlotId(plotworld, x + X, 1, z + Z) == null;
|
||||||
} else {
|
} else {
|
||||||
|
final boolean gx = absX > plotworld.PATH_WIDTH_LOWER;
|
||||||
|
final boolean gz = absZ > plotworld.PATH_WIDTH_LOWER;
|
||||||
|
final boolean lx = absX < plotworld.PATH_WIDTH_UPPER;
|
||||||
|
final boolean lz = absZ < plotworld.PATH_WIDTH_UPPER;
|
||||||
condition = (!gx || !gz || !lx || !lz);
|
condition = (!gx || !gz || !lx || !lz);
|
||||||
}
|
}
|
||||||
if (condition) {
|
if (condition) {
|
||||||
final int sy = plotworld.ROAD_HEIGHT;
|
final int sy = plotworld.ROAD_HEIGHT;
|
||||||
final ChunkLoc loc = new ChunkLoc(absX, absZ);
|
final PlotLoc loc = new PlotLoc(absX, absZ);
|
||||||
final HashMap<Short, Short> blocks = plotworld.G_SCH.get(loc);
|
final HashMap<Short, Short> blocks = plotworld.G_SCH.get(loc);
|
||||||
for (short y = (short) (plotworld.ROAD_HEIGHT + 1); y <= (plotworld.ROAD_HEIGHT + plotworld.SCHEMATIC_HEIGHT); y++) {
|
for (short y = (short) (plotworld.ROAD_HEIGHT); y <= (plotworld.ROAD_HEIGHT + plotworld.SCHEMATIC_HEIGHT); y++) {
|
||||||
BlockManager.manager.functionSetBlock(world, x + X, sy + y, z + Z, 0, (byte) 0);
|
BlockManager.manager.functionSetBlock(world, x + X, y, z + Z, 0, (byte) 0);
|
||||||
}
|
}
|
||||||
if (blocks != null) {
|
if (blocks != null) {
|
||||||
final HashMap<Short, Byte> datas = plotworld.G_SCH_DATA.get(loc);
|
final HashMap<Short, Byte> datas = plotworld.G_SCH_DATA.get(loc);
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
package com.intellectualcrafters.plot.util;
|
package com.intellectualcrafters.plot.util;
|
||||||
|
|
||||||
|
import java.util.HashMap;
|
||||||
|
|
||||||
|
import com.intellectualcrafters.plot.commands.SubCommand;
|
||||||
|
|
||||||
public class CmdConfirm {
|
public class CmdConfirm {
|
||||||
public static HashMap<String, SubCommand> pending = new HashMap<>();
|
public static HashMap<String, SubCommand> pending = new HashMap<>();
|
||||||
}
|
}
|
||||||
|
@ -225,6 +225,7 @@ public class SetBlockFast_1_8 extends BukkitSetBlockManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
block.setData(data);
|
block.setData(data);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
switch(currentId) {
|
switch(currentId) {
|
||||||
case 54:
|
case 54:
|
||||||
|
Loading…
Reference in New Issue
Block a user