Revert using internal API
This commit is contained in:
@@ -46,6 +46,10 @@ public final class TileDefinition extends BlockDefinition implements ITileDefini
|
||||
@Override
|
||||
public Optional<? extends Class<? extends TileEntity>> maybeEntity()
|
||||
{
|
||||
return this.block.map( AEBaseTileBlock::getTileEntityClass );
|
||||
if (this.block.isPresent()) {
|
||||
|
||||
}
|
||||
|
||||
return this.block.map( block -> block.getTileEntityClass() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,6 +36,7 @@ import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fluids.capability.CapabilityFluidHandler;
|
||||
import net.minecraftforge.registries.ForgeRegistries;
|
||||
|
||||
import appeng.api.AEApi;
|
||||
import appeng.api.config.TunnelType;
|
||||
import appeng.api.definitions.IBlocks;
|
||||
import appeng.api.definitions.IDefinitions;
|
||||
@@ -44,7 +45,6 @@ import appeng.api.definitions.IParts;
|
||||
import appeng.api.features.IP2PTunnelRegistry;
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.capabilities.Capabilities;
|
||||
import appeng.core.Api;
|
||||
|
||||
|
||||
public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||
@@ -58,7 +58,7 @@ public final class P2PTunnelRegistry implements IP2PTunnelRegistry
|
||||
public void configure()
|
||||
{
|
||||
|
||||
final IDefinitions definitions = Api.INSTANCE.definitions();
|
||||
final IDefinitions definitions = AEApi.instance().definitions();
|
||||
final IBlocks blocks = definitions.blocks();
|
||||
final IParts parts = definitions.parts();
|
||||
|
||||
|
||||
@@ -35,7 +35,6 @@ import appeng.api.AEApi;
|
||||
import appeng.api.features.ILocatable;
|
||||
import appeng.api.features.IWirelessTermHandler;
|
||||
import appeng.api.features.IWirelessTermRegistry;
|
||||
import appeng.core.Api;
|
||||
import appeng.core.localization.PlayerMessages;
|
||||
|
||||
import appeng.util.Platform;
|
||||
@@ -108,7 +107,7 @@ public final class WirelessRegistry implements IWirelessTermRegistry
|
||||
}
|
||||
|
||||
final long parsedKey = Long.parseLong( unparsedKey );
|
||||
final ILocatable securityStation = Api.INSTANCE.registries().locatable().getLocatableBy( parsedKey );
|
||||
final ILocatable securityStation = AEApi.instance().registries().locatable().getLocatableBy( parsedKey );
|
||||
if( securityStation == null )
|
||||
{
|
||||
player.sendMessage( PlayerMessages.StationCanNotBeLocated.get() );
|
||||
|
||||
@@ -19,7 +19,6 @@ import appeng.api.storage.IStorageChannel;
|
||||
import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.api.storage.data.IAEStack;
|
||||
import appeng.api.util.AEPartLocation;
|
||||
import appeng.core.Api;
|
||||
|
||||
import appeng.util.Platform;
|
||||
|
||||
@@ -29,7 +28,7 @@ public class BasicItemCellGuiHandler implements ICellGuiHandler
|
||||
@Override
|
||||
public <T extends IAEStack<T>> boolean isHandlerFor( final IStorageChannel<T> channel )
|
||||
{
|
||||
return channel == Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class );
|
||||
return channel == AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -27,7 +27,6 @@ import appeng.api.storage.ICellInventoryHandler;
|
||||
import appeng.api.storage.ISaveProvider;
|
||||
import appeng.api.storage.IStorageChannel;
|
||||
import appeng.api.storage.channels.IItemStorageChannel;
|
||||
import appeng.core.Api;
|
||||
import appeng.items.storage.ItemCreativeStorageCell;
|
||||
import appeng.me.storage.CreativeCellInventory;
|
||||
|
||||
@@ -44,7 +43,7 @@ public final class CreativeCellHandler implements ICellHandler
|
||||
@Override
|
||||
public ICellInventoryHandler getCellInventory( final ItemStack is, final ISaveProvider container, final IStorageChannel channel )
|
||||
{
|
||||
if( channel == Api.INSTANCE.storage().getStorageChannel( IItemStorageChannel.class ) && !is.isEmpty() && is
|
||||
if( channel == AEApi.instance().storage().getStorageChannel( IItemStorageChannel.class ) && !is.isEmpty() && is
|
||||
.getItem() instanceof ItemCreativeStorageCell )
|
||||
{
|
||||
return CreativeCellInventory.getCell( is );
|
||||
|
||||
Reference in New Issue
Block a user