Crazy-Crew / CrazyCrates

Add unlimited crates to your server with 10 different crate types to choose from!
https://modrinth.com/plugin/crazycrates
MIT License
154 stars 154 forks source link

When the client has auxiliary mods, it can perspective the Cosmic results #760

Closed tsingyayin closed 3 months ago

tsingyayin commented 3 months ago

Spark link

No response

Plugin Version

3.4.9

Server Version

1.21

Server Platform

Purpur

Describe the bug

When the player client has a mod that can help organize the Inventory (for example, InventoryProfilesNext), the function of displaying different items attached to this mod can perspective the tier results of Cosmic in advance. 56845f29c705ffb3bbdd50ddcfc50c80 For example, grids 22 and 26 in the above figure are rare items.

This seems to indicate that the plugin is trying to derive the results too early. It may be more appropriate to push the results over after all the selections are completed, or just strictly ensure that all data pushed to the client in the selection phase does not contain any potential differences

Crate Type

Cosmic

Steps to reproduce

We don't have a reproduction step here, because the above figure is self-evident.

However, relevant configurations are provided as is to avoid problems caused by incorrect configuration settings.

Translation is not included. Non English text only includes the description of the game itself, not related to any function of the plugin.

Config

Crate:
  CrateType: Cosmic
  CrateName: '<#4C89FF>武器池 <yellow>[勿忘我] <red>【十连】'
  Preview-Name: '<#4C89FF>武器池 <yellow>[勿忘我] <red>【十连】'
  StartingKeys: 0
  InGUI: false
  Slot: 23
  OpeningBroadCast: true
  BroadCast: '<gradient:#EA3FF7:#4C89FF>%player%正在尝试分析 武器池 <bold>[勿忘我]<red>【十连】'
  Item: 'ENDER_CHEST'
  Glowing: false
  Name: '<#4C89FF>武器池<yellow>(十连)'
  Lore:
    - '&7This crate contains strange objects,'
    - '&7from somewhere beyond this planet.'
    - '&7You have &6%Keys% keys &7to open this crate with.'
    - '&7&l(&e&l!&7&l) Right click to view rewards.'
  sound:
    cycle-sound:
      toggle: true
      value: "block.note_block.xylophone"
      volume: 1.0
      pitch: 1.0
    click-sound:
      toggle: true
      value: "ui.button.click"
      volume: 1.0
      pitch: 1.0
    stop-sound:
      toggle: true
      value: "entity.player.levelup"
      volume: 1.0
      pitch: 1.0
  Preview:
    Toggle: true
    ChestLines: 3
    Glass:
      Toggle: true
      Item: 'gray_stained_glass_pane'
  Crate-Type-Settings:
    Total-Prize-Amount: 10
    Mystery-Crate:
      Item: 'chest'
      Custom-Model-Data: -1
      Name: '<red>【?】'
      Lore:
        - '<yellow>您一共可选 10 物品'
    Picked-Crate:
      Item: 'glass_pane'
      Custom-Model-Data: -1
      Name: '<green>【?】'
      Lore:
        - '<blue>您已经选择了槽位 %slot% 的物品.'
  PhysicalKey:
    Name: '<gradient:#4C89FF:#66CCFF>对象指针(weapon*)<red>【十连】'
    Lore:
      - <white>有若干武器对象内存被抛弃在武器内存池里
      - <white>将这些对象重新挂载在指针上,使它们能被复用
      - <red>(这是用于武器池(十连)的开箱钥匙)
    Item: 'spectral_arrow'
    Glowing: true
  Hologram:
    Toggle: true
    Height: 2.0
    Message:
      - '&f&l武器池 &e[勿忘我] &d【十连】'
      - '&b当期1%:&d影霄·奔夜'
      - '&a左键预览,右键抽取'
  tier-preview:
    toggle: false
    rows: 5
    glass:
      toggle: true
      name: " "
      custom-model-data: -1
      item: "red_stained_glass_pane"
  random:
    toggle: true
    types:
      row-1: Rare
      row-2: Basic
  Tiers:
    Rare:
      Name: '<yellow>未知奖励'
      Color: 'yellow_stained_glass_pane'
      Chance: 100
      MaxRange: 100
    Basic:
      Name: '<white>基本奖励'
      Color: 'gray_stained_glass_pane'
      Chance: 100
      MaxRange: 100
  Prizes:
    1:
      MaxRange: 100
      DisplayName: <yellow>影霄·奔夜
      DisplayData: H4sIAAAAAAAA/7WUz08TQRTHn1Sadk38EX/F+IvMmTb9ZUl70YNnb+rBkM10d7Zd3Z1dd6cIISQQmiCQQkhEEUnQBOLNhqhRxKrxv/Assy0n/gWngKy0JREjc5rsm/f9fN+82ScBBODYTczwHeK4ukUBTjwMQYeuwgVTp0RxsMaylLACcXRGZPeR5agB6FSsImUAcEQCSbFM26KEMleCy34SZszRc0WRZFqqrulCPwzh3b0ksjtDcJQN2ASu+Gl5QgVKiYp0rDyQXZsQNQhBbDaIN87A1gpB2LKJg1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7SeJNZabUEYjvsahuUIYYAgaIOI9DMHo+y9QaRYIoCyKCe4qBvpDBu6grIaNlzSjZg4KILrH8u1xeX16mztddl7O+stVLyJan3lFR/7VJsv8fKsNz7Jx2fQUO9uChoC5cAcb65SH63yiRdC1VsZq4/M/xwe4V9HayPvtzhjfHquCdKBENxtB8o7eGD/gtae1ivvoltL7DeevdneN4nf+hdhr7TIp1fb6vUeWM97PFObmtwxWn3JvwyLLvClEp9a2/y8uFdegnN+uwlVxCNg5vY0CxqkjxhuAE75J0RI1Wm+MfsCcNr/7hawY1PiuiIiNd7oWT+mFF1mmTLFJoHb7Yox9HyByXbRsY3928yrKxsLpe8f+PITvrSwt4gAXGzBiVFLDPEPMSyGfB3gF5BFIYjsBQAA
      Chance: 100
      Commands:
        - broadcast &b&l%player%&r&f重建出了&d影霄·奔夜
        - lp user %player% permission set tianyu.card.yingxiaobenye true
      Tiers:
        - 'Rare'
    2:
      DisplayName: <yellow>♬10
      DisplayItem: sunflower
      DisplayAmount: 1
      DisplayLore:
        - <white>微小的补偿
      MaxRange: 100
      Chance: 100
      Commands:
        - eco give %player% 10
      Messages:
        - <yellow>什么都没有...再接再厉!
      Tiers:
        - 'Basic'

Additional context

PLZPlease, the great plug-in developer, consider repairing this problem

Agreements

ryderbelserion commented 3 months ago

That isn't a bug as that is intentionally designed that way for reasons I can't remember.

tsingyayin commented 3 months ago

How should I create randomness in it? I only have one prize item and one empty item, as you can see in the configuration file.

ryderbelserion commented 3 months ago

It is random, just as it would be random if none of the tiers had anything assigned to it. The tiers are still picked based on the chances in your crate config.

you just need more items.

tsingyayin commented 3 months ago

I used two items of one tier to alleviate this problem, but in the very old version (I remember that there was no such phenomenon before, and I must be very sorry to point out that I did not update the 1. x version of the plugin after I obtained it in 2022, and did not remember to update all plugins until yesterday), it seems that the phenomenon of tier was not disclosed in advance. Previously, I used one tier to correspond to one item, so after the animation, they knew what items were acquired, but now they must close inventory.

Generally speaking, it can be used, but it seems not perfect

ryderbelserion commented 3 months ago

It was disclosed in advance, you can view every single changelog since the beginning: https://modrinth.com/plugin/crazycrates/changelog. I would assume it'd be common practice after not updating for a while to familiarize yourself with the changes via the changelog rather than getting a kinder surprise.

image

This was the result of a conversation I had a while ago with someone and it did not make sense for you to pick a mystery box and then roll the calculation to pick the tier used which is the only calculation shifted out of the rolling animation then roll the random prize at the same time, however the prizes picked is still completely random based on which prize has the tier the player picked.

Cosmic Crate was never made with only having 1 or 2 prizes in mind, the old way likely won't be coming back.

ryderbelserion commented 3 months ago

There is something I can do while keeping the same system but I don't know when it'll be done.

tsingyayin commented 3 months ago

Thank you for your suggestions. I will try to understand the functions of the new version of the plugin and adjust my use methods. This is an amazing plugin. It is an honor for the entire community to have such a plug-in.

ryderbelserion commented 3 months ago

@tsingyayin You can check jenkins for a new build to test this change https://ci.crazycrew.us/job/CrazyCrates/46/, the changelog is as followed.

Cosmic Crate: