Custom Base Setup
This commit is contained in:
@@ -26,92 +26,27 @@ public class ForgeCraft
|
||||
@Mod.Instance(ModInfo.MOD_ID)
|
||||
public static ForgeCraft INSTANCE = new ForgeCraft();
|
||||
|
||||
@SidedProxy(clientSide = ModInfo.CLIENT_PROXY, serverSide = ModInfo.COMMON_PROXY)
|
||||
@SidedProxy(clientSide = "nmd.primal.forgecraft.proxy.ClientProxy", serverSide = "nmd.primal.forgecraft.proxy.ServerProxy")
|
||||
public static CommonProxy proxy;
|
||||
|
||||
@EventHandler
|
||||
public void preInit(FMLPreInitializationEvent event)
|
||||
{
|
||||
Locale.setDefault(Locale.ENGLISH);
|
||||
//this.proxy.preInit(event);
|
||||
this.proxy.preInit(event);
|
||||
|
||||
ModItems.init();
|
||||
//ModItems.createItems();
|
||||
/*Configuration File*/
|
||||
|
||||
//CONFIG_DIRECTORY = new File(event.getModConfigurationDirectory(), "primal");
|
||||
//ModConfig.init(event.getSuggestedConfigurationFile());
|
||||
//LOGGER.info("Debug Level: " + ModConfig.DEBUG_LEVEL);
|
||||
|
||||
/*Networking*/
|
||||
//NETWORK = NetworkRegistry.INSTANCE.newSimpleChannel(ModInfo.MOD_CHANNEL);
|
||||
//NetworkRegistry.INSTANCE.registerGuiHandler(this, new GuiHandler());
|
||||
|
||||
/*
|
||||
Load Main Content
|
||||
In Order of:
|
||||
Sounds, Entities, Tiles, Blocks, Fluids, Items
|
||||
*/
|
||||
//ModTileEntities.registerTileEntities();
|
||||
|
||||
//ModBlocks.registerBlocks();
|
||||
//ModBlocks.registerSubBlocks();
|
||||
//ModBlocks.registerOres();
|
||||
//ModBlocks.registerPlants();
|
||||
//ModBlocks.registerLighting();
|
||||
//ModBlocks.registerTablesShelves();
|
||||
|
||||
//ModFluids.registerFluids();
|
||||
|
||||
//ModItems.registerItems();
|
||||
|
||||
//ModSounds.registerSounds();
|
||||
//ModEntities.registerEntities();
|
||||
|
||||
/*Events*/
|
||||
//ModEvents.registerCommonEvents();
|
||||
|
||||
/*Sounds*/
|
||||
//ModSoundHandler.init();
|
||||
|
||||
/*Proxy Power*/
|
||||
//proxy.preInit();
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void init(FMLInitializationEvent event)
|
||||
{
|
||||
//this.proxy.init(event);
|
||||
|
||||
//LOGGER.info("Init");
|
||||
// proxy.init();
|
||||
|
||||
/*World-Gen*/
|
||||
|
||||
//ModWorldGen.registerWorldGenerators();
|
||||
//ModWorldGen.registerDimensionProviders();
|
||||
|
||||
/*Register More Stuff*/
|
||||
//ModRegistries.registerFuels();
|
||||
//ModRegistries.registerVanillaTorches();
|
||||
//ModRegistries.registerRepairItems();
|
||||
//ModRegistries.registerToolBreakItems();
|
||||
//ModRegistries.registerAdditionalCraftingItems();
|
||||
//DispenserBehavoir.registerDispenserItems();
|
||||
//ModDictionary.registerDictionaryNames();
|
||||
this.proxy.init(event);
|
||||
|
||||
}
|
||||
|
||||
@EventHandler
|
||||
public void postInit(FMLPostInitializationEvent event)
|
||||
{
|
||||
//this.proxy.postInit(event);
|
||||
//LOGGER.info("Post-Init");
|
||||
//proxy.postInit();
|
||||
|
||||
/*Crafting, Remove Vanilla Recipes*/
|
||||
//ModCrafting.registerRecipeRemover();
|
||||
//ModCrafting.registerRecipes();
|
||||
this.proxy.postInit(event);
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -8,23 +8,15 @@ import nmd.primal.forgecraft.ModInfo;
|
||||
/**
|
||||
* Created by kitsu on 11/24/2016.
|
||||
*/
|
||||
public class ItemBase extends Item implements ItemModelProvider{
|
||||
public class ItemBase extends Item {
|
||||
|
||||
protected String name;
|
||||
|
||||
public ItemBase(String name) {
|
||||
super();
|
||||
this.name = name;
|
||||
setUnlocalizedName(name);
|
||||
setRegistryName(name);
|
||||
}
|
||||
|
||||
public void registerItemModel(Item item) {
|
||||
ForgeCraft.proxy.registerItemRenderer(this, 0, name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemBase setCreativeTab(CreativeTabs tab) {
|
||||
super.setCreativeTab(tab);
|
||||
return this;
|
||||
this.setUnlocalizedName(name);
|
||||
this.setRegistryName(name);
|
||||
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,6 +4,10 @@ import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraftforge.client.model.ModelLoader;
|
||||
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
|
||||
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
|
||||
import nmd.primal.forgecraft.Item.ItemRenderRegister;
|
||||
import nmd.primal.forgecraft.ModInfo;
|
||||
|
||||
/**
|
||||
@@ -11,11 +15,21 @@ import nmd.primal.forgecraft.ModInfo;
|
||||
*/
|
||||
public class ClientProxy extends CommonProxy {
|
||||
|
||||
public static Minecraft minecraft = Minecraft.getMinecraft();
|
||||
@Override
|
||||
public void preInit(FMLPreInitializationEvent e) {
|
||||
super.preInit(e);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void renderItem(Item item, int meta, String id) {
|
||||
ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(ModInfo.MOD_ID + ":" + id, "inventory"));
|
||||
//minecraft.getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
|
||||
public void init(FMLInitializationEvent e) {
|
||||
super.init(e);
|
||||
|
||||
//BlockRenderRegister.registerBlockRenderer();
|
||||
ItemRenderRegister.registerItemRenderer();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void postInit(FMLPostInitializationEvent e) {
|
||||
super.postInit(e);
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,16 @@ import nmd.primal.forgecraft.Item.ModItems;
|
||||
*/
|
||||
public class CommonProxy {
|
||||
|
||||
public void registerItemRenderer(Item item, int meta, String id) {
|
||||
public void preInit(FMLPreInitializationEvent e) {
|
||||
//ModBlocks.createBlocks();
|
||||
ModItems.init();
|
||||
}
|
||||
|
||||
public void init(FMLInitializationEvent e) {
|
||||
|
||||
}
|
||||
|
||||
public void postInit(FMLPostInitializationEvent e) {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user