Fixed crafting watchers not having the right type
This commit is contained in:
parent
f1ffbf08a2
commit
56757bd828
3 changed files with 8 additions and 10 deletions
|
@ -49,17 +49,17 @@ public class CraftingWatcher implements ICraftingWatcher
|
|||
}
|
||||
|
||||
CraftingGridCache gsc;
|
||||
ICraftingWatcherHost myObject;
|
||||
ICraftingWatcherHost host;
|
||||
HashSet<IAEStack> myInterests = new HashSet<IAEStack>();
|
||||
|
||||
public CraftingWatcher(CraftingGridCache cache, ICraftingWatcherHost host) {
|
||||
gsc = cache;
|
||||
myObject = host;
|
||||
this.host = host;
|
||||
}
|
||||
|
||||
public ICraftingWatcherHost getHost()
|
||||
{
|
||||
return myObject;
|
||||
return host;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -83,8 +83,8 @@ public class CraftingGridCache implements ICraftingGrid, ICraftingProviderHelper
|
|||
HashMap<String, CraftingLinkNexus> links = new HashMap<String, CraftingLinkNexus>();
|
||||
|
||||
boolean updateList = false;
|
||||
final private SetMultimap<IAEStack, Collection<IAEStack>> interests = HashMultimap.create();
|
||||
final public GenericInterestManager<Collection<IAEStack>> interestManager = new GenericInterestManager<Collection<IAEStack>>( interests );
|
||||
final private SetMultimap<IAEStack, CraftingWatcher> interests = HashMultimap.create();
|
||||
final public GenericInterestManager<CraftingWatcher> interestManager = new GenericInterestManager<CraftingWatcher>( interests );
|
||||
|
||||
class ActiveCpuIterator implements Iterator<ICraftingCPU>
|
||||
{
|
||||
|
|
|
@ -1,11 +1,7 @@
|
|||
package appeng.me.cluster.implementations;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Set;
|
||||
|
||||
import net.minecraft.inventory.InventoryCrafting;
|
||||
import net.minecraft.item.ItemStack;
|
||||
|
@ -290,9 +286,11 @@ public class CraftingCPUCluster implements IAECluster, ICraftingCPU
|
|||
if ( sg.interestManager.containsKey( diff ) )
|
||||
{
|
||||
Set<CraftingWatcher> list = sg.interestManager.get( diff );
|
||||
|
||||
if ( !list.isEmpty() )
|
||||
{
|
||||
for (CraftingWatcher iw : list)
|
||||
|
||||
iw.getHost().onRequestChange( sg, diff );
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue