From ee414b2037d88a3941ae6c46f4b69222400b8a03 Mon Sep 17 00:00:00 2001 From: Matthew Messinger Date: Wed, 1 Apr 2015 19:51:44 -0400 Subject: [PATCH 01/38] Cherry-pick 01aaa7dc97480b381ca0d192ec65016d7baeb747 Fix mods defined via --mods or --modListFile launch args not being searched for coremods. #560 --- fml/src/main/java/cpw/mods/fml/relauncher/CoreModManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fml/src/main/java/cpw/mods/fml/relauncher/CoreModManager.java b/fml/src/main/java/cpw/mods/fml/relauncher/CoreModManager.java index 8b1e092a32..9231c71b49 100644 --- a/fml/src/main/java/cpw/mods/fml/relauncher/CoreModManager.java +++ b/fml/src/main/java/cpw/mods/fml/relauncher/CoreModManager.java @@ -251,7 +251,7 @@ public class CoreModManager { coreModList = ObjectArrays.concat(coreModList, versionedCoreMods, File.class); } - ObjectArrays.concat(coreModList, ModListHelper.additionalMods.values().toArray(new File[0]), File.class); + coreModList = ObjectArrays.concat(coreModList, ModListHelper.additionalMods.values().toArray(new File[0]), File.class); coreModList = FileListHelper.sortFileList(coreModList); From 38cdbc16e25c7208d60f7647b30c42cce89a7c14 Mon Sep 17 00:00:00 2001 From: cpw Date: Thu, 2 Apr 2015 13:07:40 -0400 Subject: [PATCH 02/38] Fix json cache crash, handle the file much more cleanly. Probably an MC JIRA since it's a vanilla bug. Closes #619 --- .../management/PlayerProfileCache.java.patch | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 fml/patches/minecraft/net/minecraft/server/management/PlayerProfileCache.java.patch diff --git a/fml/patches/minecraft/net/minecraft/server/management/PlayerProfileCache.java.patch b/fml/patches/minecraft/net/minecraft/server/management/PlayerProfileCache.java.patch new file mode 100644 index 0000000000..c94a084283 --- /dev/null +++ b/fml/patches/minecraft/net/minecraft/server/management/PlayerProfileCache.java.patch @@ -0,0 +1,50 @@ +--- ../src-base/minecraft/net/minecraft/server/management/PlayerProfileCache.java ++++ ../src-work/minecraft/net/minecraft/server/management/PlayerProfileCache.java +@@ -224,26 +224,12 @@ + { + List list = null; + BufferedReader bufferedreader = null; +- label81: + { + try + { + bufferedreader = Files.newReader(this.field_152665_g, Charsets.UTF_8); + list = (List)this.field_152660_b.fromJson(bufferedreader, field_152666_h); +- break label81; +- } +- catch (FileNotFoundException filenotfoundexception) +- { +- ; +- } +- finally +- { +- IOUtils.closeQuietly(bufferedreader); +- } + +- return; +- } +- + if (list != null) + { + this.field_152661_c.clear(); +@@ -268,6 +254,20 @@ + } + } + } ++ } ++ catch (FileNotFoundException filenotfoundexception) ++ { ++ ; ++ } ++ catch (com.google.gson.JsonParseException parsefail) ++ { ++ // No op - the cache can quietly rebuild if it's junk ++ } ++ finally ++ { ++ IOUtils.closeQuietly(bufferedreader); ++ } ++ } + } + + public void func_152658_c() From f6c50cc3af764a64d3fa64789015b2c4a5e1f17b Mon Sep 17 00:00:00 2001 From: Lex Manos Date: Tue, 7 Apr 2015 19:32:25 -0700 Subject: [PATCH 03/38] Remove J7 only constructor in EnhancedRuntimeException, J6 compiling compatibility restored. --- .../java/cpw/mods/fml/common/EnhancedRuntimeException.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/EnhancedRuntimeException.java b/fml/src/main/java/cpw/mods/fml/common/EnhancedRuntimeException.java index d039e0e8bf..894b7f35a5 100644 --- a/fml/src/main/java/cpw/mods/fml/common/EnhancedRuntimeException.java +++ b/fml/src/main/java/cpw/mods/fml/common/EnhancedRuntimeException.java @@ -24,9 +24,6 @@ public abstract class EnhancedRuntimeException extends RuntimeException public EnhancedRuntimeException(String message) { super(message); } public EnhancedRuntimeException(String message, Throwable cause) { super(message, cause); } public EnhancedRuntimeException(Throwable cause) { super(cause); } - protected EnhancedRuntimeException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) { - super(message, cause, enableSuppression, writableStackTrace); - } @Override public String getMessage() From 4be96044d0682908f99c748a0aadcf61a27c91dd Mon Sep 17 00:00:00 2001 From: Lex Manos Date: Fri, 10 Apr 2015 03:28:41 -0700 Subject: [PATCH 04/38] Rework EventSubscriptionTransformer to bake @Cancelable and @HasResult values, should increase EventBus performance even more by removing logic from Event constructors. --- .../EventSubscriptionTransformer.java | 111 ++++++++++++------ .../mods/fml/common/eventhandler/Event.java | 45 ++----- 2 files changed, 81 insertions(+), 75 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java index 6d16b8c6f9..b60194cfb1 100644 --- a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java +++ b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java @@ -17,7 +17,10 @@ import static org.objectweb.asm.Opcodes.INVOKESPECIAL; import static org.objectweb.asm.Opcodes.NEW; import static org.objectweb.asm.Opcodes.PUTSTATIC; import static org.objectweb.asm.Opcodes.RETURN; +import static org.objectweb.asm.Opcodes.IRETURN; +import static org.objectweb.asm.Opcodes.ICONST_1; import static org.objectweb.asm.Type.VOID_TYPE; +import static org.objectweb.asm.Type.BOOLEAN_TYPE; import static org.objectweb.asm.Type.getMethodDescriptor; import java.util.List; @@ -27,6 +30,7 @@ import net.minecraft.launchwrapper.IClassTransformer; import org.objectweb.asm.ClassReader; import org.objectweb.asm.ClassWriter; import org.objectweb.asm.Type; +import org.objectweb.asm.tree.AnnotationNode; import org.objectweb.asm.tree.ClassNode; import org.objectweb.asm.tree.FieldInsnNode; import org.objectweb.asm.tree.FieldNode; @@ -82,56 +86,87 @@ public class EventSubscriptionTransformer implements IClassTransformer private boolean buildEvents(ClassNode classNode) throws Exception { + // Yes, this recursively loads classes until we get this base class. THIS IS NOT A ISSUE. Coremods should handle re-entry just fine. + // If they do not this a COREMOD issue NOT a Forge/LaunchWrapper issue. Class parent = this.getClass().getClassLoader().loadClass(classNode.superName.replace('/', '.')); if (!Event.class.isAssignableFrom(parent)) { return false; } - boolean hasSetup = false; - boolean hasGetListenerList = false; - boolean hasDefaultCtr = false; + //Class listenerListClazz = Class.forName("cpw.mods.fml.common.eventhandler.ListenerList", false, getClass().getClassLoader()); + Type tList = Type.getType("Lcpw/mods/fml/common/eventhandler/ListenerList;"); - Class listenerListClazz = Class.forName("cpw.mods.fml.common.eventhandler.ListenerList", false, getClass().getClassLoader()); - Type tList = Type.getType(listenerListClazz); + boolean edited = false; + boolean hasSetup = false; + boolean hasGetListenerList = false; + boolean hasDefaultCtr = false; + boolean hasCancelable = false; + boolean hasResult = false; + String voidDesc = Type.getMethodDescriptor(VOID_TYPE); + String boolDesc = Type.getMethodDescriptor(BOOLEAN_TYPE); + String listDesc = tList.getDescriptor(); + String listDescM = Type.getMethodDescriptor(tList); for (MethodNode method : (List)classNode.methods) { - if (method.name.equals("setup") && - method.desc.equals(Type.getMethodDescriptor(VOID_TYPE)) && - (method.access & ACC_PROTECTED) == ACC_PROTECTED) + if (method.name.equals("setup") && method.desc.equals(voidDesc) && (method.access & ACC_PROTECTED) == ACC_PROTECTED) hasSetup = true; + if ((method.access & ACC_PUBLIC) == ACC_PUBLIC) + { + if (method.name.equals("getListenerList") && method.desc.equals(listDescM)) hasGetListenerList = true; + if (method.name.equals("isCancelable") && method.desc.equals(boolDesc)) hasCancelable = true; + if (method.name.equals("hasResult") && method.desc.equals(boolDesc)) hasResult = true; + } + if (method.name.equals("") && method.desc.equals(voidDesc)) hasDefaultCtr = true; + } + + if (classNode.visibleAnnotations != null) + { + for (AnnotationNode node : classNode.visibleAnnotations) + { + if (!hasResult && node.desc.equals("Lcpw/mods/fml/common/eventhandler/Event$HasResult;")) { - hasSetup = true; + /* Add: + * public boolean hasResult() + * { + * return true; + * } + */ + MethodNode method = new MethodNode(ACC_PUBLIC, "hasResult", boolDesc, null, null); + method.instructions.add(new InsnNode(ICONST_1)); + method.instructions.add(new InsnNode(IRETURN)); + classNode.methods.add(method); + edited = true; } - if (method.name.equals("getListenerList") && - method.desc.equals(Type.getMethodDescriptor(tList)) && - (method.access & ACC_PUBLIC) == ACC_PUBLIC) + else if (!hasCancelable && node.desc.equals("Lcpw/mods/fml/common/eventhandler/Cancelable;")) { - hasGetListenerList = true; - } - if (method.name.equals("") && - method.desc.equals(Type.getMethodDescriptor(VOID_TYPE))) - { - hasDefaultCtr = true; + /* Add: + * public boolean isCancelable() + * { + * return true; + * } + */ + MethodNode method = new MethodNode(ACC_PUBLIC, "isCancelable", boolDesc, null, null); + method.instructions.add(new InsnNode(ICONST_1)); + method.instructions.add(new InsnNode(IRETURN)); + classNode.methods.add(method); + edited = true; } + } } if (hasSetup) { - if (!hasGetListenerList) - { - throw new RuntimeException("Event class defines setup() but does not define getListenerList! " + classNode.name); - } - else - { - return false; - } + if (!hasGetListenerList) + throw new RuntimeException("Event class defines setup() but does not define getListenerList! " + classNode.name); + else + return edited; } Type tSuper = Type.getType(classNode.superName); //Add private static ListenerList LISTENER_LIST - classNode.fields.add(new FieldNode(ACC_PRIVATE | ACC_STATIC, "LISTENER_LIST", tList.getDescriptor(), null, null)); + classNode.fields.add(new FieldNode(ACC_PRIVATE | ACC_STATIC, "LISTENER_LIST", listDesc, null, null)); /*Add: * public () @@ -139,12 +174,12 @@ public class EventSubscriptionTransformer implements IClassTransformer * super(); * } */ - MethodNode method = new MethodNode(ASM5, ACC_PUBLIC, "", getMethodDescriptor(VOID_TYPE), null, null); - method.instructions.add(new VarInsnNode(ALOAD, 0)); - method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "", getMethodDescriptor(VOID_TYPE), false)); - method.instructions.add(new InsnNode(RETURN)); if (!hasDefaultCtr) { + MethodNode method = new MethodNode(ACC_PUBLIC, "", voidDesc, null, null); + method.instructions.add(new VarInsnNode(ALOAD, 0)); + method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "", voidDesc, false)); + method.instructions.add(new InsnNode(RETURN)); classNode.methods.add(method); } @@ -159,10 +194,10 @@ public class EventSubscriptionTransformer implements IClassTransformer * LISTENER_LIST = new ListenerList(super.getListenerList()); * } */ - method = new MethodNode(ASM5, ACC_PROTECTED, "setup", getMethodDescriptor(VOID_TYPE), null, null); + MethodNode method = new MethodNode(ACC_PROTECTED, "setup", voidDesc, null, null); method.instructions.add(new VarInsnNode(ALOAD, 0)); - method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "setup", getMethodDescriptor(VOID_TYPE), false)); - method.instructions.add(new FieldInsnNode(GETSTATIC, classNode.name, "LISTENER_LIST", tList.getDescriptor())); + method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "setup", voidDesc, false)); + method.instructions.add(new FieldInsnNode(GETSTATIC, classNode.name, "LISTENER_LIST", listDesc)); LabelNode initLisitener = new LabelNode(); method.instructions.add(new JumpInsnNode(IFNULL, initLisitener)); method.instructions.add(new InsnNode(RETURN)); @@ -171,9 +206,9 @@ public class EventSubscriptionTransformer implements IClassTransformer method.instructions.add(new TypeInsnNode(NEW, tList.getInternalName())); method.instructions.add(new InsnNode(DUP)); method.instructions.add(new VarInsnNode(ALOAD, 0)); - method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "getListenerList", getMethodDescriptor(tList), false)); + method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tSuper.getInternalName(), "getListenerList", listDescM, false)); method.instructions.add(new MethodInsnNode(INVOKESPECIAL, tList.getInternalName(), "", getMethodDescriptor(VOID_TYPE, tList), false)); - method.instructions.add(new FieldInsnNode(PUTSTATIC, classNode.name, "LISTENER_LIST", tList.getDescriptor())); + method.instructions.add(new FieldInsnNode(PUTSTATIC, classNode.name, "LISTENER_LIST", listDesc)); method.instructions.add(new InsnNode(RETURN)); classNode.methods.add(method); @@ -183,8 +218,8 @@ public class EventSubscriptionTransformer implements IClassTransformer * return this.LISTENER_LIST; * } */ - method = new MethodNode(ASM5, ACC_PUBLIC, "getListenerList", getMethodDescriptor(tList), null, null); - method.instructions.add(new FieldInsnNode(GETSTATIC, classNode.name, "LISTENER_LIST", tList.getDescriptor())); + method = new MethodNode(ACC_PUBLIC, "getListenerList", listDescM, null, null); + method.instructions.add(new FieldInsnNode(GETSTATIC, classNode.name, "LISTENER_LIST", listDesc)); method.instructions.add(new InsnNode(ARETURN)); classNode.methods.add(method); return true; diff --git a/fml/src/main/java/cpw/mods/fml/common/eventhandler/Event.java b/fml/src/main/java/cpw/mods/fml/common/eventhandler/Event.java index 80ac792406..814e742b91 100644 --- a/fml/src/main/java/cpw/mods/fml/common/eventhandler/Event.java +++ b/fml/src/main/java/cpw/mods/fml/common/eventhandler/Event.java @@ -32,9 +32,7 @@ public class Event } private boolean isCanceled = false; - private final boolean isCancelable; private Result result = Result.DEFAULT; - private final boolean hasResult; private static ListenerList listeners = new ListenerList(); private EventPriority phase = null; @@ -43,48 +41,18 @@ public class Event public Event() { setup(); - isCancelable = hasAnnotation(Cancelable.class); - hasResult = hasAnnotation(HasResult.class); - } - - private boolean hasAnnotation(Class annotation) - { - Class me = this.getClass(); - Map, Boolean> list = annotationMap.get(me); - if (list == null) - { - list = new ConcurrentHashMap, Boolean>(); - annotationMap.put(me, list); - } - - Boolean cached = list.get(annotation); - if (cached != null) - { - return cached; - } - - Class cls = me; - while (cls != Event.class) - { - if (cls.isAnnotationPresent(annotation)) - { - list.put(annotation, true); - return true; - } - cls = cls.getSuperclass(); - } - - list.put(annotation, false); - return false; } /** * Determine if this function is cancelable at all. * @return If access to setCanceled should be allowed + * + * Note: + * Events with the Cancelable annotation will have this method automatically added to return true. */ public boolean isCancelable() { - return isCancelable; + return false; } /** @@ -115,10 +83,13 @@ public class Event /** * Determines if this event expects a significant result value. + * + * Note: + * Events with the HasResult annotation will have this method automatically added to return true. */ public boolean hasResult() { - return hasResult; + return false; } /** From 994f72284361a73809c4b6c6d2ad08df88901561 Mon Sep 17 00:00:00 2001 From: cpw Date: Fri, 10 Apr 2015 22:34:06 -0400 Subject: [PATCH 05/38] Clean up some dead code --- .../asm/transformers/EventSubscriptionTransformer.java | 1 - .../main/java/cpw/mods/fml/common/eventhandler/Event.java | 5 ----- 2 files changed, 6 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java index b60194cfb1..fd77ebcbcb 100644 --- a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java +++ b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/EventSubscriptionTransformer.java @@ -8,7 +8,6 @@ import static org.objectweb.asm.Opcodes.ACC_PUBLIC; import static org.objectweb.asm.Opcodes.ACC_STATIC; import static org.objectweb.asm.Opcodes.ALOAD; import static org.objectweb.asm.Opcodes.ARETURN; -import static org.objectweb.asm.Opcodes.ASM5; import static org.objectweb.asm.Opcodes.DUP; import static org.objectweb.asm.Opcodes.F_SAME; import static org.objectweb.asm.Opcodes.GETSTATIC; diff --git a/fml/src/main/java/cpw/mods/fml/common/eventhandler/Event.java b/fml/src/main/java/cpw/mods/fml/common/eventhandler/Event.java index 814e742b91..c88b3ef28a 100644 --- a/fml/src/main/java/cpw/mods/fml/common/eventhandler/Event.java +++ b/fml/src/main/java/cpw/mods/fml/common/eventhandler/Event.java @@ -3,11 +3,8 @@ package cpw.mods.fml.common.eventhandler; import static java.lang.annotation.ElementType.TYPE; import static java.lang.annotation.RetentionPolicy.RUNTIME; -import java.lang.annotation.Annotation; import java.lang.annotation.Retention; import java.lang.annotation.Target; -import java.util.Map; -import java.util.concurrent.ConcurrentHashMap; import javax.annotation.Nonnull; import javax.annotation.Nullable; @@ -36,8 +33,6 @@ public class Event private static ListenerList listeners = new ListenerList(); private EventPriority phase = null; - private static final Map, Map, Boolean>> annotationMap = new ConcurrentHashMap, Map, Boolean>>(); - public Event() { setup(); From c7622c06d76a54db0a708f101bfe28646dcfad1b Mon Sep 17 00:00:00 2001 From: cpw Date: Sat, 11 Apr 2015 00:31:09 -0400 Subject: [PATCH 06/38] Cleaning up the missing resource stack spam, and condensing the information into a usefully understandable format. --- .../renderer/texture/TextureMap.java.patch | 12 ++++ .../cpw/mods/fml/client/FMLClientHandler.java | 68 +++++++++++++++++++ .../mods/fml/client/FMLFileResourcePack.java | 11 ++- .../fml/client/FMLFolderResourcePack.java | 11 ++- .../mods/fml/common/FMLContainerHolder.java | 6 ++ 5 files changed, 106 insertions(+), 2 deletions(-) create mode 100644 fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch create mode 100644 fml/src/main/java/cpw/mods/fml/common/FMLContainerHolder.java diff --git a/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch b/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch new file mode 100644 index 0000000000..d87d49049d --- /dev/null +++ b/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch @@ -0,0 +1,12 @@ +--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureMap.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureMap.java +@@ -161,7 +161,8 @@ + } + catch (IOException ioexception1) + { +- field_147635_d.error("Using missing texture, unable to load " + resourcelocation1, ioexception1); ++// logger.error("Using missing texture, unable to load " + resourcelocation1, ioexception1); ++ cpw.mods.fml.client.FMLClientHandler.instance().trackMissingTexture(resourcelocation1); + continue; + } + diff --git a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java index cab9210ca8..6a95b73199 100644 --- a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java @@ -41,8 +41,11 @@ import net.minecraft.client.network.NetHandlerPlayClient; import net.minecraft.client.network.OldServerPinger; import net.minecraft.client.renderer.entity.Render; import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.client.resources.AbstractResourcePack; +import net.minecraft.client.resources.FallbackResourceManager; import net.minecraft.client.resources.IReloadableResourceManager; import net.minecraft.client.resources.IResourcePack; +import net.minecraft.client.resources.SimpleReloadableResourceManager; import net.minecraft.crash.CrashReport; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; @@ -59,14 +62,18 @@ import net.minecraft.world.WorldSettings; import net.minecraft.world.storage.SaveFormatOld; import org.apache.logging.log4j.Level; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import org.lwjgl.input.Mouse; import com.google.common.base.Strings; import com.google.common.base.Throwables; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; +import com.google.common.collect.HashMultimap; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import com.google.common.collect.SetMultimap; import com.google.common.collect.ImmutableMap.Builder; import com.google.common.collect.Maps; import com.google.gson.JsonArray; @@ -77,6 +84,7 @@ import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.DummyModContainer; import cpw.mods.fml.common.DuplicateModsFoundException; import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.FMLContainerHolder; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.IFMLSidedHandler; import cpw.mods.fml.common.Loader; @@ -378,6 +386,7 @@ public class FMLClientHandler implements IFMLSidedHandler else { } + logMissingTextureErrors(); } /** * Get the server instance @@ -875,4 +884,63 @@ public class FMLClientHandler implements IFMLSidedHandler public void allowLogins() { // NOOP for integrated server } + + + private static SetMultimap missingTextures = HashMultimap.create(); + public void trackMissingTexture(ResourceLocation resourceLocation) + { + missingTextures.put(resourceLocation.getResourceDomain(),resourceLocation); + } + + public void logMissingTextureErrors() + { + Logger logger = LogManager.getLogger("TEXTURE ERRORS"); + logger.error(Strings.repeat("+=", 25)); + logger.error("The following missing textures were found."); + Map resManagers = ObfuscationReflectionHelper.getPrivateValue(SimpleReloadableResourceManager.class, (SimpleReloadableResourceManager)Minecraft.getMinecraft().getResourceManager(), "domainResourceManagers", "field_110548"+"_a"); + for (String resourceDomain : missingTextures.keySet()) + { + Set missing = missingTextures.get(resourceDomain); + logger.error(" DOMAIN {}", resourceDomain); + logger.error(" domain {} is missing {} texture{}",resourceDomain, missing.size(),missing.size()!=1 ? "s" : ""); + logger.error(Strings.repeat("=", 50)); + FallbackResourceManager fallbackResourceManager = resManagers.get(resourceDomain); + if (fallbackResourceManager == null) + { + logger.error(" domain {} is missing a resource manager, how very odd"); + } + else + { + List resPacks = ObfuscationReflectionHelper.getPrivateValue(FallbackResourceManager.class, fallbackResourceManager, "resourcePacks","field_110540"+"_a"); + logger.error(" domain {} has {} location{}:",resourceDomain, resPacks.size(), resPacks.size() != 1 ? "s" :""); + for (IResourcePack resPack : resPacks) + { + if (resPack instanceof FMLContainerHolder) { + FMLContainerHolder containerHolder = (FMLContainerHolder) resPack; + ModContainer fmlContainer = containerHolder.getFMLContainer(); + logger.error(" mod {} resources at {}", fmlContainer.getModId(), fmlContainer.getSource().getPath()); + } + else if (resPack instanceof AbstractResourcePack) + { + AbstractResourcePack resourcePack = (AbstractResourcePack) resPack; + File resPath = ObfuscationReflectionHelper.getPrivateValue(AbstractResourcePack.class, resourcePack, "resourcePackFile","field_110597"+"_b"); + logger.error(" resource pack at path {}",resPath.getPath()); + } + else + { + logger.error(" unknown resourcepack type {} : {}", resPack.getClass().getName(), resPack.getPackName()); + } + } + } + logger.error(Strings.repeat("-", 25)); + logger.error(" The missing resources for domain {} are:",resourceDomain); + for (ResourceLocation rl : missing) + { + logger.error(" {}",rl.getResourcePath()); + } + logger.error(Strings.repeat("-", 50)); + } + logger.error(Strings.repeat("+=", 25)); + } + } diff --git a/fml/src/main/java/cpw/mods/fml/client/FMLFileResourcePack.java b/fml/src/main/java/cpw/mods/fml/client/FMLFileResourcePack.java index 50ad1b144e..89fb40dad2 100644 --- a/fml/src/main/java/cpw/mods/fml/client/FMLFileResourcePack.java +++ b/fml/src/main/java/cpw/mods/fml/client/FMLFileResourcePack.java @@ -4,6 +4,7 @@ import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; + import org.apache.logging.log4j.Level; import javax.imageio.ImageIO; @@ -12,10 +13,12 @@ import net.minecraft.client.resources.FileResourcePack; import com.google.common.base.Charsets; +import cpw.mods.fml.common.FMLContainerHolder; import cpw.mods.fml.common.FMLLog; +import cpw.mods.fml.common.FMLModContainer; import cpw.mods.fml.common.ModContainer; -public class FMLFileResourcePack extends FileResourcePack { +public class FMLFileResourcePack extends FileResourcePack implements FMLContainerHolder { private ModContainer container; @@ -58,4 +61,10 @@ public class FMLFileResourcePack extends FileResourcePack { { return ImageIO.read(getInputStreamByName(container.getMetadata().logoFile)); } + + @Override + public ModContainer getFMLContainer() + { + return container; + } } diff --git a/fml/src/main/java/cpw/mods/fml/client/FMLFolderResourcePack.java b/fml/src/main/java/cpw/mods/fml/client/FMLFolderResourcePack.java index cdb7fcac75..9edd66237f 100644 --- a/fml/src/main/java/cpw/mods/fml/client/FMLFolderResourcePack.java +++ b/fml/src/main/java/cpw/mods/fml/client/FMLFolderResourcePack.java @@ -4,6 +4,7 @@ import java.awt.image.BufferedImage; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; + import org.apache.logging.log4j.Level; import javax.imageio.ImageIO; @@ -12,10 +13,12 @@ import net.minecraft.client.resources.FolderResourcePack; import com.google.common.base.Charsets; +import cpw.mods.fml.common.FMLContainerHolder; import cpw.mods.fml.common.FMLLog; +import cpw.mods.fml.common.FMLModContainer; import cpw.mods.fml.common.ModContainer; -public class FMLFolderResourcePack extends FolderResourcePack { +public class FMLFolderResourcePack extends FolderResourcePack implements FMLContainerHolder { private ModContainer container; @@ -64,4 +67,10 @@ public class FMLFolderResourcePack extends FolderResourcePack { return ImageIO.read(getInputStreamByName(container.getMetadata().logoFile)); } + @Override + public ModContainer getFMLContainer() + { + return container; + } + } diff --git a/fml/src/main/java/cpw/mods/fml/common/FMLContainerHolder.java b/fml/src/main/java/cpw/mods/fml/common/FMLContainerHolder.java new file mode 100644 index 0000000000..f4f4241550 --- /dev/null +++ b/fml/src/main/java/cpw/mods/fml/common/FMLContainerHolder.java @@ -0,0 +1,6 @@ +package cpw.mods.fml.common; + +public interface FMLContainerHolder +{ + ModContainer getFMLContainer(); +} From fa5ab52acdefa2d74fdf4ce42ee6b3010d16de0d Mon Sep 17 00:00:00 2001 From: cpw Date: Sat, 11 Apr 2015 12:12:37 -0400 Subject: [PATCH 07/38] Enhance error output for bad textures a bit more and try and capture more types of error.. --- .../renderer/texture/TextureMap.java.patch | 11 +++- .../cpw/mods/fml/client/FMLClientHandler.java | 50 ++++++++++++++++--- 2 files changed, 53 insertions(+), 8 deletions(-) diff --git a/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch b/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch index d87d49049d..32b152ee1d 100644 --- a/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch +++ b/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch @@ -1,11 +1,18 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureMap.java +++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureMap.java -@@ -161,7 +161,8 @@ +@@ -156,12 +156,14 @@ + } + catch (RuntimeException runtimeexception) + { +- field_147635_d.error("Unable to parse metadata from " + resourcelocation1, runtimeexception); ++ //logger.error("Unable to parse metadata from " + resourcelocation1, runtimeexception); ++ cpw.mods.fml.client.FMLClientHandler.instance().trackBrokenTexture(resourcelocation1, runtimeexception.getMessage()); + continue; } catch (IOException ioexception1) { - field_147635_d.error("Using missing texture, unable to load " + resourcelocation1, ioexception1); -+// logger.error("Using missing texture, unable to load " + resourcelocation1, ioexception1); ++ //logger.error("Using missing texture, unable to load " + resourcelocation1, ioexception1); + cpw.mods.fml.client.FMLClientHandler.instance().trackMissingTexture(resourcelocation1); continue; } diff --git a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java index 6a95b73199..13d887a8a1 100644 --- a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java @@ -69,13 +69,16 @@ import org.lwjgl.input.Mouse; import com.google.common.base.Strings; import com.google.common.base.Throwables; import com.google.common.collect.BiMap; +import com.google.common.collect.HashBasedTable; import com.google.common.collect.HashBiMap; import com.google.common.collect.HashMultimap; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.SetMultimap; +import com.google.common.collect.Sets; import com.google.common.collect.ImmutableMap.Builder; import com.google.common.collect.Maps; +import com.google.common.collect.Table; import com.google.gson.JsonArray; import com.google.gson.JsonElement; import com.google.gson.JsonObject; @@ -886,28 +889,44 @@ public class FMLClientHandler implements IFMLSidedHandler } - private static SetMultimap missingTextures = HashMultimap.create(); + private SetMultimap missingTextures = HashMultimap.create(); + private Set badTextureDomains = Sets.newHashSet(); + private Table> brokenTextures = HashBasedTable.create(); + public void trackMissingTexture(ResourceLocation resourceLocation) { + badTextureDomains.add(resourceLocation.getResourceDomain()); missingTextures.put(resourceLocation.getResourceDomain(),resourceLocation); } + public void trackBrokenTexture(ResourceLocation resourceLocation, String error) + { + badTextureDomains.add(resourceLocation.getResourceDomain()); + Set badType = brokenTextures.get(resourceLocation.getResourceDomain(), error); + if (badType == null) + { + badType = Sets.newHashSet(); + brokenTextures.put(resourceLocation.getResourceDomain(), error, badType); + } + badType.add(resourceLocation); + } public void logMissingTextureErrors() { Logger logger = LogManager.getLogger("TEXTURE ERRORS"); logger.error(Strings.repeat("+=", 25)); - logger.error("The following missing textures were found."); + logger.error("The following texture errors were found."); Map resManagers = ObfuscationReflectionHelper.getPrivateValue(SimpleReloadableResourceManager.class, (SimpleReloadableResourceManager)Minecraft.getMinecraft().getResourceManager(), "domainResourceManagers", "field_110548"+"_a"); for (String resourceDomain : missingTextures.keySet()) { Set missing = missingTextures.get(resourceDomain); - logger.error(" DOMAIN {}", resourceDomain); - logger.error(" domain {} is missing {} texture{}",resourceDomain, missing.size(),missing.size()!=1 ? "s" : ""); logger.error(Strings.repeat("=", 50)); + logger.error(" DOMAIN {}", resourceDomain); + logger.error(Strings.repeat("-", 50)); + logger.error(" domain {} is missing {} texture{}",resourceDomain, missing.size(),missing.size()!=1 ? "s" : ""); FallbackResourceManager fallbackResourceManager = resManagers.get(resourceDomain); if (fallbackResourceManager == null) { - logger.error(" domain {} is missing a resource manager, how very odd"); + logger.error(" domain {} is missing a resource manager - it is probably a side-effect of automatic texture processing", resourceDomain); } else { @@ -938,7 +957,26 @@ public class FMLClientHandler implements IFMLSidedHandler { logger.error(" {}",rl.getResourcePath()); } - logger.error(Strings.repeat("-", 50)); + logger.error(Strings.repeat("-", 25)); + if (!brokenTextures.containsRow(resourceDomain)) + { + logger.error(" No other errors exist for domain {}", resourceDomain); + } + else + { + logger.error(" The following other errors were reported for domain {}:",resourceDomain); + Map> resourceErrs = brokenTextures.row(resourceDomain); + for (String error: resourceErrs.keySet()) + { + logger.error(Strings.repeat("-", 25)); + logger.error(" Problem: {}", error); + for (ResourceLocation rl : resourceErrs.get(error)) + { + logger.error(" {}",rl.getResourcePath()); + } + } + } + logger.error(Strings.repeat("=", 50)); } logger.error(Strings.repeat("+=", 25)); } From 0055973f434dbd75b74ab5d23def89283ff65805 Mon Sep 17 00:00:00 2001 From: Arkan Emberwalker Date: Sat, 11 Apr 2015 17:36:16 +0100 Subject: [PATCH 08/38] Allow registering custom language adapters. Allows external mods/library jars to provide language adapters for languages not supported in native Forge. --- .../cpw/mods/fml/common/FMLModContainer.java | 21 +++++++++++++++++-- .../main/java/cpw/mods/fml/common/Mod.java | 12 +++++++++++ 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java b/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java index 307deeae28..a839d0a525 100644 --- a/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java +++ b/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java @@ -90,9 +90,26 @@ public class FMLModContainer implements ModContainer this.source = container.getModContainer(); this.candidate = container; this.descriptor = modDescriptor; - this.modLanguage = (String) modDescriptor.get("modLanguage"); - this.languageAdapter = "scala".equals(modLanguage) ? new ILanguageAdapter.ScalaAdapter() : new ILanguageAdapter.JavaAdapter(); this.eventMethods = ArrayListMultimap.create(); + + this.modLanguage = (String) modDescriptor.get("modLanguage"); + if (modDescriptor.get("modLanguageAdapter").equals("")) + { + this.languageAdapter = "scala".equals(modLanguage) ? new ILanguageAdapter.ScalaAdapter() : new ILanguageAdapter.JavaAdapter(); + } + else + { + try + { + this.languageAdapter = (ILanguageAdapter)Class.forName((String)modDescriptor.get("modLanguageAdapter"), true, Loader.instance().getModClassLoader()).newInstance(); + FMLLog.finer("Using custom language adapter %s (for %s)", this.languageAdapter, this.className); + } + catch (Exception ex) + { + FMLLog.severe("Error constructing custom mod language adapter %s (referenced by %s): %s", modDescriptor.get("modLanguageAdapter"), this.className, ex); + FMLCommonHandler.instance().exitJava(1, true); + } + } } private ILanguageAdapter getLanguageAdapter() diff --git a/fml/src/main/java/cpw/mods/fml/common/Mod.java b/fml/src/main/java/cpw/mods/fml/common/Mod.java index 1e25d03d92..3cc2643e09 100644 --- a/fml/src/main/java/cpw/mods/fml/common/Mod.java +++ b/fml/src/main/java/cpw/mods/fml/common/Mod.java @@ -144,6 +144,18 @@ public @interface Mod * @return The language the mod is authored in */ String modLanguage() default "java"; + + /** + * The language adapter to be used to load this mod. This overrides the value of modLanguage. The class must have a + * public zero variable constructor and implement {@link ILanguageAdapter} just like the Java and Scala adapters. + * + * A class with an invalid constructor or that doesn't implement {@link ILanguageAdapter} will throw an exception and + * halt loading. + * + * @return The full class name of the language adapter + */ + String modLanguageAdapter() default ""; + /** * NOT YET IMPLEMENTED.
* An optional ASM hook class, that can be used to apply ASM to classes loaded from this mod. It is also given From 4af2ba39492d5efc721f281bae9e1c2a60c038ef Mon Sep 17 00:00:00 2001 From: cpw Date: Sat, 11 Apr 2015 18:02:00 -0400 Subject: [PATCH 09/38] Some tidyup of the PR --- .../java/cpw/mods/fml/common/FMLModContainer.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java b/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java index a839d0a525..9e89a271eb 100644 --- a/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java +++ b/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java @@ -91,9 +91,10 @@ public class FMLModContainer implements ModContainer this.candidate = container; this.descriptor = modDescriptor; this.eventMethods = ArrayListMultimap.create(); - + this.modLanguage = (String) modDescriptor.get("modLanguage"); - if (modDescriptor.get("modLanguageAdapter").equals("")) + String languageAdapterType = (String)modDescriptor.get("modLanguageAdapter"); + if (Strings.isNullOrEmpty(languageAdapterType)) { this.languageAdapter = "scala".equals(modLanguage) ? new ILanguageAdapter.ScalaAdapter() : new ILanguageAdapter.JavaAdapter(); } @@ -101,13 +102,13 @@ public class FMLModContainer implements ModContainer { try { - this.languageAdapter = (ILanguageAdapter)Class.forName((String)modDescriptor.get("modLanguageAdapter"), true, Loader.instance().getModClassLoader()).newInstance(); - FMLLog.finer("Using custom language adapter %s (for %s)", this.languageAdapter, this.className); + this.languageAdapter = (ILanguageAdapter)Class.forName(languageAdapterType, true, Loader.instance().getModClassLoader()).newInstance(); + FMLLog.finer("Using custom language adapter %s (type %s) for %s (modid %s)", this.languageAdapter, languageAdapterType, this.className, getModId()); } catch (Exception ex) { - FMLLog.severe("Error constructing custom mod language adapter %s (referenced by %s): %s", modDescriptor.get("modLanguageAdapter"), this.className, ex); - FMLCommonHandler.instance().exitJava(1, true); + FMLLog.log(Level.ERROR, ex, "Error constructing custom mod language adapter %s (referenced by %s) (modid: %s)", languageAdapterType, this.className, getModId()); + throw new LoaderException(ex); } } } From 592c9c8e4237a6348bfb2951c61fb821b3cce1f0 Mon Sep 17 00:00:00 2001 From: tterrag1098 Date: Mon, 6 Apr 2015 19:17:58 -0400 Subject: [PATCH 10/38] Fix itemCtorArgs javadoc in registerBlock --- .../main/java/cpw/mods/fml/common/registry/GameRegistry.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/registry/GameRegistry.java b/fml/src/main/java/cpw/mods/fml/common/registry/GameRegistry.java index 093ef06f6c..62c45bf8a4 100644 --- a/fml/src/main/java/cpw/mods/fml/common/registry/GameRegistry.java +++ b/fml/src/main/java/cpw/mods/fml/common/registry/GameRegistry.java @@ -196,7 +196,7 @@ public class GameRegistry * @param block The block to register * @param itemclass The item type to register with it : null registers a block without associated item. * @param name The mod-unique name to register it as, will get prefixed by your modid. - * @param itemCtorArgs Arguments to pass to the ItemBlock constructor (optional). + * @param itemCtorArgs Arguments to pass (after the required {@code Block} parameter) to the ItemBlock constructor (optional). */ public static Block registerBlock(Block block, Class itemclass, String name, Object... itemCtorArgs) { From 5f7c3bd72dd99015976e5e3c3e2c2eb329aeee44 Mon Sep 17 00:00:00 2001 From: Arkan Emberwalker Date: Fri, 10 Apr 2015 14:17:27 +0100 Subject: [PATCH 11/38] Patch TracingPrintStream to handle Kotlin IO. Kotlins internal IO suite wraps the old System.out style, so descend deeper in the stack when kotlin.io is detected. --- .../main/java/cpw/mods/fml/common/TracingPrintStream.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/TracingPrintStream.java b/fml/src/main/java/cpw/mods/fml/common/TracingPrintStream.java index eb7a83d6f8..3a56e61a68 100644 --- a/fml/src/main/java/cpw/mods/fml/common/TracingPrintStream.java +++ b/fml/src/main/java/cpw/mods/fml/common/TracingPrintStream.java @@ -21,6 +21,7 @@ import org.apache.logging.log4j.Logger; public class TracingPrintStream extends PrintStream { private Logger logger; + private int BASE_DEPTH = 3; public TracingPrintStream(Logger logger, PrintStream original) { super(original); @@ -39,7 +40,10 @@ public class TracingPrintStream extends PrintStream { private String getPrefix() { StackTraceElement[] elems = Thread.currentThread().getStackTrace(); - StackTraceElement elem = elems[3]; // The caller is always at depth 2, plus this call. + StackTraceElement elem = elems[BASE_DEPTH]; // The caller is always at BASE_DEPTH, including this call. + if (elem.getClassName().startsWith("kotlin.io.")) { + elem = elems[BASE_DEPTH + 2]; // Kotlins IoPackage masks origins 2 deeper in the stack. + } return "[" + elem.getClassName() + ":" + elem.getMethodName() + ":" + elem.getLineNumber() + "]: "; } From e1ed3c07c2ffd2a25d2477cdfc3a83ed216be933 Mon Sep 17 00:00:00 2001 From: cpw Date: Sat, 18 Apr 2015 21:48:49 -0400 Subject: [PATCH 12/38] Exceptions during construction phase should not propogate and cause an immediate crash. Closes #638 --- fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java | 1 - 1 file changed, 1 deletion(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java b/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java index 9e89a271eb..d85fb473b6 100644 --- a/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java +++ b/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java @@ -513,7 +513,6 @@ public class FMLModContainer implements ModContainer catch (Throwable e) { controller.errorOccurred(this, e); - Throwables.propagateIfPossible(e); } } From b049b39760f099a1081abfeac8d48e91ea4ece57 Mon Sep 17 00:00:00 2001 From: cpw Date: Mon, 20 Apr 2015 16:14:27 -0400 Subject: [PATCH 13/38] Update to use the inherited jar format. Simplifies a lot.. --- fml/jsons/1.7.10-rel.json | 164 +++----------------------------------- 1 file changed, 10 insertions(+), 154 deletions(-) diff --git a/fml/jsons/1.7.10-rel.json b/fml/jsons/1.7.10-rel.json index b56a8f63c5..cfed477443 100644 --- a/fml/jsons/1.7.10-rel.json +++ b/fml/jsons/1.7.10-rel.json @@ -16,8 +16,11 @@ "releaseTime": "1960-01-01T00:00:00-0700", "type": "release", "minecraftArguments": "--username ${auth_player_name} --version ${version_name} --gameDir ${game_directory} --assetsDir ${assets_root} --assetIndex ${assets_index_name} --uuid ${auth_uuid} --accessToken ${auth_access_token} --userProperties ${user_properties} --userType ${user_type} --tweakClass cpw.mods.fml.common.launcher.FMLTweaker", - "minimumLauncherVersion": 13, - "assets": "1.7.10", + "mainClass": "net.minecraft.launchwrapper.Launch", + "minimumLauncherVersion": 14, + "assets": "@minecraft_version@", + "inheritsFrom": "@minecraft_version@", + "jar": "@minecraft_version@", "libraries": [ { "name": "@artifact@", @@ -108,165 +111,18 @@ "serverreq":true, "clientreq":true }, - { - "name": "net.sf.jopt-simple:jopt-simple:4.5", - "serverreq":true - }, { "name": "lzma:lzma:0.0.1", "serverreq":true }, { - "name": "com.mojang:realms:1.3.5" + "name": "net.sf.jopt-simple:jopt-simple:4.5", + "serverreq":true }, { - "name": "org.apache.commons:commons-compress:1.8.1" - }, - { - "name": "org.apache.httpcomponents:httpclient:4.3.3" - }, - { - "name": "commons-logging:commons-logging:1.1.3" - }, - { - "name": "org.apache.httpcomponents:httpcore:4.3.2" - }, - { - "name": "java3d:vecmath:1.3.1" - }, - { - "name": "net.sf.trove4j:trove4j:3.0.3" - }, - { - "name": "com.ibm.icu:icu4j-core-mojang:51.2" - }, - { - "name": "com.paulscode:codecjorbis:20101023" - }, - { - "name": "com.paulscode:codecwav:20101023" - }, - { - "name": "com.paulscode:libraryjavasound:20101123" - }, - { - "name": "com.paulscode:librarylwjglopenal:20100824" - }, - { - "name": "com.paulscode:soundsystem:20120107" - }, - { - "name": "io.netty:netty-all:4.0.10.Final" - }, - { - "name": "com.google.guava:guava:16.0" - }, - { - "name": "org.apache.commons:commons-lang3:3.2.1" - }, - { - "name": "commons-io:commons-io:2.4" - }, - { - "name": "commons-codec:commons-codec:1.9" - }, - { - "name": "net.java.jinput:jinput:2.0.5" - }, - { - "name": "net.java.jutils:jutils:1.0.0" - }, - { - "name": "com.google.code.gson:gson:2.2.4" - }, - { - "name": "com.mojang:authlib:1.5.16" - }, - { - "name": "org.apache.logging.log4j:log4j-api:2.0-beta9" - }, - { - "name": "org.apache.logging.log4j:log4j-core:2.0-beta9" - }, - { - "name": "org.lwjgl.lwjgl:lwjgl:2.9.1" - }, - { - "name": "org.lwjgl.lwjgl:lwjgl_util:2.9.1" - }, - { - "name": "org.lwjgl.lwjgl:lwjgl-platform:2.9.1", - "natives": { - "linux": "natives-linux", - "windows": "natives-windows", - "osx": "natives-osx" - }, - "extract": { - "exclude": [ - "META-INF/" - ] - } - }, - { - "name": "net.java.jinput:jinput-platform:2.0.5", - "natives": { - "linux": "natives-linux", - "windows": "natives-windows", - "osx": "natives-osx" - }, - "extract": { - "exclude": [ - "META-INF/" - ] - } - }, - { - "name": "tv.twitch:twitch:5.16" - }, - { - "name": "tv.twitch:twitch-platform:5.16", - "rules": [ - { - "action": "allow" - }, - { - "action": "disallow", - "os": { - "name": "linux" - } - } - ], - "natives": { - "linux": "natives-linux", - "windows": "natives-windows-${arch}", - "osx": "natives-osx" - }, - "extract": { - "exclude": [ - "META-INF/" - ] - } - }, - { - "name": "tv.twitch:twitch-external-platform:4.5", - "rules": [ - { - "action": "allow", - "os": { - "name": "windows" - } - } - ], - "natives": { - "windows": "natives-windows-${arch}" - }, - "extract": { - "exclude": [ - "META-INF/" - ] - } + "name": "com.google.guava:guava:17.0", + "serverreq":true } - ], - "mainClass": "net.minecraft.launchwrapper.Launch" + ] } } From 5b06b71d04250301e4a778f182014ec6df3466f6 Mon Sep 17 00:00:00 2001 From: RainWarrior Date: Tue, 21 Apr 2015 04:42:59 +0300 Subject: [PATCH 14/38] Splash screen implementation --- .../net/minecraft/client/Minecraft.java.patch | 17 +- .../client/gui/FontRenderer.java.patch | 124 +++++ .../cpw/mods/fml/client/FMLClientHandler.java | 14 + .../cpw/mods/fml/client/SplashProgress.java | 478 ++++++++++++++++++ .../cpw/mods/fml/common/FMLCommonHandler.java | 4 + .../cpw/mods/fml/common/IFMLSidedHandler.java | 2 + .../cpw/mods/fml/common/ProgressManager.java | 91 ++++ .../cpw/mods/fml/server/FMLServerHandler.java | 6 + .../resources/assets/fml/splash.properties | 7 + .../assets/fml/textures/gui/forge.png | Bin 0 -> 3547 bytes fml/src/main/resources/fml_at.cfg | 15 +- 11 files changed, 755 insertions(+), 3 deletions(-) create mode 100644 fml/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch create mode 100644 fml/src/main/java/cpw/mods/fml/client/SplashProgress.java create mode 100644 fml/src/main/java/cpw/mods/fml/common/ProgressManager.java create mode 100644 fml/src/main/resources/assets/fml/splash.properties create mode 100644 fml/src/main/resources/assets/fml/textures/gui/forge.png diff --git a/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 9ffa53c54a..93cc41dacd 100644 --- a/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -46,7 +46,7 @@ } public void func_71367_a(String p_71367_1_, int p_71367_2_) -@@ -471,7 +478,7 @@ +@@ -471,11 +478,11 @@ this.field_110451_am = new SimpleReloadableResourceManager(this.field_110452_an); this.field_135017_as = new LanguageManager(this.field_110452_an, this.field_71474_y.field_74363_ab); this.field_110451_am.func_110542_a(this.field_135017_as); @@ -55,7 +55,12 @@ this.field_71446_o = new TextureManager(this.field_110451_am); this.field_110451_am.func_110542_a(this.field_71446_o); this.field_152350_aA = new SkinManager(this.field_71446_o, new File(this.field_110446_Y, "skins"), this.field_152355_az); -@@ -532,12 +539,13 @@ +- this.func_71357_I(); ++ cpw.mods.fml.client.SplashProgress.drawVanillaScreen(); + this.field_147127_av = new SoundHandler(this.field_110451_am, this.field_71474_y); + this.field_110451_am.func_110542_a(this.field_147127_av); + this.field_147126_aw = new MusicTicker(this); +@@ -532,19 +539,20 @@ this.field_71446_o.func_130088_a(TextureMap.field_110576_c, new TextureMap(1, "textures/items")); GL11.glViewport(0, 0, this.field_71443_c, this.field_71440_d); this.field_71452_i = new EffectRenderer(this.field_71441_e, this.field_71446_o); @@ -70,6 +75,14 @@ } else { + this.func_147108_a(new GuiMainMenu()); + } + +- this.field_71446_o.func_147645_c(this.field_152354_ay); ++ cpw.mods.fml.client.SplashProgress.clearVanillaResources(field_71446_o, field_152354_ay); + this.field_152354_ay = null; + this.field_71461_s = new LoadingScreenRenderer(this); + @@ -553,6 +561,7 @@ this.func_71352_k(); } diff --git a/fml/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch b/fml/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch new file mode 100644 index 0000000000..4aa0d6f12d --- /dev/null +++ b/fml/patches/minecraft/net/minecraft/client/gui/FontRenderer.java.patch @@ -0,0 +1,124 @@ +--- ../src-base/minecraft/net/minecraft/client/gui/FontRenderer.java ++++ ../src-work/minecraft/net/minecraft/client/gui/FontRenderer.java +@@ -54,7 +54,7 @@ + this.field_111273_g = p_i1035_2_; + this.field_78298_i = p_i1035_3_; + this.field_78293_l = p_i1035_4_; +- p_i1035_3_.func_110577_a(this.field_111273_g); ++ bindTexture(this.field_111273_g); + + for (int i = 0; i < 32; ++i) + { +@@ -102,7 +102,7 @@ + + try + { +- bufferedimage = ImageIO.read(Minecraft.func_71410_x().func_110442_L().func_110536_a(this.field_111273_g).func_110527_b()); ++ bufferedimage = ImageIO.read(getResourceInputStream(this.field_111273_g)); + } + catch (IOException ioexception) + { +@@ -167,7 +167,7 @@ + { + try + { +- InputStream inputstream = Minecraft.func_71410_x().func_110442_L().func_110536_a(new ResourceLocation("font/glyph_sizes.bin")).func_110527_b(); ++ InputStream inputstream = getResourceInputStream(new ResourceLocation("font/glyph_sizes.bin")); + inputstream.read(this.field_78287_e); + } + catch (IOException ioexception) +@@ -186,7 +186,7 @@ + float f = (float)(p_78266_1_ % 16 * 8); + float f1 = (float)(p_78266_1_ / 16 * 8); + float f2 = p_78266_2_ ? 1.0F : 0.0F; +- this.field_78298_i.func_110577_a(this.field_111273_g); ++ bindTexture(this.field_111273_g); + float f3 = (float)this.field_78286_d[p_78266_1_] - 0.01F; + GL11.glBegin(GL11.GL_TRIANGLE_STRIP); + GL11.glTexCoord2f(f / 128.0F, f1 / 128.0F); +@@ -213,7 +213,7 @@ + + private void func_78257_a(int p_78257_1_) + { +- this.field_78298_i.func_110577_a(this.func_111271_a(p_78257_1_)); ++ bindTexture(this.func_111271_a(p_78257_1_)); + } + + protected float func_78277_a(char p_78277_1_, boolean p_78277_2_) +@@ -260,7 +260,7 @@ + + public int func_85187_a(String p_85187_1_, int p_85187_2_, int p_85187_3_, int p_85187_4_, boolean p_85187_5_) + { +- GL11.glEnable(GL11.GL_ALPHA_TEST); ++ enableAlpha(); + this.func_78265_b(); + int l; + +@@ -332,7 +332,7 @@ + + k = this.field_78285_g[j]; + this.field_78304_r = k; +- GL11.glColor4f((float)(k >> 16) / 255.0F, (float)(k >> 8 & 255) / 255.0F, (float)(k & 255) / 255.0F, this.field_78305_q); ++ setColor((float)(k >> 16) / 255.0F, (float)(k >> 8 & 255) / 255.0F, (float)(k & 255) / 255.0F, this.field_78305_q); + } + else if (j == 16) + { +@@ -361,7 +361,7 @@ + this.field_78299_w = false; + this.field_78300_v = false; + this.field_78301_u = false; +- GL11.glColor4f(this.field_78291_n, this.field_78292_o, this.field_78306_p, this.field_78305_q); ++ setColor(this.field_78291_n, this.field_78292_o, this.field_78306_p, this.field_78305_q); + } + + ++i; +@@ -420,6 +420,15 @@ + ++f; + } + ++ doDraw(f); ++ } ++ } ++ } ++ ++ protected void doDraw(float f) ++ { ++ { ++ { + Tessellator tessellator; + + if (this.field_78299_w) +@@ -492,7 +501,7 @@ + this.field_78292_o = (float)(p_78258_4_ >> 8 & 255) / 255.0F; + this.field_78306_p = (float)(p_78258_4_ & 255) / 255.0F; + this.field_78305_q = (float)(p_78258_4_ >> 24 & 255) / 255.0F; +- GL11.glColor4f(this.field_78291_n, this.field_78292_o, this.field_78306_p, this.field_78305_q); ++ setColor(this.field_78291_n, this.field_78292_o, this.field_78306_p, this.field_78305_q); + this.field_78295_j = (float)p_78258_2_; + this.field_78296_k = (float)p_78258_3_; + this.func_78255_a(p_78258_1_, p_78258_5_); +@@ -829,4 +838,24 @@ + { + return this.field_78294_m; + } ++ ++ protected void setColor(float r, float g, float b, float a) ++ { ++ GL11.glColor4f(r, g, b, a); ++ } ++ ++ protected void enableAlpha() ++ { ++ GL11.glEnable(GL11.GL_ALPHA_TEST); ++ } ++ ++ protected void bindTexture(ResourceLocation location) ++ { ++ field_78298_i.func_110577_a(location); ++ } ++ ++ protected InputStream getResourceInputStream(ResourceLocation location) throws IOException ++ { ++ return Minecraft.func_71410_x().func_110442_L().func_110536_a(location).func_110527_b(); ++ } + } diff --git a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java index 13d887a8a1..f849332f7c 100644 --- a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java @@ -64,7 +64,9 @@ import net.minecraft.world.storage.SaveFormatOld; import org.apache.logging.log4j.Level; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; +import org.lwjgl.LWJGLUtil; import org.lwjgl.input.Mouse; +import org.lwjgl.opengl.Display; import com.google.common.base.Strings; import com.google.common.base.Throwables; @@ -185,6 +187,7 @@ public class FMLClientHandler implements IFMLSidedHandler @SuppressWarnings("unchecked") public void beginMinecraftLoading(Minecraft minecraft, @SuppressWarnings("rawtypes") List resourcePackList, IReloadableResourceManager resourceManager) { + SplashProgress.start(); client = minecraft; this.resourcePackList = resourcePackList; this.resourceManager = resourceManager; @@ -335,6 +338,7 @@ public class FMLClientHandler implements IFMLSidedHandler } loading = false; client.gameSettings.loadOptions(); //Reload options to load any mod added keybindings. + SplashProgress.finish(); } @SuppressWarnings("unused") @@ -898,6 +902,7 @@ public class FMLClientHandler implements IFMLSidedHandler badTextureDomains.add(resourceLocation.getResourceDomain()); missingTextures.put(resourceLocation.getResourceDomain(),resourceLocation); } + public void trackBrokenTexture(ResourceLocation resourceLocation, String error) { badTextureDomains.add(resourceLocation.getResourceDomain()); @@ -981,4 +986,13 @@ public class FMLClientHandler implements IFMLSidedHandler logger.error(Strings.repeat("+=", 25)); } + @Override + public void processWindowMessages() + { + // workaround for windows requiring messages being processed on the main thread + if(LWJGLUtil.getPlatform() == LWJGLUtil.PLATFORM_WINDOWS) + { + Display.processMessages(); + } + } } diff --git a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java new file mode 100644 index 0000000000..5966c807f2 --- /dev/null +++ b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java @@ -0,0 +1,478 @@ +package cpw.mods.fml.client; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Iterator; +import java.util.Properties; +import java.util.concurrent.locks.Lock; +import java.util.concurrent.locks.ReentrantLock; + +import javax.imageio.ImageIO; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.client.renderer.texture.TextureUtil; +import net.minecraft.client.resources.FileResourcePack; +import net.minecraft.client.resources.FolderResourcePack; +import net.minecraft.client.resources.IResourcePack; +import net.minecraft.crash.CrashReport; +import net.minecraft.util.ResourceLocation; + +import org.apache.commons.io.IOUtils; +import org.lwjgl.LWJGLException; +import org.lwjgl.opengl.Display; +import org.lwjgl.opengl.Drawable; +import org.lwjgl.opengl.GL11; +import org.lwjgl.opengl.SharedDrawable; + +import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.ICrashCallable; +import cpw.mods.fml.common.ProgressManager; +import cpw.mods.fml.common.ProgressManager.ProgressBar; +import cpw.mods.fml.common.asm.FMLSanityChecker; + +/** + * @deprecated not a stable API, will break, don't use this yet + */ +@Deprecated +public class SplashProgress +{ + private static Drawable d; + private static volatile boolean pause = false; + private static volatile boolean done = false; + private static Thread thread; + private static int angle = 0; + private static final Lock lock = new ReentrantLock(true); + private static SplashFontRenderer fontRenderer; + + private static final IResourcePack mcPack = Minecraft.getMinecraft().mcDefaultResourcePack; + private static final IResourcePack fmlPack = createFmlResourcePack(); + + private static int fontTexture; + private static ResourceLocation fontLocation = new ResourceLocation("textures/font/ascii.png"); + private static int logoTexture; + private static ResourceLocation logoLocation = new ResourceLocation("textures/gui/title/mojang.png"); + private static int forgeTexture; + private static ResourceLocation forgeLocation = new ResourceLocation("fml", "textures/gui/forge.png"); + + private static ResourceLocation configLocation = new ResourceLocation("fml", "splash.properties"); + private static final Properties config = loadConfig(); + + private static final boolean enabled = Boolean.parseBoolean(config.getProperty("enabled")); + private static final int backgroundColor = getInt("background"); + private static final int fontColor = getInt("font"); + private static final int barBorderColor = getInt("barBorder"); + private static final int barColor = getInt("bar"); + private static final int barBackgroundColor = getInt("barBackground"); + + public static void start() + { + if(!enabled) return; + // getting debug info out of the way, while we still can + FMLCommonHandler.instance().registerCrashCallable(new ICrashCallable() + { + public String call() throws Exception + { + return "' Vendor: '" + GL11.glGetString(GL11.GL_VENDOR) + + "' Version: '" + GL11.glGetString(GL11.GL_VERSION) + + "' Renderer: '" + GL11.glGetString(GL11.GL_RENDERER) + + "'"; + } + + public String getLabel() + { + return "GL info"; + } + }); + CrashReport report = CrashReport.makeCrashReport(new Throwable(), "Loading screen debug info"); + System.out.println(report.getCompleteReport()); + fontTexture = GL11.glGenTextures(); + loadTexture(mcPack, fontTexture, fontLocation); + logoTexture = GL11.glGenTextures(); + loadTexture(mcPack, logoTexture, logoLocation); + forgeTexture = GL11.glGenTextures(); + loadTexture(fmlPack, forgeTexture, forgeLocation); + + try + { + d = new SharedDrawable(Display.getDrawable()); + Display.getDrawable().releaseContext(); + d.makeCurrent(); + } + catch (LWJGLException e) + { + e.printStackTrace(); + throw new RuntimeException(e); + } + thread = new Thread(new Runnable() + { + private final int barWidth = 400; + private final int barHeight = 20; + private final int textHeight2 = 20; + private final int barOffset = 55; + + public void run() + { + setGL(); + while(!done) + { + ProgressBar first = null, penult = null, last = null; + Iterator i = ProgressManager.barIterator(); + while(i.hasNext()) + { + if(first == null) first = i.next(); + else + { + penult = last; + last = i.next(); + } + } + + GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); + + // matrix setup + int w = Display.getWidth(); + int h = Display.getHeight(); + GL11.glViewport(0, 0, w, h); + GL11.glMatrixMode(GL11.GL_PROJECTION); + GL11.glLoadIdentity(); + GL11.glOrtho(320 - w/2, 320 + w/2, 240 + h/2, 240 - h/2, -1, 1); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + GL11.glLoadIdentity(); + + // mojang logo + setColor(backgroundColor); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glBindTexture(GL11.GL_TEXTURE_2D, logoTexture); + GL11.glBegin(GL11.GL_QUADS); + GL11.glTexCoord2f(0, 0); + GL11.glVertex2f(320 - 256, 240 - 256); + GL11.glTexCoord2f(0, 1); + GL11.glVertex2f(320 - 256, 240 + 256); + GL11.glTexCoord2f(1, 1); + GL11.glVertex2f(320 + 256, 240 + 256); + GL11.glTexCoord2f(1, 0); + GL11.glVertex2f(320 + 256, 240 - 256); + GL11.glEnd(); + GL11.glDisable(GL11.GL_TEXTURE_2D); + + // bars + if(first != null) + { + GL11.glPushMatrix(); + GL11.glTranslatef(320 - (float)barWidth / 2, 310, 0); + drawBar(first); + if(penult != null) + { + GL11.glTranslatef(0, barOffset, 0); + drawBar(penult); + } + if(last != null) + { + GL11.glTranslatef(0, barOffset, 0); + drawBar(last); + } + GL11.glPopMatrix(); + } + + angle += 1; + + // forge logo + setColor(backgroundColor); + GL11.glTranslatef(680, 420, 0); + GL11.glRotatef(angle, 0, 0, 1); + GL11.glEnable(GL11.GL_TEXTURE_2D); + GL11.glBindTexture(GL11.GL_TEXTURE_2D, forgeTexture); + GL11.glBegin(GL11.GL_QUADS); + GL11.glTexCoord2f(0, 0); + GL11.glVertex2f(-50, -50); + GL11.glTexCoord2f(0, 1); + GL11.glVertex2f(-50, 50); + GL11.glTexCoord2f(1, 1); + GL11.glVertex2f(50, 50); + GL11.glTexCoord2f(1, 0); + GL11.glVertex2f(50, -50); + GL11.glEnd(); + GL11.glDisable(GL11.GL_TEXTURE_2D); + + Display.update(); + if(pause) + { + clearGL(); + setGL(); + } + try + { + Thread.sleep(10); + } + catch (InterruptedException e) + { + e.printStackTrace(); + throw new RuntimeException(e); + } + } + clearGL(); + } + + private void setColor(int color) + { + GL11.glColor3ub((byte)((color >> 16) & 0xFF), (byte)((color >> 8) & 0xFF), (byte)(color & 0xFF)); + } + + private void drawBox(int w, int h) + { + GL11.glBegin(GL11.GL_QUADS); + GL11.glVertex2f(0, 0); + GL11.glVertex2f(0, h); + GL11.glVertex2f(w, h); + GL11.glVertex2f(w, 0); + GL11.glEnd(); + } + + private void drawBar(ProgressBar b) + { + GL11.glPushMatrix(); + // title - message + setColor(fontColor); + GL11.glScalef(2, 2, 1); + GL11.glEnable(GL11.GL_TEXTURE_2D); + fontRenderer.drawString(b.getTitle() + " - " + b.getMessage(), 0, 0, 0x000000); + GL11.glDisable(GL11.GL_TEXTURE_2D); + GL11.glPopMatrix(); + // border + GL11.glPushMatrix(); + GL11.glTranslatef(0, textHeight2, 0); + setColor(barBorderColor); + drawBox(barWidth, barHeight); + // interior + setColor(barBackgroundColor); + GL11.glTranslatef(1, 1, 0); + drawBox(barWidth - 2, barHeight - 2); + // slidy part + setColor(barColor); + drawBox((barWidth - 2) * b.getStep() / b.getSteps(), barHeight - 2); + // progress text + String progress = "" + b.getStep() + "/" + b.getSteps(); + GL11.glTranslatef(((float)barWidth - 2 - fontRenderer.getStringWidth(progress))/ 2, 2, 0); + setColor(fontColor); + GL11.glScalef(2, 2, 1); + GL11.glEnable(GL11.GL_TEXTURE_2D); + fontRenderer.drawString(progress, 0, 0, 0x000000); + GL11.glPopMatrix(); + } + + private void setGL() + { + lock.lock(); + try + { + Display.getDrawable().makeCurrent(); + } + catch (LWJGLException e) + { + e.printStackTrace(); + throw new RuntimeException(e); + } + GL11.glClearColor((float)((backgroundColor >> 16) & 0xFF) / 0xFF, (float)((backgroundColor >> 8) & 0xFF) / 0xFF, (float)(backgroundColor & 0xFF) / 0xFF, 1); + GL11.glDisable(GL11.GL_LIGHTING); + GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glEnable(GL11.GL_BLEND); + GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); + GL11.glEnable(GL11.GL_TEXTURE_2D); + if(fontRenderer == null) + { + fontRenderer = new SplashFontRenderer(); + } + GL11.glDisable(GL11.GL_TEXTURE_2D); + } + + private void clearGL() + { + Minecraft mc = Minecraft.getMinecraft(); + mc.displayWidth = Display.getWidth(); + mc.displayHeight = Display.getHeight(); + mc.resize(mc.displayWidth, mc.displayHeight); + GL11.glClearColor(1, 1, 1, 1); + GL11.glEnable(GL11.GL_DEPTH_TEST); + GL11.glDepthFunc(GL11.GL_LEQUAL); + GL11.glEnable(GL11.GL_ALPHA_TEST); + GL11.glAlphaFunc(GL11.GL_GREATER, .1f); + try + { + Display.getDrawable().releaseContext(); + } + catch (LWJGLException e) + { + e.printStackTrace(); + throw new RuntimeException(e); + } + finally + { + lock.unlock(); + } + } + }); + thread.start(); + } + + /** + * Call before you need to explicitly modify GL context state during loading. + * Resource loading doesn't usually require this call. + * Call {@link #resume()} when you're done. + * @deprecated not a stable API, will break, don't use this yet + */ + @Deprecated + public static void pause() + { + if(!enabled) return; + pause = true; + lock.lock(); + try + { + d.releaseContext(); + Display.getDrawable().makeCurrent(); + } + catch (LWJGLException e) + { + e.printStackTrace(); + throw new RuntimeException(e); + } + } + + /** + * @deprecated not a stable API, will break, don't use this yet + */ + @Deprecated + public static void resume() + { + if(!enabled) return; + pause = false; + try + { + Display.getDrawable().releaseContext(); + d.makeCurrent(); + } + catch (LWJGLException e) + { + e.printStackTrace(); + throw new RuntimeException(e); + } + lock.unlock(); + } + + public static void finish() + { + if(!enabled) return; + try + { + done = true; + thread.join(); + d.releaseContext(); + Display.getDrawable().makeCurrent(); + GL11.glDeleteTextures(fontTexture); + GL11.glDeleteTextures(logoTexture); + GL11.glDeleteTextures(forgeTexture); + } + catch (Exception e) + { + e.printStackTrace(); + throw new RuntimeException(e); + } + } + + private static IResourcePack createFmlResourcePack() + { + if(FMLSanityChecker.fmlLocation.isDirectory()) + { + return new FolderResourcePack(FMLSanityChecker.fmlLocation); + } + else + { + return new FileResourcePack(FMLSanityChecker.fmlLocation); + } + } + + private static Properties loadConfig() + { + InputStream s = null; + try + { + s = fmlPack.getInputStream(configLocation); + Properties config = new Properties(); + config.load(s); + return config; + } + catch(IOException e) + { + e.printStackTrace(); + throw new RuntimeException(e); + } + finally + { + IOUtils.closeQuietly(s); + } + } + + private static int getInt(String name) + { + return Integer.decode(config.getProperty(name)); + } + + private static void loadTexture(IResourcePack pack, int name, ResourceLocation location) + { + InputStream s = null; + try + { + s = pack.getInputStream(location); + TextureUtil.uploadTextureImageAllocate(name, ImageIO.read(pack.getInputStream(location)), false, false); + } + catch(IOException e) + { + e.printStackTrace(); + throw new RuntimeException(e); + } + finally + { + IOUtils.closeQuietly(s); + } + } + + private static class SplashFontRenderer extends FontRenderer + { + public SplashFontRenderer() + { + super(Minecraft.getMinecraft().gameSettings, fontLocation, null, false); + super.onResourceManagerReload(null); + } + + @Override + protected void bindTexture(ResourceLocation location) + { + if(location != locationFontTexture) throw new IllegalArgumentException(); + GL11.glBindTexture(GL11.GL_TEXTURE_2D, fontTexture); + } + + @Override + protected InputStream getResourceInputStream(ResourceLocation location) throws IOException + { + return Minecraft.getMinecraft().mcDefaultResourcePack.getInputStream(location); + } + } + + public static void drawVanillaScreen() throws LWJGLException + { + if(!enabled) + { + Minecraft.getMinecraft().loadScreen(); + } + } + + public static void clearVanillaResources(TextureManager renderEngine, ResourceLocation mojangLogo) + { + if(!enabled) + { + renderEngine.deleteTexture(mojangLogo); + } + } +} diff --git a/fml/src/main/java/cpw/mods/fml/common/FMLCommonHandler.java b/fml/src/main/java/cpw/mods/fml/common/FMLCommonHandler.java index 9c5e065d35..6e2258ff9c 100644 --- a/fml/src/main/java/cpw/mods/fml/common/FMLCommonHandler.java +++ b/fml/src/main/java/cpw/mods/fml/common/FMLCommonHandler.java @@ -595,6 +595,10 @@ public class FMLCommonHandler return sidedDelegate.shouldAllowPlayerLogins(); } + public void processWindowMessages() + { + sidedDelegate.processWindowMessages(); + } /** * Used to exit from java, with system exit preventions in place. Will be tidy about it and just log a message, diff --git a/fml/src/main/java/cpw/mods/fml/common/IFMLSidedHandler.java b/fml/src/main/java/cpw/mods/fml/common/IFMLSidedHandler.java index ec230f32be..abc08bc425 100644 --- a/fml/src/main/java/cpw/mods/fml/common/IFMLSidedHandler.java +++ b/fml/src/main/java/cpw/mods/fml/common/IFMLSidedHandler.java @@ -61,4 +61,6 @@ public interface IFMLSidedHandler boolean shouldAllowPlayerLogins(); void allowLogins(); + + void processWindowMessages(); } diff --git a/fml/src/main/java/cpw/mods/fml/common/ProgressManager.java b/fml/src/main/java/cpw/mods/fml/common/ProgressManager.java new file mode 100644 index 0000000000..3dab5d89c3 --- /dev/null +++ b/fml/src/main/java/cpw/mods/fml/common/ProgressManager.java @@ -0,0 +1,91 @@ +package cpw.mods.fml.common; + +import java.util.Iterator; +import java.util.List; +import java.util.concurrent.CopyOnWriteArrayList; + +/** + * @deprecated not a stable API, will break, don't use this yet + */ +@Deprecated +public class ProgressManager +{ + private static final List bars = new CopyOnWriteArrayList(); + + /** + * @deprecated not a stable API, will break, don't use this yet + */ + @Deprecated + public static ProgressBar push(String title, int steps) + { + ProgressBar bar = new ProgressBar(title, steps); + bars.add(bar); + FMLCommonHandler.instance().processWindowMessages(); + return bar; + } + + /** + * @deprecated not a stable API, will break, don't use this yet + */ + @Deprecated + public static void pop(ProgressBar bar) + { + if(bar.getSteps() != bar.getStep()) throw new IllegalStateException("can't pop unfinished ProgressBar " + bar.getTitle()); + bars.remove(bar); + FMLCommonHandler.instance().processWindowMessages(); + } + + /* + * Internal use only. + */ + public static Iterator barIterator() + { + return bars.iterator(); + } + + /** + * @deprecated not a stable API, will break, don't use this yet + */ + @Deprecated + public static class ProgressBar + { + private final String title; + private final int steps; + private volatile int step = 0; + private volatile String message = ""; + + private ProgressBar(String title, int steps) + { + this.title = title; + this.steps = steps; + } + + public void step(String message) + { + if(step >= steps) throw new IllegalStateException("too much steps for ProgressBar " + title); + step++; + this.message = message; + FMLCommonHandler.instance().processWindowMessages(); + } + + public String getTitle() + { + return title; + } + + public int getSteps() + { + return steps; + } + + public int getStep() + { + return step; + } + + public String getMessage() + { + return message; + } + } +} diff --git a/fml/src/main/java/cpw/mods/fml/server/FMLServerHandler.java b/fml/src/main/java/cpw/mods/fml/server/FMLServerHandler.java index 91eb2c7757..0a362de43b 100644 --- a/fml/src/main/java/cpw/mods/fml/server/FMLServerHandler.java +++ b/fml/src/main/java/cpw/mods/fml/server/FMLServerHandler.java @@ -264,4 +264,10 @@ public class FMLServerHandler implements IFMLSidedHandler public void allowLogins() { DedicatedServer.allowPlayerLogins = true; } + + @Override + public void processWindowMessages() + { + // NOOP + } } diff --git a/fml/src/main/resources/assets/fml/splash.properties b/fml/src/main/resources/assets/fml/splash.properties new file mode 100644 index 0000000000..84ec356723 --- /dev/null +++ b/fml/src/main/resources/assets/fml/splash.properties @@ -0,0 +1,7 @@ +enabled = true + +background = 0xFFFFFF +font = 0x000000 +barBorder = 0xC0C0C0 +bar = 0xCB3D35 +barBackground = 0xFFFFFF diff --git a/fml/src/main/resources/assets/fml/textures/gui/forge.png b/fml/src/main/resources/assets/fml/textures/gui/forge.png new file mode 100644 index 0000000000000000000000000000000000000000..1be137a39001f5194b0f91a018bfe8e63eca795e GIT binary patch literal 3547 zcma)9_d6R57fpiNl$4^1H&$cRd{xzKD57QsQ9DL!)6^&>cGa%YDv4FGcZm^_QlThn zzl5OFdMR3^Mt$D@;Ct>l_dNIfa(}zexrt^b`s^$MEC2w2-Ox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d0nl z0gIT_tEeF>Gq(M|F^@JfD&z|mshVP1b+X4ruS_#?KLdSC0{A7H*+rUiCaD8mqA!wh ztU&^1;z-r#V#Ih`@m^)23LP|ENus`Daq}qyi?kFiTEcmGld8>E-4Vxm=-hC=z_6l1 z!ZXl&AUAW{s4Z`0V1?8ml%&|Tu@lEM!T@yacMn}zH-A0^F6@`bmfmoj+%w5hIzQm-^L#MQ zdX;&=5En`gMVr5`^I{h1e&F1X-wT+xJ+r^upD@q1oaHN_UB&^F>LyfAYSop7V=N4B z%|GFcWDZZeJ%jrUF3jb0J8Eohcdw+?JS-zwPG*y_^YG|Y(TkjEB>sH*{ZQN{`{-{k zfXfD5a>~XpI}@wXMK$v0yioUhsQAsdXxp3w=ih3-)gh~gB9k4psj2%0|K3TC^e_wV k=>w_*)&EbZai25p+O2C2_`L1A__+XvdM3KHcb%gD2Ukv@&;S4c literal 0 HcmV?d00001 diff --git a/fml/src/main/resources/fml_at.cfg b/fml/src/main/resources/fml_at.cfg index 3b2642b216..58fda4c559 100644 --- a/fml/src/main/resources/fml_at.cfg +++ b/fml/src/main/resources/fml_at.cfg @@ -74,6 +74,9 @@ public net.minecraft.client.gui.GuiScreen field_146297_k # minecraft instance - # Minecraft #public atv.D #FD:Minecraft/field_71425_J #running public net.minecraft.client.Minecraft field_71446_o # textureManager +public net.minecraft.client.Minecraft field_110450_ap # mcDefaultResourcePack +public net.minecraft.client.Minecraft func_71370_a(II)V # resize +public net.minecraft.client.Minecraft func_71357_I()V # loadScreen ## ItemBlock public net.minecraft.item.ItemBlock field_150939_a ## DedicatedServer @@ -102,4 +105,14 @@ public net.minecraft.client.gui.GuiSlot field_148153_b # top - needed for config public net.minecraft.client.gui.GuiSlot field_148154_c # bottom - needed for config GUI stuff public net.minecraft.client.gui.GuiSlot field_148155_a # width - needed for config GUI stuff public net.minecraft.client.gui.GuiSlot field_148158_l # height - needed for config GUI stuff -public net.minecraft.client.gui.GuiSlot field_148160_j # headerPadding - needed for config GUI stuff \ No newline at end of file +public net.minecraft.client.gui.GuiSlot field_148160_j # headerPadding - needed for config GUI stuff + +# Font renderer +protected net.minecraft.client.gui.FontRenderer field_78288_b # FONT_HEIGHT +protected net.minecraft.client.gui.FontRenderer field_78286_d # charWidth +protected net.minecraft.client.gui.FontRenderer field_78287_e # glyphWidth +protected net.minecraft.client.gui.FontRenderer field_111273_g # locationFontTexture +protected net.minecraft.client.gui.FontRenderer field_78295_j # posX +protected net.minecraft.client.gui.FontRenderer field_78296_k # posY +protected net.minecraft.client.gui.FontRenderer func_78266_a(IZ)F # renderDefaultChar +protected net.minecraft.client.gui.FontRenderer func_78277_a(CZ)F # renderUnicodeChar From 6398961c485ef2b5169b7a4afc737fc31d389ed6 Mon Sep 17 00:00:00 2001 From: cpw Date: Mon, 20 Apr 2015 23:34:36 -0400 Subject: [PATCH 15/38] Call some loader stuffs --- fml/jsons/1.7.10.json | 2 +- .../main/java/cpw/mods/fml/common/LoadController.java | 7 +++++++ fml/src/main/java/cpw/mods/fml/common/Loader.java | 10 ++++++++++ 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/fml/jsons/1.7.10.json b/fml/jsons/1.7.10.json index 020bda29c5..595605462a 100644 --- a/fml/jsons/1.7.10.json +++ b/fml/jsons/1.7.10.json @@ -74,7 +74,7 @@ "name": "com.google.code.gson:gson:2.2.4" }, { - "name": "com.mojang:authlib:1.5.16" + "name": "com.mojang:authlib:1.5.21" }, { "name": "org.apache.logging.log4j:log4j-api:2.0-beta9" diff --git a/fml/src/main/java/cpw/mods/fml/common/LoadController.java b/fml/src/main/java/cpw/mods/fml/common/LoadController.java index 6c8b91576b..21c77c2b99 100644 --- a/fml/src/main/java/cpw/mods/fml/common/LoadController.java +++ b/fml/src/main/java/cpw/mods/fml/common/LoadController.java @@ -37,6 +37,7 @@ import com.google.common.eventbus.EventBus; import com.google.common.eventbus.Subscribe; import cpw.mods.fml.common.LoaderState.ModState; +import cpw.mods.fml.common.ProgressManager.ProgressBar; import cpw.mods.fml.common.event.FMLEvent; import cpw.mods.fml.common.event.FMLLoadEvent; import cpw.mods.fml.common.event.FMLModDisabledEvent; @@ -182,10 +183,16 @@ public class LoadController { modObjectList = buildModObjectList(); } + String event = stateEvent.toString(); + event = event.substring(event.lastIndexOf('.') + 1); + event = event.substring(0, event.indexOf('@')); + ProgressBar bar = ProgressManager.push(event + " propagation", activeModList.size()); for (ModContainer mc : activeModList) { + bar.step("mod: "+mc.getName()); sendEventToModContainer(stateEvent, mc); } + ProgressManager.pop(bar); } private void sendEventToModContainer(FMLEvent stateEvent, ModContainer mc) diff --git a/fml/src/main/java/cpw/mods/fml/common/Loader.java b/fml/src/main/java/cpw/mods/fml/common/Loader.java index 6469c47646..d54e8a518c 100644 --- a/fml/src/main/java/cpw/mods/fml/common/Loader.java +++ b/fml/src/main/java/cpw/mods/fml/common/Loader.java @@ -53,6 +53,7 @@ import com.google.common.collect.TreeMultimap; import cpw.mods.fml.common.LoaderState.ModState; import cpw.mods.fml.common.ModContainer.Disableable; +import cpw.mods.fml.common.ProgressManager.ProgressBar; import cpw.mods.fml.common.discovery.ModDiscoverer; import cpw.mods.fml.common.event.FMLInterModComms; import cpw.mods.fml.common.event.FMLLoadEvent; @@ -152,6 +153,7 @@ public class Loader private ImmutableMap fmlBrandingProperties; private File forcedModFile; private ModDiscoverer discoverer; + private ProgressBar progressBar; public static Loader instance() { @@ -460,6 +462,8 @@ public class Loader */ public void loadMods() { + progressBar = ProgressManager.push("FML", 5); + progressBar.step("Constructing"); initializeLoader(); mods = Lists.newArrayList(); namedMods = Maps.newHashMap(); @@ -499,6 +503,7 @@ public class Loader { FMLLog.fine("No user mod signature data found"); } + progressBar.step("Preinitialization"); modController.transition(LoaderState.PREINITIALIZATION, false); } @@ -512,6 +517,7 @@ public class Loader ObjectHolderRegistry.INSTANCE.findObjectHolders(discoverer.getASMTable()); modController.distributeStateMessage(LoaderState.PREINITIALIZATION, discoverer.getASMTable(), canonicalConfigDir); ObjectHolderRegistry.INSTANCE.applyObjectHolders(); + progressBar.step("Initialization"); modController.transition(LoaderState.INITIALIZATION, false); } @@ -689,15 +695,19 @@ public class Loader { // Mod controller should be in the initialization state here modController.distributeStateMessage(LoaderState.INITIALIZATION); + progressBar.step("Postinitialization"); modController.transition(LoaderState.POSTINITIALIZATION, false); modController.distributeStateMessage(FMLInterModComms.IMCEvent.class); modController.distributeStateMessage(LoaderState.POSTINITIALIZATION); + progressBar.step("Finishing up"); modController.transition(LoaderState.AVAILABLE, false); modController.distributeStateMessage(LoaderState.AVAILABLE); GameData.freezeData(); // Dump the custom registry data map, if necessary GameData.dumpRegistry(minecraftDir); FMLLog.info("Forge Mod Loader has successfully loaded %d mod%s", mods.size(), mods.size() == 1 ? "" : "s"); + ProgressManager.pop(progressBar); + progressBar = null; } public ICrashCallable getCallableCrashInformation() From ba354da317756b840aa70fab62d9e0913d4e8903 Mon Sep 17 00:00:00 2001 From: cpw Date: Tue, 21 Apr 2015 00:28:19 -0400 Subject: [PATCH 16/38] Make sure to close the splash screen if there's gonna be an error display --- fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java index f849332f7c..727e542704 100644 --- a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java @@ -282,6 +282,7 @@ public class FMLClientHandler implements IFMLSidedHandler @Override public void haltGame(String message, Throwable t) { + SplashProgress.finish(); client.displayCrashReport(new CrashReport(message, t)); throw Throwables.propagate(t); } @@ -295,6 +296,7 @@ public class FMLClientHandler implements IFMLSidedHandler { if (modsMissing != null || wrongMC != null || customError!=null || dupesFound!=null || modSorting!=null) { + SplashProgress.finish(); return; } try @@ -305,6 +307,7 @@ public class FMLClientHandler implements IFMLSidedHandler { FMLLog.log(Level.ERROR, custom, "A custom exception was thrown by a mod, the game will now halt"); customError = custom; + SplashProgress.finish(); return; } catch (LoaderException le) From 87e6c2902882fa7a31931a374f9d6c2a80d72749 Mon Sep 17 00:00:00 2001 From: cpw Date: Wed, 22 Apr 2015 08:31:25 -0400 Subject: [PATCH 17/38] Fix up multiple injections of cmdline files via versionspecificmoddir. Closes #645 --- fml/src/main/java/cpw/mods/fml/common/Loader.java | 4 +++- .../java/cpw/mods/fml/common/discovery/ModDiscoverer.java | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/Loader.java b/fml/src/main/java/cpw/mods/fml/common/Loader.java index d54e8a518c..206574fa87 100644 --- a/fml/src/main/java/cpw/mods/fml/common/Loader.java +++ b/fml/src/main/java/cpw/mods/fml/common/Loader.java @@ -71,6 +71,7 @@ import cpw.mods.fml.common.toposort.ModSortingException.SortingExceptionData; import cpw.mods.fml.common.toposort.TopologicalSort; import cpw.mods.fml.common.versioning.ArtifactVersion; import cpw.mods.fml.common.versioning.VersionParser; +import cpw.mods.fml.relauncher.ModListHelper; import cpw.mods.fml.relauncher.Side; /** @@ -337,8 +338,9 @@ public class Loader discoverer.findClasspathMods(modClassLoader); FMLLog.fine("Minecraft jar mods loaded successfully"); + FMLLog.getLogger().log(Level.INFO, "Found {} mods from the command line. Injecting into mod discoverer",ModListHelper.additionalMods.size()); FMLLog.info("Searching %s for mods", canonicalModsDir.getAbsolutePath()); - discoverer.findModDirMods(canonicalModsDir); + discoverer.findModDirMods(canonicalModsDir, ModListHelper.additionalMods.values().toArray(new File[0])); File versionSpecificModsDir = new File(canonicalModsDir,mccversion); if (versionSpecificModsDir.isDirectory()) { diff --git a/fml/src/main/java/cpw/mods/fml/common/discovery/ModDiscoverer.java b/fml/src/main/java/cpw/mods/fml/common/discovery/ModDiscoverer.java index a1fb9812d0..38a0ae9cfc 100644 --- a/fml/src/main/java/cpw/mods/fml/common/discovery/ModDiscoverer.java +++ b/fml/src/main/java/cpw/mods/fml/common/discovery/ModDiscoverer.java @@ -84,9 +84,13 @@ public class ModDiscoverer public void findModDirMods(File modsDir) { - File[] modList = FileListHelper.sortFileList(modsDir, null); - modList = FileListHelper.sortFileList(ObjectArrays.concat(modList, ModListHelper.additionalMods.values().toArray(new File[0]), File.class)); + findModDirMods(modsDir, new File[0]); + } + public void findModDirMods(File modsDir, File[] supplementalModFileCandidates) + { + File[] modList = FileListHelper.sortFileList(modsDir, null); + modList = FileListHelper.sortFileList(ObjectArrays.concat(modList, supplementalModFileCandidates, File.class)); for (File modFile : modList) { // skip loaded coremods From 53a21e7e472fd222d1a4aff3433b22b932e65d5d Mon Sep 17 00:00:00 2001 From: RainWarrior Date: Fri, 24 Apr 2015 05:38:32 +0300 Subject: [PATCH 18/38] Correctly track exceptions thrown in the loading screen rendering thread --- .../java/cpw/mods/fml/client/SplashProgress.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java index 5966c807f2..3422b9af1e 100644 --- a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java +++ b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java @@ -2,6 +2,7 @@ package cpw.mods.fml.client; import java.io.IOException; import java.io.InputStream; +import java.lang.Thread.UncaughtExceptionHandler; import java.util.Iterator; import java.util.Properties; import java.util.concurrent.locks.Lock; @@ -20,6 +21,7 @@ import net.minecraft.crash.CrashReport; import net.minecraft.util.ResourceLocation; import org.apache.commons.io.IOUtils; +import org.apache.logging.log4j.Level; import org.lwjgl.LWJGLException; import org.lwjgl.opengl.Display; import org.lwjgl.opengl.Drawable; @@ -27,6 +29,7 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.SharedDrawable; import cpw.mods.fml.common.FMLCommonHandler; +import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.ICrashCallable; import cpw.mods.fml.common.ProgressManager; import cpw.mods.fml.common.ProgressManager.ProgressBar; @@ -105,6 +108,7 @@ public class SplashProgress e.printStackTrace(); throw new RuntimeException(e); } + Thread mainThread = Thread.currentThread(); thread = new Thread(new Runnable() { private final int barWidth = 400; @@ -313,6 +317,14 @@ public class SplashProgress } } }); + thread.setUncaughtExceptionHandler(new UncaughtExceptionHandler() + { + public void uncaughtException(Thread t, Throwable e) + { + FMLLog.log(Level.ERROR, e, "Splash thread Exception"); + Minecraft.getMinecraft().crashed(CrashReport.makeCrashReport(e, "Splash thread")); + } + }); thread.start(); } From ab3413a31ebbfa5d297e3a7a05f2480863931886 Mon Sep 17 00:00:00 2001 From: cpw Date: Fri, 24 Apr 2015 16:00:22 -0400 Subject: [PATCH 19/38] Add in resource reloading to the bar. Tidy up some of the labels a bit. --- ...SimpleReloadableResourceManager.java.patch | 46 +++++++++++++++++++ .../cpw/mods/fml/common/LoadController.java | 7 +-- .../main/java/cpw/mods/fml/common/Loader.java | 10 ++-- .../cpw/mods/fml/common/event/FMLEvent.java | 14 ++++-- 4 files changed, 62 insertions(+), 15 deletions(-) create mode 100644 fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch diff --git a/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch b/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch new file mode 100644 index 0000000000..d83c6637c0 --- /dev/null +++ b/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch @@ -0,0 +1,46 @@ +--- ../src-base/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java ++++ ../src-work/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java +@@ -6,16 +6,22 @@ + import com.google.common.collect.Lists; + import com.google.common.collect.Maps; + import com.google.common.collect.Sets; ++ ++import cpw.mods.fml.common.ProgressManager; ++import cpw.mods.fml.common.ProgressManager.ProgressBar; + import cpw.mods.fml.relauncher.Side; + import cpw.mods.fml.relauncher.SideOnly; ++ + import java.io.FileNotFoundException; + import java.io.IOException; + import java.util.Iterator; + import java.util.List; + import java.util.Map; + import java.util.Set; ++ + import net.minecraft.client.resources.data.IMetadataSerializer; + import net.minecraft.util.ResourceLocation; ++ + import org.apache.logging.log4j.LogManager; + import org.apache.logging.log4j.Logger; + +@@ -95,6 +101,7 @@ + public void func_110541_a(List p_110541_1_) + { + this.func_110543_a(); ++ ProgressBar resReload = ProgressManager.push("Resource loading", p_110541_1_.size()); + field_147967_a.info("Reloading ResourceManager: " + field_130074_a.join(Iterables.transform(p_110541_1_, new Function() + { + private static final String __OBFID = "CL_00001092"; +@@ -112,10 +119,12 @@ + while (iterator.hasNext()) + { + IResourcePack iresourcepack = (IResourcePack)iterator.next(); ++ resReload.step(iresourcepack.func_130077_b()); + this.func_110545_a(iresourcepack); + } + + this.func_110544_b(); ++ ProgressManager.pop(resReload); + } + + public void func_110542_a(IResourceManagerReloadListener p_110542_1_) diff --git a/fml/src/main/java/cpw/mods/fml/common/LoadController.java b/fml/src/main/java/cpw/mods/fml/common/LoadController.java index 21c77c2b99..be3604a967 100644 --- a/fml/src/main/java/cpw/mods/fml/common/LoadController.java +++ b/fml/src/main/java/cpw/mods/fml/common/LoadController.java @@ -183,13 +183,10 @@ public class LoadController { modObjectList = buildModObjectList(); } - String event = stateEvent.toString(); - event = event.substring(event.lastIndexOf('.') + 1); - event = event.substring(0, event.indexOf('@')); - ProgressBar bar = ProgressManager.push(event + " propagation", activeModList.size()); + ProgressBar bar = ProgressManager.push(stateEvent.description(), activeModList.size()); for (ModContainer mc : activeModList) { - bar.step("mod: "+mc.getName()); + bar.step(mc.getName()); sendEventToModContainer(stateEvent, mc); } ProgressManager.pop(bar); diff --git a/fml/src/main/java/cpw/mods/fml/common/Loader.java b/fml/src/main/java/cpw/mods/fml/common/Loader.java index 206574fa87..801854b094 100644 --- a/fml/src/main/java/cpw/mods/fml/common/Loader.java +++ b/fml/src/main/java/cpw/mods/fml/common/Loader.java @@ -464,8 +464,8 @@ public class Loader */ public void loadMods() { - progressBar = ProgressManager.push("FML", 5); - progressBar.step("Constructing"); + progressBar = ProgressManager.push("Mod Loading", 5); + progressBar.step("Constructing Mods"); initializeLoader(); mods = Lists.newArrayList(); namedMods = Maps.newHashMap(); @@ -505,7 +505,7 @@ public class Loader { FMLLog.fine("No user mod signature data found"); } - progressBar.step("Preinitialization"); + progressBar.step("Initializing mods Phase 1"); modController.transition(LoaderState.PREINITIALIZATION, false); } @@ -519,7 +519,7 @@ public class Loader ObjectHolderRegistry.INSTANCE.findObjectHolders(discoverer.getASMTable()); modController.distributeStateMessage(LoaderState.PREINITIALIZATION, discoverer.getASMTable(), canonicalConfigDir); ObjectHolderRegistry.INSTANCE.applyObjectHolders(); - progressBar.step("Initialization"); + progressBar.step("Initializing mods Phase 2"); modController.transition(LoaderState.INITIALIZATION, false); } @@ -697,7 +697,7 @@ public class Loader { // Mod controller should be in the initialization state here modController.distributeStateMessage(LoaderState.INITIALIZATION); - progressBar.step("Postinitialization"); + progressBar.step("Initializing mods Phase 3"); modController.transition(LoaderState.POSTINITIALIZATION, false); modController.distributeStateMessage(FMLInterModComms.IMCEvent.class); modController.distributeStateMessage(LoaderState.POSTINITIALIZATION); diff --git a/fml/src/main/java/cpw/mods/fml/common/event/FMLEvent.java b/fml/src/main/java/cpw/mods/fml/common/event/FMLEvent.java index 18c204be8d..c9d094f5c6 100644 --- a/fml/src/main/java/cpw/mods/fml/common/event/FMLEvent.java +++ b/fml/src/main/java/cpw/mods/fml/common/event/FMLEvent.java @@ -5,7 +5,7 @@ * are made available under the terms of the GNU Lesser Public License v2.1 * which accompanies this distribution, and is available at * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html - * + * * Contributors: * cpw - implementation */ @@ -20,8 +20,12 @@ public class FMLEvent { return getClass().getSimpleName(); } - - public void applyModContainer(ModContainer activeContainer) { - // NO OP - } + public final String description() + { + String cn = getClass().getName(); + return cn.substring(cn.lastIndexOf('.')+4,cn.length()-5); + } + public void applyModContainer(ModContainer activeContainer) { + // NO OP + } } From d18d493174a64ccd343d05135a084f37bb46f4f6 Mon Sep 17 00:00:00 2001 From: cpw Date: Fri, 24 Apr 2015 17:11:49 -0400 Subject: [PATCH 20/38] More progress bar action! --- .../net/minecraft/client/Minecraft.java.patch | 52 +++++++++++++++---- ...SimpleReloadableResourceManager.java.patch | 41 +++++---------- .../cpw/mods/fml/client/FMLClientHandler.java | 3 +- .../cpw/mods/fml/common/FMLCommonHandler.java | 1 + .../main/java/cpw/mods/fml/common/Loader.java | 12 +++-- 5 files changed, 69 insertions(+), 40 deletions(-) diff --git a/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch b/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch index 93cc41dacd..64fd52fa66 100644 --- a/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch +++ b/fml/patches/minecraft/net/minecraft/client/Minecraft.java.patch @@ -60,10 +60,44 @@ this.field_147127_av = new SoundHandler(this.field_110451_am, this.field_71474_y); this.field_110451_am.func_110542_a(this.field_147127_av); this.field_147126_aw = new MusicTicker(this); -@@ -532,19 +539,20 @@ +@@ -492,7 +499,10 @@ + this.field_110451_am.func_110542_a(this.field_71464_q); + this.field_110451_am.func_110542_a(new GrassColorReloadListener()); + this.field_110451_am.func_110542_a(new FoliageColorReloadListener()); ++ cpw.mods.fml.common.ProgressManager.ProgressBar bar= cpw.mods.fml.common.ProgressManager.push("Rendering Setup", 9); ++ bar.step("Loading Render Manager"); + RenderManager.field_78727_a.field_78721_f = new ItemRenderer(this); ++ bar.step("Loading Entity Renderer"); + this.field_71460_t = new EntityRenderer(this, this.field_110451_am); + this.field_110451_am.func_110542_a(this.field_71460_t); + AchievementList.field_76004_f.func_75988_a(new IStatStringFormat() +@@ -510,6 +520,7 @@ + } + } + }); ++ bar.step("Loading GL properties"); + this.field_71417_B = new MouseHelper(); + this.func_71361_d("Pre startup"); + GL11.glEnable(GL11.GL_TEXTURE_2D); +@@ -524,27 +535,35 @@ + GL11.glLoadIdentity(); + GL11.glMatrixMode(GL11.GL_MODELVIEW); + this.func_71361_d("Startup"); ++ bar.step("Render Global instance"); + this.field_71438_f = new RenderGlobal(this); ++ bar.step("Building Blocks Texture"); + this.field_147128_au = new TextureMap(0, "textures/blocks"); ++ bar.step("Anisotropy and Mipmaps"); + this.field_147128_au.func_147632_b(this.field_71474_y.field_151443_J); + this.field_147128_au.func_147633_a(this.field_71474_y.field_151442_I); ++ bar.step("Loading Blocks Texture"); + this.field_71446_o.func_130088_a(TextureMap.field_110575_b, this.field_147128_au); ++ bar.step("Loading Items Texture"); this.field_71446_o.func_130088_a(TextureMap.field_110576_c, new TextureMap(1, "textures/items")); ++ bar.step("Viewport"); GL11.glViewport(0, 0, this.field_71443_c, this.field_71440_d); this.field_71452_i = new EffectRenderer(this.field_71441_e, this.field_71446_o); ++ cpw.mods.fml.common.ProgressManager.pop(bar); + FMLClientHandler.instance().finishMinecraftLoading(); this.func_71361_d("Post startup"); this.field_71456_v = new GuiIngame(this); @@ -83,7 +117,7 @@ this.field_152354_ay = null; this.field_71461_s = new LoadingScreenRenderer(this); -@@ -553,6 +561,7 @@ +@@ -553,6 +572,7 @@ this.func_71352_k(); } @@ -91,7 +125,7 @@ try { Display.setVSyncEnabled(this.field_71474_y.field_74352_v); -@@ -971,9 +980,11 @@ +@@ -970,9 +990,11 @@ if (!this.field_71454_w) { @@ -103,7 +137,7 @@ } GL11.glFlush(); -@@ -1555,6 +1566,8 @@ +@@ -1554,6 +1576,8 @@ --this.field_71467_ac; } @@ -112,7 +146,7 @@ this.field_71424_I.func_76320_a("gui"); if (!this.field_71445_n) -@@ -1699,6 +1712,7 @@ +@@ -1698,6 +1722,7 @@ this.field_71462_r.func_146274_d(); } } @@ -120,7 +154,7 @@ } if (this.field_71429_W > 0) -@@ -1836,6 +1850,7 @@ +@@ -1835,6 +1860,7 @@ } } } @@ -128,7 +162,7 @@ } for (j = 0; j < 9; ++j) -@@ -2026,12 +2041,15 @@ +@@ -2025,12 +2051,15 @@ this.field_71453_ak.func_74428_b(); } @@ -144,7 +178,7 @@ this.func_71403_a((WorldClient)null); System.gc(); ISaveHandler isavehandler = this.field_71469_aa.func_75804_a(p_71371_1_, false); -@@ -2067,6 +2085,12 @@ +@@ -2066,6 +2095,12 @@ while (!this.field_71437_Z.func_71200_ad()) { @@ -157,7 +191,7 @@ String s2 = this.field_71437_Z.func_71195_b_(); if (s2 != null) -@@ -2142,6 +2166,7 @@ +@@ -2141,6 +2176,7 @@ this.field_110448_aq.func_148529_f(); this.func_71351_a((ServerData)null); this.field_71455_al = false; diff --git a/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch b/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch index d83c6637c0..1d48521be7 100644 --- a/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch +++ b/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch @@ -1,37 +1,14 @@ --- ../src-base/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java +++ ../src-work/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java -@@ -6,16 +6,22 @@ - import com.google.common.collect.Lists; - import com.google.common.collect.Maps; - import com.google.common.collect.Sets; -+ -+import cpw.mods.fml.common.ProgressManager; -+import cpw.mods.fml.common.ProgressManager.ProgressBar; - import cpw.mods.fml.relauncher.Side; - import cpw.mods.fml.relauncher.SideOnly; -+ - import java.io.FileNotFoundException; - import java.io.IOException; - import java.util.Iterator; - import java.util.List; - import java.util.Map; - import java.util.Set; -+ - import net.minecraft.client.resources.data.IMetadataSerializer; - import net.minecraft.util.ResourceLocation; -+ - import org.apache.logging.log4j.LogManager; - import org.apache.logging.log4j.Logger; - -@@ -95,6 +101,7 @@ +@@ -95,6 +95,7 @@ public void func_110541_a(List p_110541_1_) { this.func_110543_a(); -+ ProgressBar resReload = ProgressManager.push("Resource loading", p_110541_1_.size()); ++ cpw.mods.fml.common.ProgressManager.ProgressBar resReload = cpw.mods.fml.common.ProgressManager.push("Loading Resources", p_110541_1_.size()); field_147967_a.info("Reloading ResourceManager: " + field_130074_a.join(Iterables.transform(p_110541_1_, new Function() { private static final String __OBFID = "CL_00001092"; -@@ -112,10 +119,12 @@ +@@ -112,16 +113,22 @@ while (iterator.hasNext()) { IResourcePack iresourcepack = (IResourcePack)iterator.next(); @@ -40,7 +17,17 @@ } this.func_110544_b(); -+ ProgressManager.pop(resReload); ++ cpw.mods.fml.common.ProgressManager.pop(resReload); } public void func_110542_a(IResourceManagerReloadListener p_110542_1_) + { + this.field_110546_b.add(p_110542_1_); ++ cpw.mods.fml.common.ProgressManager.ProgressBar resReload = cpw.mods.fml.common.ProgressManager.push("Loading Resource", 1); ++ String rn = p_110542_1_.getClass().getName(); ++ resReload.step(rn.substring(rn.lastIndexOf('.')+1)); + p_110542_1_.func_110549_a(this); ++ cpw.mods.fml.common.ProgressManager.pop(resReload); + } + + private void func_110544_b() diff --git a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java index 727e542704..ae3d2644c6 100644 --- a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java @@ -341,7 +341,6 @@ public class FMLClientHandler implements IFMLSidedHandler } loading = false; client.gameSettings.loadOptions(); //Reload options to load any mod added keybindings. - SplashProgress.finish(); } @SuppressWarnings("unused") @@ -397,6 +396,8 @@ public class FMLClientHandler implements IFMLSidedHandler { } logMissingTextureErrors(); + Loader.instance().loadingComplete(); + SplashProgress.finish(); } /** * Get the server instance diff --git a/fml/src/main/java/cpw/mods/fml/common/FMLCommonHandler.java b/fml/src/main/java/cpw/mods/fml/common/FMLCommonHandler.java index 6e2258ff9c..ed4e61382b 100644 --- a/fml/src/main/java/cpw/mods/fml/common/FMLCommonHandler.java +++ b/fml/src/main/java/cpw/mods/fml/common/FMLCommonHandler.java @@ -597,6 +597,7 @@ public class FMLCommonHandler public void processWindowMessages() { + if (sidedDelegate == null) return; sidedDelegate.processWindowMessages(); } diff --git a/fml/src/main/java/cpw/mods/fml/common/Loader.java b/fml/src/main/java/cpw/mods/fml/common/Loader.java index 801854b094..8b2dded5a9 100644 --- a/fml/src/main/java/cpw/mods/fml/common/Loader.java +++ b/fml/src/main/java/cpw/mods/fml/common/Loader.java @@ -464,7 +464,7 @@ public class Loader */ public void loadMods() { - progressBar = ProgressManager.push("Mod Loading", 5); + progressBar = ProgressManager.push("Loading", 7); progressBar.step("Constructing Mods"); initializeLoader(); mods = Lists.newArrayList(); @@ -521,6 +521,7 @@ public class Loader ObjectHolderRegistry.INSTANCE.applyObjectHolders(); progressBar.step("Initializing mods Phase 2"); modController.transition(LoaderState.INITIALIZATION, false); + progressBar.step("Initializing Minecraft Engine"); } private void disableRequestedMods() @@ -708,8 +709,7 @@ public class Loader // Dump the custom registry data map, if necessary GameData.dumpRegistry(minecraftDir); FMLLog.info("Forge Mod Loader has successfully loaded %d mod%s", mods.size(), mods.size() == 1 ? "" : "s"); - ProgressManager.pop(progressBar); - progressBar = null; + progressBar.step("Minecraft setup completion"); } public ICrashCallable getCallableCrashInformation() @@ -988,4 +988,10 @@ public class Loader FMLLog.log(Level.INFO, e, "An error occurred writing the fml mod states file, your disabled change won't persist"); } } + + public void loadingComplete() + { + ProgressManager.pop(progressBar); + progressBar = null; + } } From 3d03b31d009f52f365df95adeb826c245aea7d5c Mon Sep 17 00:00:00 2001 From: cpw Date: Fri, 24 Apr 2015 17:47:39 -0400 Subject: [PATCH 21/38] More progress bar hooks --- .../renderer/texture/TextureMap.java.patch | 26 ++++++++++++++++++- ...SimpleReloadableResourceManager.java.patch | 21 ++++++++++++--- .../cpw/mods/fml/common/ClassNameUtils.java | 10 +++++++ .../main/java/cpw/mods/fml/common/Loader.java | 2 +- .../cpw/mods/fml/common/ProgressManager.java | 7 +++++ 5 files changed, 60 insertions(+), 6 deletions(-) create mode 100644 fml/src/main/java/cpw/mods/fml/common/ClassNameUtils.java diff --git a/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch b/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch index 32b152ee1d..de5617084d 100644 --- a/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch +++ b/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch @@ -1,6 +1,22 @@ --- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureMap.java +++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureMap.java -@@ -156,12 +156,14 @@ +@@ -96,6 +96,7 @@ + this.field_94252_e.clear(); + this.field_94258_i.clear(); + int j = Integer.MAX_VALUE; ++ cpw.mods.fml.common.ProgressManager.ProgressBar bar = cpw.mods.fml.common.ProgressManager.push("Texture stitching", this.field_110574_e.size()); + Iterator iterator = this.field_110574_e.entrySet().iterator(); + TextureAtlasSprite textureatlassprite; + +@@ -108,6 +109,7 @@ + + try + { ++ bar.step(resourcelocation1.func_110623_a()); + IResource iresource = p_110571_1_.func_110536_a(resourcelocation1); + BufferedImage[] abufferedimage = new BufferedImage[1 + this.field_147636_j]; + abufferedimage[0] = ImageIO.read(iresource.func_110527_b()); +@@ -156,12 +158,14 @@ } catch (RuntimeException runtimeexception) { @@ -17,3 +33,11 @@ continue; } +@@ -169,6 +173,7 @@ + stitcher.func_110934_a(textureatlassprite); + } + ++ cpw.mods.fml.common.ProgressManager.pop(bar); + int i1 = MathHelper.func_151239_c(j); + + if (i1 < this.field_147636_j) diff --git a/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch b/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch index 1d48521be7..73705f504b 100644 --- a/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch +++ b/fml/patches/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java.patch @@ -4,11 +4,11 @@ public void func_110541_a(List p_110541_1_) { this.func_110543_a(); -+ cpw.mods.fml.common.ProgressManager.ProgressBar resReload = cpw.mods.fml.common.ProgressManager.push("Loading Resources", p_110541_1_.size()); ++ cpw.mods.fml.common.ProgressManager.ProgressBar resReload = cpw.mods.fml.common.ProgressManager.push("Loading Resources", p_110541_1_.size()+1); field_147967_a.info("Reloading ResourceManager: " + field_130074_a.join(Iterables.transform(p_110541_1_, new Function() { private static final String __OBFID = "CL_00001092"; -@@ -112,16 +113,22 @@ +@@ -112,26 +113,35 @@ while (iterator.hasNext()) { IResourcePack iresourcepack = (IResourcePack)iterator.next(); @@ -16,6 +16,7 @@ this.func_110545_a(iresourcepack); } ++ resReload.step("Reloading listeners"); this.func_110544_b(); + cpw.mods.fml.common.ProgressManager.pop(resReload); } @@ -24,10 +25,22 @@ { this.field_110546_b.add(p_110542_1_); + cpw.mods.fml.common.ProgressManager.ProgressBar resReload = cpw.mods.fml.common.ProgressManager.push("Loading Resource", 1); -+ String rn = p_110542_1_.getClass().getName(); -+ resReload.step(rn.substring(rn.lastIndexOf('.')+1)); ++ resReload.step(p_110542_1_.getClass()); p_110542_1_.func_110549_a(this); + cpw.mods.fml.common.ProgressManager.pop(resReload); } private void func_110544_b() + { + Iterator iterator = this.field_110546_b.iterator(); + ++ cpw.mods.fml.common.ProgressManager.ProgressBar resReload = cpw.mods.fml.common.ProgressManager.push("Reloading", this.field_110546_b.size()); + while (iterator.hasNext()) + { + IResourceManagerReloadListener iresourcemanagerreloadlistener = (IResourceManagerReloadListener)iterator.next(); ++ resReload.step(iresourcemanagerreloadlistener.getClass()); + iresourcemanagerreloadlistener.func_110549_a(this); + } ++ cpw.mods.fml.common.ProgressManager.pop(resReload); + } + } diff --git a/fml/src/main/java/cpw/mods/fml/common/ClassNameUtils.java b/fml/src/main/java/cpw/mods/fml/common/ClassNameUtils.java new file mode 100644 index 0000000000..78a8d038da --- /dev/null +++ b/fml/src/main/java/cpw/mods/fml/common/ClassNameUtils.java @@ -0,0 +1,10 @@ +package cpw.mods.fml.common; + +public class ClassNameUtils +{ + public static String shortName(Class clz) + { + String nm = clz.getName(); + return nm.indexOf('.') > -1 ? nm.substring(nm.lastIndexOf('.')+1) : nm; + } +} diff --git a/fml/src/main/java/cpw/mods/fml/common/Loader.java b/fml/src/main/java/cpw/mods/fml/common/Loader.java index 8b2dded5a9..ece0458dae 100644 --- a/fml/src/main/java/cpw/mods/fml/common/Loader.java +++ b/fml/src/main/java/cpw/mods/fml/common/Loader.java @@ -709,7 +709,7 @@ public class Loader // Dump the custom registry data map, if necessary GameData.dumpRegistry(minecraftDir); FMLLog.info("Forge Mod Loader has successfully loaded %d mod%s", mods.size(), mods.size() == 1 ? "" : "s"); - progressBar.step("Minecraft setup completion"); + progressBar.step("Completing Minecraft initialization"); } public ICrashCallable getCallableCrashInformation() diff --git a/fml/src/main/java/cpw/mods/fml/common/ProgressManager.java b/fml/src/main/java/cpw/mods/fml/common/ProgressManager.java index 3dab5d89c3..a2a7194c89 100644 --- a/fml/src/main/java/cpw/mods/fml/common/ProgressManager.java +++ b/fml/src/main/java/cpw/mods/fml/common/ProgressManager.java @@ -4,6 +4,8 @@ import java.util.Iterator; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; +import com.google.common.base.Joiner; + /** * @deprecated not a stable API, will break, don't use this yet */ @@ -60,6 +62,11 @@ public class ProgressManager this.steps = steps; } + public void step(Class classToName, String... extra) + { + step(ClassNameUtils.shortName(classToName)+Joiner.on(' ').join(extra)); + } + public void step(String message) { if(step >= steps) throw new IllegalStateException("too much steps for ProgressBar " + title); From c8acd763ef231ba28966b3ce2baaad608d2b619f Mon Sep 17 00:00:00 2001 From: RainWarrior Date: Sat, 25 Apr 2015 01:27:57 +0300 Subject: [PATCH 22/38] Thread errors should be correctly displayed in the crash report now --- .../java/cpw/mods/fml/client/SplashProgress.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java index 3422b9af1e..8fb37457e1 100644 --- a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java +++ b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java @@ -45,6 +45,7 @@ public class SplashProgress private static volatile boolean pause = false; private static volatile boolean done = false; private static Thread thread; + private static volatile Throwable threadError; private static int angle = 0; private static final Lock lock = new ReentrantLock(true); private static SplashFontRenderer fontRenderer; @@ -322,12 +323,20 @@ public class SplashProgress public void uncaughtException(Thread t, Throwable e) { FMLLog.log(Level.ERROR, e, "Splash thread Exception"); - Minecraft.getMinecraft().crashed(CrashReport.makeCrashReport(e, "Splash thread")); + threadError = e; } }); thread.start(); + checkThreadState(); } + private static void checkThreadState() + { + if(thread.getState() == Thread.State.TERMINATED || threadError != null) + { + throw new IllegalStateException("Splash thread", threadError); + } + } /** * Call before you need to explicitly modify GL context state during loading. * Resource loading doesn't usually require this call. @@ -338,6 +347,7 @@ public class SplashProgress public static void pause() { if(!enabled) return; + checkThreadState(); pause = true; lock.lock(); try @@ -359,6 +369,7 @@ public class SplashProgress public static void resume() { if(!enabled) return; + checkThreadState(); pause = false; try { @@ -376,6 +387,7 @@ public class SplashProgress public static void finish() { if(!enabled) return; + checkThreadState(); try { done = true; From 753115678ab32f0639da96f5460c754389186b50 Mon Sep 17 00:00:00 2001 From: RainWarrior Date: Sat, 25 Apr 2015 01:37:39 +0300 Subject: [PATCH 23/38] fixed bar text positioning --- fml/src/main/java/cpw/mods/fml/client/SplashProgress.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java index 8fb37457e1..8da1e9345b 100644 --- a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java +++ b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java @@ -259,7 +259,7 @@ public class SplashProgress drawBox((barWidth - 2) * b.getStep() / b.getSteps(), barHeight - 2); // progress text String progress = "" + b.getStep() + "/" + b.getSteps(); - GL11.glTranslatef(((float)barWidth - 2 - fontRenderer.getStringWidth(progress))/ 2, 2, 0); + GL11.glTranslatef(((float)barWidth - 2) / 2 - fontRenderer.getStringWidth(progress), 2, 0); setColor(fontColor); GL11.glScalef(2, 2, 1); GL11.glEnable(GL11.GL_TEXTURE_2D); From 454e2e36a40fcadb2937b39623e58df1aa768616 Mon Sep 17 00:00:00 2001 From: cpw Date: Fri, 24 Apr 2015 19:01:49 -0400 Subject: [PATCH 24/38] Track mipmaps and texture upload --- .../renderer/texture/TextureMap.java.patch | 57 +++++++++++++++++-- 1 file changed, 52 insertions(+), 5 deletions(-) diff --git a/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch b/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch index de5617084d..44bf7beb63 100644 --- a/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch +++ b/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureMap.java.patch @@ -8,14 +8,14 @@ Iterator iterator = this.field_110574_e.entrySet().iterator(); TextureAtlasSprite textureatlassprite; -@@ -108,6 +109,7 @@ +@@ -105,6 +106,7 @@ + ResourceLocation resourcelocation = new ResourceLocation((String)entry.getKey()); + textureatlassprite = (TextureAtlasSprite)entry.getValue(); + ResourceLocation resourcelocation1 = this.func_147634_a(resourcelocation, 0); ++ bar.step(resourcelocation1.func_110623_a()); try { -+ bar.step(resourcelocation1.func_110623_a()); - IResource iresource = p_110571_1_.func_110536_a(resourcelocation1); - BufferedImage[] abufferedimage = new BufferedImage[1 + this.field_147636_j]; - abufferedimage[0] = ImageIO.read(iresource.func_110527_b()); @@ -156,12 +158,14 @@ } catch (RuntimeException runtimeexception) @@ -41,3 +41,50 @@ int i1 = MathHelper.func_151239_c(j); if (i1 < this.field_147636_j) +@@ -178,10 +183,12 @@ + } + + Iterator iterator1 = this.field_110574_e.values().iterator(); ++ bar = cpw.mods.fml.common.ProgressManager.push("Mipmap generation", this.field_110574_e.size()); + + while (iterator1.hasNext()) + { + final TextureAtlasSprite textureatlassprite1 = (TextureAtlasSprite)iterator1.next(); ++ bar.step(textureatlassprite1.func_94215_i()); + + try + { +@@ -222,9 +229,12 @@ + + this.field_94249_f.func_147963_d(this.field_147636_j); + stitcher.func_110934_a(this.field_94249_f); ++ cpw.mods.fml.common.ProgressManager.pop(bar); ++ bar = cpw.mods.fml.common.ProgressManager.push("Texture creation", 3); + + try + { ++ bar.step("Stitching"); + stitcher.func_94305_f(); + } + catch (StitcherException stitcherexception) +@@ -233,10 +243,12 @@ + } + + field_147635_d.info("Created: {}x{} {}-atlas", new Object[] {Integer.valueOf(stitcher.func_110935_a()), Integer.valueOf(stitcher.func_110936_b()), this.field_94254_c}); ++ bar.step("Allocating GL texture"); + TextureUtil.func_147946_a(this.func_110552_b(), this.field_147636_j, stitcher.func_110935_a(), stitcher.func_110936_b(), (float)this.field_147637_k); + HashMap hashmap = Maps.newHashMap(this.field_110574_e); + Iterator iterator2 = stitcher.func_94309_g().iterator(); + ++ bar.step("Uploading GL texture"); + while (iterator2.hasNext()) + { + textureatlassprite = (TextureAtlasSprite)iterator2.next(); +@@ -274,6 +286,7 @@ + textureatlassprite = (TextureAtlasSprite)iterator2.next(); + textureatlassprite.func_94217_a(this.field_94249_f); + } ++ cpw.mods.fml.common.ProgressManager.pop(bar); + } + + private ResourceLocation func_147634_a(ResourceLocation p_147634_1_, int p_147634_2_) From 1fdd18398ee565efc9e292a103e56fd5d609843d Mon Sep 17 00:00:00 2001 From: cpw Date: Fri, 24 Apr 2015 19:02:54 -0400 Subject: [PATCH 25/38] Fix broken log message in vanilla. --- .../client/resources/AbstractResourcePack.java.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 fml/patches/minecraft/net/minecraft/client/resources/AbstractResourcePack.java.patch diff --git a/fml/patches/minecraft/net/minecraft/client/resources/AbstractResourcePack.java.patch b/fml/patches/minecraft/net/minecraft/client/resources/AbstractResourcePack.java.patch new file mode 100644 index 0000000000..feee903f74 --- /dev/null +++ b/fml/patches/minecraft/net/minecraft/client/resources/AbstractResourcePack.java.patch @@ -0,0 +1,11 @@ +--- ../src-base/minecraft/net/minecraft/client/resources/AbstractResourcePack.java ++++ ../src-work/minecraft/net/minecraft/client/resources/AbstractResourcePack.java +@@ -58,7 +58,7 @@ + + protected void func_110594_c(String p_110594_1_) + { +- field_110598_a.warn("ResourcePack: ignored non-lowercase namespace: %s in %s", new Object[] {p_110594_1_, this.field_110597_b}); ++ field_110598_a.warn("ResourcePack: ignored non-lowercase namespace: {} in {}", new Object[] {p_110594_1_, this.field_110597_b}); + } + + public IMetadataSection func_135058_a(IMetadataSerializer p_135058_1_, String p_135058_2_) throws IOException From 794ff1d1b48c17c70103e4ee9f6e7247a3daba9a Mon Sep 17 00:00:00 2001 From: RainWarrior Date: Sat, 25 Apr 2015 05:12:02 +0300 Subject: [PATCH 26/38] Loading screen: logo rotation is now optional; initial support for animated textures - animation rate is fixed for now. --- .../cpw/mods/fml/client/SplashProgress.java | 355 ++++++++++++------ .../resources/assets/fml/splash.properties | 3 + 2 files changed, 243 insertions(+), 115 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java index 8da1e9345b..2d4354a447 100644 --- a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java +++ b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java @@ -1,19 +1,25 @@ package cpw.mods.fml.client; +import static org.lwjgl.opengl.GL11.*; +import static org.lwjgl.opengl.GL12.*; + +import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; import java.lang.Thread.UncaughtExceptionHandler; +import java.nio.IntBuffer; import java.util.Iterator; import java.util.Properties; import java.util.concurrent.locks.Lock; import java.util.concurrent.locks.ReentrantLock; import javax.imageio.ImageIO; +import javax.imageio.ImageReader; +import javax.imageio.stream.ImageInputStream; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.FontRenderer; import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.client.renderer.texture.TextureUtil; import net.minecraft.client.resources.FileResourcePack; import net.minecraft.client.resources.FolderResourcePack; import net.minecraft.client.resources.IResourcePack; @@ -22,11 +28,13 @@ import net.minecraft.util.ResourceLocation; import org.apache.commons.io.IOUtils; import org.apache.logging.log4j.Level; +import org.lwjgl.BufferUtils; import org.lwjgl.LWJGLException; import org.lwjgl.opengl.Display; import org.lwjgl.opengl.Drawable; import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.SharedDrawable; +import org.lwjgl.util.glu.GLU; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLLog; @@ -53,17 +61,16 @@ public class SplashProgress private static final IResourcePack mcPack = Minecraft.getMinecraft().mcDefaultResourcePack; private static final IResourcePack fmlPack = createFmlResourcePack(); - private static int fontTexture; - private static ResourceLocation fontLocation = new ResourceLocation("textures/font/ascii.png"); - private static int logoTexture; - private static ResourceLocation logoLocation = new ResourceLocation("textures/gui/title/mojang.png"); - private static int forgeTexture; - private static ResourceLocation forgeLocation = new ResourceLocation("fml", "textures/gui/forge.png"); + private static Texture fontTexture; + private static Texture logoTexture; + private static Texture forgeTexture; private static ResourceLocation configLocation = new ResourceLocation("fml", "splash.properties"); private static final Properties config = loadConfig(); private static final boolean enabled = Boolean.parseBoolean(config.getProperty("enabled")); + private static final boolean rotate = Boolean.parseBoolean(config.getProperty("rotate")); + private static final int logoOffset = getInt("logoOffset"); private static final int backgroundColor = getInt("background"); private static final int fontColor = getInt("font"); private static final int barBorderColor = getInt("barBorder"); @@ -78,9 +85,9 @@ public class SplashProgress { public String call() throws Exception { - return "' Vendor: '" + GL11.glGetString(GL11.GL_VENDOR) + - "' Version: '" + GL11.glGetString(GL11.GL_VERSION) + - "' Renderer: '" + GL11.glGetString(GL11.GL_RENDERER) + + return "' Vendor: '" + glGetString(GL_VENDOR) + + "' Version: '" + glGetString(GL_VERSION) + + "' Renderer: '" + glGetString(GL_RENDERER) + "'"; } @@ -91,12 +98,6 @@ public class SplashProgress }); CrashReport report = CrashReport.makeCrashReport(new Throwable(), "Loading screen debug info"); System.out.println(report.getCompleteReport()); - fontTexture = GL11.glGenTextures(); - loadTexture(mcPack, fontTexture, fontLocation); - logoTexture = GL11.glGenTextures(); - loadTexture(mcPack, logoTexture, logoLocation); - forgeTexture = GL11.glGenTextures(); - loadTexture(fmlPack, forgeTexture, forgeLocation); try { @@ -120,6 +121,12 @@ public class SplashProgress public void run() { setGL(); + fontTexture = new Texture(mcPack, new ResourceLocation("textures/font/ascii.png")); + logoTexture = new Texture(mcPack, new ResourceLocation("textures/gui/title/mojang.png")); + forgeTexture = new Texture(fmlPack, new ResourceLocation(config.getProperty("forgeTexture"))); + glEnable(GL_TEXTURE_2D); + fontRenderer = new SplashFontRenderer(); + glDisable(GL_TEXTURE_2D); while(!done) { ProgressBar first = null, penult = null, last = null; @@ -134,72 +141,83 @@ public class SplashProgress } } - GL11.glClear(GL11.GL_COLOR_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT); // matrix setup int w = Display.getWidth(); int h = Display.getHeight(); - GL11.glViewport(0, 0, w, h); - GL11.glMatrixMode(GL11.GL_PROJECTION); - GL11.glLoadIdentity(); - GL11.glOrtho(320 - w/2, 320 + w/2, 240 + h/2, 240 - h/2, -1, 1); - GL11.glMatrixMode(GL11.GL_MODELVIEW); - GL11.glLoadIdentity(); + glViewport(0, 0, w, h); + glMatrixMode(GL_PROJECTION); + glLoadIdentity(); + glOrtho(320 - w/2, 320 + w/2, 240 + h/2, 240 - h/2, -1, 1); + glMatrixMode(GL_MODELVIEW); + glLoadIdentity(); // mojang logo setColor(backgroundColor); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glBindTexture(GL11.GL_TEXTURE_2D, logoTexture); - GL11.glBegin(GL11.GL_QUADS); - GL11.glTexCoord2f(0, 0); - GL11.glVertex2f(320 - 256, 240 - 256); - GL11.glTexCoord2f(0, 1); - GL11.glVertex2f(320 - 256, 240 + 256); - GL11.glTexCoord2f(1, 1); - GL11.glVertex2f(320 + 256, 240 + 256); - GL11.glTexCoord2f(1, 0); - GL11.glVertex2f(320 + 256, 240 - 256); - GL11.glEnd(); - GL11.glDisable(GL11.GL_TEXTURE_2D); + glEnable(GL_TEXTURE_2D); + logoTexture.bind(); + glBegin(GL_QUADS); + logoTexture.texCoord(0, 0, 0); + glVertex2f(320 - 256, 240 - 256); + logoTexture.texCoord(0, 0, 1); + glVertex2f(320 - 256, 240 + 256); + logoTexture.texCoord(0, 1, 1); + glVertex2f(320 + 256, 240 + 256); + logoTexture.texCoord(0, 1, 0); + glVertex2f(320 + 256, 240 - 256); + glEnd(); + glDisable(GL_TEXTURE_2D); // bars if(first != null) { - GL11.glPushMatrix(); - GL11.glTranslatef(320 - (float)barWidth / 2, 310, 0); + glPushMatrix(); + glTranslatef(320 - (float)barWidth / 2, 310, 0); drawBar(first); if(penult != null) { - GL11.glTranslatef(0, barOffset, 0); + glTranslatef(0, barOffset, 0); drawBar(penult); } if(last != null) { - GL11.glTranslatef(0, barOffset, 0); + glTranslatef(0, barOffset, 0); drawBar(last); } - GL11.glPopMatrix(); + glPopMatrix(); } angle += 1; // forge logo setColor(backgroundColor); - GL11.glTranslatef(680, 420, 0); - GL11.glRotatef(angle, 0, 0, 1); - GL11.glEnable(GL11.GL_TEXTURE_2D); - GL11.glBindTexture(GL11.GL_TEXTURE_2D, forgeTexture); - GL11.glBegin(GL11.GL_QUADS); - GL11.glTexCoord2f(0, 0); - GL11.glVertex2f(-50, -50); - GL11.glTexCoord2f(0, 1); - GL11.glVertex2f(-50, 50); - GL11.glTexCoord2f(1, 1); - GL11.glVertex2f(50, 50); - GL11.glTexCoord2f(1, 0); - GL11.glVertex2f(50, -50); - GL11.glEnd(); - GL11.glDisable(GL11.GL_TEXTURE_2D); + float fw = (float)forgeTexture.getWidth() / 2; + float fh = (float)forgeTexture.getHeight() / 2; + if(rotate) + { + float sh = Math.max(fw, fh); + glTranslatef(320 + w/2 - sh - logoOffset, 240 + h/2 - sh - logoOffset, 0); + glRotatef(angle, 0, 0, 1); + } + else + { + glTranslatef(320 + w/2 - fw - logoOffset, 240 + h/2 - fh - logoOffset, 0); + } + int f = (angle / 10) % forgeTexture.getFrames(); + glEnable(GL_TEXTURE_2D); + forgeTexture.bind(); + glBegin(GL_QUADS); + forgeTexture.texCoord(f, 0, 0); + glVertex2f(-fw, -fh); + forgeTexture.texCoord(f, 0, 1); + glVertex2f(-fw, fh); + forgeTexture.texCoord(f, 1, 1); + glVertex2f(fw, fh); + forgeTexture.texCoord(f, 1, 0); + glVertex2f(fw, -fh); + glEnd(); + glDisable(GL_TEXTURE_2D); Display.update(); if(pause) @@ -207,64 +225,56 @@ public class SplashProgress clearGL(); setGL(); } - try - { - Thread.sleep(10); - } - catch (InterruptedException e) - { - e.printStackTrace(); - throw new RuntimeException(e); - } + Display.sync(100); } clearGL(); } private void setColor(int color) { - GL11.glColor3ub((byte)((color >> 16) & 0xFF), (byte)((color >> 8) & 0xFF), (byte)(color & 0xFF)); + glColor3ub((byte)((color >> 16) & 0xFF), (byte)((color >> 8) & 0xFF), (byte)(color & 0xFF)); } private void drawBox(int w, int h) { - GL11.glBegin(GL11.GL_QUADS); - GL11.glVertex2f(0, 0); - GL11.glVertex2f(0, h); - GL11.glVertex2f(w, h); - GL11.glVertex2f(w, 0); - GL11.glEnd(); + glBegin(GL_QUADS); + glVertex2f(0, 0); + glVertex2f(0, h); + glVertex2f(w, h); + glVertex2f(w, 0); + glEnd(); } private void drawBar(ProgressBar b) { - GL11.glPushMatrix(); + glPushMatrix(); // title - message setColor(fontColor); - GL11.glScalef(2, 2, 1); - GL11.glEnable(GL11.GL_TEXTURE_2D); + glScalef(2, 2, 1); + glEnable(GL_TEXTURE_2D); fontRenderer.drawString(b.getTitle() + " - " + b.getMessage(), 0, 0, 0x000000); - GL11.glDisable(GL11.GL_TEXTURE_2D); - GL11.glPopMatrix(); + glDisable(GL_TEXTURE_2D); + glPopMatrix(); // border - GL11.glPushMatrix(); - GL11.glTranslatef(0, textHeight2, 0); + glPushMatrix(); + glTranslatef(0, textHeight2, 0); setColor(barBorderColor); drawBox(barWidth, barHeight); // interior setColor(barBackgroundColor); - GL11.glTranslatef(1, 1, 0); + glTranslatef(1, 1, 0); drawBox(barWidth - 2, barHeight - 2); // slidy part setColor(barColor); drawBox((barWidth - 2) * b.getStep() / b.getSteps(), barHeight - 2); // progress text String progress = "" + b.getStep() + "/" + b.getSteps(); - GL11.glTranslatef(((float)barWidth - 2) / 2 - fontRenderer.getStringWidth(progress), 2, 0); + glTranslatef(((float)barWidth - 2) / 2 - fontRenderer.getStringWidth(progress), 2, 0); setColor(fontColor); - GL11.glScalef(2, 2, 1); - GL11.glEnable(GL11.GL_TEXTURE_2D); + glScalef(2, 2, 1); + glEnable(GL_TEXTURE_2D); fontRenderer.drawString(progress, 0, 0, 0x000000); - GL11.glPopMatrix(); + glPopMatrix(); } private void setGL() @@ -279,17 +289,11 @@ public class SplashProgress e.printStackTrace(); throw new RuntimeException(e); } - GL11.glClearColor((float)((backgroundColor >> 16) & 0xFF) / 0xFF, (float)((backgroundColor >> 8) & 0xFF) / 0xFF, (float)(backgroundColor & 0xFF) / 0xFF, 1); - GL11.glDisable(GL11.GL_LIGHTING); - GL11.glDisable(GL11.GL_DEPTH_TEST); - GL11.glEnable(GL11.GL_BLEND); - GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); - GL11.glEnable(GL11.GL_TEXTURE_2D); - if(fontRenderer == null) - { - fontRenderer = new SplashFontRenderer(); - } - GL11.glDisable(GL11.GL_TEXTURE_2D); + glClearColor((float)((backgroundColor >> 16) & 0xFF) / 0xFF, (float)((backgroundColor >> 8) & 0xFF) / 0xFF, (float)(backgroundColor & 0xFF) / 0xFF, 1); + glDisable(GL_LIGHTING); + glDisable(GL_DEPTH_TEST); + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); } private void clearGL() @@ -298,11 +302,11 @@ public class SplashProgress mc.displayWidth = Display.getWidth(); mc.displayHeight = Display.getHeight(); mc.resize(mc.displayWidth, mc.displayHeight); - GL11.glClearColor(1, 1, 1, 1); - GL11.glEnable(GL11.GL_DEPTH_TEST); - GL11.glDepthFunc(GL11.GL_LEQUAL); - GL11.glEnable(GL11.GL_ALPHA_TEST); - GL11.glAlphaFunc(GL11.GL_GREATER, .1f); + glClearColor(1, 1, 1, 1); + glEnable(GL_DEPTH_TEST); + glDepthFunc(GL_LEQUAL); + glEnable(GL_ALPHA_TEST); + glAlphaFunc(GL_GREATER, .1f); try { Display.getDrawable().releaseContext(); @@ -394,9 +398,9 @@ public class SplashProgress thread.join(); d.releaseContext(); Display.getDrawable().makeCurrent(); - GL11.glDeleteTextures(fontTexture); - GL11.glDeleteTextures(logoTexture); - GL11.glDeleteTextures(forgeTexture); + fontTexture.delete(); + logoTexture.delete(); + forgeTexture.delete(); } catch (Exception e) { @@ -443,22 +447,134 @@ public class SplashProgress return Integer.decode(config.getProperty(name)); } - private static void loadTexture(IResourcePack pack, int name, ResourceLocation location) + private static final IntBuffer buf = BufferUtils.createIntBuffer(4 * 1024 * 1024); + + private static class Texture { - InputStream s = null; - try + private final ResourceLocation location; + private final int name; + private final int width; + private final int height; + private final int frames; + private final int size; + + public Texture(IResourcePack pack, ResourceLocation location) { - s = pack.getInputStream(location); - TextureUtil.uploadTextureImageAllocate(name, ImageIO.read(pack.getInputStream(location)), false, false); + InputStream s = null; + try + { + this.location = location; + s = pack.getInputStream(location); + ImageInputStream stream = ImageIO.createImageInputStream(s); + Iterator readers = ImageIO.getImageReaders(stream); + if(!readers.hasNext()) throw new IOException("No suitable reader found for image" + location); + ImageReader reader = readers.next(); + reader.setInput(stream); + frames = reader.getNumImages(true); + BufferedImage[] images = new BufferedImage[frames]; + for(int i = 0; i < frames; i++) + { + images[i] = reader.read(i); + } + reader.dispose(); + int size = 1; + width = images[0].getWidth(); + height = images[0].getHeight(); + while((size / width) * (size / height) < frames) size *= 2; + this.size = size; + name = glGenTextures(); + glEnable(GL_TEXTURE_2D); + glBindTexture(GL_TEXTURE_2D, name); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); + glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); + glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, (IntBuffer)null); + checkGLError("Texture creation"); + for(int i = 0; i * (size / width) < frames; i++) + { + for(int j = 0; i * (size / width) + j < frames && j < size / width; j++) + { + FMLLog.info("loc: %s, i: %s, j: %s, size: %s, width: %s, height: %s", location, i, j, size, width, height); + buf.clear(); + BufferedImage image = images[i * (size / width) + j]; + for(int k = 0; k < height; k++) + { + for(int l = 0; l < width; l++) + { + buf.put(image.getRGB(l, k)); + } + } + buf.position(0).limit(width * height); + glTexSubImage2D(GL_TEXTURE_2D, 0, j * width, i * height, width, height, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, buf); + checkGLError("Texture uploading"); + } + } + glBindTexture(GL_TEXTURE_2D, 0); + glDisable(GL_TEXTURE_2D); + } + catch(IOException e) + { + e.printStackTrace(); + throw new RuntimeException(e); + } + finally + { + IOUtils.closeQuietly(s); + } } - catch(IOException e) + + public ResourceLocation getLocation() { - e.printStackTrace(); - throw new RuntimeException(e); + return location; } - finally + + public int getName() { - IOUtils.closeQuietly(s); + return name; + } + + public int getWidth() + { + return width; + } + + public int getHeight() + { + return height; + } + + public int getFrames() + { + return frames; + } + + public int getSize() + { + return size; + } + + public void bind() + { + glBindTexture(GL_TEXTURE_2D, name); + } + + public void delete() + { + glDeleteTextures(name); + } + + public float getU(int frame, float u) + { + return width * (frame % (size / width) + u) / size; + } + + public float getV(int frame, float v) + { + return height * (frame / (size / width) + v) / size; + } + + public void texCoord(int frame, float u, float v) + { + glTexCoord2f(getU(frame, u), getV(frame, v)); } } @@ -466,7 +582,7 @@ public class SplashProgress { public SplashFontRenderer() { - super(Minecraft.getMinecraft().gameSettings, fontLocation, null, false); + super(Minecraft.getMinecraft().gameSettings, fontTexture.getLocation(), null, false); super.onResourceManagerReload(null); } @@ -474,7 +590,7 @@ public class SplashProgress protected void bindTexture(ResourceLocation location) { if(location != locationFontTexture) throw new IllegalArgumentException(); - GL11.glBindTexture(GL11.GL_TEXTURE_2D, fontTexture); + fontTexture.bind(); } @Override @@ -499,4 +615,13 @@ public class SplashProgress renderEngine.deleteTexture(mojangLogo); } } + + public static void checkGLError(String where) + { + int err = GL11.glGetError(); + if (err != 0) + { + throw new IllegalStateException(where + ": " + GLU.gluErrorString(err)); + } + } } diff --git a/fml/src/main/resources/assets/fml/splash.properties b/fml/src/main/resources/assets/fml/splash.properties index 84ec356723..4cfb4f5d85 100644 --- a/fml/src/main/resources/assets/fml/splash.properties +++ b/fml/src/main/resources/assets/fml/splash.properties @@ -1,5 +1,8 @@ enabled = true +rotate = true +forgeTexture = fml:textures/gui/forge.png +logoOffset = 10 background = 0xFFFFFF font = 0x000000 barBorder = 0xC0C0C0 From 4e6aa905f0e262ad76288d65bda1ad52713e1eba Mon Sep 17 00:00:00 2001 From: cpw Date: Sat, 25 Apr 2015 00:41:50 -0400 Subject: [PATCH 27/38] Fix trying to close the screen during error. --- .../main/java/cpw/mods/fml/client/FMLClientHandler.java | 8 ++++++-- fml/src/main/java/cpw/mods/fml/client/GuiModsMissing.java | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java index ae3d2644c6..42a2027b1d 100644 --- a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java @@ -394,10 +394,10 @@ public class FMLClientHandler implements IFMLSidedHandler } else { + Loader.instance().loadingComplete(); + SplashProgress.finish(); } logMissingTextureErrors(); - Loader.instance().loadingComplete(); - SplashProgress.finish(); } /** * Get the server instance @@ -921,6 +921,10 @@ public class FMLClientHandler implements IFMLSidedHandler public void logMissingTextureErrors() { + if (missingTextures.isEmpty() && brokenTextures.isEmpty()) + { + return; + } Logger logger = LogManager.getLogger("TEXTURE ERRORS"); logger.error(Strings.repeat("+=", 25)); logger.error("The following texture errors were found."); diff --git a/fml/src/main/java/cpw/mods/fml/client/GuiModsMissing.java b/fml/src/main/java/cpw/mods/fml/client/GuiModsMissing.java index 9edb54fcea..964d7941fd 100644 --- a/fml/src/main/java/cpw/mods/fml/client/GuiModsMissing.java +++ b/fml/src/main/java/cpw/mods/fml/client/GuiModsMissing.java @@ -58,6 +58,6 @@ public class GuiModsMissing extends GuiErrorScreen this.drawCenteredString(this.fontRendererObj, String.format("%s : %s", v.getLabel(), v.getRangeString()), this.width / 2, offset, 0xEEEEEE); } offset+=20; - this.drawCenteredString(this.fontRendererObj, "The file 'ForgeModLoader-client-0.log' contains more information", this.width / 2, offset, 0xFFFFFF); + this.drawCenteredString(this.fontRendererObj, "The file 'logs/fml-client-latest.log' contains more information", this.width / 2, offset, 0xFFFFFF); } } From 89daceb9eb851b1fa1c8fd64da6713da32142fd7 Mon Sep 17 00:00:00 2001 From: cpw Date: Sat, 25 Apr 2015 01:30:17 -0400 Subject: [PATCH 28/38] Add a config file that lets you add additional soft dependencies at runtime - injectedDependencies.json Example here: https://gist.github.com/cpw/d3edc292631708f2d454 --- .../cpw/mods/fml/common/FMLModContainer.java | 2 + .../main/java/cpw/mods/fml/common/Loader.java | 66 +++++++++++++++++++ 2 files changed, 68 insertions(+) diff --git a/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java b/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java index d85fb473b6..3aa77503c4 100644 --- a/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java +++ b/fml/src/main/java/cpw/mods/fml/common/FMLModContainer.java @@ -164,6 +164,8 @@ public class FMLModContainer implements ModContainer List dependants = Lists.newArrayList(); annotationDependencies = (String) descriptor.get("dependencies"); Loader.instance().computeDependencies(annotationDependencies, requirements, dependencies, dependants); + dependants.addAll(Loader.instance().getInjectedBefore(getModId())); + dependencies.addAll(Loader.instance().getInjectedAfter(getModId())); modMetadata.requiredMods = requirements; modMetadata.dependencies = dependencies; modMetadata.dependants = dependants; diff --git a/fml/src/main/java/cpw/mods/fml/common/Loader.java b/fml/src/main/java/cpw/mods/fml/common/Loader.java index ece0458dae..19cb52c86f 100644 --- a/fml/src/main/java/cpw/mods/fml/common/Loader.java +++ b/fml/src/main/java/cpw/mods/fml/common/Loader.java @@ -13,6 +13,7 @@ package cpw.mods.fml.common; import java.io.File; +import java.io.FileNotFoundException; import java.io.FileReader; import java.io.FileWriter; import java.io.IOException; @@ -35,6 +36,7 @@ import com.google.common.base.Splitter; import com.google.common.collect.ArrayListMultimap; import com.google.common.collect.BiMap; import com.google.common.collect.HashBiMap; +import com.google.common.collect.HashMultimap; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableMultiset; @@ -50,8 +52,17 @@ import com.google.common.collect.Ordering; import com.google.common.collect.SetMultimap; import com.google.common.collect.Sets; import com.google.common.collect.TreeMultimap; +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; +import com.google.gson.JsonArray; +import com.google.gson.JsonElement; +import com.google.gson.JsonIOException; +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.google.gson.JsonSyntaxException; import cpw.mods.fml.common.LoaderState.ModState; +import cpw.mods.fml.common.MetadataCollection.ArtifactVersionAdapter; import cpw.mods.fml.common.ModContainer.Disableable; import cpw.mods.fml.common.ProgressManager.ProgressBar; import cpw.mods.fml.common.discovery.ModDiscoverer; @@ -450,6 +461,8 @@ public class Loader FMLLog.severe("Attempting to load configuration from %s, which is not a directory", canonicalConfigPath); throw new LoaderException(); } + + readInjectedDependencies(); } public List getModList() @@ -994,4 +1007,57 @@ public class Loader ProgressManager.pop(progressBar); progressBar = null; } + + private ListMultimap injectedBefore = ArrayListMultimap.create(); + private ListMultimap injectedAfter = ArrayListMultimap.create(); + + private void readInjectedDependencies() + { + File injectedDepFile = new File(getConfigDir(),"injectedDependencies.json"); + if (!injectedDepFile.exists()) + { + FMLLog.getLogger().log(Level.DEBUG, "File {} not found. No dependencies injected", injectedDepFile.getAbsolutePath()); + return; + } + JsonParser parser = new JsonParser(); + JsonElement injectedDeps; + try + { + injectedDeps = parser.parse(new FileReader(injectedDepFile)); + for (JsonElement el : injectedDeps.getAsJsonArray()) + { + JsonObject jo = el.getAsJsonObject(); + String modId = jo.get("modId").getAsString(); + JsonArray deps = jo.get("deps").getAsJsonArray(); + for (JsonElement dep : deps) + { + JsonObject depObj = dep.getAsJsonObject(); + String type = depObj.get("type").getAsString(); + if (type.equals("before")) { + injectedBefore.put(modId, VersionParser.parseVersionReference(depObj.get("target").getAsString())); + } else if (type.equals("after")) { + injectedAfter.put(modId, VersionParser.parseVersionReference(depObj.get("target").getAsString())); + } else { + FMLLog.getLogger().log(Level.ERROR, "Invalid dependency type {}", type); + throw new RuntimeException("Unable to parse type"); + } + } + } + } catch (Exception e) + { + FMLLog.getLogger().log(Level.ERROR, "Unable to parse {} - skipping", injectedDepFile); + FMLLog.getLogger().throwing(Level.ERROR, e); + return; + } + FMLLog.getLogger().log(Level.DEBUG, "Loaded {} injected dependencies on modIds: {}", injectedBefore.size(), injectedBefore.keySet()); + } + + List getInjectedBefore(String modId) + { + return injectedBefore.get(modId); + } + List getInjectedAfter(String modId) + { + return injectedAfter.get(modId); + } } From 46c55055652dc1a9c13cb176b22ecfab5f4c34b9 Mon Sep 17 00:00:00 2001 From: cpw Date: Sat, 25 Apr 2015 15:05:28 -0400 Subject: [PATCH 29/38] Splash progress screen will not load in the presence of optifine anymore. --- .../cpw/mods/fml/client/FMLClientHandler.java | 31 +++++++++++-------- .../cpw/mods/fml/client/SplashProgress.java | 2 +- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java index 42a2027b1d..5a41a7245c 100644 --- a/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java +++ b/fml/src/main/java/cpw/mods/fml/client/FMLClientHandler.java @@ -187,6 +187,7 @@ public class FMLClientHandler implements IFMLSidedHandler @SuppressWarnings("unchecked") public void beginMinecraftLoading(Minecraft minecraft, @SuppressWarnings("rawtypes") List resourcePackList, IReloadableResourceManager resourceManager) { + detectOptifine(); SplashProgress.start(); client = minecraft; this.resourcePackList = resourcePackList; @@ -201,19 +202,6 @@ public class FMLClientHandler implements IFMLSidedHandler FMLCommonHandler.instance().beginLoading(this); try - { - Class optifineConfig = Class.forName("Config", false, Loader.instance().getModClassLoader()); - String optifineVersion = (String) optifineConfig.getField("VERSION").get(null); - Map dummyOptifineMeta = ImmutableMap.builder().put("name", "Optifine").put("version", optifineVersion).build(); - ModMetadata optifineMetadata = MetadataCollection.from(getClass().getResourceAsStream("optifinemod.info"),"optifine").getMetadataForId("optifine", dummyOptifineMeta); - optifineContainer = new DummyModContainer(optifineMetadata); - FMLLog.info("Forge Mod Loader has detected optifine %s, enabling compatibility features",optifineContainer.getVersion()); - } - catch (Exception e) - { - optifineContainer = null; - } - try { Loader.instance().loadMods(); } @@ -279,6 +267,23 @@ public class FMLClientHandler implements IFMLSidedHandler } } + private void detectOptifine() + { + try + { + Class optifineConfig = Class.forName("Config", false, Loader.instance().getModClassLoader()); + String optifineVersion = (String) optifineConfig.getField("VERSION").get(null); + Map dummyOptifineMeta = ImmutableMap.builder().put("name", "Optifine").put("version", optifineVersion).build(); + ModMetadata optifineMetadata = MetadataCollection.from(getClass().getResourceAsStream("optifinemod.info"),"optifine").getMetadataForId("optifine", dummyOptifineMeta); + optifineContainer = new DummyModContainer(optifineMetadata); + FMLLog.info("Forge Mod Loader has detected optifine %s, enabling compatibility features",optifineContainer.getVersion()); + } + catch (Exception e) + { + optifineContainer = null; + } + } + @Override public void haltGame(String message, Throwable t) { diff --git a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java index 2d4354a447..defb8dfe75 100644 --- a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java +++ b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java @@ -68,7 +68,7 @@ public class SplashProgress private static ResourceLocation configLocation = new ResourceLocation("fml", "splash.properties"); private static final Properties config = loadConfig(); - private static final boolean enabled = Boolean.parseBoolean(config.getProperty("enabled")); + private static final boolean enabled = Boolean.parseBoolean(config.getProperty("enabled")) && ! FMLClientHandler.instance().hasOptifine(); private static final boolean rotate = Boolean.parseBoolean(config.getProperty("rotate")); private static final int logoOffset = getInt("logoOffset"); private static final int backgroundColor = getInt("background"); From 626a192ce6dd86768109ecafe88fba60f154d5a7 Mon Sep 17 00:00:00 2001 From: RainWarrior Date: Sun, 26 Apr 2015 00:11:29 +0300 Subject: [PATCH 30/38] Loading screen: moved config file to the standard config directory; added the option to load textures from the custom resource pack --- .../cpw/mods/fml/client/SplashProgress.java | 155 ++++++++++++------ .../resources/assets/fml/splash.properties | 10 -- 2 files changed, 108 insertions(+), 57 deletions(-) delete mode 100644 fml/src/main/resources/assets/fml/splash.properties diff --git a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java index defb8dfe75..2e6dd0e060 100644 --- a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java +++ b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java @@ -4,6 +4,9 @@ import static org.lwjgl.opengl.GL11.*; import static org.lwjgl.opengl.GL12.*; import java.awt.image.BufferedImage; +import java.io.File; +import java.io.FileReader; +import java.io.FileWriter; import java.io.IOException; import java.io.InputStream; import java.lang.Thread.UncaughtExceptionHandler; @@ -39,6 +42,7 @@ import org.lwjgl.util.glu.GLU; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLLog; import cpw.mods.fml.common.ICrashCallable; +import cpw.mods.fml.common.Loader; import cpw.mods.fml.common.ProgressManager; import cpw.mods.fml.common.ProgressManager.ProgressBar; import cpw.mods.fml.common.asm.FMLSanityChecker; @@ -59,26 +63,97 @@ public class SplashProgress private static SplashFontRenderer fontRenderer; private static final IResourcePack mcPack = Minecraft.getMinecraft().mcDefaultResourcePack; - private static final IResourcePack fmlPack = createFmlResourcePack(); + private static final IResourcePack fmlPack = createResourcePack(FMLSanityChecker.fmlLocation); + private static IResourcePack miscPack; private static Texture fontTexture; private static Texture logoTexture; private static Texture forgeTexture; - private static ResourceLocation configLocation = new ResourceLocation("fml", "splash.properties"); - private static final Properties config = loadConfig(); + private static Properties config; - private static final boolean enabled = Boolean.parseBoolean(config.getProperty("enabled")) && ! FMLClientHandler.instance().hasOptifine(); - private static final boolean rotate = Boolean.parseBoolean(config.getProperty("rotate")); - private static final int logoOffset = getInt("logoOffset"); - private static final int backgroundColor = getInt("background"); - private static final int fontColor = getInt("font"); - private static final int barBorderColor = getInt("barBorder"); - private static final int barColor = getInt("bar"); - private static final int barBackgroundColor = getInt("barBackground"); + private static boolean enabled; + private static boolean rotate; + private static int logoOffset; + private static int backgroundColor; + private static int fontColor; + private static int barBorderColor; + private static int barColor; + private static int barBackgroundColor; + + private static String getString(String name, String def) + { + String value = config.getProperty(name, def); + config.setProperty(name, value); + return value; + } + + private static boolean getBool(String name, boolean def) + { + return Boolean.parseBoolean(getString(name, Boolean.toString(def))); + } + + private static int getInt(String name, int def) + { + return Integer.decode(getString(name, Integer.toString(def))); + } + + private static int getHex(String name, int def) + { + return Integer.decode(getString(name, "0x" + Integer.toString(def, 16).toUpperCase())); + } public static void start() { + File configFile = new File(Minecraft.getMinecraft().mcDataDir, "config/splash.properties"); + FileReader r = null; + config = new Properties(); + try + { + r = new FileReader(configFile); + config.load(r); + } + catch(IOException e) + { + FMLLog.info("Could not load splash.properties, will create a default one"); + } + finally + { + IOUtils.closeQuietly(r); + } + + enabled = getBool("enabled", true) && !FMLClientHandler.instance().hasOptifine(); + rotate = getBool("rotate", true); + logoOffset = getInt("logoOffset", 10); + backgroundColor = getHex("background", 0xFFFFFF); + fontColor = getHex("font", 0x000000); + barBorderColor = getHex("barBorder", 0xC0C0C0); + barColor = getHex("bar", 0xCB3D35); + barBackgroundColor = getHex("barBackground", 0xFFFFFF); + + final ResourceLocation fontLoc = new ResourceLocation(getString("fontTexture", "textures/font/ascii.png")); + final ResourceLocation logoLoc = new ResourceLocation(getString("logoTexture", "textures/gui/title/mojang.png")); + final ResourceLocation forgeLoc = new ResourceLocation(getString("forgeTexture", "fml:textures/gui/forge.png")); + + File miscPackFile = new File(Minecraft.getMinecraft().mcDataDir, getString("resourcePackPath", "resources")); + + FileWriter w = null; + try + { + w = new FileWriter(configFile); + config.store(w, "Splash screen properties"); + } + catch(IOException e) + { + FMLLog.log(Level.ERROR, e, "Could not save the splash.properties file"); + } + finally + { + IOUtils.closeQuietly(w); + } + + miscPack = createResourcePack(miscPackFile); + if(!enabled) return; // getting debug info out of the way, while we still can FMLCommonHandler.instance().registerCrashCallable(new ICrashCallable() @@ -121,9 +196,9 @@ public class SplashProgress public void run() { setGL(); - fontTexture = new Texture(mcPack, new ResourceLocation("textures/font/ascii.png")); - logoTexture = new Texture(mcPack, new ResourceLocation("textures/gui/title/mojang.png")); - forgeTexture = new Texture(fmlPack, new ResourceLocation(config.getProperty("forgeTexture"))); + fontTexture = new Texture(fontLoc); + logoTexture = new Texture(logoLoc); + forgeTexture = new Texture(forgeLoc); glEnable(GL_TEXTURE_2D); fontRenderer = new SplashFontRenderer(); glDisable(GL_TEXTURE_2D); @@ -409,44 +484,18 @@ public class SplashProgress } } - private static IResourcePack createFmlResourcePack() + private static IResourcePack createResourcePack(File file) { - if(FMLSanityChecker.fmlLocation.isDirectory()) + if(file.isDirectory()) { - return new FolderResourcePack(FMLSanityChecker.fmlLocation); + return new FolderResourcePack(file); } else { - return new FileResourcePack(FMLSanityChecker.fmlLocation); + return new FileResourcePack(file); } } - private static Properties loadConfig() - { - InputStream s = null; - try - { - s = fmlPack.getInputStream(configLocation); - Properties config = new Properties(); - config.load(s); - return config; - } - catch(IOException e) - { - e.printStackTrace(); - throw new RuntimeException(e); - } - finally - { - IOUtils.closeQuietly(s); - } - } - - private static int getInt(String name) - { - return Integer.decode(config.getProperty(name)); - } - private static final IntBuffer buf = BufferUtils.createIntBuffer(4 * 1024 * 1024); private static class Texture @@ -458,13 +507,13 @@ public class SplashProgress private final int frames; private final int size; - public Texture(IResourcePack pack, ResourceLocation location) + public Texture(ResourceLocation location) { InputStream s = null; try { this.location = location; - s = pack.getInputStream(location); + s = open(location); ImageInputStream stream = ImageIO.createImageInputStream(s); Iterator readers = ImageIO.getImageReaders(stream); if(!readers.hasNext()) throw new IOException("No suitable reader found for image" + location); @@ -493,7 +542,6 @@ public class SplashProgress { for(int j = 0; i * (size / width) + j < frames && j < size / width; j++) { - FMLLog.info("loc: %s, i: %s, j: %s, size: %s, width: %s, height: %s", location, i, j, size, width, height); buf.clear(); BufferedImage image = images[i * (size / width) + j]; for(int k = 0; k < height; k++) @@ -624,4 +672,17 @@ public class SplashProgress throw new IllegalStateException(where + ": " + GLU.gluErrorString(err)); } } + + private static InputStream open(ResourceLocation loc) throws IOException + { + if(miscPack.resourceExists(loc)) + { + return miscPack.getInputStream(loc); + } + else if(fmlPack.resourceExists(loc)) + { + return fmlPack.getInputStream(loc); + } + return mcPack.getInputStream(loc); + } } diff --git a/fml/src/main/resources/assets/fml/splash.properties b/fml/src/main/resources/assets/fml/splash.properties deleted file mode 100644 index 4cfb4f5d85..0000000000 --- a/fml/src/main/resources/assets/fml/splash.properties +++ /dev/null @@ -1,10 +0,0 @@ -enabled = true -rotate = true - -forgeTexture = fml:textures/gui/forge.png -logoOffset = 10 -background = 0xFFFFFF -font = 0x000000 -barBorder = 0xC0C0C0 -bar = 0xCB3D35 -barBackground = 0xFFFFFF From aad4678d40d3295ba2367c51ae8e1d3527eeb4c6 Mon Sep 17 00:00:00 2001 From: luacs1998 Date: Sun, 26 Apr 2015 20:14:35 +0800 Subject: [PATCH 31/38] Add classloader exclusion for ASM --- .../main/java/cpw/mods/fml/common/launcher/FMLServerTweaker.java | 1 + fml/src/main/java/cpw/mods/fml/common/launcher/FMLTweaker.java | 1 + 2 files changed, 2 insertions(+) diff --git a/fml/src/main/java/cpw/mods/fml/common/launcher/FMLServerTweaker.java b/fml/src/main/java/cpw/mods/fml/common/launcher/FMLServerTweaker.java index 2c24296249..a74693061d 100644 --- a/fml/src/main/java/cpw/mods/fml/common/launcher/FMLServerTweaker.java +++ b/fml/src/main/java/cpw/mods/fml/common/launcher/FMLServerTweaker.java @@ -16,6 +16,7 @@ public class FMLServerTweaker extends FMLTweaker { // The mojang packages are excluded so the log4j2 queue is correctly visible from // the obfuscated and deobfuscated parts of the code. Without, the UI won't show anything classLoader.addClassLoaderExclusion("com.mojang."); + classLoader.addClassLoaderExclusion("org.objectweb.asm."); classLoader.addTransformerExclusion("cpw.mods.fml.repackage."); classLoader.addTransformerExclusion("cpw.mods.fml.relauncher."); classLoader.addTransformerExclusion("cpw.mods.fml.common.asm.transformers."); diff --git a/fml/src/main/java/cpw/mods/fml/common/launcher/FMLTweaker.java b/fml/src/main/java/cpw/mods/fml/common/launcher/FMLTweaker.java index bd1e2e2f3d..3cb89af757 100644 --- a/fml/src/main/java/cpw/mods/fml/common/launcher/FMLTweaker.java +++ b/fml/src/main/java/cpw/mods/fml/common/launcher/FMLTweaker.java @@ -119,6 +119,7 @@ public class FMLTweaker implements ITweaker { { classLoader.addClassLoaderExclusion("org.apache."); classLoader.addClassLoaderExclusion("com.google.common."); + classLoader.addClassLoaderExclusion("org.objectweb.asm."); classLoader.addTransformerExclusion("cpw.mods.fml.repackage."); classLoader.addTransformerExclusion("cpw.mods.fml.relauncher."); classLoader.addTransformerExclusion("cpw.mods.fml.common.asm.transformers."); From ddc6b0a19fa084bb80c3b31e261a3863246e2525 Mon Sep 17 00:00:00 2001 From: cpw Date: Sun, 26 Apr 2015 10:22:48 -0400 Subject: [PATCH 32/38] Synchronize the available libraries. Turns out we've been forcing a newer apache commons-lang(3.2.1) for a long time, also sync the dev guava - we've been forcing 17 for a long time too. Bumping commons-lang to 3.3.2 since that's what Mojang are shipping with 1.8. It has no observable ill effects Closes #651 --- fml/jsons/1.7.10-dev.json | 4 ++-- fml/jsons/1.7.10-rel.json | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fml/jsons/1.7.10-dev.json b/fml/jsons/1.7.10-dev.json index 56c2dd3e97..02ab3de1e3 100644 --- a/fml/jsons/1.7.10-dev.json +++ b/fml/jsons/1.7.10-dev.json @@ -126,10 +126,10 @@ "name": "io.netty:netty-all:4.0.10.Final" }, { - "name": "com.google.guava:guava:16.0" + "name": "com.google.guava:guava:17.0" }, { - "name": "org.apache.commons:commons-lang3:3.2.1" + "name": "org.apache.commons:commons-lang3:3.3.2" }, { "name": "commons-io:commons-io:2.4" diff --git a/fml/jsons/1.7.10-rel.json b/fml/jsons/1.7.10-rel.json index cfed477443..a13bfc3ff2 100644 --- a/fml/jsons/1.7.10-rel.json +++ b/fml/jsons/1.7.10-rel.json @@ -122,6 +122,10 @@ { "name": "com.google.guava:guava:17.0", "serverreq":true + }, + { + "name": "org.apache.commons:commons-lang3:3.3.2", + "serverreq":true } ] } From 858c64ffd3e10c67f021390f5ecb68a52f622a77 Mon Sep 17 00:00:00 2001 From: cpw Date: Wed, 29 Apr 2015 08:15:35 -0400 Subject: [PATCH 33/38] Optifine can tell us when they're ready for the new splash screen. --- fml/src/main/java/cpw/mods/fml/client/SplashProgress.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java index 2e6dd0e060..72e6fc41d6 100644 --- a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java +++ b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java @@ -27,6 +27,7 @@ import net.minecraft.client.resources.FileResourcePack; import net.minecraft.client.resources.FolderResourcePack; import net.minecraft.client.resources.IResourcePack; import net.minecraft.crash.CrashReport; +import net.minecraft.launchwrapper.Launch; import net.minecraft.util.ResourceLocation; import org.apache.commons.io.IOUtils; @@ -105,7 +106,7 @@ public class SplashProgress public static void start() { - File configFile = new File(Minecraft.getMinecraft().mcDataDir, "config/splash.properties"); + File configFile = new File(Loader.instance().getConfigDir(),"splash.properties"); FileReader r = null; config = new Properties(); try @@ -122,7 +123,9 @@ public class SplashProgress IOUtils.closeQuietly(r); } - enabled = getBool("enabled", true) && !FMLClientHandler.instance().hasOptifine(); + // Enable if we have the flag, and there's either no optifine, or optifine has added a key to the blackboard ("optifine.ForgeSplashCompatible") + // Optifine authors - add this key to the blackboard if you feel your modifications are now compatible with this code. + enabled = getBool("enabled", true) && ( (!FMLClientHandler.instance().hasOptifine()) || Launch.blackboard.containsKey("optifine.ForgeSplashCompatible")); rotate = getBool("rotate", true); logoOffset = getInt("logoOffset", 10); backgroundColor = getHex("background", 0xFFFFFF); From c43e4a80229bcbe985a34b7b495b74b6100ebbf3 Mon Sep 17 00:00:00 2001 From: cpw Date: Sat, 2 May 2015 22:13:41 -0400 Subject: [PATCH 34/38] Fix the ordering of the messages, so they make sense now. --- fml/src/main/java/cpw/mods/fml/common/Loader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/Loader.java b/fml/src/main/java/cpw/mods/fml/common/Loader.java index 19cb52c86f..687777baf7 100644 --- a/fml/src/main/java/cpw/mods/fml/common/Loader.java +++ b/fml/src/main/java/cpw/mods/fml/common/Loader.java @@ -532,7 +532,6 @@ public class Loader ObjectHolderRegistry.INSTANCE.findObjectHolders(discoverer.getASMTable()); modController.distributeStateMessage(LoaderState.PREINITIALIZATION, discoverer.getASMTable(), canonicalConfigDir); ObjectHolderRegistry.INSTANCE.applyObjectHolders(); - progressBar.step("Initializing mods Phase 2"); modController.transition(LoaderState.INITIALIZATION, false); progressBar.step("Initializing Minecraft Engine"); } @@ -709,6 +708,7 @@ public class Loader public void initializeMods() { + progressBar.step("Initializing mods Phase 2"); // Mod controller should be in the initialization state here modController.distributeStateMessage(LoaderState.INITIALIZATION); progressBar.step("Initializing mods Phase 3"); From 65ab79cf694cf755294fe6934faa8f864da045a3 Mon Sep 17 00:00:00 2001 From: cpw Date: Mon, 4 May 2015 08:49:46 -0400 Subject: [PATCH 35/38] Revert "Merge pull request #650 from luacs1998/1.7.10" This undoes the seriously broken change from Sponge to support Mixins, that breaks a wide variety of coremods. Given the widespread incompatibility it introduces, it won't be re-added at 1.7.10. This reverts commit 8ccfa24764a3f4854f5334c0da1224286175e13b, reversing changes made to 7c10b93a2ded2799d41b73b67a2766c31e992d8a. --- .../main/java/cpw/mods/fml/common/launcher/FMLServerTweaker.java | 1 - fml/src/main/java/cpw/mods/fml/common/launcher/FMLTweaker.java | 1 - 2 files changed, 2 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/launcher/FMLServerTweaker.java b/fml/src/main/java/cpw/mods/fml/common/launcher/FMLServerTweaker.java index a74693061d..2c24296249 100644 --- a/fml/src/main/java/cpw/mods/fml/common/launcher/FMLServerTweaker.java +++ b/fml/src/main/java/cpw/mods/fml/common/launcher/FMLServerTweaker.java @@ -16,7 +16,6 @@ public class FMLServerTweaker extends FMLTweaker { // The mojang packages are excluded so the log4j2 queue is correctly visible from // the obfuscated and deobfuscated parts of the code. Without, the UI won't show anything classLoader.addClassLoaderExclusion("com.mojang."); - classLoader.addClassLoaderExclusion("org.objectweb.asm."); classLoader.addTransformerExclusion("cpw.mods.fml.repackage."); classLoader.addTransformerExclusion("cpw.mods.fml.relauncher."); classLoader.addTransformerExclusion("cpw.mods.fml.common.asm.transformers."); diff --git a/fml/src/main/java/cpw/mods/fml/common/launcher/FMLTweaker.java b/fml/src/main/java/cpw/mods/fml/common/launcher/FMLTweaker.java index 3cb89af757..bd1e2e2f3d 100644 --- a/fml/src/main/java/cpw/mods/fml/common/launcher/FMLTweaker.java +++ b/fml/src/main/java/cpw/mods/fml/common/launcher/FMLTweaker.java @@ -119,7 +119,6 @@ public class FMLTweaker implements ITweaker { { classLoader.addClassLoaderExclusion("org.apache."); classLoader.addClassLoaderExclusion("com.google.common."); - classLoader.addClassLoaderExclusion("org.objectweb.asm."); classLoader.addTransformerExclusion("cpw.mods.fml.repackage."); classLoader.addTransformerExclusion("cpw.mods.fml.relauncher."); classLoader.addTransformerExclusion("cpw.mods.fml.common.asm.transformers."); From fb18c07722d1aa0b10e7944bf5f25958ebddde4e Mon Sep 17 00:00:00 2001 From: RainWarrior Date: Mon, 4 May 2015 21:53:39 +0300 Subject: [PATCH 36/38] Eliminated texture name allocation race condition --- .../client/renderer/texture/TextureUtil.java.patch | 14 ++++++++++++++ .../java/cpw/mods/fml/client/SplashProgress.java | 7 +++++-- 2 files changed, 19 insertions(+), 2 deletions(-) create mode 100644 fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java.patch diff --git a/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java.patch b/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java.patch new file mode 100644 index 0000000000..8f7a190884 --- /dev/null +++ b/fml/patches/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java.patch @@ -0,0 +1,14 @@ +--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java ++++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java +@@ -201,8 +201,11 @@ + + public static void func_147946_a(int p_147946_0_, int p_147946_1_, int p_147946_2_, int p_147946_3_, float p_147946_4_) + { ++ synchronized(cpw.mods.fml.client.SplashProgress.class) ++ { + func_147942_a(p_147946_0_); + func_94277_a(p_147946_0_); ++ } + + if (OpenGlHelper.field_148825_d) + { diff --git a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java index 72e6fc41d6..3a9eb86688 100644 --- a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java +++ b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java @@ -534,9 +534,12 @@ public class SplashProgress height = images[0].getHeight(); while((size / width) * (size / height) < frames) size *= 2; this.size = size; - name = glGenTextures(); glEnable(GL_TEXTURE_2D); - glBindTexture(GL_TEXTURE_2D, name); + synchronized(SplashProgress.class) + { + name = glGenTextures(); + glBindTexture(GL_TEXTURE_2D, name); + } glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, size, size, 0, GL_BGRA, GL_UNSIGNED_INT_8_8_8_8_REV, (IntBuffer)null); From c28794fe3868ca7bed507b4fa712a737c5f2c167 Mon Sep 17 00:00:00 2001 From: RainWarrior Date: Mon, 4 May 2015 22:10:36 +0300 Subject: [PATCH 37/38] Updated default forge logo to animated gif; reverted config folder resolution to Minecraft class due to Loader not being initialized at the point it's needed --- .../cpw/mods/fml/client/SplashProgress.java | 8 ++++---- .../resources/assets/fml/textures/gui/forge.gif | Bin 0 -> 65685 bytes 2 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 fml/src/main/resources/assets/fml/textures/gui/forge.gif diff --git a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java index 3a9eb86688..62e672aed2 100644 --- a/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java +++ b/fml/src/main/java/cpw/mods/fml/client/SplashProgress.java @@ -106,7 +106,7 @@ public class SplashProgress public static void start() { - File configFile = new File(Loader.instance().getConfigDir(),"splash.properties"); + File configFile = new File(Minecraft.getMinecraft().mcDataDir, "config/splash.properties"); FileReader r = null; config = new Properties(); try @@ -126,8 +126,8 @@ public class SplashProgress // Enable if we have the flag, and there's either no optifine, or optifine has added a key to the blackboard ("optifine.ForgeSplashCompatible") // Optifine authors - add this key to the blackboard if you feel your modifications are now compatible with this code. enabled = getBool("enabled", true) && ( (!FMLClientHandler.instance().hasOptifine()) || Launch.blackboard.containsKey("optifine.ForgeSplashCompatible")); - rotate = getBool("rotate", true); - logoOffset = getInt("logoOffset", 10); + rotate = getBool("rotate", false); + logoOffset = getInt("logoOffset", 0); backgroundColor = getHex("background", 0xFFFFFF); fontColor = getHex("font", 0x000000); barBorderColor = getHex("barBorder", 0xC0C0C0); @@ -136,7 +136,7 @@ public class SplashProgress final ResourceLocation fontLoc = new ResourceLocation(getString("fontTexture", "textures/font/ascii.png")); final ResourceLocation logoLoc = new ResourceLocation(getString("logoTexture", "textures/gui/title/mojang.png")); - final ResourceLocation forgeLoc = new ResourceLocation(getString("forgeTexture", "fml:textures/gui/forge.png")); + final ResourceLocation forgeLoc = new ResourceLocation(getString("forgeTexture", "fml:textures/gui/forge.gif")); File miscPackFile = new File(Minecraft.getMinecraft().mcDataDir, getString("resourcePackPath", "resources")); diff --git a/fml/src/main/resources/assets/fml/textures/gui/forge.gif b/fml/src/main/resources/assets/fml/textures/gui/forge.gif new file mode 100644 index 0000000000000000000000000000000000000000..b316837fb7e956ba33a55d0648d6b9e1838b9980 GIT binary patch literal 65685 zcmeF(MO2(oy6F8XTtX<^-Q7JQxVyW%JB1hS?i$?P-3bmMxCVC#!3lv&_xXnBe1p4I z5ANx%RWhj>>^*pE{nr24ucWjDFP||02mpEl0Az2-3gT+2qQXkz?98mtz_$PZ*%J&3 zEC2vte18G{@wM>x4`gIy9UYzG;$kouoRN_c9UWa)S65Y4<>ch__3KwlOUt;pxZ2v< znwpxxz`%-%iin7akdTn~AHKam-rxT7{Lc>jKf416ZvY?yp;UeTKrjLZz1~=T!B9Ae zLMBJ5p>QM`m&0abtf6Q$o>Vl7P`a^rJegLtQg6JmW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0400 Subject: [PATCH 38/38] Expose the state of the loader --- .../java/cpw/mods/fml/common/LoadController.java | 15 ++++++++++----- fml/src/main/java/cpw/mods/fml/common/Loader.java | 7 ++++++- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/LoadController.java b/fml/src/main/java/cpw/mods/fml/common/LoadController.java index be3604a967..0edfe92fb2 100644 --- a/fml/src/main/java/cpw/mods/fml/common/LoadController.java +++ b/fml/src/main/java/cpw/mods/fml/common/LoadController.java @@ -150,8 +150,8 @@ public class LoadController else { FMLLog.severe("The ForgeModLoader state engine has become corrupted. Probably, a state was missed by and invalid modification to a base class" + - "ForgeModLoader depends on. This is a critical error and not recoverable. Investigate any modifications to base classes outside of" + - "ForgeModLoader, especially Optifine, to see if there are fixes available."); + "ForgeModLoader depends on. This is a critical error and not recoverable. Investigate any modifications to base classes outside of" + + "ForgeModLoader, especially Optifine, to see if there are fixes available."); throw new RuntimeException("The ForgeModLoader state engine is invalid"); } if (toThrow != null && toThrow instanceof RuntimeException) @@ -311,9 +311,9 @@ public class LoadController return this.state == state; } - boolean hasReachedState(LoaderState state) { - return this.state.ordinal()>=state.ordinal() && this.state!=LoaderState.ERRORED; - } + boolean hasReachedState(LoaderState state) { + return this.state.ordinal()>=state.ordinal() && this.state!=LoaderState.ERRORED; + } void forceState(LoaderState newState) { @@ -352,4 +352,9 @@ public class LoadController { return accessibleManager.getStackClasses(); } + + LoaderState getState() + { + return state; + } } diff --git a/fml/src/main/java/cpw/mods/fml/common/Loader.java b/fml/src/main/java/cpw/mods/fml/common/Loader.java index 687777baf7..3612faf96e 100644 --- a/fml/src/main/java/cpw/mods/fml/common/Loader.java +++ b/fml/src/main/java/cpw/mods/fml/common/Loader.java @@ -681,7 +681,7 @@ public class Loader // before elements are things we are loaded before (so they are our dependants) if ("required-before".equals(instruction) || "before".equals(instruction)) { - dependants.add(VersionParser.parseVersionReference(target)); + dependants.add(VersionParser.parseVersionReference(target)); } // after elements are things that load before we do (so they are out dependencies) else if ("required-after".equals(instruction) || "after".equals(instruction)) @@ -1060,4 +1060,9 @@ public class Loader { return injectedAfter.get(modId); } + + public final LoaderState getLoaderState() + { + return modController != null ? modController.getState() : LoaderState.NOINIT; + } }