Gendustry

Gendustry

35M Downloads

Scooporator gives water hive on sneak+harvesting rocky hives.

BaronNox opened this issue ยท 2 comments

commented

MC: 1.7.10
Gendustry: 1.6.3.132
Forge: 10.13.4.1614

Seems to be a bug in:

gendustry/src/net/bdew/gendustry/items/IndustrialScoop.scala

override def onItemUse(stack: ItemStack, player: EntityPlayer, world: World, x: Int, y: Int, z: Int, side: Int, xOff: Float, yOff: Float, zOff: Float): Boolean = {
    if (!player.isSneaking) return false
    if (world.isRemote) return true
    val block = world.getBlock(x, y, z)
    if (block.getHarvestTool(world.getBlockMetadata(x, y, z)) == "scoop" && getCharge(stack) >= silktouchCharges && getCharge(stack) >= silktouchCharges) {
      useCharge(stack, silktouchCharges, player)
      ItemUtils.dropItemToPlayer(world, player, **new ItemStack(block, 1, block.getDamageValue(world, x, y, z))**)
      world.setBlockToAir(x, y, z)
      true
    } else false
  }

Code inside ** ** is responsible for the bug I think.
block.getBlockMetadata(world,x.y.z) might be the fix here but I'm not sure.

commented

I think it's a problem with how the hive block is defined, getBlockMetadata is for metadata when placed as a block, getDamageValue should return the metadata in item form.

commented

I'm closing this issue as part of a spring cleaning of my issue trackers from old stuff.

If you believe it's a bug that is still relevant in Minecraft 1.12 - Feel free to reopen it.