To start open your common folder. Right click it and select New, Package.
The name should be your mod name.common.
For this tutorial I will be using: Tutorial.common. Now place your mouse on this package and right click. This time you select New, Class. A pretty complicated screen pops up. The only thing that you will have to think about is the name. The file name should have the name of your mod. In my case it will be called: Tutorial. After adding the title simply hit finish.
Eclipse will open the file for you now. It should look like this, but with your file name instead of Tutorial.
package Tutorial.common;
public class Tutorial
{
}
Now you have to add those 2 lines above public class FileName.
@Mod(modid = "YourName_ModName", name = "ModName", version = "Version number")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
Another thing that you should add inside of these brackets{} is this:
@Init
public void load(FMLInitializationEvent event)
{
}
The full file should now look like this.
package Tutorial.common;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
@Mod(modid = "YourName_ModName", name = "ModName", version = "Version number")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class Tutorial
{
@Init
public void load(FMLInitializationEvent event)
{
}
}
I will now explain everything that is now in the file.
package Tutorial.common;
Is the location of the file.
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
These are all the imports from eclipse. You need these to use the things that come below. Usually Eclipse will import them for you. If it doesn't use: Ctrl, Shift, O.
@Mod(modid = "YourName_ModName", name = "ModName", version = "Version number")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
The modid is the in-game code of your mod. You should make sure that this is a unique name.
The name is the name of your mod and will be displayed in-game.
The version is simply the version of your mod and will be displayed in-game.
The clientSideRequired part asks if you need this on the client to use this mod. This should be true.
The serverSideRequired part asks if you need this on the server for the client to be able to connect. This should always be false, else you can't join a server if the server doesn't have the mod installed, but you do.
public class Tutorial
{
@Init
public void load(FMLInitializationEvent event)
{
}
}
public class Tutorial is the file name.
@Init is used by forge to decide when it whould read the method below. Almost everything should be in here.
public void load(FMLInitializationEvent event){} Is the method in which you will be placing most of the code that you need for your mods.
In the next tutorial I will teach you how to add almost every possible crafting recipe to the game.
When you are done you should go back to the tutorials list here.
@Init
public void load(FMLInitializationEvent event)
{
}
The full file should now look like this.
package Tutorial.common;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
@Mod(modid = "YourName_ModName", name = "ModName", version = "Version number")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class Tutorial
{
@Init
public void load(FMLInitializationEvent event)
{
}
}
I will now explain everything that is now in the file.
package Tutorial.common;
Is the location of the file.
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
These are all the imports from eclipse. You need these to use the things that come below. Usually Eclipse will import them for you. If it doesn't use: Ctrl, Shift, O.
@Mod(modid = "YourName_ModName", name = "ModName", version = "Version number")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
The modid is the in-game code of your mod. You should make sure that this is a unique name.
The name is the name of your mod and will be displayed in-game.
The version is simply the version of your mod and will be displayed in-game.
The clientSideRequired part asks if you need this on the client to use this mod. This should be true.
The serverSideRequired part asks if you need this on the server for the client to be able to connect. This should always be false, else you can't join a server if the server doesn't have the mod installed, but you do.
public class Tutorial
{
@Init
public void load(FMLInitializationEvent event)
{
}
}
public class Tutorial is the file name.
@Init is used by forge to decide when it whould read the method below. Almost everything should be in here.
public void load(FMLInitializationEvent event){} Is the method in which you will be placing most of the code that you need for your mods.
In the next tutorial I will teach you how to add almost every possible crafting recipe to the game.
When you are done you should go back to the tutorials list here.
Deze reactie is verwijderd door de auteur.
BeantwoordenVerwijderenDeze reactie is verwijderd door de auteur.
BeantwoordenVerwijderenкпеупеакепавпавпквкпчч
BeantwoordenVerwijderenкпаквпакиаааааааааааааааааааааапкнркрппорпорпонтпаниририротьрпвапврипарльроьрьрпсприееннег46546457егрннеоркернгшлогпншдлгшдглшдгьшждшрглшогллбодблоюлоддоодод
BeantwoordenVerwijderenROBLOX is empowered by an ever growing player base of more than 300,000 creator players who produce an infinite variety of highly immersive experiences.
BeantwoordenVerwijderenThese experiences range from 3D multi-player games and competitions, to interactive adventures where friends can take on new identities imagining what it feels to be a dinosaur, a miner working a mine or an astronaut on a space exploration.