mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-16 01:54:50 +00:00
Update Forge Mappings.
This commit is contained in:
1 parent
c67c731647
commit
5c5384f79c
8 files changed
+33
-32
No files matched your search
@@ -77,14 +77,14 @@ public class LangUtil
|
||||
|
||||
public LangUtil addLangDir(ResourceLocation dir)
|
||||
{
|
||||
ResourceManager resManager = Minecraft.getMinecraft().func_110442_L();
|
||||
for(Language lang : (SortedSet<Language>)Minecraft.getMinecraft().func_135016_M().func_135040_d())
|
||||
ResourceManager resManager = Minecraft.getMinecraft().getResourceManager();
|
||||
for(Language lang : (SortedSet<Language>)Minecraft.getMinecraft().getLanguageManager().getLanguages())
|
||||
{
|
||||
String langID = lang.func_135034_a();
|
||||
String langID = lang.getLanguageCode();
|
||||
Resource langRes;
|
||||
try
|
||||
{
|
||||
langRes = resManager.func_110536_a(new ResourceLocation(dir.func_110624_b(), dir.func_110623_a()+'/'+langID+".lang"));
|
||||
langRes = resManager.getResource(new ResourceLocation(dir.getResourceDomain(), dir.getResourcePath()+'/'+langID+".lang"));
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
@@ -92,7 +92,7 @@ public class LangUtil
|
||||
}
|
||||
try
|
||||
{
|
||||
addLangFile(langRes.func_110527_b(), langID);
|
||||
addLangFile(langRes.getInputStream(), langID);
|
||||
}
|
||||
catch(IOException e)
|
||||
{
|
||||
@@ -103,7 +103,8 @@ public class LangUtil
|
||||
|
||||
return this;
|
||||
}
|
||||
|
||||
|
||||
@Deprecated
|
||||
public static void loadBaseLangDir(ResourceLocation dir)
|
||||
{
|
||||
instance.addLangDir(dir);
|
||||
|
||||
@@ -1077,7 +1077,7 @@ public final class PacketCustom implements MCDataInput, MCDataOutput
|
||||
public static void sendToOps(Packet packet)
|
||||
{
|
||||
for(EntityPlayerMP player : (List<EntityPlayerMP>)MinecraftServer.getServer().getConfigurationManager().playerEntityList)
|
||||
if(MinecraftServer.getServer().getConfigurationManager().areCommandsAllowed(player.username))
|
||||
if(MinecraftServer.getServer().getConfigurationManager().isPlayerOpped(player.username))
|
||||
sendToPlayer(packet, player);
|
||||
}
|
||||
|
||||
|
||||
@@ -628,7 +628,7 @@ public class CCModel
|
||||
try
|
||||
{
|
||||
return parseObjModels(
|
||||
Minecraft.getMinecraft().func_110442_L().func_110536_a(res).func_110527_b(),
|
||||
Minecraft.getMinecraft().getResourceManager().getResource(res).getInputStream(),
|
||||
4, coordSystem);
|
||||
}
|
||||
catch(IOException e)
|
||||
@@ -649,7 +649,7 @@ public class CCModel
|
||||
try
|
||||
{
|
||||
return parseObjModels(
|
||||
Minecraft.getMinecraft().func_110442_L().func_110536_a(res).func_110527_b(),
|
||||
Minecraft.getMinecraft().getResourceManager().getResource(res).getInputStream(),
|
||||
vertexMode, coordSystem);
|
||||
}
|
||||
catch(Exception e)
|
||||
|
||||
@@ -99,7 +99,7 @@ public class CCRenderState
|
||||
|
||||
public static void changeTexture(ResourceLocation texture)
|
||||
{
|
||||
Minecraft.getMinecraft().renderEngine.func_110577_a(texture);
|
||||
Minecraft.getMinecraft().renderEngine.bindTexture(texture);
|
||||
}
|
||||
|
||||
public static void apply()
|
||||
|
||||
@@ -46,7 +46,7 @@ public class SpriteSheetManager
|
||||
{
|
||||
TextureMap textureMap = (TextureMap)register;
|
||||
|
||||
if(TextureUtils.refreshTexture(textureMap, resource.func_110623_a()))
|
||||
if(TextureUtils.refreshTexture(textureMap, resource.getResourcePath()))
|
||||
{
|
||||
reloadTexture();
|
||||
for(int i = 0; i < sprites.length; i++)
|
||||
@@ -108,7 +108,7 @@ public class SpriteSheetManager
|
||||
return spriteHeight;
|
||||
}
|
||||
|
||||
public TextureSpecial func_110577_aFX(int i, TextureFX textureFX)
|
||||
public TextureSpecial bindTextureFX(int i, TextureFX textureFX)
|
||||
{
|
||||
return setupSprite(i).addTextureFX(textureFX);
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ public class TextureFX
|
||||
|
||||
public TextureFX(int spriteIndex, SpriteSheet sheet)
|
||||
{
|
||||
texture = sheet.func_110577_aFX(spriteIndex, this);
|
||||
texture = sheet.bindTextureFX(spriteIndex, this);
|
||||
}
|
||||
|
||||
public TextureFX(int size, String name)
|
||||
|
||||
@@ -56,11 +56,11 @@ public class TextureSpecial extends TextureAtlasSprite implements IIconRegister
|
||||
}
|
||||
|
||||
@Override
|
||||
public void func_110971_a(int sheetWidth, int sheetHeight, int originX, int originY, boolean rotated)
|
||||
public void initSprite(int sheetWidth, int sheetHeight, int originX, int originY, boolean rotated)
|
||||
{
|
||||
super.func_110971_a(sheetWidth, sheetHeight, originX, originY, rotated);
|
||||
super.initSprite(sheetWidth, sheetHeight, originX, originY, rotated);
|
||||
if(textureFX != null)
|
||||
textureFX.onTextureDimensionsUpdate(field_130223_c, field_130224_d);
|
||||
textureFX.onTextureDimensionsUpdate(width, height);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -70,7 +70,7 @@ public class TextureSpecial extends TextureAtlasSprite implements IIconRegister
|
||||
{
|
||||
textureFX.update();
|
||||
if(textureFX.changed())
|
||||
TextureUtil.func_110998_a(textureFX.imageData, field_130223_c, field_130224_d, field_110975_c, field_110974_d, false, false);
|
||||
TextureUtil.uploadTextureSub(textureFX.imageData, width, height, originX, originY, false, false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,45 +81,45 @@ public class TextureSpecial extends TextureAtlasSprite implements IIconRegister
|
||||
{
|
||||
for(TextureDataHolder tex : baseTextures)
|
||||
{
|
||||
field_110976_a.add(tex.data);
|
||||
field_130223_c = tex.width;
|
||||
field_130224_d = tex.height;
|
||||
framesTextureData.add(tex.data);
|
||||
width = tex.width;
|
||||
height = tex.height;
|
||||
}
|
||||
}
|
||||
|
||||
if(spriteSheet != null)
|
||||
{
|
||||
TextureDataHolder tex = spriteSheet.createSprite(spriteIndex);
|
||||
field_130223_c = tex.width;
|
||||
field_130224_d = tex.height;
|
||||
field_110976_a.add(tex.data);
|
||||
width = tex.width;
|
||||
height = tex.height;
|
||||
framesTextureData.add(tex.data);
|
||||
}
|
||||
|
||||
if(blankSize > 0)
|
||||
{
|
||||
field_130223_c = field_130224_d = blankSize;
|
||||
field_110976_a.add(new int[blankSize*blankSize]);
|
||||
width = height = blankSize;
|
||||
framesTextureData.add(new int[blankSize*blankSize]);
|
||||
}
|
||||
|
||||
if(field_110976_a.isEmpty())
|
||||
if(framesTextureData.isEmpty())
|
||||
throw new RuntimeException("No base frame for texture: "+getIconName());
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean func_130098_m()
|
||||
public boolean hasAnimationMetadata()
|
||||
{
|
||||
return textureFX != null || super.func_130098_m();
|
||||
return textureFX != null || super.hasAnimationMetadata();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int func_110970_k()
|
||||
public int getFrameCount()
|
||||
{
|
||||
if(textureFX != null)
|
||||
return 1;
|
||||
|
||||
return super.func_110970_k();
|
||||
return super.getFrameCount();
|
||||
}
|
||||
|
||||
public TextureSpecial blank(int size)
|
||||
|
||||
@@ -70,7 +70,7 @@ public class TextureUtils
|
||||
|
||||
public static InputStream getTextureResource(ResourceLocation textureFile) throws IOException
|
||||
{
|
||||
return Minecraft.getMinecraft().func_110442_L().func_110536_a(textureFile).func_110527_b();
|
||||
return Minecraft.getMinecraft().getResourceManager().getResource(textureFile).getInputStream();
|
||||
}
|
||||
|
||||
public static BufferedImage loadBufferedImage(ResourceLocation textureFile)
|
||||
@@ -113,7 +113,7 @@ public class TextureUtils
|
||||
|
||||
public static void bindAtlas(int atlasIndex)
|
||||
{
|
||||
engine().func_110577_a(atlasIndex == 0 ? TextureMap.field_110575_b : TextureMap.field_110576_c);
|
||||
engine().bindTexture(atlasIndex == 0 ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture);
|
||||
}
|
||||
|
||||
public static Icon getBlankIcon(int size, IconRegister iconRegister)
|
||||
|
||||
Reference in new issue
Block a user