Posted May 20, 20169 yr So, I have a basic charger TileEntity and I am looking for a way to remove the exact amount of energy from my EnergyStorage as the amount of energy that goes into the item (like ThermalExpansion's energetic infusor). How can I do this? Note: I am using the RF Api.
May 21, 20169 yr Just store the amount returned from the item's receive method and pass it into your extract method. Don't make mods if you don't know Java. Check out my website: http://shadowfacts.net Developer of many mods
May 21, 20169 yr Author Just store the amount returned from the item's receive method and pass it into your extract method. How would I get the amount returned from the item's receive method?
May 21, 20169 yr Presumably the method returns a value, that value being the amount inserted. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given.
May 21, 20169 yr Author Presumably the method returns a value, that value being the amount inserted. The method is an int, but I can't see a correlation. This is the code: int x = 0; x = ((IEnergyContainerItem)slots[10].getItem()).receiveEnergy(slots[10], 7000, false); extractEnergy(x, false); When finishing the charging an item with max 250,000 RF (and my storage has 600,000 RF in it), the storage is left with 95,000 RF (it's using 505,000).
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.