From 6dd7190fc597b3dcc9340add25429ca3dbed0dbe Mon Sep 17 00:00:00 2001 From: Sauilitired Date: Sun, 31 Mar 2019 10:39:52 +0200 Subject: [PATCH] Fix the tile entity deal-io only, and also took the liberty to make sure that the splash file doesn't prevent building. xoxo. --- build.gradle | 6 +++++- .../bukkit/adapter/v1_13_1/Spigot_v1_13_R2.java | 17 +++++++---------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/build.gradle b/build.gradle index 9c7094c6f..ac4274c38 100644 --- a/build.gradle +++ b/build.gradle @@ -27,7 +27,11 @@ plugins { apply plugin: 'java' clean { delete "target" } -print new File('splash.txt').text + +def splashFile = new File('splash.txt') +if (splashFile.exists()) { + print splashFile.text +} group = 'com.boydti.fawe' diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/v1_13_1/Spigot_v1_13_R2.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/v1_13_1/Spigot_v1_13_R2.java index 9493cf1ad..b8e28aad4 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/v1_13_1/Spigot_v1_13_R2.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/v1_13_1/Spigot_v1_13_R2.java @@ -22,8 +22,8 @@ package com.boydti.fawe.bukkit.adapter.v1_13_1; import com.boydti.fawe.Fawe; import com.google.common.collect.ImmutableList; import com.google.common.collect.Maps; -import com.sk89q.jnbt.*; import com.sk89q.jnbt.Tag; +import com.sk89q.jnbt.*; import com.sk89q.worldedit.blocks.TileEntityBlock; import com.sk89q.worldedit.bukkit.BukkitAdapter; import com.sk89q.worldedit.bukkit.adapter.BukkitImplAdapter; @@ -33,13 +33,9 @@ import com.sk89q.worldedit.internal.Constants; import com.sk89q.worldedit.math.BlockVector3; import com.sk89q.worldedit.registry.state.*; import com.sk89q.worldedit.util.Direction; -import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; -import com.sk89q.worldedit.world.block.BlockStateHolder; -import com.sk89q.worldedit.world.block.BlockType; -import com.sk89q.worldedit.world.block.BlockTypes; +import com.sk89q.worldedit.world.block.*; import com.sk89q.worldedit.world.registry.BlockMaterial; - import net.minecraft.server.v1_13_R2.*; import org.bukkit.Bukkit; import org.bukkit.Location; @@ -51,16 +47,13 @@ import org.bukkit.craftbukkit.v1_13_R2.CraftWorld; import org.bukkit.craftbukkit.v1_13_R2.block.CraftBlock; import org.bukkit.craftbukkit.v1_13_R2.block.data.CraftBlockData; import org.bukkit.craftbukkit.v1_13_R2.entity.CraftEntity; -import org.bukkit.entity.EntityType; import org.bukkit.entity.Player; import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; import javax.annotation.Nullable; import java.lang.reflect.Field; -import java.lang.reflect.InvocationTargetException; import java.lang.reflect.Method; import java.util.*; -import java.util.function.Consumer; import java.util.logging.Level; import java.util.logging.Logger; import java.util.stream.Collectors; @@ -256,7 +249,11 @@ public final class Spigot_v1_13_R2 extends CachedBukkitAdapter implements Bukkit } else { existing = section.getType(x & 15, y & 15, z & 15); } - BlockPosition pos = null; + + BlockPosition pos = new BlockPosition(x, y, z); + + nmsChunk.d(pos); + CompoundTag nativeTag = state instanceof BaseBlock ? ((BaseBlock)state).getNbtData() : null; if (nativeTag != null || existing instanceof TileEntityBlock) { pos = new BlockPosition(x, y, z);