Jump to content

hydroflame

Members
  • Posts

    1511
  • Joined

  • Last visited

Everything posted by hydroflame

  1. what draco is trying to say is: all skull have the same item id, but they have different metadata. now heres the part where im not sure (draco if you knwo feel free to correct me, or anyon else) im not sure wether or not the standard recipes take in consideration metadata, if it doesnt youll have to make your own IRecipes (i think is what its called) edit it seems it does, so youre fine -hydroflame, author FRev-
  2. unfortunately vanilla or forge dont have anything that would allow you to do this. so you're pretty much screwed. if you know about openGL and know about render-to-texture, this is the option i would recommend, render all your clothing/hair/eye color etc etc to a texture then map the texture to the model also, your idea is fantastic btw -hydroflame, author FRev-
  3. yeah of course but personally i dont know the exact distance it requires, if you put too big you will send it to player who dont need it (thus putting too much workload to the network), if you put it too small some players might not receive it and use the block in a non-synchronized-with-the-server way plus i mean ... markBlockForUpdate is such an easy method to call ... why not use it but good point -hydroflame, author FRev-
  4. the tutorials are super clear for everyone who puts a little time reading it. everyone who will answer you here is a modder and can understand it. Not to be mean, but if you cant understand them, you might have to reconsider modding. its not an easy task especially considering what you're asking. we all have our own mods to take care of, were happy to share our knowledge but we dont have time to explain how the universe works. -hydroflame, author FRev-
  5. unless you really need it dont make a custom packet, use the method as it will send the update ONLY to players who are affected by it. (aka those close enough) -hydroflame, author FRev-
  6. block place event should technicly cover sign creation. creeper explosion can be disabled by the vanilla command: "gamerule modGreifing false" and i cant say how bad it is that you are still thinking about sign shop with forge WE HAVE GUI, were suppose to stop using those god damn sign shop that require so much space ! -hydroflame, author FRev (wich contains legit shop that cont required the usage of freacking signs...)- edit: sorry, im not mad at anyone, its just that sign shop should not exists beyond the context of "bukkit" they work there because the client doesnt download anything, so its all good. But here in forge we have powerfull tools that should allow us to NOT use them and use wayyyy better shops
  7. You should probably start by looking at the wiki. 95% of what youre asking is there -hydroflame, author FRev-
  8. //1 without looking at the code I'm guessing its binding the texture after each block is drawn, causing the first block to be rendered abnormally edit: no it seems fine the bindtexture happens once before every time you render an background just for a test you change //element render properties if (dest.isPrivate()) drawTexturedModalRect(i5 - 2, l4 - 2, 26, 202, 26, 26); else drawTexturedModalRect(i5 - 2, l4 - 2, 0, 202, 26, 26); to this //element render properties if (dest.isPrivate()) drawTexturedModalRect(i5 - 2, l4 - 2, 0, 202, 26, 26);//note that its now 0 at both place. this is jsut for testing purpose else drawTexturedModalRect(i5 - 2, l4 - 2, 0, 202, 26, 26); 2 im guessing notch code has a bug where if there is no achievement it will not even bother rendering. Which isn't technically a bug because obviously there's always achievement, but might be a problem in your code. honestly it is a pain but if you want to add stuff to make it visually impressive (animation etc) you'll have to eventually change redo some part or the other btw i can see where this is going ... and I to admit that I'm jealous of this
  9. trust me, make the change to the tile entity, and when its done. call this method. server side it will send the state of the tile entity to the clients, just make sure to implements these method on your tile entity: public Packet getDescriptionPacket() public void onDataPacket(INetworkManager net, Packet132TileEntityData packet) public void readFromNBT(NBTTagCompound tag) public void writeToNBT(NBTTagCompound tag) if you really dont trust me. just take a look at the gui for the sign and its doing the eeeexact same thign, also take a look at the method markBlockForUpdate
  10. is the int changed server side or client side ? if its server side, just call world.markBlockForUpdate(x, y, z); and the rest will happen automaticly by client side i mean, its changed from a GUI or something the server does NOT have access
  11. it depends on what do you want to send to the client and where is this change starting from
  12. Hey again, like i said it's been a while since i have done this. But i found in the vanilla src somethign similar. My hypothesis is that lighting is enabled and rendering a block versus an item affect it in different ways such that is screws up after rendering a item. Unfortuntely I'm not near a place where i can work on this and find out whats Happening really but for now i can tell you this Look at the class "GuiContainer" and look at the methods "drawScreen" and "drawItemStack" specially these lines in "drawScreen": RenderHelper.disableStandardItemLighting(); GL11.glDisable(GL11.GL_LIGHTING); GL11.glDisable(GL11.GL_DEPTH_TEST); super.drawScreen(par1, par2, par3); RenderHelper.enableGUIStandardItemLighting(); and near the end : GL11.glEnable(GL11.GL_LIGHTING); GL11.glEnable(GL11.GL_DEPTH_TEST); RenderHelper.enableStandardItemLighting(); it seems that notch disable the lighting when rendering items (dont forget to re-enable it after) if that's not enough. May i suggest that I take a look at it later?
  13. Could you explain what you have done so far, what you dont understand, what you DO understand and what you're trying to accomplish. saying "i dont get it" doesnt help us understand whats going on -hydroflame, author FRev-
  14. Hey there, Is it possible to see more your source code for the rendering/gui class? I do remember seeing something similar to this a while ago. -hydroflame, author FRev-
  15. Yeah but it's not because it's possible to do it that you should do it like implementing TileEntitySpecialRenderer and a TileEntity for a block that can easily be rendered by ISimpleblockRenderHandle (or wtv its called) good practice makes good code -hydroflame, author FRev-
  16. well metadata is already implemented in-game, like i said, wool wood, stair, plants (flower?) already have it. basicly metadata is an extra information about the block, can be its color (wool) its direction (chest/furnace) can be its type ( wood ) what youll want to do is look around the method world.setBlockWithMetadata, Block.getSubBlocks etc, if you just go in the Block and World class ctrl+f for "meta" you should find what you're looking for also, if you're using ecilpse, use rightclick+open call hierarchi. this help a TON but honestly dont be afraid to use multiple completely different block, use "subblocks" or metadata only if like you're making a blue firepit and red firepit, these would be pretty much the same. If you're doing like a statue and a teapot, use different ID please. -hydroflame, author FRev-
  17. you do realise if you know how to code in java, you should have NO problem learning html/jscript/etc to be able to make a wiki ...... you can't always jsut copy paste things and expect everything to work.
  18. Hey there, what you're asking for is already in miencraft and it's called "metadata", kinda like how trees have different wood but they all have id 17 (same goes for wool, they all have the same id but their color is based on their metadata) just remember that metadata is only 16 possible number (0-15) so if you have more then 15 blocks, you WILL need to use more then 1 ID. btw, dont be afraid to use multiple id. if you have config files peopel can always change it in case there is a conflict. -hydroflame, author FRev-
  19. hmmmmmmmmm well nevermind all that. Even vanilla does the same thing. I even amde a test to make sure it was a bug. So since the NetHandler will try to use the world that the player is currently in. Theres a possibliity that the server will not be able to process the packet correctly. It wont make the server crash though because theres a check to see if the variable is not null. If someone ever send a packet changing tile entities to the server and changes world BEFORE the packet is processed (ex, click to send change and jump in the end) the packet will NOT take effect and you will have lost your changes. this is a bug btw but its a vanilla one. i did tested and reproduced it by setting a delay between arrival of the packet and process. used it with sign and command block. tl;dr version dont change Tile entity and switch dimension super fast. youll lose your progress (sign text or commands for exemple) Cheers, -hydroflame, author of FRev-
  20. Don't worry. I do have a working solution (using p250) it's just that there seems to be possible bug in it. I was jsut expecting that there would be a solid solution that doesnt have this kind of flaw may i ask from where you are getting the World variable when you arrive server side ? mines from a cast of Player to EntityplayerMP and from it i can get worldObj.
  21. ...... getDescriptionPacket is supposed to give a Packet132TileEntity, sending such packet to the server will kick the client. please refer to net.minecraft.client.multiplayer.NetClientHandler, net.minecraft.network.packet.NetHandler and net.minecraft.network.NetServerHandler refering to method handleTileEntityData the method "getDescriptionPacket" is supposed to be called server side and will manage to wich player it needs to be sent. so that player far away will not receive a packet for a tile entity that isnt even loaded. i wish to NOT overload my network with packet that dont need to be send. -hydroflame, FRev-
  22. I would just like to remind people to use tile entity special renderer only if you are usign a tile entity if you are simply making a weird shaped block please use only ISimpleBlockRenderingHandler as you will not force player to create a billion tile entity if the block is common. But in the case of a cannon you will probably want to see a animation of some sort when the cannon is firing (unless its only a decoration) remember that tile entities take memory for every instance of the tile entity while blocks and models are only created once. if there is no animation/factor that is different from one block to the other. use ISimpleBlockRenderer and NO tile entity/tile entitySpecialRenderer
  23. I don't have access to github (blocked by work network) also, when you insert a error trace, can you please put more then just 1 line. Because this line is just saying there was an error, doesnt say where it comes from Cheers, -hydroflame, FRev-
×
×
  • Create New...

Important Information

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