PluginBugs / Issues-ItemsAdder

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

onBlockPhysicsEvent lag #2887

Closed LuluxClient closed 1 year ago

LuluxClient commented 1 year ago

Terms

Discord tag (optional)

xdLulux

What happened?

Currently ItemsAdder uses over 10-15% of the server performances and it's causing the server to lag a lot. We currently uses the entity system for npcs on island, there is 2 of them per island, custom blocks, custom see through blocks (chorus plants), we just use every feature from itemsadder available ahah

Steps to reproduce the issue

  1. We have custom npcs that spawns when creating an island using itemsadder entity system
  2. have over 50-70 players
  3. server needs to be a little bit old so there is quite a lot of farms and the gamemode needs to be skyblock
  4. Just wait for a lot of items to be moved in water etc caused by farms
  5. boom itemsadder lags

Server version

This server is running Pufferfish version git-Pufferfish-73 (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: cadfa71 on HEAD) You are on the latest version! Previous version: git-Pufferfish-72 (MC: 1.19.4)

ItemsAdder Version

3.5.0c-r2

ProtocolLib Version

5.1.0 build 654

LoneLibs Version

1.0.25

FULL server log

Private / no errors

Error (optional)

none

Problematic items yml configuration file (optional)

none

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

metrics: true
update-checker: true
disable-plugin-loading-messages_DONT_ASK_ME_FOR_SUPPORT_IF_YOU_SET_TRUE__THANKS: false
ignore-server-compatibility-check: false
resource-pack:
  hosting:
    no-host:
      enabled: false
    auto-external-host:
      enabled: true
    self-host:
      enabled: false
      server-ip: aaaa
      pack-port: aaaaa
    external-host:
      enabled: false
      url: aaaaaaaaaaa
      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: true
  1_19_3_atlas_support: true
  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:
      protection_1: true
      protection_2: true
    compress-png-files: true
    compress-json-files: true
    generate-custom-armors-textures:
      vanilla_1_17: true
      optifine: true
    disable-overwrite-leather-armor-layers-textures: false
    fix_transparent_noteblocks: true
    ignore-files-ext:
    - db
    - yml
    - xcf
    - psd
    - html
    - gz
    - rar
    - zip
    - 7z
    extract_internal_utility_assets: true
    contents-folders-priority:
    - vanilla
    - _iainternal
    merge_other_plugins_resourcepacks_folders:
    - ModelEngine/resource pack
  items:
    CustomModelData-starting-value:
      ALL: 10000
      DIAMOND: 11000
  fix_force_unicode_font_images: true
config_files:
  lang: en
  dictionaries-lang: en
  force-sync-loading: false
blocks:
  light-api: true
  fix-liquids-flow: true
  fix-floating-blocks: true
  fix-glitched-blocks:
    enabled: true
    only-new-chunks: false
  cancel-break-wrong-tool:
    enabled: true
    send-actionbar: true
  campfire: {}
  disable-REAL: false
  disable-REAL_NOTE: false # pour les blocs custom en real_note garder en false
  disable-REAL_TRANSPARENT: false
  disable-REAL_WIRE: false
  disable-FIRE: false
  convert-vanilla-blocks:
    enabled: false
    only-new-chunks: true
  convert-legacy-ia-region-files: true
  remove-unused-palettes-on-region-save: false
  campfire_enhancements:
    enable: true
    unlit_on_place: true
    allow_any_item: true
    drop_when_broken: false
items:
  fix-show-attack-and-damage-as-lore: true
  give_death_location_maps: false
  hide-custom-durability-lore: false
  handle-wear-held-actions-on-unexpected-inventory-changes: true
liquids:
  enabled: true
huds:
  enabled: true
loots:
  allow-loots-drop-from-spawners-using-silk-touch: false
mobs:
  disable-MOB-behaviour__DISABLE_AT_YOUR_OWN_RISK: false
font_images:
  replace-in-customitems-name-and-lore: true
  chat:
    enabled: true
    doublecheck-permission__disable-for-more-performance: false
    add-hover-suggestion: true
    tab-autocompletion_1_19_1_plus: true
  command:
    enabled: true
    commandblocks: true
    excluded:
    - home
    - sethome
    - tpa
  sign:
    enabled: true
  book:
    enabled: true
  anvil:
    enabled: true
  inventory-title:
    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
  iaimage-book:
    max-line-length: 18
    placeholder-font: minecraft:default
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
entities:
  max-furniture-vehicles-per-chunk: 1000
  allow-removing-old-furnitures_2_3_11: true
  custom-entitites:
    enabled: true
    emotes: false
    interval-rendering-packets-ticks: 1
    optimized-packets: true
recipes:
  hide-vanilla-unrecognized-recipe-errors: true
  fix-packet-too-large-kick: false
  show-no-permission-popup-in-recipebook: true
  show-no-permission-chat-message: false
  custom-recipes:
    unlock:
      all-on-join: false
      on-pickup:
        any: true
        ingredients: true
      on-item-click:
        any: true
        ingredients: true
  remove-vanilla-recipes:
    enabled: true
    list:
      DIAMOND_SWORD: false
      IRON_INGOT: false
debug:
  benchmark: false
  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-recipes-unknown-item: 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-load:
      enabled: true
      min-ms: 0
    log-mined-unknown-blocks: true
    log-convert-vanilla-blocks: true
    log-fix-bugged-blocks: true
    log-unusual-block-break: 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
  cave-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
    log-icon-failed-load: false
  entities:
    log-files-loading: false
    log-entities-loading: false
    log-entities-loading-disabled: false
chat-preview: false
compatibility:
  worldguard:
    show_legacy_furniture_flags: true

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

redacted

LoneDev6 commented 1 year ago

image

Please install this: https://www.spigotmc.org/resources/blockphysicseventdetector.84854/ The issue is caused by a too frequent block physics event triggering, it is caused probably by the large amount of farms or a lag machine/lag farm.

The tool will allow you to find out where is the laggy place so you can teleport and let me know what is causing that.

How to use

LuluxClient commented 1 year ago

ok I'll make sur to install if it happens again ! This issue can be closed if it's not caused by itemsadder or we can keep it opened if it's fixable after finding the farm that is causing that issue

LuluxClient commented 1 year ago

Update, we removed the custom blockss and the issue is fixed, everything was caused by itemsadder for no reasons, since we only use custom blocks on our spawn servers we disabled them on our island servers (players don't have access to custom blocks so idk why itemsadder was making the server lag that much)

LoneDev6 commented 1 year ago

It probably was the same issue already fixed here: https://github.com/PluginBugs/Issues-ItemsAdder/issues/2864