Class NeoForgeDevDistCleaner
java.lang.Object
net.neoforged.fml.loading.moddiscovery.locators.NeoForgeDevDistCleaner
- All Implemented Interfaces:
ILaunchPluginService
Masks classes from the Minecraft jar that are for the wrong distribution in a development environment, throwing an
informative exception.
-
Nested Class Summary
Nested classes/interfaces inherited from interface cpw.mods.modlauncher.serviceapi.ILaunchPluginService
ILaunchPluginService.ComputeFlags, ILaunchPluginService.ITransformerLoader, ILaunchPluginService.Phase -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate net.neoforged.api.distmarker.Distprivate static final org.slf4j.Markerprivate static final EnumSet<ILaunchPluginService.Phase> private static final org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandlesClass(Type classType, boolean isEmpty) If this plugin wants to receive theClassNodeintoILaunchPluginService.processClass(cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase, org.objectweb.asm.tree.ClassNode, org.objectweb.asm.Type)voidmaskClasses(Collection<String> classes) name()The name of this plugin.voidsetDistribution(net.neoforged.api.distmarker.Dist dist) private static <T,X extends Throwable>
voidthrowUnchecked(T throwable) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface cpw.mods.modlauncher.serviceapi.ILaunchPluginService
addResources, customAuditConsumer, getExtension, handlesClass, initializeLaunch, offerResource, processClass, processClass, processClassWithFlags
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
DISTXFORM
private static final org.slf4j.Marker DISTXFORM -
EMPTY
-
dist
private net.neoforged.api.distmarker.Dist dist -
maskedClasses
-
-
Constructor Details
-
NeoForgeDevDistCleaner
public NeoForgeDevDistCleaner()
-
-
Method Details
-
name
Description copied from interface:ILaunchPluginServiceThe name of this plugin. Must be unique. Multiple plugins by the same name will result in a hard exit. Launcher and other systems will rely on this name to find services provided by this plugin, so it should be stable.- Specified by:
namein interfaceILaunchPluginService- Returns:
- the name of the plugin
-
handlesClass
Description copied from interface:ILaunchPluginServiceIf this plugin wants to receive theClassNodeintoILaunchPluginService.processClass(cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase, org.objectweb.asm.tree.ClassNode, org.objectweb.asm.Type)- Specified by:
handlesClassin interfaceILaunchPluginService- Parameters:
classType- the class to considerisEmpty- if the class is empty at present (indicates no backing file found)- Returns:
- the set of Phases the plugin wishes to be called back with
-
throwUnchecked
- Throws:
X
-
maskClasses
-
setDistribution
public void setDistribution(net.neoforged.api.distmarker.Dist dist)
-