Merge branch 'master' of https://bitbucket.org/AlgorithmX2/appliedenergistics2
This commit is contained in:
commit
8d44d01fc0
3 changed files with 28 additions and 12 deletions
2
api
2
api
|
@ -1 +1 @@
|
|||
Subproject commit 2c9d87df822a15136c7446db0d8d3b72b7feb4e5
|
||||
Subproject commit 28e318ff1a990aef0131f3156134d4c8b1502364
|
|
@ -7,6 +7,7 @@ import net.minecraft.client.renderer.RenderBlocks;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.world.IBlockAccess;
|
||||
import appeng.block.AEBaseBlock;
|
||||
import appeng.core.AELog;
|
||||
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
|
||||
import cpw.mods.fml.client.registry.RenderingRegistry;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
|
@ -58,13 +59,20 @@ public class WorldRender implements ISimpleBlockRenderingHandler
|
|||
|
||||
public void renderItemBlock(ItemStack item)
|
||||
{
|
||||
AEBaseBlock block = (AEBaseBlock) Block.getBlockFromItem( item.getItem() );
|
||||
renderer.setRenderBoundsFromBlock( block );
|
||||
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
getRender( block ).renderInventory( block, item, renderer );
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
|
||||
Block blk = Block.getBlockFromItem( item.getItem() );
|
||||
if ( blk instanceof AEBaseBlock )
|
||||
{
|
||||
AEBaseBlock block = (AEBaseBlock)blk;
|
||||
renderer.setRenderBoundsFromBlock( block );
|
||||
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
getRender( block ).renderInventory( block, item, renderer );
|
||||
renderer.uvRotateBottom = renderer.uvRotateEast = renderer.uvRotateNorth = renderer.uvRotateSouth = renderer.uvRotateTop = renderer.uvRotateWest = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
AELog.severe( "Invalid render: "+item.getUnlocalizedName() +" as ae block" );
|
||||
}
|
||||
}
|
||||
|
||||
private BaseBlockRender getRender(AEBaseBlock block)
|
||||
|
|
|
@ -8,6 +8,7 @@ import net.minecraft.inventory.IInventory;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.SecurityPermissions;
|
||||
import appeng.api.features.INetworkEncodable;
|
||||
import appeng.api.features.IWirelessTermHandler;
|
||||
import appeng.api.implementations.items.IBiometricCard;
|
||||
import appeng.api.storage.ITerminalHost;
|
||||
|
@ -136,11 +137,18 @@ public class ContainerSecurity extends ContainerMEMonitorable implements IAEAppE
|
|||
if ( wirelessIn.getHasStack() )
|
||||
{
|
||||
ItemStack term = wirelessIn.getStack().copy();
|
||||
IWirelessTermHandler h = AEApi.instance().registries().wireless().getWirelessTerminalHandler( term );
|
||||
|
||||
if ( h != null )
|
||||
INetworkEncodable netEncodeable = null;
|
||||
|
||||
if ( term.getItem() instanceof INetworkEncodable )
|
||||
netEncodeable = (INetworkEncodable) term.getItem();
|
||||
|
||||
IWirelessTermHandler wTermHandler = AEApi.instance().registries().wireless().getWirelessTerminalHandler( term );
|
||||
if ( wTermHandler != null )
|
||||
netEncodeable = wTermHandler;
|
||||
|
||||
if ( netEncodeable != null )
|
||||
{
|
||||
h.setEncryptionKey( term, "" + securityBox.securityKey, "" );
|
||||
netEncodeable.setEncryptionKey( term, "" + securityBox.securityKey, "" );
|
||||
|
||||
wirelessIn.putStack( null );
|
||||
wirelessOut.putStack( term );
|
||||
|
|
Loading…
Reference in a new issue