mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-22 17:27:38 +00:00
Merge remote-tracking branch 'origin/main'
This commit is contained in:
commit
8981a5c484
@ -191,7 +191,7 @@ public class BukkitGetBlocks_1_15_2 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (sky) {
|
if (sky) {
|
||||||
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
||||||
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
||||||
if (nibble != null) {
|
if (nibbleSky != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibbleSky) {
|
synchronized (nibbleSky) {
|
||||||
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
||||||
|
@ -192,7 +192,7 @@ public class BukkitGetBlocks_1_16_1 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (sky) {
|
if (sky) {
|
||||||
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
||||||
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
||||||
if (nibble != null) {
|
if (nibbleSky != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibbleSky) {
|
synchronized (nibbleSky) {
|
||||||
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
||||||
|
@ -192,7 +192,7 @@ public class BukkitGetBlocks_1_16_2 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (sky) {
|
if (sky) {
|
||||||
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
||||||
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
||||||
if (nibble != null) {
|
if (nibbleSky != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibbleSky) {
|
synchronized (nibbleSky) {
|
||||||
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
||||||
|
@ -192,7 +192,7 @@ public class BukkitGetBlocks_1_16_5 extends CharGetBlocks implements BukkitGetBl
|
|||||||
if (sky) {
|
if (sky) {
|
||||||
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
SectionPosition sectionPositionSky = SectionPosition.a(getChunk().getPos(), layer);
|
||||||
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
NibbleArray nibbleSky = world.getChunkProvider().getLightEngine().a(EnumSkyBlock.SKY).a(sectionPositionSky);
|
||||||
if (nibble != null) {
|
if (nibbleSky != null) {
|
||||||
lightUpdate = true;
|
lightUpdate = true;
|
||||||
synchronized (nibbleSky) {
|
synchronized (nibbleSky) {
|
||||||
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
byte[] bytes = PaperLib.isPaper() ? nibbleSky.getIfSet() : nibbleSky.asBytes();
|
||||||
|
@ -63,7 +63,6 @@ import org.bukkit.inventory.Inventory;
|
|||||||
import org.bukkit.inventory.InventoryHolder;
|
import org.bukkit.inventory.InventoryHolder;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.lang.ref.WeakReference;
|
import java.lang.ref.WeakReference;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -290,6 +289,9 @@ public class BukkitWorld extends AbstractWorld {
|
|||||||
for (TreeGenerator.TreeType type : TreeGenerator.TreeType.values()) {
|
for (TreeGenerator.TreeType type : TreeGenerator.TreeType.values()) {
|
||||||
if (treeTypeMapping.get(type) == null) {
|
if (treeTypeMapping.get(type) == null) {
|
||||||
WorldEdit.logger.error("No TreeType mapping for TreeGenerator.TreeType." + type);
|
WorldEdit.logger.error("No TreeType mapping for TreeGenerator.TreeType." + type);
|
||||||
|
// FAWE start
|
||||||
|
WorldEdit.logger.warn("Your FAWE version is newer than " + Bukkit.getVersion() + " and contains features of future minecraft versions which do not exist in " + Bukkit.getVersion() + ", hence the tree type " + type + " is not available.");
|
||||||
|
// FAWE end
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -78,7 +78,7 @@ public class DiskOptimizedClipboard extends LinearClipboard implements Closeable
|
|||||||
public DiskOptimizedClipboard(BlockVector3 dimensions, File file) {
|
public DiskOptimizedClipboard(BlockVector3 dimensions, File file) {
|
||||||
super(dimensions);
|
super(dimensions);
|
||||||
if (HEADER_SIZE + ((long) getVolume() << 1) >= Integer.MAX_VALUE) {
|
if (HEADER_SIZE + ((long) getVolume() << 1) >= Integer.MAX_VALUE) {
|
||||||
throw new IllegalArgumentException("Dimensions too large for this clipboard format");
|
throw new IllegalArgumentException("Dimensions too large for this clipboard format. Use //lazycopy for large selections.");
|
||||||
} else if (HEADER_SIZE + ((long) getVolume() << 1) + (long) ((getHeight() >> 2) + 1) * ((getLength() >> 2) + 1) * ((getWidth() >> 2) + 1) >= Integer.MAX_VALUE) {
|
} else if (HEADER_SIZE + ((long) getVolume() << 1) + (long) ((getHeight() >> 2) + 1) * ((getLength() >> 2) + 1) * ((getWidth() >> 2) + 1) >= Integer.MAX_VALUE) {
|
||||||
log.error("Dimensions are too large for biomes to be stored in a DiskOptimizedClipboard");
|
log.error("Dimensions are too large for biomes to be stored in a DiskOptimizedClipboard");
|
||||||
canHaveBiomes = false;
|
canHaveBiomes = false;
|
||||||
|
@ -344,7 +344,6 @@ public class BrushCommands {
|
|||||||
@Switch(name = 'd', desc = "sags the catenary toward the facing direction")
|
@Switch(name = 'd', desc = "sags the catenary toward the facing direction")
|
||||||
boolean facingDirection) throws WorldEditException {
|
boolean facingDirection) throws WorldEditException {
|
||||||
worldEdit.checkMaxBrushRadius(radius);
|
worldEdit.checkMaxBrushRadius(radius);
|
||||||
Brush brush = new CatenaryBrush(shell, select, facingDirection, lengthFactor);
|
|
||||||
set(context, new CatenaryBrush(shell, select, facingDirection, lengthFactor))
|
set(context, new CatenaryBrush(shell, select, facingDirection, lengthFactor))
|
||||||
.setSize(radius).setFill(fill);
|
.setSize(radius).setFill(fill);
|
||||||
}
|
}
|
||||||
|
@ -284,7 +284,7 @@ public class ToolUtilCommands {
|
|||||||
)
|
)
|
||||||
@CommandPermissions("worldedit.brush.targetoffset")
|
@CommandPermissions("worldedit.brush.targetoffset")
|
||||||
public void targetOffset(Player player, EditSession editSession, LocalSession session,
|
public void targetOffset(Player player, EditSession editSession, LocalSession session,
|
||||||
int offset) throws WorldEditException {
|
@Arg(name = "offset", desc = "offset", def = "0") int offset) throws WorldEditException {
|
||||||
BrushTool tool = session.getBrushTool(player, false);
|
BrushTool tool = session.getBrushTool(player, false);
|
||||||
if (tool == null) {
|
if (tool == null) {
|
||||||
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
|
player.print(TranslatableComponent.of("fawe.worldedit.brush.brush.none"));
|
||||||
|
@ -205,7 +205,6 @@ public class BlockTypesCache {
|
|||||||
String defaultState = blockMap.remove(id);
|
String defaultState = blockMap.remove(id);
|
||||||
if (defaultState == null) {
|
if (defaultState == null) {
|
||||||
if (internalId != 0) {
|
if (internalId != 0) {
|
||||||
getLogger(BlockTypesCache.class).info("Ignoring invalid block {}", id);
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
defaultState = id;
|
defaultState = id;
|
||||||
|
Loading…
Reference in New Issue
Block a user