How i adding a new material

Discussion in 'Plugin Development' started by Neui, Jun 18, 2012.

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

    Neui

    Hello, i've created a Item (for a Mod).
    So, i must give the Crafting-Recipes.
    But, the "setIngredient" accept only Material/MaterialData..

    So, how i add a new Material?
     
  2. Offline

    LexLaiden

    What??? not sure I understand.
     
  3. Offline

    Courier

    You can't add a new material solely server-side. The user would need a modified client.
     
  4. Offline

    mushroomhostage

    The use of "enum" for Material is a design flaw in Bukkit which makes this not as easy as it should be (note that vanilla Minecraft does not have this problem). But it is possible to dynamically add your new item to the Material enum at runtime so the Bukkit API can recognize it. See here: http://niceideas.ch/roller2/badtrash/entry/java_create_enum_instances_dynamically

    edit: as mentioned above, the client must know of the new item as well.. but I assume you know that if you already have a working mod..
     
  5. Offline

    Neui

    I know, the Plugin IS for a Mod (The Mod adds an Item (with no function) and adds a Crafting-Recipe AND change the Glass-Drops..

    Sorry, but i really don't understand...
    Can you explain it?
     
  6. Offline

    caldabeast

    Are you tying to create a crafting recipie?
     
Thread Status:
Not open for further replies.

Share This Page