Skip to content
This repository has been archived by the owner on May 26, 2018. It is now read-only.

Commit

Permalink
Move FML to net.minecraft.fml package.
Browse files Browse the repository at this point in the history
  • Loading branch information
LexManos committed Sep 23, 2014
1 parent 387842b commit ee3e423
Show file tree
Hide file tree
Showing 298 changed files with 1,189 additions and 1,061 deletions.
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ minecraft {
mcpVersion = '9.10'
mappings = 'snapshot_nodoc_20140916'
fmlDir = projectDir.getAbsolutePath();
mainClass = 'cpw.mods.fml.relauncher.ServerLaunchWrapper'
tweakClass = 'cpw.mods.fml.common.launcher.FMLTweaker'
mainClass = 'net.minecraftforge.fml.relauncher.ServerLaunchWrapper'
tweakClass = 'net.minecraftforge.fml.common.launcher.FMLTweaker'
installerVersion = "1.4"
}

Expand Down
Binary file modified eclipse-workspace-dev.zip
Binary file not shown.
6 changes: 3 additions & 3 deletions install/src/main/java/com/example/examplemod/ExampleMod.java
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package com.example.examplemod;

import net.minecraft.init.Blocks;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;

@Mod(modid = ExampleMod.MODID, version = ExampleMod.VERSION)
public class ExampleMod
Expand Down
2 changes: 1 addition & 1 deletion jsons/1.8-dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"time": "@timestamp@",
"releaseTime": "1960-01-01T00:00:00-0700",
"type": "release",
"minecraftArguments": "--version FML_DEV --tweakClass cpw.mods.fml.common.launcher.FMLTweaker",
"minecraftArguments": "--version FML_DEV --tweakClass net.minecraftforge.fml.common.launcher.FMLTweaker",
"libraries": [
{
"name": "net.minecraft:launchwrapper:1.11"
Expand Down
120 changes: 120 additions & 0 deletions jsons/1.8-rel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
{
"install": {
"profileName": "@project@",
"target":"@minecraft_version@-@project@@version@",
"path":"@artifact@",
"version":"@project@ @version@",
"filePath":"@universal_jar@",
"welcome":"Welcome to the simple @project@ installer.",
"minecraft":"@minecraft_version@",
"mirrorList" : "http://files.minecraftforge.net/mirror-brand.list",
"logo":"/big_logo.png"
},
"versionInfo": {
"id": "@minecraft_version@-@project@@version@",
"time": "@timestamp@",
"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 net.minecraftforge.fml.common.launcher.FMLTweaker",
"mainClass": "net.minecraft.launchwrapper.Launch",
"minimumLauncherVersion": 14,
"assets": "1.8",
"inheritsFrom": "1.8",
"jar": "1.8",
"libraries": [
{
"name": "@artifact@",
"url": "http://files.minecraftforge.net/maven/"
},
{
"name": "net.minecraft:launchwrapper:1.11",
"serverreq":true
},
{
"name": "org.ow2.asm:asm-all:5.0.3",
"serverreq":true
},
{
"name": "com.typesafe.akka:akka-actor_2.11:2.3.3",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "ed62e9fc709ca0f2ff1a3220daa8b70a2870078e", "25a86ccfdb6f6dfe08971f4825d0a01be83a6f2e" ],
"serverreq":true,
"clientreq":true
},
{
"name": "com.typesafe:config:1.2.1",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "f771f71fdae3df231bcd54d5ca2d57f0bf93f467", "7d7bc36df0989d72f2d5d057309675777acc528b" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-actors-migration_2.11:1.1.0",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "dfa8bc42b181d5b9f1a5dd147f8ae308b893eb6f", "8c9aaeeb68487ca519411a14068e1b4d69739207" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-compiler:2.11.1",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "56ea2e6c025e0821f28d73ca271218b8dd04926a", "1444992390544ba3780867a13ff696a89d7d1639" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang.plugins:scala-continuations-library_2.11:1.0.2",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "87213338cd5a153a7712cb574c0ddd2edfee0386", "0b4c1bf8d48993f138d6e10c0c144e50acfff581" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang.plugins:scala-continuations-plugin_2.11.1:1.0.2",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "1f7371605d4ba42aa26d3443440c0083c587b4e9", "1ea655dda4504ae0a367327e2340cd3beaee6c73" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-library:2.11.1",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "0e11da23da3eabab9f4777b9220e60d44c1aab6a", "1e4df76e835201c6eabd43adca89ab11f225f134" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-parser-combinators_2.11:1.0.1",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "f05d7345bf5a58924f2837c6c1f4d73a938e1ff0", "a1cbbcbde1dcc614f4253ed1aa0b320bc78d8f1d" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-reflect:2.11.1",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "6580347e61cc7f8e802941e7fde40fa83b8badeb", "91ce0f0be20f4a536321724b4b3bbc6530ddcd88" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-swing_2.11:1.0.1",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "b1cdd92bd47b1e1837139c1c53020e86bb9112ae", "d77152691dcf5bbdb00529af37aa7d3d887b3e63" ],
"serverreq":true,
"clientreq":true
},
{
"name": "org.scala-lang:scala-xml_2.11:1.0.2",
"url" : "http://files.minecraftforge.net/maven/",
"checksums" : [ "7a80ec00aec122fba7cd4e0d4cdd87ff7e4cb6d0", "62736b01689d56b6d09a0164b7ef9da2b0b9633d" ],
"serverreq":true,
"clientreq":true
},
{
"name": "lzma:lzma:0.0.1",
"serverreq":true
}
]
}
}
6 changes: 3 additions & 3 deletions patches/minecraft/net/minecraft/block/Block.java.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
{
private static final ResourceLocation field_176230_a = new ResourceLocation("air");
- public static final RegistryNamespacedDefaultedByKey field_149771_c = new RegistryNamespacedDefaultedByKey(field_176230_a);
+ public static final RegistryNamespacedDefaultedByKey field_149771_c = cpw.mods.fml.common.registry.GameData.getBlockRegistry();
+ public static final RegistryNamespacedDefaultedByKey field_149771_c = net.minecraftforge.fml.common.registry.GameData.getBlockRegistry();
public static final ObjectIntIdentityMap field_176229_d = new ObjectIntIdentityMap();
private CreativeTabs field_149772_a;
public static final Block.SoundType field_149769_e = new Block.SoundType("stone", 1.0F, 1.0F);
@@ -124,6 +124,9 @@
private String field_149770_b;
private static final String __OBFID = "CL_00000199";

+ public final cpw.mods.fml.common.registry.RegistryDelegate<Block> delegate =
+ ((cpw.mods.fml.common.registry.FMLControlledNamespacedRegistry)field_149771_c).getDelegate(this, Block.class);
+ public final net.minecraftforge.fml.common.registry.RegistryDelegate<Block> delegate =
+ ((net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry)field_149771_c).getDelegate(this, Block.class);
+
public static int func_149682_b(Block p_149682_0_)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
public static String getClientModName()
{
- return "vanilla";
+ return cpw.mods.fml.common.FMLCommonHandler.instance().getModName();
+ return net.minecraftforge.fml.common.FMLCommonHandler.instance().getModName();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

+ try
+ {
+ if (!cpw.mods.fml.client.FMLClientHandler.instance().handleLoadingScreen(scaledresolution)) //FML Don't render while FML's pre-screen is rendering
+ if (!net.minecraftforge.fml.client.FMLClientHandler.instance().handleLoadingScreen(scaledresolution)) //FML Don't render while FML's pre-screen is rendering
+ {
Tessellator tessellator = Tessellator.func_178181_a();
WorldRenderer worldrenderer = tessellator.func_178180_c();
Expand Down
52 changes: 26 additions & 26 deletions patches/minecraft/net/minecraft/client/Minecraft.java.patch
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
--- ../src-base/minecraft/net/minecraft/client/Minecraft.java
+++ ../src-work/minecraft/net/minecraft/client/Minecraft.java
@@ -410,7 +410,7 @@
@@ -411,7 +411,7 @@
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);
- this.func_110436_a();
+ cpw.mods.fml.client.FMLClientHandler.instance().beginMinecraftLoading(this, this.field_110449_ao, this.field_110451_am);
+ net.minecraftforge.fml.client.FMLClientHandler.instance().beginMinecraftLoading(this, this.field_110449_ao, this.field_110451_am);
this.field_71446_o = new TextureManager(this.field_110451_am);
this.field_110451_am.func_110542_a(this.field_71446_o);
this.func_180510_a(this.field_71446_o);
@@ -482,12 +482,13 @@
@@ -483,12 +483,13 @@
this.field_71458_u = new GuiAchievement(this);
GlStateManager.func_179083_b(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.client.FMLClientHandler.instance().finishMinecraftLoading();
+ net.minecraftforge.fml.client.FMLClientHandler.instance().finishMinecraftLoading();
this.func_71361_d("Post startup");
this.field_71456_v = new GuiIngame(this);

if (this.field_71475_ae != null)
{
- this.func_147108_a(new GuiConnecting(new GuiMainMenu(), this, this.field_71475_ae, this.field_71477_af));
+ cpw.mods.fml.client.FMLClientHandler.instance().connectToServerAtStartup(this.field_71475_ae, this.field_71477_af);
+ net.minecraftforge.fml.client.FMLClientHandler.instance().connectToServerAtStartup(this.field_71475_ae, this.field_71477_af);
}
else
{
@@ -503,6 +504,7 @@
@@ -504,6 +505,7 @@
this.func_71352_k();
}

+ cpw.mods.fml.client.FMLClientHandler.instance().onInitializationComplete();
+ net.minecraftforge.fml.client.FMLClientHandler.instance().onInitializationComplete();
try
{
Display.setVSyncEnabled(this.field_71474_y.field_74352_v);
@@ -681,21 +683,23 @@
@@ -682,21 +684,23 @@
File file2 = new File(file1, "crash-" + (new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss")).format(new Date()) + "-client.txt");
Bootstrap.func_179870_a(p_71377_1_.func_71502_e());

Expand All @@ -55,68 +55,68 @@
- System.exit(-2);
+ retVal = -2;
}
+ cpw.mods.fml.common.FMLCommonHandler.instance().handleExit(retVal);
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleExit(retVal);
}

public boolean func_152349_b()
@@ -1034,9 +1038,11 @@
@@ -1035,9 +1039,11 @@

if (!this.field_71454_w)
{
+ cpw.mods.fml.common.FMLCommonHandler.instance().onRenderTickStart(this.field_71428_T.field_74281_c);
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickStart(this.field_71428_T.field_74281_c);
this.field_71424_I.func_76318_c("gameRenderer");
this.field_71460_t.func_78480_b(this.field_71428_T.field_74281_c);
this.field_71424_I.func_76319_b();
+ cpw.mods.fml.common.FMLCommonHandler.instance().onRenderTickEnd(this.field_71428_T.field_74281_c);
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickEnd(this.field_71428_T.field_74281_c);
}

this.field_71424_I.func_76319_b();
@@ -1591,6 +1597,8 @@
@@ -1592,6 +1598,8 @@
--this.field_71467_ac;
}

+ cpw.mods.fml.common.FMLCommonHandler.instance().onPreClientTick();
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreClientTick();
+
this.field_71424_I.func_76320_a("gui");

if (!this.field_71445_n)
@@ -1744,6 +1752,7 @@
@@ -1745,6 +1753,7 @@
this.field_71462_r.func_146274_d();
}
}
+ cpw.mods.fml.common.FMLCommonHandler.instance().fireMouseInput();
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().fireMouseInput();
}

if (this.field_71429_W > 0)
@@ -1920,6 +1929,7 @@
@@ -1921,6 +1930,7 @@
}
}
}
+ cpw.mods.fml.common.FMLCommonHandler.instance().fireKeyInput();
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().fireKeyInput();
}

for (i = 0; i < 9; ++i)
@@ -2120,12 +2130,15 @@
@@ -2121,12 +2131,15 @@
this.field_71453_ak.func_74428_b();
}

+ cpw.mods.fml.common.FMLCommonHandler.instance().onPostClientTick();
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPostClientTick();
+
this.field_71424_I.func_76319_b();
this.field_71423_H = func_71386_F();
}

public void func_71371_a(String p_71371_1_, String p_71371_2_, WorldSettings p_71371_3_)
{
+ cpw.mods.fml.client.FMLClientHandler.instance().startIntegratedServer(p_71371_1_, p_71371_2_, p_71371_3_);
+ net.minecraftforge.fml.client.FMLClientHandler.instance().startIntegratedServer(p_71371_1_, p_71371_2_, p_71371_3_);
this.func_71403_a((WorldClient)null);
System.gc();
ISaveHandler isavehandler = this.field_71469_aa.func_75804_a(p_71371_1_, false);
@@ -2161,6 +2174,12 @@
@@ -2162,6 +2175,12 @@

while (!this.field_71437_Z.func_71200_ad())
{
+ if (!cpw.mods.fml.common.StartupQuery.check())
+ if (!net.minecraftforge.fml.common.StartupQuery.check())
+ {
+ func_71403_a(null);
+ func_147108_a(null);
Expand All @@ -125,7 +125,7 @@
String s2 = this.field_71437_Z.func_71195_b_();

if (s2 != null)
@@ -2186,7 +2205,7 @@
@@ -2187,7 +2206,7 @@
SocketAddress socketaddress = this.field_71437_Z.func_147137_ag().func_151270_a();
NetworkManager networkmanager = NetworkManager.func_150722_a(socketaddress);
networkmanager.func_150719_a(new NetHandlerLoginClient(networkmanager, this, (GuiScreen)null));
Expand All @@ -134,11 +134,11 @@
networkmanager.func_179290_a(new C00PacketLoginStart(this.func_110432_I().func_148256_e()));
this.field_71453_ak = networkmanager;
}
@@ -2237,6 +2256,7 @@
@@ -2238,6 +2257,7 @@

this.func_71351_a((ServerData)null);
this.field_71455_al = false;
+ cpw.mods.fml.client.FMLClientHandler.instance().handleClientWorldClosing(this.field_71441_e);
+ net.minecraftforge.fml.client.FMLClientHandler.instance().handleClientWorldClosing(this.field_71441_e);
}

this.field_147127_av.func_147690_c();
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
this.field_146297_k.func_147108_a(new GuiShareToLan(this));
+ break;
+ case 12:
+ cpw.mods.fml.client.FMLClientHandler.instance().showInGameModOptions(this);
+ net.minecraftforge.fml.client.FMLClientHandler.instance().showInGameModOptions(this);
+ break;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

+ if (p_146284_1_.field_146127_k == 6)
+ {
+ this.field_146297_k.func_147108_a(new cpw.mods.fml.client.GuiModList(this));
+ this.field_146297_k.func_147108_a(new net.minecraftforge.fml.client.GuiModList(this));
+ }
+
if (p_146284_1_.field_146127_k == 11)
Expand All @@ -29,7 +29,7 @@
}

- this.func_73731_b(this.field_146289_q, s, 2, this.field_146295_m - 10, -1);
+ java.util.List<String> brandings = com.google.common.collect.Lists.reverse(cpw.mods.fml.common.FMLCommonHandler.instance().getBrandings(true));
+ java.util.List<String> brandings = com.google.common.collect.Lists.reverse(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(true));
+ for (int i = 0; i < brandings.size(); i++)
+ {
+ String brd = brandings.get(i);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
public GuiMultiplayer(GuiScreen p_i1040_1_)
{
this.field_146798_g = p_i1040_1_;
+ cpw.mods.fml.client.FMLClientHandler.instance().setupServerList();
+ net.minecraftforge.fml.client.FMLClientHandler.instance().setupServerList();
}

public void func_73866_w_()
Expand All @@ -13,7 +13,7 @@
private void func_146791_a(ServerData p_146791_1_)
{
- this.field_146297_k.func_147108_a(new GuiConnecting(this, this.field_146297_k, p_146791_1_));
+ cpw.mods.fml.client.FMLClientHandler.instance().connectToServer(this, p_146791_1_);
+ net.minecraftforge.fml.client.FMLClientHandler.instance().connectToServer(this, p_146791_1_);
}

public void func_146790_a(int p_146790_1_)
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
ArrayList arraylist = Lists.newArrayList(new String[] {String.format("Java: %s %dbit", new Object[]{System.getProperty("java.version"), Integer.valueOf(this.field_175242_a.func_147111_S() ? 64 : 32)}), String.format("Mem: % 2d%% %03d/%03dMB", new Object[]{Long.valueOf(l * 100L / i), Long.valueOf(func_175240_a(l)), Long.valueOf(func_175240_a(i))}), String.format("Allocated: % 2d%% %03dMB", new Object[]{Long.valueOf(j * 100L / i), Long.valueOf(func_175240_a(j))}), "", String.format("Display: %dx%d (%s)", new Object[]{Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()), GL11.glGetString(GL11.GL_VENDOR)}), GL11.glGetString(GL11.GL_RENDERER), GL11.glGetString(GL11.GL_VERSION)});

+ arraylist.add("");
+ arraylist.addAll(cpw.mods.fml.common.FMLCommonHandler.instance().getBrandings(false));
+ arraylist.addAll(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(false));
+
if (this.func_175236_d())
{
Expand Down
Loading

0 comments on commit ee3e423

Please sign in to comment.