HotFix, potentially fixes #260 through catching a null node
Added copyright Reformatted code Rearranged code
This commit is contained in:
parent
38b9241846
commit
0f541484de
1 changed files with 77 additions and 57 deletions
|
@ -1,5 +1,24 @@
|
|||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.parts.misc;
|
||||
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
|
@ -11,6 +30,13 @@ import net.minecraft.nbt.NBTTagCompound;
|
|||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import buildcraft.api.transport.IPipeConnection;
|
||||
import buildcraft.api.transport.IPipeTile.PipeType;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.FuzzyMode;
|
||||
|
@ -60,16 +86,13 @@ import appeng.transformer.annotations.integration.Method;
|
|||
import appeng.util.Platform;
|
||||
import appeng.util.prioitylist.FuzzyPriorityList;
|
||||
import appeng.util.prioitylist.PrecisePriorityList;
|
||||
import buildcraft.api.transport.IPipeConnection;
|
||||
import buildcraft.api.transport.IPipeTile.PipeType;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
|
||||
@Interface( iname = "BC", iface = "buildcraft.api.transport.IPipeConnection" )
|
||||
public class PartStorageBus extends PartUpgradeable implements IGridTickable, ICellContainer, IMEMonitorHandlerReceiver<IAEItemStack>, IPipeConnection,
|
||||
IPriorityHost
|
||||
public class PartStorageBus
|
||||
extends PartUpgradeable
|
||||
implements IGridTickable, ICellContainer, IMEMonitorHandlerReceiver<IAEItemStack>, IPipeConnection, IPriorityHost
|
||||
{
|
||||
|
||||
int priority = 0;
|
||||
final BaseActionSource mySrc;
|
||||
|
||||
|
@ -354,7 +377,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
|||
achievement = ( IInterfaceHost ) part;
|
||||
}
|
||||
|
||||
if ( achievement != null )
|
||||
if ( achievement != null && achievement.getActionableNode() != null )
|
||||
{
|
||||
Platform.addStat( achievement.getActionableNode().getPlayerID(), Achievements.Recursive.getAchievement() );
|
||||
// Platform.addStat( getActionableNode().getPlayerID(), Achievements.Recursive.getAchievement() );
|
||||
|
@ -383,8 +406,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
|||
public void renderStatic( int x, int y, int z, IPartRenderHelper rh, RenderBlocks renderer )
|
||||
{
|
||||
renderCache = rh.useSimplifiedRendering( x, y, z, this, renderCache );
|
||||
rh.setTexture( CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageBack.getIcon(),
|
||||
is.getIconIndex(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon() );
|
||||
rh.setTexture( CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageBack.getIcon(), is.getIconIndex(), CableBusTextures.PartStorageSides.getIcon(), CableBusTextures.PartStorageSides.getIcon() );
|
||||
|
||||
rh.setBounds( 3, 3, 15, 13, 13, 16 );
|
||||
rh.renderBlock( x, y, z, renderer );
|
||||
|
@ -476,8 +498,7 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
|||
|
||||
@Override
|
||||
public void blinkCell( int slot )
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
@Override
|
||||
public void postChange( IBaseMonitor<IAEItemStack> monitor, Iterable<IAEItemStack> change, BaseActionSource source )
|
||||
|
@ -511,5 +532,4 @@ public class PartStorageBus extends PartUpgradeable implements IGridTickable, IC
|
|||
{
|
||||
// nope!
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue