Removed special comparison, which was not used since 1.7.10 or longer (#4418)
This commit is contained in:
@@ -33,7 +33,7 @@ import appeng.api.storage.ICellRegistry;
|
||||
* @author AlgorithmX2
|
||||
* @author thatsIch
|
||||
* @author yueh
|
||||
* @version rv5
|
||||
* @version 7
|
||||
* @since rv0
|
||||
*/
|
||||
@AEInjectable
|
||||
@@ -49,12 +49,6 @@ public interface IRegistryContainer {
|
||||
*/
|
||||
IGridCacheRegistry gridCache();
|
||||
|
||||
/**
|
||||
* Add additional special comparison functionality, AE Uses this internally for
|
||||
* Bees.
|
||||
*/
|
||||
ISpecialComparisonRegistry specialComparison();
|
||||
|
||||
/**
|
||||
* Lets you register your items as wireless terminals
|
||||
*/
|
||||
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2013 AlgorithmX2
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
* this software and associated documentation files (the "Software"), to deal in
|
||||
* the Software without restriction, including without limitation the rights to
|
||||
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
* the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
* subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in all
|
||||
* copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
package appeng.api.features;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
/**
|
||||
* A Registry of any special comparison handlers for AE To use.
|
||||
*/
|
||||
public interface ISpecialComparisonRegistry {
|
||||
|
||||
/**
|
||||
* return TheHandler or null.
|
||||
*
|
||||
* @param stack item
|
||||
*
|
||||
* @return a handler it found for a specific item
|
||||
*/
|
||||
IItemComparison getSpecialComparison(ItemStack stack);
|
||||
|
||||
/**
|
||||
* Register a new special comparison function with AE.
|
||||
*
|
||||
* @param prov comparison provider
|
||||
*/
|
||||
void addComparisonProvider(IItemComparisonProvider prov);
|
||||
}
|
||||
@@ -24,7 +24,6 @@ import appeng.api.features.IMatterCannonAmmoRegistry;
|
||||
import appeng.api.features.IP2PTunnelRegistry;
|
||||
import appeng.api.features.IPlayerRegistry;
|
||||
import appeng.api.features.IRegistryContainer;
|
||||
import appeng.api.features.ISpecialComparisonRegistry;
|
||||
import appeng.api.features.IWirelessTermRegistry;
|
||||
import appeng.api.features.IWorldGen;
|
||||
import appeng.api.movable.IMovableRegistry;
|
||||
@@ -47,7 +46,6 @@ public class RegistryContainer implements IRegistryContainer {
|
||||
private final IChargerRegistry charger = new ChargerRegistry();
|
||||
private final ICellRegistry cell = new CellRegistry();
|
||||
private final ILocatableRegistry locatable = new LocatableRegistry();
|
||||
private final ISpecialComparisonRegistry comparison = new SpecialComparisonRegistry();
|
||||
private final IWirelessTermRegistry wireless = new WirelessRegistry();
|
||||
private final IGridCacheRegistry gridCache = new GridCacheRegistry();
|
||||
private final IP2PTunnelRegistry p2pTunnel = new P2PTunnelRegistry();
|
||||
@@ -66,11 +64,6 @@ public class RegistryContainer implements IRegistryContainer {
|
||||
return this.gridCache;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ISpecialComparisonRegistry specialComparison() {
|
||||
return this.comparison;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IWirelessTermRegistry wireless() {
|
||||
return this.wireless;
|
||||
|
||||
@@ -1,54 +0,0 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2.
|
||||
* Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
*
|
||||
* Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public License
|
||||
* along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.core.features.registries;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import appeng.api.features.IItemComparison;
|
||||
import appeng.api.features.IItemComparisonProvider;
|
||||
import appeng.api.features.ISpecialComparisonRegistry;
|
||||
|
||||
public class SpecialComparisonRegistry implements ISpecialComparisonRegistry {
|
||||
|
||||
private final List<IItemComparisonProvider> CompRegistry;
|
||||
|
||||
public SpecialComparisonRegistry() {
|
||||
this.CompRegistry = new ArrayList<>();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IItemComparison getSpecialComparison(final ItemStack stack) {
|
||||
for (final IItemComparisonProvider i : this.CompRegistry) {
|
||||
final IItemComparison comp = i.getComparison(stack);
|
||||
if (comp != null) {
|
||||
return comp;
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addComparisonProvider(final IItemComparisonProvider prov) {
|
||||
this.CompRegistry.add(prov);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user