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

Change all block ID setters [$30] #30

Open
mastercoms opened this issue Sep 22, 2019 · 2 comments
Open

Change all block ID setters [$30] #30

mastercoms opened this issue Sep 22, 2019 · 2 comments
Labels
bounty essential A feature that must be implemented for 1.13 base support. good first issue Good for newcomers server An internal technical feature.

Comments

@mastercoms
Copy link
Member

mastercoms commented Sep 22, 2019

This issue is part of the 1.13.x compatibility Epic.

All contributions are subject to the Glowstone CLA. In short, contributions must not contain any content (code or otherwise) copied from,
inspired by or based upon content from Mojang or third-party projects that are based on such content (CraftBukkit, Spigot, Forge, ...).


Description:

Glowstone uses a lot of calls for setting blocks to a certain type or data. These all need to be updated to use the new BlockData system. These include setType, setData, setRawData and setTypeAndData.

Relevant Code:

https://github.com/GlowstoneMC/Glowstone/search?q=setTypeAndData&unscoped_q=setTypeAndData
https://github.com/GlowstoneMC/Glowstone/search?q=setData&unscoped_q=setData
https://github.com/GlowstoneMC/Glowstone/search?q=setType&unscoped_q=setType
https://github.com/GlowstoneMC/Glowstone/search?q=setRawData&unscoped_q=setRawData

Note: GitHub Search indexes the main branch, so this may not reflect the current state of the 1.13 branch. Please do your own searches in your IDE.

Related to:

#3


There is a $30 open bounty on this issue. Add to the bounty at Bountysource.

@mastercoms mastercoms added good first issue Good for newcomers essential A feature that must be implemented for 1.13 base support. server An internal technical feature. labels Sep 22, 2019
@mastercoms mastercoms mentioned this issue Sep 22, 2019
4 tasks
@mastercoms mastercoms changed the title Change all block ID setters Change all block ID setters [$30] Sep 23, 2019
@tmtvl
Copy link

tmtvl commented Sep 24, 2019

Should we get the BlockData from a singleton retrieved from the store (e.g. BlockDataStore.getBlockDataById(0).mutate()) or create new SimpleBlockData (e.g. new SimpleBlockData(Material.DIRT)?

@aramperes
Copy link
Member

aramperes commented Sep 24, 2019

You would be using the Bukkit implementation, Material.DIRT.createBlockData(). Glowstone will implement this in GlowServer#createBlockData(Material), which is going to be done similarly to this:

@Override
public BlockData createBlockData(Material material) {
    return BlockDataStore.findSingleton(material).mutate();
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bounty essential A feature that must be implemented for 1.13 base support. good first issue Good for newcomers server An internal technical feature.
Projects
None yet
Development

No branches or pull requests

3 participants