mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-26 06:52:58 +00:00
quick fix : Raw use of parameterized class
This commit is contained in:
1 parent
c370ce93d5
commit
36f63a7690
12 files changed
+42
-42
No files matched your search
@@ -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();
|
||||
|
||||
|
||||
Reference in new issue
Block a user