Jump to content

ProspectPyxis

Members
  • Posts

    33
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

ProspectPyxis's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. I guess I'll have to poke the mod author about this one, then. Thanks for the help.
  2. Alright, after some testing, it seems that for whatever reason, the chopping block won't trigger PlayerDestroyItemEvent, either. Which is odd, because looking at Pyrotech's code, it seems to use stack.damageItem properly for this. Wonder what's going on...
  3. So, here's what I wanna do: I have an item that's supposed to be used with another block that would damage it (if you want specifics, it's supposed to be for Pyrotech's chopping block). I want it so that once the item runs out of durability, it'd transform into another item rather than breaking outright. I can't seem to figure out how I'd do this, though. Here are the things I've tried: Edit the setDamage function. Problem is, there's no method to change the stack's item or get the holder of the itemstack that I've seen, so it wouldn't work. Use onItemUseFinish. It...doesn't seem to fire at all with this. Subscribe to PlayerDestroyItemEvent. This feels too unspecific, and the event might fire when I don't want it to. Is there some way of doing this properly?
  4. That makes sense. Thank you for your help!
  5. So since I want to only do something with the item if you're holding it, I'd check if the player is holding the item first before sending the packet, correct?
  6. I mean, I already know how to send packets, I'm just not sure about the performance impact which, looking back, shouldn't really be that big even combined with the few other packets already in the mod. Oh well, I'll be looking into the event then.
  7. I want an item to do something when you left click it while pointing at the air. How would I do this? I tried subscribing to onEntitySwing, but that event seems to also fire even if you're pointing at a block or entity. I also tried checking if the player is looking at anything with Item.rayTrace, but the method always returns null somehow. One way I've seen is subscribing to a clientside event, but from my understanding that would require a packet, and I'd like to limit that if possible. Is there any other way, or is that the best way?
  8. Hm, I suppose I'll go with the keybind route, then. Thanks for the help anyways!
  9. I'm gonna have to look into all those methods, but one more thing you're missing: I only want to change the mode when shift-right clicking the item, not just when hovering while holding shift. Since a right click constitutes removing the item from the inventory temporarily, I assume this will be a bit more difficult? If it gets too impractical to implement, I can simply use a keybind while holding the item for this, but I wanna see what I can do first.
  10. Just an NBT change so that the item knows what "mode" it's in and behave accordingly.
  11. I'm trying to make an item change its mode by shift-right clicking while hovering over the item in an inventory screen. How would I do this? I don't see any methods in the Item class that would do something like this.
  12. I went with offsetting the blockpos for the lighting issue, and it works perfectly now. Thank you!
  13. Alright, so adding a lightmap value actually got rid of the weird stretching, but now I have a couple new problems, as you can see in the image here: The texture is completely dark. The texture doesn't fully fill the outline of the blockstate texture - you can see the empty gaps in the image. How would I fix this? The new TESR code is here (I'm only testing for one face for now so I removed a massive chunk of the code):
  14. So from what I can understand from the code you sent, one square face of a block is equal to four vertices. I don't really know what I'm doing wrong, though, since I already translated the buffer in the first line of renderTileEntityFast - do I need to add an offset to the pos as well? Also, is a lightmap value absolutely required? It seems to be used in all the code you've sent me but I don't fully understand what it does.
  15. So this is a bit of a follow up to my previous topic - I'm currently trying to use a FastTESR to render a tile entity that stores its color. I can't really find any pointers on how to use it, though - trying to follow a code example I found just...made it break horribly, as you can see in the attached image. Here's the relevant code that I'm using, can anyone give some pointers on what I'm doing wrong? FastTESR class: ClientProxy where the textures are registered: TileEntity class:
×
×
  • Create New...

Important Information

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