Update to Forge Build 2375 (fixes #70)
This commit is contained in:
@@ -34,7 +34,7 @@ archivesBaseName = "replaymod"
|
|||||||
|
|
||||||
minecraft {
|
minecraft {
|
||||||
coreMod = 'com.replaymod.core.LoadingPlugin'
|
coreMod = 'com.replaymod.core.LoadingPlugin'
|
||||||
version = '1.12-14.21.0.2327'
|
version = '1.12-14.21.0.2375'
|
||||||
runDir = "eclipse"
|
runDir = "eclipse"
|
||||||
mappings = "snapshot_20170615"
|
mappings = "snapshot_20170615"
|
||||||
replace '@MOD_VERSION@', project.version
|
replace '@MOD_VERSION@', project.version
|
||||||
|
|||||||
@@ -24,18 +24,8 @@ public class GuiFactory implements IModGuiFactory {
|
|||||||
return new GuiReplaySettings(parentScreen, ReplayMod.instance.getSettingsRegistry()).toMinecraft();
|
return new GuiReplaySettings(parentScreen, ReplayMod.instance.getSettingsRegistry()).toMinecraft();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
|
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public RuntimeOptionGuiHandler getHandlerFor(RuntimeOptionCategoryElement element) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,22 +4,22 @@ import com.replaymod.replaystudio.data.ModInfo;
|
|||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraftforge.fml.common.Loader;
|
import net.minecraftforge.fml.common.Loader;
|
||||||
import net.minecraftforge.fml.common.ModContainer;
|
import net.minecraftforge.fml.common.ModContainer;
|
||||||
import net.minecraftforge.fml.common.registry.GameData;
|
import net.minecraftforge.registries.ForgeRegistry;
|
||||||
|
import net.minecraftforge.registries.RegistryManager;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
|
||||||
|
|
||||||
public class ModCompat {
|
public class ModCompat {
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public static Collection<ModInfo> getInstalledNetworkMods() {
|
public static Collection<ModInfo> getInstalledNetworkMods() {
|
||||||
Map<String, ModContainer> ignoreCaseMap = Loader.instance().getModList().stream()
|
Map<String, ModContainer> ignoreCaseMap = Loader.instance().getModList().stream()
|
||||||
.collect(Collectors.toMap(m -> m.getModId().toLowerCase(), Function.identity()));
|
.collect(Collectors.toMap(m -> m.getModId().toLowerCase(), Function.identity()));
|
||||||
return Stream.concat(
|
return RegistryManager.ACTIVE.takeSnapshot(false).keySet().stream()
|
||||||
((Set<ResourceLocation>) GameData.getBlockRegistry().getKeys()).stream(),
|
.map(RegistryManager.ACTIVE::getRegistry)
|
||||||
((Set<ResourceLocation>) GameData.getItemRegistry().getKeys()).stream()
|
.map(ForgeRegistry::getKeys).flatMap(Set::stream)
|
||||||
).map(ResourceLocation::getResourceDomain).filter(s -> !s.equals("minecraft")).distinct()
|
.map(ResourceLocation::getResourceDomain).filter(s -> !s.equals("minecraft")).distinct()
|
||||||
.map(String::toLowerCase).map(ignoreCaseMap::get).filter(mod -> mod != null)
|
.map(String::toLowerCase).map(ignoreCaseMap::get).filter(mod -> mod != null)
|
||||||
.map(mod -> new ModInfo(mod.getModId(), mod.getName(), mod.getVersion()))
|
.map(mod -> new ModInfo(mod.getModId(), mod.getName(), mod.getVersion()))
|
||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
|
|||||||
Reference in New Issue
Block a user