Could you please make a tutorial on how to make a block like a furnace with a gui except it does something else like extract gems from an ore when you put the ore in?
Alright, so I love the tutorials so far. However, I have a question AND 2 requests.
My question is- in the cables tutorial, you say we have to edit the Block class. Are you talking about the block class that we make for our block, or the block class that comes with vanilla minecraft?
Second- I am trying to create a throwable weapon. I have succeeded in every way except for 1 thing. I can't get the item to render after it leaves my hand! It still travels like normal (imagine a snowball) but is completely invisible. How do I get it to render?
And the second request- How would I make an item that allows you to place blocks? Not like your tutorial, not quite. I mean a ring or something of that manner that places infinite dirt blocks. even better, how would I make it have a set durability like a sword?
Very thank for your tutorial!
All works fine, but i have one problem - crash client in part rotate...
Code
package net.minecraft.src;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
public class TileEntityTryzubRenderer extends TileEntitySpecialRenderer
{
public TileEntityTryzubRenderer()
{
model = new ModelTryzub();
}
public void renderAModelAt(TileEntityTryzub tile, double d, double d1, double d2, float f)
{
int i = tile.getBlockMetadata();
int j = 0;
if (i == 0)
{
j = 0;
}
if (i == 1)
{
j = 90;
}
if (i == 2)
{
j = 180;
}
if (i == 3)
{
j = 270;
}
bindTextureByName("/textures/items/tryzubtexture.png"); //texture
GL11.glPushMatrix(); //start
GL11.glTranslatef((float)d + 0.5F, (float)d1 + 1.5F, (float)d2 + 0.5F); //size
GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F);
GL11.glRotatef(j, 0.0F, 1.0F, 0.0F); //rotate based on metadata
GL11.glPushMatrix();
model.renderModel(0.0625F);
GL11.glPopMatrix();
GL11.glPopMatrix();
}
public void renderTileEntityAt(TileEntity tileentity, double d, double d1, double d2, float f)
{
renderAModelAt((TileEntityTryzub) tileentity, d, d1, d2, f); //where to render
int i = 0;
if (tileentity.worldObj != null)
{
i = tileentity.getBlockMetadata();
}
}
private ModelTryzub model;
}
Error
java.lang.NullPointerException
at aji.n(SourceFile:93)
at TileEntityTryzubRenderer.renderAModelAt(TileEntityTryzubRenderer.java:17)
at TileEntityTryzubRenderer.a(TileEntityTryzubRenderer.java:71)
at axs.a(SourceFile:100)
at mod_microUkr.renderInvBlock(mod_microUkr.java:144)
at ModLoader.renderInvBlock(ModLoader.java:1879)
at avg.a(RenderBlocks.java:6404)
at awh.a(RenderItem.java:217)
at awh.a(RenderItem.java:286)
at aqh.a(SourceFile:243)
at aqh.a(SourceFile:75)
at aqq.a(SourceFile:31)
at aqn.a(SourceFile:442)
at auw.b(SourceFile:706)
at EntityRendererProxy.b(EntityRendererProxy.java:20)
at net.minecraft.client.Minecraft.J(SourceFile:607)
at net.minecraft.client.Minecraft.run(SourceFile:535)
at java.lang.Thread.run(Unknown Source)
When I comment this part
int i = tile.getBlockMetadata();
int j = 0;
if (i == 0)
{
j = 0;
}
if (i == 1)
{
j = 90;
}
if (i == 2)
{
j = 180;
}
if (i == 3)
{
j = 270;
}
all works fine. When uncomment - I have error here
int i = tile.getBlockMetadata();
Best tutorial I've found after searching for nine hours. I'm having some problems though. My block is invisible (I've tried all the other fixes and have triple checked the coding, but I'm probally missing it somehow), but here's the funny thing. My block displays perfectly in the inventory screen (just not after being placed.)
I don't know how often you are checking this thread any more, but could you make a tutorial on how to make an item render as a 3 dimensional object while it is in your hand? If you look at the Portal Gun mod, the portal gun renders as a model, not a sprite, but it isn't a block, it's an item. Mybe the code for giving your tileEntity a model in the players inventory would work...
Rollback Post to RevisionRollBack
Another balmy summer evening. The city rolls these nights like loaded dice.
Hey My block is invisible. I know you've solved one of these problems before and I know it has something to do with its registry but it was for modloader and im not sure how to do it for forge. I know this is kind of a noobish problem but I have no experience with TileEntitys
public class ClientProxy extends CommonProxy{
@Override
public void registerRenderThings()
{
MinecraftForgeClient.preloadTexture("/monsterhunter/BBQSpit.png");
MinecraftForgeClient.preloadTexture("/monsterhunter/Witems.png");
MinecraftForgeClient.preloadTexture("/monsterhunter/mobs/fish.png");
MinecraftForgeClient.preloadTexture("/monsterhunter/mobs/felyne.png");
RenderingRegistry.registerEntityRenderingHandler(EntityFish.class, new
RenderFish(new ModelFish(), 0.2F));
RenderingRegistry.registerEntityRenderingHandler(EntityFelyne.class, new
RenderFelyne(new ModelFelyne(), 0.3F));
}
public void registerRenderers() {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBBQSpit.class, new TileEntityBBQSpitRenderer());
MinecraftForgeClient.registerItemRenderer(MonsterHunterCrafted.BBQSpit.blockID, new ItemBBQSpitRenderer());
@Mod(modid = "MonsterHunterCrafted", name = "Monster Hunter: Crafted", version = "0.0.1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class MonsterHunterCrafted {
@Instance("MonsterHunterCrafted") //The instance, this is very important later on
public static MonsterHunterCrafted instance = new MonsterHunterCrafted();
@SidedProxy(clientSide = "lordofepicness.monsterhunter.client.forge.ClientProxy", serverSide = "lordofepicness.monsterhunter.common.forge.CommonProxy")
public static CommonProxy proxy;
public static CreativeTabs tabMonsterHunter;
public static BiomeGenBase WyvernianVolcanoe;
public static Block portal;
public static Block Mush1;
public static Block Mush2;
public static Block Mush3;
public static Block BBQSpit;
public static Item MonsterCompendium;
public static Item metaArmorstones;
public static Item metaJewels;
public static Item metaMonsterbones;
public static Item FishFood1;
public static Item FishFood2;
public static Item FishFood3;
static int startEntityId = 300;
public static int Wyvernia= 20;
public static int portalID;
public static int Mush1ID;
public static int Mush2ID;
public static int Mush3ID;
public static int BBQSpitID;
public static int MonsterCompendiumID;
public static int metaArmorstonesID;
public static int metaJewelsID;
public static int metaMonsterbonesID;
public static int FishFood1ID;
public static int FishFood2ID;
public static int FishFood3ID;
public static int WyvernianVolcanoeID;
@PreInit
public void preInit(FMLPreInitializationEvent event) {
Configuration config = new Configuration(event.getSuggestedConfigurationFile());
public static int getUniqueEntityId()
{
do
{
startEntityId++;
}
while (EntityList.getStringFromID(startEntityId) != null);
return startEntityId;
}
public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor)
{
int id = getUniqueEntityId();
EntityList.IDtoClassMapping.put(id, entity);
EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
}
}
Hey My block is invisible. I know you've solved one of these problems before and I know it has something to do with its registry but it was for modloader and im not sure how to do it for forge. I know this is kind of a noobish problem but I have no experience with TileEntitys
public class ClientProxy extends CommonProxy{
@Override
public void registerRenderThings()
{
MinecraftForgeClient.preloadTexture("/monsterhunter/BBQSpit.png");
MinecraftForgeClient.preloadTexture("/monsterhunter/Witems.png");
MinecraftForgeClient.preloadTexture("/monsterhunter/mobs/fish.png");
MinecraftForgeClient.preloadTexture("/monsterhunter/mobs/felyne.png");
RenderingRegistry.registerEntityRenderingHandler(EntityFish.class, new
RenderFish(new ModelFish(), 0.2F));
RenderingRegistry.registerEntityRenderingHandler(EntityFelyne.class, new
RenderFelyne(new ModelFelyne(), 0.3F));
}
public void registerRenderers() {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBBQSpit.class, new TileEntityBBQSpitRenderer());
MinecraftForgeClient.registerItemRenderer(MonsterHunterCrafted.BBQSpit.blockID, new ItemBBQSpitRenderer());
@Mod(modid = "MonsterHunterCrafted", name = "Monster Hunter: Crafted", version = "0.0.1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class MonsterHunterCrafted {
@Instance("MonsterHunterCrafted") //The instance, this is very important later on
public static MonsterHunterCrafted instance = new MonsterHunterCrafted();
@SidedProxy(clientSide = "lordofepicness.monsterhunter.client.forge.ClientProxy", serverSide = "lordofepicness.monsterhunter.common.forge.CommonProxy")
public static CommonProxy proxy;
public static CreativeTabs tabMonsterHunter;
public static BiomeGenBase WyvernianVolcanoe;
public static Block portal;
public static Block Mush1;
public static Block Mush2;
public static Block Mush3;
public static Block BBQSpit;
public static Item MonsterCompendium;
public static Item metaArmorstones;
public static Item metaJewels;
public static Item metaMonsterbones;
public static Item FishFood1;
public static Item FishFood2;
public static Item FishFood3;
static int startEntityId = 300;
public static int Wyvernia= 20;
public static int portalID;
public static int Mush1ID;
public static int Mush2ID;
public static int Mush3ID;
public static int BBQSpitID;
public static int MonsterCompendiumID;
public static int metaArmorstonesID;
public static int metaJewelsID;
public static int metaMonsterbonesID;
public static int FishFood1ID;
public static int FishFood2ID;
public static int FishFood3ID;
public static int WyvernianVolcanoeID;
@PreInit
public void preInit(FMLPreInitializationEvent event) {
Configuration config = new Configuration(event.getSuggestedConfigurationFile());
public static int getUniqueEntityId()
{
do
{
startEntityId++;
}
while (EntityList.getStringFromID(startEntityId) != null);
return startEntityId;
}
public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor)
{
int id = getUniqueEntityId();
EntityList.IDtoClassMapping.put(id, entity);
EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
}
}
I was having the same problem when I first ran the code, I dont think it's up to date for 1.4.7.
I fixed it by
Make sure that in your Model class you have;
public void renderAll() {
Part1.render(0.0625F);
Part2.render(0.0625F);
}
Part1 and Part2 refer to the parts in your model
Say in Techne you made a square statue model that had a base and a square that sits on top of that base your model would have two parts.
Part1 would be the Base and Part2 would be the square.
You would replace the Part1 and Part2 with whatever you named your model parts in Techne, which can be done in the bottom right under "Model Tree".
The more parts you have in the Model Tree in Techne the more PartName.render(0.0625F); you need to add here
If you followed the tutoral or just copied and paste, you need to make changes in his model class.
Wherever you see he has put the words Base, Head2, Keyboard, Head1, Head3 Stand1, Stand2, and Till.
That is his model parts names, you would change that to your model part names and delete the ones not needed or add if you have more parts in your model.
and in your TileEntity class you have in the renderAModelAt method;
model.renderAll();
Also in the same method (renderAModleAt) you have;
bindTextureByName("Your Texture .PNG Here")
An easy way to get the texture PNG is in Techne make sure for each part in the model you move the texture offset so in the top right there not overlapping, then go to file and export texture map and then use that texture map in photoshop or the editor program of your choice to give it a texture then move that .png into your mod package and add the location to the bindTextureByName field.
I was having the same problem when I first ran the code, I dont think it's up to date for 1.4.7.
I fixed it by
Make sure that in your Model class you have;
public void renderAll() {
Part1.render(0.0625F);
Part2.render(0.0625F);
}
Part1 and Part2 refer to the parts in your model
Say in Techne you made a square statue model that had a base and a square that sits on top of that base your model would have two parts.
Part1 would be the Base and Part2 would be the square.
You would replace the Part1 and Part2 with whatever you named your model parts in Techne, which can be done in the bottom right under "Model Tree".
The more parts you have in the Model Tree in Techne the more PartName.render(0.0625F); you need to add here
If you followed the tutoral or just copied and paste, you need to make changes in his model class.
Wherever you see he has put the words Base, Head2, Keyboard, Head1, Head3 Stand1, Stand2, and Till.
That is his model parts names, you would change that to your model part names and delete the ones not needed or add if you have more parts in your model.
and in your TileEntity class you have in the renderAModelAt method;
model.renderAll();
Also in the same method (renderAModleAt) you have;
bindTextureByName("Your Texture .PNG Here")
An easy way to get the texture PNG is in Techne make sure for each part in the model you move the texture offset so in the top right there not overlapping, then go to file and export texture map and then use that texture map in photoshop or the editor program of your choice to give it a texture then move that .png into your mod package and add the location to the bindTextureByName field.
On my best guess that it isn't because i tried this in 1.3.1 and the block did not show up in the world but the lighting effect i gave it, did
Other than that, not a bad tutorial, haven't tried it in 1.3.x yet
My question is- in the cables tutorial, you say we have to edit the Block class. Are you talking about the block class that we make for our block, or the block class that comes with vanilla minecraft?
Second- I am trying to create a throwable weapon. I have succeeded in every way except for 1 thing. I can't get the item to render after it leaves my hand! It still travels like normal (imagine a snowball) but is completely invisible. How do I get it to render?
And the second request- How would I make an item that allows you to place blocks? Not like your tutorial, not quite. I mean a ring or something of that manner that places infinite dirt blocks. even better, how would I make it have a set durability like a sword?
Thank you so much in advance!
http://www.youtube.com/user/006ruler
All works fine, but i have one problem - crash client in part rotate...
Code
Error
When I comment this part
int i = tile.getBlockMetadata();
int j = 0;
if (i == 0)
{
j = 0;
}
if (i == 1)
{
j = 90;
}
if (i == 2)
{
j = 180;
}
if (i == 3)
{
j = 270;
}
all works fine. When uncomment - I have error here
int i = tile.getBlockMetadata();
Can you help me?
Sorry for my english.
All fine. I decide this!!!!
Edit: Found the problem.
I eat creepers for breakfast, lunch, dinner and I have it bacon style!
My Website. I make mods for Minecraft and am also making my own game.
here is my client proxy
import lordofepicness.monsterhunter.MonsterHunterCrafted;
import lordofepicness.monsterhunter.client.model.ModelFelyne;
import lordofepicness.monsterhunter.client.model.ModelFish;
import lordofepicness.monsterhunter.client.render.RenderFelyne;
import lordofepicness.monsterhunter.client.render.RenderFish;
import lordofepicness.monsterhunter.common.blocks.renderer.TileEntityBBQSpitRenderer;
import lordofepicness.monsterhunter.common.entity.EntityFelyne;
import lordofepicness.monsterhunter.common.entity.EntityFish;
import lordofepicness.monsterhunter.common.forge.CommonProxy;
import lordofepicness.monsterhunter.common.items.renderer.ItemBBQSpitRenderer;
import lordofepicness.monsterhunter.common.tileentity.TileEntityBBQSpit;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
public class ClientProxy extends CommonProxy{
@Override
public void registerRenderThings()
{
MinecraftForgeClient.preloadTexture("/monsterhunter/BBQSpit.png");
MinecraftForgeClient.preloadTexture("/monsterhunter/Witems.png");
MinecraftForgeClient.preloadTexture("/monsterhunter/mobs/fish.png");
MinecraftForgeClient.preloadTexture("/monsterhunter/mobs/felyne.png");
RenderingRegistry.registerEntityRenderingHandler(EntityFish.class, new
RenderFish(new ModelFish(), 0.2F));
RenderingRegistry.registerEntityRenderingHandler(EntityFelyne.class, new
RenderFelyne(new ModelFelyne(), 0.3F));
}
public void registerRenderers() {
ClientRegistry.bindTileEntitySpecialRenderer(TileEntityBBQSpit.class, new TileEntityBBQSpitRenderer());
MinecraftForgeClient.registerItemRenderer(MonsterHunterCrafted.BBQSpit.blockID, new ItemBBQSpitRenderer());
}
}
and my Main Class
import lordofepicness.monsterhunter.common.biomes.MBiomeVolcanoe;
import lordofepicness.monsterhunter.common.blocks.BlockBBQSpit;
import lordofepicness.monsterhunter.common.blocks.BlockMushrooms;
import lordofepicness.monsterhunter.common.blocks.BlockPortalWyvernia;
import lordofepicness.monsterhunter.common.entity.EntityFelyne;
import lordofepicness.monsterhunter.common.entity.EntityFish;
import lordofepicness.monsterhunter.common.forge.CommonProxy;
import lordofepicness.monsterhunter.common.items.ItemGastronomeTuna;
import lordofepicness.monsterhunter.common.items.ItemGluttonTuna;
import lordofepicness.monsterhunter.common.items.ItemMetaArmors;
import lordofepicness.monsterhunter.common.items.ItemMetaBones;
import lordofepicness.monsterhunter.common.items.ItemMetaJewel;
import lordofepicness.monsterhunter.common.items.ItemMonsterCompendium;
import lordofepicness.monsterhunter.common.items.ItemSushifish;
import lordofepicness.monsterhunter.common.tabs.TabMonsterHunter;
import lordofepicness.monsterhunter.common.tileentity.TileEntityBBQSpit;
import lordofepicness.monsterhunter.common.wyvernia.WorldProviderWyvernia;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityEggInfo;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.DimensionManager;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.Mod.Instance;
import cpw.mods.fml.common.Mod.PreInit;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
@Mod(modid = "MonsterHunterCrafted", name = "Monster Hunter: Crafted", version = "0.0.1")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class MonsterHunterCrafted {
@Instance("MonsterHunterCrafted") //The instance, this is very important later on
public static MonsterHunterCrafted instance = new MonsterHunterCrafted();
@SidedProxy(clientSide = "lordofepicness.monsterhunter.client.forge.ClientProxy", serverSide = "lordofepicness.monsterhunter.common.forge.CommonProxy")
public static CommonProxy proxy;
public static CreativeTabs tabMonsterHunter;
public static BiomeGenBase WyvernianVolcanoe;
public static Block portal;
public static Block Mush1;
public static Block Mush2;
public static Block Mush3;
public static Block BBQSpit;
public static Item MonsterCompendium;
public static Item metaArmorstones;
public static Item metaJewels;
public static Item metaMonsterbones;
public static Item FishFood1;
public static Item FishFood2;
public static Item FishFood3;
static int startEntityId = 300;
public static int Wyvernia= 20;
public static int portalID;
public static int Mush1ID;
public static int Mush2ID;
public static int Mush3ID;
public static int BBQSpitID;
public static int MonsterCompendiumID;
public static int metaArmorstonesID;
public static int metaJewelsID;
public static int metaMonsterbonesID;
public static int FishFood1ID;
public static int FishFood2ID;
public static int FishFood3ID;
public static int WyvernianVolcanoeID;
@PreInit
public void preInit(FMLPreInitializationEvent event) {
Configuration config = new Configuration(event.getSuggestedConfigurationFile());
config.load();
//:Block Configuration
portalID = config.getBlock("Portal Block", 2200).getInt();
Mush1ID = config.getBlock("Blue Mushroom", 2201).getInt();
Mush2ID = config.getBlock("Select Mushroom", 2202).getInt();
Mush3ID = config.getBlock("Special Mushroom", 2203).getInt();
BBQSpitID = config.getBlock("BBQ Spit", 2204).getInt();
//:Item Configuration
MonsterCompendiumID = config.getItem("Monster Compendium", 24300).getInt();
metaArmorstonesID = config.getItem("ArmorStones", 24301).getInt();
metaJewelsID = config.getItem("ArmorJewels", 24302).getInt();
metaMonsterbonesID = config.getItem("MonsterBones", 24303).getInt();
FishFood1ID = config.getItem("Sushifish", 24304).getInt();
FishFood2ID = config.getItem("Glutton Tuna", 24305).getInt();
FishFood3ID = config.getItem("Gastronome Tuna", 24306).getInt();
config.save();
}
@Init
public void load(FMLInitializationEvent event) {
proxy.registerRenderThings();
//: Tabs
tabMonsterHunter = new TabMonsterHunter(CreativeTabs.getNextID(),"Monster Hunter: Crafted");
portal = new BlockPortalWyvernia(2200, 207).setBlockName("portal");
GameRegistry.registerBlock(portal, "Portal");
LanguageRegistry.addName(portal, "Wyvernia Portal");
MonsterCompendium = new ItemMonsterCompendium(24300).setIconIndex(207).setItemName("Monster Compendium");
LanguageRegistry.addName(MonsterCompendium, "Monster Compendium");
//:Biomes
WyvernianVolcanoe = new MBiomeVolcanoe(53).setColor(2900485).setBiomeName("Volcanoe").setDisableRain().setTemperatureRainfall(1F, 0F).setMinMaxHeight(0.2F, 0.3F);
GameRegistry.addBiome(WyvernianVolcanoe);
//: Plants
Mush1 = new BlockMushrooms(2201, 48).setBlockName("Mushroom1");
GameRegistry.registerBlock(Mush1, "Mushroom1");
LanguageRegistry.addName(Mush1 , "Blue Mushroom");
Mush2 = new BlockMushrooms(2202, 49).setBlockName("Mushroom2");
GameRegistry.registerBlock(Mush2, "Mushroom2");
LanguageRegistry.addName(Mush2 , "Select Mushroom");
Mush3 = new BlockMushrooms(2203, 50).setBlockName("Mushroom3");
GameRegistry.registerBlock(Mush3, "Mushroom3");
LanguageRegistry.addName(Mush3, "Special Mushroom");
BBQSpit = new BlockBBQSpit(2204, 80).setBlockName("BBQSpit");
GameRegistry.registerBlock(BBQSpit, "BBQSpit");
LanguageRegistry.addName(BBQSpit, "BBQ Spit");
metaArmorstones = new ItemMetaArmors(24301);
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaArmorstones,1,0), "Armor Stone");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaArmorstones,1,1), "Armor Sphere");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaArmorstones,1,2), "Armor Sphere+");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaArmorstones,1,3), "Hrd Armor Sphere");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaArmorstones,1,4), "Hvy Armor Sphere");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaArmorstones,1,5), "Royal Armor Sphere");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaArmorstones,1,6), "True Armor Sphere");
metaMonsterbones = new ItemMetaBones(24302);
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,0), "Sm Monster Bone");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,1), "Md Monster Bone");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,2), "Lg Monster Bone");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,3), "Mystery Bone");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,4), "Monster Bone+");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,5), "Hrd Monster Bone");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,6), "Hvy Monster Bone");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,7), "Robust Wyvern Bone");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,8), "Massive Bone");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,9), "Stout Bone");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,10), "Giant Bone");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,11), "Brute Bone");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,12), "ElderDragon Bone");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaMonsterbones,1,13), "Big ElderDragon Bone");
metaJewels = new ItemMetaJewel(24303);
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaJewels,1,0), "Suiko Jewel");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaJewels,1,1), "Akito Jewel");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaJewels,1,2), "Battlefield Jewel");
LanguageRegistry.addName(new ItemStack(MonsterHunterCrafted.metaJewels,1,3), "LapisLazuli Jewel");
//: Fish (Item)
FishFood1 = new ItemSushifish(24304,5,1F,true).setItemName("Sushifish");
LanguageRegistry.addName(FishFood1, "Sushifish");
FishFood2 = new ItemGluttonTuna(24305,6,1F,false).setItemName("GluttonTuna");
LanguageRegistry.addName(FishFood2, "Glutton Tuna");
FishFood3 = new ItemGastronomeTuna(24306,7,1F,false).setItemName("GastronomeTuna");
LanguageRegistry.addName(FishFood3, "Gastronome Tuna");
//: Mobs
EntityRegistry.registerModEntity(EntityFish.class, "Fish", 1, this, 80, 3, true);
EntityRegistry.addSpawn(EntityFish.class, 10, 2, 4, EnumCreatureType.waterCreature);
LanguageRegistry.instance().addStringLocalization("entity.MonsterHunterCrafted.Fish.name", "Fish");
registerEntityEgg(EntityFish.class, 0x123456, 0x467253);
EntityRegistry.registerModEntity(EntityFelyne.class, "Felyne", 2, this, 80, 3, true);
EntityRegistry.addSpawn(EntityFelyne.class, 10, 2, 4, EnumCreatureType.creature);
LanguageRegistry.instance().addStringLocalization("entity.MonsterHunterCrafted.Felyne.name", "Felyne");
registerEntityEgg(EntityFelyne.class, 0x123456, 0x467253);
DimensionManager.registerProviderType(Wyvernia, WorldProviderWyvernia.class, false);
DimensionManager.registerDimension(Wyvernia, Wyvernia);
}
public static int getUniqueEntityId()
{
do
{
startEntityId++;
}
while (EntityList.getStringFromID(startEntityId) != null);
return startEntityId;
}
public static void registerEntityEgg(Class<? extends Entity> entity, int primaryColor, int secondaryColor)
{
int id = getUniqueEntityId();
EntityList.IDtoClassMapping.put(id, entity);
EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
}
}
I was having the same problem when I first ran the code, I dont think it's up to date for 1.4.7.
I fixed it by
Make sure that in your Model class you have;
Part1 and Part2 refer to the parts in your model
Say in Techne you made a square statue model that had a base and a square that sits on top of that base your model would have two parts.
Part1 would be the Base and Part2 would be the square.
You would replace the Part1 and Part2 with whatever you named your model parts in Techne, which can be done in the bottom right under "Model Tree".
The more parts you have in the Model Tree in Techne the more PartName.render(0.0625F); you need to add here
If you followed the tutoral or just copied and paste, you need to make changes in his model class.
Wherever you see he has put the words Base, Head2, Keyboard, Head1, Head3 Stand1, Stand2, and Till.
That is his model parts names, you would change that to your model part names and delete the ones not needed or add if you have more parts in your model.
and in your TileEntity class you have in the renderAModelAt method;
Also in the same method (renderAModleAt) you have;
An easy way to get the texture PNG is in Techne make sure for each part in the model you move the texture offset so in the top right there not overlapping, then go to file and export texture map and then use that texture map in photoshop or the editor program of your choice to give it a texture then move that .png into your mod package and add the location to the bindTextureByName field.