First update pass (1/3) - ~1400 -> 82 errors
This is first update pass, which is mainly import reorganization, name fixes, etc... Although some parts of second were done where changes aren't important. Errors: ~1400 -> 82.
This commit is contained in:
@@ -38,9 +38,9 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -493,7 +493,7 @@ public abstract class AEBasePart implements IPart, IGridProxyable, IActionHost,
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean onActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public final boolean onActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
if( this.useMemoryCard( player ) )
|
||||
{
|
||||
@@ -504,7 +504,7 @@ public abstract class AEBasePart implements IPart, IGridProxyable, IActionHost,
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean onShiftActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public final boolean onShiftActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
if( this.useMemoryCard( player ) )
|
||||
{
|
||||
@@ -514,12 +514,12 @@ public abstract class AEBasePart implements IPart, IGridProxyable, IActionHost,
|
||||
return this.onPartShiftActivate( player, pos );
|
||||
}
|
||||
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean onPartShiftActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartShiftActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@ package appeng.parts;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
|
||||
import appeng.api.parts.IPartCollisionHelper;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
@@ -149,7 +149,7 @@ public class BusCollisionHelper implements IPartCollisionHelper
|
||||
maxY = Math.max( aY, bY );
|
||||
maxZ = Math.max( aZ, bZ );
|
||||
|
||||
this.boxes.add( AxisAlignedBB.fromBounds( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||
this.boxes.add( new AxisAlignedBB( minX, minY, minZ, maxX, maxY, maxZ ) );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -35,10 +35,10 @@ import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -401,7 +401,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public SelectedPart selectPart( final Vec3 pos )
|
||||
public SelectedPart selectPart( final Vec3d pos )
|
||||
{
|
||||
for( final AEPartLocation side : AEPartLocation.values() )
|
||||
{
|
||||
@@ -802,7 +802,7 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean activate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean activate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
final SelectedPart p = this.selectPart( pos );
|
||||
if( p != null && p.part != null )
|
||||
|
||||
@@ -25,9 +25,9 @@ import java.util.Random;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -47,7 +47,7 @@ public interface ICableBusContainer
|
||||
|
||||
void onEntityCollision( Entity e );
|
||||
|
||||
boolean activate( EntityPlayer player, Vec3 vecFromPool );
|
||||
boolean activate( EntityPlayer player, Vec3d vecFromPool );
|
||||
|
||||
void onNeighborChanged();
|
||||
|
||||
@@ -55,7 +55,7 @@ public interface ICableBusContainer
|
||||
|
||||
boolean isEmpty();
|
||||
|
||||
SelectedPart selectPart( Vec3 v3 );
|
||||
SelectedPart selectPart( Vec3d v3 );
|
||||
|
||||
boolean recolourBlock( EnumFacing side, AEColor colour, EntityPlayer who );
|
||||
|
||||
|
||||
@@ -25,9 +25,9 @@ import java.util.Random;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.parts.SelectedPart;
|
||||
@@ -62,7 +62,7 @@ public class NullCableBusContainer implements ICableBusContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean activate( final EntityPlayer player, final Vec3 vecFromPool )
|
||||
public boolean activate( final EntityPlayer player, final Vec3d vecFromPool )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -86,7 +86,7 @@ public class NullCableBusContainer implements ICableBusContainer
|
||||
}
|
||||
|
||||
@Override
|
||||
public SelectedPart selectPart( final Vec3 v3 )
|
||||
public SelectedPart selectPart( final Vec3d v3 )
|
||||
{
|
||||
return new SelectedPart();
|
||||
}
|
||||
|
||||
@@ -25,8 +25,8 @@ import io.netty.buffer.ByteBuf;
|
||||
|
||||
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -25,21 +25,23 @@ import java.util.List;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.Block.SoundType;
|
||||
import net.minecraft.block.SoundType;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.entity.player.PlayerDestroyItemEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
|
||||
import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
|
||||
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.gameevent.TickEvent;
|
||||
|
||||
@@ -75,6 +77,8 @@ public class PartPlacement
|
||||
|
||||
public static boolean place( final ItemStack held, final BlockPos pos, EnumFacing side, final EntityPlayer player, final World world, PlaceType pass, final int depth )
|
||||
{
|
||||
//TODO 1.9.4 - 2 hands! Just do something!
|
||||
final EnumHand hand = EnumHand.MAIN_HAND;
|
||||
if( depth > 3 )
|
||||
{
|
||||
return false;
|
||||
@@ -101,7 +105,7 @@ public class PartPlacement
|
||||
if( !world.isRemote )
|
||||
{
|
||||
final LookDirection dir = Platform.getPlayerRay( player, getEyeOffset( player ) );
|
||||
final MovingObjectPosition mop = block.collisionRayTrace( world, pos, dir.getA(), dir.getB() );
|
||||
final RayTraceResult mop = block.collisionRayTrace( world.getBlockState( pos ), world, pos, dir.getA(), dir.getB() );
|
||||
|
||||
if( mop != null )
|
||||
{
|
||||
@@ -135,7 +139,7 @@ public class PartPlacement
|
||||
}
|
||||
else
|
||||
{
|
||||
player.swingItem();
|
||||
player.swingArm( hand );
|
||||
NetworkHandler.instance.sendToServer( new PacketPartPlacement( pos, side, getEyeOffset( player ) ) );
|
||||
}
|
||||
return true;
|
||||
@@ -177,7 +181,7 @@ public class PartPlacement
|
||||
if( held.stackSize == 0 )
|
||||
{
|
||||
player.inventory.mainInventory[player.inventory.currentItem] = null;
|
||||
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( player, held ) );
|
||||
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( player, held, hand ) );
|
||||
}
|
||||
}
|
||||
return true;
|
||||
@@ -186,7 +190,7 @@ public class PartPlacement
|
||||
}
|
||||
else
|
||||
{
|
||||
player.swingItem();
|
||||
player.swingArm( hand );
|
||||
NetworkHandler.instance.sendToServer( new PacketPartPlacement( pos, side, getEyeOffset( player ) ) );
|
||||
return true;
|
||||
}
|
||||
@@ -217,7 +221,7 @@ public class PartPlacement
|
||||
if( host != null && player.isSneaking() && block != null )
|
||||
{
|
||||
final LookDirection dir = Platform.getPlayerRay( player, getEyeOffset( player ) );
|
||||
final MovingObjectPosition mop = block.collisionRayTrace( world, pos, dir.getA(), dir.getB() );
|
||||
final RayTraceResult mop = block.collisionRayTrace( world.getBlockState( pos ), world, pos, dir.getA(), dir.getB() );
|
||||
|
||||
if( mop != null )
|
||||
{
|
||||
@@ -308,7 +312,7 @@ public class PartPlacement
|
||||
}
|
||||
else
|
||||
{
|
||||
player.swingItem();
|
||||
player.swingArm( hand );
|
||||
NetworkHandler.instance.sendToServer( new PacketPartPlacement( pos, side, getEyeOffset( player ) ) );
|
||||
return true;
|
||||
}
|
||||
@@ -350,9 +354,9 @@ public class PartPlacement
|
||||
|
||||
if( !world.isRemote )
|
||||
{
|
||||
final Block block = world.getBlockState( pos ).getBlock();
|
||||
final IBlockState state = world.getBlockState( pos );
|
||||
final LookDirection dir = Platform.getPlayerRay( player, getEyeOffset( player ) );
|
||||
final MovingObjectPosition mop = block.collisionRayTrace( world, pos, dir.getA(), dir.getB() );
|
||||
final RayTraceResult mop = state.getBlock().collisionRayTrace( state, world, pos, dir.getA(), dir.getB() );
|
||||
|
||||
if( mop != null )
|
||||
{
|
||||
@@ -378,9 +382,9 @@ public class PartPlacement
|
||||
{
|
||||
for( final Block multiPartBlock : multiPart.maybeBlock().asSet() )
|
||||
{
|
||||
final SoundType ss = multiPartBlock.stepSound;
|
||||
final SoundType ss = multiPartBlock.getSoundType();
|
||||
|
||||
world.playSoundEffect( 0.5 + pos.getX(), 0.5 + pos.getY(), 0.5 + pos.getZ(), ss.getPlaceSound(), ( ss.getVolume() + 1.0F ) / 2.0F, ss.getFrequency() * 0.8F );
|
||||
world.playSound( player, 0.5 + pos.getX(), 0.5 + pos.getY(), 0.5 + pos.getZ(), ss.getPlaceSound(), SoundCategory.BLOCKS, ( ss.getVolume() + 1.0F ) / 2.0F, ss.getPitch() * 0.8F );
|
||||
}
|
||||
|
||||
if( !player.capabilities.isCreativeMode )
|
||||
@@ -389,14 +393,14 @@ public class PartPlacement
|
||||
if( held.stackSize == 0 )
|
||||
{
|
||||
player.inventory.mainInventory[player.inventory.currentItem] = null;
|
||||
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( player, held ) );
|
||||
MinecraftForge.EVENT_BUS.post( new PlayerDestroyItemEvent( player, held, hand ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player.swingItem();
|
||||
player.swingArm( hand );
|
||||
NetworkHandler.instance.sendToServer( new PacketPartPlacement( pos, side, getEyeOffset( player ) ) );
|
||||
}
|
||||
return true;
|
||||
@@ -412,7 +416,7 @@ public class PartPlacement
|
||||
return getEyeHeight();
|
||||
}
|
||||
|
||||
private static SelectedPart selectPart( final EntityPlayer player, final IPartHost host, final Vec3 pos )
|
||||
private static SelectedPart selectPart( final EntityPlayer player, final IPartHost host, final Vec3d pos )
|
||||
{
|
||||
CommonHelper.proxy.updateRenderMode( player );
|
||||
final SelectedPart sp = host.selectPart( pos );
|
||||
@@ -449,19 +453,19 @@ public class PartPlacement
|
||||
@SubscribeEvent
|
||||
public void playerInteract( final PlayerInteractEvent event )
|
||||
{
|
||||
if( event.action == Action.RIGHT_CLICK_AIR && event.entityPlayer.worldObj.isRemote )
|
||||
if( event instanceof PlayerInteractEvent.RightClickEmpty && event.getEntityPlayer().worldObj.isRemote )
|
||||
{
|
||||
// re-check to see if this event was already channeled, cause these two events are really stupid...
|
||||
final MovingObjectPosition mop = Platform.rayTrace( event.entityPlayer, true, false );
|
||||
final RayTraceResult mop = Platform.rayTrace( event.getEntityPlayer(), true, false );
|
||||
final Minecraft mc = Minecraft.getMinecraft();
|
||||
|
||||
final float f = 1.0F;
|
||||
final double d0 = mc.playerController.getBlockReachDistance();
|
||||
final Vec3 vec3 = mc.getRenderViewEntity().getPositionEyes( f );
|
||||
final Vec3d vec3 = mc.getRenderViewEntity().getPositionEyes( f );
|
||||
|
||||
if( mop != null && mop.hitVec.distanceTo( vec3 ) < d0 )
|
||||
{
|
||||
final World w = event.entity.worldObj;
|
||||
final World w = event.getEntity().worldObj;
|
||||
final TileEntity te = w.getTileEntity( mop.getBlockPos() );
|
||||
if( te instanceof IPartHost && this.wasCanceled )
|
||||
{
|
||||
@@ -470,19 +474,19 @@ public class PartPlacement
|
||||
}
|
||||
else
|
||||
{
|
||||
final ItemStack held = event.entityPlayer.getHeldItem();
|
||||
final ItemStack held = event.getEntityPlayer().getHeldItem( event.getHand() );
|
||||
final IItems items = AEApi.instance().definitions().items();
|
||||
|
||||
boolean supportedItem = items.memoryCard().isSameAs( held );
|
||||
supportedItem |= items.colorApplicator().isSameAs( held );
|
||||
|
||||
if( event.entityPlayer.isSneaking() && held != null && supportedItem )
|
||||
if( event.getEntityPlayer().isSneaking() && held != null && supportedItem )
|
||||
{
|
||||
NetworkHandler.instance.sendToServer( new PacketClick( event.pos, event.face, 0, 0, 0 ) );
|
||||
NetworkHandler.instance.sendToServer( new PacketClick( event.getPos(), event.getFace(), 0, 0, 0 ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( event.action == Action.RIGHT_CLICK_BLOCK && event.entityPlayer.worldObj.isRemote )
|
||||
else if( event instanceof PlayerInteractEvent.RightClickBlock && event.getEntityPlayer().worldObj.isRemote )
|
||||
{
|
||||
if( this.placing.get() != null )
|
||||
{
|
||||
@@ -491,8 +495,8 @@ public class PartPlacement
|
||||
|
||||
this.placing.set( event );
|
||||
|
||||
final ItemStack held = event.entityPlayer.getHeldItem();
|
||||
if( place( held, event.pos, event.face, event.entityPlayer, event.entityPlayer.worldObj, PlaceType.INTERACT_FIRST_PASS, 0 ) )
|
||||
final ItemStack held = event.getEntityPlayer().getHeldItem( event.getHand() );
|
||||
if( place( held, event.getPos(), event.getFace(), event.getEntityPlayer(), event.getEntityPlayer().worldObj, PlaceType.INTERACT_FIRST_PASS, 0 ) )
|
||||
{
|
||||
event.setCanceled( true );
|
||||
this.wasCanceled = true;
|
||||
|
||||
@@ -23,16 +23,16 @@ import java.util.List;
|
||||
|
||||
import com.google.common.collect.Lists;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.AxisAlignedBB;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
@@ -483,11 +483,11 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
|
||||
*/
|
||||
private boolean canHandleBlock( final WorldServer w, final BlockPos pos )
|
||||
{
|
||||
final Block block = w.getBlockState( pos ).getBlock();
|
||||
final Material material = block.getMaterial();
|
||||
final float hardness = block.getBlockHardness( w, pos );
|
||||
final boolean ignoreMaterials = material == Material.air || material == Material.lava || material == Material.water || material.isLiquid();
|
||||
final boolean ignoreBlocks = block == Blocks.bedrock || block == Blocks.end_portal || block == Blocks.end_portal_frame || block == Blocks.command_block;
|
||||
final IBlockState state = w.getBlockState( pos );
|
||||
final Material material = state.getMaterial();
|
||||
final float hardness = state.getBlockHardness( w, pos );
|
||||
final boolean ignoreMaterials = material == Material.AIR || material == Material.LAVA || material == Material.WATER || material.isLiquid();
|
||||
final boolean ignoreBlocks = state.getBlock() == Blocks.BEDROCK || state.getBlock() == Blocks.END_PORTAL || state.getBlock() == Blocks.END_PORTAL_FRAME || state.getBlock() == Blocks.COMMAND_BLOCK;
|
||||
|
||||
return !ignoreMaterials && !ignoreBlocks && !w.isAirBlock( pos ) && w.isBlockLoaded( pos ) && w.canMineBlockBody( Platform.getPlayer( w ), pos ) && hardness >= 0f;
|
||||
}
|
||||
@@ -503,8 +503,8 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
|
||||
*/
|
||||
protected float calculateEnergyUsage( final WorldServer w, final BlockPos pos, final List<ItemStack> items )
|
||||
{
|
||||
final Block block = w.getBlockState( pos ).getBlock();
|
||||
final float hardness = block.getBlockHardness( w, pos );
|
||||
final IBlockState state = w.getBlockState( pos );
|
||||
final float hardness = state.getBlockHardness( w, pos );
|
||||
|
||||
float requiredEnergy = 1 + hardness;
|
||||
for( final ItemStack is : items )
|
||||
@@ -555,7 +555,7 @@ public class PartAnnihilationPlane extends PartBasicState implements IGridTickab
|
||||
{
|
||||
w.setBlockToAir( pos );
|
||||
|
||||
final AxisAlignedBB box = AxisAlignedBB.fromBounds( pos.getX() - 0.2, pos.getY() - 0.2, pos.getZ() - 0.2, pos.getX() + 1.2, pos.getY() + 1.2, pos.getZ() + 1.2 );
|
||||
final AxisAlignedBB box = new AxisAlignedBB( pos.getX() - 0.2, pos.getY() - 0.2, pos.getZ() - 0.2, pos.getX() + 1.2, pos.getY() + 1.2, pos.getZ() + 1.2 );
|
||||
for( final Object ei : w.getEntitiesWithinAABB( EntityItem.class, box ) )
|
||||
{
|
||||
if( ei instanceof EntityItem )
|
||||
|
||||
@@ -25,8 +25,8 @@ 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.BlockPos;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -234,7 +234,7 @@ public class PartExportBus extends PartSharedItemBus implements ICraftingRequest
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
if( !player.isSneaking() )
|
||||
{
|
||||
|
||||
@@ -25,18 +25,20 @@ import java.util.List;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.entity.item.EntityItem;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemBlock;
|
||||
import net.minecraft.item.ItemFirework;
|
||||
import net.minecraft.item.ItemReed;
|
||||
import net.minecraft.item.ItemSkull;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumActionResult;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraft.world.chunk.Chunk;
|
||||
@@ -347,7 +349,7 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
if( !player.isSneaking() )
|
||||
{
|
||||
@@ -408,6 +410,9 @@ 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;
|
||||
@@ -429,7 +434,7 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
|
||||
|
||||
if( w.getBlockState( tePos ).getBlock().isReplaceable( w, tePos ) )
|
||||
{
|
||||
if( placeBlock == YesNo.YES && ( i instanceof ItemBlock || i instanceof IPlantable || i instanceof ItemSkull || i instanceof ItemFirework || i instanceof IPartItem || i instanceof ItemReed ) )
|
||||
if( placeBlock == YesNo.YES && ( i instanceof ItemBlock || i instanceof IPlantable || i instanceof ItemSkull || i instanceof ItemFirework || i instanceof IPartItem || i == Item.getItemFromBlock( Blocks.REEDS ) ) )
|
||||
{
|
||||
final EntityPlayer player = Platform.getPlayer( (WorldServer) w );
|
||||
Platform.configurePlayer( player, side, this.getTile() );
|
||||
@@ -455,35 +460,35 @@ public class PartFormationPlane extends PartUpgradeable implements ICellContaine
|
||||
worked = true;
|
||||
if( type == Actionable.MODULATE )
|
||||
{
|
||||
if( i instanceof IPlantable || i instanceof ItemSkull || i instanceof ItemReed )
|
||||
if( i instanceof IPlantable || i instanceof ItemSkull || i == Item.getItemFromBlock( Blocks.REEDS ) )
|
||||
{
|
||||
boolean Worked = false;
|
||||
|
||||
if( side.xOffset == 0 && side.zOffset == 0 )
|
||||
{
|
||||
Worked = i.onItemUse( is, player, w, tePos.offset( side.getFacing() ), side.getFacing().getOpposite(), side.xOffset, side.yOffset, side.zOffset );
|
||||
Worked = i.onItemUse( is, player, w, tePos.offset( side.getFacing() ), hand, 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() ), side.getFacing(), side.xOffset, side.yOffset, side.zOffset );
|
||||
Worked = i.onItemUse( is, player, w, tePos.offset( side.getFacing().getOpposite() ), hand, 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 ), EnumFacing.UP, side.xOffset, side.yOffset, side.zOffset );
|
||||
Worked = i.onItemUse( is, player, w, tePos.offset( EnumFacing.DOWN ), hand, EnumFacing.UP, side.xOffset, side.yOffset, side.zOffset ) == EnumActionResult.SUCCESS;
|
||||
}
|
||||
|
||||
if( !Worked )
|
||||
{
|
||||
i.onItemUse( is, player, w, tePos, side.getFacing().getOpposite(), side.xOffset, side.yOffset, side.zOffset );
|
||||
i.onItemUse( is, player, w, tePos, hand, side.getFacing().getOpposite(), side.xOffset, side.yOffset, side.zOffset );
|
||||
}
|
||||
|
||||
maxStorage -= is.stackSize;
|
||||
}
|
||||
else
|
||||
{
|
||||
i.onItemUse( is, player, w, tePos, side.getFacing().getOpposite(), side.xOffset, side.yOffset, side.zOffset );
|
||||
i.onItemUse( is, player, w, tePos, hand, side.getFacing().getOpposite(), side.xOffset, side.yOffset, side.zOffset );
|
||||
maxStorage -= is.stackSize;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import net.minecraftforge.common.util.FakePlayerFactory;
|
||||
|
||||
@@ -21,8 +21,8 @@ package appeng.parts.automation;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -144,7 +144,7 @@ public class PartImportBus extends PartSharedItemBus implements IInventoryDestin
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
if( !player.isSneaking() )
|
||||
{
|
||||
|
||||
@@ -29,10 +29,10 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.EnumParticleTypes;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -595,6 +595,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.setColorOpaque_F( 1.0F, 1.0F, 1.0F );
|
||||
|
||||
@@ -642,7 +643,7 @@ public class PartLevelEmitter extends PartUpgradeable implements IEnergyWatcherH
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
if( !player.isSneaking() )
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ package appeng.parts.automation;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.config.RedstoneMode;
|
||||
@@ -115,7 +115,7 @@ public abstract class PartSharedItemBus extends PartUpgradeable implements IGrid
|
||||
{
|
||||
final World w = self.getWorld();
|
||||
|
||||
if( w.getChunkProvider().chunkExists( pos.getX() >> 4, pos.getZ() >> 4 ) )
|
||||
if( w.getChunkProvider().getLoadedChunk( pos.getX() >> 4, pos.getZ() >> 4 ) != null )
|
||||
{
|
||||
return w.getTileEntity( pos );
|
||||
}
|
||||
@@ -161,7 +161,7 @@ public abstract class PartSharedItemBus extends PartUpgradeable implements IGrid
|
||||
final int zCoordinate = selfPos.getZ();
|
||||
final World world = self.getWorld();
|
||||
|
||||
return world != null && world.getChunkProvider().chunkExists( xCoordinate >> 4, zCoordinate >> 4 );
|
||||
return world != null && world.getChunkProvider().getLoadedChunk( xCoordinate >> 4, zCoordinate >> 4 ) != null;
|
||||
}
|
||||
|
||||
private void updateState()
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.inventory.ISidedInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.api.parts.IPart;
|
||||
import appeng.api.parts.IPartHost;
|
||||
@@ -293,7 +293,7 @@ public class LayerISidedInventory extends LayerBase implements ISidedInventory
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
public ITextComponent getDisplayName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -32,8 +32,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
@@ -232,13 +232,13 @@ public class PartCableAnchor implements IPart
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onShiftActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onShiftActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -32,10 +32,10 @@ import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -200,7 +200,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer p, final Vec3 pos )
|
||||
public boolean onPartActivate( final EntityPlayer p, final Vec3d pos )
|
||||
{
|
||||
if( p.isSneaking() )
|
||||
{
|
||||
@@ -450,7 +450,7 @@ public class PartInterface extends PartBasicState implements IGridTickable, ISto
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
public ITextComponent getDisplayName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -28,8 +28,8 @@ import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -317,7 +317,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
if( !player.isSneaking() )
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -31,8 +31,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ import java.util.EnumSet;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -24,8 +24,8 @@ import java.util.EnumSet;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ import org.lwjgl.opengl.GL11;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.tileentity.TileEntityChest;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.text.ITextComponent;
|
||||
|
||||
import appeng.api.networking.IGridNode;
|
||||
import appeng.api.networking.events.MENetworkBootingStatusChange;
|
||||
@@ -400,7 +400,7 @@ public class PartP2PItems extends PartP2PTunnel<PartP2PItems> implements /* IPip
|
||||
}
|
||||
|
||||
@Override
|
||||
public IChatComponent getDisplayName()
|
||||
public ITextComponent getDisplayName()
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -24,8 +24,8 @@ import net.minecraft.block.BlockRedstoneWire;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.networking.events.MENetworkBootingStatusChange;
|
||||
@@ -152,8 +152,8 @@ public class PartP2PRedstone extends PartP2PTunnel<PartP2PRedstone>
|
||||
srcSide = EnumFacing.UP;
|
||||
}
|
||||
|
||||
this.power = b.getWeakPower( this.getTile().getWorld(), target, state, srcSide );
|
||||
this.power = Math.max( this.power, b.getWeakPower( this.getTile().getWorld(), target, state, srcSide ) );
|
||||
this.power = b.getWeakPower( state, this.getTile().getWorld(), target, srcSide );
|
||||
this.power = Math.max( this.power, b.getWeakPower( state, this.getTile().getWorld(), target, srcSide ) );
|
||||
this.sendToOutput( this.power );
|
||||
}
|
||||
else
|
||||
|
||||
@@ -30,8 +30,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.init.Blocks;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -149,7 +149,7 @@ public abstract class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicSt
|
||||
}
|
||||
else
|
||||
{
|
||||
return renderer.getIcon( new ItemStack( Blocks.quartz_block ) );
|
||||
return renderer.getIcon( new ItemStack( Blocks.QUARTZ_BLOCK ) );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -227,7 +227,7 @@ public abstract class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicSt
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
final ItemStack is = player.inventory.getCurrentItem();
|
||||
|
||||
@@ -394,7 +394,7 @@ public abstract class PartP2PTunnel<T extends PartP2PTunnel> extends PartBasicSt
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartShiftActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartShiftActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
final ItemStack is = player.inventory.getCurrentItem();
|
||||
if( is != null && is.getItem() instanceof IMemoryCard )
|
||||
|
||||
@@ -20,8 +20,8 @@ package appeng.parts.reporting;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -31,13 +31,14 @@ import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.GLAllocation;
|
||||
import net.minecraft.client.renderer.OpenGlHelper;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.WorldRenderer;
|
||||
import net.minecraft.client.renderer.VertexBuffer;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MovingObjectPosition;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.RayTraceResult;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
@@ -159,8 +160,11 @@ public abstract class AbstractPartMonitor extends AbstractPartDisplay implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
//TODO 1.9.4 - 2 hands! Just do something!
|
||||
final EnumHand hand = EnumHand.MAIN_HAND;
|
||||
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return true;
|
||||
@@ -177,7 +181,7 @@ public abstract class AbstractPartMonitor extends AbstractPartDisplay implements
|
||||
}
|
||||
|
||||
final TileEntity te = this.getTile();
|
||||
final ItemStack eq = player.getCurrentEquippedItem();
|
||||
final ItemStack eq = player.getHeldItem( hand );
|
||||
|
||||
if( Platform.isWrench( player, eq, te.getPos() ) )
|
||||
{
|
||||
@@ -268,7 +272,7 @@ public abstract class AbstractPartMonitor extends AbstractPartDisplay implements
|
||||
}
|
||||
|
||||
final Tessellator tess = Tessellator.getInstance();
|
||||
final WorldRenderer wr = tess.getWorldRenderer();
|
||||
final VertexBuffer wr = tess.getBuffer();
|
||||
|
||||
if( ( this.getClientFlags() & ( PartPanel.POWERED_FLAG | PartPanel.CHANNEL_FLAG ) ) != ( PartPanel.POWERED_FLAG | PartPanel.CHANNEL_FLAG ) )
|
||||
{
|
||||
@@ -310,7 +314,7 @@ public abstract class AbstractPartMonitor extends AbstractPartDisplay implements
|
||||
return this.configuredItem;
|
||||
}
|
||||
|
||||
private void tesrRenderScreen( final WorldRenderer wr, final IAEItemStack ais )
|
||||
private void tesrRenderScreen( final VertexBuffer wr, final IAEItemStack ais )
|
||||
{
|
||||
// GL11.glPushAttrib( GL11.GL_ALL_ATTRIB_BITS );
|
||||
|
||||
@@ -435,7 +439,7 @@ public abstract class AbstractPartMonitor extends AbstractPartDisplay implements
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean showNetworkInfo( final MovingObjectPosition where )
|
||||
public boolean showNetworkInfo( final RayTraceResult where )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ package appeng.parts.reporting;
|
||||
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.MathHelper;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import appeng.api.implementations.IPowerChannelState;
|
||||
import appeng.api.implementations.parts.IPartMonitor;
|
||||
@@ -189,7 +189,7 @@ public abstract class AbstractPartReporting extends AEBasePart implements IPartM
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
final TileEntity te = this.getTile();
|
||||
|
||||
|
||||
@@ -25,7 +25,7 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.inventory.IInventory;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import appeng.api.config.Settings;
|
||||
import appeng.api.config.SortDir;
|
||||
@@ -110,7 +110,7 @@ public abstract class AbstractPartTerminal extends AbstractPartDisplay implement
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
if( !super.onPartActivate( player, pos ) )
|
||||
{
|
||||
|
||||
@@ -26,7 +26,8 @@ import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import appeng.api.networking.energy.IEnergySource;
|
||||
import appeng.api.networking.security.PlayerSource;
|
||||
@@ -54,8 +55,11 @@ public class PartConversionMonitor extends AbstractPartMonitor
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartShiftActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartShiftActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
//TODO 1.9.4 - 2 hands! Just do something!
|
||||
final EnumHand hand = EnumHand.MAIN_HAND;
|
||||
|
||||
if( Platform.isClient() )
|
||||
{
|
||||
return true;
|
||||
@@ -73,7 +77,7 @@ public class PartConversionMonitor extends AbstractPartMonitor
|
||||
|
||||
boolean ModeB = false;
|
||||
|
||||
ItemStack item = player.getCurrentEquippedItem();
|
||||
ItemStack item = player.getHeldItem( hand );
|
||||
if( item == null && this.getDisplayed() != null )
|
||||
{
|
||||
ModeB = true;
|
||||
|
||||
@@ -21,7 +21,7 @@ package appeng.parts.reporting;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.math.Vec3d;
|
||||
|
||||
import appeng.client.texture.CableBusTextures;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
@@ -40,7 +40,7 @@ public class PartInterfaceTerminal extends AbstractPartDisplay
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3 pos )
|
||||
public boolean onPartActivate( final EntityPlayer player, final Vec3d pos )
|
||||
{
|
||||
if( !super.onPartActivate( player, pos ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user