Skip to content

Commit 2b54302

Browse files
committed
Merge branch 'version/7.3.x'
2 parents 4726327 + 3b407aa commit 2b54302

File tree

16 files changed

+61
-29
lines changed

16 files changed

+61
-29
lines changed

.github/workflows/gradle.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Gradle Build
2-
on: [push, pull_request]
2+
on: [push, pull_request, merge_group]
33

44
jobs:
55
build:

CHANGELOG.txt

+11
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,14 @@
1+
7.3.11
2+
- Added //mirror as an alias for //flip
3+
- Fixed an issue where tree generation can get incorrect world state, impacting generation
4+
- Fixed masks for biome operations only applying to //setbiome
5+
- Fixed some bugs in the snapshot system
6+
- Fixed CUI packets being sent to clients unnecessarily
7+
- Fixed cone generation with negative heights
8+
- Fixed world height off-by-one discrepancy since change in Minecraft 1.21.3
9+
- Fixed cases where the task executor would not be shut down correctly
10+
- [NeoForge] Fixed legacy blocks failing to load in some instances
11+
112
7.3.10
213
- Added support for 1.21.4
314
- Improved a few translation lines relating to URLs and newlines

gradle/libs.versions.toml

+3-2
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jfrog-buildinfo = "org.jfrog.buildinfo:build-info-extractor-gradle:5.2.0"
4848
# https://maven.fabricmc.net/net/fabricmc/sponge-mixin/
4949
fabric-mixin = "net.fabricmc:sponge-mixin:0.15.3+mixin.0.8.7"
5050

51-
paperweight = "io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:1.7.5"
51+
paperweight = "io.papermc.paperweight.userdev:io.papermc.paperweight.userdev.gradle.plugin:2.0.0-beta.16"
5252

5353
linBus-bom = "org.enginehub.lin-bus:lin-bus-bom:0.2.0"
5454
linBus-common.module = "org.enginehub.lin-bus:lin-bus-common"
@@ -75,7 +75,8 @@ mockito-junit-jupiter.module = "org.mockito:mockito-junit-jupiter"
7575

7676
commonsCli = "commons-cli:commons-cli:1.4"
7777

78-
paperApi = "io.papermc.paper:paper-api:1.21.4-R0.1-20250118.134032-116"
78+
# https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/paper-api/
79+
paperApi = "io.papermc.paper:paper-api:1.21.4-R0.1-20250327.133756-218"
7980
paperLib = "io.papermc:paperlib:1.0.8"
8081

8182
dummypermscompat = "com.sk89q:dummypermscompat:1.10"

gradle/wrapper/gradle-wrapper.jar

122 Bytes
Binary file not shown.

gradle/wrapper/gradle-wrapper.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10.2-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
44
networkTimeout=10000
55
validateDistributionUrl=true
66
zipStoreBase=GRADLE_USER_HOME

gradlew

+2-3
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,7 @@ done
8686
# shellcheck disable=SC2034
8787
APP_BASE_NAME=${0##*/}
8888
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89-
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
90-
' "$PWD" ) || exit
89+
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
9190

9291
# Use the maximum available, or set MAX_FD != -1 to use that value.
9392
MAX_FD=maximum
@@ -206,7 +205,7 @@ fi
206205
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
207206

208207
# Collect all arguments for the java command:
209-
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
208+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
210209
# and any embedded shellness will be escaped.
211210
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
212211
# treated as '${Hostname}' itself on the command line.

settings.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ pluginManagement {
99
}
1010
plugins {
1111
id("org.gradle.toolchains.foojay-resolver-convention") version "0.8.0"
12-
id("fabric-loom") version "1.8.10"
12+
id("fabric-loom") version "1.10.1"
1313
}
1414
dependencyResolutionManagement {
1515
repositories {

worldedit-bukkit/adapters/adapter-1.21.3/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ plugins {
66

77
dependencies {
88
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
9-
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.21.3-R0.1-20241025.163321-1")
9+
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.21.3-R0.1-20250328.155925-87")
1010
}

worldedit-bukkit/adapters/adapter-1.21.4/build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ plugins {
66

77
dependencies {
88
// https://repo.papermc.io/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
9-
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.21.4-R0.1-20241205.222346-7")
9+
the<PaperweightUserDependenciesExtension>().paperDevBundle("1.21.4-R0.1-20250327.133756-218")
1010
}

worldedit-bukkit/src/main/java/com/sk89q/worldedit/bukkit/BukkitBlockRegistry.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public boolean isBurnable() {
102102
return material.isBurnable();
103103
}
104104

105-
@SuppressWarnings("deprecation")
105+
@SuppressWarnings("removal")
106106
@Override
107107
public boolean isTranslucent() {
108108
return super.isTranslucent() || material.isTransparent();

worldedit-core/src/main/java/com/sk89q/worldedit/command/tool/QueryTool.java

+8-2
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import com.sk89q.worldedit.util.Location;
3131
import com.sk89q.worldedit.util.formatting.text.TextComponent;
3232
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
33+
import com.sk89q.worldedit.util.formatting.text.event.ClickEvent;
3334
import com.sk89q.worldedit.util.formatting.text.event.HoverEvent;
3435
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
3536
import com.sk89q.worldedit.world.World;
@@ -58,8 +59,13 @@ public boolean actPrimary(Platform server, LocalConfiguration config, Player pla
5859
TextComponent.Builder builder = TextComponent.builder();
5960
builder.append(TextComponent.of("@" + clicked.toVector().toBlockPoint() + ": ", TextColor.BLUE));
6061
builder.append(block.getBlockType().getRichName().color(TextColor.YELLOW));
61-
builder.append(TextComponent.of(" (" + block + ") ", TextColor.GRAY)
62-
.hoverEvent(HoverEvent.of(HoverEvent.Action.SHOW_TEXT, TranslatableComponent.of("worldedit.tool.info.blockstate.hover"))));
62+
63+
String blockStateString = block.toString();
64+
TextComponent blockStateComponent = TextComponent.of(" (" + blockStateString + ") ", TextColor.GRAY)
65+
.hoverEvent(HoverEvent.of(HoverEvent.Action.SHOW_TEXT, TranslatableComponent.of("worldedit.tool.info.blockstate.hover")))
66+
.clickEvent(ClickEvent.of(ClickEvent.Action.COPY_TO_CLIPBOARD, blockStateString));
67+
builder.append(blockStateComponent);
68+
6369
final int internalId = BlockStateIdAccess.getBlockStateId(block.toImmutableState());
6470
if (BlockStateIdAccess.isValidInternalId(internalId)) {
6571
builder.append(TextComponent.of(" (" + internalId + ") ", TextColor.DARK_GRAY)

worldedit-core/src/main/java/com/sk89q/worldedit/extent/clipboard/BlockArrayClipboard.java

+27-10
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,25 @@
4040
import static com.google.common.base.Preconditions.checkNotNull;
4141

4242
/**
43-
* Stores block data as a multi-dimensional array of {@link BaseBlock}s and
43+
* Stores block data as an array of {@link BaseBlock}s and
4444
* other data as lists or maps.
4545
*/
4646
public class BlockArrayClipboard implements Clipboard {
4747

4848
private final Region region;
4949
private BlockVector3 origin;
50-
private final BaseBlock[][][] blocks;
51-
private BiomeType[][][] biomes = null;
50+
/**
51+
* Stride for y-index, for faster access to blocks/biomes array.
52+
*/
53+
private final int yStride;
54+
/**
55+
* Stride for z-index, for faster access to blocks/biomes array.
56+
*/
57+
private final int zStride;
58+
// Laid out in x-y-z order, as that's how we currently loop over positions.
59+
private final BaseBlock[] blocks;
60+
// Laid out in x-y-z order, as that's how we currently loop over positions.
61+
private BiomeType[] biomes = null;
5262
private final List<ClipboardEntity> entities = new ArrayList<>();
5363

5464
/**
@@ -64,7 +74,13 @@ public BlockArrayClipboard(Region region) {
6474
this.origin = region.getMinimumPoint();
6575

6676
BlockVector3 dimensions = getDimensions();
67-
blocks = new BaseBlock[dimensions.x()][dimensions.y()][dimensions.z()];
77+
blocks = new BaseBlock[dimensions.x() * dimensions.y() * dimensions.z()];
78+
yStride = dimensions.x();
79+
zStride = yStride * dimensions.y();
80+
}
81+
82+
private int indexBlockVecBasedArray(BlockVector3 v) {
83+
return v.x() + (v.y() * yStride) + (v.z() * zStride);
6884
}
6985

7086
@Override
@@ -125,7 +141,7 @@ public Entity createEntity(Location location, BaseEntity entity) {
125141
public BlockState getBlock(BlockVector3 position) {
126142
if (region.contains(position)) {
127143
BlockVector3 v = position.subtract(region.getMinimumPoint());
128-
BaseBlock block = blocks[v.x()][v.y()][v.z()];
144+
BaseBlock block = blocks[indexBlockVecBasedArray(v)];
129145
if (block != null) {
130146
return block.toImmutableState();
131147
}
@@ -138,7 +154,7 @@ public BlockState getBlock(BlockVector3 position) {
138154
public BaseBlock getFullBlock(BlockVector3 position) {
139155
if (region.contains(position)) {
140156
BlockVector3 v = position.subtract(region.getMinimumPoint());
141-
BaseBlock block = blocks[v.x()][v.y()][v.z()];
157+
BaseBlock block = blocks[indexBlockVecBasedArray(v)];
142158
if (block != null) {
143159
return block;
144160
}
@@ -151,7 +167,7 @@ public BaseBlock getFullBlock(BlockVector3 position) {
151167
public <B extends BlockStateHolder<B>> boolean setBlock(BlockVector3 position, B block) {
152168
if (region.contains(position)) {
153169
BlockVector3 v = position.subtract(region.getMinimumPoint());
154-
blocks[v.x()][v.y()][v.z()] = block.toBaseBlock();
170+
blocks[indexBlockVecBasedArray(v)] = block.toBaseBlock();
155171
return true;
156172
} else {
157173
return false;
@@ -168,7 +184,7 @@ public BiomeType getBiome(BlockVector3 position) {
168184
if (biomes != null
169185
&& position.containedWithin(getMinimumPoint(), getMaximumPoint())) {
170186
BlockVector3 v = position.subtract(region.getMinimumPoint());
171-
BiomeType biomeType = biomes[v.x()][v.y()][v.z()];
187+
BiomeType biomeType = biomes[indexBlockVecBasedArray(v)];
172188
if (biomeType != null) {
173189
return biomeType;
174190
}
@@ -182,9 +198,10 @@ public boolean setBiome(BlockVector3 position, BiomeType biome) {
182198
if (position.containedWithin(getMinimumPoint(), getMaximumPoint())) {
183199
BlockVector3 v = position.subtract(region.getMinimumPoint());
184200
if (biomes == null) {
185-
biomes = new BiomeType[region.getWidth()][region.getHeight()][region.getLength()];
201+
BlockVector3 dimensions = getDimensions();
202+
biomes = new BiomeType[dimensions.x() * dimensions.y() * dimensions.z()];
186203
}
187-
biomes[v.x()][v.y()][v.z()] = biome;
204+
biomes[indexBlockVecBasedArray(v)] = biome;
188205
return true;
189206
}
190207
return false;

worldedit-core/src/main/resources/lang/strings.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,7 @@
313313
"worldedit.tool.tree.equip": "Tree tool bound to {0}.",
314314
"worldedit.tool.tree.obstructed": "A tree can't go there.",
315315
"worldedit.tool.info.equip": "Info tool bound to {0}.",
316-
"worldedit.tool.info.blockstate.hover": "Block state",
316+
"worldedit.tool.info.blockstate.hover": "Block state (click to copy)",
317317
"worldedit.tool.info.internalid.hover": "Internal ID",
318318
"worldedit.tool.info.legacy.hover": "Legacy id:data",
319319
"worldedit.tool.info.light.hover": "Block Light/Light Above",

worldedit-fabric/build.gradle.kts

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
2-
import net.fabricmc.loom.api.LoomGradleExtensionAPI
3-
import net.fabricmc.loom.configuration.FabricApiExtension
42
import net.fabricmc.loom.task.RemapJarTask
53
import net.fabricmc.loom.task.RunGameTask
64

@@ -52,7 +50,7 @@ dependencies {
5250
.toSet()
5351
// [2] Request the matching dependency from fabric-loom
5452
for (wantedDependency in wantedDependencies) {
55-
val dep = project.the<FabricApiExtension>().module(wantedDependency, libs.versions.fabric.api.get())
53+
val dep = fabricApi.module(wantedDependency, libs.versions.fabric.api.get())
5654
"include"(dep)
5755
"modImplementation"(dep)
5856
}

worldedit-fabric/src/main/java/com/sk89q/worldedit/fabric/FabricDataFixer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ private static void convertItems(net.minecraft.nbt.CompoundTag nbttagcompound, S
595595
ListTag nbttaglist = nbttagcompound.getList(key, 10);
596596

597597
for (int j = 0; j < nbttaglist.size(); ++j) {
598-
nbttaglist.add(j, convert(LegacyType.ITEM_INSTANCE, nbttaglist.getCompound(j), sourceVer, targetVer));
598+
nbttaglist.set(j, convert(LegacyType.ITEM_INSTANCE, nbttaglist.getCompound(j), sourceVer, targetVer));
599599
}
600600
}
601601

worldedit-neoforge/src/main/java/com/sk89q/worldedit/neoforge/NeoForgeDataFixer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -595,7 +595,7 @@ private static void convertItems(net.minecraft.nbt.CompoundTag nbttagcompound, S
595595
ListTag nbttaglist = nbttagcompound.getList(key, 10);
596596

597597
for (int j = 0; j < nbttaglist.size(); ++j) {
598-
nbttaglist.add(j, convert(LegacyType.ITEM_INSTANCE, nbttaglist.getCompound(j), sourceVer, targetVer));
598+
nbttaglist.set(j, convert(LegacyType.ITEM_INSTANCE, nbttaglist.getCompound(j), sourceVer, targetVer));
599599
}
600600
}
601601

0 commit comments

Comments
 (0)