So to fix this bug, I need an answer to this question: How can I determine whether or not an item with 0 (or negative) durability is considered broken using only the information stored in the ItemStack object?
You can't that I know of but you could have a configurable blacklist of items not to damage as a workaround. It's not the ideal solution but does give users and modpack devs a fix.
Well, I am not sure how to check if it is considered broken, but I do have a couple other ideas. Personally I am not a huge fan of the blacklist idea; probably a good idea to have one just in case, but I know I'd still miss tons of items that would cause issues. Instead, would it be possible to just ignore items with 0 or less durability? The only other idea I have would be to somehow identify items that use RF/Energy instead of durability and exclude them; but not sure how easily that could be done and it would still miss some other items probably.
i was lookin forward to usin this but then i saw it was for 1.8- im usin 1.7.10 atm cause of my mods and i was wantin somethin like this to go with it and since its a little weird havin a grave stone appear where you die when i saw this it intrested me but since its 1.8 i cant use it
You can't that I know of but you could have a configurable blacklist of items not to damage as a workaround. It's not the ideal solution but does give users and modpack devs a fix.
Here's a simpler fix I just thought-up: I could make it completely ignore item damage values if the death damage is set to 0.
There's a backport for version 1.2.0 as well. Please use that one if you want to have a configurable inventory size.
Rollback Post to RevisionRollBack
My mods: Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes
Here's a simpler fix I just thought-up: I could make it completely ignore item damage values if the death damage is set to 0.
Are you saying ignore items with 0 durability on death or to ignore damage on items when the durability loss is set to 0? Because currently if the Durability Loss is on 0, it doesn’t seem to cause issues. Although it would be nice to still allow durability loss on death in mod packs with such items. Also, I know I brought this up before, but would it be possible to have a toggle on the rotten flesh and bones added on death? I personally would like to turn it off so it can't be abused (dying over and over to get free flesh and bones).
New version V1.3.0 (with backport for MC 1.7.10). It adds some language translations (I hope it translated correctly), fixed an item duplication bug I found, removed durability checking if death durability loss is set to zero, and added ability to make corpses disappear after a configurable amount of time (sorry I forgot to add option to turn-off bones and rotten flesh).
Are you saying ignore items with 0 durability on death or to ignore damage on items when the durability loss is set to 0?
The latter description (ignore damage on items when the durability loss is set to 0). Previously, an item with -1 durability would have its durability bumped up to 1 when added to the corpse, even if there was durability loss was set to 0.
Rollback Post to RevisionRollBack
My mods: Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes
The latter description (ignore damage on items when the durability loss is set to 0). Previously, an item with -1 durability would have its durability bumped up to 1 when added to the corpse, even if there was durability loss was set to 0.
Ah, thanks for explaining that. I wasn't aware that was even an issue. Let's hope that I don't find any more issues with the mod now =P
My mods: Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes
"corpse damage" {
# If true, corpses will be damaged by anything that damages a player. [default: false]
B:hurt_by_all=false
# If true, corpses will be damaged by being stuck inside a block. [default: false]
B:hurt_by_block_suffocation=false
# If true, corpses will be damaged by cacti. [default: false]
B:hurt_by_cactus=false
# If true, corpses will be damaged by creepers and TNT.
# If you don't want bodies to be destroyed by explosions,
# also disable fall damage. [default: false]
B:hurt_by_explosions=false
# If true, corpses will be damaged by falling long distances. [default: false]
B:hurt_by_fall=false
# If true, corpses will be damaged by fire and lava. [default: false]
B:hurt_by_fire=false
# If true, corpses will be damaged by damage sources not covered by the other options in this section. [default: false]
B:hurt_by_other=false
# If true, corpses will be damaged by attacking it. [default: false]
B:hurt_by_weapons=false
}
"corpse decay" {
# Time after death before a corpse will self-destruct (if the
# enable_corpse_decay option is set to true).
# The format is hours:minutes:seconds or just hours:minutes [default: 1:00:00]
S:corpse_decay_time=1:00:00
# If true, corpses will self-destruct after a preiod of time. [default: false]
B:enable_corpse_decay=false
}
options {
# The amount of damage a corpse can suffer before being
# destroyed and releasing its items.
# Note that 10 hearts = 20 HP. [range: 1.0 ~ 32767.0, default: 50.0]
S:corpse_HP=50.0
# The maximum number of items that can be stored in a
# corpse. Note that only 54 can be seen at a time [range: 54 ~ 16383, default: 108]
I:corpse_inventory_size=108
# The amount of damage suffered by damageable items when you
# die, to a minimum of 1 durability remaining (items will
# not be destroyed). [range: 0 ~ 1000, default: 32]
I:item_damage_on_death=32
}
Your config file is correct for the latest version. There have been several changes to the config file between version 1.0.0 and version 1.3.0.
In general, I update the middle version number (i.e. the 3 in 1.3.0) whenever I make a change to either the config file format or the NBT save format of the dead body.
Rollback Post to RevisionRollBack
My mods: Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes
The Meaning of Life, the Universe, and Everything.
Join Date:
2/14/2014
Posts:
50
Member Details
for the damaged items stuff, skimmed over, had idea
just set the item to 1 use from breaking? then whatever mods screw with break code, will continue to do so after 1 use
oh and possible to save like....the server tick time be stored on the body at death, and body ticking checks vs server time? result is body will last a 'real world time' value, instead of 'chunks loaded time' value - only reason i dont say use real server clock, is if server gets shut down 5 min after you die, all time during offline is counted
We have similar minds, Anxcon. That is exactly how it is implemented now (unless item damage is set to 0).
Rollback Post to RevisionRollBack
My mods: Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes
New update: I added a config option to disable bones and rotten flesh.
On a different note, I've received more crash reports caused by Lootable Bodies damaging items from other mods that are using the damage value as metadata instead of durability. Clearly, the isItemStackDamageable() function is a lie. I need a better way of detecting whether an item can be damaged. If anyone has any ideas, please let me know!
Rollback Post to RevisionRollBack
My mods: Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes
if its damageable, it shouldn't be stackable, it shouldnt be using meta unless its a damageable item o.O
the dyes use meta and are not damagable. A lot of mods do the same to allow many items to take 1 ID. The ID system may have changed in 1.7 but it is still there and still limits the mod add items.
The trouble isn't that damage values are used for metadata. The problem is that many mods do that AND return true when you call the isItemStackDamageable() function (all vanilla items that have metadata return false).
Rollback Post to RevisionRollBack
My mods: Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes
If I'm on a server, like the hive, and it does not have this mod installed, will i see dead bodies still? that is what I am interested in, especially seeing bodies in deathrun
You can't that I know of but you could have a configurable blacklist of items not to damage as a workaround. It's not the ideal solution but does give users and modpack devs a fix.
Mod Packs- Untamed Chaos (1.7.10), Moonlit Siege (1.7.10), Ascension (1.6.4)
Youtube- Minecraft Channel, Let's Plays (Ascension Hardcore, Proton), Mod Spotlights
there is a backport for 1.7.10 - https://github.com/cyanobacterium/DrCyanos_Lootable-Bodies/releases/tag/v1.1.3-backport
anyways thank you dr cyanos for back porting this to 1.7.10. its pretty funny to die then go loot myself
Here's a simpler fix I just thought-up: I could make it completely ignore item damage values if the death damage is set to 0.
There's a backport for version 1.2.0 as well. Please use that one if you want to have a configurable inventory size.
My mods:
Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes
Are you saying ignore items with 0 durability on death or to ignore damage on items when the durability loss is set to 0? Because currently if the Durability Loss is on 0, it doesn’t seem to cause issues. Although it would be nice to still allow durability loss on death in mod packs with such items. Also, I know I brought this up before, but would it be possible to have a toggle on the rotten flesh and bones added on death? I personally would like to turn it off so it can't be abused (dying over and over to get free flesh and bones).
Mod Packs- Untamed Chaos (1.7.10), Moonlit Siege (1.7.10), Ascension (1.6.4)
Youtube- Minecraft Channel, Let's Plays (Ascension Hardcore, Proton), Mod Spotlights
The latter description (ignore damage on items when the durability loss is set to 0). Previously, an item with -1 durability would have its durability bumped up to 1 when added to the corpse, even if there was durability loss was set to 0.
My mods:
Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes
Ah, thanks for explaining that. I wasn't aware that was even an issue. Let's hope that I don't find any more issues with the mod now =P
Mod Packs- Untamed Chaos (1.7.10), Moonlit Siege (1.7.10), Ascension (1.6.4)
Youtube- Minecraft Channel, Let's Plays (Ascension Hardcore, Proton), Mod Spotlights
My mods:
Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes
This is what it looks like
---------------------------------------------------------------------------------------------------------------------------------------------------------
# Configuration file
"corpse damage" {
# If true, corpses will be damaged by anything that damages a player. [default: false]
B:hurt_by_all=false
# If true, corpses will be damaged by being stuck inside a block. [default: false]
B:hurt_by_block_suffocation=false
# If true, corpses will be damaged by cacti. [default: false]
B:hurt_by_cactus=false
# If true, corpses will be damaged by creepers and TNT.
# If you don't want bodies to be destroyed by explosions,
# also disable fall damage. [default: false]
B:hurt_by_explosions=false
# If true, corpses will be damaged by falling long distances. [default: false]
B:hurt_by_fall=false
# If true, corpses will be damaged by fire and lava. [default: false]
B:hurt_by_fire=false
# If true, corpses will be damaged by damage sources not covered by the other options in this section. [default: false]
B:hurt_by_other=false
# If true, corpses will be damaged by attacking it. [default: false]
B:hurt_by_weapons=false
}
"corpse decay" {
# Time after death before a corpse will self-destruct (if the
# enable_corpse_decay option is set to true).
# The format is hours:minutes:seconds or just hours:minutes [default: 1:00:00]
S:corpse_decay_time=1:00:00
# If true, corpses will self-destruct after a preiod of time. [default: false]
B:enable_corpse_decay=false
}
options {
# The amount of damage a corpse can suffer before being
# destroyed and releasing its items.
# Note that 10 hearts = 20 HP. [range: 1.0 ~ 32767.0, default: 50.0]
S:corpse_HP=50.0
# The maximum number of items that can be stored in a
# corpse. Note that only 54 can be seen at a time [range: 54 ~ 16383, default: 108]
I:corpse_inventory_size=108
# The amount of damage suffered by damageable items when you
# die, to a minimum of 1 durability remaining (items will
# not be destroyed). [range: 0 ~ 1000, default: 32]
I:item_damage_on_death=32
}
---------------------------------------------------------------------------------------------------------------------------------------------------------
In general, I update the middle version number (i.e. the 3 in 1.3.0) whenever I make a change to either the config file format or the NBT save format of the dead body.
My mods:
Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes
just set the item to 1 use from breaking? then whatever mods screw with break code, will continue to do so after 1 use
oh and possible to save like....the server tick time be stored on the body at death, and body ticking checks vs server time? result is body will last a 'real world time' value, instead of 'chunks loaded time' value - only reason i dont say use real server clock, is if server gets shut down 5 min after you die, all time during offline is counted
My mods:
Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes
On a different note, I've received more crash reports caused by Lootable Bodies damaging items from other mods that are using the damage value as metadata instead of durability. Clearly, the isItemStackDamageable() function is a lie. I need a better way of detecting whether an item can be damaged. If anyone has any ideas, please let me know!
My mods:
Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes
the dyes use meta and are not damagable. A lot of mods do the same to allow many items to take 1 ID. The ID system may have changed in 1.7 but it is still there and still limits the mod add items.
My mods:
Base Metals, Power Advantage, Steam Advantage, Electric Advantage, Minecraft Mineralogy, Dr. Cyano's Lootable Bodies, Dr. Cyano's Wonderful Wands & Wizarding Robes