FML is no more. FML has ceased to be. FML's expired and gone to meet its maker. FML's a stiff! Bereft of life, FML rests in peace.
This commit is contained in:
parent
9a859f8d5c
commit
614bbcb0da
356 changed files with 2676 additions and 235 deletions
22
build.gradle
22
build.gradle
|
@ -39,19 +39,19 @@ minecraft {
|
|||
}
|
||||
|
||||
projects {
|
||||
fml {
|
||||
rootDir 'fml'
|
||||
patchDir "fml/patches/minecraft"
|
||||
patchAfter "clean"
|
||||
genPatchesFrom "clean"
|
||||
|
||||
with common
|
||||
}
|
||||
// fml {
|
||||
// rootDir 'fml'
|
||||
// patchDir "fml/patches/minecraft"
|
||||
// patchAfter "clean"
|
||||
// genPatchesFrom "clean"
|
||||
//
|
||||
// with common
|
||||
// }
|
||||
forge {
|
||||
rootDir "."
|
||||
patchDir "patches/minecraft"
|
||||
patchAfter "fml"
|
||||
genPatchesFrom "fml"
|
||||
patchAfter "clean"
|
||||
genPatchesFrom "clean"
|
||||
|
||||
with common
|
||||
}
|
||||
|
@ -61,7 +61,7 @@ minecraft {
|
|||
group = 'net.minecraftforge'
|
||||
version = getVersionFromJava(file("src/main/java/net/minecraftforge/common/ForgeVersion.java"))
|
||||
|
||||
extractFmlSources { exclude "**/SideOnly.java", "**/Side.java" }
|
||||
extractForgeSources { exclude "**/SideOnly.java", "**/Side.java" }
|
||||
|
||||
genGradleProjects { addTestCompileDep "junit:junit:4.12" }
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
net/minecraft/server/management/ServerConfigurationManager.initializeConnectionToPlayer(Lnet/minecraft/network/NetworkManager;Lnet/minecraft/entity/player/EntityPlayerMP;Lnet/minecraft/network/NetHandlerPlayServer;)V=|p_72355_1_,p_72355_2_,nethandlerplayserver
|
||||
net/minecraft/item/ItemMonsterPlacer.spawnCreature(Lnet/minecraft/world/World;Ljava/lang/String;DDD)Lnet/minecraft/entity/Entity;=|p_77840_0_,name,p_77840_2_,p_77840_4_,p_77840_6_
|
|
@ -1,74 +0,0 @@
|
|||
#Main FML Access Transformer configuration file
|
||||
# TileEntity addMapping
|
||||
public net.minecraft.tileentity.TileEntity func_145826_a(Ljava/lang/Class;Ljava/lang/String;)V
|
||||
# EntityList addMappings
|
||||
public net.minecraft.entity.EntityList func_75618_a(Ljava/lang/Class;Ljava/lang/String;I)V
|
||||
public net.minecraft.entity.EntityList func_75614_a(Ljava/lang/Class;Ljava/lang/String;III)V
|
||||
public net.minecraft.entity.EntityList field_75625_b #nameToClassMap
|
||||
public net.minecraft.entity.EntityList field_75626_c #classToNameMap
|
||||
public net.minecraft.entity.EntityList field_75623_d #idToClassMap
|
||||
## RenderManager
|
||||
public net.minecraft.client.renderer.entity.RenderManager field_78729_o #renderers
|
||||
## TileEntityRendererDispatcher
|
||||
public net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher field_147559_m
|
||||
## WeightedRandomItem
|
||||
public net.minecraft.util.WeightedRandom$Item field_76292_a #probability
|
||||
## EntityPlayerMP getNextWindowId
|
||||
public net.minecraft.entity.player.EntityPlayerMP func_71117_bO()V
|
||||
public net.minecraft.entity.player.EntityPlayerMP field_71139_cq
|
||||
## EntityAITaskEntry
|
||||
public net.minecraft.entity.ai.EntityAITasks$EntityAITaskEntry
|
||||
## EntityLiving
|
||||
public net.minecraft.entity.EntityLiving field_70714_bg #tasks
|
||||
public net.minecraft.entity.EntityLiving field_70715_bh #targetTasks
|
||||
# GuiScreen
|
||||
public net.minecraft.client.gui.GuiScreen field_146297_k # minecraft instance - public because gui's outside access it
|
||||
# Minecraft
|
||||
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_180510_a(Lnet/minecraft/client/renderer/texture/TextureManager;)V # drawSplashScreen
|
||||
## ItemBlock
|
||||
public net.minecraft.item.ItemBlock field_150939_a
|
||||
## DedicatedServer
|
||||
public net.minecraft.server.dedicated.DedicatedServer field_71341_l # pendingCommandList
|
||||
## SaveFormatOld
|
||||
public net.minecraft.world.storage.SaveFormatOld field_75808_a # savesDirectory
|
||||
|
||||
protected net.minecraft.util.ObjectIntIdentityMap field_148749_a # internal map
|
||||
protected net.minecraft.util.ObjectIntIdentityMap field_148748_b # internal index list
|
||||
protected-f net.minecraft.util.RegistryNamespaced field_148759_a # identitymap
|
||||
|
||||
# GuiButton
|
||||
public net.minecraft.client.gui.GuiButton field_146120_f # width - needed for config GUI stuff
|
||||
public net.minecraft.client.gui.GuiButton field_146121_g # height - needed for config GUI stuff
|
||||
# GuiTextField
|
||||
public-f net.minecraft.client.gui.GuiTextField field_146218_h # width - needed for config GUI stuff
|
||||
public-f net.minecraft.client.gui.GuiTextField field_146219_i # height - needed for config GUI stuff
|
||||
# GuiSlot
|
||||
public net.minecraft.client.gui.GuiSlot field_148149_f # slotHeight - needed for config GUI stuff
|
||||
public net.minecraft.client.gui.GuiSlot field_148151_d # right - needed for config GUI stuff
|
||||
public net.minecraft.client.gui.GuiSlot field_148152_e # left - needed for config GUI stuff
|
||||
public net.minecraft.client.gui.GuiSlot field_148153_b # top - needed for config GUI stuff
|
||||
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
|
||||
|
||||
# Villager Traid Classes
|
||||
public net.minecraft.entity.passive.EntityVillager$EmeraldForItems
|
||||
public net.minecraft.entity.passive.EntityVillager$ITradeList
|
||||
public net.minecraft.entity.passive.EntityVillager$ItemAndEmeraldToItem
|
||||
public net.minecraft.entity.passive.EntityVillager$ListEnchantedBookForEmeralds
|
||||
public net.minecraft.entity.passive.EntityVillager$ListEnchantedItemForEmeralds
|
||||
public net.minecraft.entity.passive.EntityVillager$ListItemForEmeralds
|
||||
public net.minecraft.entity.passive.EntityVillager$PriceInfo
|
||||
|
||||
# Font renderer
|
||||
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
|
|
@ -1,3 +0,0 @@
|
|||
# Marker interfaces to add to minecraft - helps in bukkit and client/server unification
|
||||
# Only runs at runtime because it's not necessary at compile time
|
||||
# has deobf and obf mappings so it runs OK in mcp
|
|
@ -1,6 +1,28 @@
|
|||
--- ../src-base/minecraft/net/minecraft/block/Block.java
|
||||
+++ ../src-work/minecraft/net/minecraft/block/Block.java
|
||||
@@ -140,7 +140,8 @@
|
||||
@@ -39,8 +39,9 @@
|
||||
public class Block
|
||||
{
|
||||
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 ObjectIntIdentityMap field_176229_d = new ObjectIntIdentityMap();
|
||||
+ public static final RegistryNamespacedDefaultedByKey field_149771_c = net.minecraftforge.fml.common.registry.GameData.getBlockRegistry();
|
||||
+ @Deprecated //Modders: DO NOT use this! Use GameRegistry
|
||||
+ public static final ObjectIntIdentityMap field_176229_d = net.minecraftforge.fml.common.registry.GameData.getBlockStateIDMap();
|
||||
private CreativeTabs field_149772_a;
|
||||
public static final Block.SoundType field_149769_e = new Block.SoundType("stone", 1.0F, 1.0F);
|
||||
public static final Block.SoundType field_149766_f = new Block.SoundType("wood", 1.0F, 1.0F);
|
||||
@@ -124,6 +125,9 @@
|
||||
private String field_149770_b;
|
||||
private static final String __OBFID = "CL_00000199";
|
||||
|
||||
+ 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_)
|
||||
{
|
||||
return field_149771_c.func_148757_b(p_149682_0_);
|
||||
@@ -136,7 +140,8 @@
|
||||
|
||||
public static Block func_149729_e(int p_149729_0_)
|
||||
{
|
||||
|
@ -10,7 +32,7 @@
|
|||
}
|
||||
|
||||
public static IBlockState func_176220_d(int p_176220_0_)
|
||||
@@ -304,7 +305,7 @@
|
||||
@@ -300,7 +305,7 @@
|
||||
|
||||
public boolean func_176200_f(World p_176200_1_, BlockPos p_176200_2_)
|
||||
{
|
||||
|
@ -19,7 +41,7 @@
|
|||
}
|
||||
|
||||
public Block func_149711_c(float p_149711_1_)
|
||||
@@ -341,9 +342,10 @@
|
||||
@@ -337,9 +342,10 @@
|
||||
return this.field_149789_z;
|
||||
}
|
||||
|
||||
|
@ -31,7 +53,7 @@
|
|||
}
|
||||
|
||||
public final void func_149676_a(float p_149676_1_, float p_149676_2_, float p_149676_3_, float p_149676_4_, float p_149676_5_, float p_149676_6_)
|
||||
@@ -360,13 +362,13 @@
|
||||
@@ -356,13 +362,13 @@
|
||||
public int func_176207_c(IBlockAccess p_176207_1_, BlockPos p_176207_2_)
|
||||
{
|
||||
Block block = p_176207_1_.func_180495_p(p_176207_2_).func_177230_c();
|
||||
|
@ -47,7 +69,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
@@ -442,7 +444,13 @@
|
||||
@@ -438,7 +444,13 @@
|
||||
|
||||
public void func_176213_c(World p_176213_1_, BlockPos p_176213_2_, IBlockState p_176213_3_) {}
|
||||
|
||||
|
@ -62,7 +84,7 @@
|
|||
|
||||
public int func_149745_a(Random p_149745_1_)
|
||||
{
|
||||
@@ -456,8 +464,7 @@
|
||||
@@ -452,8 +464,7 @@
|
||||
|
||||
public float func_180647_a(EntityPlayer p_180647_1_, World p_180647_2_, BlockPos p_180647_3_)
|
||||
{
|
||||
|
@ -72,7 +94,7 @@
|
|||
}
|
||||
|
||||
public final void func_176226_b(World p_176226_1_, BlockPos p_176226_2_, IBlockState p_176226_3_, int p_176226_4_)
|
||||
@@ -467,20 +474,16 @@
|
||||
@@ -463,20 +474,16 @@
|
||||
|
||||
public void func_180653_a(World p_180653_1_, BlockPos p_180653_2_, IBlockState p_180653_3_, float p_180653_4_, int p_180653_5_)
|
||||
{
|
||||
|
@ -98,7 +120,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -488,8 +491,13 @@
|
||||
@@ -484,8 +491,13 @@
|
||||
|
||||
public static void func_180635_a(World p_180635_0_, BlockPos p_180635_1_, ItemStack p_180635_2_)
|
||||
{
|
||||
|
@ -113,7 +135,7 @@
|
|||
float f = 0.5F;
|
||||
double d0 = (double)(p_180635_0_.field_73012_v.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
double d1 = (double)(p_180635_0_.field_73012_v.nextFloat() * f) + (double)(1.0F - f) * 0.5D;
|
||||
@@ -674,7 +682,7 @@
|
||||
@@ -670,7 +682,7 @@
|
||||
|
||||
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
||||
{
|
||||
|
@ -122,7 +144,7 @@
|
|||
}
|
||||
|
||||
public boolean func_180639_a(World p_180639_1_, BlockPos p_180639_2_, IBlockState p_180639_3_, EntityPlayer p_180639_4_, EnumFacing p_180639_5_, float p_180639_6_, float p_180639_7_, float p_180639_8_)
|
||||
@@ -776,25 +784,35 @@
|
||||
@@ -772,25 +784,35 @@
|
||||
p_180657_2_.func_71029_a(StatList.field_75934_C[func_149682_b(this)]);
|
||||
p_180657_2_.func_71020_j(0.025F);
|
||||
|
||||
|
@ -161,7 +183,7 @@
|
|||
}
|
||||
|
||||
protected ItemStack func_180643_i(IBlockState p_180643_1_)
|
||||
@@ -971,6 +989,1033 @@
|
||||
@@ -967,6 +989,1033 @@
|
||||
return Block.EnumOffsetType.NONE;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/ClientBrandRetriever.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/ClientBrandRetriever.java
|
||||
@@ -10,6 +10,6 @@
|
||||
|
||||
public static String getClientModName()
|
||||
{
|
||||
- return "vanilla";
|
||||
+ return net.minecraftforge.fml.common.FMLCommonHandler.instance().getModName();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/LoadingScreenRenderer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/LoadingScreenRenderer.java
|
||||
@@ -139,6 +139,10 @@
|
||||
GlStateManager.func_179086_m(16640);
|
||||
}
|
||||
|
||||
+ try
|
||||
+ {
|
||||
+ 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();
|
||||
this.field_73725_b.func_110434_K().func_110577_a(Gui.field_110325_k);
|
||||
@@ -177,6 +181,12 @@
|
||||
GlStateManager.func_179120_a(770, 771, 1, 0);
|
||||
this.field_73725_b.field_71466_p.func_175063_a(this.field_73726_c, (float)((l - this.field_73725_b.field_71466_p.func_78256_a(this.field_73726_c)) / 2), (float)(i1 / 2 - 4 - 16), 16777215);
|
||||
this.field_73725_b.field_71466_p.func_175063_a(this.field_73727_a, (float)((l - this.field_73725_b.field_71466_p.func_78256_a(this.field_73727_a)) / 2), (float)(i1 / 2 - 4 + 8), 16777215);
|
||||
+ }
|
||||
+ }
|
||||
+ catch (java.io.IOException e)
|
||||
+ {
|
||||
+ com.google.common.base.Throwables.propagate(e);
|
||||
+ } //FML End
|
||||
this.field_146588_g.func_147609_e();
|
||||
|
||||
if (OpenGlHelper.func_148822_b())
|
|
@ -8,16 +8,108 @@
|
|||
this.field_71459_aj = p_i45547_1_.field_178741_d.field_178756_a;
|
||||
this.field_71443_c = p_i45547_1_.field_178743_b.field_178764_a > 0 ? p_i45547_1_.field_178743_b.field_178764_a : 1;
|
||||
this.field_71440_d = p_i45547_1_.field_178743_b.field_178762_b > 0 ? p_i45547_1_.field_178743_b.field_178762_b : 1;
|
||||
@@ -491,7 +490,7 @@
|
||||
net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
net.minecraftforge.fml.client.FMLClientHandler.instance().finishMinecraftLoading();
|
||||
@@ -410,10 +409,10 @@
|
||||
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();
|
||||
+ 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);
|
||||
+ net.minecraftforge.fml.client.SplashProgress.drawVanillaScreen(this.field_71446_o);
|
||||
this.func_175595_al();
|
||||
this.field_152350_aA = new SkinManager(this.field_71446_o, new File(this.field_110446_Y, "skins"), this.field_152355_az);
|
||||
this.field_71469_aa = new AnvilSaveConverter(new File(this.field_71412_D, "saves"));
|
||||
@@ -449,6 +448,8 @@
|
||||
}
|
||||
});
|
||||
this.field_71417_B = new MouseHelper();
|
||||
+ net.minecraftforge.fml.common.ProgressManager.ProgressBar bar= net.minecraftforge.fml.common.ProgressManager.push("Rendering Setup", 5, true);
|
||||
+ bar.step("GL Setup");
|
||||
this.func_71361_d("Pre startup");
|
||||
GlStateManager.func_179098_w();
|
||||
GlStateManager.func_179103_j(7425);
|
||||
@@ -462,17 +463,21 @@
|
||||
GlStateManager.func_179096_D();
|
||||
GlStateManager.func_179128_n(5888);
|
||||
this.func_71361_d("Startup");
|
||||
- this.field_147128_au = new TextureMap("textures");
|
||||
+ bar.step("Loading Texture Map");
|
||||
+ this.field_147128_au = new TextureMap("textures",true);
|
||||
this.field_147128_au.func_147633_a(this.field_71474_y.field_151442_I);
|
||||
this.field_71446_o.func_110580_a(TextureMap.field_110575_b, this.field_147128_au);
|
||||
this.field_71446_o.func_110577_a(TextureMap.field_110575_b);
|
||||
this.field_147128_au.func_174937_a(false, this.field_71474_y.field_151442_I > 0);
|
||||
+ bar.step("Loading Model Manager");
|
||||
this.field_175617_aL = new ModelManager(this.field_147128_au);
|
||||
this.field_110451_am.func_110542_a(this.field_175617_aL);
|
||||
+ bar.step("Loading Item Renderer");
|
||||
this.field_175621_X = new RenderItem(this.field_71446_o, this.field_175617_aL);
|
||||
this.field_175616_W = new RenderManager(this.field_71446_o, this.field_175621_X);
|
||||
this.field_175620_Y = new ItemRenderer(this);
|
||||
this.field_110451_am.func_110542_a(this.field_175621_X);
|
||||
+ 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);
|
||||
this.field_175618_aM = new BlockRendererDispatcher(this.field_175617_aL.func_174954_c(), this.field_71474_y);
|
||||
@@ -482,22 +487,25 @@
|
||||
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);
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().finishMinecraftLoading();
|
||||
this.func_71361_d("Post startup");
|
||||
- this.field_71456_v = new GuiIngame(this);
|
||||
+ this.field_71456_v = new net.minecraftforge.client.GuiIngameForge(this);
|
||||
|
||||
if (this.field_71475_ae != null)
|
||||
{
|
||||
@@ -898,11 +897,6 @@
|
||||
- this.func_147108_a(new GuiConnecting(new GuiMainMenu(), this, this.field_71475_ae, this.field_71477_af));
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().connectToServerAtStartup(this.field_71475_ae, this.field_71477_af);
|
||||
}
|
||||
else
|
||||
{
|
||||
this.func_147108_a(new GuiMainMenu());
|
||||
}
|
||||
|
||||
- this.field_71446_o.func_147645_c(this.field_152354_ay);
|
||||
+ net.minecraftforge.fml.client.SplashProgress.clearVanillaResources(field_71446_o, field_152354_ay);
|
||||
this.field_152354_ay = null;
|
||||
this.field_71461_s = new LoadingScreenRenderer(this);
|
||||
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().onInitializationComplete();
|
||||
if (this.field_71474_y.field_74353_u && !this.field_71431_Q)
|
||||
{
|
||||
this.func_71352_k();
|
||||
@@ -681,21 +689,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());
|
||||
|
||||
+ int retVal;
|
||||
if (p_71377_1_.func_71497_f() != null)
|
||||
{
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + p_71377_1_.func_71497_f());
|
||||
- System.exit(-1);
|
||||
+ retVal = -1;
|
||||
}
|
||||
else if (p_71377_1_.func_147149_a(file2))
|
||||
{
|
||||
Bootstrap.func_179870_a("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath());
|
||||
- System.exit(-1);
|
||||
+ retVal = -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
Bootstrap.func_179870_a("#@?@# Game crashed! Crash report could not be saved. #@?@#");
|
||||
- System.exit(-2);
|
||||
+ retVal = -2;
|
||||
}
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleExit(retVal);
|
||||
}
|
||||
|
||||
public boolean func_152349_b()
|
||||
@@ -887,11 +897,6 @@
|
||||
|
||||
public void func_147108_a(GuiScreen p_147108_1_)
|
||||
{
|
||||
|
@ -29,7 +121,7 @@
|
|||
if (p_147108_1_ == null && this.field_71441_e == null)
|
||||
{
|
||||
p_147108_1_ = new GuiMainMenu();
|
||||
@@ -912,6 +906,17 @@
|
||||
@@ -901,6 +906,17 @@
|
||||
p_147108_1_ = new GuiGameOver();
|
||||
}
|
||||
|
||||
|
@ -47,7 +139,28 @@
|
|||
if (p_147108_1_ instanceof GuiMainMenu)
|
||||
{
|
||||
this.field_71474_y.field_74330_P = false;
|
||||
@@ -1395,7 +1400,7 @@
|
||||
@@ -999,7 +1015,7 @@
|
||||
{
|
||||
while (!this.field_152351_aB.isEmpty())
|
||||
{
|
||||
- ((FutureTask)this.field_152351_aB.poll()).run();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.callFuture(((FutureTask)this.field_152351_aB.poll()));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1034,9 +1050,11 @@
|
||||
|
||||
if (!this.field_71454_w)
|
||||
{
|
||||
+ 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();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onRenderTickEnd(this.field_71428_T.field_74281_c);
|
||||
}
|
||||
|
||||
this.field_71424_I.func_76319_b();
|
||||
@@ -1382,7 +1400,7 @@
|
||||
|
||||
if (this.field_71441_e.func_180495_p(blockpos).func_177230_c().func_149688_o() != Material.field_151579_a && this.field_71442_b.func_180512_c(blockpos, this.field_71476_x.field_178784_b))
|
||||
{
|
||||
|
@ -56,7 +169,7 @@
|
|||
this.field_71439_g.func_71038_i();
|
||||
}
|
||||
}
|
||||
@@ -1475,15 +1480,19 @@
|
||||
@@ -1462,15 +1480,19 @@
|
||||
case 2:
|
||||
BlockPos blockpos = this.field_71476_x.func_178782_a();
|
||||
|
||||
|
@ -77,7 +190,7 @@
|
|||
|
||||
if (itemstack == null)
|
||||
{
|
||||
@@ -1506,7 +1515,8 @@
|
||||
@@ -1493,7 +1515,8 @@
|
||||
{
|
||||
ItemStack itemstack1 = this.field_71439_g.field_71071_by.func_70448_g();
|
||||
|
||||
|
@ -87,7 +200,16 @@
|
|||
{
|
||||
this.field_71460_t.field_78516_c.func_78445_c();
|
||||
}
|
||||
@@ -1704,6 +1714,8 @@
|
||||
@@ -1591,6 +1614,8 @@
|
||||
--this.field_71467_ac;
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreClientTick();
|
||||
+
|
||||
this.field_71424_I.func_76320_a("gui");
|
||||
|
||||
if (!this.field_71445_n)
|
||||
@@ -1689,6 +1714,8 @@
|
||||
|
||||
while (Mouse.next())
|
||||
{
|
||||
|
@ -96,11 +218,58 @@
|
|||
i = Mouse.getEventButton();
|
||||
KeyBinding.func_74510_a(i - 100, Mouse.getEventButtonState());
|
||||
|
||||
@@ -2213,7 +2225,13 @@
|
||||
@@ -1744,6 +1771,7 @@
|
||||
this.field_71462_r.func_146274_d();
|
||||
}
|
||||
}
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().fireMouseInput();
|
||||
}
|
||||
|
||||
if (this.field_71429_W > 0)
|
||||
@@ -1920,6 +1948,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().fireKeyInput();
|
||||
}
|
||||
|
||||
for (i = 0; i < 9; ++i)
|
||||
@@ -2120,12 +2149,15 @@
|
||||
this.field_71453_ak.func_74428_b();
|
||||
}
|
||||
|
||||
+ 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_)
|
||||
{
|
||||
+ 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 +2193,12 @@
|
||||
|
||||
while (!this.field_71437_Z.func_71200_ad())
|
||||
{
|
||||
+ if (!net.minecraftforge.fml.common.StartupQuery.check())
|
||||
+ {
|
||||
+ func_71403_a(null);
|
||||
+ func_147108_a(null);
|
||||
+ return;
|
||||
+ }
|
||||
String s2 = this.field_71437_Z.func_71195_b_();
|
||||
|
||||
if (s2 != null)
|
||||
@@ -2186,8 +2224,14 @@
|
||||
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));
|
||||
networkmanager.func_179290_a(new C00Handshake(47, socketaddress.toString(), 0, EnumConnectionState.LOGIN, true));
|
||||
- networkmanager.func_179290_a(new C00Handshake(47, socketaddress.toString(), 0, EnumConnectionState.LOGIN));
|
||||
- networkmanager.func_179290_a(new C00PacketLoginStart(this.func_110432_I().func_148256_e()));
|
||||
+ networkmanager.func_179290_a(new C00Handshake(47, socketaddress.toString(), 0, EnumConnectionState.LOGIN, true));
|
||||
+ com.mojang.authlib.GameProfile gameProfile = this.func_110432_I().func_148256_e();
|
||||
+ if (!this.func_110432_I().hasCachedProperties())
|
||||
+ {
|
||||
|
@ -111,7 +280,7 @@
|
|||
this.field_71453_ak = networkmanager;
|
||||
}
|
||||
|
||||
@@ -2224,6 +2242,8 @@
|
||||
@@ -2198,6 +2242,8 @@
|
||||
|
||||
public void func_71353_a(WorldClient p_71353_1_, String p_71353_2_)
|
||||
{
|
||||
|
@ -120,7 +289,7 @@
|
|||
if (p_71353_1_ == null)
|
||||
{
|
||||
NetHandlerPlayClient nethandlerplayclient = this.func_147114_u();
|
||||
@@ -2237,6 +2257,18 @@
|
||||
@@ -2211,6 +2257,18 @@
|
||||
{
|
||||
this.field_71437_Z.func_71263_m();
|
||||
this.field_71437_Z.func_175592_a();
|
||||
|
@ -139,7 +308,15 @@
|
|||
}
|
||||
|
||||
this.field_71437_Z = null;
|
||||
@@ -2368,134 +2400,11 @@
|
||||
@@ -2237,6 +2295,7 @@
|
||||
|
||||
this.func_71351_a((ServerData)null);
|
||||
this.field_71455_al = false;
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().handleClientWorldClosing(this.field_71441_e);
|
||||
}
|
||||
|
||||
this.field_147127_av.func_147690_c();
|
||||
@@ -2341,134 +2400,11 @@
|
||||
if (this.field_71476_x != null)
|
||||
{
|
||||
boolean flag = this.field_71439_g.field_71075_bZ.field_75098_d;
|
||||
|
@ -276,7 +453,7 @@
|
|||
if (flag)
|
||||
{
|
||||
int j = this.field_71439_g.field_71069_bz.field_75151_b.size() - 9 + inventoryplayer.field_70461_c;
|
||||
@@ -2751,8 +2660,11 @@
|
||||
@@ -2724,8 +2660,11 @@
|
||||
p_70001_1_.func_152767_b("gl_max_texture_size", Integer.valueOf(func_71369_N()));
|
||||
}
|
||||
|
||||
|
@ -288,7 +465,7 @@
|
|||
for (int i = 16384; i > 0; i >>= 1)
|
||||
{
|
||||
GL11.glTexImage2D(GL11.GL_PROXY_TEXTURE_2D, 0, GL11.GL_RGBA, i, i, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, (ByteBuffer)null);
|
||||
@@ -2760,6 +2672,7 @@
|
||||
@@ -2733,6 +2672,7 @@
|
||||
|
||||
if (j != 0)
|
||||
{
|
||||
|
|
|
@ -1,5 +1,14 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/FontRenderer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/FontRenderer.java
|
||||
@@ -57,7 +57,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)
|
||||
{
|
||||
@@ -97,6 +97,7 @@
|
||||
public void func_110549_a(IResourceManager p_110549_1_)
|
||||
{
|
||||
|
@ -8,6 +17,69 @@
|
|||
}
|
||||
|
||||
private void func_111272_d()
|
||||
@@ -105,7 +106,7 @@
|
||||
|
||||
try
|
||||
{
|
||||
- bufferedimage = TextureUtil.func_177053_a(Minecraft.func_71410_x().func_110442_L().func_110536_a(this.field_111273_g).func_110527_b());
|
||||
+ bufferedimage = TextureUtil.func_177053_a(getResourceInputStream(this.field_111273_g));
|
||||
}
|
||||
catch (IOException ioexception)
|
||||
{
|
||||
@@ -172,7 +173,7 @@
|
||||
|
||||
try
|
||||
{
|
||||
- inputstream = Minecraft.func_71410_x().func_110442_L().func_110536_a(new ResourceLocation("font/glyph_sizes.bin")).func_110527_b();
|
||||
+ inputstream = getResourceInputStream(new ResourceLocation("font/glyph_sizes.bin"));
|
||||
inputstream.read(this.field_78287_e);
|
||||
}
|
||||
catch (IOException ioexception)
|
||||
@@ -195,7 +196,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);
|
||||
@@ -222,7 +223,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_)
|
||||
@@ -269,7 +270,7 @@
|
||||
|
||||
public int func_175065_a(String p_175065_1_, float p_175065_2_, float p_175065_3_, int p_175065_4_, boolean p_175065_5_)
|
||||
{
|
||||
- GlStateManager.func_179141_d();
|
||||
+ enableAlpha();
|
||||
this.func_78265_b();
|
||||
int j;
|
||||
|
||||
@@ -341,7 +342,7 @@
|
||||
|
||||
k = this.field_78285_g[j];
|
||||
this.field_78304_r = k;
|
||||
- GlStateManager.func_179131_c((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)
|
||||
{
|
||||
@@ -370,7 +371,7 @@
|
||||
this.field_78299_w = false;
|
||||
this.field_78300_v = false;
|
||||
this.field_78301_u = false;
|
||||
- GlStateManager.func_179131_c(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;
|
||||
@@ -390,7 +391,7 @@
|
||||
j = k;
|
||||
}
|
||||
|
@ -17,7 +89,32 @@
|
|||
boolean flag1 = (c0 == 0 || j == -1 || this.field_78293_l) && p_78255_2_;
|
||||
|
||||
if (flag1)
|
||||
@@ -592,11 +593,6 @@
|
||||
@@ -429,6 +430,15 @@
|
||||
++f;
|
||||
}
|
||||
|
||||
+ doDraw(f);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected void doDraw(float f)
|
||||
+ {
|
||||
+ {
|
||||
+ {
|
||||
Tessellator tessellator;
|
||||
WorldRenderer worldrenderer;
|
||||
|
||||
@@ -504,7 +514,7 @@
|
||||
this.field_78292_o = (float)(p_180455_4_ >> 8 & 255) / 255.0F;
|
||||
this.field_78306_p = (float)(p_180455_4_ & 255) / 255.0F;
|
||||
this.field_78305_q = (float)(p_180455_4_ >> 24 & 255) / 255.0F;
|
||||
- GlStateManager.func_179131_c(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 = p_180455_2_;
|
||||
this.field_78296_k = p_180455_3_;
|
||||
this.func_78255_a(p_180455_1_, p_180455_5_);
|
||||
@@ -583,11 +593,6 @@
|
||||
int j = this.field_78287_e[p_78263_1_] >>> 4;
|
||||
int k = this.field_78287_e[p_78263_1_] & 15;
|
||||
|
||||
|
@ -29,3 +126,30 @@
|
|||
|
||||
++k;
|
||||
return (k - j) / 2 + 1;
|
||||
@@ -842,6 +847,26 @@
|
||||
return this.field_78294_m;
|
||||
}
|
||||
|
||||
+ protected void setColor(float r, float g, float b, float a)
|
||||
+ {
|
||||
+ GlStateManager.func_179131_c(r,g,b,a);
|
||||
+ }
|
||||
+
|
||||
+ protected void enableAlpha()
|
||||
+ {
|
||||
+ GlStateManager.func_179141_d();
|
||||
+ }
|
||||
+
|
||||
+ 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();
|
||||
+ }
|
||||
+
|
||||
public int func_175064_b(char p_175064_1_)
|
||||
{
|
||||
return this.field_78285_g["0123456789abcdef".indexOf(p_175064_1_)];
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiButton.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiButton.java
|
||||
@@ -22,6 +22,7 @@
|
||||
public boolean field_146125_m;
|
||||
protected boolean field_146123_n;
|
||||
private static final String __OBFID = "CL_00000668";
|
||||
+ public int packedFGColour; //FML
|
||||
|
||||
public GuiButton(int p_i1020_1_, int p_i1020_2_, int p_i1020_3_, String p_i1020_4_)
|
||||
{
|
||||
@@ -75,8 +76,12 @@
|
||||
this.func_146119_b(p_146112_1_, p_146112_2_, p_146112_3_);
|
||||
int l = 14737632;
|
||||
|
||||
- if (!this.field_146124_l)
|
||||
+ if (packedFGColour != 0)
|
||||
{
|
||||
+ l = packedFGColour;
|
||||
+ }
|
||||
+ else if (!this.field_146124_l)
|
||||
+ {
|
||||
l = 10526880;
|
||||
}
|
||||
else if (this.field_146123_n)
|
|
@ -1,6 +1,15 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
||||
@@ -322,14 +322,7 @@
|
||||
@@ -213,6 +213,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ WorldType.field_77139_a[this.field_146331_K].onGUICreateWorldPress();
|
||||
+
|
||||
WorldSettings.GameType gametype = WorldSettings.GameType.func_77142_a(this.field_146342_r);
|
||||
WorldSettings worldsettings = new WorldSettings(i, gametype, this.field_146341_s, this.field_146337_w, WorldType.field_77139_a[this.field_146331_K]);
|
||||
worldsettings.func_82750_a(this.field_146334_a);
|
||||
@@ -320,14 +322,7 @@
|
||||
}
|
||||
else if (p_146284_1_.field_146127_k == 8)
|
||||
{
|
||||
|
@ -16,7 +25,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -381,7 +374,7 @@
|
||||
@@ -379,7 +374,7 @@
|
||||
this.field_146326_C.field_146125_m = this.field_146344_y;
|
||||
this.field_146320_D.field_146125_m = this.field_146344_y;
|
||||
this.field_146321_E.field_146125_m = this.field_146344_y;
|
||||
|
|
|
@ -1,6 +1,17 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiIngameMenu.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiIngameMenu.java
|
||||
@@ -59,9 +59,11 @@
|
||||
@@ -30,8 +30,9 @@
|
||||
|
||||
this.field_146292_n.add(new GuiButton(4, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 24 + b0, I18n.func_135052_a("menu.returnToGame", new Object[0])));
|
||||
this.field_146292_n.add(new GuiButton(0, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 96 + b0, 98, 20, I18n.func_135052_a("menu.options", new Object[0])));
|
||||
+ this.field_146292_n.add(new GuiButton(12, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 96 + b0, 98, 20, I18n.func_135052_a("fml.menu.modoptions")));
|
||||
GuiButton guibutton;
|
||||
- this.field_146292_n.add(guibutton = new GuiButton(7, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 96 + b0, 98, 20, I18n.func_135052_a("menu.shareToLan", new Object[0])));
|
||||
+ this.field_146292_n.add(guibutton = new GuiButton(7, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 72 + b0, 200, 20, I18n.func_135052_a("menu.shareToLan", new Object[0])));
|
||||
this.field_146292_n.add(new GuiButton(5, this.field_146294_l / 2 - 100, this.field_146295_m / 4 + 48 + b0, 98, 20, I18n.func_135052_a("gui.achievements", new Object[0])));
|
||||
this.field_146292_n.add(new GuiButton(6, this.field_146294_l / 2 + 2, this.field_146295_m / 4 + 48 + b0, 98, 20, I18n.func_135052_a("gui.stats", new Object[0])));
|
||||
guibutton.field_146124_l = this.field_146297_k.func_71356_B() && !this.field_146297_k.func_71401_C().func_71344_c();
|
||||
@@ -58,13 +59,19 @@
|
||||
this.field_146297_k.func_71381_h();
|
||||
break;
|
||||
case 5:
|
||||
|
@ -12,3 +23,11 @@
|
|||
this.field_146297_k.func_147108_a(new GuiStats(this, this.field_146297_k.field_71439_g.func_146107_m()));
|
||||
break;
|
||||
case 7:
|
||||
this.field_146297_k.func_147108_a(new GuiShareToLan(this));
|
||||
+ break;
|
||||
+ case 12:
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().showInGameModOptions(this);
|
||||
+ break;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,43 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiMainMenu.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiMainMenu.java
|
||||
@@ -511,6 +511,7 @@
|
||||
this.func_73731_b(this.field_146289_q, brd, 2, this.field_146295_m - ( 10 + i * (this.field_146289_q.field_78288_b + 1)), 16777215);
|
||||
}
|
||||
@@ -198,6 +198,11 @@
|
||||
this.field_146292_n.add(new GuiButton(1, this.field_146294_l / 2 - 100, p_73969_1_, I18n.func_135052_a("menu.singleplayer", new Object[0])));
|
||||
this.field_146292_n.add(new GuiButton(2, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 1, I18n.func_135052_a("menu.multiplayer", new Object[0])));
|
||||
this.field_146292_n.add(this.field_175372_K = new GuiButton(14, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.func_135052_a("menu.online", new Object[0])));
|
||||
+ GuiButton fmlModButton = new GuiButton(6, this.field_146294_l / 2 - 100, p_73969_1_ + p_73969_2_ * 2, I18n.func_135052_a("fml.menu.mods"));
|
||||
+ fmlModButton.field_146128_h = this.field_146294_l / 2 + 2;
|
||||
+ field_175372_K.field_146120_f = 98;
|
||||
+ fmlModButton.field_146120_f = 98;
|
||||
+ this.field_146292_n.add(fmlModButton);
|
||||
}
|
||||
|
||||
private void func_73972_b(int p_73972_1_, int p_73972_2_)
|
||||
@@ -245,6 +250,11 @@
|
||||
this.field_146297_k.func_71400_g();
|
||||
}
|
||||
|
||||
+ if (p_146284_1_.field_146127_k == 6)
|
||||
+ {
|
||||
+ this.field_146297_k.func_147108_a(new net.minecraftforge.fml.client.GuiModList(this));
|
||||
+ }
|
||||
+
|
||||
if (p_146284_1_.field_146127_k == 11)
|
||||
{
|
||||
this.field_146297_k.func_71371_a("Demo_World", "Demo_World", DemoWorldServer.field_73071_a);
|
||||
@@ -492,7 +502,16 @@
|
||||
s = s + " Demo";
|
||||
}
|
||||
|
||||
- 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(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(true));
|
||||
+ for (int i = 0; i < brandings.size(); i++)
|
||||
+ {
|
||||
+ String brd = brandings.get(i);
|
||||
+ if (!com.google.common.base.Strings.isNullOrEmpty(brd))
|
||||
+ {
|
||||
+ this.func_73731_b(this.field_146289_q, brd, 2, this.field_146295_m - ( 10 + i * (this.field_146289_q.field_78288_b + 1)), 16777215);
|
||||
+ }
|
||||
+ }
|
||||
+ net.minecraftforge.client.ForgeHooksClient.renderMainMenu(this, this.field_146289_q, this.field_146294_l, this.field_146295_m);
|
||||
String s1 = "Copyright Mojang AB. Do not distribute!";
|
||||
this.func_73731_b(this.field_146289_q, s1, this.field_146294_l - this.field_146289_q.func_78256_a(s1) - 2, this.field_146295_m - 10, -1);
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiMultiplayer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiMultiplayer.java
|
||||
@@ -41,6 +41,7 @@
|
||||
public GuiMultiplayer(GuiScreen p_i1040_1_)
|
||||
{
|
||||
this.field_146798_g = p_i1040_1_;
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().setupServerList();
|
||||
}
|
||||
|
||||
public void func_73866_w_()
|
||||
@@ -373,7 +374,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_));
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().connectToServer(this, p_146791_1_);
|
||||
}
|
||||
|
||||
public void func_146790_a(int p_146790_1_)
|
|
@ -0,0 +1,12 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java
|
||||
@@ -170,6 +170,9 @@
|
||||
long l = j - k;
|
||||
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(net.minecraftforge.fml.common.FMLCommonHandler.instance().getBrandings(false));
|
||||
+
|
||||
if (this.func_175236_d())
|
||||
{
|
||||
return arraylist;
|
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/GuiSelectWorld.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiSelectWorld.java
|
||||
@@ -187,7 +187,7 @@
|
||||
|
||||
if (this.field_146297_k.func_71359_d().func_90033_f(s))
|
||||
{
|
||||
- this.field_146297_k.func_71371_a(s, s1, (WorldSettings)null);
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().tryLoadExistingWorld(this, s, s1);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/ServerListEntryNormal.java
|
||||
@@ -84,7 +84,7 @@
|
||||
boolean flag2 = this.field_148301_e.field_82821_f < 47;
|
||||
boolean flag3 = flag1 || flag2;
|
||||
this.field_148300_d.field_71466_p.func_78276_b(this.field_148301_e.field_78847_a, p_180790_2_ + 32 + 3, p_180790_3_ + 1, 16777215);
|
||||
- List list = this.field_148300_d.field_71466_p.func_78271_c(this.field_148301_e.field_78843_d, p_180790_4_ - 32 - 2);
|
||||
+ List list = this.field_148300_d.field_71466_p.func_78271_c(net.minecraftforge.fml.client.FMLClientHandler.instance().fixDescription(this.field_148301_e.field_78843_d), p_180790_4_ - 48 - 2);
|
||||
|
||||
for (int l1 = 0; l1 < Math.min(list.size(), 2); ++l1)
|
||||
{
|
||||
@@ -178,6 +178,11 @@
|
||||
int k2 = p_180790_6_ - p_180790_2_;
|
||||
int l2 = p_180790_7_ - p_180790_3_;
|
||||
|
||||
+ String tooltip = net.minecraftforge.fml.client.FMLClientHandler.instance().enhanceServerListEntry(this, this.field_148301_e, p_180790_2_, p_180790_4_, p_180790_3_, k2, l2);
|
||||
+ if (tooltip != null)
|
||||
+ {
|
||||
+ this.field_148303_c.func_146793_a(tooltip);
|
||||
+ } else
|
||||
if (k2 >= p_180790_4_ - 15 && k2 <= p_180790_4_ - 5 && l2 >= 0 && l2 <= 8)
|
||||
{
|
||||
this.field_148303_c.func_146793_a(s1);
|
|
@ -0,0 +1,19 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/gui/achievement/GuiStats.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/gui/achievement/GuiStats.java
|
||||
@@ -769,6 +769,7 @@
|
||||
super(p_i45510_2_, GuiStats.this.field_146294_l, GuiStats.this.field_146295_m, 32, GuiStats.this.field_146295_m - 64, GuiStats.this.field_146289_q.field_78288_b * 4);
|
||||
this.func_148130_a(false);
|
||||
Iterator iterator = EntityList.field_75627_a.values().iterator();
|
||||
+ iterator = com.google.common.collect.Iterators.concat(iterator, net.minecraftforge.fml.common.registry.EntityRegistry.getEggs().values().iterator());
|
||||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
@@ -806,7 +807,7 @@
|
||||
protected void func_180791_a(int p_180791_1_, int p_180791_2_, int p_180791_3_, int p_180791_4_, int p_180791_5_, int p_180791_6_)
|
||||
{
|
||||
EntityList.EntityEggInfo entityegginfo = (EntityList.EntityEggInfo)this.field_148222_l.get(p_180791_1_);
|
||||
- String s = I18n.func_135052_a("entity." + EntityList.func_75617_a(entityegginfo.field_75613_a) + ".name", new Object[0]);
|
||||
+ String s = I18n.func_135052_a("entity." + entityegginfo.name + ".name", new Object[0]);
|
||||
int k1 = GuiStats.this.field_146546_t.func_77444_a(entityegginfo.field_151512_d);
|
||||
int l1 = GuiStats.this.field_146546_t.func_77444_a(entityegginfo.field_151513_e);
|
||||
String s1 = I18n.func_135052_a("stat.entityKills", new Object[] {Integer.valueOf(k1), s});
|
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/multiplayer/GuiConnecting.java
|
||||
@@ -69,7 +69,7 @@
|
||||
inetaddress = InetAddress.getByName(p_146367_1_);
|
||||
GuiConnecting.this.field_146371_g = NetworkManager.func_150726_a(inetaddress, p_146367_2_);
|
||||
GuiConnecting.this.field_146371_g.func_150719_a(new NetHandlerLoginClient(GuiConnecting.this.field_146371_g, GuiConnecting.this.field_146297_k, GuiConnecting.this.field_146374_i));
|
||||
- GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(47, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN));
|
||||
+ GuiConnecting.this.field_146371_g.func_179290_a(new C00Handshake(47, p_146367_1_, p_146367_2_, EnumConnectionState.LOGIN, true));
|
||||
GuiConnecting.this.field_146371_g.func_179290_a(new C00PacketLoginStart(GuiConnecting.this.field_146297_k.func_110432_I().func_148256_e()));
|
||||
}
|
||||
catch (UnknownHostException unknownhostexception)
|
|
@ -0,0 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/network/NetHandlerHandshakeMemory.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerHandshakeMemory.java
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
public void func_147383_a(C00Handshake p_147383_1_)
|
||||
{
|
||||
+ if (!net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerHandshake(p_147383_1_, this.field_147384_b)) return;
|
||||
this.field_147384_b.func_150723_a(p_147383_1_.func_149594_c());
|
||||
this.field_147384_b.func_150719_a(new NetHandlerLoginServer(this.field_147385_a, this.field_147384_b));
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerLoginClient.java
|
||||
@@ -92,7 +92,10 @@
|
||||
{
|
||||
this.field_175091_e = p_147390_1_.func_179730_a();
|
||||
this.field_147393_d.func_150723_a(EnumConnectionState.PLAY);
|
||||
- this.field_147393_d.func_150719_a(new NetHandlerPlayClient(this.field_147394_b, this.field_147395_c, this.field_147393_d, this.field_175091_e));
|
||||
+ net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.fmlClientHandshake(this.field_147393_d);
|
||||
+ NetHandlerPlayClient nhpc = new NetHandlerPlayClient(this.field_147394_b, this.field_147395_c, this.field_147393_d, this.field_175091_e);
|
||||
+ this.field_147393_d.func_150719_a(nhpc);
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().setPlayClient(nhpc);
|
||||
}
|
||||
|
||||
public void func_147231_a(IChatComponent p_147231_1_)
|
|
@ -1,5 +1,14 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java
|
||||
@@ -247,7 +247,7 @@
|
||||
{
|
||||
PacketThreadUtil.func_180031_a(p_147282_1_, this, this.field_147299_f);
|
||||
this.field_147299_f.field_71442_b = new PlayerControllerMP(this.field_147299_f, this);
|
||||
- this.field_147300_g = new WorldClient(this, new WorldSettings(0L, p_147282_1_.func_149198_e(), false, p_147282_1_.func_149195_d(), p_147282_1_.func_149196_i()), p_147282_1_.func_149194_f(), p_147282_1_.func_149192_g(), this.field_147299_f.field_71424_I);
|
||||
+ this.field_147300_g = new WorldClient(this, new WorldSettings(0L, p_147282_1_.func_149198_e(), false, p_147282_1_.func_149195_d(), p_147282_1_.func_149196_i()), net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.get(func_147298_b()).getOverrideDimension(p_147282_1_), p_147282_1_.func_149192_g(), this.field_147299_f.field_71424_I);
|
||||
this.field_147299_f.field_71474_y.field_74318_M = p_147282_1_.func_149192_g();
|
||||
this.field_147299_f.func_71403_a(this.field_147300_g);
|
||||
this.field_147299_f.field_71439_g.field_71093_bK = p_147282_1_.func_149194_f();
|
||||
@@ -410,7 +410,8 @@
|
||||
public void func_147286_a(S11PacketSpawnExperienceOrb p_147286_1_)
|
||||
{
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/network/OldServerPinger.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/network/OldServerPinger.java
|
||||
@@ -148,6 +148,7 @@
|
||||
p_147224_1_.func_147407_a((String)null);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().bindServerListData(p_147224_1_, serverstatusresponse);
|
||||
this.field_175092_e = Minecraft.func_71386_F();
|
||||
networkmanager.func_179290_a(new C01PacketPing(this.field_175092_e));
|
||||
this.field_147403_d = true;
|
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderVillager.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderVillager.java
|
||||
@@ -48,7 +48,7 @@
|
||||
case 4:
|
||||
return field_110906_m;
|
||||
default:
|
||||
- return field_110903_f;
|
||||
+ return net.minecraftforge.fml.common.registry.VillagerRegistry.getVillagerSkin(p_110775_1_.func_70946_n(), field_110903_f);
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,19 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
|
||||
@@ -73,6 +73,9 @@
|
||||
@@ -60,6 +60,7 @@
|
||||
public void func_94305_f()
|
||||
{
|
||||
Stitcher.Holder[] aholder = (Stitcher.Holder[])this.field_94319_a.toArray(new Stitcher.Holder[this.field_94319_a.size()]);
|
||||
+ net.minecraftforge.fml.common.ProgressManager.ProgressBar bar = net.minecraftforge.fml.common.ProgressManager.push("Texture stitching", aholder.length);
|
||||
Arrays.sort(aholder);
|
||||
Stitcher.Holder[] aholder1 = aholder;
|
||||
int i = aholder.length;
|
||||
@@ -67,10 +68,14 @@
|
||||
for (int j = 0; j < i; ++j)
|
||||
{
|
||||
Stitcher.Holder holder = aholder1[j];
|
||||
+ bar.step(holder.func_98150_a().func_94215_i());
|
||||
|
||||
if (!this.func_94310_b(holder))
|
||||
{
|
||||
String s = String.format("Unable to fit: %s - size: %dx%d - Maybe try a lowerresolution resourcepack?", new Object[] {holder.func_98150_a().func_94215_i(), Integer.valueOf(holder.func_98150_a().func_94211_a()), Integer.valueOf(holder.func_98150_a().func_94216_b())});
|
||||
|
@ -10,7 +23,15 @@
|
|||
throw new StitcherException(holder, s);
|
||||
}
|
||||
}
|
||||
@@ -276,7 +279,7 @@
|
||||
@@ -80,6 +85,7 @@
|
||||
this.field_94318_c = MathHelper.func_151236_b(this.field_94318_c);
|
||||
this.field_94315_d = MathHelper.func_151236_b(this.field_94315_d);
|
||||
}
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
}
|
||||
|
||||
public List func_94309_g()
|
||||
@@ -273,7 +279,7 @@
|
||||
|
||||
public String toString()
|
||||
{
|
||||
|
|
|
@ -0,0 +1,18 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureManager.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureManager.java
|
||||
@@ -143,12 +143,15 @@
|
||||
|
||||
public void func_110549_a(IResourceManager p_110549_1_)
|
||||
{
|
||||
+ net.minecraftforge.fml.common.ProgressManager.ProgressBar bar = net.minecraftforge.fml.common.ProgressManager.push("Reloading Texture Manager", this.field_110585_a.keySet().size(), true);
|
||||
Iterator iterator = this.field_110585_a.entrySet().iterator();
|
||||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
Entry entry = (Entry)iterator.next();
|
||||
+ bar.step(entry.getKey().toString());
|
||||
this.func_110579_a((ResourceLocation)entry.getKey(), (ITextureObject)entry.getValue());
|
||||
}
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
}
|
||||
}
|
|
@ -1,17 +1,63 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
|
||||
@@ -104,6 +104,8 @@
|
||||
@@ -29,6 +29,7 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TextureMap extends AbstractTexture implements ITickableTextureObject
|
||||
{
|
||||
+ private static final boolean ENABLE_SKIP = Boolean.parseBoolean(System.getProperty("fml.skipFirstTextureLoad", "true"));
|
||||
private static final Logger field_147635_d = LogManager.getLogger();
|
||||
public static final ResourceLocation field_174945_f = new ResourceLocation("missingno");
|
||||
public static final ResourceLocation field_110575_b = new ResourceLocation("textures/atlas/blocks.png");
|
||||
@@ -40,6 +41,7 @@
|
||||
private int field_147636_j;
|
||||
private final TextureAtlasSprite field_94249_f;
|
||||
private static final String __OBFID = "CL_00001058";
|
||||
+ private boolean skipFirst = false;
|
||||
|
||||
public TextureMap(String p_i46099_1_)
|
||||
{
|
||||
@@ -48,12 +50,23 @@
|
||||
|
||||
public TextureMap(String p_i46100_1_, IIconCreator p_i46100_2_)
|
||||
{
|
||||
+ this(p_i46100_1_, p_i46100_2_, false);
|
||||
+ }
|
||||
+
|
||||
+ public TextureMap(String p_i46100_1_, boolean skipFirst)
|
||||
+ {
|
||||
+ this(p_i46100_1_, null, skipFirst);
|
||||
+ }
|
||||
+
|
||||
+ public TextureMap(String p_i46100_1_, IIconCreator iconCreatorIn, boolean skipFirst)
|
||||
+ {
|
||||
this.field_94258_i = Lists.newArrayList();
|
||||
this.field_110574_e = Maps.newHashMap();
|
||||
this.field_94252_e = Maps.newHashMap();
|
||||
this.field_94249_f = new TextureAtlasSprite("missingno");
|
||||
this.field_94254_c = p_i46100_1_;
|
||||
- this.field_174946_m = p_i46100_2_;
|
||||
+ this.field_174946_m = iconCreatorIn;
|
||||
+ this.skipFirst = skipFirst && ENABLE_SKIP;
|
||||
}
|
||||
|
||||
private void func_110569_e()
|
||||
@@ -91,15 +104,29 @@
|
||||
this.field_94258_i.clear();
|
||||
int j = Integer.MAX_VALUE;
|
||||
int k = 1 << this.field_147636_j;
|
||||
+ net.minecraftforge.client.ForgeHooksClient.onTextureStitchedPre(this);
|
||||
+ net.minecraftforge.fml.common.FMLLog.info("Max texture size: %d", i);
|
||||
net.minecraftforge.fml.common.ProgressManager.ProgressBar bar = net.minecraftforge.fml.common.ProgressManager.push("Texture stitching", skipFirst ? 0 : this.field_110574_e.size());
|
||||
+ net.minecraftforge.fml.common.ProgressManager.ProgressBar bar = net.minecraftforge.fml.common.ProgressManager.push("Texture stitching", skipFirst ? 0 : this.field_110574_e.size());
|
||||
Iterator iterator = this.field_110574_e.entrySet().iterator();
|
||||
|
||||
@@ -115,6 +117,16 @@
|
||||
- while (iterator.hasNext())
|
||||
+ while (!skipFirst && iterator.hasNext())
|
||||
{
|
||||
Entry entry = (Entry)iterator.next();
|
||||
TextureAtlasSprite textureatlassprite = (TextureAtlasSprite)entry.getValue();
|
||||
ResourceLocation resourcelocation = new ResourceLocation(textureatlassprite.func_94215_i());
|
||||
ResourceLocation resourcelocation1 = this.func_147634_a(resourcelocation, 0);
|
||||
bar.step(resourcelocation1.func_110623_a());
|
||||
+ bar.step(resourcelocation1.func_110623_a());
|
||||
|
||||
+ if (textureatlassprite.hasCustomLoader(p_110571_1_, resourcelocation))
|
||||
+ {
|
||||
|
@ -26,7 +72,74 @@
|
|||
try
|
||||
{
|
||||
IResource iresource = p_110571_1_.func_110536_a(resourcelocation1);
|
||||
@@ -301,6 +313,9 @@
|
||||
@@ -150,12 +177,14 @@
|
||||
}
|
||||
catch (RuntimeException runtimeexception)
|
||||
{
|
||||
- field_147635_d.error("Unable to parse metadata from " + resourcelocation1, runtimeexception);
|
||||
+ //logger.error("Unable to parse metadata from " + resourcelocation1, runtimeexception);
|
||||
+ net.minecraftforge.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);
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().trackMissingTexture(resourcelocation1);
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -171,6 +200,7 @@
|
||||
stitcher.func_110934_a(textureatlassprite);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
int j1 = Math.min(j, k);
|
||||
int k1 = MathHelper.func_151239_c(j1);
|
||||
|
||||
@@ -181,10 +211,12 @@
|
||||
}
|
||||
|
||||
Iterator iterator1 = this.field_110574_e.values().iterator();
|
||||
+ bar = net.minecraftforge.fml.common.ProgressManager.push("Mipmap generation", skipFirst ? 0 : this.field_110574_e.size());
|
||||
|
||||
- while (iterator1.hasNext())
|
||||
+ while (!skipFirst && iterator1.hasNext())
|
||||
{
|
||||
final TextureAtlasSprite textureatlassprite1 = (TextureAtlasSprite)iterator1.next();
|
||||
+ bar.step(textureatlassprite1.func_94215_i());
|
||||
|
||||
try
|
||||
{
|
||||
@@ -225,9 +257,13 @@
|
||||
|
||||
this.field_94249_f.func_147963_d(this.field_147636_j);
|
||||
stitcher.func_110934_a(this.field_94249_f);
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
+ skipFirst = false;
|
||||
+ bar = net.minecraftforge.fml.common.ProgressManager.push("Texture creation", 3);
|
||||
|
||||
try
|
||||
{
|
||||
+ bar.step("Stitching");
|
||||
stitcher.func_94305_f();
|
||||
}
|
||||
catch (StitcherException stitcherexception)
|
||||
@@ -236,11 +272,13 @@
|
||||
}
|
||||
|
||||
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_180600_a(this.func_110552_b(), this.field_147636_j, stitcher.func_110935_a(), stitcher.func_110936_b());
|
||||
HashMap hashmap = Maps.newHashMap(this.field_110574_e);
|
||||
Iterator iterator2 = stitcher.func_94309_g().iterator();
|
||||
TextureAtlasSprite textureatlassprite2;
|
||||
|
||||
+ bar.step("Uploading GL texture");
|
||||
while (iterator2.hasNext())
|
||||
{
|
||||
textureatlassprite2 = (TextureAtlasSprite)iterator2.next();
|
||||
@@ -275,7 +313,11 @@
|
||||
textureatlassprite2.func_94217_a(this.field_94249_f);
|
||||
}
|
||||
|
||||
|
@ -34,9 +147,11 @@
|
|||
+
|
||||
+ if (!net.minecraftforge.common.ForgeModContainer.disableStitchedFileSaving)
|
||||
TextureUtil.func_177055_a(this.field_94254_c.replaceAll("/", "_"), this.func_110552_b(), this.field_147636_j, stitcher.func_110935_a(), stitcher.func_110936_b());
|
||||
net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(bar);
|
||||
}
|
||||
@@ -368,4 +383,37 @@
|
||||
|
||||
private ResourceLocation func_147634_a(ResourceLocation p_147634_1_, int p_147634_2_)
|
||||
@@ -341,4 +383,37 @@
|
||||
{
|
||||
return this.field_94249_f;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java
|
||||
@@ -202,9 +202,11 @@
|
||||
|
||||
public static void func_180600_a(int p_180600_0_, int p_180600_1_, int p_180600_2_, int p_180600_3_)
|
||||
{
|
||||
+ synchronized (net.minecraftforge.fml.client.SplashProgress.class)
|
||||
+ {
|
||||
func_147942_a(p_180600_0_);
|
||||
func_94277_a(p_180600_0_);
|
||||
-
|
||||
+ }
|
||||
if (p_180600_1_ >= 0)
|
||||
{
|
||||
GL11.glTexParameteri(GL11.GL_TEXTURE_2D, GL12.GL_TEXTURE_MAX_LEVEL, p_180600_1_);
|
|
@ -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
|
|
@ -0,0 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/resources/FallbackResourceManager.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/resources/FallbackResourceManager.java
|
||||
@@ -70,6 +70,7 @@
|
||||
throw new FileNotFoundException(p_110536_1_.toString());
|
||||
}
|
||||
|
||||
+ @SuppressWarnings("resource")
|
||||
protected InputStream func_177245_a(ResourceLocation p_177245_1_, IResourcePack p_177245_2_) throws IOException
|
||||
{
|
||||
InputStream inputstream = p_177245_2_.func_110590_a(p_177245_1_);
|
|
@ -0,0 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/resources/LanguageManager.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/resources/LanguageManager.java
|
||||
@@ -83,6 +83,7 @@
|
||||
}
|
||||
|
||||
field_135049_a.func_135022_a(p_110549_1_, arraylist);
|
||||
+ net.minecraftforge.fml.common.registry.LanguageRegistry.instance().mergeLanguageTable(field_135049_a.field_135032_a, this.field_135048_c);
|
||||
StringTranslate.func_135063_a(field_135049_a.field_135032_a);
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/resources/Locale.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/resources/Locale.java
|
||||
@@ -107,6 +107,8 @@
|
||||
|
||||
private void func_135021_a(InputStream p_135021_1_) throws IOException
|
||||
{
|
||||
+ p_135021_1_ = net.minecraftforge.fml.common.FMLCommonHandler.instance().loadLanguage(field_135032_a, p_135021_1_);
|
||||
+ if (p_135021_1_ == null) return;
|
||||
Iterator iterator = IOUtils.readLines(p_135021_1_, Charsets.UTF_8).iterator();
|
||||
|
||||
while (iterator.hasNext())
|
|
@ -0,0 +1,46 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/resources/SimpleReloadableResourceManager.java
|
||||
@@ -95,6 +95,7 @@
|
||||
public void func_110541_a(List p_110541_1_)
|
||||
{
|
||||
this.func_110543_a();
|
||||
+ net.minecraftforge.fml.common.ProgressManager.ProgressBar resReload = net.minecraftforge.fml.common.ProgressManager.push("Loading Resources", p_110541_1_.size()+1, true);
|
||||
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,26 +113,35 @@
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
IResourcePack iresourcepack = (IResourcePack)iterator.next();
|
||||
+ resReload.step(iresourcepack.func_130077_b());
|
||||
this.func_110545_a(iresourcepack);
|
||||
}
|
||||
|
||||
+ resReload.step("Reloading listeners");
|
||||
this.func_110544_b();
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(resReload);
|
||||
}
|
||||
|
||||
public void func_110542_a(IResourceManagerReloadListener p_110542_1_)
|
||||
{
|
||||
this.field_110546_b.add(p_110542_1_);
|
||||
+ net.minecraftforge.fml.common.ProgressManager.ProgressBar resReload = net.minecraftforge.fml.common.ProgressManager.push("Loading Resource", 1);
|
||||
+ resReload.step(p_110542_1_.getClass());
|
||||
p_110542_1_.func_110549_a(this);
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(resReload);
|
||||
}
|
||||
|
||||
private void func_110544_b()
|
||||
{
|
||||
Iterator iterator = this.field_110546_b.iterator();
|
||||
|
||||
+ net.minecraftforge.fml.common.ProgressManager.ProgressBar resReload = net.minecraftforge.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);
|
||||
}
|
||||
+ net.minecraftforge.fml.common.ProgressManager.pop(resReload);
|
||||
}
|
||||
}
|
|
@ -17,7 +17,26 @@
|
|||
catch (IOException ioexception)
|
||||
{
|
||||
throw new RuntimeException("Encountered an exception when loading model definition of model " + resourcelocation1.toString(), ioexception);
|
||||
@@ -499,6 +500,11 @@
|
||||
@@ -318,6 +319,7 @@
|
||||
|
||||
protected void func_177592_e()
|
||||
{
|
||||
+ this.field_177613_u.clear(); //FML clear this to prevent double ups.
|
||||
this.field_177613_u.put(Item.func_150898_a(Blocks.field_150348_b), Lists.newArrayList(new String[] {"stone", "granite", "granite_smooth", "diorite", "diorite_smooth", "andesite", "andesite_smooth"}));
|
||||
this.field_177613_u.put(Item.func_150898_a(Blocks.field_150346_d), Lists.newArrayList(new String[] {"dirt", "coarse_dirt", "podzol"}));
|
||||
this.field_177613_u.put(Item.func_150898_a(Blocks.field_150344_f), Lists.newArrayList(new String[] {"oak_planks", "spruce_planks", "birch_planks", "jungle_planks", "acacia_planks", "dark_oak_planks"}));
|
||||
@@ -360,6 +362,10 @@
|
||||
this.field_177613_u.put(Item.func_150898_a(Blocks.field_180390_bo), Lists.newArrayList(new String[] {"oak_fence_gate"}));
|
||||
this.field_177613_u.put(Item.func_150898_a(Blocks.field_180407_aO), Lists.newArrayList(new String[] {"oak_fence"}));
|
||||
this.field_177613_u.put(Items.field_179570_aq, Lists.newArrayList(new String[] {"oak_door"}));
|
||||
+ for (Entry<net.minecraftforge.fml.common.registry.RegistryDelegate<Item>, Set<String>> e : customVariantNames.entrySet())
|
||||
+ {
|
||||
+ this.field_177613_u.put(e.getKey().get(), Lists.newArrayList(e.getValue().iterator()));
|
||||
+ }
|
||||
}
|
||||
|
||||
protected List func_177596_a(Item p_177596_1_)
|
||||
@@ -494,6 +500,11 @@
|
||||
|
||||
private IBakedModel func_177578_a(ModelBlock p_177578_1_, ModelRotation p_177578_2_, boolean p_177578_3_)
|
||||
{
|
||||
|
@ -29,7 +48,7 @@
|
|||
TextureAtlasSprite textureatlassprite = (TextureAtlasSprite)this.field_177599_g.get(new ResourceLocation(p_177578_1_.func_178308_c("particle")));
|
||||
SimpleBakedModel.Builder builder = (new SimpleBakedModel.Builder(p_177578_1_)).func_177646_a(textureatlassprite);
|
||||
Iterator iterator = p_177578_1_.func_178298_a().iterator();
|
||||
@@ -514,13 +520,13 @@
|
||||
@@ -509,13 +520,13 @@
|
||||
BlockPartFace blockpartface = (BlockPartFace)blockpart.field_178240_c.get(enumfacing);
|
||||
TextureAtlasSprite textureatlassprite1 = (TextureAtlasSprite)this.field_177599_g.get(new ResourceLocation(p_177578_1_.func_178308_c(blockpartface.field_178242_d)));
|
||||
|
||||
|
@ -46,7 +65,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -530,9 +536,14 @@
|
||||
@@ -525,9 +536,14 @@
|
||||
|
||||
private BakedQuad func_177589_a(BlockPart p_177589_1_, BlockPartFace p_177589_2_, TextureAtlasSprite p_177589_3_, EnumFacing p_177589_4_, ModelRotation p_177589_5_, boolean p_177589_6_)
|
||||
{
|
||||
|
@ -62,3 +81,23 @@
|
|||
private void func_177597_h()
|
||||
{
|
||||
this.func_177574_i();
|
||||
@@ -809,4 +825,19 @@
|
||||
field_177617_q.field_178317_b = "class generation marker";
|
||||
field_177616_r.field_178317_b = "block entity marker";
|
||||
}
|
||||
+
|
||||
+ /***********************************************************
|
||||
+ * FML Start
|
||||
+ ***********************************************************/
|
||||
+ private static Map<net.minecraftforge.fml.common.registry.RegistryDelegate<Item>, Set<String>> customVariantNames = Maps.newHashMap();
|
||||
+ public static void addVariantName(Item item, String... names)
|
||||
+ {
|
||||
+ if (customVariantNames.containsKey(item.delegate))
|
||||
+ customVariantNames.get(item.delegate).addAll(Lists.newArrayList(names));
|
||||
+ else
|
||||
+ customVariantNames.put(item.delegate, Sets.newHashSet(names));
|
||||
+ }
|
||||
+ /***********************************************************
|
||||
+ * FML End
|
||||
+ ***********************************************************/
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/client/settings/GameSettings.java
|
||||
+++ ../src-work/minecraft/net/minecraft/client/settings/GameSettings.java
|
||||
@@ -1067,6 +1067,7 @@
|
||||
|
||||
public void func_74303_b()
|
||||
{
|
||||
+ if (net.minecraftforge.fml.client.FMLClientHandler.instance().isLoading()) return;
|
||||
try
|
||||
{
|
||||
PrintWriter printwriter = new PrintWriter(new FileWriter(this.field_74354_ai));
|
19
patches/minecraft/net/minecraft/crash/CrashReport.java.patch
Normal file
19
patches/minecraft/net/minecraft/crash/CrashReport.java.patch
Normal file
|
@ -0,0 +1,19 @@
|
|||
--- ../src-base/minecraft/net/minecraft/crash/CrashReport.java
|
||||
+++ ../src-work/minecraft/net/minecraft/crash/CrashReport.java
|
||||
@@ -126,6 +126,7 @@
|
||||
return IntCache.func_85144_b();
|
||||
}
|
||||
});
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().enhanceCrashReport(this, this.field_85061_c);
|
||||
}
|
||||
|
||||
public String func_71501_a()
|
||||
@@ -220,6 +221,8 @@
|
||||
{
|
||||
StringBuilder stringbuilder = new StringBuilder();
|
||||
stringbuilder.append("---- Minecraft Crash Report ----\n");
|
||||
+ net.minecraftforge.fml.common.asm.transformers.BlamingTransformer.onCrash(stringbuilder);
|
||||
+ net.minecraftforge.fml.relauncher.CoreModManager.onCrash(stringbuilder);
|
||||
stringbuilder.append("// ");
|
||||
stringbuilder.append(func_71503_h());
|
||||
stringbuilder.append("\n\n");
|
|
@ -8,3 +8,61 @@
|
|||
if (field_75625_b.containsKey(p_75618_1_))
|
||||
{
|
||||
throw new IllegalArgumentException("ID is already registered: " + p_75618_1_);
|
||||
@@ -153,9 +154,10 @@
|
||||
p_75615_0_.func_82580_o("Type");
|
||||
}
|
||||
|
||||
+ Class oclass = null;
|
||||
try
|
||||
{
|
||||
- Class oclass = (Class)field_75625_b.get(p_75615_0_.func_74779_i("id"));
|
||||
+ oclass = (Class)field_75625_b.get(p_75615_0_.func_74779_i("id"));
|
||||
|
||||
if (oclass != null)
|
||||
{
|
||||
@@ -169,7 +171,17 @@
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
+ try
|
||||
+ {
|
||||
entity.func_70020_e(p_75615_0_);
|
||||
+ }
|
||||
+ catch (Exception e)
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.FMLLog.log(org.apache.logging.log4j.Level.ERROR, e,
|
||||
+ "An Entity %s(%s) has thrown an exception during loading, its state cannot be restored. Report this to the mod author",
|
||||
+ p_75615_0_.func_74779_i("id"), oclass.getName());
|
||||
+ entity = null;
|
||||
+ }
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -344,7 +356,9 @@
|
||||
|
||||
public static class EntityEggInfo
|
||||
{
|
||||
+ @Deprecated // This is not always a valid number in the global ID list.
|
||||
public final int field_75613_a;
|
||||
+ public final String name;
|
||||
public final int field_75611_b;
|
||||
public final int field_75612_c;
|
||||
public final StatBase field_151512_d;
|
||||
@@ -358,6 +372,17 @@
|
||||
this.field_75612_c = p_i1583_3_;
|
||||
this.field_151512_d = StatList.func_151182_a(this);
|
||||
this.field_151513_e = StatList.func_151176_b(this);
|
||||
+ this.name = EntityList.func_75617_a(p_i1583_1_);
|
||||
}
|
||||
+
|
||||
+ public EntityEggInfo(String name, int primaryColor, int secondaryColor)
|
||||
+ {
|
||||
+ this.field_75613_a = -1;
|
||||
+ this.name = name;
|
||||
+ this.field_75611_b = primaryColor;
|
||||
+ this.field_75612_c = secondaryColor;
|
||||
+ this.field_151512_d = (new StatBase("stat.killEntity." + name, new net.minecraft.util.ChatComponentTranslation("stat.entityKill", new net.minecraft.util.ChatComponentTranslation("entity." + name + ".name")))).func_75971_g();
|
||||
+ this.field_151513_e = (new StatBase("stat.entityKilledBy." + name, new net.minecraft.util.ChatComponentTranslation("stat.entityKilledBy", new net.minecraft.util.ChatComponentTranslation("entity." + name + ".name")))).func_75971_g();
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,15 @@
|
|||
--- ../src-base/minecraft/net/minecraft/entity/EntityTracker.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/EntityTracker.java
|
||||
@@ -357,4 +357,23 @@
|
||||
@@ -58,6 +58,8 @@
|
||||
|
||||
public void func_72786_a(Entity p_72786_1_)
|
||||
{
|
||||
+ if (net.minecraftforge.fml.common.registry.EntityRegistry.instance().tryTrackingEntity(this, p_72786_1_)) return;
|
||||
+
|
||||
if (p_72786_1_ instanceof EntityPlayerMP)
|
||||
{
|
||||
this.func_72791_a(p_72786_1_, 512, 2);
|
||||
@@ -355,4 +357,23 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,21 @@
|
|||
--- ../src-base/minecraft/net/minecraft/entity/EntityTrackerEntry.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/EntityTrackerEntry.java
|
||||
@@ -445,12 +445,14 @@
|
||||
@@ -388,6 +388,14 @@
|
||||
this.field_73138_k = this.field_73132_a.field_70181_x;
|
||||
this.field_73135_l = this.field_73132_a.field_70179_y;
|
||||
|
||||
+ int posX = MathHelper.func_76128_c(this.field_73132_a.field_70165_t * 32.0D);
|
||||
+ int posY = MathHelper.func_76128_c(this.field_73132_a.field_70163_u * 32.0D);
|
||||
+ int posZ = MathHelper.func_76128_c(this.field_73132_a.field_70161_v * 32.0D);
|
||||
+ if (posX != this.field_73128_d || posY != this.field_73129_e || posZ != this.field_73126_f)
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.makeEntitySpawnAdjustment(this.field_73132_a, p_73117_1_, this.field_73128_d, this.field_73129_e, this.field_73126_f);
|
||||
+ }
|
||||
+
|
||||
if (this.field_73143_t && !(packet instanceof S0FPacketSpawnMob))
|
||||
{
|
||||
p_73117_1_.field_71135_a.func_147359_a(new S12PacketEntityVelocity(this.field_73132_a.func_145782_y(), this.field_73132_a.field_70159_w, this.field_73132_a.field_70181_x, this.field_73132_a.field_70179_y));
|
||||
@@ -437,12 +445,14 @@
|
||||
p_73117_1_.field_71135_a.func_147359_a(new S1DPacketEntityEffect(this.field_73132_a.func_145782_y(), potioneffect));
|
||||
}
|
||||
}
|
||||
|
@ -15,3 +30,13 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -474,6 +484,9 @@
|
||||
field_151262_p.warn("Fetching addPacket for removed entity");
|
||||
}
|
||||
|
||||
+ Packet pkt = net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.getEntitySpawningPacket(this.field_73132_a);
|
||||
+ if (pkt != null) return pkt;
|
||||
+
|
||||
if (this.field_73132_a instanceof EntityItem)
|
||||
{
|
||||
return new S0EPacketSpawnObject(this.field_73132_a, 2, 1);
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/entity/boss/IBossDisplayData.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/boss/IBossDisplayData.java
|
||||
@@ -4,7 +4,6 @@
|
||||
import net.minecraftforge.fml.relauncher.Side;
|
||||
import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
|
||||
-@SideOnly(Side.CLIENT)
|
||||
public interface IBossDisplayData
|
||||
{
|
||||
float func_110138_aP();
|
|
@ -84,3 +84,11 @@
|
|||
{
|
||||
if (itemstack.func_77973_b() == Item.func_150898_a(Blocks.field_150364_r))
|
||||
{
|
||||
@@ -366,6 +386,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerItemPickupEvent(p_70100_1_, this);
|
||||
if (!this.func_174814_R())
|
||||
{
|
||||
this.field_70170_p.func_72956_a(p_70100_1_, "random.pop", 0.2F, ((this.field_70146_Z.nextFloat() - this.field_70146_Z.nextFloat()) * 0.7F + 1.0F) * 2.0F);
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/entity/monster/EntitySlime.java
|
||||
+++ ../src-work/minecraft/net/minecraft/entity/monster/EntitySlime.java
|
||||
@@ -271,7 +271,7 @@
|
||||
{
|
||||
Chunk chunk = this.field_70170_p.func_175726_f(new BlockPos(MathHelper.func_76128_c(this.field_70165_t), 0, MathHelper.func_76128_c(this.field_70161_v)));
|
||||
|
||||
- if (this.field_70170_p.func_72912_H().func_76067_t() == WorldType.field_77138_c && this.field_70146_Z.nextInt(4) != 1)
|
||||
+ if (this.field_70170_p.func_72912_H().func_76067_t().handleSlimeSpawnReduction(field_70146_Z, field_70170_p))
|
||||
{
|
||||
return false;
|
||||
}
|
File diff suppressed because one or more lines are too long
|
@ -42,7 +42,15 @@
|
|||
}
|
||||
|
||||
this.func_71041_bz();
|
||||
@@ -214,6 +230,14 @@
|
||||
@@ -200,6 +216,7 @@
|
||||
|
||||
public void func_70071_h_()
|
||||
{
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPlayerPreTick(this);
|
||||
this.field_70145_X = this.func_175149_v();
|
||||
|
||||
if (this.func_175149_v())
|
||||
@@ -213,6 +230,14 @@
|
||||
|
||||
if (itemstack == this.field_71074_e)
|
||||
{
|
||||
|
@ -57,7 +65,7 @@
|
|||
if (this.field_71072_f <= 25 && this.field_71072_f % 4 == 0)
|
||||
{
|
||||
this.func_71010_c(itemstack, 5);
|
||||
@@ -223,6 +247,7 @@
|
||||
@@ -222,6 +247,7 @@
|
||||
{
|
||||
this.func_71036_o();
|
||||
}
|
||||
|
@ -65,7 +73,7 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
@@ -268,7 +293,7 @@
|
||||
@@ -267,7 +293,7 @@
|
||||
|
||||
super.func_70071_h_();
|
||||
|
||||
|
@ -74,7 +82,15 @@
|
|||
{
|
||||
this.func_71053_j();
|
||||
this.field_71070_bA = this.field_71069_bz;
|
||||
@@ -415,11 +440,13 @@
|
||||
@@ -344,6 +370,7 @@
|
||||
{
|
||||
this.func_70107_b(d3, this.field_70163_u, d4);
|
||||
}
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPlayerPostTick(this);
|
||||
}
|
||||
|
||||
public int func_82145_z()
|
||||
@@ -413,11 +440,13 @@
|
||||
int i = this.field_71074_e.field_77994_a;
|
||||
ItemStack itemstack = this.field_71074_e.func_77950_b(this.field_70170_p, this);
|
||||
|
||||
|
@ -89,7 +105,7 @@
|
|||
{
|
||||
this.field_71071_by.field_70462_a[this.field_71071_by.field_70461_c] = null;
|
||||
}
|
||||
@@ -479,11 +506,11 @@
|
||||
@@ -477,11 +506,11 @@
|
||||
this.field_71109_bG = 0.0F;
|
||||
this.func_71015_k(this.field_70165_t - d0, this.field_70163_u - d1, this.field_70161_v - d2);
|
||||
|
||||
|
@ -103,7 +119,7 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -613,11 +640,15 @@
|
||||
@@ -611,11 +640,15 @@
|
||||
|
||||
public void func_70645_a(DamageSource p_70645_1_)
|
||||
{
|
||||
|
@ -119,7 +135,7 @@
|
|||
if (this.func_70005_c_().equals("Notch"))
|
||||
{
|
||||
this.func_146097_a(new ItemStack(Items.field_151034_e, 1), true, false);
|
||||
@@ -628,6 +659,9 @@
|
||||
@@ -626,6 +659,9 @@
|
||||
this.field_71071_by.func_70436_m();
|
||||
}
|
||||
|
||||
|
@ -129,7 +145,7 @@
|
|||
if (p_70645_1_ != null)
|
||||
{
|
||||
this.field_70159_w = (double)(-MathHelper.func_76134_b((this.field_70739_aP + this.field_70177_z) * (float)Math.PI / 180.0F) * 0.1F);
|
||||
@@ -716,12 +750,25 @@
|
||||
@@ -714,12 +750,25 @@
|
||||
|
||||
public EntityItem func_71040_bB(boolean p_71040_1_)
|
||||
{
|
||||
|
@ -157,7 +173,7 @@
|
|||
}
|
||||
|
||||
public EntityItem func_146097_a(ItemStack p_146097_1_, boolean p_146097_2_, boolean p_146097_3_)
|
||||
@@ -782,13 +829,25 @@
|
||||
@@ -780,13 +829,25 @@
|
||||
|
||||
public void func_71012_a(EntityItem p_71012_1_)
|
||||
{
|
||||
|
@ -184,7 +200,7 @@
|
|||
if (f > 1.0F)
|
||||
{
|
||||
int i = EnchantmentHelper.func_77509_b(this);
|
||||
@@ -838,12 +897,13 @@
|
||||
@@ -836,12 +897,13 @@
|
||||
f /= 5.0F;
|
||||
}
|
||||
|
||||
|
@ -200,7 +216,7 @@
|
|||
}
|
||||
|
||||
public void func_70037_a(NBTTagCompound p_70037_1_)
|
||||
@@ -879,6 +939,16 @@
|
||||
@@ -877,6 +939,16 @@
|
||||
this.field_82248_d = p_70037_1_.func_74767_n("SpawnForced");
|
||||
}
|
||||
|
||||
|
@ -217,7 +233,7 @@
|
|||
this.field_71100_bB.func_75112_a(p_70037_1_);
|
||||
this.field_71075_bZ.func_75095_b(p_70037_1_);
|
||||
|
||||
@@ -910,6 +980,23 @@
|
||||
@@ -908,6 +980,23 @@
|
||||
p_70014_1_.func_74757_a("SpawnForced", this.field_82248_d);
|
||||
}
|
||||
|
||||
|
@ -241,7 +257,7 @@
|
|||
this.field_71100_bB.func_75117_b(p_70014_1_);
|
||||
this.field_71075_bZ.func_75091_a(p_70014_1_);
|
||||
p_70014_1_.func_74782_a("EnderItems", this.field_71078_a.func_70487_g());
|
||||
@@ -923,6 +1010,7 @@
|
||||
@@ -921,6 +1010,7 @@
|
||||
|
||||
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_)
|
||||
{
|
||||
|
@ -249,7 +265,7 @@
|
|||
if (this.func_180431_b(p_70097_1_))
|
||||
{
|
||||
return false;
|
||||
@@ -1023,12 +1111,15 @@
|
||||
@@ -1021,12 +1111,15 @@
|
||||
{
|
||||
if (!this.func_180431_b(p_70665_1_))
|
||||
{
|
||||
|
@ -266,7 +282,7 @@
|
|||
p_70665_2_ = this.func_70672_c(p_70665_1_, p_70665_2_);
|
||||
float f1 = p_70665_2_;
|
||||
p_70665_2_ = Math.max(p_70665_2_ - this.func_110139_bj(), 0.0F);
|
||||
@@ -1076,6 +1167,7 @@
|
||||
@@ -1074,6 +1167,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -274,7 +290,7 @@
|
|||
ItemStack itemstack = this.func_71045_bC();
|
||||
ItemStack itemstack1 = itemstack != null ? itemstack.func_77946_l() : null;
|
||||
|
||||
@@ -1127,7 +1219,9 @@
|
||||
@@ -1125,7 +1219,9 @@
|
||||
|
||||
public void func_71028_bD()
|
||||
{
|
||||
|
@ -284,7 +300,7 @@
|
|||
}
|
||||
|
||||
public double func_70033_W()
|
||||
@@ -1137,6 +1231,7 @@
|
||||
@@ -1135,6 +1231,7 @@
|
||||
|
||||
public void func_71059_n(Entity p_71059_1_)
|
||||
{
|
||||
|
@ -292,7 +308,7 @@
|
|||
if (p_71059_1_.func_70075_an())
|
||||
{
|
||||
if (!p_71059_1_.func_85031_j(this))
|
||||
@@ -1307,6 +1402,8 @@
|
||||
@@ -1305,6 +1402,8 @@
|
||||
|
||||
public EntityPlayer.EnumStatus func_180469_a(BlockPos p_180469_1_)
|
||||
{
|
||||
|
@ -301,7 +317,7 @@
|
|||
if (!this.field_70170_p.field_72995_K)
|
||||
{
|
||||
if (this.func_70608_bn() || !this.func_70089_S())
|
||||
@@ -1348,7 +1445,7 @@
|
||||
@@ -1346,7 +1445,7 @@
|
||||
|
||||
if (this.field_70170_p.func_175667_e(p_180469_1_))
|
||||
{
|
||||
|
@ -310,7 +326,7 @@
|
|||
float f = 0.5F;
|
||||
float f1 = 0.5F;
|
||||
|
||||
@@ -1411,13 +1508,14 @@
|
||||
@@ -1409,13 +1508,14 @@
|
||||
|
||||
public void func_70999_a(boolean p_70999_1_, boolean p_70999_2_, boolean p_70999_3_)
|
||||
{
|
||||
|
@ -328,7 +344,7 @@
|
|||
|
||||
if (blockpos == null)
|
||||
{
|
||||
@@ -1444,12 +1542,12 @@
|
||||
@@ -1442,12 +1542,12 @@
|
||||
|
||||
private boolean func_175143_p()
|
||||
{
|
||||
|
@ -343,7 +359,7 @@
|
|||
{
|
||||
if (!p_180467_2_)
|
||||
{
|
||||
@@ -1466,7 +1564,7 @@
|
||||
@@ -1464,7 +1564,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -352,7 +368,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1475,7 +1573,7 @@
|
||||
@@ -1473,7 +1573,7 @@
|
||||
{
|
||||
if (this.field_71081_bT != null)
|
||||
{
|
||||
|
@ -361,7 +377,7 @@
|
|||
|
||||
switch (EntityPlayer.SwitchEnumFacing.field_179420_a[enumfacing.ordinal()])
|
||||
{
|
||||
@@ -1513,16 +1611,22 @@
|
||||
@@ -1511,16 +1611,22 @@
|
||||
|
||||
public BlockPos func_180470_cg()
|
||||
{
|
||||
|
@ -386,7 +402,7 @@
|
|||
if (p_180473_1_ != null)
|
||||
{
|
||||
this.field_71077_c = p_180473_1_;
|
||||
@@ -1704,6 +1808,10 @@
|
||||
@@ -1702,6 +1808,10 @@
|
||||
|
||||
super.func_180430_e(p_180430_1_, p_180430_2_);
|
||||
}
|
||||
|
@ -397,7 +413,15 @@
|
|||
}
|
||||
|
||||
protected void func_71061_d_()
|
||||
@@ -1840,6 +1948,8 @@
|
||||
@@ -1725,6 +1835,7 @@
|
||||
}
|
||||
|
||||
EntityList.EntityEggInfo entityegginfo = (EntityList.EntityEggInfo)EntityList.field_75627_a.get(Integer.valueOf(EntityList.func_75619_a(p_70074_1_)));
|
||||
+ if (entityegginfo == null) entityegginfo = net.minecraftforge.fml.common.registry.EntityRegistry.getEggs().get(EntityList.func_75621_b(p_70074_1_));
|
||||
|
||||
if (entityegginfo != null)
|
||||
{
|
||||
@@ -1837,6 +1948,8 @@
|
||||
{
|
||||
if (p_71008_1_ != this.field_71074_e)
|
||||
{
|
||||
|
@ -406,7 +430,7 @@
|
|||
this.field_71074_e = p_71008_1_;
|
||||
this.field_71072_f = p_71008_2_;
|
||||
|
||||
@@ -1909,6 +2019,10 @@
|
||||
@@ -1906,6 +2019,10 @@
|
||||
this.field_71106_cc = p_71049_1_.field_71106_cc;
|
||||
this.func_85040_s(p_71049_1_.func_71037_bA());
|
||||
this.field_82152_aq = p_71049_1_.field_82152_aq;
|
||||
|
@ -417,7 +441,7 @@
|
|||
}
|
||||
else if (this.field_70170_p.func_82736_K().func_82766_b("keepInventory"))
|
||||
{
|
||||
@@ -1921,6 +2035,18 @@
|
||||
@@ -1918,6 +2035,18 @@
|
||||
|
||||
this.field_71078_a = p_71049_1_.field_71078_a;
|
||||
this.func_70096_w().func_75692_b(10, Byte.valueOf(p_71049_1_.func_70096_w().func_75683_a(10)));
|
||||
|
@ -436,7 +460,7 @@
|
|||
}
|
||||
|
||||
protected boolean func_70041_e_()
|
||||
@@ -1954,7 +2080,14 @@
|
||||
@@ -1951,7 +2080,14 @@
|
||||
|
||||
public void func_70062_b(int p_70062_1_, ItemStack p_70062_2_)
|
||||
{
|
||||
|
@ -452,7 +476,7 @@
|
|||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -1999,7 +2132,10 @@
|
||||
@@ -1996,7 +2132,10 @@
|
||||
|
||||
public IChatComponent func_145748_c_()
|
||||
{
|
||||
|
@ -464,7 +488,7 @@
|
|||
chatcomponenttext.func_150256_b().func_150241_a(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/msg " + this.func_70005_c_() + " "));
|
||||
chatcomponenttext.func_150256_b().func_150209_a(this.func_174823_aP());
|
||||
chatcomponenttext.func_150256_b().func_179989_a(this.func_70005_c_());
|
||||
@@ -2008,7 +2144,7 @@
|
||||
@@ -2005,7 +2144,7 @@
|
||||
|
||||
public float func_70047_e()
|
||||
{
|
||||
|
@ -473,10 +497,26 @@
|
|||
|
||||
if (this.func_70608_bn())
|
||||
{
|
||||
@@ -2158,6 +2294,120 @@
|
||||
net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(this, mod, modGuiId, world, x, y, z);
|
||||
@@ -2139,6 +2278,136 @@
|
||||
this.field_175153_bG = p_175150_1_;
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * Opens a GUI with this player, uses FML's IGuiHandler system.
|
||||
+ * Allows for extension by modders.
|
||||
+ *
|
||||
+ * @param mod The mod trying to open a GUI
|
||||
+ * @param modGuiId GUI ID
|
||||
+ * @param world Current World
|
||||
+ * @param x Passed directly to IGuiHandler, data meaningless Typically world X position
|
||||
+ * @param y Passed directly to IGuiHandler, data meaningless Typically world Y position
|
||||
+ * @param z Passed directly to IGuiHandler, data meaningless Typically world Z position
|
||||
+ */
|
||||
+ public void openGui(Object mod, int modGuiId, World world, int x, int y, int z)
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.openGui(this, mod, modGuiId, world, x, y, z);
|
||||
+ }
|
||||
+
|
||||
+
|
||||
+ /* ======================================== FORGE START =====================================*/
|
||||
+ /**
|
||||
|
|
|
@ -74,7 +74,15 @@
|
|||
}
|
||||
|
||||
Collection collection = this.field_70170_p.func_96441_U().func_96520_a(IScoreObjectiveCriteria.field_96642_c);
|
||||
@@ -850,6 +867,7 @@
|
||||
@@ -481,6 +498,7 @@
|
||||
if (entitylivingbase != null)
|
||||
{
|
||||
EntityList.EntityEggInfo entityegginfo = (EntityList.EntityEggInfo)EntityList.field_75627_a.get(Integer.valueOf(EntityList.func_75619_a(entitylivingbase)));
|
||||
+ if (entityegginfo == null) entityegginfo = net.minecraftforge.fml.common.registry.EntityRegistry.getEggs().get(EntityList.func_75621_b(entitylivingbase));
|
||||
|
||||
if (entityegginfo != null)
|
||||
{
|
||||
@@ -849,6 +867,7 @@
|
||||
{
|
||||
if (p_71064_1_ != null)
|
||||
{
|
||||
|
|
|
@ -1,8 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/inventory/SlotCrafting.java
|
||||
+++ ../src-work/minecraft/net/minecraft/inventory/SlotCrafting.java
|
||||
@@ -115,7 +115,9 @@
|
||||
@@ -113,8 +113,11 @@
|
||||
|
||||
public void func_82870_a(EntityPlayer p_82870_1_, ItemStack p_82870_2_)
|
||||
{
|
||||
net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent(p_82870_1_, p_82870_2_, field_75239_a);
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerCraftingEvent(p_82870_1_, p_82870_2_, field_75239_a);
|
||||
this.func_75208_c(p_82870_2_);
|
||||
+ net.minecraftforge.common.ForgeHooks.setCraftingPlayer(p_82870_1_);
|
||||
ItemStack[] aitemstack = CraftingManager.func_77594_a().func_180303_b(this.field_75239_a, p_82870_1_.field_70170_p);
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/inventory/SlotFurnaceOutput.java
|
||||
+++ ../src-work/minecraft/net/minecraft/inventory/SlotFurnaceOutput.java
|
||||
@@ -83,6 +83,8 @@
|
||||
|
||||
this.field_75228_b = 0;
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerSmeltedEvent(field_75229_a, p_75208_1_);
|
||||
+
|
||||
if (p_75208_1_.func_77973_b() == Items.field_151042_j)
|
||||
{
|
||||
this.field_75229_a.func_71029_a(AchievementList.field_76016_k);
|
|
@ -1,6 +1,27 @@
|
|||
--- ../src-base/minecraft/net/minecraft/item/Item.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/Item.java
|
||||
@@ -129,6 +129,7 @@
|
||||
@@ -47,8 +47,8 @@
|
||||
|
||||
public class Item
|
||||
{
|
||||
- public static final RegistryNamespaced field_150901_e = new RegistryNamespaced();
|
||||
- private static final Map field_179220_a = Maps.newHashMap();
|
||||
+ public static final RegistryNamespaced field_150901_e = net.minecraftforge.fml.common.registry.GameData.getItemRegistry();
|
||||
+ private static final Map field_179220_a = net.minecraftforge.fml.common.registry.GameData.getBlockItemMap();
|
||||
protected static final UUID field_111210_e = UUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
|
||||
private CreativeTabs field_77701_a;
|
||||
protected static Random field_77697_d = new Random();
|
||||
@@ -61,6 +61,9 @@
|
||||
private String field_77774_bZ;
|
||||
private static final String __OBFID = "CL_00000041";
|
||||
|
||||
+ public final net.minecraftforge.fml.common.registry.RegistryDelegate<Item> delegate =
|
||||
+ ((net.minecraftforge.fml.common.registry.FMLControlledNamespacedRegistry)field_150901_e).getDelegate(this, Item.class);
|
||||
+
|
||||
public static int func_150891_b(Item p_150891_0_)
|
||||
{
|
||||
return p_150891_0_ == null ? 0 : field_150901_e.func_148757_b(p_150891_0_);
|
||||
@@ -126,6 +129,7 @@
|
||||
return p_77654_1_;
|
||||
}
|
||||
|
||||
|
@ -8,7 +29,7 @@
|
|||
public int func_77639_j()
|
||||
{
|
||||
return this.field_77777_bU;
|
||||
@@ -242,6 +243,7 @@
|
||||
@@ -239,6 +243,7 @@
|
||||
return this.field_77700_c;
|
||||
}
|
||||
|
||||
|
@ -16,7 +37,7 @@
|
|||
public boolean func_77634_r()
|
||||
{
|
||||
return this.field_77700_c != null;
|
||||
@@ -311,7 +313,7 @@
|
||||
@@ -308,7 +313,7 @@
|
||||
|
||||
public boolean func_77616_k(ItemStack p_77616_1_)
|
||||
{
|
||||
|
@ -25,7 +46,7 @@
|
|||
}
|
||||
|
||||
protected MovingObjectPosition func_77621_a(World p_77621_1_, EntityPlayer p_77621_2_, boolean p_77621_3_)
|
||||
@@ -329,6 +331,10 @@
|
||||
@@ -326,6 +331,10 @@
|
||||
float f6 = f3 * f4;
|
||||
float f7 = f2 * f4;
|
||||
double d3 = 5.0D;
|
||||
|
@ -36,7 +57,7 @@
|
|||
Vec3 vec31 = vec3.func_72441_c((double)f6 * d3, (double)f5 * d3, (double)f7 * d3);
|
||||
return p_77621_1_.func_147447_a(vec3, vec31, p_77621_3_, !p_77621_3_, false);
|
||||
}
|
||||
@@ -366,11 +372,579 @@
|
||||
@@ -363,11 +372,579 @@
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -616,7 +637,7 @@
|
|||
public static void func_150900_l()
|
||||
{
|
||||
func_179214_a(Blocks.field_150348_b, (new ItemMultiTexture(Blocks.field_150348_b, Blocks.field_150348_b, new Function()
|
||||
@@ -936,6 +1510,10 @@
|
||||
@@ -933,6 +1510,10 @@
|
||||
|
||||
private static final String __OBFID = "CL_00000042";
|
||||
|
||||
|
@ -627,7 +648,7 @@
|
|||
private ToolMaterial(int p_i1874_3_, int p_i1874_4_, float p_i1874_5_, float p_i1874_6_, int p_i1874_7_)
|
||||
{
|
||||
this.field_78001_f = p_i1874_3_;
|
||||
@@ -970,9 +1548,36 @@
|
||||
@@ -967,9 +1548,36 @@
|
||||
return this.field_78008_j;
|
||||
}
|
||||
|
||||
|
|
11
patches/minecraft/net/minecraft/item/ItemEmptyMap.java.patch
Normal file
11
patches/minecraft/net/minecraft/item/ItemEmptyMap.java.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/item/ItemEmptyMap.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/ItemEmptyMap.java
|
||||
@@ -24,7 +24,7 @@
|
||||
p_77659_2_.func_72823_a(s, mapdata);
|
||||
mapdata.field_76197_d = 0;
|
||||
mapdata.func_176054_a(p_77659_3_.field_70165_t, p_77659_3_.field_70161_v, mapdata.field_76197_d);
|
||||
- mapdata.field_76200_c = (byte)p_77659_2_.field_73011_w.func_177502_q();
|
||||
+ mapdata.field_76200_c = p_77659_2_.field_73011_w.func_177502_q();
|
||||
mapdata.func_76185_a();
|
||||
--p_77659_1_.field_77994_a;
|
||||
|
11
patches/minecraft/net/minecraft/item/ItemMap.java.patch
Normal file
11
patches/minecraft/net/minecraft/item/ItemMap.java.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/item/ItemMap.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/ItemMap.java
|
||||
@@ -58,7 +58,7 @@
|
||||
mapdata = new MapData(s);
|
||||
mapdata.field_76197_d = 3;
|
||||
mapdata.func_176054_a((double)p_77873_2_.func_72912_H().func_76079_c(), (double)p_77873_2_.func_72912_H().func_76074_e(), mapdata.field_76197_d);
|
||||
- mapdata.field_76200_c = (byte)p_77873_2_.field_73011_w.func_177502_q();
|
||||
+ mapdata.field_76200_c = p_77873_2_.field_73011_w.func_177502_q();
|
||||
mapdata.func_76185_a();
|
||||
p_77873_2_.func_72823_a(s, mapdata);
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
--- ../src-base/minecraft/net/minecraft/item/ItemMonsterPlacer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/ItemMonsterPlacer.java
|
||||
@@ -39,7 +39,7 @@
|
||||
public String func_77653_i(ItemStack p_77653_1_)
|
||||
{
|
||||
String s = ("" + StatCollector.func_74838_a(this.func_77658_a() + ".name")).trim();
|
||||
- String s1 = EntityList.func_75617_a(p_77653_1_.func_77960_j());
|
||||
+ String s1 = ItemMonsterPlacer.getEntityName(p_77653_1_);
|
||||
|
||||
if (s1 != null)
|
||||
{
|
||||
@@ -52,7 +52,7 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public int func_82790_a(ItemStack p_82790_1_, int p_82790_2_)
|
||||
{
|
||||
- EntityList.EntityEggInfo entityegginfo = (EntityList.EntityEggInfo)EntityList.field_75627_a.get(Integer.valueOf(p_82790_1_.func_77960_j()));
|
||||
+ EntityList.EntityEggInfo entityegginfo = ItemMonsterPlacer.getEggInfo(p_82790_1_);
|
||||
return entityegginfo != null ? (p_82790_2_ == 0 ? entityegginfo.field_75611_b : entityegginfo.field_75612_c) : 16777215;
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@
|
||||
if (tileentity instanceof TileEntityMobSpawner)
|
||||
{
|
||||
MobSpawnerBaseLogic mobspawnerbaselogic = ((TileEntityMobSpawner)tileentity).func_145881_a();
|
||||
- mobspawnerbaselogic.func_98272_a(EntityList.func_75617_a(p_180614_1_.func_77960_j()));
|
||||
+ mobspawnerbaselogic.func_98272_a(ItemMonsterPlacer.getEntityName(p_180614_1_));
|
||||
tileentity.func_70296_d();
|
||||
p_180614_3_.func_175689_h(p_180614_4_);
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
d0 = 0.5D;
|
||||
}
|
||||
|
||||
- Entity entity = func_77840_a(p_180614_3_, p_180614_1_.func_77960_j(), (double)p_180614_4_.func_177958_n() + 0.5D, (double)p_180614_4_.func_177956_o() + d0, (double)p_180614_4_.func_177952_p() + 0.5D);
|
||||
+ Entity entity = spawnCreature(p_180614_3_, ItemMonsterPlacer.getEntityName(p_180614_1_), (double)p_180614_4_.func_177958_n() + 0.5D, (double)p_180614_4_.func_177956_o() + d0, (double)p_180614_4_.func_177952_p() + 0.5D);
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
@@ -149,7 +149,7 @@
|
||||
|
||||
if (p_77659_2_.func_180495_p(blockpos).func_177230_c() instanceof BlockLiquid)
|
||||
{
|
||||
- Entity entity = func_77840_a(p_77659_2_, p_77659_1_.func_77960_j(), (double)blockpos.func_177958_n() + 0.5D, (double)blockpos.func_177956_o() + 0.5D, (double)blockpos.func_177952_p() + 0.5D);
|
||||
+ Entity entity = spawnCreature(p_77659_2_, ItemMonsterPlacer.getEntityName(p_77659_1_), (double)blockpos.func_177958_n() + 0.5D, (double)blockpos.func_177956_o() + 0.5D, (double)blockpos.func_177952_p() + 0.5D);
|
||||
|
||||
if (entity != null)
|
||||
{
|
||||
@@ -173,19 +173,29 @@
|
||||
}
|
||||
}
|
||||
|
||||
+ @Deprecated // Use string version below.
|
||||
public static Entity func_77840_a(World p_77840_0_, int p_77840_1_, double p_77840_2_, double p_77840_4_, double p_77840_6_)
|
||||
{
|
||||
if (!EntityList.field_75627_a.containsKey(Integer.valueOf(p_77840_1_)))
|
||||
{
|
||||
return null;
|
||||
}
|
||||
+ return spawnCreature(p_77840_0_, EntityList.func_75617_a(p_77840_1_), p_77840_2_, p_77840_4_, p_77840_6_);
|
||||
+ }
|
||||
+
|
||||
+ public static Entity spawnCreature(World p_77840_0_, String name, double p_77840_2_, double p_77840_4_, double p_77840_6_)
|
||||
+ {
|
||||
+ if (!EntityList.field_75625_b.containsKey(name))
|
||||
+ {
|
||||
+ return null;
|
||||
+ }
|
||||
else
|
||||
{
|
||||
Entity entity = null;
|
||||
|
||||
for (int j = 0; j < 1; ++j)
|
||||
{
|
||||
- entity = EntityList.func_75616_a(p_77840_1_, p_77840_0_);
|
||||
+ entity = EntityList.func_75620_a(name, p_77840_0_);
|
||||
|
||||
if (entity instanceof EntityLivingBase)
|
||||
{
|
||||
@@ -213,5 +223,28 @@
|
||||
EntityList.EntityEggInfo entityegginfo = (EntityList.EntityEggInfo)iterator.next();
|
||||
p_150895_3_.add(new ItemStack(p_150895_1_, 1, entityegginfo.field_75613_a));
|
||||
}
|
||||
+
|
||||
+ for (String name : net.minecraftforge.fml.common.registry.EntityRegistry.getEggs().keySet())
|
||||
+ {
|
||||
+ ItemStack stack = new ItemStack(p_150895_1_);
|
||||
+ net.minecraft.nbt.NBTTagCompound nbt = new net.minecraft.nbt.NBTTagCompound();
|
||||
+ nbt.func_74778_a("entity_name", name);
|
||||
+ stack.func_77982_d(nbt);
|
||||
+ p_150895_3_.add(stack);
|
||||
+ }
|
||||
}
|
||||
+
|
||||
+ private static String getEntityName(ItemStack stack)
|
||||
+ {
|
||||
+ if (stack.func_77942_o() && stack.func_77978_p().func_150297_b("entity_name", 8))
|
||||
+ return stack.func_77978_p().func_74779_i("entity_name");
|
||||
+ return EntityList.func_75617_a(stack.func_77960_j());
|
||||
+ }
|
||||
+
|
||||
+ private static EntityList.EntityEggInfo getEggInfo(ItemStack stack)
|
||||
+ {
|
||||
+ if (stack.func_77942_o() && stack.func_77978_p().func_150297_b("entity_name", 8))
|
||||
+ return net.minecraftforge.fml.common.registry.EntityRegistry.getEggs().get(stack.func_77978_p().func_74779_i("entity_name"));
|
||||
+ return (EntityList.EntityEggInfo)EntityList.field_75627_a.get(stack.func_77960_j());
|
||||
+ }
|
||||
}
|
|
@ -1,6 +1,29 @@
|
|||
--- ../src-base/minecraft/net/minecraft/item/ItemStack.java
|
||||
+++ ../src-work/minecraft/net/minecraft/item/ItemStack.java
|
||||
@@ -129,6 +129,7 @@
|
||||
@@ -52,6 +52,7 @@
|
||||
private boolean field_179551_k;
|
||||
private static final String __OBFID = "CL_00000043";
|
||||
|
||||
+ private net.minecraftforge.fml.common.registry.RegistryDelegate<Item> delegate;
|
||||
public ItemStack(Block p_i1876_1_)
|
||||
{
|
||||
this(p_i1876_1_, 1);
|
||||
@@ -83,7 +84,7 @@
|
||||
this.field_179553_i = false;
|
||||
this.field_179550_j = null;
|
||||
this.field_179551_k = false;
|
||||
- this.field_151002_e = p_i1881_1_;
|
||||
+ this.func_150996_a(p_i1881_1_);
|
||||
this.field_77994_a = p_i1881_2_;
|
||||
this.field_77991_e = p_i1881_3_;
|
||||
|
||||
@@ -123,11 +124,12 @@
|
||||
|
||||
public Item func_77973_b()
|
||||
{
|
||||
- return this.field_151002_e;
|
||||
+ return this.delegate != null ? this.delegate.get() : null;
|
||||
}
|
||||
|
||||
public boolean func_179546_a(EntityPlayer p_179546_1_, World p_179546_2_, BlockPos p_179546_3_, EnumFacing p_179546_4_, float p_179546_5_, float p_179546_6_, float p_179546_7_)
|
||||
{
|
||||
|
@ -8,7 +31,21 @@
|
|||
boolean flag = this.func_77973_b().func_180614_a(this, p_179546_1_, p_179546_2_, p_179546_3_, p_179546_4_, p_179546_5_, p_179546_6_, p_179546_7_);
|
||||
|
||||
if (flag)
|
||||
@@ -201,7 +202,7 @@
|
||||
@@ -172,11 +174,11 @@
|
||||
{
|
||||
if (p_77963_1_.func_150297_b("id", 8))
|
||||
{
|
||||
- this.field_151002_e = Item.func_111206_d(p_77963_1_.func_74779_i("id"));
|
||||
+ this.func_150996_a(Item.func_111206_d(p_77963_1_.func_74779_i("id")));
|
||||
}
|
||||
else
|
||||
{
|
||||
- this.field_151002_e = Item.func_150899_d(p_77963_1_.func_74765_d("id"));
|
||||
+ this.func_150996_a(Item.func_150899_d(p_77963_1_.func_74765_d("id")));
|
||||
}
|
||||
|
||||
this.field_77994_a = p_77963_1_.func_74771_c("Count");
|
||||
@@ -200,7 +202,7 @@
|
||||
|
||||
public int func_77976_d()
|
||||
{
|
||||
|
@ -17,7 +54,7 @@
|
|||
}
|
||||
|
||||
public boolean func_77985_e()
|
||||
@@ -211,7 +212,7 @@
|
||||
@@ -210,7 +212,7 @@
|
||||
|
||||
public boolean func_77984_f()
|
||||
{
|
||||
|
@ -26,7 +63,7 @@
|
|||
}
|
||||
|
||||
public boolean func_77981_g()
|
||||
@@ -221,32 +222,27 @@
|
||||
@@ -220,32 +222,27 @@
|
||||
|
||||
public boolean func_77951_h()
|
||||
{
|
||||
|
@ -64,7 +101,7 @@
|
|||
}
|
||||
|
||||
public boolean func_96631_a(int p_96631_1_, Random p_96631_2_)
|
||||
@@ -278,8 +274,8 @@
|
||||
@@ -277,8 +274,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -75,7 +112,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -338,7 +334,7 @@
|
||||
@@ -337,7 +334,7 @@
|
||||
|
||||
public boolean func_150998_b(Block p_150998_1_)
|
||||
{
|
||||
|
@ -84,7 +121,7 @@
|
|||
}
|
||||
|
||||
public boolean func_111282_a(EntityPlayer p_111282_1_, EntityLivingBase p_111282_2_)
|
||||
@@ -753,6 +749,8 @@
|
||||
@@ -752,6 +749,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -93,7 +130,7 @@
|
|||
return arraylist;
|
||||
}
|
||||
|
||||
@@ -863,7 +861,7 @@
|
||||
@@ -862,7 +861,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -102,3 +139,11 @@
|
|||
}
|
||||
|
||||
return (Multimap)object;
|
||||
@@ -870,6 +869,7 @@
|
||||
|
||||
public void func_150996_a(Item p_150996_1_)
|
||||
{
|
||||
+ this.delegate = p_150996_1_ != null ? p_150996_1_.delegate : null;
|
||||
this.field_151002_e = p_150996_1_;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
--- ../src-base/minecraft/net/minecraft/network/NetworkManager.java
|
||||
+++ ../src-work/minecraft/net/minecraft/network/NetworkManager.java
|
||||
@@ -88,6 +88,11 @@
|
||||
this.field_179294_g = p_i46004_1_;
|
||||
}
|
||||
|
||||
+ public EnumPacketDirection getDirection()
|
||||
+ {
|
||||
+ return this.field_179294_g;
|
||||
+ }
|
||||
+
|
||||
public void channelActive(ChannelHandlerContext p_channelActive_1_) throws Exception
|
||||
{
|
||||
super.channelActive(p_channelActive_1_);
|
||||
@@ -175,7 +180,7 @@
|
||||
final EnumConnectionState enumconnectionstate = EnumConnectionState.func_150752_a(p_150732_1_);
|
||||
final EnumConnectionState enumconnectionstate1 = (EnumConnectionState)this.field_150746_k.attr(field_150739_c).get();
|
||||
|
||||
- if (enumconnectionstate1 != enumconnectionstate)
|
||||
+ if (enumconnectionstate1 != enumconnectionstate && !( p_150732_1_ instanceof net.minecraftforge.fml.common.network.internal.FMLProxyPacket))
|
||||
{
|
||||
field_150735_g.debug("Disabled auto read");
|
||||
this.field_150746_k.config().setAutoRead(false);
|
||||
@@ -183,7 +188,7 @@
|
||||
|
||||
if (this.field_150746_k.eventLoop().inEventLoop())
|
||||
{
|
||||
- if (enumconnectionstate != enumconnectionstate1)
|
||||
+ if (enumconnectionstate != enumconnectionstate1 && !( p_150732_1_ instanceof net.minecraftforge.fml.common.network.internal.FMLProxyPacket))
|
||||
{
|
||||
this.func_150723_a(enumconnectionstate);
|
||||
}
|
||||
@@ -204,7 +209,7 @@
|
||||
private static final String __OBFID = "CL_00001243";
|
||||
public void run()
|
||||
{
|
||||
- if (enumconnectionstate != enumconnectionstate1)
|
||||
+ if (enumconnectionstate != enumconnectionstate1 && !( p_150732_1_ instanceof net.minecraftforge.fml.common.network.internal.FMLProxyPacket))
|
||||
{
|
||||
NetworkManager.this.func_150723_a(enumconnectionstate);
|
||||
}
|
||||
@@ -409,6 +414,11 @@
|
||||
this.channelRead0(p_channelRead0_1_, (Packet)p_channelRead0_2_);
|
||||
}
|
||||
|
||||
+ public Channel channel()
|
||||
+ {
|
||||
+ return field_150746_k;
|
||||
+ }
|
||||
+
|
||||
static class InboundHandlerTuplePacketListener
|
||||
{
|
||||
private final Packet field_150774_a;
|
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/network/NetworkSystem.java
|
||||
+++ ../src-work/minecraft/net/minecraft/network/NetworkSystem.java
|
||||
@@ -110,7 +110,7 @@
|
||||
;
|
||||
}
|
||||
|
||||
- p_initChannel_1_.pipeline().addLast("timeout", new ReadTimeoutHandler(30)).addLast("legacy_query", new PingResponseHandler(NetworkSystem.this)).addLast("splitter", new MessageDeserializer2()).addLast("decoder", new MessageDeserializer(EnumPacketDirection.SERVERBOUND)).addLast("prepender", new MessageSerializer2()).addLast("encoder", new MessageSerializer(EnumPacketDirection.CLIENTBOUND));
|
||||
+ p_initChannel_1_.pipeline().addLast("timeout", new ReadTimeoutHandler(net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.READ_TIMEOUT)).addLast("legacy_query", new PingResponseHandler(NetworkSystem.this)).addLast("splitter", new MessageDeserializer2()).addLast("decoder", new MessageDeserializer(EnumPacketDirection.SERVERBOUND)).addLast("prepender", new MessageSerializer2()).addLast("encoder", new MessageSerializer(EnumPacketDirection.CLIENTBOUND));
|
||||
NetworkManager networkmanager = new NetworkManager(EnumPacketDirection.SERVERBOUND);
|
||||
NetworkSystem.this.field_151272_f.add(networkmanager);
|
||||
p_initChannel_1_.pipeline().addLast("packet_handler", networkmanager);
|
|
@ -30,7 +30,23 @@
|
|||
}
|
||||
|
||||
public String func_151316_d()
|
||||
@@ -270,4 +274,43 @@
|
||||
@@ -233,6 +237,7 @@
|
||||
serverstatusresponse.func_151320_a(JsonUtils.func_151200_h(jsonobject, "favicon"));
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().captureAdditionalData(serverstatusresponse, jsonobject);
|
||||
return serverstatusresponse;
|
||||
}
|
||||
|
||||
@@ -260,6 +265,7 @@
|
||||
jsonobject.addProperty("favicon", p_serialize_1_.func_151316_d());
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.enhanceStatusQuery(jsonobject);
|
||||
return jsonobject;
|
||||
}
|
||||
|
||||
@@ -268,4 +274,43 @@
|
||||
return this.serialize((ServerStatusResponse)p_serialize_1_, p_serialize_2_, p_serialize_3_);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
--- ../src-base/minecraft/net/minecraft/network/handshake/client/C00Handshake.java
|
||||
+++ ../src-work/minecraft/net/minecraft/network/handshake/client/C00Handshake.java
|
||||
@@ -16,6 +16,7 @@
|
||||
private int field_149599_c;
|
||||
private EnumConnectionState field_149597_d;
|
||||
private static final String __OBFID = "CL_00001372";
|
||||
+ private boolean hasFMLMarker = false;
|
||||
|
||||
public C00Handshake() {}
|
||||
|
||||
@@ -28,18 +29,26 @@
|
||||
this.field_149597_d = p_i45266_4_;
|
||||
}
|
||||
|
||||
+ public C00Handshake(int protocol, String address, int port, EnumConnectionState state, boolean addFMLMarker)
|
||||
+ {
|
||||
+ this(protocol, address, port, state);
|
||||
+ this.hasFMLMarker = addFMLMarker;
|
||||
+ }
|
||||
+
|
||||
public void func_148837_a(PacketBuffer p_148837_1_) throws IOException
|
||||
{
|
||||
this.field_149600_a = p_148837_1_.func_150792_a();
|
||||
this.field_149598_b = p_148837_1_.func_150789_c(255);
|
||||
this.field_149599_c = p_148837_1_.readUnsignedShort();
|
||||
this.field_149597_d = EnumConnectionState.func_150760_a(p_148837_1_.func_150792_a());
|
||||
+ this.hasFMLMarker = this.field_149598_b.contains("\0FML\0");
|
||||
+ this.field_149598_b = this.field_149598_b.split("\0")[0];
|
||||
}
|
||||
|
||||
public void func_148840_b(PacketBuffer p_148840_1_) throws IOException
|
||||
{
|
||||
p_148840_1_.func_150787_b(this.field_149600_a);
|
||||
- p_148840_1_.func_180714_a(this.field_149598_b);
|
||||
+ p_148840_1_.func_180714_a(this.field_149598_b + "\0FML\0");
|
||||
p_148840_1_.writeShort(this.field_149599_c);
|
||||
p_148840_1_.func_150787_b(this.field_149597_d.func_150759_c());
|
||||
}
|
||||
@@ -63,4 +72,9 @@
|
||||
{
|
||||
this.func_180770_a((INetHandlerHandshakeServer)p_148833_1_);
|
||||
}
|
||||
+
|
||||
+ public boolean hasFMLMarker()
|
||||
+ {
|
||||
+ return this.hasFMLMarker;
|
||||
+ }
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
--- ../src-base/minecraft/net/minecraft/network/play/client/C17PacketCustomPayload.java
|
||||
+++ ../src-work/minecraft/net/minecraft/network/play/client/C17PacketCustomPayload.java
|
||||
@@ -47,7 +47,11 @@
|
||||
public void func_148840_b(PacketBuffer p_148840_1_) throws IOException
|
||||
{
|
||||
p_148840_1_.func_180714_a(this.field_149562_a);
|
||||
+ synchronized(this.field_149561_c) { //This may be access multiple times, from multiple threads, lets be safe.
|
||||
+ this.field_149561_c.markReaderIndex();
|
||||
p_148840_1_.writeBytes((ByteBuf)this.field_149561_c);
|
||||
+ this.field_149561_c.resetReaderIndex();
|
||||
+ }
|
||||
}
|
||||
|
||||
public void func_148833_a(INetHandlerPlayServer p_148833_1_)
|
|
@ -0,0 +1,14 @@
|
|||
--- ../src-base/minecraft/net/minecraft/network/play/server/S3FPacketCustomPayload.java
|
||||
+++ ../src-work/minecraft/net/minecraft/network/play/server/S3FPacketCustomPayload.java
|
||||
@@ -46,7 +46,11 @@
|
||||
public void func_148840_b(PacketBuffer p_148840_1_) throws IOException
|
||||
{
|
||||
p_148840_1_.func_180714_a(this.field_149172_a);
|
||||
+ synchronized(this.field_149171_b) { //This may be access multiple times, from multiple threads, lets be safe.
|
||||
+ this.field_149171_b.markReaderIndex();
|
||||
p_148840_1_.writeBytes((ByteBuf)this.field_149171_b);
|
||||
+ this.field_149171_b.resetReaderIndex();
|
||||
+ }
|
||||
}
|
||||
|
||||
public void func_180734_a(INetHandlerPlayClient p_180734_1_)
|
|
@ -0,0 +1,19 @@
|
|||
--- ../src-base/minecraft/net/minecraft/realms/RealmsConnect.java
|
||||
+++ ../src-work/minecraft/net/minecraft/realms/RealmsConnect.java
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
try
|
||||
{
|
||||
+ net.minecraftforge.fml.client.FMLClientHandler.instance().connectToRealmsServer(p_connect_1_, p_connect_2_);
|
||||
inetaddress = InetAddress.getByName(p_connect_1_);
|
||||
|
||||
if (RealmsConnect.this.aborted)
|
||||
@@ -60,7 +61,7 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- RealmsConnect.this.connection.func_179290_a(new C00Handshake(47, p_connect_1_, p_connect_2_, EnumConnectionState.LOGIN));
|
||||
+ RealmsConnect.this.connection.func_179290_a(new C00Handshake(47, p_connect_1_, p_connect_2_, EnumConnectionState.LOGIN, true));
|
||||
|
||||
if (RealmsConnect.this.aborted)
|
||||
{
|
|
@ -101,6 +101,15 @@
|
|||
int i = aworldserver.length;
|
||||
|
||||
for (int j = 0; j < i; ++j)
|
||||
@@ -399,7 +373,7 @@
|
||||
|
||||
public void func_71260_j()
|
||||
{
|
||||
- if (!this.field_71290_O)
|
||||
+ if (!this.field_71290_O && net.minecraftforge.fml.common.Loader.instance().hasReachedState(net.minecraftforge.fml.common.LoaderState.SERVER_STARTED) && !field_71316_v) // make sure the save is valid and we don't save twice
|
||||
{
|
||||
field_147145_h.info("Stopping server");
|
||||
|
||||
@@ -423,8 +397,15 @@
|
||||
for (int i = 0; i < this.field_71305_c.length; ++i)
|
||||
{
|
||||
|
@ -117,7 +126,61 @@
|
|||
}
|
||||
|
||||
if (this.field_71307_n.func_76468_d())
|
||||
@@ -630,6 +611,7 @@
|
||||
@@ -456,6 +437,7 @@
|
||||
{
|
||||
if (this.func_71197_b())
|
||||
{
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerStarted();
|
||||
this.field_175591_ab = func_130071_aq();
|
||||
long i = 0L;
|
||||
this.field_147147_p.func_151315_a(new ChatComponentText(this.field_71286_C));
|
||||
@@ -500,12 +482,20 @@
|
||||
Thread.sleep(Math.max(1L, 50L - i));
|
||||
this.field_71296_Q = true;
|
||||
}
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerStopping();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().expectServerStopped(); // has to come before finalTick to avoid race conditions
|
||||
}
|
||||
else
|
||||
{
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().expectServerStopped(); // has to come before finalTick to avoid race conditions
|
||||
this.func_71228_a((CrashReport)null);
|
||||
}
|
||||
}
|
||||
+ catch (net.minecraftforge.fml.common.StartupQuery.AbortedException e)
|
||||
+ {
|
||||
+ // ignore silently
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().expectServerStopped(); // has to come before finalTick to avoid race conditions
|
||||
+ }
|
||||
catch (Throwable throwable1)
|
||||
{
|
||||
field_147145_h.error("Encountered an unexpected exception", throwable1);
|
||||
@@ -531,6 +521,7 @@
|
||||
field_147145_h.error("We were unable to save this crash report to disk.");
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().expectServerStopped(); // has to come before finalTick to avoid race conditions
|
||||
this.func_71228_a(crashreport);
|
||||
}
|
||||
finally
|
||||
@@ -546,6 +537,8 @@
|
||||
}
|
||||
finally
|
||||
{
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerStopped();
|
||||
+ this.field_71316_v = true;
|
||||
this.func_71240_o();
|
||||
}
|
||||
}
|
||||
@@ -591,6 +584,7 @@
|
||||
public void func_71217_p()
|
||||
{
|
||||
long i = System.nanoTime();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreServerTick();
|
||||
++this.field_71315_w;
|
||||
|
||||
if (this.field_71295_T)
|
||||
@@ -617,6 +611,7 @@
|
||||
|
||||
Collections.shuffle(Arrays.asList(agameprofile));
|
||||
this.field_147147_p.func_151318_b().func_151330_a(agameprofile);
|
||||
|
@ -125,7 +188,24 @@
|
|||
}
|
||||
|
||||
if (this.field_71315_w % 900 == 0)
|
||||
@@ -681,15 +663,18 @@
|
||||
@@ -644,6 +639,7 @@
|
||||
|
||||
this.field_71304_b.func_76319_b();
|
||||
this.field_71304_b.func_76319_b();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPostServerTick();
|
||||
}
|
||||
|
||||
public void func_71190_q()
|
||||
@@ -657,7 +653,7 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
- ((FutureTask)this.field_175589_i.poll()).run();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.callFuture(((FutureTask)this.field_175589_i.poll()));
|
||||
}
|
||||
catch (Throwable throwable2)
|
||||
{
|
||||
@@ -667,15 +663,18 @@
|
||||
}
|
||||
|
||||
this.field_71304_b.func_76318_c("levels");
|
||||
|
@ -147,7 +227,23 @@
|
|||
this.field_71304_b.func_76320_a(worldserver.func_72912_H().func_76065_j());
|
||||
|
||||
if (this.field_71315_w % 20 == 0)
|
||||
@@ -733,9 +718,11 @@
|
||||
@@ -686,6 +685,7 @@
|
||||
}
|
||||
|
||||
this.field_71304_b.func_76320_a("tick");
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPreWorldTick(worldserver);
|
||||
CrashReport crashreport;
|
||||
|
||||
try
|
||||
@@ -710,6 +710,7 @@
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onPostWorldTick(worldserver);
|
||||
this.field_71304_b.func_76319_b();
|
||||
this.field_71304_b.func_76320_a("tracker");
|
||||
worldserver.func_73039_n().func_72788_a();
|
||||
@@ -717,9 +718,11 @@
|
||||
this.field_71304_b.func_76319_b();
|
||||
}
|
||||
|
||||
|
@ -160,7 +256,15 @@
|
|||
this.field_71304_b.func_76318_c("connection");
|
||||
this.func_147137_ag().func_151269_c();
|
||||
this.field_71304_b.func_76318_c("players");
|
||||
@@ -774,7 +761,13 @@
|
||||
@@ -741,6 +744,7 @@
|
||||
|
||||
public void func_71256_s()
|
||||
{
|
||||
+ net.minecraftforge.fml.common.StartupQuery.reset();
|
||||
this.field_175590_aa = new Thread(this, "Server thread");
|
||||
this.field_175590_aa.start();
|
||||
}
|
||||
@@ -757,7 +761,13 @@
|
||||
|
||||
public WorldServer func_71218_a(int p_71218_1_)
|
||||
{
|
||||
|
@ -175,7 +279,16 @@
|
|||
}
|
||||
|
||||
public String func_71249_w()
|
||||
@@ -1025,6 +1018,7 @@
|
||||
@@ -787,7 +797,7 @@
|
||||
|
||||
public String getServerModName()
|
||||
{
|
||||
- return "vanilla";
|
||||
+ return net.minecraftforge.fml.common.FMLCommonHandler.instance().getModName();
|
||||
}
|
||||
|
||||
public CrashReport func_71230_b(CrashReport p_71230_1_)
|
||||
@@ -1008,6 +1018,7 @@
|
||||
|
||||
if (worldserver != null)
|
||||
{
|
||||
|
@ -183,7 +296,7 @@
|
|||
worldserver.func_73041_k();
|
||||
}
|
||||
}
|
||||
@@ -1607,7 +1601,6 @@
|
||||
@@ -1590,7 +1601,6 @@
|
||||
this.field_71319_s = p_71208_1_;
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,44 @@
|
|||
--- ../src-base/minecraft/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/server/dedicated/DedicatedServer.java
|
||||
@@ -49,6 +49,7 @@
|
||||
private boolean field_71338_p;
|
||||
private WorldSettings.GameType field_71337_q;
|
||||
private boolean field_71335_s;
|
||||
+ public static boolean allowPlayerLogins = false;
|
||||
private static final String __OBFID = "CL_00001784";
|
||||
|
||||
public DedicatedServer(File p_i1508_1_)
|
||||
@@ -113,6 +114,8 @@
|
||||
field_155771_h.warn("To start the server with more ram, launch it as \"java -Xmx1024M -Xms1024M -jar minecraft_server.jar\"");
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onServerStart(this);
|
||||
+
|
||||
field_155771_h.info("Loading properties");
|
||||
this.field_71340_o = new PropertyManager(new File("server.properties"));
|
||||
this.field_154332_n = new ServerEula(new File("eula.txt"));
|
||||
@@ -204,6 +207,7 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().onServerStarted();
|
||||
this.func_152361_a(new DedicatedPlayerList(this));
|
||||
long j = System.nanoTime();
|
||||
|
||||
@@ -250,6 +254,7 @@
|
||||
this.func_71191_d((this.func_71207_Z() + 8) / 16 * 16);
|
||||
this.func_71191_d(MathHelper.func_76125_a(this.func_71207_Z(), 64, 256));
|
||||
this.field_71340_o.func_73667_a("max-build-height", Integer.valueOf(this.func_71207_Z()));
|
||||
+ if (!net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerAboutToStart(this)) return false;
|
||||
field_155771_h.info("Preparing level \"" + this.func_71270_I() + "\"");
|
||||
this.func_71247_a(this.func_71270_I(), this.func_71270_I(), k, worldtype, s2);
|
||||
long i1 = System.nanoTime() - j;
|
||||
@@ -278,7 +283,7 @@
|
||||
thread1.start();
|
||||
}
|
||||
|
||||
- return true;
|
||||
+ return net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerStarting(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
--- ../src-base/minecraft/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
+++ ../src-work/minecraft/net/minecraft/server/gui/MinecraftServerGui.java
|
||||
@@ -79,6 +79,7 @@
|
||||
System.exit(0);
|
||||
}
|
||||
});
|
||||
+ minecraftservergui.latch.countDown();
|
||||
}
|
||||
|
||||
public MinecraftServerGui(DedicatedServer p_i2362_1_)
|
||||
@@ -164,8 +165,13 @@
|
||||
return jpanel;
|
||||
}
|
||||
|
||||
+ private java.util.concurrent.CountDownLatch latch = new java.util.concurrent.CountDownLatch(1);
|
||||
public void func_164247_a(final JTextArea p_164247_1_, final JScrollPane p_164247_2_, final String p_164247_3_)
|
||||
{
|
||||
+ try
|
||||
+ {
|
||||
+ latch.await();
|
||||
+ } catch (InterruptedException e){} //Prevent logging until after constructor has ended.
|
||||
if (!SwingUtilities.isEventDispatchThread())
|
||||
{
|
||||
SwingUtilities.invokeLater(new Runnable()
|
|
@ -66,7 +66,28 @@
|
|||
{
|
||||
this.func_147139_a(this.field_71349_l.field_71474_y.field_74318_M);
|
||||
}
|
||||
@@ -233,6 +211,7 @@
|
||||
@@ -144,9 +122,10 @@
|
||||
this.func_71245_h(true);
|
||||
field_147148_h.info("Generating keypair");
|
||||
this.func_71253_a(CryptManager.func_75891_b());
|
||||
+ if (!net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerAboutToStart(this)) return false;
|
||||
this.func_71247_a(this.func_71270_I(), this.func_71221_J(), this.field_71350_m.func_77160_d(), this.field_71350_m.func_77165_h(), this.field_71350_m.func_82749_j());
|
||||
this.func_71205_p(this.func_71214_G() + " - " + this.field_71305_c[0].func_72912_H().func_76065_j());
|
||||
- return true;
|
||||
+ return net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerStarting(this);
|
||||
}
|
||||
|
||||
public void func_71217_p()
|
||||
@@ -171,7 +150,7 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
- ((FutureTask)this.field_175589_i.poll()).run();
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.callFuture(((FutureTask)this.field_175589_i.poll()));
|
||||
}
|
||||
catch (Throwable throwable)
|
||||
{
|
||||
@@ -232,6 +211,7 @@
|
||||
|
||||
public EnumDifficulty func_147135_j()
|
||||
{
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
--- ../src-base/minecraft/net/minecraft/server/management/PlayerProfileCache.java
|
||||
+++ ../src-work/minecraft/net/minecraft/server/management/PlayerProfileCache.java
|
||||
@@ -204,26 +204,12 @@
|
||||
{
|
||||
List list = null;
|
||||
BufferedReader bufferedreader = null;
|
||||
- label64:
|
||||
{
|
||||
try
|
||||
{
|
||||
bufferedreader = Files.newReader(this.field_152665_g, Charsets.UTF_8);
|
||||
list = (List)this.field_152660_b.fromJson(bufferedreader, field_152666_h);
|
||||
- break label64;
|
||||
- }
|
||||
- catch (FileNotFoundException filenotfoundexception)
|
||||
- {
|
||||
- ;
|
||||
- }
|
||||
- finally
|
||||
- {
|
||||
- IOUtils.closeQuietly(bufferedreader);
|
||||
- }
|
||||
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
if (list != null)
|
||||
{
|
||||
this.field_152661_c.clear();
|
||||
@@ -242,6 +228,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()
|
|
@ -1,5 +1,14 @@
|
|||
--- ../src-base/minecraft/net/minecraft/server/management/ServerConfigurationManager.java
|
||||
+++ ../src-work/minecraft/net/minecraft/server/management/ServerConfigurationManager.java
|
||||
@@ -103,7 +103,7 @@
|
||||
this.field_72405_c = 8;
|
||||
}
|
||||
|
||||
- public void func_72355_a(NetworkManager p_72355_1_, EntityPlayerMP p_72355_2_)
|
||||
+ public void func_72355_a(NetworkManager p_72355_1_, EntityPlayerMP p_72355_2_, NetHandlerPlayServer nethandlerplayserver)
|
||||
{
|
||||
GameProfile gameprofile = p_72355_2_.func_146103_bH();
|
||||
PlayerProfileCache playerprofilecache = this.field_72400_f.func_152358_ax();
|
||||
@@ -112,6 +112,17 @@
|
||||
playerprofilecache.func_152649_a(gameprofile);
|
||||
NBTTagCompound nbttagcompound = this.func_72380_a(p_72355_2_);
|
||||
|
@ -18,7 +27,24 @@
|
|||
p_72355_2_.field_71134_c.func_73080_a((WorldServer)p_72355_2_.field_70170_p);
|
||||
String s1 = "local";
|
||||
|
||||
@@ -273,6 +284,7 @@
|
||||
@@ -125,7 +136,7 @@
|
||||
WorldInfo worldinfo = worldserver.func_72912_H();
|
||||
BlockPos blockpos = worldserver.func_175694_M();
|
||||
this.func_72381_a(p_72355_2_, (EntityPlayerMP)null, worldserver);
|
||||
- NetHandlerPlayServer nethandlerplayserver = new NetHandlerPlayServer(this.field_72400_f, p_72355_1_, p_72355_2_);
|
||||
+ p_72355_2_.field_71135_a = nethandlerplayserver;
|
||||
nethandlerplayserver.func_147359_a(new S01PacketJoinGame(p_72355_2_.func_145782_y(), p_72355_2_.field_71134_c.func_73081_b(), worldinfo.func_76093_s(), worldserver.field_73011_w.func_177502_q(), worldserver.func_175659_aa(), this.func_72352_l(), worldinfo.func_76067_t(), worldserver.func_82736_K().func_82766_b("reducedDebugInfo")));
|
||||
nethandlerplayserver.func_147359_a(new S3FPacketCustomPayload("MC|Brand", (new PacketBuffer(Unpooled.buffer())).func_180714_a(this.func_72365_p().getServerModName())));
|
||||
nethandlerplayserver.func_147359_a(new S41PacketServerDifficulty(worldinfo.func_176130_y(), worldinfo.func_176123_z()));
|
||||
@@ -168,6 +179,7 @@
|
||||
|
||||
p_72355_2_.func_71116_b();
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerLoggedIn(p_72355_2_);
|
||||
if (nbttagcompound != null && nbttagcompound.func_150297_b("Riding", 10))
|
||||
{
|
||||
Entity entity = EntityList.func_75615_a(nbttagcompound.func_74775_l("Riding"), worldserver);
|
||||
@@ -272,6 +284,7 @@
|
||||
p_72380_1_.func_70020_e(nbttagcompound);
|
||||
nbttagcompound1 = nbttagcompound;
|
||||
field_148546_d.debug("loading single player");
|
||||
|
@ -26,7 +52,31 @@
|
|||
}
|
||||
else
|
||||
{
|
||||
@@ -314,6 +326,7 @@
|
||||
@@ -281,8 +294,23 @@
|
||||
return nbttagcompound1;
|
||||
}
|
||||
|
||||
+ public NBTTagCompound getPlayerNBT(EntityPlayerMP player)
|
||||
+ {
|
||||
+ // Hacky method to allow loading the NBT for a player prior to login
|
||||
+ NBTTagCompound nbttagcompound = this.field_72400_f.field_71305_c[0].func_72912_H().func_76072_h();
|
||||
+ if (player.func_70005_c_().equals(this.field_72400_f.func_71214_G()) && nbttagcompound != null)
|
||||
+ {
|
||||
+ return nbttagcompound;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return ((net.minecraft.world.storage.SaveHandler)this.field_72412_k).getPlayerNBT(player);
|
||||
+ }
|
||||
+ }
|
||||
protected void func_72391_b(EntityPlayerMP p_72391_1_)
|
||||
{
|
||||
+ if (p_72391_1_.field_71135_a == null) return;
|
||||
+
|
||||
this.field_72412_k.func_75753_a(p_72391_1_);
|
||||
StatisticsFile statisticsfile = (StatisticsFile)this.field_148547_k.get(p_72391_1_.func_110124_au());
|
||||
|
||||
@@ -298,6 +326,7 @@
|
||||
this.field_177454_f.put(p_72377_1_.func_110124_au(), p_72377_1_);
|
||||
this.func_148540_a(new S38PacketPlayerListItem(S38PacketPlayerListItem.Action.ADD_PLAYER, new EntityPlayerMP[] {p_72377_1_}));
|
||||
WorldServer worldserver = this.field_72400_f.func_71218_a(p_72377_1_.field_71093_bK);
|
||||
|
@ -34,7 +84,15 @@
|
|||
worldserver.func_72838_d(p_72377_1_);
|
||||
this.func_72375_a(p_72377_1_, (WorldServer)null);
|
||||
|
||||
@@ -347,6 +360,7 @@
|
||||
@@ -315,6 +344,7 @@
|
||||
|
||||
public void func_72367_e(EntityPlayerMP p_72367_1_)
|
||||
{
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerLoggedOut(p_72367_1_);
|
||||
p_72367_1_.func_71029_a(StatList.field_75947_j);
|
||||
this.func_72391_b(p_72367_1_);
|
||||
WorldServer worldserver = p_72367_1_.func_71121_q();
|
||||
@@ -330,6 +360,7 @@
|
||||
this.field_72404_b.remove(p_72367_1_);
|
||||
this.field_177454_f.remove(p_72367_1_.func_110124_au());
|
||||
this.field_148547_k.remove(p_72367_1_.func_110124_au());
|
||||
|
@ -42,7 +100,7 @@
|
|||
this.func_148540_a(new S38PacketPlayerListItem(S38PacketPlayerListItem.Action.REMOVE_PLAYER, new EntityPlayerMP[] {p_72367_1_}));
|
||||
}
|
||||
|
||||
@@ -428,13 +442,23 @@
|
||||
@@ -411,13 +442,23 @@
|
||||
|
||||
public EntityPlayerMP func_72368_a(EntityPlayerMP p_72368_1_, int p_72368_2_, boolean p_72368_3_)
|
||||
{
|
||||
|
@ -68,7 +126,7 @@
|
|||
p_72368_1_.field_71093_bK = p_72368_2_;
|
||||
Object object;
|
||||
|
||||
@@ -450,6 +474,7 @@
|
||||
@@ -433,6 +474,7 @@
|
||||
EntityPlayerMP entityplayermp1 = new EntityPlayerMP(this.field_72400_f, this.field_72400_f.func_71218_a(p_72368_1_.field_71093_bK), p_72368_1_.func_146103_bH(), (ItemInWorldManager)object);
|
||||
entityplayermp1.field_71135_a = p_72368_1_.field_71135_a;
|
||||
entityplayermp1.func_71049_a(p_72368_1_, p_72368_3_);
|
||||
|
@ -76,7 +134,13 @@
|
|||
entityplayermp1.func_145769_d(p_72368_1_.func_145782_y());
|
||||
entityplayermp1.func_174817_o(p_72368_1_);
|
||||
WorldServer worldserver = this.field_72400_f.func_71218_a(p_72368_1_.field_71093_bK);
|
||||
@@ -496,14 +521,19 @@
|
||||
@@ -473,19 +515,25 @@
|
||||
this.field_177454_f.put(entityplayermp1.func_110124_au(), entityplayermp1);
|
||||
entityplayermp1.func_71116_b();
|
||||
entityplayermp1.func_70606_j(entityplayermp1.func_110143_aJ());
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerRespawnEvent(entityplayermp1);
|
||||
return entityplayermp1;
|
||||
}
|
||||
|
||||
public void func_72356_a(EntityPlayerMP p_72356_1_, int p_72356_2_)
|
||||
{
|
||||
|
@ -98,7 +162,12 @@
|
|||
this.func_72375_a(p_72356_1_, worldserver);
|
||||
p_72356_1_.field_71135_a.func_147364_a(p_72356_1_.field_70165_t, p_72356_1_.field_70163_u, p_72356_1_.field_70161_v, p_72356_1_.field_70177_z, p_72356_1_.field_70125_A);
|
||||
p_72356_1_.field_71134_c.func_73080_a(worldserver1);
|
||||
@@ -521,13 +551,22 @@
|
||||
@@ -498,17 +546,27 @@
|
||||
PotionEffect potioneffect = (PotionEffect)iterator.next();
|
||||
p_72356_1_.field_71135_a.func_147359_a(new S1DPacketEntityEffect(p_72356_1_.func_145782_y(), potioneffect));
|
||||
}
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().firePlayerChangedDimensionEvent(p_72356_1_, j, p_72356_2_);
|
||||
}
|
||||
|
||||
public void func_82448_a(Entity p_82448_1_, int p_82448_2_, WorldServer p_82448_3_, WorldServer p_82448_4_)
|
||||
{
|
||||
|
@ -124,7 +193,7 @@
|
|||
{
|
||||
d0 = MathHelper.func_151237_a(d0 / d2, p_82448_4_.func_175723_af().func_177726_b() + 16.0D, p_82448_4_.func_175723_af().func_177728_d() - 16.0D);
|
||||
d1 = MathHelper.func_151237_a(d1 / d2, p_82448_4_.func_175723_af().func_177736_c() + 16.0D, p_82448_4_.func_175723_af().func_177733_e() - 16.0D);
|
||||
@@ -538,7 +577,7 @@
|
||||
@@ -519,7 +577,7 @@
|
||||
p_82448_3_.func_72866_a(p_82448_1_, false);
|
||||
}
|
||||
}
|
||||
|
@ -133,7 +202,7 @@
|
|||
{
|
||||
d0 = MathHelper.func_151237_a(d0 * d2, p_82448_4_.func_175723_af().func_177726_b() + 16.0D, p_82448_4_.func_175723_af().func_177728_d() - 16.0D);
|
||||
d1 = MathHelper.func_151237_a(d1 * d2, p_82448_4_.func_175723_af().func_177736_c() + 16.0D, p_82448_4_.func_175723_af().func_177733_e() - 16.0D);
|
||||
@@ -549,7 +588,8 @@
|
||||
@@ -530,7 +588,8 @@
|
||||
p_82448_3_.func_72866_a(p_82448_1_, false);
|
||||
}
|
||||
}
|
||||
|
@ -143,7 +212,7 @@
|
|||
{
|
||||
BlockPos blockpos;
|
||||
|
||||
@@ -584,7 +624,7 @@
|
||||
@@ -565,7 +624,7 @@
|
||||
if (p_82448_1_.func_70089_S())
|
||||
{
|
||||
p_82448_1_.func_70012_b(d0, p_82448_1_.field_70163_u, d1, p_82448_1_.field_70177_z, p_82448_1_.field_70125_A);
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/server/network/NetHandlerHandshakeTCP.java
|
||||
+++ ../src-work/minecraft/net/minecraft/server/network/NetHandlerHandshakeTCP.java
|
||||
@@ -23,6 +23,8 @@
|
||||
|
||||
public void func_147383_a(C00Handshake p_147383_1_)
|
||||
{
|
||||
+ if (!net.minecraftforge.fml.common.FMLCommonHandler.instance().handleServerHandshake(p_147383_1_, this.field_147386_b)) return;
|
||||
+
|
||||
switch (NetHandlerHandshakeTCP.SwitchEnumConnectionState.field_151291_a[p_147383_1_.func_149594_c().ordinal()])
|
||||
{
|
||||
case 1:
|
|
@ -0,0 +1,20 @@
|
|||
--- ../src-base/minecraft/net/minecraft/server/network/NetHandlerLoginServer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/server/network/NetHandlerLoginServer.java
|
||||
@@ -62,7 +62,7 @@
|
||||
this.func_147326_c();
|
||||
}
|
||||
|
||||
- if (this.field_147336_h++ == 600)
|
||||
+ if (this.field_147336_h++ == net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.LOGIN_TIMEOUT)
|
||||
{
|
||||
this.func_147322_a("Took too long to log in");
|
||||
}
|
||||
@@ -113,7 +113,7 @@
|
||||
}
|
||||
|
||||
this.field_147333_a.func_179290_a(new S02PacketLoginSuccess(this.field_147337_i));
|
||||
- this.field_147327_f.func_71203_ab().func_72355_a(this.field_147333_a, this.field_147327_f.func_71203_ab().func_148545_a(this.field_147337_i));
|
||||
+ net.minecraftforge.fml.common.network.internal.FMLNetworkHandler.fmlServerHandshake(this.field_147327_f.func_71203_ab(), this.field_147333_a, this.field_147327_f.func_71203_ab().func_148545_a(this.field_147337_i));
|
||||
}
|
||||
}
|
||||
|
|
@ -16,7 +16,45 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -294,4 +296,135 @@
|
||||
@@ -89,9 +91,10 @@
|
||||
{
|
||||
TileEntity tileentity = null;
|
||||
|
||||
+ Class oclass = null;
|
||||
try
|
||||
{
|
||||
- Class oclass = (Class)field_145855_i.get(p_145827_0_.func_74779_i("id"));
|
||||
+ oclass = (Class)field_145855_i.get(p_145827_0_.func_74779_i("id"));
|
||||
|
||||
if (oclass != null)
|
||||
{
|
||||
@@ -109,7 +112,17 @@
|
||||
}
|
||||
else
|
||||
{
|
||||
+ try
|
||||
+ {
|
||||
field_145852_a.warn("Skipping BlockEntity with id " + p_145827_0_.func_74779_i("id"));
|
||||
+ }
|
||||
+ catch (Exception ex)
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.FMLLog.log(org.apache.logging.log4j.Level.ERROR, ex,
|
||||
+ "A TileEntity %s(%s) has thrown an exception during loading, its state cannot be restored. Report this to the mod author",
|
||||
+ p_145827_0_.func_74779_i("id"), oclass.getName());
|
||||
+ tileentity = null;
|
||||
+ }
|
||||
}
|
||||
|
||||
return tileentity;
|
||||
@@ -141,7 +154,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
- @SideOnly(Side.CLIENT)
|
||||
public double func_145835_a(double p_145835_1_, double p_145835_3_, double p_145835_5_)
|
||||
{
|
||||
double d3 = (double)this.field_174879_c.func_177958_n() + 0.5D - p_145835_1_;
|
||||
@@ -284,4 +296,135 @@
|
||||
func_145826_a(TileEntityFlowerPot.class, "FlowerPot");
|
||||
func_145826_a(TileEntityBanner.class, "Banner");
|
||||
}
|
||||
|
|
|
@ -32,3 +32,20 @@
|
|||
}
|
||||
|
||||
if (this.field_145957_n[0].func_77973_b() == Item.func_150898_a(Blocks.field_150360_v) && this.field_145957_n[0].func_77960_j() == 1 && this.field_145957_n[1] != null && this.field_145957_n[1].func_77973_b() == Items.field_151133_ar)
|
||||
@@ -348,7 +351,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
- return item instanceof ItemTool && ((ItemTool)item).func_77861_e().equals("WOOD") ? 200 : (item instanceof ItemSword && ((ItemSword)item).func_150932_j().equals("WOOD") ? 200 : (item instanceof ItemHoe && ((ItemHoe)item).func_77842_f().equals("WOOD") ? 200 : (item == Items.field_151055_y ? 100 : (item == Items.field_151044_h ? 1600 : (item == Items.field_151129_at ? 20000 : (item == Item.func_150898_a(Blocks.field_150345_g) ? 100 : (item == Items.field_151072_bj ? 2400 : 0)))))));
|
||||
+ if (item instanceof ItemTool && ((ItemTool)item).func_77861_e().equals("WOOD")) return 200;
|
||||
+ if (item instanceof ItemSword && ((ItemSword)item).func_150932_j().equals("WOOD")) return 200;
|
||||
+ if (item instanceof ItemHoe && ((ItemHoe)item).func_77842_f().equals("WOOD")) return 200;
|
||||
+ if (item == Items.field_151055_y) return 100;
|
||||
+ if (item == Items.field_151044_h) return 1600;
|
||||
+ if (item == Items.field_151129_at) return 20000;
|
||||
+ if (item == Item.func_150898_a(Blocks.field_150345_g)) return 100;
|
||||
+ if (item == Items.field_151072_bj) return 2400;
|
||||
+ return net.minecraftforge.fml.common.registry.GameRegistry.getFuelValue(p_145952_0_);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
--- ../src-base/minecraft/net/minecraft/util/MessageSerializer.java
|
||||
+++ ../src-work/minecraft/net/minecraft/util/MessageSerializer.java
|
||||
@@ -49,7 +49,7 @@
|
||||
{
|
||||
if (p_encode_2_ instanceof S0CPacketSpawnPlayer)
|
||||
{
|
||||
- p_encode_2_ = p_encode_2_;
|
||||
+ //p_encode_2_ = p_encode_2_; FML: Kill warning
|
||||
}
|
||||
|
||||
p_encode_2_.func_148840_b(packetbuffer);
|
10
patches/minecraft/net/minecraft/util/MouseHelper.java.patch
Normal file
10
patches/minecraft/net/minecraft/util/MouseHelper.java.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
--- ../src-base/minecraft/net/minecraft/util/MouseHelper.java
|
||||
+++ ../src-work/minecraft/net/minecraft/util/MouseHelper.java
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
public void func_74372_a()
|
||||
{
|
||||
+ if (Boolean.parseBoolean(System.getProperty("fml.noGrab","false"))) return;
|
||||
Mouse.setGrabbed(true);
|
||||
this.field_74377_a = 0;
|
||||
this.field_74375_b = 0;
|
|
@ -0,0 +1,26 @@
|
|||
--- ../src-base/minecraft/net/minecraft/util/ResourceLocation.java
|
||||
+++ ../src-work/minecraft/net/minecraft/util/ResourceLocation.java
|
||||
@@ -1,7 +1,5 @@
|
||||
package net.minecraft.util;
|
||||
|
||||
-import net.minecraftforge.fml.relauncher.Side;
|
||||
-import net.minecraftforge.fml.relauncher.SideOnly;
|
||||
import org.apache.commons.lang3.Validate;
|
||||
|
||||
public class ResourceLocation
|
||||
@@ -22,7 +20,6 @@
|
||||
this(0, func_177516_a(p_i1293_1_));
|
||||
}
|
||||
|
||||
- @SideOnly(Side.CLIENT)
|
||||
public ResourceLocation(String p_i1292_1_, String p_i1292_2_)
|
||||
{
|
||||
this(0, new String[] {p_i1292_1_, p_i1292_2_});
|
||||
@@ -51,7 +48,6 @@
|
||||
return this.field_110625_b;
|
||||
}
|
||||
|
||||
- @SideOnly(Side.CLIENT)
|
||||
public String func_110624_b()
|
||||
{
|
||||
return this.field_110626_a;
|
|
@ -0,0 +1,64 @@
|
|||
--- ../src-base/minecraft/net/minecraft/util/StringTranslate.java
|
||||
+++ ../src-work/minecraft/net/minecraft/util/StringTranslate.java
|
||||
@@ -18,16 +18,38 @@
|
||||
{
|
||||
private static final Pattern field_111053_a = Pattern.compile("%(\\d+\\$)?[\\d\\.]*[df]");
|
||||
private static final Splitter field_135065_b = Splitter.on('=').limit(2);
|
||||
+ private final Map field_74816_c;
|
||||
private static StringTranslate field_74817_a = new StringTranslate();
|
||||
- private final Map field_74816_c = Maps.newHashMap();
|
||||
private long field_150511_e;
|
||||
private static final String __OBFID = "CL_00001212";
|
||||
|
||||
public StringTranslate()
|
||||
{
|
||||
+ InputStream inputstream = StringTranslate.class.getResourceAsStream("/assets/minecraft/lang/en_US.lang");
|
||||
+ field_74816_c = Maps.newHashMap();
|
||||
+ inject(this, inputstream);
|
||||
+ }
|
||||
+
|
||||
+ public static void inject(InputStream inputstream)
|
||||
+ {
|
||||
+ inject(field_74817_a, inputstream);
|
||||
+ }
|
||||
+
|
||||
+ private static void inject(StringTranslate inst, InputStream inputstream)
|
||||
+ {
|
||||
+ java.util.HashMap<String, String> map = parseLangFile(inputstream);
|
||||
+ inst.field_74816_c.putAll(map);
|
||||
+ inst.field_150511_e = System.currentTimeMillis();
|
||||
+ }
|
||||
+
|
||||
+ public static java.util.HashMap<String,String> parseLangFile(InputStream inputstream)
|
||||
+ {
|
||||
+ java.util.HashMap<String,String> table = Maps.newHashMap();
|
||||
try
|
||||
{
|
||||
- InputStream inputstream = StringTranslate.class.getResourceAsStream("/assets/minecraft/lang/en_US.lang");
|
||||
+ inputstream = net.minecraftforge.fml.common.FMLCommonHandler.instance().loadLanguage(table, inputstream);
|
||||
+ if (inputstream == null) return table;
|
||||
+
|
||||
Iterator iterator = IOUtils.readLines(inputstream, Charsets.UTF_8).iterator();
|
||||
|
||||
while (iterator.hasNext())
|
||||
@@ -42,17 +64,17 @@
|
||||
{
|
||||
String s1 = astring[0];
|
||||
String s2 = field_111053_a.matcher(astring[1]).replaceAll("%$1s");
|
||||
- this.field_74816_c.put(s1, s2);
|
||||
+ table.put(s1, s2);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- this.field_150511_e = System.currentTimeMillis();
|
||||
}
|
||||
- catch (IOException ioexception)
|
||||
+ catch (Exception ioexception)
|
||||
{
|
||||
;
|
||||
}
|
||||
+ return table;
|
||||
}
|
||||
|
||||
static StringTranslate func_74808_a()
|
|
@ -417,8 +417,12 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
@@ -1628,6 +1767,10 @@
|
||||
@@ -1626,15 +1765,19 @@
|
||||
}
|
||||
}
|
||||
|
||||
- this.field_147481_N = false;
|
||||
-
|
||||
if (!this.field_147483_b.isEmpty())
|
||||
{
|
||||
+ for (Object tile : field_147483_b)
|
||||
|
@ -428,6 +432,13 @@
|
|||
this.field_175730_i.removeAll(this.field_147483_b);
|
||||
this.field_147482_g.removeAll(this.field_147483_b);
|
||||
this.field_147483_b.clear();
|
||||
}
|
||||
|
||||
+ this.field_147481_N = false; //FML Move below remove to prevent CMEs
|
||||
+
|
||||
this.field_72984_F.func_76318_c("pendingBlockEntities");
|
||||
|
||||
if (!this.field_147484_a.isEmpty())
|
||||
@@ -1668,7 +1811,8 @@
|
||||
|
||||
public boolean func_175700_a(TileEntity p_175700_1_)
|
||||
|
@ -792,7 +803,7 @@
|
|||
@SideOnly(Side.CLIENT)
|
||||
public double func_72919_O()
|
||||
{
|
||||
- return this.field_72986_A.func_76067_t().getHorizon(this);
|
||||
- return this.field_72986_A.func_76067_t() == WorldType.field_77138_c ? 0.0D : 63.0D;
|
||||
+ return field_73011_w.getHorizon();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,35 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/WorldProvider.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/WorldProvider.java
|
||||
@@ -141,13 +141,13 @@
|
||||
@@ -52,26 +52,12 @@
|
||||
|
||||
protected void func_76572_b()
|
||||
{
|
||||
- WorldType worldtype = this.field_76579_a.func_72912_H().func_76067_t();
|
||||
-
|
||||
- if (worldtype == WorldType.field_77138_c)
|
||||
- {
|
||||
- FlatGeneratorInfo flatgeneratorinfo = FlatGeneratorInfo.func_82651_a(this.field_76579_a.func_72912_H().func_82571_y());
|
||||
- this.field_76578_c = new WorldChunkManagerHell(BiomeGenBase.func_180276_a(flatgeneratorinfo.func_82648_a(), BiomeGenBase.field_180279_ad), 0.5F);
|
||||
- }
|
||||
- else if (worldtype == WorldType.field_180272_g)
|
||||
- {
|
||||
- this.field_76578_c = new WorldChunkManagerHell(BiomeGenBase.field_76772_c, 0.0F);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- this.field_76578_c = new WorldChunkManager(this.field_76579_a);
|
||||
- }
|
||||
+ this.field_76578_c = field_76577_b.getChunkManager(field_76579_a);
|
||||
}
|
||||
|
||||
public IChunkProvider func_76555_c()
|
||||
{
|
||||
- return (IChunkProvider)(this.field_76577_b == WorldType.field_77138_c ? new ChunkProviderFlat(this.field_76579_a, this.field_76579_a.func_72905_C(), this.field_76579_a.func_72912_H().func_76089_r(), this.field_82913_c) : (this.field_76577_b == WorldType.field_180272_g ? new ChunkProviderDebug(this.field_76579_a) : (this.field_76577_b == WorldType.field_180271_f ? new ChunkProviderGenerate(this.field_76579_a, this.field_76579_a.func_72905_C(), this.field_76579_a.func_72912_H().func_76089_r(), this.field_82913_c) : new ChunkProviderGenerate(this.field_76579_a, this.field_76579_a.func_72905_C(), this.field_76579_a.func_72912_H().func_76089_r(), this.field_82913_c))));
|
||||
+ return field_76577_b.getChunkGenerator(field_76579_a, field_82913_c);
|
||||
}
|
||||
|
||||
public boolean func_76566_a(int p_76566_1_, int p_76566_2_)
|
||||
@@ -155,13 +141,13 @@
|
||||
|
||||
public static WorldProvider func_76570_a(int p_76570_0_)
|
||||
{
|
||||
|
@ -16,7 +45,23 @@
|
|||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -211,4 +211,319 @@
|
||||
@@ -177,13 +163,13 @@
|
||||
|
||||
public int func_76557_i()
|
||||
{
|
||||
- return this.field_76577_b == WorldType.field_77138_c ? 4 : 64;
|
||||
+ return this.field_76577_b.getMinimumSpawnHeight(this.field_76579_a);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double func_76565_k()
|
||||
{
|
||||
- return this.field_76577_b == WorldType.field_77138_c ? 1.0D : 0.03125D;
|
||||
+ return this.field_76577_b.voidFadeMagnitude();
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -225,4 +211,319 @@
|
||||
{
|
||||
return new WorldBorder();
|
||||
}
|
||||
|
|
|
@ -23,10 +23,55 @@
|
|||
this.field_77133_f = p_i1960_2_;
|
||||
this.field_77134_g = p_i1960_3_;
|
||||
this.field_77140_h = true;
|
||||
@@ -159,8 +169,99 @@
|
||||
return this == field_77138_c ? random.nextInt(4) != 1 : false;
|
||||
@@ -114,4 +124,144 @@
|
||||
this.field_151361_l = true;
|
||||
return this;
|
||||
}
|
||||
|
||||
+
|
||||
+ public net.minecraft.world.biome.WorldChunkManager getChunkManager(World world)
|
||||
+ {
|
||||
+ if (this == field_77138_c)
|
||||
+ {
|
||||
+ net.minecraft.world.gen.FlatGeneratorInfo flatgeneratorinfo = net.minecraft.world.gen.FlatGeneratorInfo.func_82651_a(world.func_72912_H().func_82571_y());
|
||||
+ return new net.minecraft.world.biome.WorldChunkManagerHell(net.minecraft.world.biome.BiomeGenBase.func_180276_a(flatgeneratorinfo.func_82648_a(), net.minecraft.world.biome.BiomeGenBase.field_180279_ad), 0.5F);
|
||||
+ }
|
||||
+ else if (this == field_180272_g)
|
||||
+ {
|
||||
+ return new net.minecraft.world.biome.WorldChunkManagerHell(net.minecraft.world.biome.BiomeGenBase.field_76772_c, 0.0F);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ return new net.minecraft.world.biome.WorldChunkManager(world);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public net.minecraft.world.chunk.IChunkProvider getChunkGenerator(World world, String generatorOptions)
|
||||
+ {
|
||||
+ if (this == field_77138_c) return new net.minecraft.world.gen.ChunkProviderFlat(world, world.func_72905_C(), world.func_72912_H().func_76089_r(), generatorOptions);
|
||||
+ if (this == field_180272_g) return new net.minecraft.world.gen.ChunkProviderDebug(world);
|
||||
+ return new net.minecraft.world.gen.ChunkProviderGenerate(world, world.func_72905_C(), world.func_72912_H().func_76089_r(), generatorOptions);
|
||||
+ }
|
||||
+
|
||||
+ public int getMinimumSpawnHeight(World world)
|
||||
+ {
|
||||
+ return this == field_77138_c ? 4 : 64;
|
||||
+ }
|
||||
+
|
||||
+ public double getHorizon(World world)
|
||||
+ {
|
||||
+ return this == field_77138_c ? 0.0D : 63.0D;
|
||||
+ }
|
||||
+
|
||||
+ public double voidFadeMagnitude()
|
||||
+ {
|
||||
+ return this == field_77138_c ? 1.0D : 0.03125D;
|
||||
+ }
|
||||
+
|
||||
+ public boolean handleSlimeSpawnReduction(java.util.Random random, World world)
|
||||
+ {
|
||||
+ return this == field_77138_c ? random.nextInt(4) != 1 : false;
|
||||
+ }
|
||||
+
|
||||
+ /*=================================================== FORGE START ======================================*/
|
||||
+ private static int getNextID()
|
||||
+ {
|
||||
|
@ -43,7 +88,7 @@
|
|||
+ return oldLen;
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
+ /**
|
||||
+ * Creates a new world type, the ID is hidden and should not be referenced by modders.
|
||||
+ * It will automatically expand the underlying workdType array if there are no IDs left.
|
||||
+ * @param name
|
||||
|
@ -54,9 +99,9 @@
|
|||
+ }
|
||||
+
|
||||
+ /**
|
||||
* Called when 'Create New World' button is pressed before starting game
|
||||
*/
|
||||
public void onGUICreateWorldPress() { }
|
||||
+ * Called when 'Create New World' button is pressed before starting game
|
||||
+ */
|
||||
+ public void onGUICreateWorldPress() { }
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the spawn fuzz for players who join the world.
|
||||
|
|
|
@ -129,7 +129,46 @@
|
|||
this.func_75824_a(p_75816_2_.func_76632_l(), nbttagcompound);
|
||||
}
|
||||
catch (Exception exception)
|
||||
@@ -404,6 +469,12 @@
|
||||
@@ -287,11 +352,20 @@
|
||||
Entity entity = (Entity)iterator.next();
|
||||
nbttagcompound1 = new NBTTagCompound();
|
||||
|
||||
+ try
|
||||
+ {
|
||||
if (entity.func_70039_c(nbttagcompound1))
|
||||
{
|
||||
p_75820_1_.func_177409_g(true);
|
||||
nbttaglist1.func_74742_a(nbttagcompound1);
|
||||
}
|
||||
+ }
|
||||
+ catch (Exception e)
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.FMLLog.log(org.apache.logging.log4j.Level.ERROR, e,
|
||||
+ "An Entity type %s has thrown an exception trying to write state. It will not persist. Report this to the mod author",
|
||||
+ entity.getClass().getName());
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -303,8 +377,17 @@
|
||||
{
|
||||
TileEntity tileentity = (TileEntity)iterator.next();
|
||||
nbttagcompound1 = new NBTTagCompound();
|
||||
+ try
|
||||
+ {
|
||||
tileentity.func_145841_b(nbttagcompound1);
|
||||
nbttaglist2.func_74742_a(nbttagcompound1);
|
||||
+ }
|
||||
+ catch (Exception e)
|
||||
+ {
|
||||
+ net.minecraftforge.fml.common.FMLLog.log(org.apache.logging.log4j.Level.ERROR, e,
|
||||
+ "A TileEntity type %s has throw an exception trying to write state. It will not persist. Report this to the mod author",
|
||||
+ tileentity.getClass().getName());
|
||||
+ }
|
||||
}
|
||||
|
||||
p_75820_3_.func_74782_a("TileEntities", nbttaglist2);
|
||||
@@ -386,6 +469,12 @@
|
||||
chunk.func_76616_a(p_75823_2_.func_74770_j("Biomes"));
|
||||
}
|
||||
|
||||
|
@ -142,7 +181,7 @@
|
|||
NBTTagList nbttaglist1 = p_75823_2_.func_150295_c("Entities", 10);
|
||||
|
||||
if (nbttaglist1 != null)
|
||||
@@ -475,8 +546,6 @@
|
||||
@@ -457,8 +546,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -101,7 +101,15 @@
|
|||
chunk.func_76631_c();
|
||||
chunk.func_76624_a(this, this, p_73158_1_, p_73158_2_);
|
||||
}
|
||||
@@ -270,8 +328,13 @@
|
||||
@@ -209,6 +267,7 @@
|
||||
if (this.field_73246_d != null)
|
||||
{
|
||||
this.field_73246_d.func_73153_a(p_73153_1_, p_73153_2_, p_73153_3_);
|
||||
+ net.minecraftforge.fml.common.registry.GameRegistry.generateWorld(p_73153_2_, p_73153_3_, field_73251_h, field_73246_d, p_73153_1_);
|
||||
chunk.func_76630_e();
|
||||
}
|
||||
}
|
||||
@@ -269,8 +328,13 @@
|
||||
{
|
||||
if (!this.field_73251_h.field_73058_d)
|
||||
{
|
||||
|
@ -116,7 +124,7 @@
|
|||
if (!this.field_73248_b.isEmpty())
|
||||
{
|
||||
Long olong = (Long)this.field_73248_b.iterator().next();
|
||||
@@ -284,6 +347,11 @@
|
||||
@@ -283,6 +347,11 @@
|
||||
this.func_73243_a(chunk);
|
||||
this.field_73244_f.func_76159_d(olong.longValue());
|
||||
this.field_73245_g.remove(chunk);
|
||||
|
|
|
@ -12,7 +12,27 @@
|
|||
|
||||
public class StructureVillagePieces
|
||||
{
|
||||
@@ -848,6 +853,11 @@
|
||||
@@ -59,6 +64,8 @@
|
||||
arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.Field2.class, 3, MathHelper.func_76136_a(p_75084_0_, 2 + p_75084_1_, 4 + p_75084_1_ * 2)));
|
||||
arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House2.class, 15, MathHelper.func_76136_a(p_75084_0_, 0, 1 + p_75084_1_)));
|
||||
arraylist.add(new StructureVillagePieces.PieceWeight(StructureVillagePieces.House3.class, 8, MathHelper.func_76136_a(p_75084_0_, 0 + p_75084_1_, 3 + p_75084_1_ * 2)));
|
||||
+ net.minecraftforge.fml.common.registry.VillagerRegistry.addExtraVillageComponents(arraylist, p_75084_0_, p_75084_1_);
|
||||
+
|
||||
Iterator iterator = arraylist.iterator();
|
||||
|
||||
while (iterator.hasNext())
|
||||
@@ -132,6 +139,10 @@
|
||||
{
|
||||
object = StructureVillagePieces.House3.func_175849_a(p_176065_0_, p_176065_2_, p_176065_3_, p_176065_4_, p_176065_5_, p_176065_6_, p_176065_7_, p_176065_8_);
|
||||
}
|
||||
+ else
|
||||
+ {
|
||||
+ object = net.minecraftforge.fml.common.registry.VillagerRegistry.getVillageComponent(p_176065_1_, p_176065_0_ , p_176065_2_, p_176065_3_, p_176065_4_, p_176065_5_, p_176065_6_, p_176065_7_, p_176065_8_);
|
||||
+ }
|
||||
|
||||
return (StructureVillagePieces.Village)object;
|
||||
}
|
||||
@@ -842,6 +853,11 @@
|
||||
|
||||
public House2() {}
|
||||
|
||||
|
@ -24,7 +44,7 @@
|
|||
public House2(StructureVillagePieces.Start p_i45563_1_, int p_i45563_2_, Random p_i45563_3_, StructureBoundingBox p_i45563_4_, EnumFacing p_i45563_5_)
|
||||
{
|
||||
super(p_i45563_1_, p_i45563_2_);
|
||||
@@ -926,7 +936,7 @@
|
||||
@@ -920,7 +936,7 @@
|
||||
if (!this.field_74917_c && p_74875_3_.func_175898_b(new BlockPos(this.func_74865_a(5, 5), this.func_74862_a(1), this.func_74873_b(5, 5))))
|
||||
{
|
||||
this.field_74917_c = true;
|
||||
|
@ -33,7 +53,7 @@
|
|||
}
|
||||
|
||||
int i;
|
||||
@@ -1428,6 +1438,7 @@
|
||||
@@ -1422,6 +1438,7 @@
|
||||
public List field_74932_i = Lists.newArrayList();
|
||||
public List field_74930_j = Lists.newArrayList();
|
||||
private static final String __OBFID = "CL_00000527";
|
||||
|
@ -41,7 +61,7 @@
|
|||
|
||||
public Start() {}
|
||||
|
||||
@@ -1439,6 +1450,7 @@
|
||||
@@ -1433,6 +1450,7 @@
|
||||
this.field_74928_c = p_i2104_7_;
|
||||
BiomeGenBase biomegenbase = p_i2104_1_.func_180300_a(new BlockPos(p_i2104_4_, 0, p_i2104_5_), BiomeGenBase.field_180279_ad);
|
||||
this.field_74927_b = biomegenbase == BiomeGenBase.field_76769_d || biomegenbase == BiomeGenBase.field_76786_s;
|
||||
|
@ -49,7 +69,7 @@
|
|||
this.func_175846_a(this.field_74927_b);
|
||||
}
|
||||
|
||||
@@ -1546,6 +1558,7 @@
|
||||
@@ -1540,6 +1558,7 @@
|
||||
private int field_74896_a;
|
||||
private boolean field_143014_b;
|
||||
private static final String __OBFID = "CL_00000531";
|
||||
|
@ -57,7 +77,7 @@
|
|||
|
||||
public Village() {}
|
||||
|
||||
@@ -1556,6 +1569,7 @@
|
||||
@@ -1550,6 +1569,7 @@
|
||||
if (p_i2107_1_ != null)
|
||||
{
|
||||
this.field_143014_b = p_i2107_1_.field_74927_b;
|
||||
|
@ -65,7 +85,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
@@ -1679,6 +1693,9 @@
|
||||
@@ -1673,6 +1693,9 @@
|
||||
|
||||
protected IBlockState func_175847_a(IBlockState p_175847_1_)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,43 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/storage/MapData.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/storage/MapData.java
|
||||
@@ -176,7 +176,7 @@
|
||||
@@ -22,7 +22,7 @@
|
||||
{
|
||||
public int field_76201_a;
|
||||
public int field_76199_b;
|
||||
- public byte field_76200_c;
|
||||
+ public int field_76200_c; //FML byte -> int
|
||||
public byte field_76197_d;
|
||||
public byte[] field_76198_e = new byte[16384];
|
||||
public List field_76196_g = Lists.newArrayList();
|
||||
@@ -46,7 +46,17 @@
|
||||
|
||||
public void func_76184_a(NBTTagCompound p_76184_1_)
|
||||
{
|
||||
- this.field_76200_c = p_76184_1_.func_74771_c("dimension");
|
||||
+ net.minecraft.nbt.NBTBase dimension = p_76184_1_.func_74781_a("dimension");
|
||||
+
|
||||
+ if (dimension instanceof net.minecraft.nbt.NBTTagByte)
|
||||
+ {
|
||||
+ this.field_76200_c = ((net.minecraft.nbt.NBTTagByte)dimension).func_150290_f();
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ this.field_76200_c = ((net.minecraft.nbt.NBTTagInt)dimension).func_150287_d();
|
||||
+ }
|
||||
+
|
||||
this.field_76201_a = p_76184_1_.func_74762_e("xCenter");
|
||||
this.field_76199_b = p_76184_1_.func_74762_e("zCenter");
|
||||
this.field_76197_d = p_76184_1_.func_74771_c("scale");
|
||||
@@ -87,7 +97,7 @@
|
||||
|
||||
public void func_76187_b(NBTTagCompound p_76187_1_)
|
||||
{
|
||||
- p_76187_1_.func_74774_a("dimension", this.field_76200_c);
|
||||
+ p_76187_1_.func_74768_a("dimension", this.field_76200_c);
|
||||
p_76187_1_.func_74768_a("xCenter", this.field_76201_a);
|
||||
p_76187_1_.func_74768_a("zCenter", this.field_76199_b);
|
||||
p_76187_1_.func_74774_a("scale", this.field_76197_d);
|
||||
@@ -166,7 +176,7 @@
|
||||
p_82567_8_ += p_82567_8_ < 0.0D ? -8.0D : 8.0D;
|
||||
b2 = (byte)((int)(p_82567_8_ * 16.0D / 360.0D));
|
||||
|
||||
|
|
|
@ -1,6 +1,70 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/storage/SaveHandler.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/storage/SaveHandler.java
|
||||
@@ -251,6 +251,7 @@
|
||||
@@ -107,20 +107,29 @@
|
||||
NBTTagCompound nbttagcompound;
|
||||
NBTTagCompound nbttagcompound1;
|
||||
|
||||
+ WorldInfo worldInfo = null;
|
||||
+
|
||||
if (file1.exists())
|
||||
{
|
||||
try
|
||||
{
|
||||
nbttagcompound = CompressedStreamTools.func_74796_a(new FileInputStream(file1));
|
||||
nbttagcompound1 = nbttagcompound.func_74775_l("Data");
|
||||
- return new WorldInfo(nbttagcompound1);
|
||||
+ worldInfo = new WorldInfo(nbttagcompound1);
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleWorldDataLoad(this, worldInfo, nbttagcompound);
|
||||
+ return worldInfo;
|
||||
}
|
||||
+ catch (net.minecraftforge.fml.common.StartupQuery.AbortedException e)
|
||||
+ {
|
||||
+ throw e;
|
||||
+ }
|
||||
catch (Exception exception1)
|
||||
{
|
||||
exception1.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().confirmBackupLevelDatUse(this);
|
||||
file1 = new File(this.field_75770_b, "level.dat_old");
|
||||
|
||||
if (file1.exists())
|
||||
@@ -129,7 +138,13 @@
|
||||
{
|
||||
nbttagcompound = CompressedStreamTools.func_74796_a(new FileInputStream(file1));
|
||||
nbttagcompound1 = nbttagcompound.func_74775_l("Data");
|
||||
- return new WorldInfo(nbttagcompound1);
|
||||
+ worldInfo = new WorldInfo(nbttagcompound1);
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleWorldDataLoad(this, worldInfo, nbttagcompound);
|
||||
+ return worldInfo;
|
||||
+ }
|
||||
+ catch (net.minecraftforge.fml.common.StartupQuery.AbortedException e)
|
||||
+ {
|
||||
+ throw e;
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -146,6 +161,8 @@
|
||||
NBTTagCompound nbttagcompound2 = new NBTTagCompound();
|
||||
nbttagcompound2.func_74782_a("Data", nbttagcompound1);
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleWorldDataSave(this, p_75755_1_, nbttagcompound2);
|
||||
+
|
||||
try
|
||||
{
|
||||
File file1 = new File(this.field_75770_b, "level.dat_new");
|
||||
@@ -184,6 +201,8 @@
|
||||
NBTTagCompound nbttagcompound1 = new NBTTagCompound();
|
||||
nbttagcompound1.func_74782_a("Data", nbttagcompound);
|
||||
|
||||
+ net.minecraftforge.fml.common.FMLCommonHandler.instance().handleWorldDataSave(this, p_75761_1_, nbttagcompound1);
|
||||
+
|
||||
try
|
||||
{
|
||||
File file1 = new File(this.field_75770_b, "level.dat_new");
|
||||
@@ -232,6 +251,7 @@
|
||||
}
|
||||
|
||||
file1.renameTo(file2);
|
||||
|
@ -8,7 +72,7 @@
|
|||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -281,6 +282,7 @@
|
||||
@@ -262,6 +282,7 @@
|
||||
p_75752_1_.func_70020_e(nbttagcompound);
|
||||
}
|
||||
|
||||
|
@ -16,3 +80,26 @@
|
|||
return nbttagcompound;
|
||||
}
|
||||
|
||||
@@ -301,4 +322,22 @@
|
||||
{
|
||||
return this.field_75767_f;
|
||||
}
|
||||
+
|
||||
+ public NBTTagCompound getPlayerNBT(net.minecraft.entity.player.EntityPlayerMP player)
|
||||
+ {
|
||||
+ try
|
||||
+ {
|
||||
+ File file1 = new File(this.field_75771_c, player.func_110124_au().toString() + ".dat");
|
||||
+
|
||||
+ if (file1.exists() && file1.isFile())
|
||||
+ {
|
||||
+ return CompressedStreamTools.func_74796_a(new FileInputStream(file1));
|
||||
+ }
|
||||
+ }
|
||||
+ catch (Exception exception)
|
||||
+ {
|
||||
+ field_151478_a.warn("Failed to load player data for " + player.func_70005_c_());
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
}
|
||||
|
|
|
@ -0,0 +1,35 @@
|
|||
--- ../src-base/minecraft/net/minecraft/world/storage/WorldInfo.java
|
||||
+++ ../src-work/minecraft/net/minecraft/world/storage/WorldInfo.java
|
||||
@@ -52,6 +52,7 @@
|
||||
private int field_176155_J;
|
||||
private GameRules field_82577_x;
|
||||
private static final String __OBFID = "CL_00000587";
|
||||
+ private java.util.Map<String, net.minecraft.nbt.NBTBase> additionalProperties;
|
||||
|
||||
protected WorldInfo()
|
||||
{
|
||||
@@ -803,4 +804,24 @@
|
||||
}
|
||||
});
|
||||
}
|
||||
+
|
||||
+ /**
|
||||
+ * Allow access to additional mod specific world based properties
|
||||
+ * Used by FML to store mod list associated with a world, and maybe an id map
|
||||
+ * Used by Forge to store the dimensions available to a world
|
||||
+ * @param additionalProperties
|
||||
+ */
|
||||
+ public void setAdditionalProperties(java.util.Map<String,net.minecraft.nbt.NBTBase> additionalProperties)
|
||||
+ {
|
||||
+ // one time set for this
|
||||
+ if (this.additionalProperties == null)
|
||||
+ {
|
||||
+ this.additionalProperties = additionalProperties;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public net.minecraft.nbt.NBTBase getAdditionalProperty(String additionalProperty)
|
||||
+ {
|
||||
+ return this.additionalProperties!=null? this.additionalProperties.get(additionalProperty) : null;
|
||||
+ }
|
||||
}
|
|
@ -0,0 +1,47 @@
|
|||
--- ../src-base/minecraft/net/minecraftforge/fml/relauncher/Side.java
|
||||
+++ ../src-work/minecraft/net/minecraftforge/fml/relauncher/Side.java
|
||||
@@ -1,15 +1,41 @@
|
||||
+/*
|
||||
+ * Forge Mod Loader
|
||||
+ * Copyright (c) 2012-2013 cpw.
|
||||
+ * All rights reserved. This program and the accompanying materials
|
||||
+ * 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
|
||||
+ */
|
||||
+
|
||||
package net.minecraftforge.fml.relauncher;
|
||||
|
||||
-public enum Side
|
||||
-{
|
||||
+public enum Side {
|
||||
+
|
||||
+ /**
|
||||
+ * The client side. Specifically, an environment where rendering capability exists.
|
||||
+ * Usually in the game client.
|
||||
+ */
|
||||
CLIENT,
|
||||
+ /**
|
||||
+ * The server side. Specifically, an environment where NO rendering capability exists.
|
||||
+ * Usually on the dedicated server.
|
||||
+ */
|
||||
SERVER;
|
||||
|
||||
+ /**
|
||||
+ * @return If this is the server environment
|
||||
+ */
|
||||
public boolean isServer()
|
||||
{
|
||||
- return !this.isClient();
|
||||
+ return !isClient();
|
||||
}
|
||||
|
||||
+ /**
|
||||
+ * @return if this is the Client environment
|
||||
+ */
|
||||
public boolean isClient()
|
||||
{
|
||||
return this == CLIENT;
|
|
@ -0,0 +1,46 @@
|
|||
--- ../src-base/minecraft/net/minecraftforge/fml/relauncher/SideOnly.java
|
||||
+++ ../src-work/minecraft/net/minecraftforge/fml/relauncher/SideOnly.java
|
||||
@@ -1,3 +1,15 @@
|
||||
+/*
|
||||
+ * Forge Mod Loader
|
||||
+ * Copyright (c) 2012-2013 cpw.
|
||||
+ * All rights reserved. This program and the accompanying materials
|
||||
+ * 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
|
||||
+ */
|
||||
+
|
||||
package net.minecraftforge.fml.relauncher;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
@@ -5,9 +17,25 @@
|
||||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
+import net.minecraftforge.fml.common.SidedProxy;
|
||||
+
|
||||
+
|
||||
+/**
|
||||
+ * Marks the associated element as being only available on a certain {@link Side}. This is
|
||||
+ * generally meant for internal Forge and FML use only and should only be used on mod classes
|
||||
+ * when other more common mechanisms, such as using a {@link SidedProxy} fail to work.
|
||||
+ *
|
||||
+ * Note, this will <em>only</em> apply to the direct element marked. This code:
|
||||
+ * <code> @SideOnly public MyField field = new MyField();</code> will <strong>not</strong> work, as the initializer
|
||||
+ * is a separate piece of code to the actual field declaration, and will not be able to find
|
||||
+ * it's field on the wrong side.
|
||||
+ *
|
||||
+ * @author cpw
|
||||
+ *
|
||||
+ */
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
-@Target( {ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
|
||||
+@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.CONSTRUCTOR})
|
||||
public @interface SideOnly
|
||||
{
|
||||
- Side value();
|
||||
+ public Side value();
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue