Jump to content

Stuff not dropping (Sovled)


Recommended Posts

//any ideas?



package com.kingz101.blocks;


import java.util.Random;


import com.kingz101.item.MItems;


import net.minecraft.block.Block;

import net.minecraft.block.material.Material;

import net.minecraft.item.Item;


public class SO extends Block {


public SO(Material p_i45394_1_) {


setHarvestLevel("Pickaxe", 3);




public int quantityDropped(Random rand) {

return 3;




public Item getItemDropped(int i, Random rand, int j) {

return MItems.S;





Link to comment
Share on other sites

Yeah won't drop when broken


import com.kingz101.armor.Marmor;

import com.kingz101.blocks.MBlocks;

import com.kingz101.item.MItems;

import com.kingz101.lib.RefStrings;

import com.kingz101.ore.Ore;



import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.EventHandler;

import cpw.mods.fml.common.SidedProxy;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPostInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;


@Mod(modid = RefStrings.MODID , name = RefStrings.NAME , version = RefStrings.VERSION)

public class MainRegistry {


@SidedProxy(clientSide = RefStrings.CLIENTSIDE , serverSide = RefStrings.SERVERSIDE)

public static ServerProxy proxy;



public static void PreLoad(FMLPreInitializationEvent PreEvent) {





proxy.registerRenderInfo () ;



public static void load(FMLInitializationEvent event) {




public static void PostLoad(FMLPostInitializationEvent PostEvent) {






package com.kingz101.item;


import com.kingz101.MCreativeTabs.tab;

import com.kingz101.lib.RefStrings;


import cpw.mods.fml.common.registry.GameRegistry;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.Item;


public class MItems {


public static void mainRegistry() {





public static Item SM , SW , PS , HE , HF , S;


public static void initalizeItem() {

SM = new Item().setUnlocalizedName("SM").setCreativeTab(tab.tab).setTextureName(RefStrings.MODID + ":SM");

SW = new Item().setUnlocalizedName("SW").setCreativeTab(tab.tab).setTextureName(RefStrings.MODID + ":SW");

PS = new Item().setUnlocalizedName("PS").setCreativeTab(tab.tab).setTextureName(RefStrings.MODID + ":PS");

HE = new Item().setUnlocalizedName("HE").setCreativeTab(tab.tab).setTextureName(RefStrings.MODID + ":HE");

HF = new Item().setUnlocalizedName("HF").setCreativeTab(tab.tab).setTextureName(RefStrings.MODID + ":HF");

S = new Item().setUnlocalizedName("S").setCreativeTab(tab.tab).setTextureName(RefStrings.MODID + ":S");



public static void registerItem() {

GameRegistry.registerItem(SM, SM.getUnlocalizedName());

GameRegistry.registerItem(SW, SW.getUnlocalizedName());

GameRegistry.registerItem(PS, PS.getUnlocalizedName());

GameRegistry.registerItem(HE, HE.getUnlocalizedName());

GameRegistry.registerItem(HF, HF.getUnlocalizedName());

GameRegistry.registerItem(S, S.getUnlocalizedName());




Link to comment
Share on other sites

add @Override in front of that method

   public Item getItemDropped(int i, Random rand, int j) {
      return MItems.S;

if you get an error you are probably importing wrong


Edit: There are different Random classes, make sure you import java.util.Random

and not scala.util.Random

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.