Candy World - ReCaramelized

Candy World - ReCaramelized

162k Downloads

[Bug]: `preventModdedMobSpawn` config doesn't function due to not using .equals()

CorgiTaco opened this issue ยท 1 comments

commented

General Info

  • I am running a modpack
  • I can reproduce this issue consistently in single-player
  • I can reproduce this issue consistently in multi-player
  • I have searched for this issue previously and it was either (1) not previously reported, or (2) previously fixed and I am having the same problem.
  • I am crashing and can provide my crash report(s)
  • I am using the latest version of the mod

Forge version

x

Mod version

x

Java version

x

Issue Description

preventModdedMobSpawn config fails.

This line: https://github.com/Mrbysco/CandyWorld/blob/main/src/main/java/com/mrbysco/candyworld/events/EventHandler.java#L29

should use .equals(s2) since these are strings being compared. Strings should never be compared with == or !=

So it should be:

  if(livingEntity.getType().getRegistryName().getNamespace().equals(CandyWorld.MOD_ID)) {

Additional Information

No response

commented

Apparently it slipped the cracks when I was going through the code