Posted July 20, 201411 yr I'm adding a custom rendered block. The texture for the block works but when it's broken I get missing texture particles. Adding the IIcon methods in my block class below instead gives me a Lava Texture. Is there something I'm missing here? I'm not quite sure how a custom block gets it's broken texture from. package com.kandivia.syntheticnether.blocks; import com.kandivia.syntheticnether.creativeTabs.CreativeTabInitializer; import com.kandivia.syntheticnether.main.MainRegistry; import com.kandivia.syntheticnether.tileEntity.TileEntityObsidianVat; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; import net.minecraft.block.BlockContainer; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IIconRegister; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.IIcon; import net.minecraft.world.World; public class ObsidianVat extends BlockContainer{ public ObsidianVat(Material material){ super(material); this.setHardness(50.0F); this.setResistance(2000.0F); this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F); this.setBlockName("obsidianVat"); this.setBlockTextureName("obsidianVat"); this.setCreativeTab(CreativeTabInitializer.tabSyntheticNether); } public int getRenderType(){ return -1; } public boolean isOpaqueCube(){ return false; } public boolean renderAsNormalBlock(){ return false; } @Override public TileEntity createNewTileEntity(World var1, int var2){ return new TileEntityObsidianVat(); } @SideOnly(Side.CLIENT) private IIcon obsidianVat; @SideOnly(Side.CLIENT) public void registerIcons(IIconRegister icon){ obsidianVat = icon.registerIcon("syntheticnether:obsidianVat");} @SideOnly(Side.CLIENT) @Override public IIcon getIcon(int side, int meta){ return obsidianVat; } }
July 20, 201411 yr Author Removed the extra IIcon methods, but the original problem is still there as breaking the block gives off a missing texture particle.
July 20, 201411 yr Author the obsidianVat.png file exists in the proper directory. And yes I'm using TESR to render this model(with the help of techne) as silly as it seems xP I do plan to give it a proper model later, though I'm not quite the artist to do so. At least for now I want to know why using TESR doesn't give me a break texture. Other Classes If Needed: ClientProxy package com.kandivia.syntheticnether.proxy; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.item.Item; import net.minecraftforge.client.MinecraftForgeClient; import com.kandivia.syntheticnether.main.BlockRegister; import com.kandivia.syntheticnether.renderer.ItemRenderObsidianVat; import com.kandivia.syntheticnether.renderer.RenderObsidianVat; import com.kandivia.syntheticnether.tileEntity.TileEntityObsidianVat; import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.client.registry.RenderingRegistry; public class ClientProxy extends ServerProxy { public void registerRenderThings(){ //Obsidian Vat TileEntitySpecialRenderer render = new RenderObsidianVat(); ClientRegistry.bindTileEntitySpecialRenderer(TileEntityObsidianVat.class, render); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(BlockRegister.obsidianVat), new ItemRenderObsidianVat(render, new TileEntityObsidianVat())); } public void registerTileEntitySpecialRenderer(){ } } RenderObisidianVat package com.kandivia.syntheticnether.renderer; import org.lwjgl.opengl.GL11; import com.kandivia.syntheticnether.main.MainRegistry; import com.kandivia.syntheticnether.model.ModelObsidianVat; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; import net.minecraft.util.ResourceLocation; public class RenderObsidianVat extends TileEntitySpecialRenderer { private static final ResourceLocation texture = new ResourceLocation(MainRegistry.MODID + ":" + "textures/models/obsidianVat.png"); private ModelObsidianVat model; public RenderObsidianVat(){ this.model = new ModelObsidianVat(); } @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(); } } ItemRenderObsidianVat package com.kandivia.syntheticnether.renderer; 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 ItemRenderObsidianVat implements IItemRenderer { TileEntitySpecialRenderer render; private TileEntity entity; public ItemRenderObsidianVat(TileEntitySpecialRenderer render, TileEntity entity){ this.entity = entity; this.render = render; } @Override public boolean handleRenderType(ItemStack item, ItemRenderType type){ return true; } @Override public boolean shouldUseRenderHelper(ItemRenderType type, ItemStack item, ItemRendererHelper helper){ 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); } }
July 20, 201411 yr Author Here's the error message in the console. [14:18:40] [Client thread/ERROR]: Using missing texture, unable to load minecraft:textures/blocks/obsidianVat.png java.io.FileNotFoundException: minecraft:textures/blocks/obsidianVat.png at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?] at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?] at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [simpleReloadableResourceManager.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:653) [Minecraft.class:?] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:596) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:941) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_11] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_11] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_11] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_11] at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_11] at GradleStart.bounce(GradleStart.java:108) [start/:?] at GradleStart.startClient(GradleStart.java:101) [start/:?] at GradleStart.main(GradleStart.java:56) [start/:?] I'll definitely look into ISBRH, thanks for your guidance : 3
July 20, 201411 yr Author Oh wow! It's always those little things! Works perfectly now. Thanks again!
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.