Compare commits
4 Commits
1.12-2.0.0
...
1.12-2.0.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cae95d1c8f | ||
|
|
67b7872c4d | ||
|
|
9b04d317c5 | ||
|
|
a6ffae2148 |
@@ -34,7 +34,7 @@ archivesBaseName = "replaymod"
|
||||
|
||||
minecraft {
|
||||
coreMod = 'com.replaymod.core.LoadingPlugin'
|
||||
version = '1.12-14.21.0.2327'
|
||||
version = '1.12-14.21.1.2387'
|
||||
runDir = "eclipse"
|
||||
mappings = "snapshot_20170615"
|
||||
replace '@MOD_VERSION@', project.version
|
||||
|
||||
@@ -24,18 +24,8 @@ public class GuiFactory implements IModGuiFactory {
|
||||
return new GuiReplaySettings(parentScreen, ReplayMod.instance.getSettingsRegistry()).toMinecraft();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Class<? extends GuiScreen> mainConfigGuiClass() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Set<RuntimeOptionCategoryElement> runtimeGuiCategories() {
|
||||
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.minecraftforge.fml.common.Loader;
|
||||
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.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
public class ModCompat {
|
||||
@SuppressWarnings("unchecked")
|
||||
public static Collection<ModInfo> getInstalledNetworkMods() {
|
||||
Map<String, ModContainer> ignoreCaseMap = Loader.instance().getModList().stream()
|
||||
.collect(Collectors.toMap(m -> m.getModId().toLowerCase(), Function.identity()));
|
||||
return Stream.concat(
|
||||
((Set<ResourceLocation>) GameData.getBlockRegistry().getKeys()).stream(),
|
||||
((Set<ResourceLocation>) GameData.getItemRegistry().getKeys()).stream()
|
||||
).map(ResourceLocation::getResourceDomain).filter(s -> !s.equals("minecraft")).distinct()
|
||||
return RegistryManager.ACTIVE.takeSnapshot(false).keySet().stream()
|
||||
.map(RegistryManager.ACTIVE::getRegistry)
|
||||
.map(ForgeRegistry::getKeys).flatMap(Set::stream)
|
||||
.map(ResourceLocation::getResourceDomain).filter(s -> !s.equals("minecraft")).distinct()
|
||||
.map(String::toLowerCase).map(ignoreCaseMap::get).filter(mod -> mod != null)
|
||||
.map(mod -> new ModInfo(mod.getModId(), mod.getName(), mod.getVersion()))
|
||||
.collect(Collectors.toList());
|
||||
|
||||
@@ -50,6 +50,9 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
|
||||
*/
|
||||
private static final List<Class> BAD_PACKETS = Arrays.<Class>asList(
|
||||
// TODO Update possibly more?
|
||||
SPacketRecipeBook.class,
|
||||
SPacketAdvancementInfo.class,
|
||||
SPacketSelectAdvancementsTab.class,
|
||||
SPacketUpdateHealth.class,
|
||||
SPacketOpenWindow.class,
|
||||
SPacketCloseWindow.class,
|
||||
@@ -504,7 +507,7 @@ public class ReplaySender extends ChannelInboundHandlerAdapter {
|
||||
@SuppressWarnings("unchecked")
|
||||
public void channelActive(ChannelHandlerContext ctx) throws Exception {
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user