3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-03 01:50:07 +01:00
- Fix CharFilterBlock not being properly created (the chunk X and Z were never set)
 - Replace BlockVector3#divide with bitshift because you can't divide down and then bitshift back up with the correct results for negative values
Dieser Commit ist enthalten in:
dordsor21 2020-04-19 13:56:02 +01:00
Ursprung 7b9a64e9a6
Commit b52fc46f19
2 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -148,7 +148,7 @@ public interface IQueueExtent<T extends IChunk> extends Flushable, Trimable, ICh
if (newChunk != null) { if (newChunk != null) {
chunk = newChunk; chunk = newChunk;
if (block == null) { if (block == null) {
block = this.initFilterBlock(); block = this.initFilterBlock().initChunk(chunkX, chunkZ);
} }
chunk.filterBlocks(filter, block, region, full); chunk.filterBlocks(filter, block, region, full);
} }

Datei anzeigen

@ -169,8 +169,11 @@ public abstract class AbstractRegion extends AbstractSet<BlockVector3> implement
public Set<BlockVector2> getChunks() { public Set<BlockVector2> getChunks() {
final Set<BlockVector2> chunks = new HashSet<>(); final Set<BlockVector2> chunks = new HashSet<>();
final BlockVector3 min = getMinimumPoint().divide(16); final BlockVector3 minBlock = getMinimumPoint();
final BlockVector3 max = getMaximumPoint().divide(16); final BlockVector3 maxBlock = getMaximumPoint();
final BlockVector2 min = BlockVector2.at(minBlock.getX() >> 4, minBlock.getZ() >> 4);
final BlockVector2 max = BlockVector2.at(maxBlock.getX() >> 4, maxBlock.getZ() >> 4);
for (int X = min.getBlockX(); X <= max.getBlockX(); ++X) { for (int X = min.getBlockX(); X <= max.getBlockX(); ++X) {
for (int Z = min.getBlockZ(); Z <= max.getBlockZ(); ++Z) { for (int Z = min.getBlockZ(); Z <= max.getBlockZ(); ++Z) {