Skip to content

Item/ItemStack cleanup #524

Closed
Closed

Description

@bs2609
  • Item:

    • func_77639_j: getItemStackLimit -> getMaxStackSize
    • func_77614_k: getHasSubtypes -> hasSubtypes
    • func_77627_a: setHasSubtypes -> withSubtypes
    • func_150897_b: canHarvestBlock -> canHarvest
    • func_111207_a: itemInteractionForEntity -> attemptEntityInteraction / interactWithEntity ?
    • func_77661_b: getItemUseAction -> getUseAction
    • func_77626_a: getMaxItemUseDuration -> getUseDuration
    • func_77653_i: getItemStackDisplayName -> getDisplayName
    • func_77619_b: getItemEnchantability -> getEnchantability
    • func_82788_x: canItemEditBlocks -> canModifyWorld ?
    • func_82789_a: getIsRepairable -> isRepairable
    • func_111205_h: getItemAttributeModifiers -> getAttributeModifiers
    • field_77701_a: tabToDisplayOn -> creativeTab / group
    • field_77697_d: itemRand -> random
    • field_77789_bW: bFull3D -> full3D
  • ItemStack:

    • func_77984_f: isItemStackDamageable -> isDamageable
    • func_77981_g: getHasSubtypes -> hasSubtypes
    • func_150998_b: canHarvestBlock -> canHarvest
    • func_77951_h: isItemDamaged -> isDamaged
    • func_77952_i: getItemDamage -> getDamage
    • func_77964_b: setItemDamage -> setDamage
    • func_111282_a: interactWithEntity -> attemptEntityInteraction / (keep) ?
    • func_77975_n: getItemUseAction -> getUseAction
    • func_77988_m: getMaxItemUseDuration -> getUseDuration
    • func_151001_c: setStackDisplayName -> setDisplayName
    • func_135074_t: clearCustomName -> clearDisplayName
    • func_77956_u: isItemEnchantable -> isEnchantable
    • func_77948_v: isItemEnchanted -> isEnchanted
  • Slot:

    • func_178170_b: getItemStackLimit -> getMaxStackSize
  • InventoryPlayer:

    • func_184432_b: canHarvestBlock -> canHarvest
  • EntityPlayer:

    • func_184823_b: canHarvestBlock -> canHarvest

Activity

  1. marvin-roesch commented on Sep 20, 2017

    @marvin-roesch
    Contributor

    Overall great suggestions, only the withSubtypes jumps out at me, but I also can't come up with a better name off the top of my head, except maybe enableSubtypes to express the side effects more clearly. There's also a small typo in getEnchantablility ^^

  2. bs2609 commented on Sep 20, 2017

    @bs2609
    ContributorAuthor

    Here's the onEvent names that could do with changing. I've included the names that I thought sounded best individually, but any suggestions for good names that are more consistent would be welcome.

    • Item:

      • func_180614_a: onItemUse -> onUse ?
      • func_77659_a: onItemRightClick -> onRightClick ?
      • func_77654_b: onItemUseFinish -> onFinishedUsing ?
      • func_77615_a: onPlayerStoppedUsing -> onStoppedUsing ?
    • ItemStack:

      • func_179546_a: onItemUse -> onUse ?
      • func_77957_a: useItemRightClick -> onRightClick ?
      • func_77950_b: onItemUseFinish -> onFinishedUsing ?
      • func_77974_b: onPlayerStoppedUsing -> onStoppedUsing ?
  3. williewillus commented on Sep 20, 2017

    @williewillus
    Contributor

    onItemUse/onItemRightClick are still ambiguous. Since we're renaming we can take the opportunity to clarify those.

    onItemUse is when the item is right clicked while targeting a block, onItemRightClick is when onItemUse passes or the player is not targeting a block

  4. self-assigned this
    on Sep 20, 2017
  5. marvin-roesch commented on Sep 22, 2017

    @marvin-roesch
    Contributor

    I feel like this doesn't require a separate issue, so an additional suggestion:
    func_150898_a: getItemFromBlock -> fromBlock

  6. kashike commented on Aug 29, 2018

    @kashike
    Collaborator
    • func_77639_j: getItemStackLimit -> getMaxStackSize
    • func_111205_h: getItemAttributeModifiers -> getAttributeModifiers
    • func_77956_u: isItemEnchantable -> isEnchantable
    • func_77948_v: isItemEnchanted -> isEnchanted
    • func_77661_b: getItemUseAction -> getUseAction
    • func_77626_a: getMaxItemUseDuration -> getUseDuration
    • func_77975_n: getItemUseAction -> getUseAction
    • func_77988_m: getMaxItemUseDuration -> getUseDuration
    • field_77697_d: itemRand -> random
    • func_77951_h: isItemDamaged -> isDamaged
    • func_77952_i: getItemDamage -> getDamage
    • func_77964_b: setItemDamage -> setDamage
    • func_77984_f: isItemStackDamageable -> isDamageable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions