mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 10:56:42 +00:00
Revert "Using trove collections for most internal stuff, using array access in BlockType and ItemType"
This reverts commit 410ac65c6a
.
This has been causing compatibility issues with Spout. I haven't been ble to reproduce, but until somebody figures out why, this gets to go
This commit is contained in:
@ -22,7 +22,6 @@ package com.sk89q.worldedit.bukkit;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import gnu.trove.procedure.TIntIntProcedure;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BlockState;
|
||||
import org.bukkit.block.Furnace;
|
||||
@ -684,20 +683,13 @@ public class BukkitWorld extends LocalWorld {
|
||||
}
|
||||
|
||||
if (contents[i] != null) {
|
||||
final ItemStack toAdd = new ItemStack(contents[i].getType(),
|
||||
ItemStack toAdd = new ItemStack(contents[i].getType(),
|
||||
contents[i].getAmount(),
|
||||
contents[i].getDamage());
|
||||
try {
|
||||
contents[i].getEnchantments().forEachEntry(new TIntIntProcedure() {
|
||||
@Override
|
||||
public boolean execute(int key, int value) {
|
||||
Enchantment ench = Enchantment.getById(key);
|
||||
if (ench != null) {
|
||||
toAdd.addEnchantment(ench, value);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
});
|
||||
for (Map.Entry<Integer, Integer> entry : contents[i].getEnchantments().entrySet()) {
|
||||
toAdd.addEnchantment(Enchantment.getById(entry.getKey()), entry.getValue());
|
||||
}
|
||||
} catch (Throwable ignore) {}
|
||||
inven.setItem(i, toAdd);
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user