How is this possible?

Discussion in 'Plugin Development' started by datester35, Mar 22, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    datester35

    I was just looking at the bukkit plugin called bukkit blocks. It states that it can somehow use block metadata to change the texture a block. Is there any way I can implement this kind of "custom block" in my plugin? For example, the player does /buy 64 stone:10 (or whatever the name can be) and it will give him the custom block.
     
  2. Offline

    StaticJava

    Can I have the link to this plugin? What version is it of?
     
  3. Offline

    acecheesecr14

    Can you link us?
     
  4. Offline

    datester35

  5. Offline

    MrPotatoMuncher

    Wat o.o how even
     
  6. Offline

    Minnymin3

    Its not possible afaik. My guess is its just there to mess with people.
     
  7. Offline

    MRPS

    Minnymin3 datester35 acecheesecr14
    You can register a command for /buy just like any other command, same for doing the argument for 64. Here's how I would approach the stone:10, though:

    First get the args[1] which is stone:10 in this case. You can then do String[] arr = args[1].split(":"). This will create a new string array with two entries, "stone" and "10". Now use these methods to get your custom block thing:

    Code:
    private ItemStack getCustomBlockStack(String[] arr, int amount)
    {
    String enum = 
    ItemStack is = new ItemStack(Material.matchMaterial(arr[0]),amount);
    // Comparison time: add your numbers and stuff
    if(arr[1].equals("1"){ // "stone:1"
      // apply enchantments and metadata in here
    }
    else if(arr[1].equals("2"){ // "stone:2"
      // apply enchantments and metadata in here
    }
    else if(arr[1].equals("3"){ // "stone:3"
      // apply enchantments and metadata in here
    }
    else if(arr[1].equals("poop"){ "stone:poop"
      // apply enchantments and metadata in here
    }
    // ...
     
    return is;
    }
     
  8. Offline

    GameplayJDK

    MRPS likes this.
  9. Offline

    acecheesecr14

    Maybe using texture packs and some really really messy, per chunk, this is "possible". Can you change texturepacks per block? (If that's yes then its more than possible. otherwise nope).
     
  10. Offline

    Minnymin3

    The server can't change the client's texture pack only ask if they want to download resource packs.
    Not what the OP was asking. Its impossible to create a new block or change block textures without the client clicking the download button without a client mod installed.
     
  11. Offline

    JBoss925

    It's fake lol.
     
  12. Offline

    MRPS

    Minnymin3 Some of us are gearing up for the beta mod API, thanks.
     
  13. Offline

    Plo124

    Maybe wait until 1.8 when the Plugin API is out
     
  14. Offline

    MrInspector

    There are a lot of 'fake' projects out there to get peoples hopes up. If he added a download with no comments and it got approved, he'd probably get a ton of downloads.

    I've seen lots of plugins like this, including one project claiming to connect servers together, just with bukkit.

    Also btw, he was using a resource pack, it made me giggle what people do to get views. :)
     
  15. Offline

    acecheesecr14

    If you accept one texture pack, I think it accepts all texture packs for that session...

    Plo124 Is the mod API out in 1.8?!
     
  16. Offline

    Noxyro


    *Trolling intensifies* ... some people want to see the world burn :c

    It's NOT possible at ANY given point within the Bukkit API to create CUSTOM block and/or items.
    Period.



    (Topic could be marked closed / solved now I guess)
     
  17. Offline

    Plo124

    acecheesecr14
    I think the Plugin API will be out because Dinnerbone took out ID's for this reason, and thats whats in the new snapshot
     
  18. Offline

    acecheesecr14

    It's all in preparation, i heard it would be out properly after 1.9 :D Although I welcome it before then!
     
  19. Offline

    RawCode

    this is no plugin, it's just wild imagination of "developer.
     
  20. Offline

    Zarko

    Such troll,much wow!
     
  21. Offline

    Minnymin3

    Yeah we are getting the modding API next update (said by notch in 2010...)

    The modding API has had no progress or updates meaning no one has had a chance to beta test it. I don't know if we ever will get a modding API. Right now Mojang is making a lot of great changes some of which would benefit the modding API but those are one in a dozen. Don't get me wrong, Mojang is working hard and adding some awesome features that I'm sure a ton of people, including myself, are excited about but a modding API is not something that we will get anytime soon.

    Yeah thats what they said about 1.5...

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 7, 2016
  22. Offline

    acecheesecr14

    Hey, at least there is Bukkit... Also I think people forget that Dinnerbone was/is one of the Bukkit developers, and Mojang are employing him.. I'm pretty sure that he will get this done before minecraft becomes "dead"... (That's if it can).
     
Thread Status:
Not open for further replies.

Share This Page