I'm making my first foray into Minecraft modding on Ubuntu using Minecraft Forge. I'm finding it a little hard to get started as many of the tutorials seem to refer to older versions of Minecraft (e.g. that use the BaseMod base class, which now appears to be deprecated).
I've created a simple block type:
package net.minecraft.block;
import net.minecraft.block.*;
import net.minecraft.block.material.*;
public class RolyBlock extends Block {
public RolyBlock(int par1, Material par2Material) {
super(par1, par2Material);
}
}
and added the following static initialiser to the Block class:
public static final Block rolyBlock = new RolyBlock(174, Material.rock)
.setHardness(1.5F)
.setResistance(10)
.setStepSound(soundStoneFootstep)
.setUnlocalizedName("rolyBlock")
.setCreativeTab(CreativeTabs.tabBlock)
.setTextureName("roly_block");
I created a 256x256 PNG file called roly_block
and placed it in Forge's MCP folder, in the same location as the other textures. However, when I start Minecraft (v. 1.6.5) via Eclipse, it is unable to locate the texture:
2014-03-14 11:38:34 [SEVERE] [Minecraft-Client] Using missing texture,
unable to load: minecraft:textures/blocks/roly_block.png
I suspect this is because I put the texture in the directory
forge/mcp/temp/src/minecraft/assets/minecraft/textures
(where I found the other textures) where this temp
folder is presumably a decompiled version of the Minecraft 1.6.5 .jar file. I can't actually remember how I ended up with this folder, though.
My question is: how do I add a new texture to my Eclipse mod development environment? Must I rebuild a .jar each time, and if so how? Or can I have Minecraft load textures from a directory?
(I'm a complete Minecraft newbie, so there are many things about the configuration/dev environment for Minecraft that are confusing me. For example if I run recompile.py from Forge's MCP folder, I get a swathe of errors relating to IconRegister
not being found.)