Deprecate passing a class to CapabilityManager::register (#4574)

This commit is contained in:
Joseph C. Sible authored and LexManos committed 2017-12-16 17:01:04 -08:00
1 parent 622c17ff04
commit 14a7d66024
5 files changed
+9 -5

No files matched your search

@@ -169,7 +169,7 @@ public class ChunkCapabilityPollutionTest {
{
if (ENABLE)
{
CapabilityManager.INSTANCE.register(IPollution.class, new PollutionStorage(), DefaultPollution.class);
CapabilityManager.INSTANCE.register(IPollution.class, new PollutionStorage(), DefaultPollution::new);
MinecraftForge.EVENT_BUS.register(new EventBusHandler());
}
}
@@ -66,7 +66,7 @@ public class NoBedSleepingTest
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
CapabilityManager.INSTANCE.register(IExtraSleeping.class, new Storage(), DefaultImpl.class);
CapabilityManager.INSTANCE.register(IExtraSleeping.class, new Storage(), DefaultImpl::new);
MinecraftForge.EVENT_BUS.register(new EventHandler());
}
@@ -52,7 +52,7 @@ public class TestCapabilityMod
// If you are a API, provide register your capability ASAP.
// You MUST supply a default save handler and a default implementation
// If you are a CONSUMER of the capability DO NOT register it. Only APIs should.
CapabilityManager.INSTANCE.register(IExampleCapability.class, new Storage(), DefaultImpl.class);
CapabilityManager.INSTANCE.register(IExampleCapability.class, new Storage(), DefaultImpl::new);
MinecraftForge.EVENT_BUS.register(this);
}
@@ -36,7 +36,7 @@ public class WorldCapabilityRainTimerTest
@EventHandler
public void init(FMLInitializationEvent event)
{
CapabilityManager.INSTANCE.register(IRainTimer.class, new TimerStorage(), DefaultTimer.class);
CapabilityManager.INSTANCE.register(IRainTimer.class, new TimerStorage(), DefaultTimer::new);
MinecraftForge.EVENT_BUS.register(new NormalEventHandler());
}