More Renames

This commit is contained in:
Sebastian Hartte
2020-06-02 02:38:10 +02:00
parent fc300745cd
commit d4c9e5c490
9 changed files with 28 additions and 32 deletions
+1
View File
@@ -191,6 +191,7 @@ sourceSets {
include 'appeng/me/GridStorage*' include 'appeng/me/GridStorage*'
include 'appeng/capabilities/*' include 'appeng/capabilities/*'
include 'appeng/container/slot/AppEngSlot*' include 'appeng/container/slot/AppEngSlot*'
include 'appeng/container/AEBaseContainer*'
} }
compileClasspath += sourceSets.api.output compileClasspath += sourceSets.api.output
runtimeClasspath += sourceSets.api.output runtimeClasspath += sourceSets.api.output
@@ -21,7 +21,7 @@ package appeng.container.implementations;
import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.IInventory;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.CraftingInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe; import net.minecraft.item.crafting.IRecipe;
@@ -80,7 +80,7 @@ public class ContainerCraftingTerm extends ContainerMEMonitorable implements IAE
public void onCraftMatrixChanged( IInventory inventory ) public void onCraftMatrixChanged( IInventory inventory )
{ {
final ContainerNull cn = new ContainerNull(); final ContainerNull cn = new ContainerNull();
final InventoryCrafting ic = new InventoryCrafting( cn, 3, 3 ); final CraftingInventory ic = new CraftingInventory( cn, 3, 3 );
for( int x = 0; x < 9; x++ ) for( int x = 0; x < 9; x++ )
{ {
@@ -28,7 +28,7 @@ import net.minecraft.entity.player.ServerPlayerEntity;
import net.minecraft.entity.player.PlayerInventory; import net.minecraft.entity.player.PlayerInventory;
import net.minecraft.inventory.IContainerListener; import net.minecraft.inventory.IContainerListener;
import net.minecraft.inventory.InventoryCraftResult; import net.minecraft.inventory.InventoryCraftResult;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.CraftingInventory;
import net.minecraft.inventory.Slot; import net.minecraft.inventory.Slot;
import net.minecraft.inventory.SlotCrafting; import net.minecraft.inventory.SlotCrafting;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
@@ -163,7 +163,7 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
private ItemStack getAndUpdateOutput() private ItemStack getAndUpdateOutput()
{ {
final World world = this.getPlayerInv().player.world; final World world = this.getPlayerInv().player.world;
final InventoryCrafting ic = new InventoryCrafting( this, 3, 3 ); final CraftingInventory ic = new CraftingInventory( this, 3, 3 );
for( int x = 0; x < ic.getSizeInventory(); x++ ) for( int x = 0; x < ic.getSizeInventory(); x++ )
{ {
@@ -402,8 +402,8 @@ public class ContainerPatternTerm extends ContainerMEMonitorable implements IAEA
return; return;
} }
final InventoryCrafting ic = new InventoryCrafting( new ContainerNull(), 3, 3 ); final CraftingInventory ic = new CraftingInventory( new ContainerNull(), 3, 3 );
final InventoryCrafting real = new InventoryCrafting( new ContainerNull(), 3, 3 ); final CraftingInventory real = new CraftingInventory( new ContainerNull(), 3, 3 );
for( int x = 0; x < 9; x++ ) for( int x = 0; x < 9; x++ )
{ {
@@ -20,11 +20,13 @@ package appeng.container.slot;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.CraftingInventory;
import net.minecraft.inventory.CraftingInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.util.NonNullList; import net.minecraft.util.NonNullList;
import net.minecraft.world.World; import net.minecraft.world.World;
import net.minecraftforge.fml.hooks.BasicEventHooks;
import net.minecraftforge.items.IItemHandler; import net.minecraftforge.items.IItemHandler;
import appeng.util.helpers.ItemHandlerUtil; import appeng.util.helpers.ItemHandlerUtil;
@@ -140,10 +142,10 @@ public class AppEngCraftingSlot extends AppEngSlot
@Override @Override
public ItemStack onTake( final PlayerEntity playerIn, final ItemStack stack ) public ItemStack onTake( final PlayerEntity playerIn, final ItemStack stack )
{ {
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent( playerIn, stack, new WrapperInvItemHandler( this.craftMatrix ) ); BasicEventHooks.firePlayerCraftingEvent( playerIn, stack, new WrapperInvItemHandler( this.craftMatrix ) );
this.onCrafting( stack ); this.onCrafting( stack );
net.minecraftforge.common.ForgeHooks.setCraftingPlayer( playerIn ); net.minecraftforge.common.ForgeHooks.setCraftingPlayer( playerIn );
final InventoryCrafting ic = new InventoryCrafting( this.getContainer(), 3, 3 ); final CraftingInventory ic = new CraftingInventory( this.getContainer(), 3, 3 );
for( int x = 0; x < this.craftMatrix.getSlots(); x++ ) for( int x = 0; x < this.craftMatrix.getSlots(); x++ )
{ {
@@ -198,7 +200,7 @@ public class AppEngCraftingSlot extends AppEngSlot
} }
// TODO: This is really hacky and NEEDS to be solved with a full container/gui refactoring. // TODO: This is really hacky and NEEDS to be solved with a full container/gui refactoring.
protected NonNullList<ItemStack> getRemainingItems( InventoryCrafting ic, World world ) protected NonNullList<ItemStack> getRemainingItems( CraftingInventory ic, World world )
{ {
return CraftingManager.getRemainingItems( ic, world ); return CraftingManager.getRemainingItems( ic, world );
} }
@@ -22,11 +22,10 @@ package appeng.container.slot;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.IInventory; import net.minecraft.inventory.container.Slot;
import net.minecraft.inventory.Slot;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
// FIXME seems unused
public class NullSlot extends Slot public class NullSlot extends Slot
{ {
@@ -84,12 +83,6 @@ public class NullSlot extends Slot
return ItemStack.EMPTY; return ItemStack.EMPTY;
} }
@Override
public boolean isHere( final IInventory inv, final int slotIn )
{
return false;
}
@Override @Override
public boolean canTakeStack( final PlayerEntity par1PlayerEntity ) public boolean canTakeStack( final PlayerEntity par1PlayerEntity )
{ {
@@ -24,7 +24,7 @@ import java.util.Arrays;
import java.util.List; import java.util.List;
import net.minecraft.entity.player.PlayerEntity; import net.minecraft.entity.player.PlayerEntity;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.CraftingInventory;
import net.minecraft.item.Item; import net.minecraft.item.Item;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager; import net.minecraft.item.crafting.CraftingManager;
@@ -160,7 +160,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
} }
// TODO: This is really hacky and NEEDS to be solved with a full container/gui refactoring. // TODO: This is really hacky and NEEDS to be solved with a full container/gui refactoring.
protected IRecipe findRecipe( InventoryCrafting ic, World world ) protected IRecipe findRecipe( CraftingInventory ic, World world )
{ {
if( this.container instanceof ContainerCraftingTerm ) if( this.container instanceof ContainerCraftingTerm )
{ {
@@ -178,7 +178,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
// TODO: This is really hacky and NEEDS to be solved with a full container/gui refactoring. // TODO: This is really hacky and NEEDS to be solved with a full container/gui refactoring.
@Override @Override
protected NonNullList<ItemStack> getRemainingItems( InventoryCrafting ic, World world ) protected NonNullList<ItemStack> getRemainingItems( CraftingInventory ic, World world )
{ {
if( this.container instanceof ContainerCraftingTerm ) if( this.container instanceof ContainerCraftingTerm )
{ {
@@ -213,7 +213,7 @@ public class SlotCraftingTerm extends AppEngCraftingSlot
// add one of each item to the items on the board... // add one of each item to the items on the board...
if( Platform.isServer() ) if( Platform.isServer() )
{ {
final InventoryCrafting ic = new InventoryCrafting( new ContainerNull(), 3, 3 ); final CraftingInventory ic = new CraftingInventory( new ContainerNull(), 3, 3 );
for( int x = 0; x < 9; x++ ) for( int x = 0; x < 9; x++ )
{ {
ic.setInventorySlotContents( x, this.getPattern().getStackInSlot( x ) ); ic.setInventorySlotContents( x, this.getPattern().getStackInSlot( x ) );
@@ -29,7 +29,7 @@ import java.util.Map.Entry;
import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableList;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.CraftingInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.nbt.ListNBT; import net.minecraft.nbt.ListNBT;
@@ -646,7 +646,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
if( this.canCraft( details, details.getCondensedInputs() ) ) if( this.canCraft( details, details.getCondensedInputs() ) )
{ {
InventoryCrafting ic = null; CraftingInventory ic = null;
for( final ICraftingMedium m : cc.getMediums( e.getKey() ) ) for( final ICraftingMedium m : cc.getMediums( e.getKey() ) )
{ {
@@ -676,7 +676,7 @@ public final class CraftingCPUCluster implements IAECluster, ICraftingCPU
continue; continue;
} }
ic = new InventoryCrafting( new ContainerNull(), 3, 3 ); ic = new CraftingInventory( new ContainerNull(), 3, 3 );
boolean found = false; boolean found = false;
for( int x = 0; x < input.length; x++ ) for( int x = 0; x < input.length; x++ )
@@ -24,7 +24,7 @@ import java.util.List;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.CraftingInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.network.PacketBuffer; import net.minecraft.network.PacketBuffer;
@@ -81,7 +81,7 @@ import appeng.util.item.AEItemStack;
public class TileMolecularAssembler extends AENetworkInvTile implements IUpgradeableHost, IConfigManagerHost, IGridTickable, ICraftingMachine, IPowerChannelState public class TileMolecularAssembler extends AENetworkInvTile implements IUpgradeableHost, IConfigManagerHost, IGridTickable, ICraftingMachine, IPowerChannelState
{ {
private final InventoryCrafting craftingInv; private final CraftingInventory craftingInv;
private final AppEngInternalInventory gridInv = new AppEngInternalInventory( this, 9 + 1, 1 ); private final AppEngInternalInventory gridInv = new AppEngInternalInventory( this, 9 + 1, 1 );
private final AppEngInternalInventory patternInv = new AppEngInternalInventory( this, 1, 1 ); private final AppEngInternalInventory patternInv = new AppEngInternalInventory( this, 1, 1 );
private final IItemHandler gridInvExt = new WrapperFilteredItemHandler( this.gridInv, new CraftingGridFilter() ); private final IItemHandler gridInvExt = new WrapperFilteredItemHandler( this.gridInv, new CraftingGridFilter() );
@@ -105,7 +105,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
this.settings.registerSetting( Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE ); this.settings.registerSetting( Settings.REDSTONE_CONTROLLED, RedstoneMode.IGNORE );
this.getProxy().setIdlePowerUsage( 0.0 ); this.getProxy().setIdlePowerUsage( 0.0 );
this.upgrades = new DefinitionUpgradeInventory( assembler, this, this.getUpgradeSlots() ); this.upgrades = new DefinitionUpgradeInventory( assembler, this, this.getUpgradeSlots() );
this.craftingInv = new InventoryCrafting( new ContainerNull(), 3, 3 ); this.craftingInv = new CraftingInventory( new ContainerNull(), 3, 3 );
} }
@@ -115,7 +115,7 @@ public class TileMolecularAssembler extends AENetworkInvTile implements IUpgrade
} }
@Override @Override
public boolean pushPattern( final ICraftingPatternDetails patternDetails, final InventoryCrafting table, final Direction where ) public boolean pushPattern( final ICraftingPatternDetails patternDetails, final CraftingInventory table, final Direction where )
{ {
if( this.myPattern.isEmpty() ) if( this.myPattern.isEmpty() )
{ {
@@ -29,7 +29,7 @@ import com.google.common.collect.ImmutableSet;
import io.netty.buffer.ByteBuf; import io.netty.buffer.ByteBuf;
import net.minecraft.inventory.InventoryCrafting; import net.minecraft.inventory.CraftingInventory;
import net.minecraft.item.ItemStack; import net.minecraft.item.ItemStack;
import net.minecraft.nbt.CompoundNBT; import net.minecraft.nbt.CompoundNBT;
import net.minecraft.network.PacketBuffer; import net.minecraft.network.PacketBuffer;
@@ -277,7 +277,7 @@ public class TileInterface extends AENetworkInvTile implements IGridTickable, II
} }
@Override @Override
public boolean pushPattern( final ICraftingPatternDetails patternDetails, final InventoryCrafting table ) public boolean pushPattern( final ICraftingPatternDetails patternDetails, final CraftingInventory table )
{ {
return this.duality.pushPattern( patternDetails, table ); return this.duality.pushPattern( patternDetails, table );
} }