Reliquary Reincarnations

Reliquary Reincarnations

71M Downloads

[1.18.2] Alkahestry Tome cannot fuel Altars of Light

yanang007 opened this issue ยท 1 comments

commented

Game version: 1.18.2
Mod version: Reliquary 1.18.2-2.0.8.1139

Step to reproduce:

  1. Place an Altar of Light and charge the Alkahestry Tome with redstone.
  2. Right click Altar of Light with Alkahestry Tome in hand does not fuel it.

Expected result:
Alkahestry Tome can successfully fuel the altar.

Possible cause is that Alkahestry Tome puts its charge data under "charge" tag:

public static ItemStack setCharge(ItemStack tome, int charge) {
NBTHelper.putInt("charge", tome, charge);
return tome;
}

but Altar of Light get its charge through "redstone" tag:
} else if (heldItem.getItem() instanceof AlkahestryTomeItem && NBTHelper.getInt(REDSTONE_TAG, heldItem) > 0) {
world.playSound(null, pos, SoundEvents.BLOCK_LAVA_EXTINGUISH, SoundCategory.BLOCKS, 0.3F, 0.5F + 0.5F * altar.getRedstoneCount() + (float) (world.rand.nextGaussian() / 8));
for (int particles = world.rand.nextInt(3); particles < 3 + altar.getRedstoneCount() * 4 + altar.getRedstoneCount(); particles++) {
world.addParticle(RedstoneParticleData.REDSTONE_DUST, pos.getX() + 0.5D + world.rand.nextGaussian() / 5, pos.getY() + 1.2D, pos.getZ() + 0.5D + world.rand.nextGaussian() / 5, 1D, 0D, 0D);
}
if (world.isRemote) {
return ActionResultType.SUCCESS;
}
NBTHelper.putInt(REDSTONE_TAG, heldItem, NBTHelper.getInt(REDSTONE_TAG, heldItem) - 1);
altar.addRedstone();
}

commented

Fixed in the latest release