Charcoal replaces with Coal in-game

Started by Sweddy on

Topic category: Troubleshooting, bugs, and solutions

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

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Charcoal replaces with Coal in-game

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 12:44, 9. Feb 2021
Joined Oct 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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 12:44, 9. Feb 2021
Joined Oct 2014
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • 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.