Jump to content

Viesis

Members
  • Posts

    46
  • Joined

  • Last visited

Everything posted by Viesis

  1. Thank you so much @warjort! I was so confused. I actually started to put in a data accessor to watch the 5 inventory spaces I cared about (I use data accessors for quite a few things in my machines already to sync info), but just in reading some of the documentation on capabilities, it really sounds like there was something specific I could do in capabilities itself. Too many times I have not asked a question and did someone 10 times harder, just to find out I could of call a few simple lines, hook into a system already there, and gotten the same result. Greatly appreciate it! You rock!
  2. I have an entity that uses the ForgeCapabilities.ITEM_HANDLER for an inventory. It works very well. The server keeps track of the items and I get no issues. What I am looking for are any leads on how to sync the client with the server. Currently, I have an entity that will render a model part based on an item in a particular itemslot. The entity doesn't update until you manually open up the gui. According to the minecraft forge docs about capabilities under the synchronizing data with clients, by default, capability data is not sent to clients. I see it says send a synchronization packet and the docs suggest 3 generic options. I can't really find an example of the kind of packet you need to send. The forge docs, while giving a descriptive "how to", isn't filling in the gaps for me. Does anyone have a site or github example for syncing the client to server for capabilities? I have tried various how to videos starting at forge 1.14 up to 1.19, various web sites, and tried looking at the forums here. Any guidance would be greatly appreciated. Thanks in advanced!
  3. I am looking for a way to get an entity that I hover over (client side). I was able to do this via my EntityRenderer using the following in 1.12.2: Entity raytraceHitTarget = Minecraft.getMinecraft().objectMouseOver.entityHit; I notice that the "objectMouseOver" doesn't have ".entityHit". Is there a better way to return an entity I am targeting? Any direction would be appreciated. Thank you!
  4. Thank you for the reply @V0idWa1k3r. I had a feeling that would be the case. I didn't think there were any instances in Minecraft where that happens. I was trying to preview particles on an entity before players could accept them. They may just have to go in blind. Haha
  5. Just as an update, I found out that the particles were spawning. I was using the mouse x/y so I could easily see if there was anything in the gui for my test and I happen to be looking up. My smoke particles were racing across the sky as my mouse moved. Not exactly the outcome I was hoping for.
  6. Like the title says, is there a method/way to spawn particles in a GUI? I have an entity displayed in my gui and noticed that the particles it has isn't show up in the GUI. My particles are working in game. I tried to just spawn smoke particles in drawGuiContainerBackgroundLayer and drawGuiContainerForegroundLayer but I am getting nothing generating. Any direction would be greatly appreciated. Thanks!
  7. You write the model yourself? No 3d creating software than techne to visualize you models?
  8. Is there a way to make the text on a button smaller? I have been trying random things and no thing seems to be working. I have been trying to use GlStateManager.scale() but I feel like I am just missing something maybe?
  9. I used techne to make the models. I didn't have much luck all together. The texture tiling was the first part, but you can only bind one texture to a model at a time. I wanted to just tile the bottom texture and then have a static generic overlay on top. Didn't see a way to do what with a entity model.
  10. Just so people know, it looks like you cannot overlay multiple textures (bind more that one on a model for, say, an entity) without having to jump into opengl, which is deeper than I wanted to dive into.
  11. Maybe is there a way to overlay textures on top of a model? like lets say I make a repeating texture and place that on the model then overlay generic details on top of that in layers like you can do with blocks and items?
  12. I am not sure if I can do what I want to do. I just didn't want 50+ extra bigger textures per model because I wanted to give people the option to skin it and customize it.
  13. Well setting that take the vanilla texture and tries to stretch it over the model which starts to looks bad. Hard to tell what it is. Is there a way to like stitch that texture into a new texture and use that?
  14. Hello, I am wondering if it is possible to use a vanilla texture like oak planks on an entity mondel, say a custom boat? This is why I want to do it. I have a entity like a boat that I want to be able to texture it with numerous textures, like oak planks for example. I figure instead of making a custom texture for each building block (which can make my mod a lot bigger having each individual texture for the model for 40+ building blocks), I can just pull from, again, the oak plank vanilla texture so that if someone uses a texture pack, it will use their texture of oak planks to overlay it on the boat. I know the 16 bit textures are small, so if this can be done, is there a way to take the simple 16x and repeat it over the model? I am not sure if I am being clear or not, but any help would be appreciated. If needed, I could whip up some pictures to show what I mean. Thank you!
  15. I was able to find out how to unlock all of my recipes for testing purposes, still not sure how to make my own recipe book tab but that is something I can add later. Thank you for your help!
  16. Hello, I am wondering if there is a way to add your own mod tab to the recipe book so that you can separate your recipes a little easier? Also, Is there a way to just ahve the recipes auto learned? Thank you for any leads!
  17. I greatly appreciate the help! This should be a pretty easy fix. Thanks!
  18. I am wondering if there is an easy way to have a hopper only be able to extract items out of a particular inventory slot of a custom tile entity? I have something similar to a furnace, and I would like the hopper to only extract finished products (stack in slot 1) and to insert fuel as needed (stack in slot 0). I just do not know where to start on this, or if it is something that can be done without messing with hopper logic. I am using the capabilities for my tile entity inventory but again, just not sure how to approach this as hoppers currently take out all fuel first, then finished products. Any help would be greatly appreciated. Thanks!
  19. Thank you everyone for your responses, I will be tackling this tonight. I found how the MovingSoundMinecart was called but I am getting no sound when I try to mimic it. I will see what I can do. Edit: AAANNNDDD, my volume was at 0. Looks like it is working pretty well now. Ahh, I knew it was probably something minor. Again, thank you everyone for your help. I really appreciate it.
  20. Thank you, I was able to stop the background music when I wanted to play a song.
  21. I found MovingSoundMinecart and See that I could just made a new generic one, but just not sure how to call it. I haven't really worked with sounds, and I don't think I use the player.playSound(SoundEvents.RECORD_WARD, 0.5F, 0.5F) I had as a test since it will play based on my players pos and not move.
  22. Is there a way to play a sound (a song in this case) and have it follow the player when they move? I see that Entity::playSound seems like it just get the position and executes the sound at said position, almost like a record. When you move away form the pos, it fades. I am trying to find a way to play a song on an entity, like a player, and have it follow them, if that is possible. Any direction would be much appreciated. Thank you. Edit: Also is there a way to disable the background music while said song is playing?
  23. I currently have a custom crafting table that stores items in it. What I would like to do is render an item (either in 2d or 3d from a block) from a particular item slot in a tile entity and have it appear on top of my crafting table. I am honestly not sure where to start. I think I would have to get the item from the slot and in the renderer for my tile entity, have the item in said slot "rendered" as well, but really not sure how to do it. I tried to look at RenderItemFrame, but so far haven't seen what I really need to focus on to get it working. Any suggestion on where to look or what to read would be appreciated. Thanks!
  24. I figured out my issue and am posting what I did to potentially help others. You were right with the SlotItemHandler, but I used a different approach. Since my issue was with saving it to the capabilities storage, I decided to try and make it simple. I was able to use the crafting matrix and the IInventory crafting result (used with the vanilla workbench), and created a extra load/save method. When you click on my workbench now, it loads the items from the TileEntity inventory into the matrix, and when you close, it saves the item slots from the matrix back into the TileEntity inventory. Nice and easy. I do appreciate the help.
  25. I do have a tile entity made and working that can store items with the capabilities system. I just am not sure how to make my 3x3 slots that use the IItemHandler to the crafting result that seems to use IInventory (using the vanilla crafting table as my example).
×
×
  • Create New...

Important Information

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