Ilddor
Members-
Posts
3 -
Joined
-
Last visited
Converted
-
Gender
Male
Ilddor's Achievements
Tree Puncher (2/8)
2
Reputation
-
Hi, I have two problems with my mod: First, I've written class which is extending TileEntitySpecialRenderer and block is rendering in the world but in the inventory it's only one flat square of texture, do I need to do rendering by class implementing ISimpleBlockRenderingHandler or there is any other way to do this?(cos i spend some time over the TileEntitySpecialRenderer, and with ISimpleBlockRenderingHandler i think it will go to the trash as it's have own method to render blocks in the world). And the second one is that the same TileEntity is changing it's own variables which should be saved, so i did it by adding write and read to NBT methods, and everything seems to be good, but it's saving only on the server side, and client after relog have initial values. Any suggestions how to fix it? Thanks in advance.
-
3. To easily make models for Minecraft you can use Techne
-
[1.3.2]Custom Block Rendering just stays invisible.
Ilddor replied to Hirvio's topic in Modder Support
BlockWhiteCrystal: package net.minecraft.projectnavitas; import java.util.Random; import net.minecraft.src.Block; import net.minecraft.src.CreativeTabs; import net.minecraft.src.Material; import net.minecraft.src.TileEntity; public class BlockWhiteCrystal extends Block{ public BlockWhiteCrystal(int id, int texture) { super(id, texture, Material.rock); setHardness(1.0F); setResistance(2.0F); setCreativeTab(CreativeTabs.tabBlock); } public boolean isOpaqueCube() { return false; } public boolean renderAsNormalBlock() { return false; } public int getRenderType() { return -1; } public TileEntity getBlockEntity() { try{ return (TileEntity)TileEntityCrystal.class.newInstance(); } catch(Exception exception){ throw new RuntimeException(exception); } } public TileEntity TileEntity(){ return new TileEntityCrystal(); } } You should add methods: public boolean hasTileEntity(int metadata) and public TileEntity createTileEntity(World world, int metadata). I've had the same problem, because i hadn't second one added, don't know why is it so important. Also I guess that you should override methods onBlockAdded and breakBlock to make sure that there's creating and destroying tile entity to your block. And sorry for my English:)