May 26, 201213 yr You are probably calling world.setBlockMetadata, you need to call world.setBlockMetadataWithNotify I think. I changed my code to setBlockMetadataWithNotify . The texture still doesn't update unless there is a block change nearby. EDIT: I figured it out. I need to set this: this.setRequiresSelfNotify(); Ah, yes, forgot about that, I always set that on my blocks. EDIT 2: OK I have another problem now. I decided NOT to use metadata to save the direction and to use the tile entity instead. After the change, the texture of the block will not change or update unless a block besides it changes. Same problem. I tried cheating by setting the block metadata into the same metadata but it doesn't work. Setting a metadata to the same thing causes MC to skip it, thus doing nothing. To force an update you can mark your block as needing an update, forgot what the function was called but if you check the source of the setBlockMetadataWithNotify function it calls the functions that mark a block as needing to be updated like that, just call whatever functions it calls, but directly.
May 28, 201213 yr I tried using the function par1World.scheduleBlockUpdate(), but that didn't work. Also tried the function par1World.notifyBlocksOfNeighborChange(). Is there a function that will make the block update it's texture? http://calclavia.com/uploads/banner.png[/img]
May 28, 201213 yr Author there is a method that is called something along the lines of needsUpdate() that needs to return true here some things i found that might help public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {} protected Block setLightOpacity(int par1) { lightOpacity[this.blockID] = par1; return this; } public boolean isOpaqueCube() { return false; } public boolean renderAsNormalBlock() { return false; } private Set blocksNeedingUpdate = new HashSet(); his.blocksNeedingUpdate.add(new ChunkPosition(par2, par3, par4)); http://i577.photobucket.com/albums/ss215/bobstrong/ModBannerMed.png[/img]
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.