Charcoal replaces with Coal in-game

Started by Sweddy on Tue, 02/20/2018 - 06:36

Topic category: Bugs and solutions

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Charcoal replaces with Coal in-game
Tue, 02/20/2018 - 06:36

I'm trying to make a specific block drop Charcoal, but instead it just drops regular Coal. I assume there is something I have to change within the code to fix this issue, but I don't know what. Would someone please help?

Last seen on 02:38, 21. Feb 2020
Joined Oct 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
Before I can help what…
Tue, 02/20/2018 - 23:01

Before I can help what version are you using?

Go into code editor Press Ctrl+F type "Items.coal" and replace with Items.coal, 1, 1"

If you can send me the code via pm or if its on Github I can look at it and see exactly what it is.

Last seen on 02:38, 21. Feb 2020
Joined Oct 2014
User points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
@Override…
Tue, 02/20/2018 - 23:24
		@Override
		public Item getItemDropped(IBlockState state, Random par2Random, int par3) {
			return new ItemStack(Items.COAL, 1, 1).getItem();
		}

You should have something like that.

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
It does say exactly that,…
Wed, 02/21/2018 - 09:12

It does say exactly that, look:

		}

		@Override
		public Item getItemDropped(IBlockState state, Random par2Random, int par3) {
			return new ItemStack(Items.COAL, 1, 1).getItem();
		}
	}
}

But it still drops coal instead of charcoal.