mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2025-02-11 13:10:15 +08:00
Fix regen on newer Forge due to removed method (#2021)
* Fix regen on newer Forge due to removed method * Use saveWithFullMetadata
This commit is contained in:
parent
e485433805
commit
e118e3dfb2
@ -16,7 +16,7 @@
|
||||
val nextMajorMinecraftVersion: String = minecraftVersion.split('.').let { (useless, major) ->
|
||||
"$useless.${major.toInt() + 1}"
|
||||
}
|
||||
val forgeVersion = "39.0.0"
|
||||
val forgeVersion = "39.0.63"
|
||||
|
||||
val apiClasspath = configurations.create("apiClasspath") {
|
||||
isCanBeResolved = true
|
||||
|
@ -41,7 +41,6 @@
|
||||
import com.sk89q.worldedit.forge.internal.NBTConverter;
|
||||
import com.sk89q.worldedit.forge.internal.TileEntityUtils;
|
||||
import com.sk89q.worldedit.internal.Constants;
|
||||
import com.sk89q.worldedit.internal.util.BiomeMath;
|
||||
import com.sk89q.worldedit.math.BlockVector2;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.math.Vector3;
|
||||
@ -427,9 +426,7 @@ private void regenForWorld(Region region, Extent extent, ServerLevel serverWorld
|
||||
BlockStateHolder<?> state = ForgeAdapter.adapt(chunk.getBlockState(pos));
|
||||
BlockEntity blockEntity = chunk.getBlockEntity(pos);
|
||||
if (blockEntity != null) {
|
||||
net.minecraft.nbt.CompoundTag tag = new net.minecraft.nbt.CompoundTag();
|
||||
blockEntity.save(tag);
|
||||
state = state.toBaseBlock(NBTConverter.fromNative(tag));
|
||||
state = state.toBaseBlock(NBTConverter.fromNative(blockEntity.saveWithFullMetadata()));
|
||||
}
|
||||
extent.setBlock(vec, state.toBaseBlock());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user