Hello again, this tutorial will be about making a custom furnace, or crafting table. it will handle the: Tile Entity, Slots, Containers, The GUI, and The Block, I was going to make this in my GUI tutorials section, but i figured this could use "special attention", for it. As a pre-warning this will require a bunch of code, and is very complex to people that don't understand Tile Entities, and GUI. so please get better with them before attempting this, If you can't figure out the GUI I have tutorials on this, but not anything on Tile Entities, but I might make one if people want one.
and now for the tutorial:
TutorialMod.java:
// This is my package declaration, do not mess with the standard (package net.minecraft.src;) like I did,
// Because I know what Im doing in this part, If you don't know what your doing keep it the normal (package net.minecraft.src;)
package tutorials;
// These are all the imports you need
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.Mod.PostInit;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.network.NetworkMod.SidedPacketHandler;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.src.*;
// This is new to FML, and basically this is what defines that this is a mod
// Its called an annotation, and when declaring the annotation you need to do it basically like this:
@Mod(modid = "mod", name = "The Tutorial Mod", version = "0.0")
// It has 3 "params" modid, name, and version
// @param modid, this defines what the mod id is when forge compiles it
// @param name, this gives the mod a name to follow by
// @param version, this is the version number, this needs to be written in a String format
// This next part is another annotation
// This is required and very large, So I will leave it up to you to figure everything here out,
// As I really want to get to writing the GUI tutorial not just explaining all the code
// And again you can copy this and make it your own
@NetworkMod(clientSideRequired=true, serverSideRequired=false,
clientPacketHandlerSpec =
@SidedPacketHandler(channels = {"TutorialMod" }, packetHandler = ClientPacketHandler.class),
serverPacketHandlerSpec =
@SidedPacketHandler(channels = {"TutorialMod" }, packetHandler = ServerPacketHandler.class))
// Something new in forge is you don't need to extend anything when making a mod core file, as the annotations above handled that
public class TutorialMod{
// This is your mod instance
// You need the @Instance annotation above as if you don't this will not work, trust me I learned the hard way
@Instance
public static TutorialMod instance = new TutorialMod();
// This is a private Declaration of a guiHandler which will be covered in the guiHandler file
private GuiHandler guiHandler = new GuiHandler();
// This is the standard Block declaration, nothing new here
public static final Block tutorialBlock = new BlockTutorial(255);
// This is also something that is new, this is also required and hard to explain, so basically its another annotation
// And it is really simple once you get past the hard parts, feel free to copy this until you know how to do this
// Although tip: change the Strings "tutorials.ClientProxy" and "tutorials.CommonProxy"
// To where your proxies are, I will also show you how to make a proxy for those that dont know how to
@SidedProxy(clientSide = "tutorials.ClientProxy", serverSide = "tutorials.CommonProxy")
public static CommonProxy proxy;
// This is the FML version of the load method from ModLoader,
// And has 1 param
// @param FMLINitializationEvent, this allows an few methods to be called when forge initializes
@Init
public void Init(FMLInitializationEvent event){
// This is something new, this is where you declare the instance in a different way,
// Basically you need to have the guiHandler instance already declared and just follow that line of code
NetworkRegistry.instance().registerGuiHandler(this, guiHandler);
// This is required to make the Gui Work
// All it does is register the TileEntity, Mines called TileTutorial, and it gives it a names
GameRegistry.registerTileEntity(TileTutorial.class, "tileEntityTutorial");
// This registers the Block
GameRegistry.registerBlock(tutorialBlock);
// This adds the recipe
GameRegistry.addRecipe(new ItemStack(this.tutorialBlock, 1), new Object[]{
"XXX", "XXX", "XXX", Character.valueOf('X'), Block.blockDiamond
});
// And this gives the block its in game name
LanguageRegistry.addName(tutorialBlock, "Tutorial Block");
}
// This is not required, but I always put it
@PreInit
public void PreInit(FMLPreInitializationEvent event){
}
// This is also not required, but I also always put it
@PostInit
public void PostInit(FMLPostInitializationEvent event){
}
}
TileTutorial.java:
// This is my package declaration, do not mess with the standard (package net.minecraft.src;) like I did,
// Because I know what Im doing in this part, If you don't know what your doing keep it the normal (package net.minecraft.src;)
package tutorials;
// You will not need this import if you kept the standard package declaration
import net.minecraft.src.*;
// Basically this is where your TileEntity comes from
// Create a class and extend TileEntity and implement IInventory
public class TileTutorial extends TileEntity implements IInventory{
// Then create a ItemStack array (I.E. ItemStack[])
private ItemStack[] inventory;
// Then create a super constructor and give the inventory the amount of ItemStacks you want (Slots),
// I.E. (for 1 slot: inventory = new ItemStack[1];, for 5 slots: inventory = new ItemStack[5]
public TileTutorial(){
inventory = new ItemStack[1];
}
// This returns the inventory size
@Override
public int getSizeInventory(){
return inventory.length;
}
// This returns the stack that is in the slot you picked
// This has 1 param
// @param int slotIndex is just the index you selected
@Override
public ItemStack getStackInSlot(int slotIndex){
return inventory[slotIndex];
}
// This sets the slots contents, it has 2 params
// @param int slot, this is the slots number
// @param ItemStack stack, this is the stack you want to add
@Override
public void setInventorySlotContents(int slot, ItemStack stack){
inventory[slot] = stack;
// This checks to make sure the stack is not nothing, and then makes sure the stack is not going over the limit
// Of the stack
if(stack != null && stack.stackSize > getInventoryStackLimit()){
stack.stackSize = getInventoryStackLimit();
}
}
// This decreases the stack size
// It has 2 params
// @param int slotIndex, this is the slot number
// @param int amount, this is the amount you want to decreases by
@Override
public ItemStack decrStackSize(int slotIndex, int amount){
// This gets the stack with the slot number you want
ItemStack stack = getStackInSlot(slotIndex);
// Then it checks to make sure it has something in it
if(stack != null){
// Then it checks to make sure that it has something that is equal or lesser than the amount you want to add
if(stack.stackSize <= amount){
setInventorySlotContents(slotIndex, null);
} else{
stack = stack.splitStack(amount);
if(stack.stackSize == 0){
setInventorySlotContents(slotIndex, null);
}
}
}
// Then it returns the stack
return stack;
}
// This returns the stack in the slot you chose
// It has 1 param
// @param int slotIndex this is the slot number you choose to get
@Override
public ItemStack getStackInSlotOnClosing(int slotIndex){
// This gets the stack in the slot you chose
ItemStack stack = getStackInSlot(slotIndex);
// This checks to make sure it has something in it
if(stack != null){
setInventorySlotContents(slotIndex, null);
}
// Then it returns the stack
return stack;
}
// This gets the inventory's stack limit
// This is normally 64 but on some conditions it is something lower
@Override
public int getInventoryStackLimit(){
return 64;
}
// Basically this makes sure the player is not to far away to activate the block and, makes sure its the Entity you are
// Selecting
@Override
public boolean isUseableByPlayer(EntityPlayer player){
return worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) == this && player.getDistanceSq(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5) < 64;
}
// A dummy, mostly un-used method, for a check to do something when you open the Gui
@Override
public void openChest() {}
// Another dummy, mostly un-used method, for a check to do something when you close the Gui
@Override
public void closeChest() {}
// This is a really hard method to understand and requires Knowledge of minecrafts NBTTag System, and
// All you really need to do is copy it because its pretty much the same for every entity
@Override
public void readFromNBT(NBTTagCompound tagCompound){
super.readFromNBT(tagCompound);
NBTTagList tagList = tagCompound.getTagList("Inventory");
for(int i = 0; i < tagList.tagCount(); i++){
NBTTagCompound tag = (NBTTagCompound) tagList.tagAt(i);
byte slot = tag.getByte("Slot");
if(slot >= 0 && slot < inventory.length){
inventory[slot] = ItemStack.loadItemStackFromNBT(tag);
}
}
}
// Same as the later
@Override
public void writeToNBT(NBTTagCompound tagCompound){
super.writeToNBT(tagCompound);
NBTTagList itemList = new NBTTagList();
for(int i = 0; i < inventory.length; i++){
ItemStack stack = inventory[i];
if(stack != null){
NBTTagCompound tag = new NBTTagCompound();
tag.setByte("Slot", (byte) i);
stack.writeToNBT(tag);
itemList.appendTag(tag);
}
}
tagCompound.setTag("Inventory", itemList);
}
// This returns the inventory's name
@Override
public String getInvName(){
return "TileEntityTutorial";
}
ServerPacketHandler.java:
// This is my package declaration, do not mess with the standard (package net.minecraft.src;) like I did,
// Because I know what Im doing in this part, If you don't know what your doing keep it the normal (package net.minecraft.src;)
package tutorials;
// These are the required imports
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import net.minecraft.src.EntityPlayer;
import net.minecraft.src.NetworkManager;
import net.minecraft.src.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
// This is required and all you do is create a class and implement IPacketHadnler
public class ServerPacketHandler implements IPacketHandler{
// This method, is required and again just copy the code, because it will be pretty much the same for every mod
// Unless it has special things that need to be done, and I assume (not judging or anything but just saying) that none
// Of you have any knowledge of what goes here, so really don't mess with it, I don't even know what can go here
@Override
public void onPacketData(NetworkManager manager, Packet250CustomPayload payload, Player player){
DataInputStream data = new DataInputStream(new ByteArrayInputStream(payload.data));
EntityPlayer sender = (EntityPlayer) player;
}
}
GuiTutorial.java:
// This is my package declaration, do not mess with the standard (package net.minecraft.src;) like I did,
// Because I know what Im doing in this part, If you don't know what your doing keep it the normal (package net.minecraft.src;)
package tutorials;
// These are the imports you will need
import org.lwjgl.opengl.GL11;
import net.minecraft.src.*;
// Create a class and extend GuiContainer
public class GuiTutorial extends GuiContainer{
// This is you super constructor it has 2 params,
// @param InventoryPlayer, this is the players inventory declaration
// @param TileTutorial this is the TileTutorial declaration
public GuiTutorial(InventoryPlayer player_inventory, TileTutorial tile_entity){
// just supers the a new ContainerTutorial
super(new ContainerTutorial(tile_entity, player_inventory));
}
// This method is required and all it does is draw the foreground
// and overlays
@Override
protected void drawGuiContainerForegroundLayer(){
// Draws The title of the Gui like "Furnace" for the furnace,
// It has 4 params
// @param "Tutorial Gui" this is the Name in String format
// @param int 6, this is the xCoord on the screen
// @param int 6, this is the yCoord on the screen
// @param 0xffffff, this is the color in hex, 0xffffff, is white, 0x000000 is black BTW
fontRenderer.drawString("Tutorial Gui", 6, 6, 0xffffff);
// This draws the caption for the players inventory this is not needed as the above but is sometimes nice
fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 6, ySize - 96 + 2, 0xffffff);
}
// This is another required method and has 3 params
// @param float f, this is just something that is not required here, something I shouldn't have to go indepth with
// @param int i, int j, these are just like the later
@Override
protected void drawGuiContainerBackgroundLayer(float f, int i, int j){
// This is the integer value (?Idk why though?) of the background you want, basically replace "<path>" with what the path
// To your file is
int picture = mc.renderEngine.getTexture("<path>");
// This is reuquired and important not to be missed, this allows the color spectrum to be alloted by open GL11
GL11.glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
// This is the method to bind the picture you defined above to the background, this is required to have a background on
// On the screen
this.mc.renderEngine.bindTexture(picture);
// This is the x value of the picture, it will be used later
int x = (width - xSize) / 2;
// This is the y value of the picture, it will be used later
int y = (height - ySize) / 2;
// This is the method to draw the rectangle to the screen that allows the texture, copy this, because it will be pretty
// Much the same for every Gui
this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
}
}
GuiHandler.java:
// This is my package declaration, do not mess with the standard (package net.minecraft.src;) like I did,
// Because I know what Im doing in this part, If you don't know what your doing keep it the normal (package net.minecraft.src;)
package tutorials;
// These are all the imports you will need
import cpw.mods.fml.common.network.IGuiHandler;
import net.minecraft.src.*;
// Create a class and implement IGuiHandler
public class GuiHandler implements IGuiHandler{
// This is a required method to open you Gui and has 6 params
// @param int id, this is the Gui Id
// @param EntityPlayer, this is the player declaration
// @param World, this is the world declaration
// @param int x, y, z this is the players current x, y, z coords
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z){
// This gets the TileEntity the player is currently activating
TileEntity tile_entity = world.getBlockTileEntity(x, y, z);
// This checks if the TileEntity is the TileTutorial
if(tile_entity instanceof TileTutorial){
// If it is it returns a new ContainerTutorial instance
return new ContainerTutorial((TileTutorial) tile_entity, player.inventory);
}
// Returns null if not
return null;
}
// This is another required method to open the Gui and has 6 params
// @param int id, this is the Gui Id
// @param EntityPlayer, this is the player declaration
// @param World, this is the world declaration,
// @param int x, y, z this is the players current x, y, z coords
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z){
// This gets the TIleEntity the player is currently activating
TileEntity tile_entity = world.getBlockTileEntity(x, y, z);
// This checks if the TileEntity is the TileTutorial
if(tile_entity instanceof TileTutorial){
// If it is it returns a new GuiTutorial instance
return new GuiTutorial(player.inventory, (TileTutorial) tile_entity);
}
// Returns null if not
return null;
}
}
ContainerTutorial.java:
// This is my package declaration, do not mess with the standard (package net.minecraft.src;) like I did,
// Because I know what Im doing in this part, If you don't know what your doing keep it the normal (package net.minecraft.src;)
package tutorials;
// This import is not required as I changed the package so I have to implement this, but if you don't then you don't need
// To import this
import net.minecraft.src.*;
// Create a class and extend Container
public class ContainerTutorial extends Container{
// This is a declaration of the TileTutorial Class
protected TileTutorial tile_entity;
// This is the super constructor and has 2 params
// @param TileTutorial, this is the TileTutorial declaration
// @param InventoryPlayer, this is the players inventory
public ContainerTutorial(TileTutorial tile_entity, InventoryPlayer player_inventory){
// When you start to make the super constructor, you need to declare the TileTutorial, and this is how you actually do it
this.tile_entity = tile_entity;
// This add the lone slot to the Container,
// The more stacks you have the more slots you need
// This has 1 param
// @param slot, this is the slot declaration, and you can declare a new Slot and this has 4 params
// @sub-param tile_entity, this is you TileTutorial
// @sub-param 0, this is the slot id,
// @sub-param 76, this is the x position on the screen for the slot
// @sub-param 27, this is the y position on the screen for the slot
addSlotToContainer(new Slot(tile_entity, 0, 76, 27));
// This is a method you will create later in the code and binds the players inventory, to the Gui, in slot form
bindPlayerInventory(player_inventory);
}
// This is required and returns if the player can use this Gui
// It has 1 param
// @param EntityPlayer, this is the player declaration
@Override
public boolean canInteractWith(EntityPlayer player){
return tile_entity.isUseableByPlayer(player);
}
// This is the method that binds all the slots in the players inventory, to the Gui Screen
// It has 1 param
// @param InventoryPlayer, this is the players inventory
protected void bindPlayerInventory(InventoryPlayer player_inventory){
// This is a ton of math and I did not in any way change this code,
// So feel free to copy the code here and paste it in your method,
// As this is the same code Notch, used to bind the players inventory
for(int i = 0; i < 3; i++){
for(int j = 0; j < 9; j++){
addSlotToContainer(new Slot(player_inventory, j + i * 9 + 9, 9 + j * 18, 64 + i * 16));
}
}
for(int i = 0; i < 9; i++){
addSlotToContainer(new Slot(player_inventory, i, 6 + i * 16, 142));
}
}
// This is not required, and is optional,
// If you want this code, that all it does is just when you right click, it snaps the stack you chose to the next open slot
// In the players inventory
// It has 1 param
// @param int slot_index, this is the slot that the player chose
@Override
public ItemStack transferStackInSlot(int slot_index){
ItemStack stack = null;
Slot slot_object = (Slot) inventorySlots.get(slot_index);
if(slot_object != null && slot_object.getHasStack()){
ItemStack stack_in_slot = slot_object.getStack();
stack = stack_in_slot.copy();
if(slot_index == 0){
if(!mergeItemStack(stack_in_slot, 1, inventorySlots.size(), true)){
return null;
}
} else if(!mergeItemStack(stack_in_slot, 0, 1, false)){
return null;
}
if(stack_in_slot.stackSize == 0){
slot_object.putStack(null);
} else{
slot_object.onSlotChanged();
}
}
return stack;
}
}
CommonProxy.java:
// This is my package declaration, do not mess with the standard (package net.minecraft.src;) like I did,
// Because I know what Im doing in this part, If you don't know what your doing keep it the normal (package net.minecraft.src;)
package tutorials;
// Another dummy class
// This does nothing as well and not required in a sense, as you do need the class but nothing in it
public class CommonProxy{
}
ClientProxy.java:
// This is my package declaration, do not mess with the standard (package net.minecraft.src;) like I did,
// Because I know what Im doing in this part, If you don't know what your doing keep it the normal (package net.minecraft.src;)
package tutorials;
// Dummy Method, it is required, but does nothing really as you don't need anything in it
// unless you put some code here if you know what your doing :), it does nothing
public class ClientProxy extends CommonProxy{
}
ClientPacketHandler.java:
// This is my package declaration, do not mess with the standard (package net.minecraft.src;) like I did,
// Because I know what Im doing in this part, If you don't know what your doing keep it the normal (package net.minecraft.src;)
package tutorials;
// Theses are all the imports you need
import java.io.ByteArrayInputStream;
import java.io.DataInputStream;
import net.minecraft.src.NetworkManager;
import net.minecraft.src.Packet250CustomPayload;
import cpw.mods.fml.common.network.IPacketHandler;
import cpw.mods.fml.common.network.Player;
// Create a class and implement IPacketHandler
// This just handles the data packets in the server
public class ClientPacketHandler implements IPacketHandler{
@Override
public void onPacketData(NetworkManager manager, Packet250CustomPayload payload, Player player){
DataInputStream data = new DataInputStream(new ByteArrayInputStream(payload.data));
}
}
BlockTutorial.java:
// This is my package declaration, do not mess with the standard (package net.minecraft.src;) like I did,
// Because I know what Im doing in this part, If you don't know what your doing keep it the normal (package net.minecraft.src;)
package tutorials;
// These are all the imports you need for this
import java.util.Random;
import net.minecraft.src.*;
// Create the class, I named mine BlockTutorial, and extend BlockContainer
public class BlockTutorial extends BlockContainer{
// Create a protected super constructor, and give it either 1 param, 2 params or 3 params
// If you give it 1 param it will be as followed,
// If you give it 2 params You need to have int blockId, and int textureSpot
// If you give it 3 params you need to have int blockId, and int textureSpot, and Material material
protected BlockTutorial(int blockId){
// Create the super constructer and give it the parms that it needs, I.E if you want a texture
// Give it a super(blockId, textureSpot, Material);
super(blockId, Material.rock);
// This part is optional and is required at some point, if you don't put it here you will have to put it after you
// Declare the block I.E public static final Block tutorialBlock = new BlockTutorial(255).setBlockName("blockTutorial");
setBlockName("blockTutorial");
}
// This is a required method from FML, it has 9 params,
// @param World, the world instance,
// @param int x, y, z, the blocks x, y, and z coords
// @param EntityPlayer, the player
// @param int i, this is not really used in this along with the rest (float f, float g, and float t)
@Override
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int i, float f, float g, float t){
// Just making an instance of the TileEntity that the player clicked on
TileEntity tile_entity = world.getBlockTileEntity(x, y, z);
// Checking if the TileEntity is nothing or if the player is sneaking
if(tile_entity == null || player.isSneaking()){
// Returns false so it doesn't update anything
return false;
}
// opens the UI if the later is not met, the method player.openGui() has 6 params
// @param TutorialMod.instance, is just the instance of the TutorialMod
// @param 0, this is the UI id, this can be changed in the GUI handler, and will open a different UI if chosen to do so
// @param x, y, z, the players current player x, y, z coords
player.openGui(TutorialMod.instance, 0, world, x, y, z);
// Returns true to force an update
return true;
}
// Required method from BlockContainer has 6 params
// @param World, just the standard world instance
// @param int x, y, z, just the blocks x, y, and z coords
// @param i, and j, this is not neaded here so Im not going to cover them
@Override
public void breakBlock(World world, int x, int y, int z, int i, int j){
// Calls a method that will created below, this method can be made up here but it can be sometimes more readable if you do it this way
dropItems(world, x, y, z);
// Supering the breakBlock() method, this is so it pregforms the action
super.breakBlock(world, x, y, z, i, j);
}
// Just a method to drop the items when the block is broken, it has 4 params
// @param World, just the standared world instance,
// @param int x, y, z, the blocks x, y, z coords
// Although this method can be required if chosen to I will not be going into it because its not what this tutorial is about,
// And its also a long method, if you want to make this method, you are allowed to copy the code and use it or do whatever you wish to do with it
private void dropItems(World world, int x, int y, int z){
Random rand = new Random();
TileEntity tile_entity = world.getBlockTileEntity(x, y, z);
if(!(tile_entity instanceof IInventory)){
return;
}
IInventory inventory = (IInventory) tile_entity;
for(int i = 0; i < inventory.getSizeInventory(); i++){
ItemStack item = inventory.getStackInSlot(i);
if(item != null && item.stackSize > 0){
float rx = rand.nextFloat() * 0.6F + 0.1F;
float ry = rand.nextFloat() * 0.6F + 0.1F;
float rz = rand.nextFloat() * 0.6F + 0.1F;
EntityItem entity_item = new EntityItem(world, x + rx, y + ry, z + rz, new ItemStack(item.itemID, item.stackSize, item.getItemDamage()));
if(item.hasTagCompound()){
entity_item.item.setTagCompound((NBTTagCompound) item.getTagCompound().copy());
}
float factor = 0.5F;
entity_item.motionX = rand.nextGaussian() * factor;
entity_item.motionY = rand.nextGaussian() * factor + 0.2F;
entity_item.motionZ = rand.nextGaussian() * factor;
world.spawnEntityInWorld(entity_item);
item.stackSize = 0;
}
}
}
// A required method from BlockContainer
// Just creates a new TileEntity on the placement of the block
// Has 1 param
// @param World, also just the standard world instance
@Override
public TileEntity createNewTileEntity(World world){
return new TileTutorial();
}
}
Lol this was a long and hard tutorial, and it was hard to write, so I hope you enjoy it and if you have any questions or concerns please message me, post below, or message me on WindowsLive Messager (Acount is below in my signature ). A lot of this stuff is not covered fully because I either didn't have the knowledge of the subject or it wasn't a thing that needed to be covered in this tutorial. So again Enjoy..
Also If you would mind I ask anyone that learns how to make a Gui like this, just post a little credit to me in one of the mods you created using this tutorial, this is not required but is a nice gesture and I will post your name below and a link to your mod, as a nice gesture for doing the nice gesture for me . I give what I get
--EDIT--
plzzz call me Leah as that is my name (real name) instead of trying to type out my screen name
lol no i haven't finished the tutorial due to real life problems at the moment but, i will upload and finish them later today/tomorrow depending on were you live
Wow have some patience guys... Sometimes things don't just happen, and quite often people do things other than play/mod games. The tutorials will come when they come, and that's whenever shes done and gets a chance to put them up.
Rollback Post to RevisionRollBack
Learn some Java before you mod, and skip over the chapter on ModLoader, straight to MinecraftForge. It's better. Trust me.
alright so im finishing this as I am typing this, sorry for the delay everyone....Personal things have come up, love troubles :(, and therefore I could (not really, just not feeling up to it) not finish it, but I'm going to finish it now
If you surround that code with code tags, it will highlight the syntax, so it breaks up the "wall of text". No offense, but it's a little hard to decipher.
EDIT: Nevermind. Maybe it just wasn't showing on my computer at the moment. Any estimate for when the next sections will come?
Rollback Post to RevisionRollBack
Learn some Java before you mod, and skip over the chapter on ModLoader, straight to MinecraftForge. It's better. Trust me.
and now for the tutorial:
TutorialMod.java:
TileTutorial.java:
ServerPacketHandler.java:
GuiTutorial.java:
GuiHandler.java:
ContainerTutorial.java:
CommonProxy.java:
ClientProxy.java:
ClientPacketHandler.java:
BlockTutorial.java:
Lol this was a long and hard tutorial, and it was hard to write, so I hope you enjoy it and if you have any questions or concerns please message me, post below, or message me on WindowsLive Messager (Acount is below in my signature ). A lot of this stuff is not covered fully because I either didn't have the knowledge of the subject or it wasn't a thing that needed to be covered in this tutorial. So again Enjoy..
Also If you would mind I ask anyone that learns how to make a Gui like this, just post a little credit to me in one of the mods you created using this tutorial, this is not required but is a nice gesture and I will post your name below and a link to your mod, as a nice gesture for doing the nice gesture for me . I give what I get
--EDIT--
plzzz call me Leah as that is my name (real name) instead of trying to type out my screen name
FPSBox.com - Affordable and Awesome Minecraft server hosting
cool very nice i will read both tutorial
??????
If you surround that code with code tags, it will highlight the syntax, so it breaks up the "wall of text". No offense, but it's a little hard to decipher.
EDIT: Nevermind. Maybe it just wasn't showing on my computer at the moment. Any estimate for when the next sections will come?
We're waiting patiently. Sort of lol