Hoping you can help me Asyncronous (Spelled it right at the first glace :D), first off great tut. Thank you sooo very much.
Nextly, I have finishing setting up my gui, tile, and all that good stuff and now working on the final. Click this button to turn what is in my (GuiCustom.java) this.inventorySlots.getslot(0), into a new ItemStack.
I have used this piece of code to work the "magic", which works great However.... Once I drag the Itemstack out of my Slot(0), it turns back into the first placed itemstack T_T. Not sure how to fix this, or rather what to do to save my new Itemstack in slot(0).
//On Button Click
public void actionPerformed(GuiButton button)
{
int inBoxStackSize = this.inventorySlots.getSlot(0).getStack().stackSize;
int soulCostTotal = this.SARL[1] * this.inventorySlots.getSlot(0).getStack().stackSize;
int soulCountTotal = BlockSoulAltar.soulCountTotal;
if (soulCostTotal <= soulCountTotal)
{
switch(button.id)
{
case 0:
{
break;
}
case 1: //Livingmetal
{
ItemStack happy = new ItemStack(mod_HarkenScythe.HSLivingmetalIngot, inBoxStackSize);
this.inventorySlots.getSlot(0).putStack(happy);
//this.inventorySlots.getSlot(0).onSlotChanged();
System.out.println("Livingmetal GO!");
//this.inventorySlots.getSlot(0).putStack(new ItemStack(mod_HarkenScythe.HSLivingmetalIngot, inBoxStackSize));
;
break;
}
case 2: //Soul Food Cake
{
System.out.println("Soul Food Cake GO!");
break;
}
default:
}
return;
}
System.out.println("Not Enough Souls");
}
Hoping you can help me Asyncronous (Spelled it right at the first glace ), first off great tut. Thank you sooo very much.
Nextly, I have finishing setting up my gui, tile, and all that good stuff and now working on the final. Click this button to turn what is in my (GuiCustom.java) this.inventorySlots.getslot(0), into a new ItemStack.
I have used this piece of code to work the "magic", which works great However.... Once I drag the Itemstack out of my Slot(0), it turns back into the first placed itemstack T_T. Not sure how to fix this, or rather what to do to save my new Itemstack in slot(0).
//On Button Click
public void actionPerformed(GuiButton button)
{
int inBoxStackSize = this.inventorySlots.getSlot(0).getStack().stackSize;
int soulCostTotal = this.SARL[1] * this.inventorySlots.getSlot(0).getStack().stackSize;
int soulCountTotal = BlockSoulAltar.soulCountTotal;
if (soulCostTotal <= soulCountTotal)
{
switch(button.id)
{
case 0:
{
break;
}
case 1: //Livingmetal
{
ItemStack happy = new ItemStack(mod_HarkenScythe.HSLivingmetalIngot, inBoxStackSize);
this.inventorySlots.getSlot(0).putStack(happy);
//this.inventorySlots.getSlot(0).onSlotChanged();
System.out.println("Livingmetal GO!");
//this.inventorySlots.getSlot(0).putStack(new ItemStack(mod_HarkenScythe.HSLivingmetalIngot, inBoxStackSize));
;
break;
}
case 2: //Soul Food Cake
{
System.out.println("Soul Food Cake GO!");
break;
}
default:
}
return;
}
System.out.println("Not Enough Souls");
}
Ummm... I think putStack() is the wrong way to do that. I could be wrong, because I'm not totally sure. Also, what does the rest of your code look like? It could have something to do with your Slots.
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.
yes sir, do you happen to know any tutorials to make the furnace work adding recipes and fuels and such? and not blaueseichoerns? His is so messy and not very well understandable. Which by the way, Compliments to Leah, this tutorial is perfect to understand and follow =o)
yes sir, do you happen to know any tutorials to make the furnace work adding recipes and fuels and such? and not blaueseichoerns? His is so messy and not very well understandable. Which by the way, Compliments to Leah, this tutorial is perfect to understand and follow =o)
Try here. He's got a basic "furnace" and one that makes tow outputs if you are interested. His tutorial is for ModLoader, though.
@Jade Knightblazer:
I think you may need to have a clientPacketHandler and a serverPacketHandler for your NetworkMod. Also, these:
public int field_74214_o;
public float field_74213_p;
public float field_74212_q;
public float field_74211_r;
public float field_74210_s;
public float field_74209_t;
public float field_74208_u;
ItemStack field_74207_v;
hurt my soul.
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.
nah, those won't hurt your soul. They are just a copy and paste of EnchantmentTable coding for animation book effect.
As for the furnace, I have checked into those already. Mainly because it uses a crafting recipe method for furnaces and work benches. I created my own for the my SoulAltar much like Enchantment Table have their own.
Meh over all, I simply can't get my packets to update what is needed to be updated @_@.
Try here. He's got a basic "furnace" and one that makes tow outputs if you are interested. His tutorial is for ModLoader, though.
Thanks, that was a good suggestion, I learned a lot, however, his multiple output doesn't help me at all cause I need multiple Input. He says it's the same but reversed, doesn't make sense, and doesn't quite explain what needs to be changed to make it input.
Here's the source for the mod I'm working on. It has a multiple-input and a multiple-output one You'll want to look at the TileEntity classes and EnigmaRecipes mostly
Actually, I'll post it in a few minutes when I get home For some reason, my phone won't let me paste the link lol
EDIT: It is done
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.
Here's the source for the mod I'm working on. It has a multiple-input and a multiple-output one You'll want to look at the TileEntity classes and EnigmaRecipes mostly
Actually, I'll post it in a few minutes when I get home For some reason, my phone won't let me paste the link lol
The Meaning of Life, the Universe, and Everything.
Join Date:
10/5/2012
Posts:
473
Minecraft:
Black_Hole
Member Details
First I would like to thank you for making this tutorial, it was very helpful and your comments clearly explained most of the code. I am trying to make a sort of furnace for alloying different metals (my own copper and tin into bronze for example) and I am having some trouble with the Tile Entity. I am aware that at the top of your post you mention that the tutorial is made for people who already have a good understanding of blocks and tile entities, but I'm afraid I could not find much information on tile entities besides yours. Currently, my "Alloy Smelter" correctly places itself in the world facing the player using code shamelessly borrowed from Mojang's own Furnace, and the tile entity seems to be correctly placed and functioning. I am using the block metadata to store multiple blocks on the same ID, as Forge intends, and the information on furnace facing direction is stored by the tile entity. When fuel is placed int the alloy furnace it burns correctly and everything is fine, but when I leave the world and load it again, I have problems. Using a series of "System.out.println()"s, I have determined that the tile entity appears to be saving the information correctly and loading it correctly too. Under the getBlockTexture function of the block file it uses the IBlockAccess object to access the tile, and I've tested it to be " != null" and the correct class, and yet when the block attempts to use the tile's information it is always the defaults. The int "direction" always returns 0, and the tileSmelter.blockMetadata returns -1. However, with more testing I have determined that when I put fuel in the furnace, it disappears, though the GUI does not display the burning animation that worked before. With the "System.out.println()"s I have found that the tile seems to have received the information from the GUI about the added fuel and it burns it correctly, but neither the GUI nor the block appear to be able to get any information from the tile.
Thank you very much ahead of time for any help you can provide. I can of course post code if you request it.
wow thank you to drinfernoo for helping everyone, to you, I will be doing my first forge tutorial on armor and GUI look for them sometime tonight/today given the timezone, they are complete
Nextly, I have finishing setting up my gui, tile, and all that good stuff and now working on the final. Click this button to turn what is in my (GuiCustom.java) this.inventorySlots.getslot(0), into a new ItemStack.
I have used this piece of code to work the "magic", which works great However.... Once I drag the Itemstack out of my Slot(0), it turns back into the first placed itemstack T_T. Not sure how to fix this, or rather what to do to save my new Itemstack in slot(0).
Ummm... I think putStack() is the wrong way to do that. I could be wrong, because I'm not totally sure. Also, what does the rest of your code look like? It could have something to do with your Slots.
This is my bindPlayerInventory method:
Nevermind, silly little typo in the GuiTutorial.java file, had y = (height = ySize) / 2 instead of height - ySize
Try here. He's got a basic "furnace" and one that makes tow outputs if you are interested. His tutorial is for ModLoader, though.
@Jade Knightblazer:
I think you may need to have a clientPacketHandler and a serverPacketHandler for your NetworkMod. Also, these:
hurt my soul.
As for the furnace, I have checked into those already. Mainly because it uses a crafting recipe method for furnaces and work benches. I created my own for the my SoulAltar much like Enchantment Table have their own.
Meh over all, I simply can't get my packets to update what is needed to be updated @_@.
But i'll take a deeper look.
Thanks, that was a good suggestion, I learned a lot, however, his multiple output doesn't help me at all cause I need multiple Input. He says it's the same but reversed, doesn't make sense, and doesn't quite explain what needs to be changed to make it input.
Actually, I'll post it in a few minutes when I get home For some reason, my phone won't let me paste the link lol
EDIT: It is done
Ok, thank you very much =o)
EDIT: Page 8!!!
EDIT: Nevermind, based on the images it looks like Breakdown is 1 input 2 outputs, and Combiner is 2 inputs with 1 output.
[ForgeModLoader] A critical server error occured handling a packet, kicking net.minecraft.src.NetServerHandler@1d0564c
EDIT: I checked your ClientPacketHandler and your ServerPacketHandler, and they're all the same.
Thank you very much ahead of time for any help you can provide. I can of course post code if you request it.
That was from trying to open the block 3 times without closing the client.
Loaded in eclipse or as a mod?