Jump to content

Reika

Members
  • Posts

    228
  • Joined

  • Last visited

Everything posted by Reika

  1. The problem is, though, by the time any such person comes along, this thread will be long since buried, and I abhor the idea of bumping it (which is probably against the rules anyways). I have tried searching, but it is agonizingly slow (I have a poor internet connection), and what searching I did do found nothing relevant. Simply including "metadata" or "Tile Entity" in the terms nets thousands of generic results.
  2. I am using 1.2.5 since that is what I know, plus I have a few worlds locked in that version (dependent on old mods) and would like to use this mod there. I can always "retrofit" later. I am afraid you did not understand my simile for what happened when I tried looking at the BuildCraft code. It is not math that is a problem, it is the fact that the code is exceedingly complex and nuanced, and not at all easy to follow. This is compounded by the fact that I am not at all a Java expert; I started learning modding in earnest a week ago. As for using java's extend and inherit properties, that does not solve my problem. I need the Tile Entities to be able to distinguish these blocks from each other ingame, without taking up 16+ IDs to do so. I acknowledge that I am being a bit vague about what exactly I am trying to make with the mod, but I do that because the last time I said it explicitly (with another mod idea), someone else took the idea and released it as their own.
  3. I am developing a mod that contains many cases where there are many "variations" on a block, each largely the same but with slightly different properties. Because I use metadata to control direction, or there are often more than 16 variations on these blocks, default metadata is not an option. I could just use different IDs, but that would be poor form. I have seen, when using TMI or NEI, that big mods like BuildCraft and RedPower seem to use damage values/metadata much larger than 15, often in the thousands. (For example, look to RedPower wires). I assume this is done with Tile Entities. My question is how. No tutorial seems to exist on it, and one time I got a response to a similar question, the response was a rather rude "figure it out yourself". I am somewhat familiar with Tile Entities, as I already use them to perform the functions of the blocks in question, but from what I understand, Tile Entities are created on block placement in the world, and as such how one can "craft" one and have them be functionally separate items in the inventory (again, like RedPower wires) is beyond me. Help? Before anyone links me to Havvy's or Helfull's tutorials (which I have used), please note that they address a different problem - how to use the metadata to have different block types in the first place. What I need is something which functions like metadata without the 0-15 limit. I have been suggested ItemBlocks before, but how will that help with this, having 1 Block ID contain > 16 block types? Or will the ItemBlock also let me set a variable somewhere inside the block instance which can then be checked? (That is, if I, say, declare "private int type" inside Block.java, can the ItemBlock then execute something like Block.type = 2 @ the placed coordinates?) Also of note: I am using Minecraft 1.2.5, though in my experience the code is only different for a select few things at "mod initialization". I apologize if this has been asked before - I tried searching, but at > 90s to load a page, it is extremely cumbersome. EDIT: I forgot to mention: I looked at the BuildCraft source in attempt to learn how it accomplished the task; The result was akin to trying to learn basic calculus from a graduate-studies quantum mechanics textbook - that is, far beyond my understanding.
×
×
  • Create New...

Important Information

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