mirror of
https://github.com/EngineHub/WorldEdit.git
synced 2025-02-11 13:10:15 +08:00
Pin adapter version
This commit is contained in:
parent
d0ecd8da78
commit
9409cc9700
@ -4,11 +4,12 @@
|
||||
|
||||
// For specific version pinning, see
|
||||
// https://papermc.io/repo/service/rest/repository/browse/maven-public/io/papermc/paper/dev-bundle/
|
||||
fun Project.applyPaperweightAdapterConfiguration() {
|
||||
fun Project.applyPaperweightAdapterConfiguration(javaRelease: Int = 16) {
|
||||
applyCommonConfiguration()
|
||||
apply(plugin = "java-library")
|
||||
applyCommonJavaConfiguration(
|
||||
sourcesJar = true,
|
||||
javaRelease = javaRelease,
|
||||
banSlf4j = false,
|
||||
)
|
||||
apply(plugin = "io.papermc.paperweight.userdev")
|
||||
|
@ -1,5 +1,5 @@
|
||||
// TODO await https://github.com/PaperMC/paperweight/issues/116
|
||||
//applyPaperweightAdapterConfiguration()
|
||||
//applyPaperweightAdapterConfiguration(javaRelease = 16)
|
||||
//
|
||||
//dependencies {
|
||||
// paperDevBundle("1.17.1-R0.1-20211120.192557-194")
|
||||
|
@ -1,4 +1,4 @@
|
||||
applyPaperweightAdapterConfiguration()
|
||||
applyPaperweightAdapterConfiguration(javaRelease = 17)
|
||||
|
||||
dependencies {
|
||||
paperDevBundle("1.18-R0.1-20211130.173143-6")
|
||||
|
@ -30,6 +30,7 @@
|
||||
import com.mojang.serialization.Codec;
|
||||
import com.mojang.serialization.Dynamic;
|
||||
import com.mojang.serialization.Lifecycle;
|
||||
import com.sk89q.jnbt.AdventureNBTConverter;
|
||||
import com.sk89q.jnbt.ByteArrayTag;
|
||||
import com.sk89q.jnbt.ByteTag;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
@ -70,6 +71,7 @@
|
||||
import com.sk89q.worldedit.util.formatting.text.Component;
|
||||
import com.sk89q.worldedit.util.formatting.text.TranslatableComponent;
|
||||
import com.sk89q.worldedit.util.io.file.SafeFiles;
|
||||
import com.sk89q.worldedit.util.nbt.CompoundBinaryTag;
|
||||
import com.sk89q.worldedit.world.DataFixer;
|
||||
import com.sk89q.worldedit.world.RegenOptions;
|
||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||
@ -499,13 +501,13 @@ public Component getRichItemName(BaseItemStack itemStack) {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void sendFakeNBT(Player player, BlockVector3 pos, CompoundTag nbtData) {
|
||||
public void sendFakeNBT(Player player, BlockVector3 pos, CompoundBinaryTag nbtData) {
|
||||
((CraftPlayer) player).getHandle().networkManager.send(ClientboundBlockEntityDataPacket.create(
|
||||
new StructureBlockEntity(
|
||||
new BlockPos(pos.getBlockX(), pos.getBlockY(), pos.getBlockZ()),
|
||||
Blocks.STRUCTURE_BLOCK.defaultBlockState()
|
||||
),
|
||||
__ -> (net.minecraft.nbt.CompoundTag) fromNative(nbtData)
|
||||
__ -> (net.minecraft.nbt.CompoundTag) fromNative(AdventureNBTConverter.fromAdventure(nbtData))
|
||||
));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user