Skip to content

Instantly share code, notes, and snippets.

View Forkk's full-sized avatar
📖
Archive all the things!

Forkk Forkk

📖
Archive all the things!
View GitHub Profile
@Forkk
Forkk / versioning.md
Last active December 29, 2015 09:18
An outline of how we might do versioning in MultiMC 5.

MultiMC 5's versioning system will consist of multiple git branches, each with its own buildbot builder and completely separate build numbers. This system should allow us to, given a specific version number, immediately recognize which builds have newer features than others.

For example, build 42-stable is not necessarily any newer than build 41-dev, but build 42-dev is definitely a newer version than build 41-dev.

Furthermore, we should probably change the way we do major.minor.revision versioning. We never really use them. Perhaps we should just keep the major.minor part. We can increment major when we add a major feature and increment minor when we add some smaller feature. We won't increment either one for bugfixes or tweaks.

@Forkk
Forkk / gist:6082555
Created July 25, 2013 18:41
MCRewind Design Doc

Goals

During patch generation, the script will need to do the following:

  • Generate a JSON file containing a list of versions we have patches for along with some info about those versions and said patches.
  • Generate bsdiff patches for patching from the current version minecraft.jar to each jar file in the jars folder.
  • Automatically download new versions of Minecraft into the folder of old jars, so that the script can generate patches for them in the future.
@Forkk
Forkk / gist:1624468
Created January 17, 2012 03:36
And this is why I love C#
public void Save()
{
string[] line = new string[dict.Count];
for (int i = 0; i < dict.Count; i++)
{
line[i] = dict.Keys[i] + "=" + dict.Values[i];
}
File.WriteAllLines("", line);
Setting up macros...
Done
== MCP 5.6 (data: 5.6, client: 1.1, server: 1.1) ==
Setting up macros...
Done
Setting up macros...
Done
== Reobfuscating client ==
> Gathering md5 checksums
> Compacting client bin directory
// Renderers
HashMap<Class<? extends Entity>, Render> renderMap =
new HashMap<Class<? extends Entity>, Render>();
// Bolt renderer
renderMap.put(EntityBolt.class, new RenderBolt());
// Add the render map
AddRenderer(renderMap);
java.lang.NoSuchMethodError: lu.<init>(IZ)V
at mod_Arrows.load(mod_Arrows.java:115)
at ModLoader.init(ModLoader.java:824)
at ModLoader.AddAllRenderers(ModLoader.java:189)
at afq.<init>(afq.java:80)
at afq.<clinit>(afq.java:9)
at net.minecraft.client.Minecraft.a(SourceFile:265)
at net.minecraft.client.Minecraft.run(SourceFile:648)
at java.lang.Thread.run(Unknown Source)
package net.minecraft.src;
public class ItemCrossbow extends ItemBow
{
private int cooldownTime;
private long lastShotTime;
float powerMult;
public Applet createApplet() throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
Class<?> appletClass = classLoader
.loadClass("net.minecraft.client.MinecraftApplet");
try
{
Class<?> mcClass = classLoader.loadClass("net.minecraft.client.Minecraft");
Field mcDirField = null;
String path = AccessController.doPrivileged(new PrivilegedExceptionAction()
{
public Object run() throws Exception
{
return Util.getWorkingDirectory() + File.separator + "bin" + File.separator;
}
});
@Forkk
Forkk / Copy.java
Created January 7, 2012 19:08
Copy file
public static void copyFile(File source, File dest, boolean overwrite)
throws IOException
{
if (!overwrite && dest.exists())
throw new IOException("Can't copy " + source + " to " + dest + ". " +
"The file already exists.");
if (source.isDirectory())
throw new IOException("Can't copy directories! Use recursiveCopy() " +
"instead.");