mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-21 20:52:34 +00:00
Update a bunch of libs, rename some of the mod events to more
meaningful names.
This commit is contained in:
1 parent
eb42614288
commit
99452a8b45
45 files changed
+98
-493
No files matched your search
@@ -25,16 +25,16 @@ import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.fml.common.event.ModLifecycleEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLFingerprintViolationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostResourceLoadEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreregistrationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerAboutToStartEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStartedEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStoppedEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLServerStoppingEvent;
|
||||
import net.minecraftforge.fml.common.event.ModLifecycleEvent;
|
||||
import net.minecraftforge.fml.common.event.PostRegistrationEvent;
|
||||
import net.minecraftforge.fml.common.registry.GameRegistry;
|
||||
|
||||
/**
|
||||
@@ -67,11 +67,11 @@ public @interface Mod
|
||||
*
|
||||
* These suggestions are mostly just suggestions on what to do in each event.
|
||||
* <ul>
|
||||
* <li> {@link FMLPreInitializationEvent} : Run before anything else. Read your config, create blocks,
|
||||
* <li> {@link FMLPreregistrationEvent} : Run before anything else. Read your config, create blocks,
|
||||
* items, etc, and register them with the {@link GameRegistry}.</li>
|
||||
* <li> {@link FMLInitializationEvent} : Do your mod setup. Build whatever data structures you care about. Register recipes,
|
||||
* <li> {@link PostRegistrationEvent} : Do your mod setup. Build whatever data structures you care about. Register recipes,
|
||||
* send {@link FMLInterModComms} messages to other mods.</li>
|
||||
* <li> {@link FMLPostInitializationEvent} : Handle interaction with other mods, complete your setup based on this.</li>
|
||||
* <li> {@link FMLPostResourceLoadEvent} : Handle interaction with other mods, complete your setup based on this.</li>
|
||||
* </ul>
|
||||
* <p>These are the server lifecycle events. They are fired whenever a server is running, or about to run. Each time a server
|
||||
* starts they will be fired in this sequence.
|
||||
@@ -86,9 +86,9 @@ public @interface Mod
|
||||
* The second set of events are more specialized, for receiving notification of specific
|
||||
* information.
|
||||
* <ul>
|
||||
* <li> {@link FMLFingerprintViolationEvent} : Sent just before {@link FMLPreInitializationEvent}
|
||||
* <li> {@link FMLFingerprintViolationEvent} : Sent just before {@link FMLPreregistrationEvent}
|
||||
* if something is wrong with your mod signature</li>
|
||||
* <li> {@link IMCEvent} : Sent just after {@link FMLInitializationEvent} if you have IMC messages waiting
|
||||
* <li> {@link IMCEvent} : Sent just after {@link PostRegistrationEvent} if you have IMC messages waiting
|
||||
* from other mods</li>
|
||||
* </ul>
|
||||
*
|
||||
|
||||
+3
-4
@@ -22,17 +22,16 @@ package net.minecraftforge.fml.common.event;
|
||||
import net.minecraftforge.fml.ModContainer;
|
||||
|
||||
/**
|
||||
* Called after {@link FMLInitializationEvent} has been dispatched on every mod. This is the third and last
|
||||
* Called after {@link PostRegistrationEvent} has been dispatched on every mod. This is the third and last
|
||||
* commonly called event during mod initialization.
|
||||
*
|
||||
* Recommended activities: interact with other mods to establish cross-mod behaviours.
|
||||
*
|
||||
* @see net.minecraftforge.fml.common.Mod.EventHandler for how to subscribe to this event
|
||||
* @author cpw
|
||||
*/
|
||||
public class FMLPostInitializationEvent extends ModLifecycleEvent
|
||||
public class FMLPostResourceLoadEvent extends ModLifecycleEvent
|
||||
{
|
||||
public FMLPostInitializationEvent(final ModContainer container)
|
||||
public FMLPostResourceLoadEvent(final ModContainer container)
|
||||
{
|
||||
super(container);
|
||||
}
|
||||
+3
-3
@@ -22,7 +22,7 @@ package net.minecraftforge.fml.common.event;
|
||||
import net.minecraftforge.fml.ModContainer;
|
||||
|
||||
/**
|
||||
* Called before {@link FMLInitializationEvent} during mod startup.
|
||||
* Called before {@link PostRegistrationEvent} during mod startup.
|
||||
*
|
||||
* This is the first of three commonly called events during mod initialization.
|
||||
*
|
||||
@@ -36,9 +36,9 @@ import net.minecraftforge.fml.ModContainer;
|
||||
* @see net.minecraftforge.fml.common.Mod.EventHandler for how to subscribe to this event
|
||||
* @author cpw
|
||||
*/
|
||||
public class FMLPreInitializationEvent extends ModLifecycleEvent
|
||||
public class FMLPreregistrationEvent extends ModLifecycleEvent
|
||||
{
|
||||
public FMLPreInitializationEvent(final ModContainer container)
|
||||
public FMLPreregistrationEvent(final ModContainer container)
|
||||
{
|
||||
super(container);
|
||||
}
|
||||
@@ -19,12 +19,10 @@
|
||||
|
||||
package net.minecraftforge.fml.common.event;
|
||||
|
||||
import com.mojang.brigadier.CommandDispatcher;
|
||||
import net.minecraft.command.CommandSource;
|
||||
import net.minecraft.server.MinecraftServer;
|
||||
|
||||
/**
|
||||
* Called before the server begins loading anything. Called after {@link FMLPostInitializationEvent} on the dedicated
|
||||
* Called before the server begins loading anything. Called after {@link FMLPostResourceLoadEvent} on the dedicated
|
||||
* server, and after the player has hit "Play Selected World" in the client. Called before {@link FMLServerStartingEvent}.
|
||||
*
|
||||
* You can obtain a reference to the server with this event.
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@ package net.minecraftforge.fml.common.event;
|
||||
import net.minecraftforge.fml.ModContainer;
|
||||
|
||||
/**
|
||||
* Called after {@link FMLPreInitializationEvent} and before {@link FMLPostInitializationEvent} during mod
|
||||
* Called after {@link FMLPreregistrationEvent} and before {@link FMLPostResourceLoadEvent} during mod
|
||||
* startup.
|
||||
*
|
||||
* This is the second of three commonly called events during mod initialization.
|
||||
@@ -34,10 +34,10 @@ import net.minecraftforge.fml.ModContainer;
|
||||
* @see net.minecraftforge.fml.common.Mod.EventHandler for how to subscribe to this event
|
||||
* @author cpw
|
||||
*/
|
||||
public class FMLInitializationEvent extends ModLifecycleEvent
|
||||
public class PostRegistrationEvent extends ModLifecycleEvent
|
||||
{
|
||||
|
||||
public FMLInitializationEvent(final ModContainer container)
|
||||
public PostRegistrationEvent(final ModContainer container)
|
||||
{
|
||||
super(container);
|
||||
}
|
||||
Reference in new issue
Block a user