Custom Base Setup
This commit is contained in:
@@ -26,92 +26,27 @@ public class ForgeCraft
|
|||||||
@Mod.Instance(ModInfo.MOD_ID)
|
@Mod.Instance(ModInfo.MOD_ID)
|
||||||
public static ForgeCraft INSTANCE = new ForgeCraft();
|
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;
|
public static CommonProxy proxy;
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void preInit(FMLPreInitializationEvent event)
|
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
|
@EventHandler
|
||||||
public void init(FMLInitializationEvent event)
|
public void init(FMLInitializationEvent event)
|
||||||
{
|
{
|
||||||
//this.proxy.init(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();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void postInit(FMLPostInitializationEvent event)
|
public void postInit(FMLPostInitializationEvent event)
|
||||||
{
|
{
|
||||||
//this.proxy.postInit(event);
|
this.proxy.postInit(event);
|
||||||
//LOGGER.info("Post-Init");
|
|
||||||
//proxy.postInit();
|
|
||||||
|
|
||||||
/*Crafting, Remove Vanilla Recipes*/
|
|
||||||
//ModCrafting.registerRecipeRemover();
|
|
||||||
//ModCrafting.registerRecipes();
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,23 +8,15 @@ import nmd.primal.forgecraft.ModInfo;
|
|||||||
/**
|
/**
|
||||||
* Created by kitsu on 11/24/2016.
|
* Created by kitsu on 11/24/2016.
|
||||||
*/
|
*/
|
||||||
public class ItemBase extends Item implements ItemModelProvider{
|
public class ItemBase extends Item {
|
||||||
|
|
||||||
protected String name;
|
protected String name;
|
||||||
|
|
||||||
public ItemBase(String name) {
|
public ItemBase(String name) {
|
||||||
|
super();
|
||||||
this.name = name;
|
this.name = name;
|
||||||
setUnlocalizedName(name);
|
this.setUnlocalizedName(name);
|
||||||
setRegistryName(name);
|
this.setRegistryName(name);
|
||||||
}
|
this.setCreativeTab(ModInfo.TAB_FORGECRAFT);
|
||||||
|
|
||||||
public void registerItemModel(Item item) {
|
|
||||||
ForgeCraft.proxy.registerItemRenderer(this, 0, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public ItemBase setCreativeTab(CreativeTabs tab) {
|
|
||||||
super.setCreativeTab(tab);
|
|
||||||
return this;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,10 @@ import net.minecraft.client.Minecraft;
|
|||||||
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraftforge.client.model.ModelLoader;
|
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;
|
import nmd.primal.forgecraft.ModInfo;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -11,11 +15,21 @@ import nmd.primal.forgecraft.ModInfo;
|
|||||||
*/
|
*/
|
||||||
public class ClientProxy extends CommonProxy {
|
public class ClientProxy extends CommonProxy {
|
||||||
|
|
||||||
public static Minecraft minecraft = Minecraft.getMinecraft();
|
@Override
|
||||||
|
public void preInit(FMLPreInitializationEvent e) {
|
||||||
|
super.preInit(e);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void renderItem(Item item, int meta, String id) {
|
public void init(FMLInitializationEvent e) {
|
||||||
ModelLoader.setCustomModelResourceLocation(item, meta, new ModelResourceLocation(ModInfo.MOD_ID + ":" + id, "inventory"));
|
super.init(e);
|
||||||
//minecraft.getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
|
|
||||||
|
//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 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