Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

Modern Material Enum #344

Open
2 tasks done
LaiMacVN opened this issue Jan 31, 2022 · 8 comments
Open
2 tasks done

Modern Material Enum #344

LaiMacVN opened this issue Jan 31, 2022 · 8 comments
Labels
enhancement New feature or request

Comments

@LaiMacVN
Copy link

Describe the feature

For example Material.SPRUCE_WOOD or Material.DARK_OAK_WOOD ..etc
instead of weird stuff to get the different wood type

Technical implementation

No response

Other

No response

Agreements

  • You have confirmed that this feature does not yet exist in the latest version of NachoSpigot.
  • You have confirmed that there aren’t any issues open regarding this feature.
@LaiMacVN LaiMacVN added the enhancement New feature or request label Jan 31, 2022
@LaiMacVN LaiMacVN changed the title Morden Material Enum Modern Material Enum Feb 9, 2022
@keqno
Copy link

keqno commented Feb 9, 2022

would break plugins unfortunately.

@ghost
Copy link

ghost commented Feb 9, 2022

would break plugins unfortunately.

It most likely wouldn’t break plugins, but either way the Material enum in 1.8 depends on block ids, and different types of wood are different data ids for logs

@keqno
Copy link

keqno commented Feb 9, 2022

would break plugins unfortunately.

It most likely wouldn’t break plugins, but either way the Material enum in 1.8 depends on block ids, and different types of wood are different data ids for logs

Wouldn't it break plugins that are using say Material.WOOD and now it has to use the specific ones instead?

@Blyrex
Copy link

Blyrex commented Feb 9, 2022

if you want new materials and items, use latest paper :)

@ghost
Copy link

ghost commented Feb 19, 2022

NachoSpigot isn't made to add breaking api changes

Describe the feature

For example Material.SPRUCE_WOOD or Material.DARK_OAK_WOOD ..etc instead of weird stuff to get the different wood type

Technical implementation

No response

Other

No response

Agreements

  • You have confirmed that this feature does not yet exist in the latest version of NachoSpigot.
  • You have confirmed that there aren’t any issues open regarding this feature.

@HeathLoganCampbell
Copy link
Member

I like the idea, could just make a secondary material class called ModernMaterial or MMaterial

@sadcenter
Copy link
Contributor

sadcenter commented Feb 20, 2022

it is possible without breaking the plugins as @HeathLoganCampbell said. we can add a new class, where there would be all items already with MaterialData provided

public class DarkOakWood extends MaterialData {
    public DarkOakWood() {
        super(Material.LOG_2, (byte) 1);
    }

something like that

@MWHunter
Copy link

I've designed a modern block data system in PacketEvents. It allow stuff like
WrappedBlockState stairs = StateTypes.OAK_STAIRS.createDefaultState();
stairs.setFacing(BlockFace.WEST)

https://github.com/retrooper/packetevents/blob/2.0/api/src/main/java/com/github/retrooper/packetevents/protocol/world/states/WrappedBlockState.java
https://github.com/retrooper/packetevents/blob/2.0/api/src/main/java/com/github/retrooper/packetevents/protocol/world/states/type/StateTypes.java

Unsure how relevant this is, but it works on 1.8 and I like it better than 1.8's system.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants