QUESTION: How to make block drop specific ITEM when broken by specific TOOL

Started by Sweddy on

Topic category: General discussion

Last seen on 16:40, 4. Oct 2018
Joined Sep 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
QUESTION: How to make block drop specific ITEM when broken by specific TOOL

I need metallic ores, even the vanilla Iron and Gold ones, to drop another item instead of their regular block drop when broken by a specific tool a.k.a a hammer.

Help plz

Last seen on 16:05, 15. Nov 2020
Joined Dec 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Hmm... interesting.
Sat, 04/23/2016 - 13:08

Hmm... interesting.

It has to be done with variables. I suggest removing the normal drop or something and play around with variables. For example, if Player Has Item in Hand = Hammer, then drop a specific item or put that item in said player's inventory.

Sorry if I explained that horribly, but hopefully you get my drift.

Last seen on 16:40, 4. Oct 2018
Joined Sep 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:Hmm... interesting.
Sat, 04/23/2016 - 14:08

@#1 

That's not the problem. I need it to do the same with regular ores. Iron and Gold. And I can't edit the properties of vanilla blocks.

Last seen on 22:13, 3. Apr 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
First i don't know why do you
Sat, 04/23/2016 - 17:31

First i don't know why do you make another thread with same topic For second i already gave you tips for what look. : Use "event handler " class. HarvestDropsEvent event.

Event Handler is specific class where you have defined some events. You can use empty GUI overlay for it because it is event handler where is defined something like "GUIScreenRenderEvent". You need instand of it HarvestDropsEvent.
After it you need check if event.block == Blocks.iron_ore and if so , change in ArrayList drops the drop item.

Last seen on 22:13, 3. Apr 2024
Joined Aug 2013
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
RE:First i don't know why do you
Sat, 04/23/2016 - 17:39

@#2 If you will need even more info , write me and i will gladly help you but next time please don't make another thread with same topic within few days. :)