The Great Renamening of 2020
This commit is contained in:
+27
-27
@@ -88,15 +88,15 @@ import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.api.util.IConfigManager;
|
||||
import appeng.capabilities.Capabilities;
|
||||
import appeng.container.implementations.ContainerMEMonitorable;
|
||||
import appeng.fluids.container.ContainerFluidTerminal;
|
||||
import appeng.container.implementations.MEMonitorableContainer;
|
||||
import appeng.fluids.container.FluidTerminalContainer;
|
||||
import appeng.fluids.util.AEFluidStack;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.me.helpers.MEMonitorHandler;
|
||||
import appeng.me.helpers.MachineSource;
|
||||
import appeng.me.storage.MEInventoryHandler;
|
||||
import appeng.tile.grid.AENetworkPowerTile;
|
||||
import appeng.tile.grid.AENetworkPowerTileEntity;
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
import appeng.util.ConfigManager;
|
||||
import appeng.util.IConfigManagerHost;
|
||||
@@ -107,7 +107,7 @@ import appeng.util.inv.WrapperChainedItemHandler;
|
||||
import appeng.util.inv.filter.IAEItemFilter;
|
||||
import appeng.util.item.AEItemStack;
|
||||
|
||||
public class TileChest extends AENetworkPowerTile
|
||||
public class ChestTileEntity extends AENetworkPowerTileEntity
|
||||
implements IMEChest, ITerminalHost, IPriorityHost, IConfigManagerHost, IColorableTile, ITickableTileEntity {
|
||||
private final AppEngInternalInventory inputInventory = new AppEngInternalInventory(this, 1);
|
||||
private final AppEngInternalInventory cellInventory = new AppEngInternalInventory(this, 1);
|
||||
@@ -126,7 +126,7 @@ public class TileChest extends AENetworkPowerTile
|
||||
private Accessor accessor;
|
||||
private IFluidHandler fluidHandler;
|
||||
|
||||
public TileChest(TileEntityType<?> tileEntityTypeIn) {
|
||||
public ChestTileEntity(TileEntityType<?> tileEntityTypeIn) {
|
||||
super(tileEntityTypeIn);
|
||||
this.setInternalMaxPower(PowerMultiplier.CONFIG.multiply(40));
|
||||
this.getProxy().setFlags(GridFlags.REQUIRE_CHANNEL);
|
||||
@@ -587,28 +587,28 @@ public class TileChest extends AENetworkPowerTile
|
||||
|
||||
@Override
|
||||
public boolean isValid(final Object verificationToken) {
|
||||
TileChest.this.updateHandler();
|
||||
if (TileChest.this.cellHandler != null && this.chan == TileChest.this.cellHandler.getChannel()) {
|
||||
return verificationToken == TileChest.this.cellHandler;
|
||||
ChestTileEntity.this.updateHandler();
|
||||
if (ChestTileEntity.this.cellHandler != null && this.chan == ChestTileEntity.this.cellHandler.getChannel()) {
|
||||
return verificationToken == ChestTileEntity.this.cellHandler;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postChange(final IBaseMonitor<T> monitor, final Iterable<T> change, final IActionSource source) {
|
||||
if (source == TileChest.this.mySrc
|
||||
|| source.machine().map(machine -> machine == TileChest.this).orElse(false)) {
|
||||
if (source == ChestTileEntity.this.mySrc
|
||||
|| source.machine().map(machine -> machine == ChestTileEntity.this).orElse(false)) {
|
||||
try {
|
||||
if (TileChest.this.getProxy().isActive()) {
|
||||
TileChest.this.getProxy().getStorage().postAlterationOfStoredItems(this.chan, change,
|
||||
TileChest.this.mySrc);
|
||||
if (ChestTileEntity.this.getProxy().isActive()) {
|
||||
ChestTileEntity.this.getProxy().getStorage().postAlterationOfStoredItems(this.chan, change,
|
||||
ChestTileEntity.this.mySrc);
|
||||
}
|
||||
} catch (final GridAccessException e) {
|
||||
// :(
|
||||
}
|
||||
}
|
||||
|
||||
TileChest.this.blinkCell(0);
|
||||
ChestTileEntity.this.blinkCell(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -640,9 +640,9 @@ public class TileChest extends AENetworkPowerTile
|
||||
}
|
||||
|
||||
private boolean securityCheck(final PlayerEntity player, final SecurityPermissions requiredPermission) {
|
||||
if (TileChest.this.getTile() instanceof IActionHost && requiredPermission != null) {
|
||||
if (ChestTileEntity.this.getTile() instanceof IActionHost && requiredPermission != null) {
|
||||
|
||||
final IGridNode gn = ((IActionHost) TileChest.this.getTile()).getActionableNode();
|
||||
final IGridNode gn = ((IActionHost) ChestTileEntity.this.getTile()).getActionableNode();
|
||||
if (gn != null) {
|
||||
final IGrid g = gn.getGrid();
|
||||
if (g != null) {
|
||||
@@ -694,8 +694,8 @@ public class TileChest extends AENetworkPowerTile
|
||||
@Nullable
|
||||
@Override
|
||||
public IStorageMonitorable getInventory(IActionSource src) {
|
||||
if (Platform.canAccess(TileChest.this.getProxy(), src)) {
|
||||
return TileChest.this;
|
||||
if (Platform.canAccess(ChestTileEntity.this.getProxy(), src)) {
|
||||
return ChestTileEntity.this;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -704,7 +704,7 @@ public class TileChest extends AENetworkPowerTile
|
||||
private class FluidHandler implements IFluidHandler, IFluidTank {
|
||||
|
||||
private boolean canAcceptLiquids() {
|
||||
return TileChest.this.cellHandler != null && TileChest.this.cellHandler.getChannel() == AEApi.instance()
|
||||
return ChestTileEntity.this.cellHandler != null && ChestTileEntity.this.cellHandler.getChannel() == AEApi.instance()
|
||||
.storage().getStorageChannel(IFluidStorageChannel.class);
|
||||
}
|
||||
|
||||
@@ -752,10 +752,10 @@ public class TileChest extends AENetworkPowerTile
|
||||
|
||||
@Override
|
||||
public int fill(FluidStack resource, FluidAction action) {
|
||||
TileChest.this.updateHandler();
|
||||
ChestTileEntity.this.updateHandler();
|
||||
if (canAcceptLiquids()) {
|
||||
final IAEFluidStack results = Platform.poweredInsert(TileChest.this, TileChest.this.cellHandler,
|
||||
AEFluidStack.fromFluidStack(resource), TileChest.this.mySrc,
|
||||
final IAEFluidStack results = Platform.poweredInsert(ChestTileEntity.this, ChestTileEntity.this.cellHandler,
|
||||
AEFluidStack.fromFluidStack(resource), ChestTileEntity.this.mySrc,
|
||||
action == FluidAction.EXECUTE ? Actionable.MODULATE : Actionable.SIMULATE);
|
||||
|
||||
if (results == null) {
|
||||
@@ -787,9 +787,9 @@ public class TileChest extends AENetworkPowerTile
|
||||
|
||||
@Override
|
||||
public boolean allowInsert(IItemHandler inv, int slot, ItemStack stack) {
|
||||
if (TileChest.this.isPowered()) {
|
||||
TileChest.this.updateHandler();
|
||||
return TileChest.this.cellHandler != null && TileChest.this.cellHandler.getChannel() == AEApi.instance()
|
||||
if (ChestTileEntity.this.isPowered()) {
|
||||
ChestTileEntity.this.updateHandler();
|
||||
return ChestTileEntity.this.cellHandler != null && ChestTileEntity.this.cellHandler.getChannel() == AEApi.instance()
|
||||
.storage().getStorageChannel(IItemStorageChannel.class);
|
||||
}
|
||||
return false;
|
||||
@@ -821,11 +821,11 @@ public class TileChest extends AENetworkPowerTile
|
||||
if (this.cellHandler != null) {
|
||||
if (this.cellHandler.getChannel() == AEApi.instance().storage()
|
||||
.getStorageChannel(IItemStorageChannel.class)) {
|
||||
return ContainerMEMonitorable.TYPE;
|
||||
return MEMonitorableContainer.TYPE;
|
||||
}
|
||||
if (this.cellHandler.getChannel() == AEApi.instance().storage()
|
||||
.getStorageChannel(IFluidStorageChannel.class)) {
|
||||
return ContainerFluidTerminal.TYPE;
|
||||
return FluidTerminalContainer.TYPE;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
+5
-5
@@ -61,18 +61,18 @@ import appeng.api.util.AEPartLocation;
|
||||
import appeng.api.util.DimensionalCoord;
|
||||
import appeng.block.storage.DriveSlotsState;
|
||||
import appeng.client.render.model.DriveModelData;
|
||||
import appeng.container.implementations.ContainerDrive;
|
||||
import appeng.container.implementations.DriveContainer;
|
||||
import appeng.helpers.IPriorityHost;
|
||||
import appeng.me.GridAccessException;
|
||||
import appeng.me.helpers.MachineSource;
|
||||
import appeng.me.storage.DriveWatcher;
|
||||
import appeng.tile.grid.AENetworkInvTile;
|
||||
import appeng.tile.grid.AENetworkInvTileEntity;
|
||||
import appeng.tile.inventory.AppEngCellInventory;
|
||||
import appeng.util.Platform;
|
||||
import appeng.util.inv.InvOperation;
|
||||
import appeng.util.inv.filter.IAEItemFilter;
|
||||
|
||||
public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPriorityHost {
|
||||
public class DriveTileEntity extends AENetworkInvTileEntity implements IChestOrDrive, IPriorityHost {
|
||||
|
||||
private static final int BIT_POWER_MASK = 0x80000000;
|
||||
private static final int BIT_BLINK_MASK = 0x24924924;
|
||||
@@ -102,7 +102,7 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
|
||||
*/
|
||||
private int state = 0;
|
||||
|
||||
public TileDrive(TileEntityType<?> tileEntityTypeIn) {
|
||||
public DriveTileEntity(TileEntityType<?> tileEntityTypeIn) {
|
||||
super(tileEntityTypeIn);
|
||||
this.mySrc = new MachineSource(this);
|
||||
this.getProxy().setFlags(GridFlags.REQUIRE_CHANNEL);
|
||||
@@ -444,6 +444,6 @@ public class TileDrive extends AENetworkInvTile implements IChestOrDrive, IPrior
|
||||
|
||||
@Override
|
||||
public ContainerType<?> getContainerType() {
|
||||
return ContainerDrive.TYPE;
|
||||
return DriveContainer.TYPE;
|
||||
}
|
||||
}
|
||||
+3
-3
@@ -22,6 +22,7 @@ import java.util.IdentityHashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import appeng.tile.grid.AENetworkInvTileEntity;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.nbt.CompoundNBT;
|
||||
@@ -61,7 +62,6 @@ import appeng.me.GridAccessException;
|
||||
import appeng.me.helpers.MachineSource;
|
||||
import appeng.parts.automation.BlockUpgradeInventory;
|
||||
import appeng.parts.automation.UpgradeInventory;
|
||||
import appeng.tile.grid.AENetworkInvTile;
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
import appeng.util.ConfigManager;
|
||||
import appeng.util.IConfigManagerHost;
|
||||
@@ -74,7 +74,7 @@ import appeng.util.inv.WrapperChainedItemHandler;
|
||||
import appeng.util.inv.WrapperFilteredItemHandler;
|
||||
import appeng.util.inv.filter.AEItemFilters;
|
||||
|
||||
public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IConfigManagerHost, IGridTickable {
|
||||
public class IOPortTileEntity extends AENetworkInvTileEntity implements IUpgradeableHost, IConfigManagerHost, IGridTickable {
|
||||
private static final int NUMBER_OF_CELL_SLOTS = 6;
|
||||
private static final int NUMBER_OF_UPGRADE_SLOTS = 3;
|
||||
|
||||
@@ -95,7 +95,7 @@ public class TileIOPort extends AENetworkInvTile implements IUpgradeableHost, IC
|
||||
private ItemStack currentCell;
|
||||
private Map<IStorageChannel<?>, IMEInventory<?>> cachedInventories;
|
||||
|
||||
public TileIOPort(TileEntityType<?> tileEntityTypeIn) {
|
||||
public IOPortTileEntity(TileEntityType<?> tileEntityTypeIn) {
|
||||
super(tileEntityTypeIn);
|
||||
this.getProxy().setFlags(GridFlags.REQUIRE_CHANNEL);
|
||||
this.manager = new ConfigManager(this);
|
||||
+5
-5
@@ -32,12 +32,12 @@ import net.minecraft.util.SoundEvents;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraftforge.items.IItemHandler;
|
||||
|
||||
import appeng.block.storage.BlockSkyChest;
|
||||
import appeng.tile.AEBaseInvTile;
|
||||
import appeng.block.storage.SkyChestBlock;
|
||||
import appeng.tile.AEBaseInvTileEntity;
|
||||
import appeng.tile.inventory.AppEngInternalInventory;
|
||||
import appeng.util.inv.InvOperation;
|
||||
|
||||
public class TileSkyChest extends AEBaseInvTile implements ITickableTileEntity, IChestLid {
|
||||
public class SkyChestTileEntity extends AEBaseInvTileEntity implements ITickableTileEntity, IChestLid {
|
||||
|
||||
private final AppEngInternalInventory inv = new AppEngInternalInventory(this, 9 * 4);
|
||||
|
||||
@@ -48,7 +48,7 @@ public class TileSkyChest extends AEBaseInvTile implements ITickableTileEntity,
|
||||
private float lidAngle;
|
||||
private float prevLidAngle;
|
||||
|
||||
public TileSkyChest(TileEntityType<? extends TileSkyChest> type) {
|
||||
public SkyChestTileEntity(TileEntityType<? extends SkyChestTileEntity> type) {
|
||||
super(type);
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public class TileSkyChest extends AEBaseInvTile implements ITickableTileEntity,
|
||||
// See ChestTileEntity
|
||||
private void onOpenOrClose() {
|
||||
Block block = this.getBlockState().getBlock();
|
||||
if (block instanceof BlockSkyChest) {
|
||||
if (block instanceof SkyChestBlock) {
|
||||
this.world.addBlockEvent(this.pos, block, 1, this.numPlayersUsing);
|
||||
this.world.notifyNeighborsOfStateChange(this.pos, block);
|
||||
// FIXME: Uhm, we are we doing this?
|
||||
Reference in New Issue
Block a user