1.9.4 Update.

Major things to note:
Class renames: https://gist.github.com/LexManos/44dd211f90f498ad4015279b103dff86
Tile Entities are now packed in the ChunkData packet.
Forge intends to work around this to better support large moded worlds, but for the time being modders should implement the new function carefully and only send what data they need to!
Minecraft's codebase now has annotations, these are directly from Mojang and should be adheared to!
Added support for package-info.java's containing @Nullable information for all MC code base.
This commit is contained in:
LexManos committed 2016-05-18 03:29:10 -07:00
1 parent 5d5c005aae
commit b9ac73b0f1
257 files changed
+2398 -1919

No files matched your search

@@ -69,7 +69,7 @@ import net.minecraft.util.text.TextFormatting;
import net.minecraft.world.BossInfoLerping;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.Biome;
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
import net.minecraftforge.client.event.EntityViewRenderEvent;
import net.minecraftforge.client.event.FOVUpdateEvent;
@@ -249,7 +249,7 @@ public class ForgeHooksClient
for (int z = -distance; z <= distance; ++z)
{
BlockPos pos = center.add(x, 0, z);
BiomeGenBase biome = world.getBiomeGenForCoords(pos);
Biome biome = world.getBiomeGenForCoords(pos);
int colour = biome.getSkyColorByTemp(biome.getFloatTemperature(pos));
r += (colour & 0xFF0000) >> 16;
g += (colour & 0x00FF00) >> 8;
@@ -8,9 +8,9 @@ package net.minecraftforge.client;
import java.util.BitSet;
import java.util.concurrent.TimeUnit;
import net.minecraft.client.renderer.RegionRenderCache;
import net.minecraft.util.BlockRenderLayer;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.ChunkCache;
import net.minecraft.world.World;
import org.apache.commons.lang3.tuple.Pair;
@@ -68,24 +68,24 @@ public class MinecraftForgeClient
}
}
private static final LoadingCache<Pair<World, BlockPos>, RegionRenderCache> regionCache = CacheBuilder.newBuilder()
private static final LoadingCache<Pair<World, BlockPos>, ChunkCache> regionCache = CacheBuilder.newBuilder()
.maximumSize(500)
.concurrencyLevel(5)
.expireAfterAccess(1, TimeUnit.SECONDS)
.build(new CacheLoader<Pair<World, BlockPos>, RegionRenderCache>()
.build(new CacheLoader<Pair<World, BlockPos>, ChunkCache>()
{
public RegionRenderCache load(Pair<World, BlockPos> key) throws Exception
public ChunkCache load(Pair<World, BlockPos> key) throws Exception
{
return new RegionRenderCache(key.getLeft(), key.getRight().add(-1, -1, -1), key.getRight().add(16, 16, 16), 1);
return new ChunkCache(key.getLeft(), key.getRight().add(-1, -1, -1), key.getRight().add(16, 16, 16), 1);
}
});
public static void onRebuildChunk(World world, BlockPos position, RegionRenderCache cache)
public static void onRebuildChunk(World world, BlockPos position, ChunkCache cache)
{
regionCache.put(Pair.of(world, position), cache);
}
public static RegionRenderCache getRegionRenderCache(World world, BlockPos pos)
public static ChunkCache getRegionRenderCache(World world, BlockPos pos)
{
int x = pos.getX() & ~0xF;
int y = pos.getY() & ~0xF;
@@ -44,7 +44,7 @@ import net.minecraft.client.renderer.block.model.multipart.Multipart;
import net.minecraft.client.renderer.block.model.multipart.Selector;
import net.minecraft.client.renderer.block.statemap.BlockStateMapper;
import net.minecraft.client.renderer.block.statemap.IStateMapper;
import net.minecraft.client.renderer.texture.IIconCreator;
import net.minecraft.client.renderer.texture.ITextureMapPopulator;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
@@ -131,7 +131,7 @@ public final class ModelLoader extends ModelBakery
textures.remove(TextureMap.LOCATION_MISSING_TEXTURE);
textures.addAll(LOCATIONS_BUILTIN_TEXTURES);
textureMap.loadSprites(resourceManager, new IIconCreator()
textureMap.loadSprites(resourceManager, new ITextureMapPopulator()
{
public void registerSprites(TextureMap map)
{
@@ -115,7 +115,7 @@ public class BiomeDictionary
private static HashMap<ResourceLocation, BiomeInfo> biomeInfoMap = new HashMap<ResourceLocation, BiomeInfo>();
@SuppressWarnings("unchecked")
private static ArrayList<BiomeGenBase>[] typeInfoList = new ArrayList[Type.values().length];
private static ArrayList<Biome>[] typeInfoList = new ArrayList[Type.values().length];
private static class BiomeInfo
{
@@ -143,17 +143,17 @@ public class BiomeDictionary
* @param type the type to register the biome as
* @return returns true if the biome was registered successfully
*/
public static boolean registerBiomeType(BiomeGenBase biome, Type ... types)
public static boolean registerBiomeType(Biome biome, Type ... types)
{
types = listSubTags(types);
if(BiomeGenBase.biomeRegistry.getNameForObject(biome) != null)
if(Biome.biomeRegistry.getNameForObject(biome) != null)
{
for(Type type : types)
{
if(typeInfoList[type.ordinal()] == null)
{
typeInfoList[type.ordinal()] = new ArrayList<BiomeGenBase>();
typeInfoList[type.ordinal()] = new ArrayList<Biome>();
}
typeInfoList[type.ordinal()].add(biome);
@@ -161,7 +161,7 @@ public class BiomeDictionary
if(!isBiomeRegistered(biome))
{
ResourceLocation location = BiomeGenBase.biomeRegistry.getNameForObject(biome);
ResourceLocation location = Biome.biomeRegistry.getNameForObject(biome);
biomeInfoMap.put(location, new BiomeInfo(types));
}
else
@@ -184,14 +184,14 @@ public class BiomeDictionary
* @param type the Type to look for
* @return a list of biomes of the specified type, null if there are none
*/
public static BiomeGenBase[] getBiomesForType(Type type)
public static Biome[] getBiomesForType(Type type)
{
if(typeInfoList[type.ordinal()] != null)
{
return typeInfoList[type.ordinal()].toArray(new BiomeGenBase[0]);
return typeInfoList[type.ordinal()].toArray(new Biome[0]);
}
return new BiomeGenBase[0];
return new Biome[0];
}
/**
@@ -200,10 +200,10 @@ public class BiomeDictionary
* @param biome the biome to check
* @return the list of types, null if there are none
*/
public static Type[] getTypesForBiome(BiomeGenBase biome)
public static Type[] getTypesForBiome(Biome biome)
{
checkRegistration(biome);
return getBiomeInfo(biome).typeList.toArray(new Type[0]);
checkRegistration(biome);
return getBiomeInfo(biome).typeList.toArray(new Type[0]);
}
/**
@@ -213,17 +213,17 @@ public class BiomeDictionary
* @param biomeB
* @return returns true if a common type is found, false otherwise
*/
public static boolean areBiomesEquivalent(BiomeGenBase biomeA, BiomeGenBase biomeB)
public static boolean areBiomesEquivalent(Biome biomeA, Biome biomeB)
{
checkRegistration(biomeA);
checkRegistration(biomeB);
for(Type type : getTypesForBiome(biomeA))
{
if(containsType(getBiomeInfo(biomeB), type))
{
return true;
}
if(containsType(getBiomeInfo(biomeB), type))
{
return true;
}
}
return false;
@@ -236,7 +236,7 @@ public class BiomeDictionary
* @param type the type to check for
* @return returns true if the biome is registered as being of type type, false otherwise
*/
public static boolean isBiomeOfType(BiomeGenBase biome, Type type)
public static boolean isBiomeOfType(Biome biome, Type type)
{
checkRegistration(biome);
return containsType(getBiomeInfo(biome), type);
@@ -247,9 +247,9 @@ public class BiomeDictionary
* @param biome the biome to consider
* @return returns true if the biome has been registered, false otherwise
*/
public static boolean isBiomeRegistered(BiomeGenBase biome)
public static boolean isBiomeRegistered(Biome biome)
{
return biomeInfoMap.containsKey(BiomeGenBase.biomeRegistry.getNameForObject(biome));
return biomeInfoMap.containsKey(Biome.biomeRegistry.getNameForObject(biome));
}
public static void registerAllBiomes()
@@ -265,10 +265,10 @@ public class BiomeDictionary
*/
public static void registerAllBiomesAndGenerateEvents()
{
for (ResourceLocation biomeResource : BiomeGenBase.biomeRegistry.getKeys())
{
BiomeGenBase biome = BiomeGenBase.biomeRegistry.getObject(biomeResource);
for (ResourceLocation biomeResource : Biome.biomeRegistry.getKeys())
{
Biome biome = Biome.biomeRegistry.getObject(biomeResource);
if (biome.theBiomeDecorator instanceof DeferredBiomeDecorator)
{
DeferredBiomeDecorator decorator = (DeferredBiomeDecorator) biome.theBiomeDecorator;
@@ -286,7 +286,7 @@ public class BiomeDictionary
*
* @param biome the biome to be considered
*/
public static void makeBestGuess(BiomeGenBase biome)
public static void makeBestGuess(Biome biome)
{
if (biome.theBiomeDecorator.treesPerChunk >= 3)
{
@@ -393,12 +393,12 @@ public class BiomeDictionary
}
//Internal implementation
private static BiomeInfo getBiomeInfo(BiomeGenBase biome)
private static BiomeInfo getBiomeInfo(Biome biome)
{
return biomeInfoMap.get(BiomeGenBase.biomeRegistry.getNameForObject(biome));
return biomeInfoMap.get(Biome.biomeRegistry.getNameForObject(biome));
}
private static void checkRegistration(BiomeGenBase biome)
private static void checkRegistration(Biome biome)
{
if(!isBiomeRegistered(biome))
{
@@ -9,7 +9,7 @@ import com.google.common.collect.ImmutableList;
import net.minecraft.init.Biomes;
import net.minecraft.util.WeightedRandom;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.BiomeProvider;
import net.minecraft.world.gen.structure.MapGenVillage;
import net.minecraftforge.common.util.EnumHelper;
@@ -18,10 +18,10 @@ public class BiomeManager
{
private static TrackedList<BiomeEntry>[] biomes = setupBiomes();
public static List<BiomeGenBase> oceanBiomes = new ArrayList<BiomeGenBase>();
public static List<Biome> oceanBiomes = new ArrayList<Biome>();
public static ArrayList<BiomeGenBase> strongHoldBiomes = new ArrayList<BiomeGenBase>();
public static ArrayList<BiomeGenBase> strongHoldBiomesBlackList = new ArrayList<BiomeGenBase>();
public static ArrayList<Biome> strongHoldBiomes = new ArrayList<Biome>();
public static ArrayList<Biome> strongHoldBiomesBlackList = new ArrayList<Biome>();
static
{
@@ -65,27 +65,27 @@ public class BiomeManager
return currentBiomes;
}
public static void addVillageBiome(BiomeGenBase biome, boolean canSpawn)
public static void addVillageBiome(Biome biome, boolean canSpawn)
{
if (!MapGenVillage.villageSpawnBiomes.contains(biome))
{
ArrayList<BiomeGenBase> biomes = new ArrayList<BiomeGenBase>(MapGenVillage.villageSpawnBiomes);
ArrayList<Biome> biomes = new ArrayList<Biome>(MapGenVillage.villageSpawnBiomes);
biomes.add(biome);
MapGenVillage.villageSpawnBiomes = biomes;
}
}
public static void removeVillageBiome(BiomeGenBase biome)
public static void removeVillageBiome(Biome biome)
{
if (MapGenVillage.villageSpawnBiomes.contains(biome))
{
ArrayList<BiomeGenBase> biomes = new ArrayList<BiomeGenBase>(MapGenVillage.villageSpawnBiomes);
ArrayList<Biome> biomes = new ArrayList<Biome>(MapGenVillage.villageSpawnBiomes);
biomes.remove(biome);
MapGenVillage.villageSpawnBiomes = biomes;
}
}
public static void addStrongholdBiome(BiomeGenBase biome)
public static void addStrongholdBiome(Biome biome)
{
if (!strongHoldBiomes.contains(biome))
{
@@ -93,7 +93,7 @@ public class BiomeManager
}
}
public static void removeStrongholdBiome(BiomeGenBase biome)
public static void removeStrongholdBiome(Biome biome)
{
if (!strongHoldBiomesBlackList.contains(biome))
{
@@ -101,7 +101,7 @@ public class BiomeManager
}
}
public static void addSpawnBiome(BiomeGenBase biome)
public static void addSpawnBiome(Biome biome)
{
if (!BiomeProvider.allowedBiomes.contains(biome))
{
@@ -109,7 +109,7 @@ public class BiomeManager
}
}
public static void removeSpawnBiome(BiomeGenBase biome)
public static void removeSpawnBiome(Biome biome)
{
if (BiomeProvider.allowedBiomes.contains(biome))
{
@@ -179,9 +179,9 @@ public class BiomeManager
public static class BiomeEntry extends WeightedRandom.Item
{
public final BiomeGenBase biome;
public final Biome biome;
public BiomeEntry(BiomeGenBase biome, int weight)
public BiomeEntry(Biome biome, int weight)
{
super(weight);
@@ -23,7 +23,7 @@ import net.minecraft.server.MinecraftServer;
import net.minecraft.world.DimensionType;
import net.minecraft.world.MinecraftException;
import net.minecraft.world.World;
import net.minecraft.world.WorldManager;
import net.minecraft.world.ServerWorldEventHandler;
import net.minecraft.world.WorldProvider;
import net.minecraft.world.WorldServer;
import net.minecraft.world.WorldServerMulti;
@@ -209,7 +209,7 @@ public class DimensionManager
//WorldSettings worldSettings = new WorldSettings(overworld.getWorldInfo());
WorldServer world = (dim == 0 ? overworld : (WorldServer)(new WorldServerMulti(mcServer, savehandler, dim, overworld, mcServer.theProfiler).init()));
world.addEventListener(new WorldManager(mcServer, world));
world.addEventListener(new ServerWorldEventHandler(mcServer, world));
MinecraftForge.EVENT_BUS.post(new WorldEvent.Load(world));
if (!mcServer.isSinglePlayer())
{
@@ -22,8 +22,8 @@ import net.minecraft.nbt.CompressedStreamTools;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.util.ClassInheritanceMultiMap;
import net.minecraft.util.math.ChunkPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraft.world.chunk.Chunk;
@@ -90,7 +90,7 @@ public class ForgeChunkManager
private static Map<String, LoadingCallback> callbacks = Maps.newHashMap();
private static Map<World, ImmutableSetMultimap<ChunkCoordIntPair,Ticket>> forcedChunks = new MapMaker().weakKeys().makeMap();
private static Map<World, ImmutableSetMultimap<ChunkPos,Ticket>> forcedChunks = new MapMaker().weakKeys().makeMap();
private static BiMap<UUID,Ticket> pendingEntities = HashBiMap.create();
private static Map<World,Cache<Long, Chunk>> dormantChunkCache = new MapMaker().weakKeys().makeMap();
@@ -112,13 +112,13 @@ public class ForgeChunkManager
public static Iterator<Chunk> getPersistentChunksIterableFor(final World world, Iterator<Chunk> chunkIterator)
{
final ImmutableSetMultimap<ChunkCoordIntPair, Ticket> persistentChunksFor = getPersistentChunksFor(world);
final ImmutableSetMultimap<ChunkPos, Ticket> persistentChunksFor = getPersistentChunksFor(world);
final ImmutableSet.Builder<Chunk> builder = ImmutableSet.builder();
world.theProfiler.startSection("forcedChunkLoading");
builder.addAll(Iterators.transform(persistentChunksFor.keys().iterator(), new Function<ChunkCoordIntPair, Chunk>() {
builder.addAll(Iterators.transform(persistentChunksFor.keys().iterator(), new Function<ChunkPos, Chunk>() {
@Nullable
@Override
public Chunk apply(@Nullable ChunkCoordIntPair input)
public Chunk apply(@Nullable ChunkPos input)
{
return world.getChunkFromChunkCoords(input.chunkXPos, input.chunkZPos);
}
@@ -216,7 +216,7 @@ public class ForgeChunkManager
{
private String modId;
private Type ticketType;
private LinkedHashSet<ChunkCoordIntPair> requestedChunks;
private LinkedHashSet<ChunkPos> requestedChunks;
private NBTTagCompound modData;
public final World world;
private int maxDepth;
@@ -363,7 +363,7 @@ public class ForgeChunkManager
/**
* Gets a list of requested chunks for this ticket.
*/
public ImmutableSet<ChunkCoordIntPair> getChunkList()
public ImmutableSet<ChunkPos> getChunkList()
{
return ImmutableSet.copyOf(requestedChunks);
}
@@ -371,9 +371,9 @@ public class ForgeChunkManager
public static class ForceChunkEvent extends Event {
private final Ticket ticket;
private final ChunkCoordIntPair location;
private final ChunkPos location;
public ForceChunkEvent(Ticket ticket, ChunkCoordIntPair location)
public ForceChunkEvent(Ticket ticket, ChunkPos location)
{
this.ticket = ticket;
this.location = location;
@@ -384,7 +384,7 @@ public class ForgeChunkManager
return ticket;
}
public ChunkCoordIntPair getLocation()
public ChunkPos getLocation()
{
return location;
}
@@ -392,9 +392,9 @@ public class ForgeChunkManager
public static class UnforceChunkEvent extends Event {
private final Ticket ticket;
private final ChunkCoordIntPair location;
private final ChunkPos location;
public UnforceChunkEvent(Ticket ticket, ChunkCoordIntPair location)
public UnforceChunkEvent(Ticket ticket, ChunkPos location)
{
this.ticket = ticket;
this.location = location;
@@ -405,7 +405,7 @@ public class ForgeChunkManager
return ticket;
}
public ChunkCoordIntPair getLocation()
public ChunkPos getLocation()
{
return location;
}
@@ -444,7 +444,7 @@ public class ForgeChunkManager
ArrayListMultimap<String, Ticket> newTickets = ArrayListMultimap.create();
tickets.put(world, newTickets);
forcedChunks.put(world, ImmutableSetMultimap.<ChunkCoordIntPair,Ticket>of());
forcedChunks.put(world, ImmutableSetMultimap.<ChunkPos,Ticket>of());
if (!(world instanceof WorldServer))
{
@@ -743,7 +743,7 @@ public class ForgeChunkManager
}
if (ticket.requestedChunks!=null)
{
for (ChunkCoordIntPair chunk : ImmutableSet.copyOf(ticket.requestedChunks))
for (ChunkPos chunk : ImmutableSet.copyOf(ticket.requestedChunks))
{
unforceChunk(ticket, chunk);
}
@@ -767,7 +767,7 @@ public class ForgeChunkManager
* @param ticket The ticket registering the chunk
* @param chunk The chunk to force
*/
public static void forceChunk(Ticket ticket, ChunkCoordIntPair chunk)
public static void forceChunk(Ticket ticket, ChunkPos chunk)
{
if (ticket == null || chunk == null)
{
@@ -785,11 +785,11 @@ public class ForgeChunkManager
ticket.requestedChunks.add(chunk);
MinecraftForge.EVENT_BUS.post(new ForceChunkEvent(ticket, chunk));
ImmutableSetMultimap<ChunkCoordIntPair, Ticket> newMap = ImmutableSetMultimap.<ChunkCoordIntPair,Ticket>builder().putAll(forcedChunks.get(ticket.world)).put(chunk, ticket).build();
ImmutableSetMultimap<ChunkPos, Ticket> newMap = ImmutableSetMultimap.<ChunkPos,Ticket>builder().putAll(forcedChunks.get(ticket.world)).put(chunk, ticket).build();
forcedChunks.put(ticket.world, newMap);
if (ticket.maxDepth > 0 && ticket.requestedChunks.size() > ticket.maxDepth)
{
ChunkCoordIntPair removed = ticket.requestedChunks.iterator().next();
ChunkPos removed = ticket.requestedChunks.iterator().next();
unforceChunk(ticket,removed);
}
}
@@ -802,7 +802,7 @@ public class ForgeChunkManager
* @param ticket The ticket holding the chunk list
* @param chunk The chunk you wish to push to the end (so that it would be unloaded last)
*/
public static void reorderChunk(Ticket ticket, ChunkCoordIntPair chunk)
public static void reorderChunk(Ticket ticket, ChunkPos chunk)
{
if (ticket == null || chunk == null || !ticket.requestedChunks.contains(chunk))
{
@@ -817,7 +817,7 @@ public class ForgeChunkManager
* @param ticket The ticket holding the chunk
* @param chunk The chunk to unforce
*/
public static void unforceChunk(Ticket ticket, ChunkCoordIntPair chunk)
public static void unforceChunk(Ticket ticket, ChunkPos chunk)
{
if (ticket == null || chunk == null)
{
@@ -825,9 +825,9 @@ public class ForgeChunkManager
}
ticket.requestedChunks.remove(chunk);
MinecraftForge.EVENT_BUS.post(new UnforceChunkEvent(ticket, chunk));
LinkedHashMultimap<ChunkCoordIntPair, Ticket> copy = LinkedHashMultimap.create(forcedChunks.get(ticket.world));
LinkedHashMultimap<ChunkPos, Ticket> copy = LinkedHashMultimap.create(forcedChunks.get(ticket.world));
copy.remove(chunk, ticket);
ImmutableSetMultimap<ChunkCoordIntPair, Ticket> newMap = ImmutableSetMultimap.copyOf(copy);
ImmutableSetMultimap<ChunkPos, Ticket> newMap = ImmutableSetMultimap.copyOf(copy);
forcedChunks.put(ticket.world,newMap);
}
@@ -857,9 +857,9 @@ public class ForgeChunkManager
* @param world
* @return the list of persistent chunks in the world
*/
public static ImmutableSetMultimap<ChunkCoordIntPair, Ticket> getPersistentChunksFor(World world)
public static ImmutableSetMultimap<ChunkPos, Ticket> getPersistentChunksFor(World world)
{
return forcedChunks.containsKey(world) ? forcedChunks.get(world) : ImmutableSetMultimap.<ChunkCoordIntPair,Ticket>of();
return forcedChunks.containsKey(world) ? forcedChunks.get(world) : ImmutableSetMultimap.<ChunkPos,Ticket>of();
}
static void saveWorld(World world)
@@ -176,11 +176,11 @@ public class ForgeHooks
if (!canHarvestBlock(state.getBlock(), player, world, pos))
{
return player.getBreakSpeed(state, pos) / hardness / 100F;
return player.getDigSpeed(state, pos) / hardness / 100F;
}
else
{
return player.getBreakSpeed(state, pos) / hardness / 30F;
return player.getDigSpeed(state, pos) / hardness / 30F;
}
}
@@ -705,7 +705,7 @@ public class ForgeHooks
TileEntity tileentity = world.getTileEntity(pos);
if (tileentity != null)
{
Packet<?> pkt = tileentity.getDescriptionPacket();
Packet<?> pkt = tileentity.func_189518_D_();
if (pkt != null)
{
entityPlayer.playerNetServerHandler.sendPacket(pkt);
@@ -1,10 +1,10 @@
package net.minecraftforge.common.chunkio;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.storage.AnvilChunkLoader;
import net.minecraft.world.gen.ChunkProviderServer;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.math.ChunkPos;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.event.world.ChunkDataEvent;
@@ -78,8 +78,7 @@ class ChunkIOProvider implements Runnable
MinecraftForge.EVENT_BUS.post(new ChunkDataEvent.Load(this.chunk, this.nbt)); // Don't call ChunkDataEvent.Load async
this.chunk.setLastSaveTime(provider.worldObj.getTotalWorldTime());
provider.id2ChunkMap.add(ChunkCoordIntPair.chunkXZ2Int(this.chunkInfo.x, this.chunkInfo.z), this.chunk);
provider.loadedChunks.add(this.chunk);
provider.id2ChunkMap.put(ChunkPos.chunkXZ2Int(this.chunkInfo.x, this.chunkInfo.z), this.chunk);
this.chunk.onChunkLoad();
if (provider.chunkGenerator != null)
@@ -45,7 +45,7 @@ public class BlockSnapshot implements Serializable
if (te != null)
{
nbt = new NBTTagCompound();
te.writeToNBT(getNbt());
te.func_189515_b(getNbt());
}
else nbt = null;
if (DEBUG)
@@ -139,7 +139,7 @@ public class BlockSnapshot implements Serializable
public TileEntity getTileEntity()
{
if (getNbt() != null)
return TileEntity.createTileEntity(getWorld().getMinecraftServer(), getNbt());
return TileEntity.func_189514_c(getNbt());
else return null;
}
@@ -1,10 +1,10 @@
package net.minecraftforge.common.util;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.util.math.ChunkPos;
// Sorter to load nearby chunks first
public class ChunkCoordComparator implements java.util.Comparator<ChunkCoordIntPair>
public class ChunkCoordComparator implements java.util.Comparator<ChunkPos>
{
private int x;
private int z;
@@ -15,7 +15,7 @@ public class ChunkCoordComparator implements java.util.Comparator<ChunkCoordIntP
z = (int) entityplayer.posZ >> 4;
}
public int compare(ChunkCoordIntPair a, ChunkCoordIntPair b)
public int compare(ChunkPos a, ChunkPos b)
{
if (a.equals(b))
{
@@ -13,7 +13,7 @@ import net.minecraft.enchantment.EnumEnchantmentType;
import net.minecraft.entity.EnumCreatureAttribute;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.entity.item.EntityPainting.EnumArt;
import net.minecraft.entity.player.EntityPlayer.EnumStatus;
import net.minecraft.entity.player.EntityPlayer.SleepResult;
import net.minecraft.item.EnumAction;
import net.minecraft.item.EnumRarity;
import net.minecraft.item.Item.ToolMaterial;
@@ -47,7 +47,7 @@ public class EnumHelper
{Sensitivity.class},
{RayTraceResult.Type.class},
{EnumSkyBlock.class, int.class},
{EnumStatus.class},
{SleepResult.class},
{ToolMaterial.class, int.class, int.class, float.class, float.class, int.class},
{EnumRarity.class, TextFormatting.class, String.class}
};
@@ -92,9 +92,9 @@ public class EnumHelper
{
return addEnum(EnumSkyBlock.class, name, lightValue);
}
public static EnumStatus addStatus(String name)
public static SleepResult addStatus(String name)
{
return addEnum(EnumStatus.class, name);
return addEnum(SleepResult.class, name);
}
public static ToolMaterial addToolMaterial(String name, int harvestLevel, int maxUses, float efficiency, float damage, int enchantability)
{
@@ -14,7 +14,7 @@ import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayer.EnumStatus;
import net.minecraft.entity.player.EntityPlayer.SleepResult;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
@@ -35,7 +35,7 @@ import net.minecraft.world.Explosion;
import net.minecraft.world.World;
import net.minecraft.world.WorldServer;
import net.minecraft.world.WorldSettings;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.chunk.ChunkPrimer;
import net.minecraft.world.chunk.IChunkGenerator;
import net.minecraft.world.storage.IPlayerFileData;
@@ -162,7 +162,7 @@ public class ForgeEventFactory
return event.getDroppedExperience();
}
public static List<BiomeGenBase.SpawnListEntry> getPotentialSpawns(WorldServer world, EnumCreatureType type, BlockPos pos, List<BiomeGenBase.SpawnListEntry> oldList)
public static List<Biome.SpawnListEntry> getPotentialSpawns(WorldServer world, EnumCreatureType type, BlockPos pos, List<Biome.SpawnListEntry> oldList)
{
WorldEvent.PotentialSpawns event = new WorldEvent.PotentialSpawns(world, type, pos, oldList);
if (MinecraftForge.EVENT_BUS.post(event))
@@ -369,7 +369,7 @@ public class ForgeEventFactory
return true;
}
public static EnumStatus onPlayerSleepInBed(EntityPlayer player, BlockPos pos)
public static SleepResult onPlayerSleepInBed(EntityPlayer player, BlockPos pos)
{
PlayerSleepInBedEvent event = new PlayerSleepInBedEvent(player, pos);
MinecraftForge.EVENT_BUS.post(event);
@@ -1,7 +1,7 @@
package net.minecraftforge.event.entity.player;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EntityPlayer.EnumStatus;
import net.minecraft.entity.player.EntityPlayer.SleepResult;
import net.minecraft.util.math.BlockPos;
/**
@@ -20,7 +20,7 @@ import net.minecraft.util.math.BlockPos;
**/
public class PlayerSleepInBedEvent extends PlayerEvent
{
private EnumStatus result = null;
private SleepResult result = null;
private final BlockPos pos;
public PlayerSleepInBedEvent(EntityPlayer player, BlockPos pos)
@@ -29,12 +29,12 @@ public class PlayerSleepInBedEvent extends PlayerEvent
this.pos = pos;
}
public EnumStatus getResultStatus()
public SleepResult getResultStatus()
{
return result;
}
public void setResult(EnumStatus result)
public void setResult(SleepResult result)
{
this.result = result;
}
@@ -3,7 +3,7 @@ package net.minecraftforge.event.terraingen;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraft.block.state.IBlockState;
import net.minecraft.world.biome.BiomeDecorator;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.Biome;
/**
* BiomeEvent is fired whenever an event involving biomes occurs.<br>
@@ -14,14 +14,14 @@ import net.minecraft.world.biome.BiomeGenBase;
**/
public class BiomeEvent extends Event
{
private final BiomeGenBase biome;
private final Biome biome;
public BiomeEvent(BiomeGenBase biome)
public BiomeEvent(Biome biome)
{
this.biome = biome;
}
public BiomeGenBase getBiome()
public Biome getBiome()
{
return biome;
}
@@ -45,7 +45,7 @@ public class BiomeEvent extends Event
private final BiomeDecorator originalBiomeDecorator;
private BiomeDecorator newBiomeDecorator;
public CreateDecorator(BiomeGenBase biome, BiomeDecorator original)
public CreateDecorator(Biome biome, BiomeDecorator original)
{
super(biome);
originalBiomeDecorator = original;
@@ -80,7 +80,7 @@ public class BiomeEvent extends Event
private final int originalColor;
private int newColor;
public BiomeColor(BiomeGenBase biome, int original)
public BiomeColor(Biome biome, int original)
{
super(biome);
originalColor = original;
@@ -115,7 +115,7 @@ public class BiomeEvent extends Event
private final IBlockState original;
private IBlockState replacement;
public GetVillageBlockID(BiomeGenBase biome, IBlockState original)
public GetVillageBlockID(Biome biome, IBlockState original)
{
super(biome);
this.original = original;
@@ -142,7 +142,7 @@ public class BiomeEvent extends Event
*/
public static class GetGrassColor extends BiomeColor
{
public GetGrassColor(BiomeGenBase biome, int original)
public GetGrassColor(Biome biome, int original)
{
super(biome, original);
}
@@ -153,7 +153,7 @@ public class BiomeEvent extends Event
*/
public static class GetFoliageColor extends BiomeColor
{
public GetFoliageColor(BiomeGenBase biome, int original)
public GetFoliageColor(Biome biome, int original)
{
super(biome, original);
}
@@ -164,7 +164,7 @@ public class BiomeEvent extends Event
*/
public static class GetWaterColor extends BiomeColor
{
public GetWaterColor(BiomeGenBase biome, int original)
public GetWaterColor(Biome biome, int original)
{
super(biome, original);
}
@@ -4,7 +4,7 @@ import java.util.Random;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeDecorator;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.Biome;
import net.minecraftforge.common.MinecraftForge;
public class DeferredBiomeDecorator extends BiomeDecorator {
@@ -16,13 +16,13 @@ public class DeferredBiomeDecorator extends BiomeDecorator {
}
@Override
public void decorate(World par1World, Random par2Random, BiomeGenBase biome, BlockPos pos)
public void decorate(World par1World, Random par2Random, Biome biome, BlockPos pos)
{
fireCreateEventAndReplace(biome);
// On first call to decorate, we fire and substitute ourselves, if we haven't already done so
biome.theBiomeDecorator.decorate(par1World, par2Random, biome, pos);
}
public void fireCreateEventAndReplace(BiomeGenBase biome)
public void fireCreateEventAndReplace(Biome biome)
{
// Copy any configuration from us to the real instance.
wrapped.bigMushroomsPerChunk = bigMushroomsPerChunk;
@@ -1,12 +1,12 @@
package net.minecraftforge.event.world;
import net.minecraftforge.fml.common.eventhandler.Event;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.util.math.ChunkPos;
/**
* ChunkWatchEvent is fired when an event involving a chunk being watched occurs.<br>
* If a method utilizes this {@link Event} as its parameter, the method will
* If a method utilizes this {@link Event} as its parameter, the method will
* receive every child event of this class.<br>
* <br>
* {@link #chunk} contains the ChunkCoordIntPair of the Chunk this event is affecting.<br>
@@ -16,16 +16,16 @@ import net.minecraft.entity.player.EntityPlayerMP;
**/
public class ChunkWatchEvent extends Event
{
private final ChunkCoordIntPair chunk;
private final ChunkPos chunk;
private final EntityPlayerMP player;
public ChunkWatchEvent(ChunkCoordIntPair chunk, EntityPlayerMP player)
public ChunkWatchEvent(ChunkPos chunk, EntityPlayerMP player)
{
this.chunk = chunk;
this.player = player;
}
public ChunkCoordIntPair getChunk()
public ChunkPos getChunk()
{
return chunk;
}
@@ -48,9 +48,9 @@ public class ChunkWatchEvent extends Event
**/
public static class Watch extends ChunkWatchEvent
{
public Watch(ChunkCoordIntPair chunk, EntityPlayerMP player) { super(chunk, player); }
public Watch(ChunkPos chunk, EntityPlayerMP player) { super(chunk, player); }
}
/**
* ChunkWatchEvent.UnWatch is fired when an EntityPlayer stops watching a chunk.<br>
* This event is fired when a chunk is removed from the watched chunks of an EntityPlayer in
@@ -64,6 +64,6 @@ public class ChunkWatchEvent extends Event
**/
public static class UnWatch extends ChunkWatchEvent
{
public UnWatch(ChunkCoordIntPair chunkLocation, EntityPlayerMP player) { super(chunkLocation, player); }
public UnWatch(ChunkPos chunkLocation, EntityPlayerMP player) { super(chunkLocation, player); }
}
}
@@ -7,7 +7,7 @@ import net.minecraft.entity.EnumCreatureType;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.WorldSettings;
import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
import net.minecraft.world.biome.Biome.SpawnListEntry;
import net.minecraftforge.fml.common.eventhandler.Cancelable;
import net.minecraftforge.fml.common.eventhandler.Event;
@@ -298,7 +298,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
}
@Override
public void onNeighborBlockChange(World world, BlockPos pos, IBlockState state, Block neighborBlock)
public void func_189540_a(IBlockState state, World world, BlockPos pos, Block neighborBlock)
{
world.scheduleUpdate(pos, this, tickRate);
}
@@ -20,10 +20,11 @@ public class TileFluidHandler extends TileEntity implements IFluidHandler
}
@Override
public void writeToNBT(NBTTagCompound tag)
public NBTTagCompound func_189515_b(NBTTagCompound tag)
{
super.writeToNBT(tag);
tag = super.func_189515_b(tag);
tank.writeToNBT(tag);
return tag;
}
/* IFluidHandler */
@@ -68,7 +68,7 @@ import net.minecraft.util.IThreadListener;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.StringUtils;
import net.minecraft.world.WorldSettings;
import net.minecraft.world.storage.SaveFormatComparator;
import net.minecraft.world.storage.WorldSummary;
import net.minecraft.world.storage.SaveFormatOld;
import net.minecraftforge.common.ForgeModContainer;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
@@ -683,7 +683,7 @@ public class FMLClientHandler implements IFMLSidedHandler
{
return new File(client.mcDataDir, "saves");
}
public void tryLoadExistingWorld(GuiWorldSelection selectWorldGUI, SaveFormatComparator comparator)
public void tryLoadExistingWorld(GuiWorldSelection selectWorldGUI, WorldSummary comparator)
{
File dir = new File(getSavesDir(), comparator.getFileName());
NBTTagCompound leveldat;
@@ -366,7 +366,7 @@ public class FMLCommonHandler
{
for (ICrashCallable call: crashCallables)
{
category.addCrashSectionCallable(call.getLabel(), call);
category.func_189529_a(call.getLabel(), call);
}
}
@@ -5,16 +5,16 @@
* are made available under the terms of the GNU Lesser Public License v2.1
* which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
*
*
* Contributors:
* cpw - implementation
*/
package net.minecraftforge.fml.common;
import java.util.concurrent.Callable;
import net.minecraft.crash.ICrashReportDetail;
public interface ICrashCallable extends Callable<String>
public interface ICrashCallable extends ICrashReportDetail<String>
{
String getLabel();
}
@@ -22,8 +22,8 @@ import net.minecraft.entity.EntityList;
import net.minecraft.entity.EntityLiving;
import net.minecraft.entity.EntityTracker;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.BiomeGenBase.SpawnListEntry;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.Biome.SpawnListEntry;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.Loader;
@@ -326,9 +326,9 @@ public class EntityRegistry
* @param typeOfCreature Type of spawn
* @param biomes List of biomes
*/
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
public static void addSpawn(Class <? extends EntityLiving > entityClass, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, Biome... biomes)
{
for (BiomeGenBase biome : biomes)
for (Biome biome : biomes)
{
List<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature);
@@ -358,7 +358,7 @@ public class EntityRegistry
* @param biomes List of biomes
*/
@SuppressWarnings("unchecked")
public static void addSpawn(String entityName, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
public static void addSpawn(String entityName, int weightedProb, int min, int max, EnumCreatureType typeOfCreature, Biome... biomes)
{
Class <? extends Entity > entityClazz = EntityList.stringToClassMapping.get(entityName);
@@ -374,9 +374,9 @@ public class EntityRegistry
* @param typeOfCreature type of spawn
* @param biomes Biomes to remove from
*/
public static void removeSpawn(Class <? extends EntityLiving > entityClass, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
public static void removeSpawn(Class <? extends EntityLiving > entityClass, EnumCreatureType typeOfCreature, Biome... biomes)
{
for (BiomeGenBase biome : biomes)
for (Biome biome : biomes)
{
Iterator<SpawnListEntry> spawns = biome.getSpawnableList(typeOfCreature).iterator();
@@ -398,7 +398,7 @@ public class EntityRegistry
* @param biomes Biomes to remove from
*/
@SuppressWarnings("unchecked")
public static void removeSpawn(String entityName, EnumCreatureType typeOfCreature, BiomeGenBase... biomes)
public static void removeSpawn(String entityName, EnumCreatureType typeOfCreature, Biome... biomes)
{
Class <? extends Entity > entityClazz = EntityList.stringToClassMapping.get(entityName);
@@ -6,7 +6,7 @@ import net.minecraft.item.Item;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionType;
import net.minecraft.util.SoundEvent;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.Biome;
import net.minecraftforge.fml.common.registry.VillagerRegistry.VillagerProfession;
/**
@@ -21,7 +21,7 @@ public class ForgeRegistries
public static final IForgeRegistry<Block> BLOCKS = GameRegistry.findRegistry(Block.class);
public static final IForgeRegistry<Item> ITEMS = GameRegistry.findRegistry(Item.class);
public static final IForgeRegistry<Potion> POTIONS = GameRegistry.findRegistry(Potion.class);
public static final IForgeRegistry<BiomeGenBase> BIOMES = GameRegistry.findRegistry(BiomeGenBase.class);
public static final IForgeRegistry<Biome> BIOMES = GameRegistry.findRegistry(Biome.class);
public static final IForgeRegistry<SoundEvent> SOUND_EVENTS = GameRegistry.findRegistry(SoundEvent.class);
public static final IForgeRegistry<PotionType> POTION_TYPES = GameRegistry.findRegistry(PotionType.class);
public static final IForgeRegistry<Enchantment> ENCHANTMENTS = GameRegistry.findRegistry(Enchantment.class);
@@ -26,7 +26,7 @@ import net.minecraft.util.ObjectIntIdentityMap;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.SoundEvent;
import net.minecraft.util.registry.RegistryNamespaced;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.biome.Biome;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.ModContainer;
@@ -61,7 +61,7 @@ public class GameData
iBlockRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.BLOCKS, Block.class, new ResourceLocation("minecraft:air"), MIN_BLOCK_ID, MAX_BLOCK_ID, true, BlockCallbacks.INSTANCE, BlockCallbacks.INSTANCE, BlockCallbacks.INSTANCE);
iItemRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.ITEMS, Item.class, null, MIN_ITEM_ID, MAX_ITEM_ID, true, ItemCallbacks.INSTANCE, ItemCallbacks.INSTANCE, ItemCallbacks.INSTANCE);
iPotionRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.POTIONS, Potion.class, null, MIN_POTION_ID, MAX_POTION_ID, false, PotionCallbacks.INSTANCE, PotionCallbacks.INSTANCE, PotionCallbacks.INSTANCE);
iBiomeRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.BIOMES, BiomeGenBase.class, null, MIN_BIOME_ID, MAX_BIOME_ID, false, BiomeCallbacks.INSTANCE, BiomeCallbacks.INSTANCE, BiomeCallbacks.INSTANCE);
iBiomeRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.BIOMES, Biome.class, null, MIN_BIOME_ID, MAX_BIOME_ID, false, BiomeCallbacks.INSTANCE, BiomeCallbacks.INSTANCE, BiomeCallbacks.INSTANCE);
iSoundEventRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.SOUNDEVENTS, SoundEvent.class, null, MIN_SOUND_ID, MAX_SOUND_ID, false, null, null, null);
ResourceLocation WATER = new ResourceLocation("water");
iPotionTypeRegistry = PersistentRegistryManager.createRegistry(PersistentRegistryManager.POTIONTYPES, PotionType.class, WATER, MIN_POTIONTYPE_ID, MAX_POTIONTYPE_ID, false, null, null, null);
@@ -71,7 +71,7 @@ public class GameData
private final FMLControlledNamespacedRegistry<Block> iBlockRegistry;
private final FMLControlledNamespacedRegistry<Item> iItemRegistry;
private final FMLControlledNamespacedRegistry<Potion> iPotionRegistry;
private final FMLControlledNamespacedRegistry<BiomeGenBase> iBiomeRegistry;
private final FMLControlledNamespacedRegistry<Biome> iBiomeRegistry;
private final FMLControlledNamespacedRegistry<SoundEvent> iSoundEventRegistry;
private final FMLControlledNamespacedRegistry<PotionType> iPotionTypeRegistry;
private final FMLControlledNamespacedRegistry<Enchantment> iEnchantmentRegistry;
@@ -98,7 +98,7 @@ public class GameData
/** INTERNAL ONLY */
@Deprecated
public static FMLControlledNamespacedRegistry<BiomeGenBase> getBiomeRegistry() { return getMain().iBiomeRegistry; }
public static FMLControlledNamespacedRegistry<Biome> getBiomeRegistry() { return getMain().iBiomeRegistry; }
/** INTERNAL ONLY */
@Deprecated
@@ -356,12 +356,12 @@ public class GameData
// no op for the minute?
}
}
private static class BiomeCallbacks implements IForgeRegistry.AddCallback<BiomeGenBase>,IForgeRegistry.ClearCallback<BiomeGenBase>,IForgeRegistry.CreateCallback<BiomeGenBase>
private static class BiomeCallbacks implements IForgeRegistry.AddCallback<Biome>,IForgeRegistry.ClearCallback<Biome>,IForgeRegistry.CreateCallback<Biome>
{
static final BiomeCallbacks INSTANCE = new BiomeCallbacks();
@Override
public void onAdd(BiomeGenBase potion, int id, Map<ResourceLocation, ?> slaves) {
public void onAdd(Biome potion, int id, Map<ResourceLocation, ?> slaves) {
// no op for the minute?
}
@@ -20,13 +20,13 @@ import java.util.Set;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import net.minecraft.command.ServerCommand;
import net.minecraft.launchwrapper.Launch;
import net.minecraft.network.INetHandler;
import net.minecraft.network.NetHandlerPlayServer;
import net.minecraft.network.NetworkManager;
import net.minecraft.server.MinecraftServer;
import net.minecraft.server.dedicated.DedicatedServer;
import net.minecraft.server.dedicated.PendingCommand;
import net.minecraft.util.IThreadListener;
import net.minecraft.util.text.translation.LanguageMap;
import net.minecraft.world.storage.SaveFormatOld;
@@ -183,7 +183,7 @@ public class FMLServerHandler implements IFMLSidedHandler
// rudimentary command processing, check for fml confirm/cancel and stop commands
synchronized (dedServer.pendingCommandList)
{
for (Iterator<ServerCommand> it = GenericIterableFactory.newCastingIterable(dedServer.pendingCommandList, ServerCommand.class).iterator(); it.hasNext(); )
for (Iterator<PendingCommand> it = GenericIterableFactory.newCastingIterable(dedServer.pendingCommandList, PendingCommand.class).iterator(); it.hasNext(); )
{
String cmd = it.next().command.trim().toLowerCase();