reformatted all src files (#141)
This commit is contained in:
@@ -19,8 +19,11 @@
|
||||
package appeng.block.misc;
|
||||
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.tile.misc.TileCondenser;
|
||||
import appeng.util.Platform;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -29,39 +32,29 @@ import net.minecraft.util.EnumHand;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.block.AEBaseTileBlock;
|
||||
import appeng.core.sync.GuiBridge;
|
||||
import appeng.tile.misc.TileCondenser;
|
||||
import appeng.util.Platform;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
|
||||
public class BlockCondenser extends AEBaseTileBlock
|
||||
{
|
||||
public class BlockCondenser extends AEBaseTileBlock {
|
||||
|
||||
public BlockCondenser()
|
||||
{
|
||||
super( Material.IRON );
|
||||
}
|
||||
public BlockCondenser() {
|
||||
super(Material.IRON);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onActivated( final World w, final BlockPos pos, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( player.isSneaking() )
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@Override
|
||||
public boolean onActivated(final World w, final BlockPos pos, final EntityPlayer player, final EnumHand hand, final @Nullable ItemStack heldItem, final EnumFacing side, final float hitX, final float hitY, final float hitZ) {
|
||||
if (player.isSneaking()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if( Platform.isServer() )
|
||||
{
|
||||
final TileCondenser tc = this.getTileEntity( w, pos );
|
||||
if( tc != null && !player.isSneaking() )
|
||||
{
|
||||
Platform.openGUI( player, tc, AEPartLocation.fromFacing( side ), GuiBridge.GUI_CONDENSER );
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if (Platform.isServer()) {
|
||||
final TileCondenser tc = this.getTileEntity(w, pos);
|
||||
if (tc != null && !player.isSneaking()) {
|
||||
Platform.openGUI(player, tc, AEPartLocation.fromFacing(side), GuiBridge.GUI_CONDENSER);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user