Skip to content
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

API to support "custom blocks" in level calculation #21

Closed
tastybento opened this issue Jul 15, 2017 · 1 comment
Closed

API to support "custom blocks" in level calculation #21

tastybento opened this issue Jul 15, 2017 · 1 comment
Assignees
Labels
Type: Addon Related to an addon.

Comments

@tastybento
Copy link
Member

From @Poslovitch on May 3, 2017 19:14

Idea taken from : https://forum.rinaorc.com/index.php?threads/skyblock.9667/ (french server forum)

Consists in giving to developpers a programming interface to register their "custom blocks", ideally an abstract Object.

When calculating the island level, ASB would go through every registered custom block and ask if a block is "special". Then if true, ASB will use the "custom" block value instead of the vanilla one.

I.e : Slimefun (https://github.com/TheBusyBiscuit/Slimefun4) adds a 24-Carat Gold Block, which is extremely valuable, as it is hard to obtain. But, when placed on an island, this block doesn't give much levels as a regular gold block.
Hopefully, Poslovitch worked hard on a new feature in ASB API ( :D ), which allows Slimefun to register this custom block !
And now, when ASB calculates island level, it checks if the block is "custom" (by an abstract method "isCustom" which returns a boolean). If true, it uses the value of the custom block (Slimefun gives a default value, but it can be overriden by adding a line with the "id" of the custom block in blockvalues.yml), otherwise it uses the vanilla value.

And it would work the same for /is value.


This is an idea that may slow the level calculation, but I think it would be something very interesting. It's now possible with plugins (and even with resource packs!) to "add" blocks. Providing a way to make them more or less valuable than "normal" blocks would be an "added value" to the overall plugin as well as promoting incredible plugins like Slimefun.

Copied from original issue: tastybento/ASkyBlock-Bugs-N-Features#180

@tastybento tastybento added Type: Addon Related to an addon. Type: Enhancement Improvement or modification which is usually a new feature. labels Jul 15, 2017
@tastybento
Copy link
Member Author

It should be possible to just add another list of special blocks for the calculation. It's done async anyway. The challenge may be in identifying the special blocks during the calculation because the system uses chunk snapshot to grab the chunk data. When I was trying to code up something to spot spawners of a special type that was going to cause issues. So, it may be better to have a list of special block locations as well. It needs some thought.

@Poslovitch Poslovitch removed the Type: Enhancement Improvement or modification which is usually a new feature. label Jul 19, 2017
Poslovitch pushed a commit that referenced this issue Mar 8, 2019
Add 3 new profiles:
- local profile is activated by default and it will add -SNAPSHOT at the end of version.
- develop profile is activated when exist BUILD_NUMBER environment variable and it will add -SNAPSHOT #BUILD+_NUMBER at the end of version
- master profile is activated when exists GIT_BRANCH environment variable with value origin/master and it will not add anything to version.

Also, move most of dependencies versions to properties section.

With these changes, it will be easier to process next release. Only change `build.version` in properties section. 

If you run maven package or install from IDE or console, it will add -SNAPSHOT at the end (unless you have local Jenkins server). [`bentobox-1.4.0-SNAPSHOT.jar`]
In Jenkins server builds from develop branch will look like `bentobox-1.4.0-SNAPSHOT #21.jar`.
In Jenkins server builds from master branch will look like `bentobox-1.4.0.jar`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Addon Related to an addon.
Projects
None yet
Development

No branches or pull requests

2 participants