Filled Oak tree apple leaves

Discussion in 'Archived: Plugin Requests' started by Gitany, Jul 21, 2013.

  1. Offline


    Currently in Minecraft there is a 5%, or 1/200 chance that a broken oak leaf will drop an apple.

    I want that feature removed, and replaced by this:

    Every oak leaf that spawns, has a 5% or 1/200 chance to become a apple leaf. The apple leaf has the texture of a jungle leaf but it drops 1 apple instead of jungle sapling.

    Commands: None
    permissions: None
    Config: None
    Else: None

    Is this possible? Is it possible to make this "new block" by re-using the texture of jungle leaf without replacing it totally? making leaves in jungles act as normal but jungleleaves spawed on oaktree drop apples? Isnt it possible to make individual blocks act different? like dprotection and stuff? then would it be possible to make certain leaf blocks have different drops than others depending on tree?

    If possible, can u make it so that the percant chance of apple leaf replacing oakleaves is configurable in the config?
  2. Offline


    Make sure your request is even possible. Bukkit plugins can, for the most part, only modify what the server can do. Here is a list of things you cannot do with a plugin:
    • Create a new block or item.
    • Show a picture or video to a player (except maps or displayed in blocks)
    • Create a new creature or monster or change the size of an existing one
    • Check if a player has a texture pack, mod, or hack installed.
    • Play external sound. Can only trigger noteblocks, records and effects.
    • Move a player between servers (in a way that doesn't involve complicated proxying)
  3. Offline


    -.- no this is not a new block. This is e re use of jungle leaf. There is many plugins doing similar. For example there can be both normal villagers and shopkeeper villagers in the shopkeeper plugin. In another plugin I saw a new block called crate! that crate re-used the texture of piston-extender. that block had its own recepie and its own function. This is possible. and if not, tell me why. "cannot create new blocks or items". I know that. Noththing new. But theres a lot you CAN do. You can create many new items using what plugins offer. One plugin called newmeat added horse meat and sheep meat by re-using beef and pork and re-naming it. It's properties even was changed from the original meat-types! There is plugins adding witherbows, these bows are not replaceing the original bows they are an ADDITION to the original. I have seen many types of block stuff too. And I do know that you can use one type of block and make each unit have individual properties. I cannot see why this shouldn't work. I have good references and I do think this is possible. If its not then tell me why, not that it isn't. New types of blocks, items, blocks have been added before (by re-using what already exist.) I don't know how, I cant code, but from what ive seen I see a possibility and i'm curious to see if it is possible.

    sorry if there is something I missed. as I said I don't know any coding. I just think similar things have been done and I hope my idea can be done too.

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


    this is waht you basicly just said
    "No You Are rong its possible its reusing another block"
    Realy meaning
    "its a server mod all player will need it to join you are just using a texture from another block"
    Its almost near impossible
  5. Sorry, but if you have no clue what you are talking about, just don't respond -.-

    The plugin is possible, just save the location of the special blocks and when they are broken change the drops to one apple. Only thing that could be difficult is knowing what blocks to change, I'm not sure how difficult it would be to get all the locations of the leaves from a tree
    Eats_Rainbows likes this.
  6. Offline


    I get it but you will have to config the whole minecraft a plugon could auto do that
  7. Offline


    maybe we could make it so that it all depends on the biomes? if the leaf block is in junglebiome it drops normal. if a jungleleaf is destroyed in another biome it drops apples instead. that way there is no need for adding new blocks just behavior depending on tje position. then we can fix abuses like moving blocks to other biomes to change drops, by disabling picking up leafblocks when destroyed by shears if the block is positioned in biomes other than junglebiomes, and making picked up jungeblocks unable of being placed outside jungles? sry for bad english
  8. I'm making a plugin for your original suggestion now, I'll post a link here in a bit.
    Config file contains the trees that will have special apple leaves, the percentage of leaves to be replaced with apple leaves and whether or not the plugin should prevent natural item drops.
    Apple leaves will always drop an apple and never drop saplings.
    Natural apple drops *should* not occur, but I've not really tested this.

    One issue this plugin might have is that the locations of the special leaves are stored in a file, which probably isn't great compared to a database, don't think it should cause any real issues though.

    If several people want me to improve this, then I'll add proper SQLite/SQL database & BukkitDev page etc., otherwise any other dev can continue this by just taking the source out of the jar file (exported with .java files, simply extract it and you'll have the code).

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
    Last edited by a moderator: Jun 3, 2016
    Williscool98 likes this.
  9. Offline


    amazing! thank you! I'll test it as soon as I have access to my server :D
  10. Offline


    I have tested it now and I have looked around in forests and checked many trees but so far I have only met 1 apple leaf. It is supposed to be 5 % chance that a oak leave will be changed into a appleleave, so that should mean that for every 200 oakleave I see I should see 1 appleleave. I have looked at many hundreds of leaves now and I have only seen one so far. Ive tested to change the config to higher percentage. I tested 50 % but still I didn't see any appleleaves. The locations config does only seem to genereate about 1-3 apple leaves totat. Stilli have been running throught multiple forests. :/ btw the apple leave I saw and broke was exactly as I wanted it, perfect :)
  11. Offline


    Gitany er, 1/200 is 0.5%, not 5%.
  12. Offline



    lol. Should have known that :p. But still when I make the percents higher there is nothing spawning :/

    false alarm! it works! Thank you naithantu !!!!!!!!!!!!!!!!!!!!!!

    Okay I see the problem... Apple leaves only spawns on oaktrees that is grown from saplings. the trees that generate when the world generate wont have apples in them :/

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


    But it works, and Im so happy! :) Thank you!

Share This Page