Compare commits
5 Commits
1.12-2.0.0
...
1.12.1-2.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0b462280fc | ||
|
|
cae95d1c8f | ||
|
|
67b7872c4d | ||
|
|
9b04d317c5 | ||
|
|
a6ffae2148 |
Submodule ReplayStudio updated: 9a631e7626...82bd8aa34e
@@ -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.1-14.22.0.2444'
|
||||||
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());
|
||||||
|
|||||||
@@ -7,7 +7,8 @@ public enum MinecraftVersion {
|
|||||||
MC_1_10_2("Minecraft 1.10.2", "1.10.2"),
|
MC_1_10_2("Minecraft 1.10.2", "1.10.2"),
|
||||||
MC_1_11("Minecraft 1.11", "1.11"),
|
MC_1_11("Minecraft 1.11", "1.11"),
|
||||||
MC_1_11_2("Minecraft 1.11.2", "1.11.2"),
|
MC_1_11_2("Minecraft 1.11.2", "1.11.2"),
|
||||||
MC_1_12("Minecraft 1.12", "1.12");
|
MC_1_12("Minecraft 1.12", "1.12"),
|
||||||
|
MC_1_12_1("Minecraft 1.12.1", "1.12.1");
|
||||||
|
|
||||||
private String niceName, apiName;
|
private String niceName, apiName;
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
|
|||||||
*/
|
*/
|
||||||
private static final List<Class> BAD_PACKETS = Arrays.<Class>asList(
|
private static final List<Class> BAD_PACKETS = Arrays.<Class>asList(
|
||||||
// TODO Update possibly more?
|
// TODO Update possibly more?
|
||||||
|
SPacketRecipeBook.class,
|
||||||
|
SPacketAdvancementInfo.class,
|
||||||
|
SPacketSelectAdvancementsTab.class,
|
||||||
SPacketUpdateHealth.class,
|
SPacketUpdateHealth.class,
|
||||||
SPacketOpenWindow.class,
|
SPacketOpenWindow.class,
|
||||||
SPacketCloseWindow.class,
|
SPacketCloseWindow.class,
|
||||||
@@ -504,7 +507,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
|
|||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public void channelActive(ChannelHandlerContext ctx) throws Exception {
|
public void channelActive(ChannelHandlerContext ctx) throws Exception {
|
||||||
this.ctx = ctx;
|
this.ctx = ctx;
|
||||||
ctx.attr(NetworkManager.PROTOCOL_ATTRIBUTE_KEY).set(EnumConnectionState.PLAY);
|
ctx.channel().attr(NetworkManager.PROTOCOL_ATTRIBUTE_KEY).set(EnumConnectionState.PLAY);
|
||||||
super.channelActive(ctx);
|
super.channelActive(ctx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user