mirror of
				https://github.com/IntellectualSites/PlotSquared.git
				synced 2025-10-25 15:43:44 +02:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			chore/v7/q
			...
			feature/v6
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 6aa3f7c1b7 | ||
|   | 9f3507ea85 | 
| @@ -51,6 +51,7 @@ import com.sk89q.worldedit.world.biome.BiomeType; | |||||||
| import com.sk89q.worldedit.world.block.BaseBlock; | import com.sk89q.worldedit.world.block.BaseBlock; | ||||||
| import com.sk89q.worldedit.world.block.BlockState; | import com.sk89q.worldedit.world.block.BlockState; | ||||||
| import org.bukkit.Bukkit; | import org.bukkit.Bukkit; | ||||||
|  | import org.bukkit.Chunk; | ||||||
| import org.bukkit.block.Block; | import org.bukkit.block.Block; | ||||||
| import org.bukkit.block.Container; | import org.bukkit.block.Container; | ||||||
| import org.bukkit.block.data.BlockData; | import org.bukkit.block.data.BlockData; | ||||||
| @@ -266,7 +267,13 @@ public class BukkitQueueCoordinator extends BasicQueueCoordinator { | |||||||
|         } catch (WorldEditException ignored) { |         } catch (WorldEditException ignored) { | ||||||
|             // Fallback to not so nice method |             // Fallback to not so nice method | ||||||
|             BlockData blockData = BukkitAdapter.adapt(block); |             BlockData blockData = BukkitAdapter.adapt(block); | ||||||
|             Block existing = getBukkitWorld().getBlockAt(x, y, z); |             Block existing; | ||||||
|  |             // Assume a chunk object has been given only when it should have been. | ||||||
|  |             if (getChunkObject() instanceof Chunk chunkObject) { | ||||||
|  |                 existing = chunkObject.getBlock(x & 15, y, z & 15); | ||||||
|  |             } else { | ||||||
|  |                  existing = getBukkitWorld().getBlockAt(x, y, z); | ||||||
|  |             } | ||||||
|             final BlockState existingBaseBlock = BukkitAdapter.adapt(existing.getBlockData()); |             final BlockState existingBaseBlock = BukkitAdapter.adapt(existing.getBlockData()); | ||||||
|             if (BukkitBlockUtil.get(existing).equals(existingBaseBlock) && existing.getBlockData().matches(blockData)) { |             if (BukkitBlockUtil.get(existing).equals(existingBaseBlock) && existing.getBlockData().matches(blockData)) { | ||||||
|                 return; |                 return; | ||||||
|   | |||||||
| @@ -143,7 +143,8 @@ public abstract class QueueCoordinator { | |||||||
|     } |     } | ||||||
|  |  | ||||||
|     /** |     /** | ||||||
|      * Set a chunk object (e.g. the Bukkit Chunk object) to the queue |      * Set a chunk object (e.g. the Bukkit Chunk object) to the queue. This will be used as fallback in case of WNA failure. | ||||||
|  |      * Should ONLY be used in specific cases (i.e. generation, where a chunk is being populated) | ||||||
|      * |      * | ||||||
|      * @param chunkObject chunk object. Usually the implementation-specific chunk (e.g. bukkit Chunk) |      * @param chunkObject chunk object. Usually the implementation-specific chunk (e.g. bukkit Chunk) | ||||||
|      */ |      */ | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user