MC Modding
Please register and join the community!


Join the forum, it's quick and easy

MC Modding
Please register and join the community!
MC Modding
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How to make a new block that has a gui simply

+2
filip151
lcass
6 posters

Go down

How to make a new block that has a gui simply  Empty How to make a new block that has a gui simply

Post by lcass Thu Oct 27, 2011 6:18 pm

I saw lots of people wanted to do this type of thing ITS HARD you need intermediate java knowledge and a very logical brain (btw you need a computer too) to be able to do this kind of thing.

firstly read over the classes so you can understand how it works.

ok no turning back here read on if you dare, I will put a description in each one of the classes I do.

I will use my mod that has a grinder in it so change everything that has the word grinder in. for the bits that say cangrinder change the grinder to what ever the function is you will need to change them all or you will get this error.
null pointer.

please remeber that java is case sensitive please check the work before you come to me asking for why it wont work and if you have a problem once installing in your jar please use the error test jamioflan has ( it really helps)

you will need the following classes mod_namehere.class ,namehere.class,Containernamehere,Guinamehere,namehereRecipes,Slotnamehere

Code:

package net.minecraft.src;

public class mod_grinder extends BaseMod{
  public static final Block grinder = (new grinder (194, false)).setBlockName("grinder");
 
  public mod_grinder() {
      ModLoader.RegisterBlock(grinder);
      grinder.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/crystal/grinder.png");
      ModLoader.AddName(grinder, "grinder");
                ModLoader.RegisterTileEntity(net.minecraft.src.TileEntitygrinder.class, "grinder");
                ModLoader.AddRecipe(new ItemStack(mod_grinder.grinder, 10), new Object[] {
                    "PDP","IFI","PPP",  Character.valueOf('P'), Block.cobblestone ,Character.valueOf('D'), mod_emeraldgem.emeraldgem ,Character.valueOf('F'), Block.stoneOvenIdle , Character.valueOf('I'), Block.pistonBase
                    });
     
  }
     
  public String Version(){ return("1.8.1");}}
for this one you hopefully know what it is if not please go and look at the other tutorials before going to this one or you will go boink on the desk or bean bag (I prefer bean bag).
Code:

package net.minecraft.src;

import java.util.Random;


public class grinder extends BlockContainer
{

    protected grinder(int i, boolean flag)
    {
        super(i, Material.rock);
        grinder = new Random();
        isActive = flag;
 
    }

    public int idDropped(int i, Random random)
    {
        return Block.stoneOvenIdle.blockID;
    }

    public void onBlockAdded(World world, int i, int j, int k)
    {
        super.onBlockAdded(world, i, j, k);
     
    }

    public boolean blockActivated(World world, int i, int j, int k, EntityPlayer entityplayer)
    {
        if(world.multiplayerWorld)
        {
            return true;
        }
        TileEntitygrinder tileentitygrinder = (TileEntitygrinder)world.getBlockTileEntity(i, j, k);
        if(tileentitygrinder != null)
        {
            ModLoader.OpenGUI(entityplayer, new Guigrinder(entityplayer.inventory, tileentitygrinder));
        }
        return true;
    }

    public static void updategrinderBlockState(boolean flag, World world, int i, int j, int k)
    {
        int l = world.getBlockMetadata(i, j, k);
        TileEntity tileentity = world.getBlockTileEntity(i, j, k);
        keepgrinderInventory = true;
       
            world.setBlockWithNotify(i, j, k, mod_grinder.grinder.blockID);
       
        keepgrinderInventory = false;
        world.setBlockMetadataWithNotify(i, j, k, l);
        if(tileentity != null)
        {
            tileentity.validate();
            world.setBlockTileEntity(i, j, k, tileentity);
        }
    }

    public TileEntity getBlockEntity()
    {
        return new TileEntitygrinder();
    }

 

    public void onBlockRemoval(World world, int i, int j, int k)
    {
        if(!keepgrinderInventory)
        {
            TileEntitygrinder tileentitygrinder = (TileEntitygrinder)world.getBlockTileEntity(i, j, k);
            if(tileentitygrinder != null)
            {
label0:
                for(int l = 0; l < tileentitygrinder.getSizeInventory(); l++)
                {
                    ItemStack itemstack = tileentitygrinder.getStackInSlot(l);
                    if(itemstack == null)
                    {
                        continue;
                    }
                    float f = grinder.nextFloat() * 0.8F + 0.1F;
                    float f1 = grinder.nextFloat() * 0.8F + 0.1F;
                    float f2 = grinder.nextFloat() * 0.8F + 0.1F;
                    do
                    {
                        if(itemstack.stackSize <= 0)
                        {
                            continue label0;
                        }
                        int i1 = grinder.nextInt(21) + 10;
                        if(i1 > itemstack.stackSize)
                        {
                            i1 = itemstack.stackSize;
                        }
                        itemstack.stackSize -= i1;
                        EntityItem entityitem = new EntityItem(world, (float)i + f, (float)j + f1, (float)k + f2, new ItemStack(itemstack.itemID, i1, itemstack.getItemDamage()));
                        float f3 = 0.05F;
                        entityitem.motionX = (float)grinder.nextGaussian() * f3;
                        entityitem.motionY = (float)grinder.nextGaussian() * f3 + 0.2F;
                        entityitem.motionZ = (float)grinder.nextGaussian() * f3;
                        world.entityJoinedWorld(entityitem);
                    } while(true);
                }

            }
        }
        super.onBlockRemoval(world, i, j, k);
    }

    private Random grinder;
    private final boolean isActive;
    private static boolean keepgrinderInventory = false;

}

every thing is the same here only need to edit the grinder parts.
Code:

package net.minecraft.src;

import java.util.List;

// Referenced classes of package net.minecraft.src:
//            Container, Slot, SlotFurnace, InventoryPlayer,
//            ICrafting, TileEntityFurnace, ItemStack, EntityPlayer

public class Containergrinder extends Container
{

    public Containergrinder (InventoryPlayer inventoryplayer, TileEntitygrinder  tileentitygrinder )
    {
        lastCookTime = 0;
        lastBurnTime = 0;
        lastItemBurnTime = 0;
        grinder = tileentitygrinder ;
        addSlot(new Slot(tileentitygrinder , 0, 56, 17));
        addSlot(new Slot(tileentitygrinder , 1, 56, 53));
        addSlot(new Slotgrinder(inventoryplayer.player, tileentitygrinder , 2, 116, 35));
        for(int i = 0; i < 3; i++)
        {
            for(int k = 0; k < 9; k++)
            {
                addSlot(new Slot(inventoryplayer, k + i * 9 + 9, 8 + k * 18, 84 + i * 18));
            }

        }

        for(int j = 0; j < 9; j++)
        {
            addSlot(new Slot(inventoryplayer, j, 8 + j * 18, 142));
        }

    }

    public void updateCraftingResults()
    {
        super.updateCraftingResults();
        for(int i = 0; i < crafters.size(); i++)
        {
            ICrafting icrafting = (ICrafting)crafters.get(i);
            if(lastCookTime != grinder.grinderCookTime)
            {
                icrafting.updateCraftingInventoryInfo(this, 0, grinder.grinderCookTime);
            }
            if(lastBurnTime != grinder.grinderBurnTime)
            {
                icrafting.updateCraftingInventoryInfo(this, 1, grinder.grinderBurnTime);
            }
            if(lastItemBurnTime != grinder.currentItemBurnTime)
            {
                icrafting.updateCraftingInventoryInfo(this, 2, grinder.currentItemBurnTime);
            }
        }

        lastCookTime = grinder.grinderCookTime;
        lastBurnTime = grinder.grinderBurnTime;
        lastItemBurnTime = grinder.currentItemBurnTime;
    }

    public void func_20112_a(int i, int j)
    {
        if(i == 0)
        {
          grinder.grinderCookTime = j;
        }
        if(i == 1)
        {
          grinder.grinderBurnTime = j;
        }
        if(i == 2)
        {
          grinder.currentItemBurnTime = j;
        }
    }

    public boolean canInteractWith(EntityPlayer entityplayer)
    {
        return grinder.canInteractWith(entityplayer);
    }

    public ItemStack getStackInSlot(int i)
    {
        ItemStack itemstack = null;
        Slot slot = (Slot)inventorySlots.get(i);
        if(slot != null && slot.getHasStack())
        {
            ItemStack itemstack1 = slot.getStack();
            itemstack = itemstack1.copy();
            if(i == 2)
            {
                if(!func_28125_a(itemstack1, 3, 39, true))
                {
                    return null;
                }
            } else
            if(i >= 3 && i < 30)
            {
                if(!func_28125_a(itemstack1, 30, 39, false))
                {
                    return null;
                }
            } else
            if(i >= 30 && i < 39)
            {
                if(!func_28125_a(itemstack1, 3, 30, false))
                {
                    return null;
                }
            } else
            if(!func_28125_a(itemstack1, 3, 39, false))
            {
                return null;
            }
            if(itemstack1.stackSize == 0)
            {
                slot.putStack(null);
            } else
            {
                slot.onSlotChanged();
            }
            if(itemstack1.stackSize != itemstack.stackSize)
            {
                slot.onPickupFromSlot(itemstack1);
            } else
            {
                return null;
            }
        }
        return itemstack;
    }

    private TileEntitygrinder  grinder ;
    private int lastCookTime;
    private int lastBurnTime;
    private int lastItemBurnTime;
}
exactly the same, if your an advanced modder and you want to edit the amount of slots edit this sections and add them then you will need to do things in the other classes to declare the change that you have made to it here is the code, if you can't quite understand what to do to add more slots skip this bit REMEMBER that if you change the amount of slots you might need to change the recipes I have not tried to do this but I assure you it will be hard. if you don't know what im talking about by adding slots or just trying to get it to work DO NOT TRY IT.
Code:

addSlot(new Slot(tileentitygrinder , 0, 56, 17));
        addSlot(new Slot(tileentitygrinder , 1, 56, 53));
        addSlot(new Slotgrinder(inventoryplayer.player, tileentitygrinder , 2, 116, 35));

to add a new slot just put another addSlot in see if you can figure out how it works I suggest using the ic2 induction furnace to check how they did the slots.
Code:

package net.minecraft.src;

import net.minecraft.client.Minecraft;
import org.lwjgl.opengl.GL11;

// Referenced classes of package net.minecraft.src:
//            GuiContainer, ContainerFurnace, FontRenderer, RenderEngine,
//            TileEntityFurnace, InventoryPlayer

public class Guigrinder extends GuiContainer
{

    public Guigrinder(InventoryPlayer inventoryplayer, TileEntitygrinder tileentitygrinder)
    {
        super(new Containergrinder(inventoryplayer, tileentitygrinder));
        grinderInventory = tileentitygrinder;
    }

    protected void drawGuiContainerForegroundLayer()
    {
        fontRenderer.drawString("Grinder", 60, 6, 0x404040);
        fontRenderer.drawString("Inventory", 8, (ySize - 96) + 2, 0x404040);
    }

    protected void drawGuiContainerBackgroundLayer(float f)
    {
        int i = mc.renderEngine.getTexture("/crystal/grindergui.png");
        GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
        mc.renderEngine.bindTexture(i);
        int j = (width - xSize) / 2;
        int k = (height - ySize) / 2;
        drawTexturedModalRect(j, k, 0, 0, xSize, ySize);
        if(grinderInventory.isgrinder())
        {
            int l = grinderInventory.getBurnTimeRemainingScaled(12);
            drawTexturedModalRect(j + 56, (k + 36 + 12) - l, 176, 12 - l, 14, l + 2);
        }
        int i1 = grinderInventory.getCookProgressScaled(24);
        drawTexturedModalRect(j + 79, k + 34, 176, 14, i1 + 1, 16);
    }

    private TileEntitygrinder grinderInventory;
}
ok most of the stuff is the same just that you need to edit the file that has your gui inside this is what the line
Modloader.AddGUI does.
Code:

package net.minecraft.src;


// Referenced classes of package net.minecraft.src:
//            TileEntity, IInventory, ItemStack, NBTTagCompound,
//            NBTTagList, World, Item, BlockFurnace,
//            FurnaceRecipes, Block, Material, ModLoader,
//            EntityPlayer

public class TileEntitygrinder extends TileEntity
implements IInventory
{

    public TileEntitygrinder()
    {
      grinderItemStacks = new ItemStack[3];
      grinderBurnTime = 0;
        currentItemBurnTime = 0;
        grinderCookTime = 0;
    }

    public int getSizeInventory()
    {
        return grinderItemStacks.length;
    }

    public ItemStack getStackInSlot(int i)
    {
        return grinderItemStacks[i];
    }

    public ItemStack decrStackSize(int i, int j)
    {
        if(grinderItemStacks[i] != null)
        {
            if(grinderItemStacks[i].stackSize <= j)
            {
                ItemStack itemstack = grinderItemStacks[i];
                grinderItemStacks[i] = null;
                return itemstack;
            }
            ItemStack itemstack1 = grinderItemStacks[i].splitStack(j);
            if(grinderItemStacks[i].stackSize == 0)
            {
              grinderItemStacks[i] = null;
            }
            return itemstack1;
        } else
        {
            return null;
        }
    }

    public void setInventorySlotContents(int i, ItemStack itemstack)
    {
      grinderItemStacks[i] = itemstack;
        if(itemstack != null && itemstack.stackSize > getInventoryStackLimit())
        {
            itemstack.stackSize = getInventoryStackLimit();
        }
    }

    public String getInvName()
    {
        return "grinder";
    }

    public void readFromNBT(NBTTagCompound nbttagcompound)
    {
        super.readFromNBT(nbttagcompound);
        NBTTagList nbttaglist = nbttagcompound.getTagList("Items");
        grinderItemStacks = new ItemStack[getSizeInventory()];
        for(int i = 0; i < nbttaglist.tagCount(); i++)
        {
            NBTTagCompound nbttagcompound1 = (NBTTagCompound)nbttaglist.tagAt(i);
            byte byte0 = nbttagcompound1.getByte("Slot");
            if(byte0 >= 0 && byte0 < grinderItemStacks.length)
            {
              grinderItemStacks[byte0] = ItemStack.func_35864_a(nbttagcompound1);
            }
        }

        grinderBurnTime = nbttagcompound.getShort("BurnTime");
        grinderCookTime = nbttagcompound.getShort("CookTime");
        currentItemBurnTime = getItemBurnTime(grinderItemStacks[1]);
    }

    public void writeToNBT(NBTTagCompound nbttagcompound)
    {
        super.writeToNBT(nbttagcompound);
        nbttagcompound.setShort("BurnTime", (short)grinderBurnTime);
        nbttagcompound.setShort("CookTime", (short)grinderCookTime);
        NBTTagList nbttaglist = new NBTTagList();
        for(int i = 0; i < grinderItemStacks.length; i++)
        {
            if(grinderItemStacks[i] != null)
            {
                NBTTagCompound nbttagcompound1 = new NBTTagCompound();
                nbttagcompound1.setByte("Slot", (byte)i);
                grinderItemStacks[i].writeToNBT(nbttagcompound1);
                nbttaglist.setTag(nbttagcompound1);
            }
        }

        nbttagcompound.setTag("Items", nbttaglist);
    }

    public int getInventoryStackLimit()
    {
        return 64;
    }

    public int getCookProgressScaled(int i)
    {
        return (grinderCookTime * i) / 200;
    }

    public int getBurnTimeRemainingScaled(int i)
    {
        if(currentItemBurnTime == 0)
        {
            currentItemBurnTime = 200;
        }
        return (grinderBurnTime * i) / currentItemBurnTime;
    }

    public boolean isgrinder()
    {
        return grinderBurnTime > 0;
    }

    public void updateEntity()
    {
        boolean flag = grinderBurnTime > 0;
        boolean flag1 = false;
        if(grinderBurnTime > 0)
        {
          grinderBurnTime--;
        }
        if(!worldObj.multiplayerWorld)
        {
            if(grinderBurnTime == 0 && cangrinder())
            {
                currentItemBurnTime = grinderBurnTime = getItemBurnTime(grinderItemStacks[1]);
                if(grinderBurnTime > 0)
                {
                    flag1 = true;
                    if(grinderItemStacks[1] != null)
                    {
                        if(grinderItemStacks[1].getItem().hasContainerItem())
                        {
                          grinderItemStacks[1] = new ItemStack(grinderItemStacks[1].getItem().getContainerItem());
                        } else
                        {
                          grinderItemStacks[1].stackSize--;
                        }
                        if(grinderItemStacks[1].stackSize == 0)
                        {
                            grinderItemStacks[1] = null;
                        }
                    }
                }
            }
            if(isgrinder() && cangrinder())
            {
                grinderCookTime++;
                if(grinderCookTime == 200)
                {
                  grinderCookTime = 0;
                  grinderItem();
                    flag1 = true;
                }
            } else
            {
              grinderCookTime = 0;
            }
            if(flag != (grinderBurnTime > 0))
            {
                flag1 = true;
                grinder.updategrinderBlockState(grinderBurnTime > 0, worldObj, xCoord, yCoord, zCoord);
            }
        }
        if(flag1)
        {
            onInventoryChanged();
        }
    }

    private boolean cangrinder()
    {
        if(grinderItemStacks[0] == null)
        {
            return false;
        }
        ItemStack itemstack = grinderRecipes.grinder().getgrinderResult(grinderItemStacks[0].getItem().shiftedIndex);
        if(itemstack == null)
        {
            return false;
        }
        if(grinderItemStacks[2] == null)
        {
            return true;
        }
        if(! grinderItemStacks[2].isItemEqual(itemstack))
        {
            return false;
        }
        if( grinderItemStacks[2].stackSize < getInventoryStackLimit() && grinderItemStacks[2].stackSize < grinderItemStacks[2].getMaxStackSize())
        {
            return true;
        }
        return grinderItemStacks[2].stackSize < itemstack.getMaxStackSize();
    }

    public void grinderItem()
    {
        if(!cangrinder())
        {
            return;
        }
        ItemStack itemstack = grinderRecipes.grinder().getgrinderResult( grinderItemStacks[0].getItem().shiftedIndex);
        if(grinderItemStacks[2] == null)
        {
          grinderItemStacks[2] = itemstack.copy();
        } else
        if(grinderItemStacks[2].itemID == itemstack.itemID)
        {
          grinderItemStacks[2].stackSize++;
        }
        if(grinderItemStacks[0].getItem().hasContainerItem())
        {
          grinderItemStacks[0] = new ItemStack(grinderItemStacks[0].getItem().getContainerItem());
        } else
        {
          grinderItemStacks[0].stackSize--;
        }
        if(grinderItemStacks[0].stackSize <= 0)
        {
          grinderItemStacks[0] = null;
        }
    }

    private int getItemBurnTime(ItemStack itemstack)
    {
        if(itemstack == null)
        {
            return 0;
        }
        int i = itemstack.getItem().shiftedIndex;
        if(i < 256 && Block.blocksList[i].blockMaterial == Material.wood)
        {
            return 300;
        }
        if(i == Item.stick.shiftedIndex)
        {
            return 100;
        }
        if(i == Item.coal.shiftedIndex)
        {
            return 1600;
        }
        if(i == Item.bucketLava.shiftedIndex)
        {
            return 20000;
        }
        if(i == mod_plutore.plutore.shiftedIndex)
        {
            return 80000;
        }
        if(i == Block.sapling.blockID)
        {
            return 100;
        } else
        {
            return ModLoader.AddAllFuel(i, itemstack.getItemDamage());
        }
    }

    public boolean canInteractWith(EntityPlayer entityplayer)
    {
        if(worldObj.getBlockTileEntity(xCoord, yCoord, zCoord) != this)
        {
            return false;
        }
        return true;
    }
    public void func_35142_x_()
    {
    }

    public void func_35141_y_()
    {
    }
   

    private ItemStack grinderItemStacks[];
    public int grinderBurnTime;
    public int currentItemBurnTime;
    public int grinderCookTime;
}

EDIT EVERYTHING THAT SAY GRINDER or you will pay I payed 5 hours last time I didn't change.
ok If you want multitextures like for the furnace please use the code by austin56101 you remember the gui code well its in here remember to edit it.
Code:

package net.minecraft.src;

import java.util.HashMap;
import java.util.Map;

// Referenced classes of package net.minecraft.src:
//            Block, ItemStack, Item

public class grinderRecipes
{

    public static final grinderRecipes grinder()
    {
        return grinder;
    }

    private grinderRecipes()
    {
      grinderList = new HashMap();
        addgrinder(mod_emeraldgem.emeraldgem.shiftedIndex, new ItemStack(mod_emeralddust.emeralddust));
    }

    public void addgrinder(int i, ItemStack itemstack)
    {
      grinderList.put(Integer.valueOf(i), itemstack);
    }

    public ItemStack getgrinderResult(int i)
    {
        return (ItemStack)grinderList.get(Integer.valueOf(i));
    }

    public Map getgrinderList()
    {
        return grinderList;
    }

    private static final grinderRecipes grinder = new grinderRecipes();
    private Map grinderList;

}
exactly the same apart from this line
Code:

grinderList = new HashMap();
        addgrinder(mod_emeraldgem.emeraldgem.shiftedIndex, new ItemStack(mod_emeralddust.emeralddust));
this is the recipe it runs all the recipes now you cant use modloader.addnamehere you need to add it inside the code where is says addgrinder(mod_emeraldgem.emeraldgem.shiftedIndex it is the item that you put in and the next part thats after it is the item you recive. to add your own fuel edit this part

private int getItemBurnTime(ItemStack itemstack)
    {
        if(itemstack == null)
        {
            return 0;
        }
        int i = itemstack.getItem().shiftedIndex;
        if(i < 256 && Block.blocksList[i].blockMaterial == Material.wood)
        {
            return 300;
        }
        if(i == Item.stick.shiftedIndex)
        {
            return 100;
        }
        if(i == Item.coal.shiftedIndex)
        {
            return 1600;
        }
        if(i == Item.bucketLava.shiftedIndex)
        {
            return 20000;
        }
        if(i == mod_plutore.plutore.shiftedIndex)
        {
            return 80000;
        }
        if(i == Block.sapling.blockID)
        {
            return 100;
        } else
        {
            return ModLoader.AddAllFuel(i, itemstack.getItemDamage());
        }
    }
you guess what you need to do also the if(i ==mod_plutore.plutore.shiftedIndex) you can remove that is from my mod and is uneeded. you guessed what the return value does its the amount of time it cooks for in milliseconds for refferal lava does 20000 which is 100 items.
ok now for the Slotnamehere.class REMEMBER THAT JAVA IS CAPS sensitive!
Code:
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3) braces deadcode

package net.minecraft.src;


// Referenced classes of package net.minecraft.src:
//            Slot, EntityPlayer, ItemStack, Item,
//            AchievementList, ModLoader, IInventory

public class Slotgrinder extends Slot
{

    public Slotgrinder(EntityPlayer entityplayer, IInventory iinventory, int i, int j, int k)
    {
        super(iinventory, i, j, k);
        thePlayer = entityplayer;
    }

    public boolean isItemValid(ItemStack itemstack)
    {
        return false;
    }

    public void onPickupFromSlot(ItemStack itemstack)
    {
        itemstack.onCrafting(thePlayer.worldObj, thePlayer);
        if(itemstack.itemID == Item.ingotIron.shiftedIndex)
        {
            thePlayer.addStat(AchievementList.acquireIron, 1);
        }
        if(itemstack.itemID == Item.fishCooked.shiftedIndex)
        {
            thePlayer.addStat(AchievementList.cookFish, 1);
        }
        ModLoader.TakenFromFurnace(thePlayer, itemstack);
        super.onPickupFromSlot(itemstack);
    }

    private EntityPlayer thePlayer;
}
in this one the big chunk with all of the achievement stuff you dont really need unless you know how to add achievments and it will not work in the block if the achivments are not in the recipies


I hope you enjoy and use this tutorial I will answer questions if you need it remember to do the sprite and edit your gui. use the gui/furnace one.

pm me if you want any help doing this.

put the multi texture code put it in the TileEntitynamehere.class just above onblockclick/activated


Last edited by lcass on Fri Nov 04, 2011 9:53 pm; edited 2 times in total

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by filip151 Thu Oct 27, 2011 7:01 pm

Do I have to change the grinder parts? I just wanted to make a grinder. Wink

filip151
Member

Posts : 11
Join date : 2011-10-21
Age : 25
Location : Norway, Oslo Poland, Swiecie

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by lcass Thu Oct 27, 2011 7:09 pm

Very Happy yes its my Idea you could just change to something like MUSHER and make it do diffrent functions Very Happy mush your food

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by breakyorself Thu Oct 27, 2011 7:56 pm

Thanks for the tut i`ve been looking for this for a LONG time.
breakyorself
breakyorself
Member

Posts : 60
Join date : 2011-10-19

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by lcass Thu Oct 27, 2011 9:56 pm

np breakyorself I felt everyone needed this I have seen lots of requests and lots of the people who say the wanted it wern't even botherd to start so yer I spent yesterday 5 hours :d doing it and it worked YER

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by lcass Thu Oct 27, 2011 9:56 pm

oh and also your drugs are bad thing dosn't fit very well with my mod seeing as it has coca and cocaine in it Very Happy

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by Strengthowns Fri Oct 28, 2011 1:34 am

Very nice. Thanks for contributing, Don't forget you can put an attachment of the complete files.
Strengthowns
Strengthowns
Admin

Posts : 79
Join date : 2011-06-14
Location : Right here!

http://www.mcmodding.4umer.com

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by austin56101 Fri Oct 28, 2011 1:37 am

nice
austin56101
austin56101
Moderator
Moderator

Posts : 85
Join date : 2011-10-22
Age : 27
Location : Cali!

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by lcass Fri Oct 28, 2011 2:42 am

Lol I am going to be spending lots of time doing things like this

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by lcass Fri Oct 28, 2011 3:04 am

I forgot about recipes I will add that a bit later

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by lcass Sat Oct 29, 2011 7:03 pm

btw some of it is wrong remove bits that say stuff that makes sense and dosn't have // infront of it

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by nate601 Wed Nov 02, 2011 2:47 am

Am I missing something? On my Containergrinder.java it gives me an error that Slotgrinder cannot be resolved to a type. I may need a fast reply as a pre-release for my mod needs to be distributed to my beta testing friends soon. Thanks in advance!

nate601
Member

Posts : 3
Join date : 2011-11-02

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by lcass Wed Nov 02, 2011 5:06 pm

Oooh yes sorry bout that I forgot that class I will post up the code when I get homewaiting for the bus home from school now Very Happy

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by lcass Wed Nov 02, 2011 5:15 pm

One thing could you please not use grinder as what your block is called you can keep the strings and floats as that but the block name and the gui name should be diffrent

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by nate601 Thu Nov 03, 2011 1:17 am

I know I was just posting what it would be if I used the code for simplicity.
Plus. Mine wont be for what grinding is in your mod! I'm original! Really! Wink

nate601
Member

Posts : 3
Join date : 2011-11-02

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by lcass Thu Nov 03, 2011 9:49 am

Lol ok then I will fix it up then

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by nate601 Fri Nov 04, 2011 9:31 pm

Still don't see it...

nate601
Member

Posts : 3
Join date : 2011-11-02

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by lcass Fri Nov 04, 2011 9:45 pm

yep doing it right now

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by lcass Fri Nov 04, 2011 10:09 pm

ok up

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by lcass Thu Nov 10, 2011 12:53 am

Anyone have an idea on how to add new slots in the gui

lcass
Member

Posts : 145
Join date : 2011-10-24
Location : england

https://www.youtube.com/user/thealcasgroup

Back to top Go down

How to make a new block that has a gui simply  Empty Re: How to make a new block that has a gui simply

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum