Open mastercoms opened 5 years ago
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)
?
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();
}
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 includesetType
,setData
,setRawData
andsetTypeAndData
.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