Jump to content

HLG_Kitty

Members
  • Posts

    4
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

HLG_Kitty's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. also breakpoints arent working in eclipse
  2. thank you very much, i will be having a good read of that
  3. i tried if (event.state.getBlock() == Blocks.iron_ore..... but it didnt work, no errors or anything just dropped iron ore instead of an ingot
  4. I do not know/ cannot find which event to use to check what block i am breaking to change what the block drops. @SubscribeEvent public void onDrops(BlockEvent.HarvestDropsEvent event) { if (event.harvester.getHeldItem().getItem() == ToolsPPItems.brick_pickaxe) { event.drops.clear(); event.drops.add(new ItemStack(Items.iron_ingot)); } } that function works to change every block to drop an iron ingot. ive seen plenty of posts across the internet from days of googling with a Block block argument in the HarvestDropsEvent class constructor, but it no longer has this: I've looked in World and EntityPlayer but cannot find anything that points to the exact block that is being broken. //HarvestDropsEvent that is called everytime a block is broken public HarvestDropsEvent(World world, BlockPos pos, IBlockState state, int fortuneLevel, float dropChance, List<ItemStack> drops, EntityPlayer harvester, boolean isSilkTouching) { super(world, pos, state); this.fortuneLevel = fortuneLevel; this.dropChance = dropChance; this.drops = drops; this.isSilkTouching = isSilkTouching; this.harvester = harvester; } I am very new at modding minecraft, I just started a couple days ago. thank you for your help.
×
×
  • Create New...

Important Information

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