
onVoid
Members-
Posts
48 -
Joined
-
Last visited
Everything posted by onVoid
-
[1.7.10] Keeping RF energy in a machine after relog
onVoid replied to onVoid's topic in Modder Support
Checked logs, no errors. -
[1.7.10] Removing RF from storage as item is receiving energy
onVoid replied to onVoid's topic in Modder Support
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). -
[1.7.10] Removing RF from storage as item is receiving energy
onVoid replied to onVoid's topic in Modder Support
How would I get the amount returned from the item's receive method? -
[1.7.10] Keeping RF energy in a machine after relog
onVoid replied to onVoid's topic in Modder Support
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. -
[1.7.10] Keeping RF energy in a machine after relog
onVoid replied to onVoid's topic in Modder Support
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? -
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?
-
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.
-
[Semi-Solved] [1.7.10] Getting RF item to charge in a custom charge
onVoid replied to onVoid's topic in Modder Support
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? -
[Semi-Solved] [1.7.10] Getting RF item to charge in a custom charge
onVoid replied to onVoid's topic in Modder Support
Alright. I will begin searching for that method in CoFHLib. In the meantime, if anyone knows it, please inform me. Thanks! -
[Semi-Solved] [1.7.10] Getting RF item to charge in a custom charge
onVoid replied to onVoid's topic in Modder Support
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. -
[Semi-Solved] [1.7.10] Getting RF item to charge in a custom charge
onVoid replied to onVoid's topic in Modder Support
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... -
[Semi-Solved] [1.7.10] Getting RF item to charge in a custom charge
onVoid replied to onVoid's topic in Modder Support
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. -
[Semi-Solved] [1.7.10] Getting RF item to charge in a custom charge
onVoid replied to onVoid's topic in Modder Support
New to NBT tags, my bad. -
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(); } }