Second update pass (2/3) - 82 -> 0 errors

Second update pass which fixes all compile errors. Some parts may have
aftermath effect, hence why 3rd pass will check those maked with
"aftermath".
Errors: 82 -> 0. Mod can be launched.
This commit is contained in:
elix-x
2016-06-21 11:03:10 +02:00
parent 5498eb6d7c
commit 05aa6972c4
83 changed files with 564 additions and 405 deletions
@@ -25,6 +25,7 @@ import com.google.common.collect.ImmutableSet;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraftforge.fml.relauncher.Side;
@@ -234,7 +235,7 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
}
@Override
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
public boolean onPartActivate( final EntityPlayer player, final EnumHand hand, final Vec3d pos )
{
if( !player.isSneaking() )
{
@@ -349,7 +349,7 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
}
@Override
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
public boolean onPartActivate( final EntityPlayer player, final EnumHand hand, final Vec3d pos )
{
if( !player.isSneaking() )
{
@@ -410,9 +410,6 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
@Override
public IAEItemStack injectItems( final IAEItemStack input, final Actionable type, final BaseActionSource src )
{
//TODO 1.9.4 - 2 hands! Just do something!
final EnumHand hand = EnumHand.MAIN_HAND;
if( this.blocked || input == null || input.getStackSize() <= 0 )
{
return input;
@@ -466,29 +463,29 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
if( side.xOffset == 0 && side.zOffset == 0 )
{
Worked = i.onItemUse( is, player, w, tePos.offset( side.getFacing() ), hand, side.getFacing().getOpposite(), side.xOffset, side.yOffset, side.zOffset ) == EnumActionResult.SUCCESS;
Worked = i.onItemUse( is, player, w, tePos.offset( side.getFacing() ), null, side.getFacing().getOpposite(), side.xOffset, side.yOffset, side.zOffset ) == EnumActionResult.SUCCESS;
}
if( !Worked && side.xOffset == 0 && side.zOffset == 0 )
{
Worked = i.onItemUse( is, player, w, tePos.offset( side.getFacing().getOpposite() ), hand, side.getFacing(), side.xOffset, side.yOffset, side.zOffset ) == EnumActionResult.SUCCESS;
Worked = i.onItemUse( is, player, w, tePos.offset( side.getFacing().getOpposite() ), null, side.getFacing(), side.xOffset, side.yOffset, side.zOffset ) == EnumActionResult.SUCCESS;
}
if( !Worked && side.yOffset == 0 )
{
Worked = i.onItemUse( is, player, w, tePos.offset( EnumFacing.DOWN ), hand, EnumFacing.UP, side.xOffset, side.yOffset, side.zOffset ) == EnumActionResult.SUCCESS;
Worked = i.onItemUse( is, player, w, tePos.offset( EnumFacing.DOWN ), null, EnumFacing.UP, side.xOffset, side.yOffset, side.zOffset ) == EnumActionResult.SUCCESS;
}
if( !Worked )
{
i.onItemUse( is, player, w, tePos, hand, side.getFacing().getOpposite(), side.xOffset, side.yOffset, side.zOffset );
i.onItemUse( is, player, w, tePos, null, side.getFacing().getOpposite(), side.xOffset, side.yOffset, side.zOffset );
}
maxStorage -= is.stackSize;
}
else
{
i.onItemUse( is, player, w, tePos, hand, side.getFacing().getOpposite(), side.xOffset, side.yOffset, side.zOffset );
i.onItemUse( is, player, w, tePos, null, side.getFacing().getOpposite(), side.xOffset, side.yOffset, side.zOffset );
maxStorage -= is.stackSize;
}
}
@@ -21,6 +21,7 @@ package appeng.parts.automation;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
import net.minecraftforge.fml.relauncher.Side;
@@ -144,7 +145,7 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
}
@Override
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
public boolean onPartActivate( final EntityPlayer player, final EnumHand hand, final Vec3d pos )
{
if( !player.isSneaking() )
{
@@ -22,6 +22,7 @@ package appeng.parts.automation;
import java.util.Collection;
import java.util.Random;
import net.minecraft.client.renderer.BlockModelRenderer;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.inventory.IInventory;
@@ -30,6 +31,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.EnumHand;
import net.minecraft.util.EnumParticleTypes;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Vec3d;
@@ -595,8 +597,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
renderer.setRenderAllFaces( true );
//TODO 1.9.4 - getMixedBrightnessForBlock => ?
renderer.setBrightness( rh.getBlock().getMixedBrightnessForBlock( this.getHost().getTile().getWorld(), pos ) );
renderer.setBrightness( rh.getBlock().getPackedLightmapCoords( this.getHost().getTile().getWorld().getBlockState( pos ), this.getHost().getTile().getWorld(), pos ) );
renderer.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
this.renderTorchAtAngle( pos.getX(), pos.getY(), pos.getZ(), renderer );
@@ -643,7 +644,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
}
@Override
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
public boolean onPartActivate( final EntityPlayer player, final EnumHand hand, final Vec3d pos )
{
if( !player.isSneaking() )
{