BareMinimumStudios / playerex

Adds RPG attributes to Minecraft using the Fabric ecosystem.
MIT License
2 stars 10 forks source link

Attributes Cannot Be Used In Function Files #8

Closed RobertHDPotatoes closed 3 months ago

RobertHDPotatoes commented 9 months ago

I'm not great with datapack files so apologies if I am overlooking something, but it seems like attributes added by Data Attributes/PlayerEx cannot be used in datapack function files. Here is an example datapack with a function already set up that has the issue I describe below: https://drive.google.com/file/d/1Y_cg8TSQF8LVMk5g1L7lXlWDGYUShZWR/view?usp=sharing

Installed mods: Fabric Loader 0.15.6 Cloth Config API 11.1.118 Data Attributes: Directors Cut 1.6.0+1.20.1 Fabric API 0.91.0 PlayerEx: Directors Cut 3.6.1+1.20.1 Projectile Damage Attribute 3.2.2+1.20.1

1: Download and unzip the functiontest.rar file which will leave you with just the functiontest datapack folder 2: Create a new creative world and put the 'functiontest' datapack in the datapack folder in the world creation screen (Or add it after the world has been created and reload the world) 3: Give yourself 10 levels using '/playerex levelup @s 10' 4: Try to use the command /function simple_test:multiplyconstitution 5: Put points into the 'Constitution' stat in Playerex

The test function only contains one command, "attribute @p playerex:constitution modifier add 8b3d227a-fd6c-4279-80e6-4a26d19e429a conmultiplier 1 multiply_base", which should double your constitution stat. This means every one point you put into constitution it should increase by two. However, no matter how many times you run that function, that function never works. But, if you simply use the SAME command manually in chat so you can bypass the function, it suddenly works.

This happens with ALL attributes added by Playerex/Data Attributes, there are no errors in my log, and I've tried different load orders for my datapacks and nothing seems to work. If you change the attribute in the function to a vanilla stat such as minecraft:generic.movement_speed it will work as intended, and the same goes for attributes added by other mods. I only have trouble with PlayerEx stats.

bibi-reden commented 3 months ago

Sorry for the wait!

This should be resolved in the beta version of DataAttributes & PlayerEX as a result of the rewrite.