I've decided to give it a shot and put out my own set of tutorials on how to get started modding with 1.7.2. All of the videos are hosted on Youtube, but for the sake of convenience, I'd ask that you post your questions here rather than comment on the video.
Don't hesitate to let me know if you have any special requests or if I need some correction on the content.As a general warning, I wanted the series to be pretty fun and relaxed; so much so that there may be a bit of profanity here and there. Ya can't code without cursin'!
Hey, great tutorials, I've gone through 24 of them in 2 days. I'm a bit stuck with the furnace though. I've tried looking through the videos to see if I've missed a bit of code but I can't seem to find it. The crash I'm having says
net.codecraft.mod.gui.GuiCodeOven cannot be cast to net.minecraft.inventory.Container
at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241)
at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75)
at net.codecraft.mod.blocks.CodeOven.onBlockActivated(CodeOven.java:96)
at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:405)
at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:588)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:232)
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:716)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:604)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:742)
If you know what that is off the top of your head that would be great, if you need other parts of my code I'll post it. Thanks in advance for any help.
Hey, great tutorials, I've gone through 24 of them in 2 days. I'm a bit stuck with the furnace though. I've tried looking through the videos to see if I've missed a bit of code but I can't seem to find it. The crash I'm having says
net.codecraft.mod.gui.GuiCodeOven cannot be cast to net.minecraft.inventory.Container
at cpw.mods.fml.common.network.NetworkRegistry.getRemoteGuiContainer(NetworkRegistry.java:241)
at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:75)
at net.codecraft.mod.blocks.CodeOven.onBlockActivated(CodeOven.java:96)
at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:405)
at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:588)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74)
at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122)
at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:232)
at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182)
at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:716)
at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:604)
at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:482)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:742)
If you know what that is off the top of your head that would be great, if you need other parts of my code I'll post it. Thanks in advance for any help.
Can you link me in the code from your container and block class? And which episode of the furnace are you on; just so I can place where you should be in the series.
This is a great tutorial, do you accept requests for tutorials by the way?Ifyou do, you could make a tutorial on:
how to create an dimension,
alter villagers and villages (new buildings, trades and villegers),
structure spawning (like in the Ruins Mod)
Armor with potion effects when on,
custom Potion effects,
custom enchantments
alter vanilla code (new drops to sth, ...)
custom biomes,
detailed mobs ( example: a walking chest OF DOOM (wtf) which opens an chest inventory when right clicked with health showing, fights mobs and can be upgraded with items moving in upgrade slots) (other example: battle turrents)
custom guns (/bows)
custom arrows
I think when you are done with basic modding that every mod does, you could start thinking about the more.. crazy stuff like I said with a chest mod for example
These are all great suggestions!
If this helps, here is what I have planned for the next month or two:
Custom Biomes, Dimensions.
Custom Entities (Neutral, Hostile, Interactive Mobs, Companion Pets)
Custom Structures and additions to Vanilla Villages (like Bees or Tinker's Construct)
Custom Weaponry
I've added your items to my list and I hope I can get most of them covered. Thanks for the suggestions! It keeps my creative gears turning!
Rollback Post to RevisionRollBack
If someone helps you out, don't hesitate to hit the green button to give them some props.
Can you link me in the code from your container and block class? And which episode of the furnace are you on; just so I can place where you should be in the series.
Seriously, my fingers just don't want to get that one right. That and compound....
In this bit right here:
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
TileEntity entity = world.getTileEntity(x, y, z);
if(entity != null){
switch(ID){
case Codecraft.guiIDCodeOven:
if(entity instanceof TileEntityCodeOven){
return new ContainerCodeOven(player.inventory, (TileEntityCodeOven) entity);
}
return null;
}
}
return null;
}
public Object getServerGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
TileEntity entity = world.getTileEntity(x, y, z);
if(entity != null){
switch(ID){
case Codecraft.guiIDCodeOven:
if(entity instanceof TileEntityCodeOven){
return new GuiCodeOven(player.inventory, (TileEntityCodeOven) entity);
}
return null;
}
}
return null;
}
...you have you container and gui classes flip flopped. Under getServerGuiElement we return a new Container. In the client bit, we return a new Gui. Try that out and let me know how it works for ya!
Seriously, my fingers just don't want to get that one right. That and compound....
...you have you container and gui classes flip flopped. Under getServerGuiElement we return a new Container. In the client bit, we return a new Gui. Try that out and let me know how it works for ya!
That did it. Thank you so much! Now, on to custom rendered blocks!
I am really confused all of a sudden. Maybe you can help?
I have a custom itemSword that I've told to play a sound on item swing. It was all working just fine. I then spent a few days following your furnace tutorials to make my own furnace-like block. Upon finally getting that mostly figured out, I ran a simulation and found that my sounds stopped working. The console shows "unable to play unknown soundevent [my-modid]:[sound-name]"
Any idea what could have gone wrong? Or more importantly, what I can do to fix it?
EDIT: The only other thing I did was refactor/rename two of my four sounds files, but even if that did break those, the other two should be still working, right?
EDIT 2: Well, for whatever reason, changing the filenames back to their original names in both the code and on the file itself seemed to fix it, so, I guess I'll just keep the old filenames...
I am really confused all of a sudden. Maybe you can help?
I have a custom itemSword that I've told to play a sound on item swing. It was all working just fine. I then spent a few days following your furnace tutorials to make my own furnace-like block. Upon finally getting that mostly figured out, I ran a simulation and found that my sounds stopped working. The console shows "unable to play unknown soundevent [my-modid]:[sound-name]"
Any idea what could have gone wrong? Or more importantly, what I can do to fix it?
EDIT: The only other thing I did was refactor/rename two of my four sounds files, but even if that did break those, the other two should be still working, right?
EDIT 2: Well, for whatever reason, changing the filenames back to their original names in both the code and on the file itself seemed to fix it, so, I guess I'll just keep the old filenames...
I know that this is after the fact, but the only thing I could think is to make sure that the sounds still match what is in your sounds.json file but it sounds like you already did that. Not sure, but I am glad to hear that it all worked out in the end!
Rollback Post to RevisionRollBack
If someone helps you out, don't hesitate to hit the green button to give them some props.
Don't hesitate to let me know if you have any special requests or if I need some correction on the content.As a general warning, I wanted the series to be pretty fun and relaxed; so much so that there may be a bit of profanity here and there. Ya can't code without cursin'!
-Neale
#1 - Setup and Main Mod Class
#2 - Items
#3 - Blocks
#4 - Names and CreativeTabs!
#5 - Recipes and Smelting
#6 - Block Cleanup and WorldGen
#7 - Mo' Recipes
#8 - FuelHandler
#9 - Durable Items
#10 - Tools
#11 - Mo' Blocks
#12 - More Texturing
#13 - Custom Furnace Videos (Complete)
Video 1
[media][/media]
Video 2
[media][/media]
Video 3
[media][/media]
Video 4
[media][/media]
Video 5
[media][/media]
Video 6
[media][/media]
Video 7
[media][/media]
Video 8
[media][/media]
Video 9
[media][/media]
Video 10
[media][/media]
Video 11
[media][/media]
Video 12
[media][/media]
#14 - Custom Rendered Block
#15 - Updating Forge
#16 - Removing and Replacing Vanilla Recipes
#17 - Custom Mobs
Part 1:
[media][/media]
Part 2:
[media][/media]
Part 3:
[media][/media]
#19 - Custom Sounds
#20 - Custom Crafting Table based on code from microjunk's tutorial
Part 1:
[media][/media]
Part 2:
[media][/media]
Part 3:
[media][/media]
Part 4:
[media][/media]
Part 5:
[media][media]
#21 - Furnace Bug Fixes
#22 - Mod Release Fix
#23 - Armor with Enchantments
Part 1:
[media][/media]
Part 2:
[media][media]
Part 3:
[media][/media]
#24 - Nether Ore Gen
#25 - Food and Potion Effects
#26 - Custom Lamps
#27 - Block Metadata
If you know what that is off the top of your head that would be great, if you need other parts of my code I'll post it. Thanks in advance for any help.
Can you link me in the code from your container and block class? And which episode of the furnace are you on; just so I can place where you should be in the series.
These are all great suggestions!
If this helps, here is what I have planned for the next month or two:
Custom Biomes, Dimensions.
Custom Entities (Neutral, Hostile, Interactive Mobs, Companion Pets)
Custom Structures and additions to Vanilla Villages (like Bees or Tinker's Construct)
Custom Weaponry
I've added your items to my list and I hope I can get most of them covered. Thanks for the suggestions! It keeps my creative gears turning!
Here is the container: http://pastebin.com/0CqKZZ7x
Here is the block: http://pastebin.com/ZCdB7PBW
I've made it through the 11th video on the furnace.
Thanks for helping!
I'm a goof. I also need your GuiHandler and the GuiClass. Sorry 'bout that!
No need to say sorry, from the way you spell "public" I would expect a goof every now and then , here is the gui class: http://pastebin.com/0XtX9Ped
and the handler: http://pastebin.com/rCzi83pp
Seriously, my fingers just don't want to get that one right. That and compound....
In this bit right here:
...you have you container and gui classes flip flopped. Under getServerGuiElement we return a new Container. In the client bit, we return a new Gui. Try that out and let me know how it works for ya!
That did it. Thank you so much! Now, on to custom rendered blocks!
I have a custom itemSword that I've told to play a sound on item swing. It was all working just fine. I then spent a few days following your furnace tutorials to make my own furnace-like block. Upon finally getting that mostly figured out, I ran a simulation and found that my sounds stopped working. The console shows "unable to play unknown soundevent [my-modid]:[sound-name]"
Any idea what could have gone wrong? Or more importantly, what I can do to fix it?
EDIT: The only other thing I did was refactor/rename two of my four sounds files, but even if that did break those, the other two should be still working, right?
EDIT 2: Well, for whatever reason, changing the filenames back to their original names in both the code and on the file itself seemed to fix it, so, I guess I'll just keep the old filenames...
I know that this is after the fact, but the only thing I could think is to make sure that the sounds still match what is in your sounds.json file but it sounds like you already did that. Not sure, but I am glad to hear that it all worked out in the end!