Some more FML related fixups

This commit is contained in:
cpw committed 2016-03-06 23:18:36 -05:00
1 parent b342bf8481
commit 01912a459a
4 files changed
+17 -8

No files matched your search

@@ -128,7 +128,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
public List<NetworkDispatcher> selectNetworks(Object args, ChannelHandlerContext context, FMLProxyPacket packet)
{
ImmutableList.Builder<NetworkDispatcher> builder = ImmutableList.<NetworkDispatcher>builder();
for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().playerEntityList)
for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().func_184103_al().getPlayerList())
{
NetworkDispatcher dispatcher = player.playerNetServerHandler.netManager.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
if (dispatcher != null) builder.add(dispatcher);
@@ -156,7 +156,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
{
int dimension = (Integer)args;
ImmutableList.Builder<NetworkDispatcher> builder = ImmutableList.<NetworkDispatcher>builder();
for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().playerEntityList)
for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().func_184103_al().getPlayerList())
{
if (dimension == player.dimension)
{
@@ -190,7 +190,7 @@ public class FMLOutboundHandler extends ChannelOutboundHandlerAdapter {
{
TargetPoint tp = (TargetPoint)args;
ImmutableList.Builder<NetworkDispatcher> builder = ImmutableList.<NetworkDispatcher>builder();
for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().getConfigurationManager().playerEntityList)
for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().func_184103_al().getPlayerList())
{
if (player.dimension == tp.dimension)
{
@@ -17,6 +17,7 @@ import com.google.common.collect.HashBiMap;
import com.google.common.collect.Iterators;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import net.minecraft.util.IntIdentityHashBiMap;
import org.apache.commons.lang3.Validate;
import org.apache.logging.log4j.Level;
@@ -170,7 +171,7 @@ public class FMLControlledNamespacedRegistry<I> extends RegistryNamespacedDefaul
this.dummiedLocations.clear();
this.dummiedLocations.addAll(otherRegistry.dummiedLocations);
underlyingIntegerMap = new ObjectIntIdentityMap<I>();
underlyingIntegerMap.func_186812_a();
registryObjects.clear();
for (I thing : otherRegistry.typeSafeIterable())
@@ -556,7 +557,7 @@ public class FMLControlledNamespacedRegistry<I> extends RegistryNamespacedDefaul
throw new IllegalArgumentException("The object to be added to the registry is not of the right type. Reflection/ASM hackery? Registry bug?");
}
underlyingIntegerMap.put(thing, id); // obj <-> id
underlyingIntegerMap.func_186814_a(thing, id); // obj <-> id
super.putObject(name, thing); // name <-> obj
availabilityMap.set(id);
if (addCallback != null)
@@ -758,7 +759,7 @@ public class FMLControlledNamespacedRegistry<I> extends RegistryNamespacedDefaul
for (I i : this.underlyingIntegerMap)
{
addCallback.onAdd(i, this.underlyingIntegerMap.get(i));
addCallback.onAdd(i, this.underlyingIntegerMap.func_186808_c(i));
}
}
@@ -152,8 +152,6 @@ public class PersistentRegistryManager
// Empty the blockstate map before loading
GameData.getBlockStateIDMap().clear();
// Clean up potion array before reloading it from the snapshot
Arrays.fill(Potion.potionTypes, null);
// Load the snapshot into the "STAGING" registry
for (Map.Entry<ResourceLocation, GameDataSnapshot.Entry> snapshotEntry : snapshot.entries.entrySet())