Merge remote-tracking branch 'origin/1.16' into 1.16

This commit is contained in:
MattBDev 2020-07-13 13:09:55 -04:00
commit 1e80c0429a
8 changed files with 73 additions and 34 deletions

View File

@ -1,5 +1,5 @@
---
name: Bug / Issue report for FastAsyncWorldEdit v1.15.2
name: Bug / Issue report for FastAsyncWorldEdit v1.16.1
about: Bug / Issue report about this plugin
title: ''
labels: Requires Testing
@ -7,9 +7,9 @@ assignees: ''
---
# Bug report for FastAsyncWorldEdit 1.15.2
<!--- If you are using 1.13 or 1.14 consider updating to 1.15.2 before raising an issue -->
<!--- The priority lays on 1.15 right now, so issues reported for 1.13 or 1.14 will be fixed for the 1.15 versions -->
# Bug report for FastAsyncWorldEdit 1.16.1
<!--- If you are using 1.13 or 1.14 consider updating to 1.16.1 before raising an issue -->
<!--- The priority lays on 1.16 right now, so issues reported for 1.13 or 1.14 will be fixed for the 1.16 versions -->
<!--- In order to create a valid issue report you have to follow this template. -->
<!--- Remove this template if making a suggestion or asking a question. -->
<!--- Incomplete reports will most likely be marked as invalid, and closed, with few exceptions.-->
@ -41,5 +41,5 @@ assignees: ''
<!--- Make sure you've completed the following steps (put an "X" between of brackets): -->
- [] I included all information required in the sections above
- [] I made sure there are no duplicates of this report [(Use Search)](https://github.com/IntellectualSites/FastAsyncWorldEdit/issues?q=is%3Aissue)
- [] I made sure I am using an up-to-date version of [FastAsyncWorldEdit for 1.15.2](https://ci.athion.net/job/FastAsyncWorldEdit-1.15/)
- [] I made sure I am using an up-to-date version of [FastAsyncWorldEdit for 1.16.1](https://ci.athion.net/job/FastAsyncWorldEdit-1.16/)
- [] I made sure the bug/error is not caused by any other plugin

View File

@ -16,4 +16,4 @@ You can do so here: https://github.com/IntellectualSites/FastAsyncWorldEdit/issu
- [] I included all information required in the sections above
- [] I tested my changes and approved their functionality
- [] I ensured my changes do not break other parts of the code
- [] I read and followed the [contribution guidelines](https://github.com/IntellectualSites/FastAsyncWorldEdit/blob/1.15/CONTRIBUTING.md)
- [] I read and followed the [contribution guidelines](https://github.com/IntellectualSites/FastAsyncWorldEdit/blob/1.16/CONTRIBUTING.md)

View File

@ -11,20 +11,15 @@ FAWE is a fork of WorldEdit that has huge speed and memory improvements and cons
* [Spigot Page](https://www.spigotmc.org/threads/fast-async-worldedit.100104/)
* [Discord](https://discord.gg/KxkjDVg)
* [Wiki](https://wiki.intellectualsites.com/FastAsyncWorldEdit/index)
* [Report Issue](https://github.com/IntellectualSites/FastAsyncWorldEdit-1.13/issues)
* [Report Issue](https://github.com/IntellectualSites/FastAsyncWorldEdit/issues)
* [Crowdin](https://intellectualsites.crowdin.com/fastasyncworldedit)
* [JavaDocs](https://ci.athion.net/job/FastAsyncWorldEdit-1.16/javadoc/)
## Downloads
### 1.13+
### 1.14+
* [Download](https://intellectualsites.github.io/download/fawe.html)
* [Jenkins](https://ci.athion.net/job/FastAsyncWorldEdit-1.16/)
### < 1.12.2
* [Download](https://intellectualsites.github.io/download/fawe.html)
* [Jenkins](https://ci.athion.net/job/FastAsyncWorldEdit/)
* [Repository](https://github.com/boy0001/FastAsyncWorldedit)
* [JavaDoc](https://ci.athion.net/job/FastAsyncWorldEdit/javadoc/)
## Building
FAWE uses gradle to build
@ -32,7 +27,7 @@ You can safely ignore `gradlew setupDecompWorkspace` if you are not planning to
```
$ gradlew setupDecompWorkspace
$ gradlew build
$ gradlew clean build -x test
```
The jar is located in `worldedit-bukkit/build/libs/FastAsyncWorldEdit-1.16-###.jar`

View File

@ -115,29 +115,27 @@ public class FaweRegionManager extends RegionManager {
final Pattern plotfloor = hybridPlotWorld.TOP_BLOCK.toPattern();
final BiomeType biome = hybridPlotWorld.getPlotBiome();
BlockVector3 pos1 = plot.getBottomAbs().getBlockVector3();
BlockVector3 pos2 = plot.getExtendedTopAbs().getBlockVector3();
BlockVector3 pos1 = BlockVector3.ZERO;
BlockVector3 pos2 = BlockVector3.at(hybridPlotWorld.PLOT_WIDTH, 255, hybridPlotWorld.PLOT_WIDTH);
Region bedrockRegion = new CuboidRegion(pos1.withY(0), pos2.withY(0));
Region bedrockRegion = new CuboidRegion(pos1, pos2.withY(0));
Region fillingRegion = new CuboidRegion(pos1.withY(1), pos2.withY(hybridPlotWorld.PLOT_HEIGHT - 1));
Region floorRegion = new CuboidRegion(pos1.withY(hybridPlotWorld.PLOT_HEIGHT),
pos2.withY(hybridPlotWorld.PLOT_HEIGHT));
Region airRegion = new CuboidRegion(pos1.withY(hybridPlotWorld.PLOT_HEIGHT + 1),
pos2.withY(manager.getWorldHeight()));
Region floorRegion = new CuboidRegion(pos1.withY(hybridPlotWorld.PLOT_HEIGHT), pos2.withY(hybridPlotWorld.PLOT_HEIGHT));
Region airRegion = new CuboidRegion(pos1.withY(hybridPlotWorld.PLOT_HEIGHT + 1), pos2.withY(manager.getWorldHeight()));
Clipboard clipboard = new BlockArrayClipboard(new CuboidRegion(pos1.withY(0), pos2.withY(255)));
Clipboard clipboard = new BlockArrayClipboard(new CuboidRegion(pos1, pos2));
clipboard.setBlocks(bedrockRegion, bedrock);
clipboard.setBlocks(fillingRegion, filling);
clipboard.setBlocks(floorRegion, plotfloor);
clipboard.setBlocks(airRegion, air);
for (int x = pos1.getX(); x <= pos2.getX(); x ++) {
for (int z = pos1.getX(); z <= pos2.getX(); z ++) {
for (int z = pos1.getZ(); z <= pos2.getZ(); z ++) {
clipboard.setBiome(BlockVector2.at(x, z), biome);
}
}
clipboard.paste(editSession, pos1, true, false, true);
clipboard.paste(editSession, plot.getBottomAbs().getBlockVector3().withY(0), true, false, true);
}
if (hybridPlotWorld.PLOT_SCHEMATIC) {
@ -172,8 +170,7 @@ public class FaweRegionManager extends RegionManager {
//todo because of the following code this should proably be in the Bukkit module
World pos1World = BukkitAdapter.adapt(getWorld(pos1.getWorld()));
World pos3World = BukkitAdapter.adapt(getWorld(pos3.getWorld()));
WorldEdit.getInstance().getEditSessionFactory().getEditSession(
pos1World,-1);
WorldEdit.getInstance().getEditSessionFactory().getEditSession(pos1World,-1);
EditSession sessionA = new EditSessionBuilder(pos1World).checkMemory(false).fastmode(true).limitUnlimited().changeSetNull().autoQueue(false).build();
EditSession sessionB = new EditSessionBuilder(pos3World).checkMemory(false).fastmode(true).limitUnlimited().changeSetNull().autoQueue(false).build();
CuboidRegion regionA = new CuboidRegion(BlockVector3.at(pos1.getX(), pos1.getY(), pos1.getZ()), BlockVector3.at(pos2.getX(), pos2.getY(), pos2.getZ()));
@ -246,11 +243,8 @@ public class FaweRegionManager extends RegionManager {
TaskManager.IMP.async(() -> {
synchronized (FaweRegionManager.class) {
World pos1World = BukkitAdapter.adapt(getWorld(pos1.getWorld()));
try (EditSession editSession = new EditSessionBuilder(pos1World).checkMemory(false)
.fastmode(true).limitUnlimited().changeSetNull().autoQueue(false).build()) {
CuboidRegion region = new CuboidRegion(
BlockVector3.at(pos1.getX(), pos1.getY(), pos1.getZ()),
BlockVector3.at(pos2.getX(), pos2.getY(), pos2.getZ()));
try (EditSession editSession = new EditSessionBuilder(pos1World).checkMemory(false).fastmode(true).limitUnlimited().changeSetNull().autoQueue(false).build()) {
CuboidRegion region = new CuboidRegion(BlockVector3.at(pos1.getX(), pos1.getY(), pos1.getZ()), BlockVector3.at(pos2.getX(), pos2.getY(), pos2.getZ()));
editSession.regenerate(region);
editSession.flushQueue();
}

View File

@ -77,7 +77,7 @@ public class WorldEditCommands {
public void version(Actor actor) {
FaweVersion fVer = Fawe.get().getVersion();
String fVerStr = fVer == null ? "unknown" : "-" + fVer.build;
actor.print(TextComponent.of("FastAsyncWorldEdit" + fVerStr + " created by Empire92"));
actor.print(TextComponent.of("FastAsyncWorldEdit" + fVerStr + " created by Empire92, MattBDev, IronApollo, dordsor21 and NotMyFault"));
if (fVer != null) {
FaweVersion version = Fawe.get().getVersion();

View File

@ -70,6 +70,7 @@ public final class MaskFactory extends AbstractFactory<Mask> {
register(new YAxisMaskParser(worldEdit));
register(new ZAxisMaskParser(worldEdit));
register(new SimplexMaskParser(worldEdit));
register(new AngleMaskParser(worldEdit));
}

View File

@ -0,0 +1,49 @@
package com.sk89q.worldedit.extension.factory.parser.mask;
import com.boydti.fawe.object.mask.AngleMask;
import com.sk89q.worldedit.WorldEdit;
import com.sk89q.worldedit.extension.factory.parser.RichParser;
import com.sk89q.worldedit.extension.input.InputParseException;
import com.sk89q.worldedit.extension.input.ParserContext;
import com.sk89q.worldedit.function.mask.Mask;
import org.jetbrains.annotations.NotNull;
import java.util.stream.Stream;
public class AngleMaskParser extends RichParser<Mask> {
public AngleMaskParser(WorldEdit worldEdit) {
super(worldEdit, "/");
}
@Override
protected Stream<String> getSuggestions(String argumentInput, int index) {
if (index == 0 || index == 1) {
return suggestPositiveDoubles(argumentInput).flatMap(s -> Stream.of(s, s + "d"));
}
return null;
}
@Override
protected Mask parseFromInput(@NotNull String[] arguments, ParserContext context) throws InputParseException {
if (arguments.length != 2) return null;
String minArg = arguments[0];
String maxArg = arguments[1];
boolean degree = minArg.endsWith("d");
if (degree ^ maxArg.endsWith("d")) {
throw new InputParseException("Cannot combine degree with block-step");
}
double min, max;
if (degree) {
double minDeg = Double.parseDouble(minArg.substring(0, minArg.length() - 1));
double maxDeg = Double.parseDouble(maxArg.substring(0, maxArg.length() - 1));
min = (Math.tan(minDeg * (Math.PI / 180)));
max = (Math.tan(maxDeg * (Math.PI / 180)));
} else {
min = Double.parseDouble(minArg);
max = Double.parseDouble(maxArg);
}
return new AngleMask(context.getExtent(), min, max, false, 1);
}
}

View File

@ -56,7 +56,7 @@ public class BlocksMaskParser extends InputParser<Mask> {
return null;
}
return new BlockMask(context.requireExtent(), holders);
} catch (NoMatchException e) {
} catch (InputParseException e) {
return null;
}
}