Format sourcecode
This commit is contained in:
@@ -72,7 +72,7 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
@Override
|
||||
public EnumActionResult onItemUseFirst( final EntityPlayer player, final World world, final BlockPos pos, final EnumFacing side, final float hitX, final float hitY, final float hitZ, final EnumHand hand )
|
||||
{
|
||||
return AEApi.instance().partHelper().placeBus( player.getHeldItem(hand), pos, side, player, hand, world );
|
||||
return AEApi.instance().partHelper().placeBus( player.getHeldItem( hand ), pos, side, player, hand, world );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -183,7 +183,8 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
final boolean defaultValue = ( b.isTopSolid( blockState ) && hasSimpleModel( blockState ) && !b.getTickRandomly() && !hasTile && !disableOre ) || enableGlass;
|
||||
final boolean defaultValue = ( b
|
||||
.isTopSolid( blockState ) && hasSimpleModel( blockState ) && !b.getTickRandomly() && !hasTile && !disableOre ) || enableGlass;
|
||||
if( FacadeConfig.instance().checkEnabled( b, metadata, defaultValue ) )
|
||||
{
|
||||
if( returnItem )
|
||||
@@ -236,13 +237,16 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
}
|
||||
|
||||
Item item = Item.REGISTRY.getObjectById( data[0] );
|
||||
if ( item == null ) {
|
||||
if( item == null )
|
||||
{
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
itemId = item.getRegistryName();
|
||||
itemDamage = data[1];
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
// First item is numeric item id, second is damage
|
||||
itemId = new ResourceLocation( nbt.getString( TAG_ITEM_ID ) );
|
||||
itemDamage = nbt.getInteger( TAG_DAMAGE );
|
||||
@@ -309,12 +313,17 @@ public class ItemFacade extends AEBaseItem implements IFacadeItem, IAlphaPassIte
|
||||
|
||||
public ItemStack createFromIDs( final int[] ids )
|
||||
{
|
||||
ItemStack facadeStack = AEApi.instance().definitions().items().facade().maybeStack( 1 )
|
||||
ItemStack facadeStack = AEApi.instance()
|
||||
.definitions()
|
||||
.items()
|
||||
.facade()
|
||||
.maybeStack( 1 )
|
||||
.orElseThrow( () -> new MissingDefinition( "Tried to create a facade, while facades are being deactivated." ) );
|
||||
|
||||
// Convert back to a registry name...
|
||||
Item item = Item.REGISTRY.getObjectById( ids[0] );
|
||||
if ( item == null ) {
|
||||
if( item == null )
|
||||
{
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
|
||||
@@ -154,12 +154,12 @@ public final class ItemPart extends AEBaseItem implements IPartItem, IItemGroup
|
||||
@Override
|
||||
public EnumActionResult onItemUse( final EntityPlayer player, final World w, final BlockPos pos, final EnumHand hand, final EnumFacing side, final float hitX, final float hitY, final float hitZ )
|
||||
{
|
||||
if( this.getTypeByStack( player.getHeldItem(hand) ) == PartType.INVALID_TYPE )
|
||||
if( this.getTypeByStack( player.getHeldItem( hand ) ) == PartType.INVALID_TYPE )
|
||||
{
|
||||
return EnumActionResult.FAIL;
|
||||
}
|
||||
|
||||
return AEApi.instance().partHelper().placeBus( player.getHeldItem(hand), pos, side, player, hand, w );
|
||||
return AEApi.instance().partHelper().placeBus( player.getHeldItem( hand ), pos, side, player, hand, w );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -242,19 +242,23 @@ public final class ItemPart extends AEBaseItem implements IPartItem, IItemGroup
|
||||
}
|
||||
catch( final InstantiationException e )
|
||||
{
|
||||
throw new IllegalStateException( "Unable to construct IBusPart from IBusItem : " + part.getName() + " ; Possibly didn't have correct constructor( ItemStack )", e );
|
||||
throw new IllegalStateException( "Unable to construct IBusPart from IBusItem : " + part
|
||||
.getName() + " ; Possibly didn't have correct constructor( ItemStack )", e );
|
||||
}
|
||||
catch( final IllegalAccessException e )
|
||||
{
|
||||
throw new IllegalStateException( "Unable to construct IBusPart from IBusItem : " + part.getName() + " ; Possibly didn't have correct constructor( ItemStack )", e );
|
||||
throw new IllegalStateException( "Unable to construct IBusPart from IBusItem : " + part
|
||||
.getName() + " ; Possibly didn't have correct constructor( ItemStack )", e );
|
||||
}
|
||||
catch( final InvocationTargetException e )
|
||||
{
|
||||
throw new IllegalStateException( "Unable to construct IBusPart from IBusItem : " + part.getName() + " ; Possibly didn't have correct constructor( ItemStack )", e );
|
||||
throw new IllegalStateException( "Unable to construct IBusPart from IBusItem : " + part
|
||||
.getName() + " ; Possibly didn't have correct constructor( ItemStack )", e );
|
||||
}
|
||||
catch( final NoSuchMethodException e )
|
||||
{
|
||||
throw new IllegalStateException( "Unable to construct IBusPart from IBusItem : " + part.getName() + " ; Possibly didn't have correct constructor( ItemStack )", e );
|
||||
throw new IllegalStateException( "Unable to construct IBusPart from IBusItem : " + part
|
||||
.getName() + " ; Possibly didn't have correct constructor( ItemStack )", e );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -35,5 +35,4 @@ import java.lang.annotation.Target;
|
||||
ElementType.METHOD
|
||||
} )
|
||||
public @interface PartModels
|
||||
{
|
||||
}
|
||||
{}
|
||||
|
||||
@@ -131,7 +131,8 @@ public enum PartType
|
||||
}
|
||||
},
|
||||
|
||||
CABLE_DENSE_SMART( 60, "cable_dense_smart", EnumSet.of( AEFeature.CHANNELS, AEFeature.DENSE_CABLES ), EnumSet.noneOf( IntegrationType.class ), PartDenseCable.class )
|
||||
CABLE_DENSE_SMART( 60, "cable_dense_smart", EnumSet.of( AEFeature.CHANNELS, AEFeature.DENSE_CABLES ), EnumSet
|
||||
.noneOf( IntegrationType.class ), PartDenseCable.class )
|
||||
{
|
||||
@Override
|
||||
public boolean isCable()
|
||||
@@ -181,7 +182,8 @@ public enum PartType
|
||||
|
||||
PATTERN_TERMINAL( 340, "pattern_terminal", EnumSet.of( AEFeature.PATTERNS ), EnumSet.noneOf( IntegrationType.class ), PartPatternTerminal.class ),
|
||||
|
||||
CRAFTING_TERMINAL( 360, "crafting_terminal", EnumSet.of( AEFeature.CRAFTING_TERMINAL ), EnumSet.noneOf( IntegrationType.class ), PartCraftingTerminal.class ),
|
||||
CRAFTING_TERMINAL( 360, "crafting_terminal", EnumSet.of( AEFeature.CRAFTING_TERMINAL ), EnumSet
|
||||
.noneOf( IntegrationType.class ), PartCraftingTerminal.class ),
|
||||
|
||||
TERMINAL( 380, "terminal", EnumSet.of( AEFeature.TERMINAL ), EnumSet.noneOf( IntegrationType.class ), PartTerminal.class ),
|
||||
|
||||
@@ -233,7 +235,7 @@ public enum PartType
|
||||
},
|
||||
|
||||
P2P_TUNNEL_IC2( 465, "p2p_tunnel_ic2", EnumSet.of( AEFeature.P2P_TUNNEL, AEFeature.P2P_TUNNEL_EU ), EnumSet
|
||||
.of ( IntegrationType.IC2 ), PartP2PIC2Power.class, GuiText.EUTunnel )
|
||||
.of( IntegrationType.IC2 ), PartP2PIC2Power.class, GuiText.EUTunnel )
|
||||
{
|
||||
@Override
|
||||
String getUnlocalizedName()
|
||||
@@ -243,7 +245,7 @@ public enum PartType
|
||||
},
|
||||
|
||||
P2P_TUNNEL_RF( 466, "p2p_tunnel_rf", EnumSet.of( AEFeature.P2P_TUNNEL, AEFeature.P2P_TUNNEL_RF ), EnumSet
|
||||
.of ( IntegrationType.RF ), PartP2PRFPower.class, GuiText.RFTunnel )
|
||||
.of( IntegrationType.RF ), PartP2PRFPower.class, GuiText.RFTunnel )
|
||||
{
|
||||
@Override
|
||||
String getUnlocalizedName()
|
||||
@@ -263,13 +265,13 @@ public enum PartType
|
||||
},
|
||||
|
||||
P2P_TUNNEL_FE( 469, "p2p_tunnel_fe", EnumSet.of( AEFeature.P2P_TUNNEL, AEFeature.P2P_TUNNEL_FE ), EnumSet
|
||||
.noneOf( IntegrationType.class ), PartP2PFEPower.class, GuiText.FETunnel )
|
||||
.noneOf( IntegrationType.class ), PartP2PFEPower.class, GuiText.FETunnel )
|
||||
{
|
||||
@Override
|
||||
String getUnlocalizedName()
|
||||
{
|
||||
return "p2p_tunnel";
|
||||
}
|
||||
{
|
||||
return "p2p_tunnel";
|
||||
}
|
||||
},
|
||||
|
||||
// P2PTunnelOpenComputers( 468, EnumSet.of( AEFeature.P2PTunnel, AEFeature.P2PTunnelOpenComputers ), EnumSet.of(
|
||||
|
||||
Reference in New Issue
Block a user