Resource XSeries - XMaterial, XSound, XPotion, XEnchantment, Titles, ActionBar, etc

Discussion in 'Spigot Plugin Development' started by CryptoMorin, Jun 16, 2019.

?

Do you need XParticle? (Read the first post for more info)

  1. Yes

    74.1%
  2. No

    25.9%
  1. didnt remember the other method, was more designed as hypothetical code.
    i get thats what youre doing now, but the benefit of what i suggested is you dont need all these extra utility methods.
    it would be as simple as
    org.bukkit.Block block;
    block.setType(XMaterial.FISH_BUCKET); // if < ver fishbucket was added, its water, otherwise its fish bucket.
    no need for all of these other #parseMaterial methods.
    just curious why you went with your design rather than my suggested design, is there something im missing? id imagine mine, while lacking in overall features, is a bit more simple to use
     
  2. Why don't you try it? Yea that's basically it.
    If it's not working tell me your server version.

    Some of those methods are not even used. They're mostly version related stuff that has nothing to do with materials. It's there because I didn't want to make a separate class for it.

    That design doesn't really work. XMaterial saves the data value. They're completely removed from 1.13
    And it'd be a huge pain to maintain it considering the suggestion system. Writing a field for each one of them just sounds really odd.
    There are also a few other useful methods there. This resource is not strictly designed for multi-version support only.
     
    #143 CryptoMorin, Dec 22, 2019
    Last edited: Dec 22, 2019
  3. 1.8, need it to work on 1.8-1.14. I tried it and it didn't work so I'm asking if I did it correctly.
     
  4. XBlock:
    • Fixed setColor in older versions. Thanks @DarkKnights22
    • Added isWater method. This is not related to XMaterial, so it needs to be added to XBlock just like isCake method.
    • Added isWaterStationary method.



    Also, if you guys are still waiting for an XParticle, let me know.
    Because personally I don't use particles a lot myself.
    It will have different shaped particles.
     
    • Like Like x 1
  5. Yeh XParticle would be quite good
     
  6. XMaterial & XSound:
    • Fixed an issue with diamond shovel not being detected as a damageable material with the name DIAMOND_SPADE.
    • Performance improvement.
    • playMusic method is finally here! You can make your own snippets using playMusic method from XSound. This method allows you to play notes with a short script without needing to use any redstone or noteblocks! Please share your work if you made any. Feel free to ask me any questions.
     
  7. NoteBlockMusic, XMaterial, XSound, XPotion:
    • Added Shield to XMaterial damageable list.
    • Moved all the noteblock/music related stuff from XSound to NoteBlockMusic.
    • Added a few new aliases to XPotion.
    • NoteBlockMusic is for the playMusic method. There's a new feature that allows you to repeat a captured segment multiple times with a delay. Added support for sharp# and flat_ note tones and octaves. Optimized and fully ready.
     
  8. Not sure where you want us to "upvote" the suggestion, but I'm also looking for a particle lib, so XParticle would be a great idea!
     
  9. Sorry I forgot to add a poll.

    Also, if anyone knows anything that changed about particles in different versions let me know (other than new particles)
     
  10. XMaterial
    • Fixed data values for some gray and light gray materials.

    XItemStack (NEW)
    YAML ItemStack serializer. Quite useful for a neat and cross-version serializer.
    It also has some small features to make things easier when editing from config.

    SkullUtils (NEW)
    Used in XItemStack. It can parse skull textures with different methods. UUID, Username, URL and Base64.
    Currently there's no cache so it's a little slow.
    This might not work if you're using maven. You'll need to add Spigot JAR directly to your dependencies.


    I might start working on XParticle next week.
     
    • Like Like x 1
  11. XEntity (NEW)
    YAML Entity spawner. It supports almost every entity.
    If it's missing an entity (other than the ones with deprecated methods) let me know.
    Uses XItemStack, XMaterial and XPotion.

    XMaterial
    • Replaced MinecraftVersion with integers. It's more readable and much cleaner now. Which means you can now compare all the major/minor versions.
    • removed valueOfVersion method.
    XItemStack
    • Cleanup and compatibility with the new XMaterial
     
    • Like Like x 1
  12. I don't think you can do anything interesting with biomes. It's rarely used.
    But well, it's not hard to fix. I'll add it.
     
  13. XBiome (NEW)
    Cross-version biome names compatibility.
    It also has a method to change the biome in a selected area.

    XBlock
    • Added isSugarCane, isBeetroot and isWheat.
    • Performance improvements.
    XMaterial
    • Moved NETHER_STALK to NETHER_WART from NETHER_WART_BLOCK. I'm not sure if this is how it's supposed to be but apparently NETHER_STALK and NETHER_WART were both the same thing. Unless one is for the "planted" ones and one is for the item itself.
     
    • Like Like x 1
  14. XMaterial
    • The suggestion and legacy system has been recoded to improve performance and for future changes. This version might not work as expected.
    • isNew renamed to isFromNewSystem as it has a different purpose now.
    • removed containsLegacy as it's a pointless method and wastes memory.

    XBlock
    • The XBlock class is completed, however some methods need to be changed.
    • added isAir, isPotato, isCarrot and isNetherwart. All the is<Material> methods can be accessed from a single method isType(Block, XMaterial)
    • Added isContainer (from the last update)
    • Fixed Openable methods.

    I started working on XParticle. If you want any features added tell me. (Except complex 3D shapes...)
    One of the features I'm working on is images to particles.
     
    #157 CryptoMorin, Jan 16, 2020 at 4:51 PM
    Last edited: Jan 16, 2020 at 4:57 PM
    • Like Like x 2
  15. Do you have a version of XParticles without all the features just need the particle names etc.
     
  16. Only two particle names changed. Why do you need a whole new enum just for that?
     
  17. Oh fr? Then nvm