mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-26 15:03:01 +00:00
quick fix : 'while' loop replaceable with enhanced 'for' loop
This commit is contained in:
1 parent
d6b69264b9
commit
7abe2f5182
17 files changed
+62
-111
No files matched your search
@@ -310,7 +310,7 @@ public class AbilityHelper {
|
||||
}
|
||||
|
||||
if (!(living instanceof EntityPlayer) || player.canAttackPlayer((EntityPlayer) living)) {
|
||||
List var6 = player.worldObj.getEntitiesWithinAABB(
|
||||
List<EntityWolf> var6 = player.worldObj.getEntitiesWithinAABB(
|
||||
EntityWolf.class,
|
||||
AxisAlignedBB.getBoundingBox(
|
||||
player.posX,
|
||||
@@ -320,11 +320,8 @@ public class AbilityHelper {
|
||||
player.posY + 1.0D,
|
||||
player.posZ + 1.0D)
|
||||
.expand(16.0D, 4.0D, 16.0D));
|
||||
Iterator var4 = var6.iterator();
|
||||
|
||||
while (var4.hasNext()) {
|
||||
EntityWolf var5 = (EntityWolf) var4.next();
|
||||
|
||||
for (EntityWolf var5 : var6) {
|
||||
if (var5.isTamed()
|
||||
&& var5.getEntityToAttack() == null
|
||||
&& player.getDisplayName().equals(var5.func_152113_b())
|
||||
|
||||
@@ -439,11 +439,9 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IEq
|
||||
|
||||
@Override
|
||||
public void getSubItems(Item id, CreativeTabs tab, List list) {
|
||||
Iterator iter = TConstructRegistry.toolMaterials.entrySet().iterator();
|
||||
while (iter.hasNext()) {
|
||||
Map.Entry pairs = (Map.Entry) iter.next();
|
||||
tconstruct.library.tools.ToolMaterial material = (tconstruct.library.tools.ToolMaterial) pairs.getValue();
|
||||
buildTool((Integer) pairs.getKey(), ToolBuilder.defaultToolName(material, this), list);
|
||||
for (Map.Entry<Integer, tconstruct.library.tools.ToolMaterial> integerToolMaterialEntry : TConstructRegistry.toolMaterials.entrySet()) {
|
||||
tconstruct.library.tools.ToolMaterial material = integerToolMaterialEntry.getValue();
|
||||
buildTool(integerToolMaterialEntry.getKey(), ToolBuilder.defaultToolName(material, this), list);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user