-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dynamic key recipe to configuration #27
Conversation
@NathanAdhitya If you would like you can test this out. |
I have never compiled a kotlin project myself, this is going to be a challenge. 🤣 |
It seems like default configuration in the config.yml is improper (?). My config.yml had config values that worked for the original version. key-recipe: '[, IRON_INGOT, , IRON_INGOT, REDSTONE_BLOCK, IRON_INGOT, , IRON_INGOT]' Attempting: key-recipe:
-
- IRON_INGOT
-
- IRON_INGOT
- REDSTONE_BLOCK
- IRON_INGOT
-
-
- IRON_INGOT causes
There's room for improvement for stupid-proofing it, I guess. ¯_(ツ)_/¯. I'm the stupid one not reading the PR instructions. Will try later with the given format. |
There probably is room for improving the config side at least, but I believe it should be able to parse the current config string properly. The latter solution is definitely preferable though. |
Seems like the property system relies on |
…-paradigm parsing solutions to be implemented for certain data types.
I've tried out the new commits. They are still spitting out errors for me for an existing config. This is the migrated config from the previous (without key-recipe)
Could this be a platform issue? 🤔 I have also tried according to the instructions mentioned, using This is stock after removing the config.yml.
locale: en
wait-time: 60
damage-stops-warping: true
limit-distance: true
base-distance: 100
max-boost: 150
max-warp-size: 50
jump-worlds: true
world-ratio: 8
warp-animations: true
single-use: false
require-power: INTER_DIMENSION
power-cost: 1
enable-portal-sickness: true
portal-sickness-warping: DAMAGE_ON_TELEPORT
portal-sickness-damage: 5.0
relinkable-keys: true
enable-key-items: true
key-recipe:
- ''
- IRON_INGOT
- ''
- IRON_INGOT
- REDSTONE_BLOCK
- IRON_INGOT
- ''
- IRON_INGOT
- ''
portal-sickness-chance: '0.05' |
Probably will have to look into things a bit deeper I think. I'll see if I can deal with it soon, have been a bit busy lately. |
I believe I fixed it, after testing it appears to work well. Apparently I forgot to convert the recipe's hashcodes back into chars so it was causing size problems. |
@NathanAdhitya Able to check this for any other issues? |
Will check it soon. It's like midnight here and I must sleep, hahaha. Will give an update. |
Alright thanks for the heads up |
Hello, I have tested it, the server ran properly. Perhaps tests should be in place to see if the plugin runs correctly in a server 😁. The new config entry is not displayed in /waystones config, but I suppose it is a simple fix. There is an error during reloading, but it might be because of a stale branch.
Can confirm it works so far. Some more extensive testing may be required, but I think it seems good for now. |
…proper type in file
…strings breaks rendering in /waystones config
From my testing the entry does display in the config but in order for it to be loaded you have to run The localization issue isn't something I've run into myself, so I would need a bit more information on how it occurred and if you can reproduce it. I also pushed a few more adjustments to the config system so it would be a bit easier to follow and represent each item as the appropriate data type (it was apparently saving everything as a string before this). |
@NathanAdhitya Have you tested the recent changes? Config values should be properly represented in-file now. |
Sorry for the long inactivity 😅. |
I see, good to hear. Let me know if you want to take a bit more time to validate things, I'll probably merge it soon otherwise. |
Looks good enough at a glance. Unit tests for proving the stability would be more desirable, but I think this shall suffice. |
Alright then, merging! |
This PR adds the ability to determine a custom crafting recipe for warp keys as requested by #26. Crafting recipes are defined by the
key-recipe
property in the configuration file in the format of[ "item1", "item2", "item3" ]
. Acceptable lengths for this list are 1, 4, or 9 (corresponding to the squares of 1, 2, and 3). Each item in this list should correspond to the name of a value in theMaterial
enum.Testing was done locally and it appears to function, however further testing should be done to make sure it behaves properly and as expected.