Jump to content

onVoid

Members
  • Posts

    48
  • Joined

  • Last visited

Everything posted by onVoid

  1. I guess from me being oblivious. chargingDC and chargingDC2 are from a complicated method of keeping track of energy being used that I attempted. I removed static tags, running a test now.
  2. TileEntity: http://pastebin.com/p4Bi42qg Gui: http://pastebin.com/aCGSPub9 Container: http://pastebin.com/ErQ8i332
  3. For which part? TileEntity? Gui? Container?
  4. Checked logs, no errors.
  5. 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).
  6. How would I get the amount returned from the item's receive method?
  7. 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.
  8. I can't see the log since I am testing the mod outside of the modding environment (if anyone wants to help me get mods working in the environment that would be great), and my TileEntity is registered in initialization GameRegistry.registerTileEntity(ChargerTileEntity.class, "Charger"); . It also has working features.
  9. I have this @Override public void readFromNBT(NBTTagCompound nbt) { super.readFromNBT(nbt); storage.readFromNBT(nbt); } @Override public void writeToNBT(NBTTagCompound nbt) { super.writeToNBT(nbt); storage.writeToNBT(nbt); } and it isn't saving. I also attempted making it a TileEnergyHandler, also nothing. What am I missing?
  10. I would assume this would be done with NBT in my tile entity, and I know there are readFromNBT() and writeToNBT() methods in my tile entity, but I am unsure how to go about using them to store my RF values. Can anyone help me please?
  11. With EnderIO items when I take it out of my custom charger, fully charged, it removes the charge and reverts to its uncharged state. But, if press a number key on the item to make it go to my hotbar, it keeps the charge. Anyone know why this is happening?
  12. How would I change the charge of an IC2 item? I have my charger done I just need some insight on how to set the charge.
  13. I got the charging working (using IEnergyContainerItem and ItemEnergyContainer) but I am having another problem. With EnderIO items when I take it out of the machine, fully charged, it removes the charge and reverts to its uncharged state. But, if press a number key on the item to make it go to my hotbar, it keeps the charge. Anyone know why this is happening?
  14. Alright. I will begin searching for that method in CoFHLib. In the meantime, if anyone knows it, please inform me. Thanks!
  15. Either way, as I said, the items I am trying to charge aren't my items, so I can't do anything to the item class.
  16. Thank you, kind sir. I was just a bit unsure about the things you were saying. I will test this out in a bit. EDIT: The items I am charging aren't my items, they are items from EnderIO and Thermal Expansion. So I don't really have an item class...
  17. Thank you so much for pointing out my mistake! I got it working. EDIT: The item charges and the charges displays in the item lore, but when taking it out of the machine it resets. Also, the durability bar still doesn't work.
  18. I have this custom Redstone Flux charger (with usage of the CoFHLib) and it gets powered and such perfectly. I am unsure how to go about getting it to charge items, though. I have attempted to edit the NBT tag of the item (all of the items have a "Energy" NBT tag), and editing it works, but it doesn't change the charge bar of item lore. Any help? Thanks! Current code: if (slots[10].hasTagCompound()){ NBTTagCompound = slots[10].getTagCompound(); if (.hasKey("Energy")){ .setString("Energy", Integer.parseInt(.getString("Energy"))+20 + ""); slots[10].setTagCompound(); } }
×
×
  • Create New...

Important Information

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