diff --git a/src/java/mmm/Mmm.java b/src/java/mmm/Mmm.java index cadde8d..0b98cb9 100644 --- a/src/java/mmm/Mmm.java +++ b/src/java/mmm/Mmm.java @@ -1,12 +1,8 @@ package mmm; -import mmm.deco.DecorativeBlocks; -import mmm.utils.UAccessors; -import mmm.utils.URegistry; -import mmm.utils.USeat; +import mmm.proxy.PCommon; import net.minecraftforge.fml.common.Mod; -import net.minecraftforge.fml.common.Mod.EventHandler; import net.minecraftforge.fml.common.SidedProxy; import net.minecraftforge.fml.common.event.FMLInitializationEvent; import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; @@ -23,57 +19,26 @@ public class Mmm public static final String PREFIX = Mmm.ID + "."; @Mod.Instance( Mmm.ID ) - public static Mmm mmm; + private static Mmm instance; - @SidedProxy - public static CommonProxy proxy = null; + @SidedProxy( clientSide = "mmm.proxy.PClient" , serverSide = "mmm.proxy.PServer" ) + private static PCommon proxy = null; - public static abstract class CommonProxy + + public static Mmm get( ) { - - public void preInit( final FMLPreInitializationEvent event ) - { - UAccessors.preInit( ); - - DecorativeBlocks.preInit( ); - URegistry.registerRecipes( ); - } - - - public void init( final FMLInitializationEvent event ) - { - USeat.register( mmm ); - } - } - - public static class ServerProxy - extends CommonProxy - { - // EMPTY - } - - public static class ClientProxy - extends CommonProxy - { - - @Override - public void preInit( final FMLPreInitializationEvent event ) - { - super.preInit( event ); - URegistry.setupItemModels( ); - } - + return Mmm.instance; } - @EventHandler + @Mod.EventHandler public void preInit( final FMLPreInitializationEvent event ) { Mmm.proxy.preInit( event ); } - @EventHandler + @Mod.EventHandler public void init( final FMLInitializationEvent event ) { Mmm.proxy.init( event ); diff --git a/src/java/mmm/proxy/PClient.java b/src/java/mmm/proxy/PClient.java new file mode 100644 index 0000000..23c5a16 --- /dev/null +++ b/src/java/mmm/proxy/PClient.java @@ -0,0 +1,17 @@ +package mmm.proxy; + +import mmm.utils.URegistry; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; + +public class PClient + extends PCommon +{ + + @Override + public void preInit( final FMLPreInitializationEvent event ) + { + super.preInit( event ); + URegistry.setupItemModels( ); + } + +} \ No newline at end of file diff --git a/src/java/mmm/proxy/PCommon.java b/src/java/mmm/proxy/PCommon.java new file mode 100644 index 0000000..4a09194 --- /dev/null +++ b/src/java/mmm/proxy/PCommon.java @@ -0,0 +1,30 @@ +package mmm.proxy; + + +import mmm.Mmm; +import mmm.deco.DecorativeBlocks; +import mmm.utils.UAccessors; +import mmm.utils.URegistry; +import mmm.utils.USeat; +import net.minecraftforge.fml.common.event.FMLInitializationEvent; +import net.minecraftforge.fml.common.event.FMLPreInitializationEvent; + + + +public abstract class PCommon +{ + + public void preInit( final FMLPreInitializationEvent event ) + { + UAccessors.preInit( ); + + DecorativeBlocks.preInit( ); + URegistry.registerRecipes( ); + } + + + public void init( final FMLInitializationEvent event ) + { + USeat.register( Mmm.get( ) ); + } +} \ No newline at end of file diff --git a/src/java/mmm/proxy/PServer.java b/src/java/mmm/proxy/PServer.java new file mode 100644 index 0000000..814e471 --- /dev/null +++ b/src/java/mmm/proxy/PServer.java @@ -0,0 +1,7 @@ +package mmm.proxy; + +public class PServer + extends PCommon +{ + // EMPTY +} \ No newline at end of file