Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-03 01:50:07 +01:00
Remove weird TODO import and moved BlockType == Material to BukkitUtil
Dieser Commit ist enthalten in:
Ursprung
39c6a5e958
Commit
59ca29577c
@ -79,7 +79,7 @@ public class BukkitPlayerBlockBag extends BlockBag {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!bukkitItem.getType().getKey().toString().equals(blockState.getBlockType().getId())) {
|
||||
if (!BukkitUtil.equals(blockState.getBlockType(), bukkitItem.getType())) {
|
||||
// Type id doesn't fit
|
||||
continue;
|
||||
}
|
||||
@ -132,7 +132,7 @@ public class BukkitPlayerBlockBag extends BlockBag {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!bukkitItem.getType().getKey().toString().equals(blockState.getBlockType().getId())) {
|
||||
if (!BukkitUtil.equals(blockState.getBlockType(), bukkitItem.getType())) {
|
||||
// Type id doesn't fit
|
||||
continue;
|
||||
}
|
||||
|
@ -27,9 +27,11 @@ import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.util.Location;
|
||||
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.item.ItemTypes;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Server;
|
||||
import org.bukkit.World;
|
||||
import org.bukkit.block.Block;
|
||||
@ -39,6 +41,7 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.inventory.ItemStack;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
public final class BukkitUtil {
|
||||
|
||||
@ -108,6 +111,10 @@ public final class BukkitUtil {
|
||||
return true;
|
||||
}
|
||||
|
||||
public static boolean equals(BlockType blockType, Material type) {
|
||||
return Objects.equals(blockType.getId(), type.getKey().toString());
|
||||
}
|
||||
|
||||
public static final double EQUALS_PRECISION = 0.0001;
|
||||
|
||||
public static org.bukkit.Location toLocation(Location location) {
|
||||
|
@ -23,15 +23,12 @@ import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
import com.sk89q.worldedit.function.RegionFunction;
|
||||
import com.sk89q.worldedit.function.pattern.BlockPattern;
|
||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||
import com.sk89q.worldedit.function.pattern.RandomPattern;
|
||||
import com.sun.xml.internal.bind.v2.TODO;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren