ResourceLocation cannot be converted to String

Started by lawarmotte on

Topic category: Help with modding (Java Edition)

Last seen on 15:17, 18. Jul 2024
Joined Apr 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
ResourceLocation cannot be converted to String

Hi there !

I'm working on some blocks detector mod.

I have one error on my procedure but I can't relly figure out the problem:

 

Fabric Loom: 1.0.18
Not publishing sources jar as it was not found. Use java.withSourcesJar() to fix.
> Task :compileJava
C:\Users\olivier\MCreatorWorkspaces\ore_detector\src\main\java\net\mcreator\oredetector\procedures\OREDETECTORRIGHTCLICKEDONBLOCKProcedure.java:71: error: incompatible types: ResourceLocation cannot be converted to String
        && (world.getBlockState(new BlockPos(x, posY, z))).is(BlockTags.create(new ResourceLocation(((namespace + ":" + "ores_coal")).toLowerCase(java.util.Locale.ENGLISH))))) {

 

Can someone help me with this one ? Thanks in advance

Last seen on 15:17, 18. Jul 2024
Joined Apr 2018
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Damn ! ok then, thanks for…
Tue, 10/03/2023 - 16:21

Damn ! ok then, thanks for the answer !