mirror of
https://github.com/GTNewHorizons/NotEnoughItems.git
synced 2026-11-21 04:32:27 +00:00
[ci skip] spotlessApply with the new settings
This commit is contained in:
1 parent
f1dea5460a
commit
f106b5e766
172 files changed
+2552
-2088
No files matched your search
@@ -1,16 +1,21 @@
|
||||
package codechicken.nei.recipe;
|
||||
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
import com.google.common.collect.ForwardingList;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
||||
import codechicken.nei.NEIClientConfig;
|
||||
import codechicken.nei.NEIServerUtils;
|
||||
|
||||
import com.google.common.collect.ForwardingList;
|
||||
|
||||
// Do not directly extend ArrayList, see Effective Java Item 16
|
||||
public class CatalystInfoList extends ForwardingList<CatalystInfo> {
|
||||
|
||||
private final String handlerID;
|
||||
private final List<CatalystInfo> catalystInfoList = new ArrayList<>();
|
||||
|
||||
@@ -31,9 +36,11 @@ public class CatalystInfoList extends ForwardingList<CatalystInfo> {
|
||||
@Override
|
||||
public boolean add(@Nonnull CatalystInfo catalystInfo) {
|
||||
if (contains(catalystInfo)) {
|
||||
NEIClientConfig.logger.info(String.format(
|
||||
"catalyst %s is already registered to handler %s",
|
||||
catalystInfo.getStack().getDisplayName(), handlerID));
|
||||
NEIClientConfig.logger.info(
|
||||
String.format(
|
||||
"catalyst %s is already registered to handler %s",
|
||||
catalystInfo.getStack().getDisplayName(),
|
||||
handlerID));
|
||||
return false;
|
||||
}
|
||||
super.add(catalystInfo);
|
||||
|
||||
Reference in new issue
Block a user