mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 03:25:18 +00:00
More work, game loads and runs now.
Moved Registry events to directly AFTER PreInit instead of before. This allows modders to register handlers for it without @EventBusSubscriber. It also allows you to register custom things needed before the construction of blocks or items such as Fluids. TODO: Move Fluids to a real registry. @ObjectHolder can now be used on private fields. Reworked FMLModIdMappingEvent to include data for all registries. Tile Entities are now registrable.
This commit is contained in:
1 parent
a26d89c876
commit
dee84dc1e4
21 files changed
+230
-278
No files matched your search
@@ -82,12 +82,14 @@ import com.google.common.eventbus.Subscribe;
|
||||
import net.minecraftforge.fml.client.FMLFileResourcePack;
|
||||
import net.minecraftforge.fml.client.FMLFolderResourcePack;
|
||||
import net.minecraftforge.fml.client.event.ConfigChangedEvent.OnConfigChangedEvent;
|
||||
import net.minecraftforge.fml.common.AutomaticEventSubscriber;
|
||||
import net.minecraftforge.fml.common.DummyModContainer;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
import net.minecraftforge.fml.common.ICrashCallable;
|
||||
import net.minecraftforge.fml.common.LoadController;
|
||||
import net.minecraftforge.fml.common.Loader;
|
||||
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
|
||||
import net.minecraftforge.fml.common.ModMetadata;
|
||||
import net.minecraftforge.fml.common.WorldAccessContainer;
|
||||
import net.minecraftforge.fml.common.discovery.ASMDataTable.ASMData;
|
||||
@@ -103,6 +105,7 @@ import net.minecraftforge.fml.common.network.NetworkRegistry;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
@EventBusSubscriber(modid = "forge")
|
||||
public class ForgeModContainer extends DummyModContainer implements WorldAccessContainer
|
||||
{
|
||||
public static final String VERSION_CHECK_CAT = "version_checking";
|
||||
@@ -444,6 +447,7 @@ public class ForgeModContainer extends DummyModContainer implements WorldAccessC
|
||||
NetworkRegistry.INSTANCE.register(this, this.getClass(), "*", evt.getASMHarvestedData());
|
||||
ForgeNetworkHandler.registerChannel(this, evt.getSide());
|
||||
ConfigManager.sync(this.getModId(), Config.Type.INSTANCE);
|
||||
MinecraftForge.EVENT_BUS.register(this);
|
||||
}
|
||||
|
||||
@Subscribe
|
||||
|
||||
Reference in new issue
Block a user