Skip to content

Instantly share code, notes, and snippets.

@gigaherz
Last active Jun 10, 2022
Embed
What would you like to do?
Updates fmllegacy class references from 1.17 to their new locations and names in 1.18
<?xml version="1.0" encoding="UTF-8"?>
<migrationMap>
<name value="FMLLegacy refactorings" />
<description value="Updates class references from 1.17 to 1.18" />
<entry oldName="net.minecraftforge.fmllegacy.BrandingControl" newName="net.minecraftforge.internal.BrandingControl" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.CrashReportExtender" newName="net.minecraftforge.logging.CrashReportExtender" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.DatagenModLoader" newName="net.minecraftforge.data.loading.DatagenModLoader" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.FMLWorldPersistenceHook" newName="net.minecraftforge.common.ForgeMod.FMLWorldPersistenceHook" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.ForgeBindings" newName="net.minecraftforge.internal.ForgeBindings" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.ForgeI18n" newName="net.minecraftforge.common.ForgeI18n" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.ForgeStatesProvider" newName="net.minecraftforge.common.ForgeStatesProvider" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.LogicalSidedProvider" newName="net.minecraftforge.common.util.LogicalSidedProvider" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.MavenVersionStringHelper" newName="net.minecraftforge.common.util.MavenVersionStringHelper" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.NoVizFallback" newName="net.minecraftforge.client.loading.NoVizFallback" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.RegistryObject" newName="net.minecraftforge.registries.RegistryObject" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.SerialTransition" newName="net.minecraftforge.common.ForgeStatesProvider.SerialTransition" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.TextComponentMessageFormatHandler" newName="net.minecraftforge.internal.TextComponentMessageFormatHandler" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.WorldPersistenceHooks" newName="net.minecraftforge.internal.WorldPersistenceHooks" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.common.network.ByteBufUtils" newName="net.minecraftforge.logging.PacketDump" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.common.IEntityAdditionalSpawnData" newName="net.minecraftforge.entity.IEntityAdditionalSpawnData" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.event.lifecycle.FMLModIdMappingEvent" newName="net.minecraftforge.event.RegistryEvent.IdMappingEvent" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.event.EventNetworkChannel" newName="net.minecraftforge.network.event.EventNetworkChannel" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.simple.IndexedMessageCodec" newName="net.minecraftforge.network.simple.IndexedMessageCodec" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.simple.SimpleChannel" newName="net.minecraftforge.network.simple.SimpleChannel" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.ConfigSync" newName="net.minecraftforge.network.ConfigSync" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.ConnectionType" newName="net.minecraftforge.network.ConnectionType" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.FMLConnectionData" newName="net.minecraftforge.network.ConnectionData" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.FMLHandshakeHandler" newName="net.minecraftforge.network.HandshakeHandler" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.FMLHandshakeMessages" newName="net.minecraftforge.network.HandshakeMessages" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.FMLLoginWrapper" newName="net.minecraftforge.network.MCRegisterPacketHandler" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.FMLMCRegisterPacketHandler" newName="net.minecraftforge.network.LoginWrapper" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.FMLNetworkConstants" newName="net.minecraftforge.network.NetworkConstants" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.FMLStatusPing" newName="net.minecraftforge.network.ServerStatusPing" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.IContainerFactory" newName="net.minecraftforge.network.IContainerFactory" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.ICustomPacket" newName="net.minecraftforge.network.ICustomPacket" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.NetworkDirection" newName="net.minecraftforge.network.NetworkDirection" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.NetworkEvent" newName="net.minecraftforge.network.NetworkEvent" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.NetworkHooks" newName="net.minecraftforge.network.NetworkHooks" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.NetworkInitialization" newName="net.minecraftforge.network.NetworkInitialization" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.NetworkInstance" newName="net.minecraftforge.network.NetworkInstance" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.NetworkRegistry" newName="net.minecraftforge.network.NetworkRegistry" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.PacketDispatcher" newName="net.minecraftforge.network.NetworkEvent.PacketDispatcher" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.network.PacketDistributor" newName="net.minecraftforge.network.PacketDistributor" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.packs.DelegatingResourcePack" newName="net.minecraftforge.resource.DelegatingResourcePack" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.packs.ResourcePackLoader" newName="net.minecraftforge.resource.ResourcePackLoader" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.server.LanguageHook" newName="net.minecraftforge.server.LanguageHook" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.server.ServerLifecycleHooks" newName="net.minecraftforge.server.ServerLifecycleHooks" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.server.ServerModLoader" newName="net.minecraftforge.server.loading.ServerModLoader" type="class" />
<entry oldName="net.minecraftforge.fmlserverevents.FMLServerAboutToStartEvent" newName="net.minecraftforge.event.server.ServerAboutToStartEvent" type="class" />
<entry oldName="net.minecraftforge.fmlserverevents.FMLServerStartedEvent" newName="net.minecraftforge.event.server.ServerStartedEvent" type="class" />
<entry oldName="net.minecraftforge.fmlserverevents.FMLServerStartingEvent" newName="net.minecraftforge.event.server.ServerStartingEvent" type="class" />
<entry oldName="net.minecraftforge.fmlserverevents.FMLServerStoppedEvent" newName="net.minecraftforge.event.server.ServerStoppedEvent" type="class" />
<entry oldName="net.minecraftforge.fmlserverevents.FMLServerStoppingEvent" newName="net.minecraftforge.event.server.ServerStoppingEvent" type="class" />
<entry oldName="net.minecraftforge.fmlserverevents.ServerLifecycleEvent" newName="net.minecraftforge.event.server.ServerLifecycleEvent" type="class" />
<entry oldName="net.minecraftforge.fmlclient.gui.screen.LoadingErrorScreen" newName="net.minecraftforge.client.gui.LoadingErrorScreen" type="class" />
<entry oldName="net.minecraftforge.fmlclient.gui.screen.ModListScreen" newName="net.minecraftforge.client.gui.ModListScreen" type="class" />
<entry oldName="net.minecraftforge.fmlclient.gui.widget.ExtendedButton" newName="net.minecraftforge.client.gui.widget.ExtendedButton" type="class" />
<entry oldName="net.minecraftforge.fmlclient.gui.widget.ModListWidget" newName="net.minecraftforge.client.gui.widget.ModListWidget" type="class" />
<entry oldName="net.minecraftforge.fmlclient.gui.widget.Slider" newName="net.minecraftforge.client.gui.widget.Slider" type="class" />
<entry oldName="net.minecraftforge.fmlclient.gui.widget.UnicodeGlyphButton" newName="net.minecraftforge.client.gui.widget.UnicodeGlyphButton" type="class" />
<entry oldName="net.minecraftforge.fmlclient.gui.GuiUtils" newName="net.minecraftforge.client.gui.GuiUtils" type="class" />
<entry oldName="net.minecraftforge.fmlclient.registry.ClientRegistry" newName="net.minecraftforge.client.ClientRegistry" type="class" />
<entry oldName="net.minecraftforge.fmlclient.ClientModLoader" newName="net.minecraftforge.client.loading.ClientModLoader" type="class" />
<entry oldName="net.minecraftforge.fmlclient.ConfigGuiHandler" newName="net.minecraftforge.client.ConfigGuiHandler" type="class" />
<entry oldName="net.minecraftforge.fmlclient.EarlyLoaderGUI" newName="net.minecraftforge.client.loading.EarlyLoaderGUI" type="class" />
<entry oldName="net.minecraftforge.fmlclient.ExtendedServerListData" newName="net.minecraftforge.client.ExtendedServerListData" type="class" />
</migrationMap>
@gigaherz
Copy link
Author

gigaherz commented Nov 30, 2021

Where to place it:

windows:

%APPDATA%\JetBrains\IdeaIC2021.2\migration

linux:

~/.config/JetBrains/IdeaIC2021.2/migration

mac:

~/Library/Application Support/JetBrains/IdeaIC2021.2/migration

(obviously the folder name will correspond to the version you use)

You can then use Refactor -> Migrate to apply the changes. You may need to restart the IDE for it to appear in the dropdown..

@ShetiPhian
Copy link

ShetiPhian commented Dec 15, 2021

Thank You

also, here is two more I ran into

<entry oldName="net.minecraftforge.fmllegacy.hooks.BasicEventHooks" newName="net.minecraftforge.event.ForgeEventFactory" type="class" />
<entry oldName="net.minecraftforge.fmllegacy.common.registry.IEntityAdditionalSpawnData" newName="net.minecraftforge.entity.IEntityAdditionalSpawnData" type="class" />

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment