Jump to content

Recommended Posts

Posted

So I've been making a mod, and I wanted to send it to a couple of friends so we could test it on a server, but whenever you load up a world, it crashes with the crash error

 

  Reveal hidden contents

 

 

This is the main class file in the mod

 package flipsmash.sk;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.util.EnumHelper;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.registry.GameRegistry;
import flipsmash.sk.item.ItemAcheronsword;
import flipsmash.sk.item.ItemBeastbasher;
import flipsmash.sk.item.ItemBrandish;
import flipsmash.sk.item.ItemCauterysword;
import flipsmash.sk.item.ItemCelestialsaber;
import flipsmash.sk.item.ItemHatchet;
import flipsmash.sk.item.ItemHotedge;
import flipsmash.sk.item.ItemNightblade;
import flipsmash.sk.item.ItemObsidianedge;
import flipsmash.sk.item.ItemProtogun;
import flipsmash.sk.item.ItemProtosword;
import flipsmash.sk.item.ItemSilentnightblade;
import flipsmash.sk.item.ItemSlimeslasher;
import flipsmash.sk.item.ItemUoas;
import flipsmash.sk.proxy.CommonProxy;

@Mod(modid = SpiralKnights.mcsk, name = "Spiral Knights Mod", version = "1.0")
public class SpiralKnights {

public static final String mcsk = "SpiralKnights";

public static Item itemSimple;
public static Item itemAdvanced;
public static Item itemElite;
public static Item itemEternal;
public static Item itemProtosword;
public static Item itemProtogun;
public static Item itemAcheronsword;
public static Item itemAcheronsheath;
public static Item itemCelestialsaber;
public static Item itemAlchemystat;
public static Item itemGelcore;
public static Item itemRockycore;
public static Item itemShadowsteel;
public static Item itemSunsilver;
public static Item itemVolcaniciron;
public static Item itemPrimalore;
public static Item itemCelestialore;
public static Item itemPerplexingelement;
public static Item itemObsidianshard;
public static Item itemBindingessence;
public static Item itemPhialofphear;
public static Item itemVileseal;
public static Item itemBeastscale;
public static Item itemMonsterbone;
public static Item itemDarkshard;
public static Item itemRocksalt;
public static Item itemBrimstone;
public static Item itemForbiddenfruit;
public static Item itemGhostbell;
public static Item itemSwordstone;
public static Item itemBeastbasher;
public static Item itemSlimeslasher;
public static Item itemHotedge;
public static Item itemBrandish;
public static Item itemCauterysword;
public static Item itemNightblade;
public static Item itemSilentnightblade;
public static Item itemObsidianedge;
public static Item itemHatchet;
public static Item itemUoas;
public static Item itemIDCard;
public static Item itemSigil;


public static final Item.ToolMaterial uoas = EnumHelper.addToolMaterial("uoas", 5, 4194304, 100.0F, 100.0F, 300);
public static final Item.ToolMaterial noStarMaterial = EnumHelper.addToolMaterial("noStarMaterial", 1, 4194304, 3.5F, 1.5F, 3);
public static final Item.ToolMaterial oneStarMaterial = EnumHelper.addToolMaterial("oneStarMaterial", 1, 4194304, 4.5F, 1.8F, 3);
public static final Item.ToolMaterial twoStarMaterial = EnumHelper.addToolMaterial("twoStarMaterial", 2, 4194304, 6.5F, 2.3F, 3);
public static final Item.ToolMaterial threeStarMaterial = EnumHelper.addToolMaterial("threeStarMaterial", 2, 4194304, 7.5F, 2.8F, 3);
public static final Item.ToolMaterial fourStarMaterial = EnumHelper.addToolMaterial("fourStarMaterial", 3, 4194304, 8.5F, 3.6F, 3);
public static final Item.ToolMaterial fiveStarMaterial = EnumHelper.addToolMaterial("fiveStarMaterial", 4, 4194304, 10.0F, 4.5F, 3);
public static final ItemArmor.ArmorMaterial noStarArmor = EnumHelper.addArmorMaterial("noStarArmor", 4194304, new int[]{1,3,2,1}, 3);
public static final ItemArmor.ArmorMaterial oneStarArmor = EnumHelper.addArmorMaterial("oneStarArmor", 4194304, new int[]{3,4,4,2}, 3);
public static final ItemArmor.ArmorMaterial twoStarArmor = EnumHelper.addArmorMaterial("twoStarArmor", 4194304, new int[]{3,6,5,4}, 3);
public static final ItemArmor.ArmorMaterial threeStarArmor = EnumHelper.addArmorMaterial("threeStarArmor", 4194304, new int[]{5,7,2,1}, 3);
public static final ItemArmor.ArmorMaterial fourStarArmor = EnumHelper.addArmorMaterial("fourStarArmor", 4194304, new int[]{1,2,2,1}, 3);
public static final ItemArmor.ArmorMaterial fiveStarArmor = EnumHelper.addArmorMaterial("fiveStarArmor", 4194304, new int[]{1,2,2,1}, 3);

//public static Block blockAlchemycrafter;
public static Block blockShadowore;
public static Block blockFloorTile1;
public static Block blockFloorTile2;
public static Block blockFloorTile3;
public static Block blockFloorTile4;
public static Block blockFloorTile5;
public static Block blockFloorTile6;
public static Block blockFloorTile7;
public static Block blockFloorTile8;
public static Block blockWallBottomL;
public static Block blockWallBottomM;
public static Block blockWallBottomR;
public static Block blockWallBottomX;
public static Block blockWallMiddle;
public static Block blockWallTop;
public static Block blockFloorGrass;
public static Block blockFloorDirt;
public static Block blockFloorFSC;
public static Block blockFloorFSCL;

@SidedProxy(clientSide = "flipsmash.sk.proxy.ClientProxy", serverSide = "flipsmash.sk.proxy.CommonProxy")
public static CommonProxy skProxy;

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
	//Item/Block init and registering 
	//Config handling 
	itemSimple = new ItemSimple().setUnlocalizedName("ItemSimple").setTextureName("mcsk:alchemy_orb_simple").setCreativeTab(tabSKMats);
	itemAdvanced = new ItemAdvanced().setUnlocalizedName("ItemAdvanced").setTextureName("mcsk:alchemy_orb_advanced").setCreativeTab(tabSKMats);
	itemElite = new ItemElite().setUnlocalizedName("ItemElite").setTextureName("mcsk:alchemy_orb_elite").setCreativeTab(tabSKMats);
	itemEternal = new ItemEternal().setUnlocalizedName("ItemEternal").setTextureName("mcsk:alchemy_orb_eternal").setCreativeTab(tabSKMats);
	itemProtosword = new ItemProtosword(noStarMaterial).setUnlocalizedName("ItemProtosword").setTextureName("mcsk:proto_sword").setCreativeTab(tabSKWeps);	
	itemProtogun = new ItemProtogun().setUnlocalizedName("ItemProtogun").setTextureName("mcsk:proto_gun").setCreativeTab(tabSKWeps);	
	itemAcheronsword = new ItemAcheronsword(fiveStarMaterial).setUnlocalizedName("ItemAcheronsword").setTextureName("mcsk:acheron_blade").setCreativeTab(tabSKWeps);		
	itemAcheronsheath = new ItemAcheronsheath().setUnlocalizedName("ItemAcheronsheath").setTextureName("mcsk:acheron_sheath").setCreativeTab(tabSKWeps);		
	itemCelestialsaber = new ItemCelestialsaber(fiveStarMaterial).setUnlocalizedName("ItemCelestialsaber").setTextureName("mcsk:celestial_saber").setCreativeTab(tabSKWeps);		
	itemAlchemystat = new ItemAlchemystat().setUnlocalizedName("ItemAlchemystat").setTextureName("mcsk:alchemy_station").setCreativeTab(tabSKMats);
	itemShadowsteel = new ItemShadowsteel().setUnlocalizedName("ItemShadowsteel").setTextureName("mcsk:shadow_steel").setCreativeTab(tabSKMats);
	itemSunsilver = new ItemSunsilver().setUnlocalizedName("ItemSunsilver").setTextureName("mcsk:sun_silver").setCreativeTab(tabSKMats);
	itemVolcaniciron = new ItemVolcaniciron().setUnlocalizedName("ItemVolcaniciron").setTextureName("mcsk:volcanic_iron").setCreativeTab(tabSKMats);
	itemPrimalore = new ItemPrimalore().setUnlocalizedName("ItemPrimalore").setTextureName("mcsk:primal_ore").setCreativeTab(tabSKMats);
	itemCelestialore = new ItemCelestialore().setUnlocalizedName("ItemCelestialore").setTextureName("mcsk:celestial_ore").setCreativeTab(tabSKMats);
	itemPerplexingelement = new ItemPerplexingelement().setUnlocalizedName("ItemPerplexingelement").setTextureName("mcsk:perplexing_element").setCreativeTab(tabSKMats);
	itemObsidianshard = new ItemObsidianshard().setUnlocalizedName("ItemObsidianshard").setTextureName("mcsk:obsidian_shard").setCreativeTab(tabSKMats);
	itemBindingessence = new ItemBindingessence().setUnlocalizedName("ItemBindingessence").setTextureName("mcsk:binding_essence").setCreativeTab(tabSKMats);
	itemBeastscale = new ItemBeastscale().setUnlocalizedName("ItemBeastscale").setTextureName("mcsk:beast_scale").setCreativeTab(tabSKMats);
	itemMonsterbone = new ItemMonsterbone().setUnlocalizedName("ItemMonsterbone").setTextureName("mcsk:monster_bone").setCreativeTab(tabSKMats);
	itemDarkshard = new ItemDarkshard().setUnlocalizedName("ItemDarkshard").setTextureName("mcsk:dark_shard").setCreativeTab(tabSKMats);
	itemRocksalt = new ItemRocksalt().setUnlocalizedName("ItemRocksalt").setTextureName("mcsk:rock_salt").setCreativeTab(tabSKMats);
	itemBrimstone = new ItemBrimstone().setUnlocalizedName("ItemBrimstone").setTextureName("mcsk:brimstone").setCreativeTab(tabSKMats);
	itemForbiddenfruit = new ItemForbiddenfruit().setUnlocalizedName("ItemForbiddenfruit").setTextureName("mcsk:forbidden_fruit").setCreativeTab(tabSKMats);
	itemPhialofphear = new ItemPhialofphear().setUnlocalizedName("ItemPhialofphear").setTextureName("mcsk:phial_of_phear").setCreativeTab(tabSKMats);
	itemGhostbell = new ItemGhostbell().setUnlocalizedName("ItemGhostbell").setTextureName("mcsk:ghost_bell").setCreativeTab(tabSKMats);
	itemVileseal = new ItemVileseal().setUnlocalizedName("ItemVileseal").setTextureName("mcsk:vile_seal").setCreativeTab(tabSKMats);
	itemSwordstone = new ItemVileseal().setUnlocalizedName("ItemSwordstone").setTextureName("mcsk:swordstone").setCreativeTab(tabSKMats);
	itemBeastbasher = new ItemBeastbasher(noStarMaterial).setUnlocalizedName("ItemBeastbasher").setTextureName("mcsk:beast_basher").setCreativeTab(tabSKWeps);
	itemSlimeslasher = new ItemSlimeslasher(noStarMaterial).setUnlocalizedName("ItemSlimeslasher").setTextureName("mcsk:slime_slasher").setCreativeTab(tabSKWeps);
	itemHatchet = new ItemHatchet(noStarMaterial).setUnlocalizedName("ItemHatchet").setTextureName("mcsk:hatchet").setCreativeTab(tabSKWeps);
	itemHotedge = new ItemHotedge(oneStarMaterial).setUnlocalizedName("ItemHotedge").setTextureName("mcsk:hot_edge").setCreativeTab(tabSKWeps);
	itemBrandish = new ItemBrandish(twoStarMaterial).setUnlocalizedName("ItemBrandish").setTextureName("mcsk:brandish").setCreativeTab(tabSKWeps);
	itemCauterysword = new ItemCauterysword(threeStarMaterial).setUnlocalizedName("ItemCauterysword").setTextureName("mcsk:cautery_sword").setCreativeTab(tabSKWeps);
	itemNightblade = new ItemNightblade(threeStarMaterial).setUnlocalizedName("ItemNightblade").setTextureName("mcsk:nightblade").setCreativeTab(tabSKWeps);
	itemSilentnightblade = new ItemSilentnightblade(fourStarMaterial).setUnlocalizedName("ItemSilentnightblade").setTextureName("mcsk:silent_nightblade").setCreativeTab(tabSKWeps);
	itemObsidianedge = new ItemObsidianedge(fiveStarMaterial).setUnlocalizedName("ItemObsidianedge").setTextureName("mcsk:obsidian_edge").setCreativeTab(tabSKWeps);
	itemUoas = new ItemUoas().setUnlocalizedName("ItemUoas").setTextureName("mcsk:uoas");
	itemIDCard = new ItemIDCard().setUnlocalizedName("ItemIDCard").setTextureName("mcsk:fiendish_id_card").setCreativeTab(tabSKMats);
	itemSigil = new ItemSigil().setUnlocalizedName("ItemSigil").setTextureName("mcsk:apocrean_sigil").setCreativeTab(tabSKMats);

	itemGelcore = new ItemFood(6, 0.4F, false).setUnlocalizedName("ItemGelcore").setTextureName("mcsk:gel_core").setCreativeTab(tabSKMats);
	itemRockycore = new ItemFood(9, 0.7F, false).setUnlocalizedName("ItemRockycore").setTextureName("mcsk:rocky_core").setCreativeTab(tabSKMats);

	//blockAlchemycrafter = new BlockAlchemycrafter(Material.iron).setBlockName("BlockAlchemycrafter").setBlockTextureName("steel_block").setCreativeTab(tabSKBlocks);
	blockShadowore = new BlockShadowore(Material.rock).setBlockName("BlockShadowore").setBlockTextureName("mcsk:shadow_ore").setCreativeTab(tabSKBlocks);
	blockFloorTile1 = new BlockFloorTile1(Material.rock).setBlockName("BlockFloorTile1").setBlockTextureName("mcsk:clock_nrm_floor_1").setCreativeTab(tabSKBlocks);
	blockFloorTile2 = new BlockFloorTile2(Material.rock).setBlockName("BlockFloorTile2").setBlockTextureName("mcsk:clock_nrm_floor_2").setCreativeTab(tabSKBlocks);
	blockFloorTile3 = new BlockFloorTile3(Material.rock).setBlockName("BlockFloorTile3").setBlockTextureName("mcsk:clock_nrm_floor_3").setCreativeTab(tabSKBlocks);
	blockFloorTile4 = new BlockFloorTile4(Material.rock).setBlockName("BlockFloorTile4").setBlockTextureName("mcsk:clock_nrm_floor_4").setCreativeTab(tabSKBlocks);
	blockFloorTile5 = new BlockFloorTile5(Material.rock).setBlockName("BlockFloorTile5").setBlockTextureName("mcsk:clock_nrm_floor_5").setCreativeTab(tabSKBlocks);
	blockFloorTile6 = new BlockFloorTile6(Material.rock).setBlockName("BlockFloorTile6").setBlockTextureName("mcsk:clock_nrm_floor_6").setCreativeTab(tabSKBlocks);
	blockFloorTile7 = new BlockFloorTile7(Material.rock).setBlockName("BlockFloorTile7").setBlockTextureName("mcsk:clock_nrm_floor_7").setCreativeTab(tabSKBlocks);
	blockFloorTile8 = new BlockFloorTile8(Material.rock).setBlockName("BlockFloorTile8").setBlockTextureName("mcsk:clock_nrm_floor_8").setCreativeTab(tabSKBlocks);
	blockWallBottomL = new BlockWallBottomL(Material.rock).setBlockName("BlockWallBottomL").setBlockTextureName("mcsk:clock_nrm_wall_bottom_left").setCreativeTab(tabSKBlocks);
	blockWallBottomM = new BlockWallBottomM(Material.rock).setBlockName("BlockWallBottomM").setBlockTextureName("mcsk:clock_nrm_wall_bottom_middle").setCreativeTab(tabSKBlocks);
	blockWallBottomR = new BlockWallBottomR(Material.rock).setBlockName("BlockWallBottomR").setBlockTextureName("mcsk:clock_nrm_wall_bottom_right").setCreativeTab(tabSKBlocks);
	blockWallBottomX = new BlockWallBottomX(Material.rock).setBlockName("BlockWallBottomX").setBlockTextureName("mcsk:clock_nrm_wall_bottom_x").setCreativeTab(tabSKBlocks);
	blockWallMiddle = new BlockWallMiddle(Material.rock).setBlockName("BlockWallMiddle").setBlockTextureName("mcsk:clock_nrm_wall_middle").setCreativeTab(tabSKBlocks);
	blockWallTop = new BlockWallTop(Material.rock).setBlockName("BlockWallTop").setBlockTextureName("mcsk:clock_nrm_wall_top").setCreativeTab(tabSKBlocks);
	blockFloorGrass = new BlockFloorGrass(Material.grass).setBlockName("BlockFloorGrass").setBlockTextureName("mcsk:blockFloorGrass").setCreativeTab(tabSKBlocks);
	blockFloorDirt = new BlockFloorDirt(Material.ground).setBlockName("BlockFloorDirt").setBlockTextureName("mcsk:clock_dirt").setCreativeTab(tabSKBlocks);
	blockFloorFSC = new BlockFloorFSC(Material.rock).setBlockName("BlockFloorFSC").setBlockTextureName("mcsk:FSC_floor").setCreativeTab(tabSKBlocks);
	blockFloorFSCL = new BlockFloorFSCL(Material.rock).setBlockName("BlockFloorFSCL").setBlockTextureName("mcsk:FSC_floor_lava").setCreativeTab(tabSKBlocks);








	GameRegistry.addSmelting(itemGelcore, new ItemStack(itemRockycore), 0.0F);
	GameRegistry.addSmelting(blockShadowore, new ItemStack(itemShadowsteel), 1.0F);

	//Rendererererss
	skProxy.registerRenderThings();
}

@EventHandler
public void init(FMLInitializationEvent event) {
	//Proxy, TileEntity, entity, GUI and Packet Registering
	//GameRegistry.addRecipe(new ItemStack(itemAlchemystat, 1), new Object[]{"DD ","DI ","II ", 'D', Items.diamond, 'I', Items.iron_ingot});
	GameRegistry.addRecipe(new ItemStack(itemBrandish, 1), new Object[]{"DBM","S  ","   ", 'D', itemDarkshard, 'B', itemBeastscale, 'M', itemMonsterbone, 'S', itemSimple});
	GameRegistry.addRecipe(new ItemStack(itemCauterysword, 1), new Object[]{"DBM","RAW","   ", 'D', itemDarkshard, 'B', itemBeastscale, 'M', itemMonsterbone, 'A', itemAdvanced, 'R', itemRocksalt, 'W', itemBrandish});
	GameRegistry.addRecipe(new ItemStack(itemNightblade, 1), new Object[]{"DBF","PAW","   ", 'D', itemDarkshard, 'B', itemBrimstone, 'F', itemForbiddenfruit, 'A', itemAdvanced, 'P', itemPhialofphear, 'W', itemBrandish});
	GameRegistry.addRecipe(new ItemStack(itemSilentnightblade, 1), new Object[]{"DBF","PGE","W  ", 'D', itemDarkshard, 'B', itemBrimstone, 'F', itemForbiddenfruit, 'E', itemElite, 'P', itemPhialofphear, 'G', itemGhostbell, 'W', itemNightblade});
	GameRegistry.addRecipe(new ItemStack(itemAcheronsword, 1), new Object[]{"DBF","PGS","EW ", 'D', itemDarkshard, 'B', itemBrimstone, 'F', itemForbiddenfruit, 'E', itemEternal, 'P', itemPhialofphear, 'G', itemGhostbell, 'S', itemShadowsteel, 'W', itemSilentnightblade});
	GameRegistry.addRecipe(new ItemStack(itemObsidianedge, 1), new Object[]{"DVS","OBP","EW ", 'D', itemDarkshard, 'V', itemVileseal, 'B', itemBindingessence, 'E', itemEternal, 'P', itemPerplexingelement, 'O', itemObsidianshard, 'S', itemSwordstone, 'W', itemSilentnightblade});
}

@EventHandler
public void postInit(FMLPostInitializationEvent event) {



}

public static CreativeTabs tabSKBlocks = new CreativeTabs("tabSKBlocks"){
	@Override
	public Item getTabIconItem(){
		return new ItemStack(blockFloorGrass).getItem();
	}
};
public static CreativeTabs tabSKMats = new CreativeTabs("tabSKMats"){
	@Override
	public Item getTabIconItem(){
		return new ItemStack(itemElite).getItem();
	}
};
public static CreativeTabs tabSKWeps = new CreativeTabs("tabSKWeps"){
	@Override
	public Item getTabIconItem(){
		return new ItemStack(itemObsidianedge).getItem();
	}
};
}

 

I hope this is enough information to find a solution, I could really use some help!

 

EDIT: I forgot to say that the mod works perfectly fine in the debug client in eclipse, but not in the official client.

Posted

This issue should be related with Rendering, so please post your proxy class. (with the method registerRenderThings)

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

Client Proxy:

package flipsmash.sk.proxy;

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.Item;
import net.minecraftforge.client.MinecraftForgeClient;
import cpw.mods.fml.client.registry.ClientRegistry;
import flipsmash.sk.ItemRenderAlchemycrafter;
import flipsmash.sk.RenderAlchemycrafter;
import flipsmash.sk.SpiralKnights;
import flipsmash.sk.TileEntityAlchemycrafter;

public class ClientProxy extends CommonProxy{



public void registerRenderThings() {
	//ModelAlchemycrafter
	TileEntitySpecialRenderer render = new RenderAlchemycrafter();
	ClientRegistry.bindTileEntitySpecialRenderer(TileEntityAlchemycrafter.class, render);
	MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(SpiralKnights.blockAlchemycrafter), new ItemRenderAlchemycrafter(render, new TileEntityAlchemycrafter()));

}

public void registerTileEntitySpecialRenderer() {

}

}

Common Proxy

package flipsmash.sk.proxy;

public class CommonProxy {

public void registerRenderThings() {

}

public void registerTileEntitySpecialRenderer() {

}

}

Posted

1. Does your test world contains TileEntityAlchemycrafter? If not, it could be a bug, and you should try updating forge.

2. If your test would contains the TileEntityAlchemycrafter, then this issue would be related with RenderAlchemycrafter class. In that case, pls post the class.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Posted

Forge is updated to the newest version in the mod and the client, and the world was a clean new world that I just generated.

Here's the ItemRenderAlchemycrafter class anyway, if that helps...

package flipsmash.sk;

import org.lwjgl.opengl.GL11;

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.item.ItemStack;
import net.minecraft.tileentity.TileEntity;
import net.minecraftforge.client.IItemRenderer;

public class ItemRenderAlchemycrafter implements IItemRenderer {

TileEntitySpecialRenderer render;
private TileEntity entity;

public ItemRenderAlchemycrafter(TileEntitySpecialRenderer render, TileEntity entity) {
	this.entity = entity;
	this.render = render;
}

@Override
public boolean handleRenderType(ItemStack item, ItemRenderType type) {
	// TODO Auto-generated method stub
	return false;
}

@Override
public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper) {
	// TODO Auto-generated method stub
	return true;
}

@Override
public void renderItem(ItemRenderType type, ItemStack item, Object... data) {
	if(type == IItemRenderer.ItemRenderType.ENTITY)
		GL11.glTranslatef(-0.5F, 0.0F, -0.5F);
	this.render.renderTileEntityAt(this.entity, 0.0D, 0.0D, 0.0D, 0.0F);

}


}

Posted

That's the Item renderer, show also the TileEntitySpecialRenderer class.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Durrr I didn't see the class file the first time, here it is

package flipsmash.sk;

import org.lwjgl.opengl.GL11;

import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import flipsmash.sk.SpiralKnights;
import flipsmash.sk.ModelAlchemycrafter;

public class RenderAlchemycrafter extends TileEntitySpecialRenderer {

private static final ResourceLocation texture = new ResourceLocation(SpiralKnights.mcsk + ":" + "/textures/model/alchemy_machine.png");

private ModelAlchemycrafter model;

public RenderAlchemycrafter() {
	this.model = new ModelAlchemycrafter();
}

@Override
public void renderTileEntityAt(TileEntity tileentity, double x, double y, double z, float f) {
	GL11.glPushMatrix();
		GL11.glTranslatef((float) x + 0.5F, (float) y + 1.5F, (float) z + 0.5F);
		GL11.glRotatef(180, 0F, 0F, 1F);

		this.bindTexture(texture);

		GL11.glPushMatrix();
			this.model.renderModel(0.0625F);
		GL11.glPopMatrix();
	GL11.glPopMatrix();

}

}

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.