- 12
- 0
Сообственно есть такой вопрос, как сделать что бы при ломании определенного блока, с него падал дроп не с Ванили/моего мода, а с абсолютно другого мода, допустим ic2
Java:
package ua.dream007.dreammirror;
import java.util.Random;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
public class BlocksIronTest extends Block {
@Override
public Item getItemDropped(int meta, Random random, int par3)
{
return Main.airsword; //Тут указывается блок который должен дропаться
}
@Override
public int damageDropped(int metadata) {
return 1;
}
public int quantityDropped(Random random)
{
return 2 + random.nextInt(3);
}
protected BlocksIronTest(Material p_i45394_1_, String name, String texture) {
super(p_i45394_1_);
this.setBlockName(name);
this.setLightLevel(0F);
this.setLightOpacity(10);
this.setHardness(1.0F);
this.setCreativeTab(Main.DreamMirror);
this.setHarvestLevel("pickaxe", 2);
this.setStepSound(soundTypeMetal);
//this.setBlockUnbreackable();
this.setBlockTextureName("dreammirror:" + texture);
GameRegistry.registerBlock(this, name);
}
}