mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-28 23:59:00 +00:00
Patches and rejected patches. Note: some which had imports are not listed here because they need
to be refactored not to have imports. Progress: https://gist.github.com/cpw/29695e426e2b122cf8ff
This commit is contained in:
1 parent
1a6c816bac
commit
98125a97c9
409 files changed
+16902
No files matched your search
@@ -0,0 +1,78 @@
|
||||
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
|
||||
@@ -28,6 +28,7 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TextureMap extends AbstractTexture implements ITickableTextureObject
|
||||
{
|
||||
+ private static final boolean ENABLE_SKIP = Boolean.parseBoolean(System.getProperty("fml.skipFirstTextureLoad", "true"));
|
||||
private static final Logger logger = LogManager.getLogger();
|
||||
public static final ResourceLocation LOCATION_MISSING_TEXTURE = new ResourceLocation("missingno");
|
||||
public static final ResourceLocation locationBlocksTexture = new ResourceLocation("textures/atlas/blocks.png");
|
||||
@@ -39,6 +40,7 @@
|
||||
private int mipmapLevels;
|
||||
private final TextureAtlasSprite missingImage;
|
||||
private static final String __OBFID = "CL_00001058";
|
||||
+ private boolean skipFirst = false;
|
||||
|
||||
public TextureMap(String p_i46099_1_)
|
||||
{
|
||||
@@ -167,6 +169,7 @@
|
||||
stitcher.addSprite(textureatlassprite);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
int j1 = Math.min(j, k);
|
||||
int k1 = MathHelper.calculateLogBaseTwo(j1);
|
||||
|
||||
@@ -217,9 +220,13 @@
|
||||
|
||||
this.missingImage.generateMipmaps(this.mipmapLevels);
|
||||
stitcher.addSprite(this.missingImage);
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
+ skipFirst = false;
|
||||
+ bar = net.minecraftforge.fml.common.ProgressManager.push("Texture creation", 3);
|
||||
|
||||
try
|
||||
{
|
||||
+ bar.step("Stitching");
|
||||
stitcher.doStitch();
|
||||
}
|
||||
catch (StitcherException stitcherexception)
|
||||
@@ -323,4 +330,37 @@
|
||||
{
|
||||
return this.missingImage;
|
||||
}
|
||||
+
|
||||
+ //===================================================================================================
|
||||
+ // Forge Start
|
||||
+ //===================================================================================================
|
||||
+ /**
|
||||
+ * Grabs the registered entry for the specified name, returning null if there was not a entry.
|
||||
+ * Opposed to registerIcon, this will not instantiate the entry, useful to test if a mapping exists.
|
||||
+ *
|
||||
+ * @param name The name of the entry to find
|
||||
+ * @return The registered entry, null if nothing was registered.
|
||||
+ */
|
||||
+ public TextureAtlasSprite getTextureExtry(String name)
|
||||
+ {
|
||||
+ return (TextureAtlasSprite)mapRegisteredSprites.get(name);
|
||||
+ }
|
||||
+
|
||||
+ /**
|
||||
+ * Adds a texture registry entry to this map for the specified name if one does not already exist.
|
||||
+ * Returns false if the map already contains a entry for the specified name.
|
||||
+ *
|
||||
+ * @param name Entry name
|
||||
+ * @param entry Entry instance
|
||||
+ * @return True if the entry was added to the map, false otherwise.
|
||||
+ */
|
||||
+ public boolean setTextureEntry(String name, TextureAtlasSprite entry)
|
||||
+ {
|
||||
+ if (!mapRegisteredSprites.containsKey(name))
|
||||
+ {
|
||||
+ mapRegisteredSprites.put(name, entry);
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
}
|
||||
Reference in new issue
Block a user