Fix remapped blocks being overriden with dummy air blocks. Closes #2491
This commit is contained in:
parent
7668472c26
commit
b427b26583
2 changed files with 4 additions and 2 deletions
|
@ -979,7 +979,7 @@ public class Loader
|
|||
}
|
||||
}
|
||||
|
||||
return PersistentRegistryManager.processIdRematches(missingMappings.values(), isLocalWorld, remapBlocks, remapItems);
|
||||
return PersistentRegistryManager.processIdRematches(missingMappings.values(), isLocalWorld, missingBlocks, missingItems, remapBlocks, remapItems);
|
||||
}
|
||||
|
||||
public void fireRemapEvent(Map<ResourceLocation, Integer[]> remapBlocks, Map<ResourceLocation, Integer[]> remapItems, boolean isFreezing)
|
||||
|
|
|
@ -370,7 +370,7 @@ public class PersistentRegistryManager
|
|||
forAllRegistries(PersistentRegistry.FROZEN, ValidateRegistryFunction.OPERATION);
|
||||
}
|
||||
|
||||
public static List<String> processIdRematches(Iterable<FMLMissingMappingsEvent.MissingMapping> missedMappings, boolean isLocalWorld, Map<ResourceLocation, Integer[]> remapBlocks, Map<ResourceLocation, Integer[]> remapItems)
|
||||
public static List<String> processIdRematches(Iterable<FMLMissingMappingsEvent.MissingMapping> missedMappings, boolean isLocalWorld, Map<ResourceLocation, Integer> missingBlocks, Map<ResourceLocation, Integer> missingItems, Map<ResourceLocation, Integer[]> remapBlocks, Map<ResourceLocation, Integer[]> remapItems)
|
||||
{
|
||||
List<String> failed = Lists.newArrayList();
|
||||
List<String> ignored = Lists.newArrayList();
|
||||
|
@ -395,6 +395,7 @@ public class PersistentRegistryManager
|
|||
newName = active.getRegistry(BLOCKS, Block.class).getNameForObject((Block)remap.getTarget());
|
||||
FMLLog.fine("The Block %s is being remapped to %s.", remap.name, newName);
|
||||
|
||||
missingBlocks.remove(new ResourceLocation(remap.name));
|
||||
newId = staging.getRegistry(BLOCKS, Block.class).add(remap.id, newName, (Block)remap.getTarget());
|
||||
staging.getRegistry(BLOCKS, Block.class).addAlias(remap.resourceLocation, newName);
|
||||
}
|
||||
|
@ -404,6 +405,7 @@ public class PersistentRegistryManager
|
|||
newName = active.getRegistry(ITEMS, Item.class).getNameForObject((Item)remap.getTarget());
|
||||
FMLLog.fine("The Item %s is being remapped to %s.", remap.name, newName);
|
||||
|
||||
missingItems.remove(new ResourceLocation(remap.name));
|
||||
newId = staging.getRegistry(ITEMS, Item.class).add(remap.id, newName, (Item)remap.getTarget());
|
||||
staging.getRegistry(ITEMS, Item.class).addAlias(remap.resourceLocation, newName);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue