Jump to content

[1.6.4] Get block icon based on TE


andreidim

Recommended Posts

public Icon getBlockTexture(IBlockAccess world, int x, int y, int z, int side)

 

It's called any time the block receives an update.

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.

Link to comment
Share on other sites

I found a way, I'm using the world provider, that gives you the server world :P

 

This will very likely not work with a dedicated server (... but feel free to test it out and report your findings).

ItemBlock is not a Block

ItemStack is not an Item

Damage value is not metadata

 

Stop confusing them.

Link to comment
Share on other sites

I found a way, I'm using the world provider, that gives you the server world :P

This will very likely not work with a dedicated server (... but feel free to test it out and report your findings).

 

It won't

 

I just got arround to testing that, it seems like it's not using the server tile entity, how could I get and use that?

 

You need to synch your TEs.

 

        public Packet getDescriptionPacket() {
                NBTTagCompound nbtTag = new NBTTagCompound();
                this.writeToNBT(nbtTag);
                return new Packet132TileEntityData(this.xCoord, this.yCoord, this.zCoord, 1, nbtTag);
        }

        public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) {
                readFromNBT(packet.data);
        }

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.

Link to comment
Share on other sites

Doing that actually broke my block completely :(

How could I easily update my block? I think that might be a problem, the way I'm updating it doesn't work, it works properly only on a block update

 

And I found another way that might work, using the MinecraftServer.getServer() stuff

 

P.S.:I need to re-render it after I do something to the tile entity

Link to comment
Share on other sites

As I said in my previous post, when I tried to sync them they broke completely... the texture never updates properly, only when I right click on it.

 

I might have found a bug or something... I am doing the world.markBlockForRenderUpdate on the server, the description is telling me that if you put it on the server it doesn't do anything, well, actually, it updates my block properly??? How is that even possible?

Link to comment
Share on other sites

You need to do:

world.markBlockForUpdate(x, y, z)

instead of:

world.markBlockForRenderUpdate(x, y, z)

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Link to comment
Share on other sites

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.



×
×
  • Create New...

Important Information

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