mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 20:52:34 +00:00
Add support for server side only recipes, as well as detection of vanilla client recipe book filter to prevent errors.
This commit is contained in:
1 parent
ee27276ba2
commit
28e341002f
14 files changed
+168
-55
No files matched your search
@@ -83,7 +83,7 @@ public class AutomaticEventSubscriber
|
||||
FMLLog.log.debug("Injected @EventBusSubscriber class {}", targ.getClassName());
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
catch (Throwable e)
|
||||
{
|
||||
FMLLog.log.error("An error occurred trying to load an EventBusSubscriber {} for modid {}", mod.getModId(), e);
|
||||
throw new LoaderException(e);
|
||||
|
||||
+2
-2
@@ -145,8 +145,8 @@ enum FMLHandshakeClientState implements IHandshakeState<FMLHandshakeClientState>
|
||||
if (!locallyMissing.isEmpty())
|
||||
{
|
||||
NetworkDispatcher dispatcher = ctx.channel().attr(NetworkDispatcher.FML_DISPATCHER).get();
|
||||
dispatcher.rejectHandshake("Fatally missing blocks and items");
|
||||
FMLLog.log.fatal("Failed to connect to server: there are {} missing blocks and items", locallyMissing.size());
|
||||
dispatcher.rejectHandshake("Fatally missing registry entries");
|
||||
FMLLog.log.fatal("Failed to connect to server: there are {} missing registry items", locallyMissing.size());
|
||||
locallyMissing.asMap().forEach((key, value) -> FMLLog.log.debug("Missing {} Entries: {}", key, value));
|
||||
return ERROR;
|
||||
}
|
||||
|
||||
+6
-3
@@ -68,8 +68,6 @@ import net.minecraftforge.fml.common.network.internal.FMLProxyPacket;
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.registries.ForgeRegistry;
|
||||
|
||||
import org.apache.logging.log4j.Level;
|
||||
|
||||
// TODO build test suites to validate the behaviour of this stuff and make it less annoyingly magical
|
||||
public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet<?>> implements ChannelOutboundHandler {
|
||||
private static boolean DEBUG_HANDSHAKE = Boolean.parseBoolean(System.getProperty("fml.debugNetworkHandshake", "false"));
|
||||
@@ -77,7 +75,7 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet<?>> im
|
||||
OPENING, AWAITING_HANDSHAKE, HANDSHAKING, HANDSHAKECOMPLETE, FINALIZING, CONNECTED
|
||||
}
|
||||
|
||||
private static enum ConnectionType {
|
||||
public static enum ConnectionType {
|
||||
MODDED, BUKKIT, VANILLA
|
||||
}
|
||||
|
||||
@@ -667,4 +665,9 @@ public class NetworkDispatcher extends SimpleChannelInboundHandler<Packet<?>> im
|
||||
return this.data_buf;
|
||||
}
|
||||
}
|
||||
|
||||
public ConnectionType getConnectionType()
|
||||
{
|
||||
return this.connectionType;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user