3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-24 18:10:08 +01:00

Reverted block id checking in BukkitWorld to prevent false positives and made LoclWorld use the internal list for easier updates

Dieser Commit ist enthalten in:
Wizjany 2011-09-14 19:19:19 -04:00
Ursprung bd52ed5c33
Commit afa8e873e9
2 geänderte Dateien mit 3 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -23,6 +23,7 @@ import java.util.Random;
import com.sk89q.worldedit.blocks.BaseBlock;
import com.sk89q.worldedit.blocks.BaseItemStack;
import com.sk89q.worldedit.blocks.BlockID;
import com.sk89q.worldedit.blocks.BlockType;
import com.sk89q.worldedit.blocks.ItemType;
import com.sk89q.worldedit.regions.Region;
@ -434,7 +435,7 @@ public abstract class LocalWorld {
* @return
*/
public boolean isValidBlockType(int type) {
return type >= 0 && type < 96;
return BlockType.fromID(type) != null;
}
/**

Datei anzeigen

@ -670,7 +670,7 @@ public class BukkitWorld extends LocalWorld {
*/
@Override
public boolean isValidBlockType(int type) {
return type <= 255 && (Material.getMaterial(type) != null || BlockType.fromID(type) != null); // Bukkit isn't always updated before WorldEdit is
return type <= 255 && Material.getMaterial(type) != null;
}
@Override