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.Dist
private static final org.slf4j.Marker
private static final EnumSet
<ILaunchPluginService.Phase> private static final org.slf4j.Logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionhandlesClass
(org.objectweb.asm.Type classType, boolean isEmpty) If this plugin wants to receive theClassNode
intoILaunchPluginService.processClass(cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase, org.objectweb.asm.tree.ClassNode, org.objectweb.asm.Type)
void
maskClasses
(Collection<String> classes) name()
The name of this plugin.void
setDistribution
(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, wait
Methods 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:ILaunchPluginService
The 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:
name
in interfaceILaunchPluginService
- Returns:
- the name of the plugin
-
handlesClass
public EnumSet<ILaunchPluginService.Phase> handlesClass(org.objectweb.asm.Type classType, boolean isEmpty) Description copied from interface:ILaunchPluginService
If this plugin wants to receive theClassNode
intoILaunchPluginService.processClass(cpw.mods.modlauncher.serviceapi.ILaunchPluginService.Phase, org.objectweb.asm.tree.ClassNode, org.objectweb.asm.Type)
- Specified by:
handlesClass
in 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)
-