Merge branch 'master' into snapshot15
Conflicts: patches/minecraft/net/minecraft/client/renderer/RenderEngine.java.patch
This commit is contained in:
commit
22831e6b63
8 changed files with 59 additions and 10 deletions
|
@ -61,9 +61,9 @@ public class SpriteHelper
|
|||
"0000000000000000" +
|
||||
"0000000000000000" +
|
||||
"0111110000000000" +
|
||||
"1111111010000000" +
|
||||
"0111111010000000" +
|
||||
"0111111110000000" +
|
||||
"0111111111111001" +
|
||||
"0111111110001000" +
|
||||
"1111111111111111" +
|
||||
"0000011111111111" +
|
||||
"0000000000000000");
|
||||
|
|
|
@ -38,4 +38,19 @@ public class TextureFXManager
|
|||
return INSTANCE;
|
||||
}
|
||||
|
||||
public void fixTransparency(BufferedImage loadedImage, String textureName)
|
||||
{
|
||||
if (textureName.matches("^/mob/.*_eyes.*.png$"))
|
||||
{
|
||||
for (int x = 0; x < loadedImage.getWidth(); x++) {
|
||||
for (int y = 0; y < loadedImage.getHeight(); y++) {
|
||||
int argb = loadedImage.getRGB(x, y);
|
||||
if ((argb & 0xff000000) == 0 && argb != 0) {
|
||||
loadedImage.setRGB(x, y, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ public class LoadController
|
|||
if (isActive)
|
||||
{
|
||||
Level level = Logger.getLogger(mod.getModId()).getLevel();
|
||||
FMLLog.log(mod.getModId(), Level.FINE, "Mod Logging channel %s configured at %s level.", level == null ? "default" : level);
|
||||
FMLLog.log(mod.getModId(), Level.FINE, "Mod Logging channel %s configured at %s level.", mod.getModId(), level == null ? "default" : level);
|
||||
FMLLog.log(mod.getModId(), Level.INFO, "Activating mod %s", mod.getModId());
|
||||
activeModList.add(mod);
|
||||
modStates.put(mod.getModId(), ModState.UNLOADED);
|
||||
|
|
|
@ -12,6 +12,8 @@ import java.util.logging.Level;
|
|||
import com.google.common.base.Charsets;
|
||||
|
||||
import cpw.mods.fml.common.FMLLog;
|
||||
import cpw.mods.fml.common.Loader;
|
||||
import cpw.mods.fml.common.ModContainer;
|
||||
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.item.Item;
|
||||
|
@ -121,7 +123,23 @@ public class LanguageRegistry
|
|||
|
||||
public void loadLocalization(String localizationFile, String lang, boolean isXML)
|
||||
{
|
||||
loadLocalization(this.getClass().getResource(localizationFile), lang, isXML);
|
||||
URL urlResource = this.getClass().getResource(localizationFile);
|
||||
if (urlResource != null)
|
||||
{
|
||||
loadLocalization(urlResource, lang, isXML);
|
||||
}
|
||||
else
|
||||
{
|
||||
ModContainer activeModContainer = Loader.instance().activeModContainer();
|
||||
if (activeModContainer!=null)
|
||||
{
|
||||
FMLLog.log(activeModContainer.getModId(), Level.SEVERE, "The language resource %s cannot be located on the classpath. This is a programming error.", localizationFile);
|
||||
}
|
||||
else
|
||||
{
|
||||
FMLLog.log(Level.SEVERE, "The language resource %s cannot be located on the classpath. This is a programming error.", localizationFile);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void loadLocalization(URL localizationFile, String lang, boolean isXML)
|
||||
|
|
|
@ -151,6 +151,7 @@ public class FMLRelaunchLog
|
|||
log.myLog.setLevel(Level.ALL);
|
||||
log.myLog.setUseParentHandlers(false);
|
||||
consoleLogThread = new Thread(new ConsoleLogThread());
|
||||
consoleLogThread.setDaemon(true);
|
||||
consoleLogThread.start();
|
||||
formatter = new FMLLogFormatter();
|
||||
try
|
||||
|
|
|
@ -433,15 +433,16 @@ def apply_fml_patches(fml_dir, mcp_dir, src_dir, copy_files=True):
|
|||
if os.path.isdir(os.path.join(src_dir, 'minecraft', 'argo')):
|
||||
shutil.rmtree(os.path.join(src_dir, 'minecraft', 'argo'))
|
||||
|
||||
def finish_setup_fml(fml_dir, mcp_dir, enable_server=False, disable_client=False):
|
||||
def finish_setup_fml(fml_dir, mcp_dir, enable_server=False, disable_client=False, disable_rename=False):
|
||||
sys.path.append(mcp_dir)
|
||||
from runtime.updatenames import updatenames
|
||||
from runtime.updatemd5 import updatemd5
|
||||
from runtime.updatemcp import updatemcp
|
||||
|
||||
os.chdir(mcp_dir)
|
||||
updatenames(None, True, not disable_client, enable_server)
|
||||
reset_logger()
|
||||
if not disable_rename:
|
||||
updatenames(None, True, not disable_client, enable_server)
|
||||
reset_logger()
|
||||
updatemd5(None, True, not disable_client, enable_server)
|
||||
reset_logger()
|
||||
os.chdir(fml_dir)
|
||||
|
|
|
@ -3,7 +3,8 @@ from optparse import OptionParser
|
|||
|
||||
from fml import setup_fml, finish_setup_fml, apply_fml_patches, setup_mcp
|
||||
|
||||
def fml_main(fml_dir, mcp_dir, dont_gen_conf=True, disable_patches=False, disable_at=False, disable_merge=False, enable_server=False, disable_client=False):
|
||||
def fml_main(fml_dir, mcp_dir, dont_gen_conf=True, disable_patches=False, disable_at=False, disable_merge=False, enable_server=False, disable_client=False,
|
||||
disable_rename=False):
|
||||
print '================ Forge ModLoader Setup Start ==================='
|
||||
setup_mcp(fml_dir, mcp_dir, dont_gen_conf)
|
||||
setup_fml(fml_dir, mcp_dir, disable_at=disable_at, disable_merge=disable_merge, enable_server=enable_server, disable_client=disable_client)
|
||||
|
@ -11,7 +12,7 @@ def fml_main(fml_dir, mcp_dir, dont_gen_conf=True, disable_patches=False, disabl
|
|||
print 'Patching disabled'
|
||||
else:
|
||||
apply_fml_patches(fml_dir, mcp_dir, os.path.join(mcp_dir, 'src'))
|
||||
finish_setup_fml(fml_dir, mcp_dir, enable_server=enable_server, disable_client=disable_client)
|
||||
finish_setup_fml(fml_dir, mcp_dir, enable_server=enable_server, disable_client=disable_client, disable_rename=disable_rename)
|
||||
print '================ Forge ModLoader Setup End ==================='
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
@ -22,6 +23,7 @@ if __name__ == '__main__':
|
|||
parser.add_option('-s', '--server', action="store_true", dest='enable_server', help='Enable decompilation of server', default=False)
|
||||
parser.add_option('-c', '--no-client', action="store_true", dest='no_client', help='Disable decompilation of server', default=False)
|
||||
parser.add_option('-e', '--no-merge', action="store_true", dest='no_merge', help='Disable merging server code into client', default=False)
|
||||
parser.add_option('-n', '--no-rename', action="store_true", dest='no_rename', help='Disable running updatenames', default=False)
|
||||
options, _ = parser.parse_args()
|
||||
|
||||
fml_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
|
@ -40,4 +42,5 @@ if __name__ == '__main__':
|
|||
|
||||
fml_main(fml_dir, mcp_dir, disable_patches=options.no_patch,
|
||||
disable_at=options.no_access, disable_merge=options.no_merge,
|
||||
enable_server=options.enable_server, disable_client=options.no_client)
|
||||
enable_server=options.enable_server, disable_client=options.no_client,
|
||||
disable_rename=options.no_rename)
|
|
@ -43,6 +43,17 @@
|
|||
ioexception.printStackTrace();
|
||||
int[] aint2 = this.func_78348_b(this.field_78364_l);
|
||||
this.field_78359_d.put(p_78346_1_, aint2);
|
||||
@@ -181,7 +190,9 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
- this.func_78351_a(this.func_78345_a(var7), var3);
|
||||
+ BufferedImage loadedImage = this.func_78345_a(var7);
|
||||
+ TextureFXManager.instance().fixTransparency(loadedImage, p_78341_1_);
|
||||
+ this.func_78351_a(loadedImage, var3);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -506,8 +515,9 @@
|
||||
this.field_78361_b = false;
|
||||
this.field_78363_a = false;
|
||||
|
|
Loading…
Reference in a new issue