Typo locateable

This commit is contained in:
thatsIch 2014-09-21 00:50:46 +02:00
parent b38b6f6530
commit 020a79ee83
2 changed files with 50 additions and 50 deletions

View file

@ -1,48 +1,48 @@
package appeng.core.features.registries;
import java.util.HashMap;
import net.minecraftforge.common.MinecraftForge;
import appeng.api.events.LocatableEventAnnounce;
import appeng.api.events.LocatableEventAnnounce.LocatableEvent;
import appeng.api.features.ILocatable;
import appeng.api.features.ILocatableRegistry;
import appeng.util.Platform;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
public class LocateableRegistry implements ILocatableRegistry
{
private HashMap<Long, ILocatable> set;
@SubscribeEvent
public void updateLocateable(LocatableEventAnnounce e)
{
if ( Platform.isClient() )
return; // IGNORE!
if ( e.change == LocatableEvent.Register )
{
set.put( e.target.getLocatableSerial(), e.target );
}
else if ( e.change == LocatableEvent.Unregister )
{
set.remove( e.target.getLocatableSerial() );
}
}
public LocateableRegistry() {
set = new HashMap();
MinecraftForge.EVENT_BUS.register( this );
}
/**
* Find a locate-able object by its serial.
*/
@Override
public Object findLocatableBySerial(long ser)
{
return set.get( ser );
}
}
package appeng.core.features.registries;
import java.util.HashMap;
import net.minecraftforge.common.MinecraftForge;
import appeng.api.events.LocatableEventAnnounce;
import appeng.api.events.LocatableEventAnnounce.LocatableEvent;
import appeng.api.features.ILocatable;
import appeng.api.features.ILocatableRegistry;
import appeng.util.Platform;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
public class LocatableRegistry implements ILocatableRegistry
{
private HashMap<Long, ILocatable> set;
@SubscribeEvent
public void updateLocatable(LocatableEventAnnounce e)
{
if ( Platform.isClient() )
return; // IGNORE!
if ( e.change == LocatableEvent.Register )
{
set.put( e.target.getLocatableSerial(), e.target );
}
else if ( e.change == LocatableEvent.Unregister )
{
set.remove( e.target.getLocatableSerial() );
}
}
public LocatableRegistry() {
set = new HashMap();
MinecraftForge.EVENT_BUS.register( this );
}
/**
* Find a locate-able object by its serial.
*/
@Override
public Object findLocatableBySerial(long ser)
{
return set.get( ser );
}
}

View file

@ -21,7 +21,7 @@ public class RegistryContainer implements IRegistryContainer
private GrinderRecipeManager GrinderRecipes = new GrinderRecipeManager();
private ExternalStorageRegistry ExternalStorageHandlers = new ExternalStorageRegistry();
private CellRegistry CellRegistry = new CellRegistry();
private LocateableRegistry LocateableRegistry = new LocateableRegistry();
private LocatableRegistry LocatableRegistry = new LocatableRegistry();
private SpecialComparisonRegistry SpecialComparsonRegistry = new SpecialComparisonRegistry();
private WirelessRegistry WirelessRegistery = new WirelessRegistry();
private GridCacheRegistry GridCacheRegistry = new GridCacheRegistry();
@ -64,7 +64,7 @@ public class RegistryContainer implements IRegistryContainer
@Override
public ILocatableRegistry locatable()
{
return LocateableRegistry;
return LocatableRegistry;
}
@Override