mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Fix uses of uppercase "Forge" where it fails Loader.isModLoaded(modID) (#3513)
This commit is contained in:
1 parent
4530967009
commit
6a125ae0d4
15 files changed
+43
-33
No files matched your search
@@ -116,7 +116,7 @@ public class ForgeGuiFactory implements IModGuiFactory
|
||||
{
|
||||
public ForgeConfigGui(GuiScreen parentScreen)
|
||||
{
|
||||
super(parentScreen, getConfigElements(), "Forge", false, false, I18n.format("forge.configgui.forgeConfigTitle"));
|
||||
super(parentScreen, getConfigElements(), ForgeVersion.MOD_ID, false, false, I18n.format("forge.configgui.forgeConfigTitle"));
|
||||
}
|
||||
|
||||
private static List<IConfigElement> getConfigElements()
|
||||
|
||||
@@ -37,7 +37,7 @@ import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
public class NotificationModUpdateScreen extends GuiScreen
|
||||
{
|
||||
|
||||
private static final ResourceLocation VERSION_CHECK_ICONS = new ResourceLocation("forge", "textures/gui/version_check_icons.png");
|
||||
private static final ResourceLocation VERSION_CHECK_ICONS = new ResourceLocation(ForgeVersion.MOD_ID, "textures/gui/version_check_icons.png");
|
||||
|
||||
private final GuiButton modButton;
|
||||
private Status showNotification = null;
|
||||
|
||||
@@ -27,6 +27,7 @@ import java.util.List;
|
||||
import javax.vecmath.Matrix4f;
|
||||
import javax.vecmath.Vector4f;
|
||||
|
||||
import net.minecraftforge.common.ForgeVersion;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -425,7 +426,7 @@ public final class ItemLayerModel implements IRetexturableModel
|
||||
|
||||
public boolean accepts(ResourceLocation modelLocation)
|
||||
{
|
||||
return modelLocation.getResourceDomain().equals("forge") && (
|
||||
return modelLocation.getResourceDomain().equals(ForgeVersion.MOD_ID) && (
|
||||
modelLocation.getResourcePath().equals("item-layer") ||
|
||||
modelLocation.getResourcePath().equals("models/block/item-layer") ||
|
||||
modelLocation.getResourcePath().equals("models/item/item-layer"));
|
||||
|
||||
@@ -45,6 +45,7 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.ForgeVersion;
|
||||
import net.minecraftforge.common.model.IModelPart;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
@@ -64,7 +65,7 @@ import com.google.common.collect.Maps;
|
||||
|
||||
public final class ModelDynBucket implements IModel, IModelCustomData, IRetexturableModel
|
||||
{
|
||||
public static final ModelResourceLocation LOCATION = new ModelResourceLocation(new ResourceLocation("forge", "dynbucket"), "inventory");
|
||||
public static final ModelResourceLocation LOCATION = new ModelResourceLocation(new ResourceLocation(ForgeVersion.MOD_ID, "dynbucket"), "inventory");
|
||||
|
||||
// minimal Z offset to prevent depth-fighting
|
||||
private static final float NORTH_Z_BASE = 7.496f / 16f;
|
||||
@@ -230,7 +231,7 @@ public final class ModelDynBucket implements IModel, IModelCustomData, IRetextur
|
||||
@Override
|
||||
public boolean accepts(ResourceLocation modelLocation)
|
||||
{
|
||||
return modelLocation.getResourceDomain().equals("forge") && modelLocation.getResourcePath().contains("forgebucket");
|
||||
return modelLocation.getResourceDomain().equals(ForgeVersion.MOD_ID) && modelLocation.getResourcePath().contains("forgebucket");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -41,6 +41,7 @@ import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraftforge.client.model.pipeline.UnpackedBakedQuad;
|
||||
import net.minecraftforge.common.ForgeVersion;
|
||||
import net.minecraftforge.common.model.IModelPart;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
@@ -104,7 +105,7 @@ public final class ModelFluid implements IModelCustomData
|
||||
|
||||
public boolean accepts(ResourceLocation modelLocation)
|
||||
{
|
||||
return modelLocation.getResourceDomain().equals("forge") && (
|
||||
return modelLocation.getResourceDomain().equals(ForgeVersion.MOD_ID) && (
|
||||
modelLocation.getResourcePath().equals("fluid") ||
|
||||
modelLocation.getResourcePath().equals("models/block/fluid") ||
|
||||
modelLocation.getResourcePath().equals("models/item/fluid"));
|
||||
|
||||
@@ -80,6 +80,7 @@ import net.minecraftforge.client.model.animation.AnimationItemOverrideList;
|
||||
import net.minecraftforge.client.model.animation.IAnimatedModel;
|
||||
import net.minecraftforge.client.model.animation.ModelBlockAnimation;
|
||||
import net.minecraftforge.common.ForgeModContainer;
|
||||
import net.minecraftforge.common.ForgeVersion;
|
||||
import net.minecraftforge.common.model.IModelPart;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
import net.minecraftforge.common.model.Models;
|
||||
@@ -360,7 +361,7 @@ public final class ModelLoader extends ModelBakery
|
||||
for(String s : getVariantNames(Items.BUCKET))
|
||||
{
|
||||
ModelResourceLocation memory = getInventoryVariant(s);
|
||||
IModel model = ModelLoaderRegistry.getModelOrMissing(new ResourceLocation("forge", "item/bucket"));
|
||||
IModel model = ModelLoaderRegistry.getModelOrMissing(new ResourceLocation(ForgeVersion.MOD_ID, "item/bucket"));
|
||||
// only on successful load, otherwise continue using the old model
|
||||
if(model != getMissingModel())
|
||||
{
|
||||
@@ -388,7 +389,7 @@ public final class ModelLoader extends ModelBakery
|
||||
for(String s : getVariantNames(Items.MILK_BUCKET))
|
||||
{
|
||||
ModelResourceLocation memory = getInventoryVariant(s);
|
||||
IModel model = ModelLoaderRegistry.getModelOrMissing(new ResourceLocation("forge", "item/bucket_milk"));
|
||||
IModel model = ModelLoaderRegistry.getModelOrMissing(new ResourceLocation(ForgeVersion.MOD_ID, "item/bucket_milk"));
|
||||
// only on successful load, otherwise continue using the old model
|
||||
if(model != getMissingModel())
|
||||
{
|
||||
|
||||
@@ -38,6 +38,7 @@ import net.minecraft.util.BlockRenderLayer;
|
||||
import net.minecraft.util.EnumFacing;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.client.MinecraftForgeClient;
|
||||
import net.minecraftforge.common.ForgeVersion;
|
||||
import net.minecraftforge.common.model.IModelState;
|
||||
import net.minecraftforge.common.model.TRSRTransformation;
|
||||
import net.minecraftforge.fml.common.FMLLog;
|
||||
@@ -248,7 +249,7 @@ public final class MultiLayerModel implements IModelCustomData
|
||||
|
||||
public boolean accepts(ResourceLocation modelLocation)
|
||||
{
|
||||
return modelLocation.getResourceDomain().equals("forge") && (
|
||||
return modelLocation.getResourceDomain().equals(ForgeVersion.MOD_ID) && (
|
||||
modelLocation.getResourcePath().equals("multi-layer") ||
|
||||
modelLocation.getResourcePath().equals("models/block/multi-layer") ||
|
||||
modelLocation.getResourcePath().equals("models/item/multi-layer"));
|
||||
|
||||
Reference in new issue
Block a user