Jump to content

TheEpicTekkit

Members
  • Posts

    361
  • Joined

  • Last visited

Everything posted by TheEpicTekkit

  1. How would I make a recipe class but for fluids? like the furnace recipe class. I also don't know how to do multiple outputs. I need to learn how hashmaps work...
  2. How do I get the fluid from a bucket in a slot in the inventory to fill a tank, and return a empty bucket?
  3. Okay, so I have got my inventory accepting fluids, but I now need to know how I can make it so that when there is a fluid in one tank, it will get turned into 5 different fluids in 5 other tanks. I have one input tank, 4 output tanks, and a bi-product tank. How would I get this working? I dont know where to start. (I also want to be able to have multiple recipes that have different outputs depending on the input fluid) Also, just curious about this, how would I make an inventory have more than 6 tanks, as the tank that you input to and output from is determined by the side of the block you pump into/out of. so if I were to add more than 6 tanks, would I be able to access them all?
  4. Okay.... so, I have finally got this fluid drawing in the gui working, now to add multiple tanks... how do I make it so that if I put a certain fluid in a certain tank, it uses up some of that fluid to fill the other 5 tanks each with a different fluid? basically a fluid recipe
  5. Where would I put this? in the tileentity? where in the tileentity? anywhere? what do I have to change, I dont understand packets as I said before.
  6. Okay, thanks for the help, I'll update here tomorrow as I have to go now.
  7. Just curious, how do you do that 'here' link thing?
  8. I am not sure if I am rendering fluids correctly in the gui. This is my code so far: Now, I dont know if this is the correct way to render the fluids, I looked at how buildcraft rendered fluids in the combustune engine to figure out what I have so far, but I don't know if I have missed anything, what they have is spread across several classes. Buildcraft github: https://github.com/BuildCraft/BuildCraft/tree/6.1.x/common/buildcraft/energy
  9. I think now that the way I am rendering the fluid in the gui is wrong... how am I ment to render fluids in a gui?
  10. markBlockForUpdate sounds a lot simpler.... just that 1 line of code?
  11. I don't understand. I know what packets are, and what they are for, but that is about it, I dont know how to set them up (I know I should know this, but I am still new to mc modding and java). So far in my mod, I haven't used them, I haven't even got a PacketHandler. Where would this example code go? Im assuming from the nbt methods, that it would go in the tileentity, (just checking though)
  12. How do I tell the client what fluids the server has?
  13. Actually, I think youre right, because I can put 50 universal fluid cells of fluid into the tank, then I can take 50 universal fluid cellls of fluid back out again. Also, after I take everything out with fluid cells, the buildcraft pipes put more in, and I can then take more out with the cells. So I guess it must be the server side client side sync issue. How would I solve this?
  14. Also, im still fairly sure that the tileentity isnt working properly, because like I said before, I can only add 1mB of fluid to the tank, even if I click it with the bucket multiple times, it doesnt add anything. You know, a good way to see if it is working would to have a tooltip telling me what fluid exists in the tank. How would I do a tooltip when the player mouses over the tank? Also, my issue with the texture is fixed. your suggestion worked.
  15. Okay, how do I tell the client what fluids the server has?
  16. So, does that mean that there isn't a problem with the tileentity fluid methods? I'm pretty sure that that isn't the problem, because when I right click on the block with a bucket, it puts I think 1mB of liquid in it, and renders a weird bar in the gui, this is because I havnt done the gui right, and need to finish it (not sure how to) but my point is that it renders something in the gui when clicked with a bucket, but automation like pipes doesnt, so i think there is a problem with the way the tileentity accepts fluids.
  17. So, I have a custom fluid tank, and it seems that it is deleting the fluid when it receives it. Either that, or the gui isnt rendering the fluid correctly. but I think it is the tank deleting the fluid. I am using buildcraft pipes to pump the liquid into the tank. This is my tank methods in the tileentity (very long class, so I am only showing the relevent code) What am I doing wrong?
  18. Actually, nevermind, that hasnt worked, the fluid is still invisible in the fluid transposer.
  19. Ah, now I understand. I added into the block class: FluidHandler.fluidCrudeOil.setIcons(iconStationary, iconFlowing); So I am registering the icon for the fluid not the block, but from the block class. And yes, I do have a static instance of the fluid.
  20. I don't quite understand. So it goes in the fluid class not the block class?
  21. The textures in the world are correct, just in tanks. So do I add YourFluid#setIcons(stillIcon,flowingIcon) to the block class?
  22. You are using the static modifier wrong, if you use the static modifier on a variable or method, you are setting that variable or methods value universally. In your case, this means that all instances of your block are going to have the same orientation. So when you place a new block, it will update the orientation of all other instances of that block in the world. To fix this, you need to remove the static modifiers. So for example instead of: public static void onBlockPlacedBy(...) change it to: public void onBlockPlacedBy(...) Please research what the static modifiers mean. This is basic java.
  23. Now Im even more confused, I have no idea where I am going wrong. The tileentity class, the gui class, the block class.... really confused. Also, there isnt any tutorials on fluids in guis there needs to a be a tutorial on this somewhere.
×
×
  • Create New...

Important Information

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