Few fixes

This commit is contained in:
dordsor21 2022-01-26 13:21:18 +00:00 committed by Jordan
parent fae95b758a
commit 0d468505bb
3 changed files with 9 additions and 9 deletions

View File

@ -150,7 +150,7 @@ public class ClassicPlotManager extends SquarePlotManager {
classicPlotWorld, classicPlotWorld,
plot.getRegions(), plot.getRegions(),
blocks, blocks,
1, classicPlotWorld.getMinGenHeight() + 1,
classicPlotWorld.getMaxGenHeight(), classicPlotWorld.getMaxGenHeight(),
actor, actor,
queue queue
@ -211,7 +211,7 @@ public class ClassicPlotManager extends SquarePlotManager {
classicPlotWorld, classicPlotWorld,
plot.getRegions(), plot.getRegions(),
blocks, blocks,
1, classicPlotWorld.getMinGenHeight() + 1,
classicPlotWorld.PLOT_HEIGHT - 1, classicPlotWorld.PLOT_HEIGHT - 1,
actor, actor,
queue queue
@ -245,6 +245,7 @@ public class ClassicPlotManager extends SquarePlotManager {
int x = MathMan.average(corners[0].getX(), corners[1].getX()); int x = MathMan.average(corners[0].getX(), corners[1].getX());
int z = MathMan.average(corners[0].getZ(), corners[1].getZ()); int z = MathMan.average(corners[0].getZ(), corners[1].getZ());
queue.setBlock(x, classicPlotWorld.PLOT_HEIGHT, z, blocks); queue.setBlock(x, classicPlotWorld.PLOT_HEIGHT, z, blocks);
System.out.println(classicPlotWorld.PLOT_HEIGHT);
return !enqueue || queue.enqueue(); return !enqueue || queue.enqueue();
} }
@ -389,7 +390,7 @@ public class ClassicPlotManager extends SquarePlotManager {
if (!plot.isMerged(Direction.NORTH)) { if (!plot.isMerged(Direction.NORTH)) {
int z = bot.getZ(); int z = bot.getZ();
for (int x = bot.getX(); x < top.getX(); x++) { for (int x = bot.getX(); x < top.getX(); x++) {
for (int y = 1; y <= classicPlotWorld.WALL_HEIGHT; y++) { for (int y = classicPlotWorld.getMinGenHeight() + 1; y <= classicPlotWorld.WALL_HEIGHT; y++) {
queue.setBlock(x, y, z, blocks); queue.setBlock(x, y, z, blocks);
} }
} }
@ -397,7 +398,7 @@ public class ClassicPlotManager extends SquarePlotManager {
if (!plot.isMerged(Direction.WEST)) { if (!plot.isMerged(Direction.WEST)) {
int x = bot.getX(); int x = bot.getX();
for (int z = bot.getZ(); z < top.getZ(); z++) { for (int z = bot.getZ(); z < top.getZ(); z++) {
for (int y = 1; y <= classicPlotWorld.WALL_HEIGHT; y++) { for (int y = classicPlotWorld.getMinGenHeight() + 1; y <= classicPlotWorld.WALL_HEIGHT; y++) {
queue.setBlock(x, y, z, blocks); queue.setBlock(x, y, z, blocks);
} }
} }
@ -405,7 +406,7 @@ public class ClassicPlotManager extends SquarePlotManager {
if (!plot.isMerged(Direction.SOUTH)) { if (!plot.isMerged(Direction.SOUTH)) {
int z = top.getZ(); int z = top.getZ();
for (int x = bot.getX(); x < top.getX() + (plot.isMerged(Direction.EAST) ? 0 : 1); x++) { for (int x = bot.getX(); x < top.getX() + (plot.isMerged(Direction.EAST) ? 0 : 1); x++) {
for (int y = 1; y <= classicPlotWorld.WALL_HEIGHT; y++) { for (int y = classicPlotWorld.getMinGenHeight() + 1; y <= classicPlotWorld.WALL_HEIGHT; y++) {
queue.setBlock(x, y, z, blocks); queue.setBlock(x, y, z, blocks);
} }
} }
@ -413,7 +414,7 @@ public class ClassicPlotManager extends SquarePlotManager {
if (!plot.isMerged(Direction.EAST)) { if (!plot.isMerged(Direction.EAST)) {
int x = top.getX(); int x = top.getX();
for (int z = bot.getZ(); z < top.getZ() + (plot.isMerged(Direction.SOUTH) ? 0 : 1); z++) { for (int z = bot.getZ(); z < top.getZ() + (plot.isMerged(Direction.SOUTH) ? 0 : 1); z++) {
for (int y = 1; y <= classicPlotWorld.WALL_HEIGHT; y++) { for (int y = classicPlotWorld.getMinGenHeight() + 1; y <= classicPlotWorld.WALL_HEIGHT; y++) {
queue.setBlock(x, y, z, blocks); queue.setBlock(x, y, z, blocks);
} }
} }

View File

@ -52,7 +52,6 @@ import com.plotsquared.core.plot.flag.FlagParseException;
import com.plotsquared.core.plot.flag.GlobalFlagContainer; import com.plotsquared.core.plot.flag.GlobalFlagContainer;
import com.plotsquared.core.plot.flag.PlotFlag; import com.plotsquared.core.plot.flag.PlotFlag;
import com.plotsquared.core.plot.flag.implementations.DoneFlag; import com.plotsquared.core.plot.flag.implementations.DoneFlag;
import com.plotsquared.core.plot.flag.types.DoubleFlag;
import com.plotsquared.core.queue.GlobalBlockQueue; import com.plotsquared.core.queue.GlobalBlockQueue;
import com.plotsquared.core.queue.QueueCoordinator; import com.plotsquared.core.queue.QueueCoordinator;
import com.plotsquared.core.util.MathMan; import com.plotsquared.core.util.MathMan;

View File

@ -91,7 +91,7 @@ public class LocalChunk {
} }
public void setBiome(final int x, final int y, final int z, final @NonNull BiomeType biomeType) { public void setBiome(final int x, final int y, final int z, final @NonNull BiomeType biomeType) {
final int i = y >> 4; final int i = (y >> 4) - minSection;
final int j = ChunkUtil.getJ(x, y, z); final int j = ChunkUtil.getJ(x, y, z);
BiomeType[] array = this.biomes[i]; BiomeType[] array = this.biomes[i];
if (array == null) { if (array == null) {
@ -106,7 +106,7 @@ public class LocalChunk {
} }
public void setBlock(final int x, final int y, final int z, final @NonNull BaseBlock baseBlock) { public void setBlock(final int x, final int y, final int z, final @NonNull BaseBlock baseBlock) {
final int i = y >> 4; final int i = (y >> 4) - minSection;
final int j = ChunkUtil.getJ(x, y, z); final int j = ChunkUtil.getJ(x, y, z);
BaseBlock[] array = baseblocks[i]; BaseBlock[] array = baseblocks[i];
if (array == null) { if (array == null) {