Formatted code
This commit is contained in:
@@ -75,7 +75,7 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
@Override
|
||||
/**
|
||||
* Overridden super.setupConfig to prevent setting up the fake slots
|
||||
*/ protected void setupConfig()
|
||||
*/protected void setupConfig()
|
||||
{
|
||||
this.setupUpgrades();
|
||||
}
|
||||
@@ -126,10 +126,10 @@ public class ContainerInscriber extends ContainerUpgradeable implements IProgres
|
||||
for( final IInscriberRecipe recipe : AEApi.instance().registries().inscriber().getRecipes() )
|
||||
{
|
||||
final boolean matchA = ( top == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( top, recipe.getTopOptional().orNull() ) ) && // and...
|
||||
( bot == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( bot, recipe.getBottomOptional().orNull() ) );
|
||||
( bot == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( bot, recipe.getBottomOptional().orNull() ) );
|
||||
|
||||
final boolean matchB = ( bot == null && !recipe.getTopOptional().isPresent() ) || ( Platform.isSameItemPrecise( bot, recipe.getTopOptional().orNull() ) ) && // and...
|
||||
( top == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( top, recipe.getBottomOptional().orNull() ) );
|
||||
( top == null && !recipe.getBottomOptional().isPresent() ) | ( Platform.isSameItemPrecise( top, recipe.getBottomOptional().orNull() ) );
|
||||
|
||||
if( matchA || matchB )
|
||||
{
|
||||
|
||||
@@ -230,16 +230,16 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
|
||||
public void openInventory(
|
||||
final EntityPlayer player )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void closeInventory(
|
||||
final EntityPlayer player )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isItemValidForSlot( final int var1, final ItemStack var2 )
|
||||
{
|
||||
@@ -264,7 +264,7 @@ public class ContainerQuartzKnife extends AEBaseContainer implements IAEAppEngIn
|
||||
final int id,
|
||||
final int value )
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -46,7 +46,7 @@ public class ContainerSkyChest extends AEBaseContainer
|
||||
}
|
||||
}
|
||||
|
||||
this.chest.openInventory(ip.player);
|
||||
this.chest.openInventory( ip.player );
|
||||
|
||||
this.bindPlayerInventory( ip, 0, 195 - /* height of player inventory */82 );
|
||||
}
|
||||
@@ -55,6 +55,6 @@ public class ContainerSkyChest extends AEBaseContainer
|
||||
public void onContainerClosed( final EntityPlayer par1EntityPlayer )
|
||||
{
|
||||
super.onContainerClosed( par1EntityPlayer );
|
||||
this.chest.closeInventory(par1EntityPlayer);
|
||||
this.chest.closeInventory( par1EntityPlayer );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,43 +142,43 @@ public class AppEngCraftingSlot extends AppEngSlot
|
||||
@Override
|
||||
public void onPickupFromSlot( final EntityPlayer playerIn, final ItemStack stack )
|
||||
{
|
||||
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent(playerIn, stack, this.craftMatrix );
|
||||
this.onCrafting(stack);
|
||||
net.minecraftforge.common.ForgeHooks.setCraftingPlayer(playerIn);
|
||||
final InventoryCrafting ic = new InventoryCrafting( this.getContainer(), 3, 3 );
|
||||
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent( playerIn, stack, this.craftMatrix );
|
||||
this.onCrafting( stack );
|
||||
net.minecraftforge.common.ForgeHooks.setCraftingPlayer( playerIn );
|
||||
final InventoryCrafting ic = new InventoryCrafting( this.getContainer(), 3, 3 );
|
||||
|
||||
for ( int x=0; x < this.craftMatrix.getSizeInventory(); x++ )
|
||||
ic.setInventorySlotContents( x, this.craftMatrix.getStackInSlot( x ) );
|
||||
for( int x = 0; x < this.craftMatrix.getSizeInventory(); x++ )
|
||||
ic.setInventorySlotContents( x, this.craftMatrix.getStackInSlot( x ) );
|
||||
|
||||
final ItemStack[] aitemstack = CraftingManager.getInstance().func_180303_b(ic, playerIn.worldObj);
|
||||
final ItemStack[] aitemstack = CraftingManager.getInstance().func_180303_b( ic, playerIn.worldObj );
|
||||
|
||||
for ( int x=0; x < this.craftMatrix.getSizeInventory(); x++ )
|
||||
for( int x = 0; x < this.craftMatrix.getSizeInventory(); x++ )
|
||||
this.craftMatrix.setInventorySlotContents( x, ic.getStackInSlot( x ) );
|
||||
|
||||
net.minecraftforge.common.ForgeHooks.setCraftingPlayer(null);
|
||||
net.minecraftforge.common.ForgeHooks.setCraftingPlayer( null );
|
||||
|
||||
for (int i = 0; i < aitemstack.length; ++i)
|
||||
{
|
||||
final ItemStack itemstack1 = this.craftMatrix.getStackInSlot(i);
|
||||
final ItemStack itemstack2 = aitemstack[i];
|
||||
for( int i = 0; i < aitemstack.length; ++i )
|
||||
{
|
||||
final ItemStack itemstack1 = this.craftMatrix.getStackInSlot( i );
|
||||
final ItemStack itemstack2 = aitemstack[i];
|
||||
|
||||
if (itemstack1 != null)
|
||||
{
|
||||
this.craftMatrix.decrStackSize(i, 1);
|
||||
}
|
||||
if( itemstack1 != null )
|
||||
{
|
||||
this.craftMatrix.decrStackSize( i, 1 );
|
||||
}
|
||||
|
||||
if (itemstack2 != null)
|
||||
{
|
||||
if (this.craftMatrix.getStackInSlot(i) == null)
|
||||
{
|
||||
this.craftMatrix.setInventorySlotContents(i, itemstack2);
|
||||
}
|
||||
else if (!this.thePlayer.inventory.addItemStackToInventory(itemstack2))
|
||||
{
|
||||
this.thePlayer.dropPlayerItemWithRandomChoice(itemstack2, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
if( itemstack2 != null )
|
||||
{
|
||||
if( this.craftMatrix.getStackInSlot( i ) == null )
|
||||
{
|
||||
this.craftMatrix.setInventorySlotContents( i, itemstack2 );
|
||||
}
|
||||
else if( !this.thePlayer.inventory.addItemStackToInventory( itemstack2 ) )
|
||||
{
|
||||
this.thePlayer.dropPlayerItemWithRandomChoice( itemstack2, false );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -21,8 +21,8 @@ package appeng.container.slot;
|
||||
|
||||
import net.minecraft.inventory.IInventory;
|
||||
|
||||
// there is nothing special about this slot, its simply used to represent the players inventory, vs a container slot.
|
||||
|
||||
// there is nothing special about this slot, its simply used to represent the players inventory, vs a container slot.
|
||||
|
||||
public class SlotPlayerInv extends AppEngSlot
|
||||
{
|
||||
|
||||
@@ -144,7 +144,8 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||
{
|
||||
return true;
|
||||
}
|
||||
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ? ((ICraftingPatternItem)
|
||||
// ICraftingPatternDetails pattern = i.getItem() instanceof ICraftingPatternItem ?
|
||||
// ((ICraftingPatternItem)
|
||||
// i.getItem()).getPatternForItem( i ) : null;
|
||||
return false;// pattern != null;
|
||||
}
|
||||
@@ -178,8 +179,8 @@ public class SlotRestrictedInput extends AppEngSlot
|
||||
|
||||
case INSCRIBER_INPUT:
|
||||
return true;/*
|
||||
* for (ItemStack is : Inscribe.inputs) if ( Platform.isSameItemPrecise( is, i ) ) return true;
|
||||
*
|
||||
* for (ItemStack is : Inscribe.inputs) if ( Platform.isSameItemPrecise( is, i ) ) return
|
||||
* true;
|
||||
* return false;
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user