Removed special comparison, which was not used since 1.7.10 or longer (#4418)

This commit is contained in:
yueh
2020-06-18 19:20:06 +02:00
committed by GitHub
parent ec6f331168
commit c6af3d9a70
4 changed files with 1 additions and 116 deletions
@@ -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);
}
}