mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-14 04:00:30 +00:00
Identify unknown upgrades as ComputerCraft instead
When the mod id is null, the namespace is given as "minecraft". This is not what we want, so use CC there instead.
This commit is contained in:
parent
686c6a4c44
commit
11b40bb6d5
@ -11,6 +11,7 @@ import dan200.computercraft.shared.computer.core.ComputerFamily;
|
||||
import it.unimi.dsi.fastutil.objects.Object2ObjectLinkedOpenCustomHashMap;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraftforge.fml.ModContainer;
|
||||
import net.minecraftforge.fml.ModLoadingContext;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
@ -34,7 +35,8 @@ public final class TurtleUpgrades
|
||||
{
|
||||
this.upgrade = upgrade;
|
||||
id = upgrade.getUpgradeID().toString();
|
||||
modId = ModLoadingContext.get().getActiveNamespace();
|
||||
ModContainer mc = ModLoadingContext.get().getActiveContainer();
|
||||
modId = mc != null && mc.getModId() != null ? mc.getModId() : ComputerCraft.MOD_ID;
|
||||
enabled = true;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user