mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-19 03:49:29 +00:00
quick fix : Raw use of parameterized class
This commit is contained in:
1 parent
44e40e77dd
commit
b705235cf3
12 files changed
+42
-42
No files matched your search
@@ -16,7 +16,7 @@ import tconstruct.library.modifier.IModifyable;
|
||||
import tconstruct.util.network.HealthUpdatePacket;
|
||||
|
||||
public class ArmorAbilities {
|
||||
public static List<String> stepBoostedPlayers = new ArrayList();
|
||||
public static List<String> stepBoostedPlayers = new ArrayList<>();
|
||||
// ItemStack prevFeet;
|
||||
double prevMotionY;
|
||||
|
||||
|
||||
@@ -265,9 +265,9 @@ public class Scythe extends Weapon {
|
||||
entity.posY + 1.0D,
|
||||
entity.posZ + 1.0D)
|
||||
.expand(1.0D, 1.0D, 1.0D);
|
||||
List list = player.worldObj.getEntitiesWithinAABBExcludingEntity(player, box);
|
||||
for (Object o : list) {
|
||||
AbilityHelper.onLeftClickEntity(stack, player, (Entity) o, this);
|
||||
List<Entity> list = player.worldObj.getEntitiesWithinAABBExcludingEntity(player, box);
|
||||
for (Entity e : list) {
|
||||
AbilityHelper.onLeftClickEntity(stack, player, e, this);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -21,13 +21,13 @@ final class BehaviorDispenseArmorCopy extends BehaviorDefaultDispenseItem {
|
||||
int j = par1IBlockSource.getYInt() + enumfacing.getFrontOffsetY();
|
||||
int k = par1IBlockSource.getZInt() + enumfacing.getFrontOffsetZ();
|
||||
AxisAlignedBB axisalignedbb = AxisAlignedBB.getBoundingBox(i, j, k, i + 1, j + 1, k + 1);
|
||||
List list = par1IBlockSource
|
||||
List<EntityLivingBase> list = par1IBlockSource
|
||||
.getWorld()
|
||||
.selectEntitiesWithinAABB(
|
||||
EntityLivingBase.class, axisalignedbb, new IEntitySelector.ArmoredMob(par2ItemStack));
|
||||
|
||||
if (list.size() > 0) {
|
||||
EntityLivingBase entitylivingbase = (EntityLivingBase) list.get(0);
|
||||
EntityLivingBase entitylivingbase = list.get(0);
|
||||
int l = entitylivingbase instanceof EntityPlayer ? 1 : 0;
|
||||
int i1 = EntityLiving.getArmorPosition(par2ItemStack);
|
||||
ItemStack itemstack1 = par2ItemStack.copy();
|
||||
|
||||
@@ -18,8 +18,8 @@ public class AlloyMix {
|
||||
*/
|
||||
|
||||
public FluidStack mix(ArrayList<FluidStack> liquids) {
|
||||
ArrayList<FluidStack> copyMix = new ArrayList(mixers);
|
||||
ArrayList effectiveAmount = new ArrayList();
|
||||
ArrayList<FluidStack> copyMix = new ArrayList<>(mixers);
|
||||
ArrayList<Integer> effectiveAmount = new ArrayList<>();
|
||||
|
||||
for (FluidStack liquid : liquids) {
|
||||
for (FluidStack mixer : copyMix) {
|
||||
@@ -39,7 +39,7 @@ public class AlloyMix {
|
||||
|
||||
// Remove old liquids
|
||||
int low = getLowestAmount(effectiveAmount);
|
||||
ArrayList<FluidStack> copyMix2 = new ArrayList(mixers);
|
||||
ArrayList<FluidStack> copyMix2 = new ArrayList<>(mixers);
|
||||
|
||||
for (int i = 0; i < liquids.size(); i++) {
|
||||
FluidStack liquid = liquids.get(i);
|
||||
@@ -64,12 +64,14 @@ public class AlloyMix {
|
||||
return ret;
|
||||
}
|
||||
|
||||
int getLowestAmount(ArrayList list) {
|
||||
int frist = (Integer) list.get(0); // FRIST!!!
|
||||
int getLowestAmount(ArrayList<Integer> list) {
|
||||
int first = list.get(0);
|
||||
for (int i = 1; i < list.size(); i++) {
|
||||
int compare = (Integer) list.get(i);
|
||||
if (frist > compare) frist = compare;
|
||||
int compare = list.get(i);
|
||||
if (first > compare) {
|
||||
first = compare;
|
||||
}
|
||||
}
|
||||
return frist;
|
||||
return first;
|
||||
}
|
||||
}
|
||||
@@ -164,11 +164,13 @@ public class Smeltery {
|
||||
return instance.renderIndex.get(new ItemMetaWrapper(input));
|
||||
}
|
||||
|
||||
public static ArrayList mixMetals(ArrayList<FluidStack> moltenMetal) {
|
||||
ArrayList liquids = new ArrayList();
|
||||
public static ArrayList<FluidStack> mixMetals(ArrayList<FluidStack> moltenMetal) {
|
||||
ArrayList<FluidStack> liquids = new ArrayList<>();
|
||||
for (AlloyMix alloy : instance.alloys) {
|
||||
FluidStack liquid = alloy.mix(moltenMetal);
|
||||
if (liquid != null) liquids.add(liquid);
|
||||
if (liquid != null) {
|
||||
liquids.add(liquid);
|
||||
}
|
||||
}
|
||||
return liquids;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
public abstract class ItemModifier {
|
||||
public final String key;
|
||||
public final List stacks;
|
||||
public final List<ItemStack> stacks;
|
||||
public final int effectIndex;
|
||||
public static Random random = new Random();
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ public class GuiLandmine extends GuiContainer {
|
||||
|
||||
@Override
|
||||
protected void renderToolTip(ItemStack par1ItemStack, int par2, int par3) {
|
||||
List list = par1ItemStack.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
|
||||
List<String> list = par1ItemStack.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
|
||||
|
||||
Behavior b = Behavior.getBehaviorFromStack(par1ItemStack);
|
||||
if (b != null) {
|
||||
|
||||
@@ -322,18 +322,16 @@ public class SmelteryGui extends ActiveContainerGui {
|
||||
|
||||
protected void drawFluidStackTooltip(FluidStack par1ItemStack, int par2, int par3, boolean fuel) {
|
||||
this.zLevel = 100;
|
||||
List list = getLiquidTooltip(par1ItemStack, this.mc.gameSettings.advancedItemTooltips, fuel);
|
||||
|
||||
List<String> list = getLiquidTooltip(par1ItemStack, this.mc.gameSettings.advancedItemTooltips, fuel);
|
||||
for (int k = 0; k < list.size(); ++k) {
|
||||
list.set(k, EnumChatFormatting.GRAY + (String) list.get(k));
|
||||
list.set(k, EnumChatFormatting.GRAY + list.get(k));
|
||||
}
|
||||
|
||||
this.drawToolTip(list, par2, par3);
|
||||
this.zLevel = 0;
|
||||
}
|
||||
|
||||
public List getLiquidTooltip(FluidStack liquid, boolean advanced, boolean fuel) {
|
||||
ArrayList list = new ArrayList();
|
||||
public List<String> getLiquidTooltip(FluidStack liquid, boolean advanced, boolean fuel) {
|
||||
ArrayList<String> list = new ArrayList<>();
|
||||
if (fuel || Keyboard.isKeyDown(Keyboard.KEY_LSHIFT)) {
|
||||
list.add("\u00A7f" + StatCollector.translateToLocal("gui.smeltery.fuel"));
|
||||
list.add("mB: " + liquid.amount);
|
||||
@@ -395,7 +393,7 @@ public class SmelteryGui extends ActiveContainerGui {
|
||||
return molten;
|
||||
}
|
||||
|
||||
protected void drawToolTip(List par1List, int par2, int par3) {
|
||||
protected void drawToolTip(List<String> par1List, int par2, int par3) {
|
||||
if (!par1List.isEmpty()) {
|
||||
GL11.glDisable(GL12.GL_RESCALE_NORMAL);
|
||||
RenderHelper.disableStandardItemLighting();
|
||||
@@ -403,10 +401,8 @@ public class SmelteryGui extends ActiveContainerGui {
|
||||
GL11.glDisable(GL11.GL_DEPTH_TEST);
|
||||
int k = 0;
|
||||
|
||||
for (Object o : par1List) {
|
||||
String s = (String) o;
|
||||
for (String s : par1List) {
|
||||
int l = this.fontRendererObj.getStringWidth(s);
|
||||
|
||||
if (l > k) {
|
||||
k = l;
|
||||
}
|
||||
@@ -444,7 +440,7 @@ public class SmelteryGui extends ActiveContainerGui {
|
||||
this.drawGradientRect(i1 - 3, j1 + k1 + 2, i1 + k + 3, j1 + k1 + 3, j2, j2);
|
||||
|
||||
for (int k2 = 0; k2 < par1List.size(); ++k2) {
|
||||
String s1 = (String) par1List.get(k2);
|
||||
String s1 = par1List.get(k2);
|
||||
this.fontRendererObj.drawStringWithShadow(s1, i1, j1, -1);
|
||||
|
||||
if (k2 == 0) {
|
||||
|
||||
@@ -18,9 +18,9 @@ public class CastingChannelLogic extends TileEntity implements IFluidHandler {
|
||||
public static final int fillMax = TConstruct.ingotLiquidValue * 3;
|
||||
public static final int outputMax = TConstruct.ingotLiquidValue;
|
||||
FluidTank internalTank = new FluidTank(fillMax);
|
||||
HashMap<ForgeDirection, FluidTank> subTanks = new HashMap();
|
||||
HashMap<ForgeDirection, FluidTank> subTanks = new HashMap<>();
|
||||
public ForgeDirection lastProvider;
|
||||
public ArrayList<ForgeDirection> validOutputs = new ArrayList();
|
||||
public ArrayList<ForgeDirection> validOutputs = new ArrayList<>();
|
||||
public int ticks = 0;
|
||||
public int recentlyFilledDelay;
|
||||
|
||||
@@ -292,7 +292,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidHandler {
|
||||
}
|
||||
|
||||
public HashMap<ForgeDirection, TileEntity> getOutputs() {
|
||||
HashMap<ForgeDirection, TileEntity> map = new HashMap();
|
||||
HashMap<ForgeDirection, TileEntity> map = new HashMap<>();
|
||||
for (ForgeDirection fd : this.validOutputs) {
|
||||
int tX = this.xCoord + fd.offsetX;
|
||||
int tY = this.yCoord + fd.offsetY;
|
||||
@@ -390,7 +390,7 @@ public class CastingChannelLogic extends TileEntity implements IFluidHandler {
|
||||
|
||||
int[] validFDs = tags.getIntArray("validOutputs");
|
||||
if (validFDs != null) {
|
||||
validOutputs = new ArrayList();
|
||||
validOutputs = new ArrayList<>();
|
||||
for (int i : validFDs) validOutputs.add(convertIntToFD(i));
|
||||
}
|
||||
/* UNUSED
|
||||
|
||||
@@ -131,7 +131,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
|
||||
}
|
||||
|
||||
Entity entity = null;
|
||||
List list = this.worldObj.getEntitiesWithinAABBExcludingEntity(
|
||||
List<Entity> list = this.worldObj.getEntitiesWithinAABBExcludingEntity(
|
||||
this,
|
||||
this.boundingBox
|
||||
.addCoord(this.motionX, this.motionY, this.motionZ)
|
||||
@@ -141,7 +141,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
|
||||
float ySpeed;
|
||||
|
||||
for (l = 0; l < list.size(); ++l) {
|
||||
Entity entity1 = (Entity) list.get(l);
|
||||
Entity entity1 = list.get(l);
|
||||
|
||||
if (entity1.canBeCollidedWith() && (entity1 != this.shootingEntity || this.ticksInAir >= 5)) {
|
||||
ySpeed = 0.3F;
|
||||
|
||||
@@ -73,9 +73,9 @@ public class CraftingRecipeHelper {
|
||||
}
|
||||
}
|
||||
|
||||
HashMap var12;
|
||||
HashMap<Character, ItemStack> var12;
|
||||
|
||||
for (var12 = new HashMap(); var4 < objArray.length; var4 += 2) {
|
||||
for (var12 = new HashMap<>(); var4 < objArray.length; var4 += 2) {
|
||||
Character var13 = (Character) objArray[var4];
|
||||
ItemStack var14 = null;
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ public class MiningExplosion extends Explosion {
|
||||
World world;
|
||||
private final Random random = new Random();
|
||||
private final int field_77289_h = 16;
|
||||
private final Map field_77288_k = new HashMap();
|
||||
private final Map<Entity, Vec3> field_77288_k = new HashMap<>();
|
||||
|
||||
public MiningExplosion(World par1World, Entity par2Entity, double par3, double par5, double par7, float par9) {
|
||||
super(par1World, par2Entity, par3, par5, par7, par9);
|
||||
@@ -24,7 +24,7 @@ public class MiningExplosion extends Explosion {
|
||||
@Override
|
||||
public void doExplosionA() {
|
||||
float f = this.explosionSize;
|
||||
HashSet hashset = new HashSet();
|
||||
HashSet<ChunkPosition> hashset = new HashSet<>();
|
||||
int i;
|
||||
int j;
|
||||
int k;
|
||||
@@ -146,7 +146,7 @@ public class MiningExplosion extends Explosion {
|
||||
"largeexplode", this.explosionX, this.explosionY, this.explosionZ, 1.0D, 0.0D, 0.0D);
|
||||
}
|
||||
|
||||
Iterator iterator;
|
||||
Iterator<ChunkPosition> iterator;
|
||||
ChunkPosition chunkposition;
|
||||
int i;
|
||||
int j;
|
||||
@@ -157,7 +157,7 @@ public class MiningExplosion extends Explosion {
|
||||
iterator = this.affectedBlockPositions.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
chunkposition = (ChunkPosition) iterator.next();
|
||||
chunkposition = iterator.next();
|
||||
i = chunkposition.chunkPosX;
|
||||
j = chunkposition.chunkPosY;
|
||||
k = chunkposition.chunkPosZ;
|
||||
|
||||
Reference in new issue
Block a user