SkriptLang / Skript

Skript is a Spigot plugin which allows server admins to customize their server easily, but without the hassle of programming a plugin or asking/paying someone to program a plugin for them.
https://docs.skriptlang.org
GNU General Public License v3.0
1.08k stars 370 forks source link

Plant growth stages are ignored #4582

Open XenonsEU opened 2 years ago

XenonsEU commented 2 years ago

Skript/Server Version

Skript: 2.6.1
Server: 1.18 Paper 61

Bug Description

detecting fully grown weath plant or ripe wheat plant with loop also considers newly planted ones as well for some reason

Expected Behavior

it should look only for fully grown plants and not new ones

Steps to Reproduce

                loop blocks in radius 20 around player:
                    if loop-block is fully grown wheat plant:
                        broadcast location of loop-block

Errors or Screenshots

No response

Other

No response

Agreement

AyhamAl-Ali commented 2 years ago

Can confirm. image

TheBlueLines commented 2 years ago

Same here!

annabelsandford commented 10 months ago

This still needs to be fixed and is really bothering me personally

Fusezion commented 10 months ago

arguably this is solved for two reasons

  1. you can use age of %block% and compare against maximum age of %block%
  2. using block data comparison speaking you already type fully grown wheat plant it's as simple as wheat[age=7]

While the core issue might not be fixed blockdata should be the suggested fix especially with 1.13 being the lowest supported version now. I honestly don't see any way for skript to fix this especially when we're labeling it as an aliases tag when the issue is ItemType/ItemData class likely nothing to do with the skript-aliases submodule.

The only solution I can think of is adding a proper method to get block data from itemtype and doing a comparator for itemtype and block relying on blockdata.

annabelsandford commented 10 months ago

arguably this is solved for two reasons

  1. you can use age of %block% and compare against maximum age of %block%
  2. using block data comparison speaking you already type fully grown wheat plant it's as simple as wheat[age=7]

While the core issue might not be fixed blockdata should be the suggested fix especially with 1.13 being the lowest supported version now. I honestly don't see any way for skript to fix this especially when we're labeling it as an aliases tag when the issue is ItemType/ItemData class likely nothing to do with the skript-aliases submodule.

The only solution I can think of is adding a proper method to get block data from itemtype and doing a comparator for itemtype and block relying on blockdata.

Thanks a lot! Unfortunately I couldn't find any documentation on using the age parameter / wheat[age=7] for example. That fixed it for me. Thanks again!