How to drop Lapis Lazuli ?

2 posts / 0 new
Last post
Offline
Last seen: 2 years 1 month ago
Joined: 03/25/2015 - 12:58
Gems: 0
How to drop Lapis Lazuli ?
Hi,
 
I would like to create a kind of lapis ore but I have a problem.
 
When I use the interface to add drops, I can chose "dye" but not a specific dye.
 
I tryed to define the item by editing the source.
When I attempt to use the interface, the id is Items.dye#4.
In my opinion it should be ItemStack(Items.dye, 1, 4).
 
MCreator
public Item getItemDropped(int par1, Random par2Random, int par3){
    return Items.dye;
}
 
The suggestion in the interface
public Item getItemDropped(int par1, Random par2Random, int par3){
    return Items.dye#4;
}
 
My test
public Item getItemDropped(int par1, Random par2Random, int par3){
    return new ItemStack(Items.dye, 14);
}
 
The compilation failed with the suggestion et my test.
What is wrong ?
 
NB : I think I can't use the damageDropped function because I have several types of items (e.g. gold_ingot, diamond...) that can be dropped by my block and I don't want to set the same damage value for all of them.
 
Config :
    MCreator 1.5.5
    Minecraft 1.7.10
 
Gradle log :
    The suggestion
        C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_ore.java:213: error: illegal character: \35
               return Items.dye#4;
                               ^
        1 error
 
        FAILURE: Build failed with an exception.
 
        * What went wrong:
        Execution failed for task ':compileJava'.
        > Compilation failed; see the compiler error output for details.
 
        * Try:
        Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
 
    My test
        C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_ore.java:222: error: incompatible types
               return new ItemStack(Items.dye, 14);
                      ^
          required: Item
          found:    ItemStack
        1 error
 
        FAILURE: Build failed with an exception.
 
        * What went wrong:
        Execution failed for task ':compileJava'.
        > Compilation failed; see the compiler error output for details.
 
        * Try:
        Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

 

Edited by: Eorana on 03/25/2015 - 15:14


mtn dew 314's picture
Offline
Last seen: 4 months 4 days ago
Joined: 12/20/2014 - 05:43
Gems: -2
if you want it to drop lapis

if you want it to drop lapis make it spawn lapis ore then make it remove with drop if there is a lapis ore