Replaced Hashtable with HashMap

Replaced all instances of Hashtable in our code with HashMap. I had
never given that much thought until Steven mentioned it. HashMap is a
better alternative for our code.
This commit is contained in:
SenseiKiwi
2013-06-16 11:06:08 -04:00
parent 63be7fefc1
commit f542941074
2 changed files with 4 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
package StevenDimDoors.mod_pocketDim;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.HashMap;
import java.util.Random;
import net.minecraft.item.Item;
@@ -77,7 +77,7 @@ public class DDLoot {
//the same item. For instance, it cannot distinguish between different types of wood. That shouldn't
//matter for most chest loot, though. This could be fixed if we cared enough.
Random random = new Random();
Hashtable<Integer, WeightedRandomChestContent> container = new Hashtable<Integer, WeightedRandomChestContent>();
HashMap<Integer, WeightedRandomChestContent> container = new HashMap<Integer, WeightedRandomChestContent>();
for (String category : categories)
{