mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Attempt to fix compile and other small changes
This commit is contained in:
parent
6cbbefc0de
commit
630245bb9f
@ -103,7 +103,7 @@ public class AsyncWorld extends PassthroughExtent implements World {
|
||||
/**
|
||||
* @deprecated use {@link #wrap(World)} instead
|
||||
* @param parent
|
||||
* @param queue
|
||||
* @param extent
|
||||
*/
|
||||
@Deprecated
|
||||
public AsyncWorld(World parent, Extent extent) {
|
||||
|
@ -22,8 +22,6 @@ public class ChunkCache<T extends Trimable> implements IChunkCache<T> {
|
||||
/**
|
||||
* Get or create the IGetBlocks
|
||||
*
|
||||
* @param index chunk index {@link com.boydti.fawe.util.MathMan#pairInt(int, int)}
|
||||
* @param provider used to create if it isn't already cached
|
||||
* @return cached IGetBlocks
|
||||
*/
|
||||
@Override
|
||||
|
@ -29,7 +29,7 @@ import java.util.concurrent.Future;
|
||||
* Single threaded implementation for IQueueExtent (still abstract) - Does not implement creation of
|
||||
* chunks (that has to implemented by the platform e.g., Bukkit)
|
||||
* <p>
|
||||
* This queue is reusable {@link #init(IChunkCache)}
|
||||
* This queue is reusable {@link #init(Extent, IChunkCache, IChunkCache)} }
|
||||
*/
|
||||
public class SingleThreadQueueExtent extends ExtentBatchProcessorHolder implements IQueueExtent<IQueueChunk> {
|
||||
|
||||
@ -103,7 +103,6 @@ public class SingleThreadQueueExtent extends ExtentBatchProcessorHolder implemen
|
||||
/**
|
||||
* Initialize the queue
|
||||
*
|
||||
* @param cache
|
||||
*/
|
||||
@Override
|
||||
public synchronized void init(Extent extent, IChunkCache<IChunkGet> get, IChunkCache<IChunkSet> set) {
|
||||
@ -146,7 +145,6 @@ public class SingleThreadQueueExtent extends ExtentBatchProcessorHolder implemen
|
||||
* Submit without first checking that it has been removed from the chunk map
|
||||
*
|
||||
* @param chunk
|
||||
* @param <T>
|
||||
* @return
|
||||
*/
|
||||
private <V extends Future<V>> V submitUnchecked(IQueueChunk chunk) {
|
||||
|
@ -75,7 +75,6 @@ import java.util.function.Consumer;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.IntStream;
|
||||
import javax.imageio.ImageIO;
|
||||
import org.checkerframework.checker.nullness.qual.NonNull;
|
||||
import org.enginehub.piston.annotation.Command;
|
||||
import org.enginehub.piston.annotation.CommandContainer;
|
||||
import org.enginehub.piston.annotation.param.Arg;
|
||||
@ -88,7 +87,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
public class CFICommands {
|
||||
|
||||
private final WorldEdit worldEdit;
|
||||
private final @NonNull TextComponent doubleNewLine = TextComponent.of("\n\n");
|
||||
private final TextComponent doubleNewLine = TextComponent.of("\n\n");
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
@ -111,7 +110,7 @@ public class CFICommands {
|
||||
desc = "Start CFI with a height map as a base"
|
||||
)
|
||||
@CommandPermissions("worldedit.anvil.cfi")
|
||||
public void heightmap(Player player, @Arg(def = "", desc = "image url or filename") ProvideBindings.ImageUri image, @Arg(name = "yscale", desc = "double", def = "1") double yscale) {
|
||||
public void heightmap(Player player, @Arg(def = "", desc = "image url or filename") ProvideBindings.ImageUri image, @Arg(desc = "double", def = "1") double yscale) {
|
||||
if (yscale != 0) {
|
||||
int[] raw = ((DataBufferInt) image.load().getRaster().getDataBuffer()).getData();
|
||||
int[] table = IntStream.range(0, 256).map(i -> Math.min(255, (int) (i * yscale)))
|
||||
|
@ -1,5 +1,8 @@
|
||||
package com.boydti.fawe.object.collection;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.boydti.fawe.object.FaweInputStream;
|
||||
import com.boydti.fawe.object.FaweOutputStream;
|
||||
import com.boydti.fawe.object.io.serialize.Serialize;
|
||||
@ -8,12 +11,8 @@ import java.io.IOException;
|
||||
import java.lang.reflect.Array;
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
/**
|
||||
* Records changes made through the {@link #setByte(int, byte)} or {@link #setChar(int, char)} method<br/>
|
||||
* Records changes made through the {@link #setByte(int, byte)} or {@link #setInt(int, int)} method<br/>
|
||||
* If you are editing the raw data, use {@link #record(Runnable)}
|
||||
* @param <T>
|
||||
*/
|
||||
|
@ -6,7 +6,7 @@ import java.io.IOException;
|
||||
import java.lang.reflect.Array;
|
||||
|
||||
/**
|
||||
* Records changes made through the {@link #set(int, int, int, int)} method<br/>
|
||||
* Records changes made through the {@link #set(int, int, int, char)} method<br/>
|
||||
* Changes are not recorded if you edit the raw data
|
||||
*/
|
||||
public final class DifferentialBlockBuffer implements DifferentialCollection<char[][][][][]> {
|
||||
|
@ -502,9 +502,12 @@ public class BrushCommands {
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.scatter")
|
||||
public void scatterBrush(InjectedValueAccess context, Pattern fill,
|
||||
@Arg(desc = "Expression", def = "5") Expression radius,
|
||||
@Arg(desc = "double", def = "5") double points,
|
||||
@Arg(desc = "double", def = "1") double distance,
|
||||
@Arg(desc = "Expression", def = "5")
|
||||
Expression radius,
|
||||
@Arg(desc = "double", def = "5")
|
||||
double points,
|
||||
@Arg(desc = "double", def = "1")
|
||||
double distance,
|
||||
@Switch(name = 'o', desc = "Overlay the block") boolean overlay) throws WorldEditException {
|
||||
worldEdit.checkMaxBrushRadius(radius);
|
||||
Brush brush;
|
||||
@ -585,14 +588,18 @@ public class BrushCommands {
|
||||
desc = "Run commands at random points on a surface",
|
||||
descFooter =
|
||||
"Run commands at random points on a surface\n" +
|
||||
" - The scatter radius is the min distance between each point\n" +
|
||||
" - Your selection will be expanded to the specified size around each point\n" +
|
||||
" - Placeholders: {x}, {y}, {z}, {world}, {size}"
|
||||
)
|
||||
@CommandPermissions("worldedit.brush.scattercommand")
|
||||
public void scatterCommandBrush(Player player, InjectedValueAccess context,
|
||||
@Arg(desc = "Expression") Expression radius, double points,
|
||||
double distance, List<String> commandStr) throws WorldEditException {
|
||||
@Arg(desc = "The minimum distance between each point")
|
||||
Expression radius,
|
||||
@Arg(desc = "double", def = "1")
|
||||
double points,
|
||||
@Arg(desc = "double", def = "1")
|
||||
double distance,
|
||||
List<String> commandStr) throws WorldEditException {
|
||||
worldEdit.checkMaxBrushRadius(radius);
|
||||
set(context,
|
||||
new ScatterCommand((int) points, (int) distance, StringMan.join(commandStr, " ")))
|
||||
|
@ -295,14 +295,13 @@ public interface World extends Extent, Keyed, IChunkCache<IChunkGet> {
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh a specific chunk with a bitMask (0 = default, 65535 = all block sections)
|
||||
* Refresh a specific chunk
|
||||
* Note: only 0 is guaranteed to send all tiles / entities
|
||||
* Note: Only 65535 is guaranteed to send all blocks
|
||||
* @param chunkX
|
||||
* @param chunkZ
|
||||
* @param bitMask
|
||||
*/
|
||||
void refreshChunk(final int X, final int Z);
|
||||
void refreshChunk(final int chunkX, final int chunkZ);
|
||||
|
||||
@Override
|
||||
IChunkGet get(int x, int z);
|
||||
|
Loading…
Reference in New Issue
Block a user