pokecubes being not repairable
CharCharthemonkey opened this issue ยท 2 comments
TBH idek if this is a bug or feature so went with blank report but was hoping if its intended to have cubes be repairable please lmk but if not then add .setnotrepairable pls cause it conflicts with another mod called Gobber please and thank you
Gobber author here to add a bit more info
the player is using my ring of repair item, that repairs items that have lost durability.
I do this by running a repair tick handler off the forge event bus.
I run this code:
private static void repairInInventory(Player player, Inventory inv)
{
for(int slot = 0; slot < inv.getContainerSize(); slot++)
{
ItemStack target = inv.getItem(slot);
if (!target.isEmpty())
{
if (!(target == player.getMainHandItem()))
{
if (target.isDamaged() && target.getItem().isRepairable(target))
{
target.setDamageValue(target.getDamageValue() - 1);
return;
}
}
}
}
}
If it is intended for poke cubes to be repairable, then no issue. If not, then putting the .setNoRepair item property will correct that.