Jump to content

Tallinu

Members
  • Posts

    6
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Tallinu's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. I'm still working on figuring out how to use the packet system myself, but I do see a problem with the code you posted, and solving it might help. Mainly, you're trying to read three ints, but only sending two, so you're probably getting a stack trace every time - and may be failing to record any of the packet input. I'm assuming you have defined 'coords' somewhere in the class containing onPacketData(), but I'm not sure what the exact results would be of this situation. Make sure what you're sending and receiving matches exactly. Also, I don't see anything that appears to be transferring information about the properties you described (weapon, team, and texture). Unless "coords" actually contains that information, in which case it's a poor choice of variable naming. Finally, in SendType, why create an array and loop like that? You could simply write: data.writeInt(i); data.writeInt(j); For information that doesn't come in the form of an array to begin with, there's really no need to try to reformat it that way. As long as the sequence and data types are the same on the sending and receiving ends, you should be fine. Hopefully this will be of some use to you!
  2. Thanks for the suggestion, Overmind, and the list, Methuselah. I'll have a look at what those are doing. The internal workings are coming together more or less smoothly, so we'll be at the "it does what we want it to, now how can we make it look great while doing it" stage soon enough.
  3. Looking at the code, I can only find a few that appear to do so, at least calling it by that name. What am I missing?
  4. Okay, thanks. Is there any advice you can give or direct me to on working with and/or implementing that?
  5. Right, first 3 bits are for orientation. I do have that working now, at least. (The code is at https://github.com/Tallinu/InventoryStocker if that's any help.) I could use bit 4 to switch between one of two states for the entire block, and control the state of bit 4 from the tile entity. But I'd like to have more than two states, and if I'm going to animate them at all I'd like it to be based on their individual state, not just a global "flashy lights" or "spinny wheel" thing. How do I get more than 1 additional bit of information from the tile entity, or get direct access to the tile entity, from the Block functions that are supposed to return the texture index? Even the 'with meta data' version doesn't appear to have any information regarding the block's location or the specific tile entity associated with the block at the location in question.
  6. I have created a block with an inventory, with the intent for it to interact with an adjacent block's inventory, and I'm having trouble figuring out two things: First, how to determine which direction it should face when placed or manipulated by a player, and second, how to store and retrieve that information, especially for the purpose of determining which texture index to specify for each side in public int getBlockTextureFromSide(int i). I'd like to be able to (eventually) animate certain sides as well. I assume information specific to each individual block's state needs to go into the tile entity along with the inventory contents and such, but I'm confused as to how you get AT that specific information from the aforementioned function, since it doesn't offer any way to know what world coordinates it's dealing with. I suspect I may not be looking in the right places, but I don't know what else to look at. I don't need a custom render model like Buildcraft's engines. I'm perfectly happy with a standard cube like RedPower's machines and most other mods that make things face the same direction you are when placed. Any advice would be appreciated. Edit: I've been looking at pistons, but the metadata approach doesn't appear to allow for texture animation or changing appearance based on tile entity state. There's only 4 bits available, 3 of which would be required for the orientation. Right?
×
×
  • Create New...

Important Information

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