Unless someone can help with setting up a free and decent website for me to use as a medium, such as wiki, weebly or other, tutorials maybe moving to pastebin. I am having a time getting all tut on one post, keep getting log errors. If ANYONE can help with suggestions or setup that would be great....
I know you replace Trees with your mods base file but i cannot get it to work so every time i right click on my block it crashes. Any help?
Thanks for that, made me realize I forgot a step. In the mod class when you define your block it should look like this
smithsBench = new BlockSmithsBench(188, 1).setHardness(2.5F).setStepSound(Block.soundWoodFootstep).setBlockName("Smiths Bench");
notice the 1 after the block id, it is a reference to the gui id. If you change both of those to a 0, and in the handler comment out the case 1 reference you should be fine. This is going to be a continuing tutorial for most of the gui blocks, coming soon is an enchantment table and a chest....
Thanks for that, made me realize I forgot a step. In the mod class when you define your block it should look like this
smithsBench = new BlockSmithsBench(188, 1).setHardness(2.5F).setStepSound(Block.soundWoodFootstep).setBlockName("Smiths Bench");
notice the 1 after the block id, it is a reference to the gui id. If you change both of those to a 0, and in the handler comment out the case 1 reference you should be fine. This is going to be a continuing tutorial for most of the gui blocks, coming soon is an enchantment table and a chest....
You said that we should add a 1 after the blockID, however par2 of the block constructor is a boolean, as stated in the tutorial.
Can you clarify?
You said that we should add a 1 after the blockID, however par2 of the block constructor is a boolean, as stated in the tutorial.
Can you clarify?
public BlockSmithsBench(int par1, int par2)
{
super(par1, par2, Material.wood);
blockIndexInTexture = 59;
this.setCreativeTab(Trees.tabTreeThings);
}
looks like an integer to me
public BlockSmithsBench(int par1, int par2)
{
super(par1, par2, Material.wood);
blockIndexInTexture = 59;
this.setCreativeTab(Trees.tabTreeThings);
}
looks like an integer to me
Oh, furnace tutorial doesn't appear to be updated like that. Guess i never bothered to look into the crafting table tutorial. My bad...
if your doing the furnace the only boolean i know of in the block constructor is the boolean to update the blocks state from idle to active otherwise if your doing the bench par2 is most likely your texture
Well, I'm not using the Crafting Table, but i have two furnaces. The other guys solution didn't seem to work for me, and I can't figure out a way to make it work. My other furnace crashes the game when i click it, and the new one won't open its GUI. I'm hopeless...
nah not hopeless, if your getting the crash i think you are when clicking on the second furnace, its in your tile entity file, you need to find any reference to the vanilla furnace and replace it with your almost certain your crash is something along the line of TileYouTile cannot be cast to TileFurnace?
Yeah, thats the error. I realized that when i copied the block constructor from my previous furnace i forgot to change the constructor of the active block to the new block. Derp. However i still cannot open the GUIs on either furnace.
package Oremod;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import cpw.mods.fml.common.network.IGuiHandler;
public class GuiHandlerInfuser implements IGuiHandler
{
@Override
public Object getServerGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity tile_entity = world.getBlockTileEntity(x, y, z);
if(tile_entity instanceof TileEntityInfuser)
{
return new ContainerInfuser(player.inventory, (TileEntityInfuser) tile_entity);
}
return null;
}
@Override
public Object getClientGuiElement(int id, EntityPlayer player, World world, int x, int y, int z)
{
TileEntity tile_entity = world.getBlockTileEntity(x, y, z);
if(tile_entity instanceof TileEntityInfuser)
{
return new GuiInfuser(player.inventory, (TileEntityInfuser) tile_entity);
}
return null;
}
}
My other furnace(new one) is basically just copy-pasted with names corrected for it.
Find out how I generate....coolAlias...world structure generation and rotation tool...
Thanks, glad I could help, I am also working on an anvil, a chest and an enchantment table....
Find out how I generate....coolAlias...world structure generation and rotation tool...
Find out how I generate....coolAlias...world structure generation and rotation tool...
I know you replace Trees with your mods base file but i cannot get it to work so every time i right click on my block it crashes. Any help?
Thanks for that, made me realize I forgot a step. In the mod class when you define your block it should look like this
notice the 1 after the block id, it is a reference to the gui id. If you change both of those to a 0, and in the handler comment out the case 1 reference you should be fine. This is going to be a continuing tutorial for most of the gui blocks, coming soon is an enchantment table and a chest....
Find out how I generate....coolAlias...world structure generation and rotation tool...
You said that we should add a 1 after the blockID, however par2 of the block constructor is a boolean, as stated in the tutorial.
Can you clarify?
public BlockSmithsBench(int par1, int par2)
{
super(par1, par2, Material.wood);
blockIndexInTexture = 59;
this.setCreativeTab(Trees.tabTreeThings);
}
looks like an integer to me
Oh, furnace tutorial doesn't appear to be updated like that. Guess i never bothered to look into the crafting table tutorial. My bad...
My other furnace(new one) is basically just copy-pasted with names corrected for it.
If that's what you're looking for, then yup!
Ill work at it myself a little longer, if i cant get it ill PM you my skype ok