PluginBugs / Issues-ItemsAdder

Repository used to keep track of issues of my plugin ItemsAdder
https://itemsadder.devs.beer
54 stars 21 forks source link

Replace_near_blocks. It doesn't work correctly #1500

Closed MrJorman closed 2 years ago

MrJorman commented 2 years ago

Terms

Discord tag (optional)

CrackedLix#3875

What happened?

I want to repeat the idea of the Chisel mod, where using a chisel or saw, you can make different other blocks from blocks and use the right mouse button or the left mouse button to change these blocks, but in your plugin - this can only be done 1 time, since then it simply does not work to repeat the chain of these blocks and return to the source material.

Steps to reproduce the issue

  1. see video.

Server version

This server is running Paper version git-Paper-197 (MC: 1.18.1) (Implementing API version 1.18.1-R0.1-SNAPSHOT) (Git: a8f2d67) You are 3 version(s) behind Download the new version at: https://papermc.io/downloads Previous version: git-Paper-181 (MC: 1.18.1)

ItemsAdder Version

ItemsAdder 2.5.5

ProtocolLib Version

ProtocoLib 4.7.0

LoneLibs Version

LoneLibs 1.0.16b

LightAPI Version (optional)

LightAPI 5.1.0

LibsDisguises Version (optional)

No response

FULL server log

no logs.

Error (optional)

No response

ItemsAdder config.yml

metrics: false
update-checker: false
disable-plugin-loading-messages_DONT_ASK_ME_FOR_SUPPORT_IF_YOU_SET_TRUE__THANKS: false
resource-pack:
  hosting:
    no-host:
      enabled: false
    auto-external-host:
      enabled: false
    self-host:
      enabled: true
      server-ip: 127.0.0.1
      pack-port: 8165
    external-host:
      enabled: false
      url: ''
      skip-url-file-type-check___DONT_ASK_HELP_IF_SET_TRUE: false
  apply-on-join: false
  kick-player-on-decline: false
  kick-player-on-fail: false
  delay-ticks: 1
  notify-other-plugins-interfering: true
  title:
    enabled: false
  protect-player:
    black-screen: true
    hide-hud: true
    cancel-movement: true
    lock-player: true
  command:
    usage-cooldown-seconds: 60
  custom-font:
    enabled: false
    name: ipaexg.ttf
    shift: '[0,0]'
    size: 11.0
    oversample: 2.0
  thin-font:
    enabled: false
  zip:
    protect-file-from-unzip:
      enabled: false
      extreme: false
    compress-png-files: true
    compress-json-files: true
    overwrite-vanilla-models: false
    overwrite-vanilla-lang-json: false
    generate-custom-armors-textures:
      _: 'Available values: VANILLA_1_17 or OPTIFINE'
      enabled: true
      mode: VANILLA_1_17
    fix_transparent_noteblocks__disable-for-more-performance: false
    ignore-files-ext:
    - db
    - yml
    - xcf
    - html
    disable-overwrite-leather-armor-layers-textures: false
  items:
    CustomModelData-starting-value:
      ALL: 10000
      DIAMOND: 11000
config_files:
  lang: en
  dictionaries-lang: en
  extract-default-items: false
  extract-default-resources: false
blocks:
  light-api: true
  fix-glitched-blocks:
    enabled: true
    only-new-chunks: false
    search-also-in-these-biomes:
      enabled: false
      biomes:
      - BEACH
      - BIRCH_FOREST
      - BIRCH_FOREST_HILLS
      - FOREST
      - MOUNTAINS
      - MOUNTAIN_EDGE
      - GRAVELLY_MOUNTAINS
      - PLAINS
      - RIVER
  cancel-break-wrong-tool:
    enabled: false
    send-actionbar: false
  campfire:
    unlit-on-place: true
    allow-any-item: true
  disable-REAL: false
  disable-REAL_TRANSPARENT: false
  disable-REAL_NOTE: false
  disable-REAL_WIRE: false
  disable-FIRE: false
  fix-liquids-flow: true
  fix-floating-blocks: true
items:
  fix-show-attack-and-damage-as-lore: true
  give_death_location_maps: false
  hide-custom-durability-lore: true
liquids:
  enabled: true
huds:
  enabled: true
mobs:
  disable-MOB-behaviour__DISABLE_AT_YOUR_OWN_RISK: false
font_images:
  chat:
    enabled: true
    doublecheck-permission__disable-for-more-performance: false
    add-hover-suggestion: true
  command:
    enabled: true
    commandblocks: true
    excluded:
    - home
    - sethome
    - tpa
  sign:
    enabled: true
  book:
    enabled: true
  anvil:
    enabled: true
  inventory-title:
    enabled: true
  tab-header-footer:
    enabled: true
  vault-prefix-suffix:
    enabled: true
    update-every-ticks: 1200
  scoreboard-teams:
    enabled: false
    update-every-ticks: 3600
  player-display-name:
    enabled: true
    update-every-ticks: 1200
  replace-in-customitems-name-and-lore: true
effects:
  hide-scoreboard-numbers: false
  text-effects:
    enabled: true
    replace-in-customitems-name-and-lore: true
    chat:
      enabled: true
    sign:
      enabled: true
    book:
      enabled: true
    anvil:
      enabled: true
    tab-header-footer:
      enabled: true
entities:
  max-furniture-vehicles-per-chunk: 30
  allow-removing-old-furnitures_2_3_11: false
recipes:
  hide-vanilla-unrecognized-recipe-errors: true
  custom-recipes:
    unlock:
      all-on-join: false
      on-pickup:
        any: false
        ingredients: true
  remove-vanilla-recipes:
    enabled: true
    list:
      DIAMOND_SWORD: false
      IRON_INGOT: false
  fix-packet-too-large-kick: false
debug:
  items:
    log-files-loading: false
    log-items-loading: false
    log-items-loading-disabled: false
    log-font-images-loading: false
    log-huds-loading: false
    log-attribute-modifiers-loading: false
    log-warnings: false
    log-loots-loading: false
    log-loots-loading-disabled: false
    log-armors-loading: false
  recipes:
    log-recipes-loading: false
    log-recipes-loading-disabled: false
    log-recipes-removed-vanilla: false
    log-fix-packet-too-large: false
  resource-pack:
    log-extract-default-resources: false
    log-not-extract-default-resources-already-exist: false
  blocks:
    log-save: false
    log-save-on-unload: false
    log-mined-unknown-blocks: true
  worlds-populators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-populators: false
    log-loading-no-world: true
    log-generation: false
  trees-populators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-populators: false
    log-loading-no-world: true
    log-generation: false
  surface-decorators:
    log-loading: false
    log-loading-disabled: false
    log-loading-no-decorators: false
    log-loading-no-world: true
    log-generation: false
  player-stats:
    log-save: false
  performance:
    loading-ms: true
  huds:
    log-triggers: false
  other:
    log-dictionaries-loading: false
    log-liquids-loading: false
    log-minecraft_lang_overwrite-loading: false
  categories:
    log-total-loaded: true
    log-single-loaded: false
    log-single-loaded-overwrite: false
    log-single-skip: false

Problematic items yml configuration file (optional)

items:
  bitsaw_stone:
    display_name: '&fКаменная пила'
    lore:
    - '&3Может резать доски'
    resource:
      material: WOODEN_SWORD
      generate: true
      textures:
      - item/bitsaw_stone.png
    durability:
        max_custom_durability: 131
        disappear_when_broken: true
    attribute_modifiers:
      mainhand:
        attackDamage: 2.0
        attackSpeed: 3.0
    blocked_enchants:
      - ALL
    item_flags:
    - HIDE_ATTRIBUTES
    - HIDE_ENCHANTS
    events:
      interact.left:
        replace_near_blocks:
            radius:
                x: 1
                y: 1
                z: 1
            from: OAK_PLANKS
            to: gems:oak_planks_carved
            decrement_durability: 1
            no_physics: false
        replace_near_blocks_2:
            radius:
                x: 1
                y: 1
                z: 1
            from: gems:oak_planks_carved
            to: OAK_PLANKS
            decrement_durability: 1
            no_physics: false
        play_sound:
            name: item.axe.strip
        cancel: true

Other files, you can drag and drop them here to upload. (optional)

No response

Screenshots/Videos (you can drag and drop files or paste links)

https://youtu.be/sN4oQ0e9w68

LoneDev6 commented 2 years ago

I think you can use replace_block for this purpose. Be sure to use the IDE to get autocompleted code. https://ide.devs.beer/itemsadder/

immagine

MrJorman commented 2 years ago

https://itemsadder.devs.beer/plugin-usage/advanced/item-properties/events/actions wtf you give me "replace_block" ???

MrJorman commented 2 years ago

whooo?

MrJorman commented 2 years ago

No working. I can't turn the cut wood back into the usual one and repeat this action.

MrJorman commented 2 years ago
      interact.left:
        replace_block:
            from: OAK_PLANKS
            to: gems:oak_planks_carved
            decrement_durability: 1
        replace_block_2:
            from: gems:oak_planks_carved
            to: OAK_PLANKS
            decrement_durability: 1
LoneDev6 commented 2 years ago

It's obvious: You're trying to attach the replace_block_2 action to a vanilla block OAK_PLANKS. This is not possible.

This config would work if both materials are custom blocks.

This is not a bug, it's a feature request.