Update to 1.7.10-pre4.

This commit is contained in:
Lex Manos 2014-06-23 21:55:16 -07:00
parent 1275aa732e
commit 256d865db6
55 changed files with 569 additions and 698 deletions

View File

@ -34,7 +34,7 @@ repositories {
}
minecraft {
version = '1.7.2'
version = '1.7.10-pre4'
mcpVersion = '9.03'
fmlDir = projectDir.getAbsolutePath() + "/fml";
mainClass = 'cpw.mods.fml.relauncher.ServerLaunchWrapper'

Binary file not shown.

2
fml

@ -1 +1 @@
Subproject commit dff22045587b37282adeb2167486a572f51f1f16
Subproject commit e06d7e47e0fe5e49e053d71f7d12fb207ec6a895

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/block/BlockChest.java
+++ ../src-work/minecraft/net/minecraft/block/BlockChest.java
@@ -23,6 +23,8 @@
@@ -24,6 +24,8 @@
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
@ -9,7 +9,7 @@
public class BlockChest extends BlockContainer
{
private final Random field_149955_b = new Random();
@@ -407,7 +409,7 @@
@@ -408,7 +410,7 @@
{
return null;
}
@ -18,7 +18,7 @@
{
return null;
}
@@ -415,19 +417,19 @@
@@ -416,19 +418,19 @@
{
return null;
}

View File

@ -8,20 +8,21 @@
import java.util.Random;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
@@ -139,12 +140,6 @@
public void func_149690_a(World p_149690_1_, int p_149690_2_, int p_149690_3_, int p_149690_4_, int p_149690_5_, float p_149690_6_, int p_149690_7_)
@@ -138,13 +139,6 @@
public void func_149749_a(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
{
super.func_149690_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, p_149690_5_, p_149690_6_, p_149690_7_);
- TileEntityFlowerPot tileentityflowerpot = this.func_149929_e(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_);
- TileEntityFlowerPot tileentityflowerpot = this.func_149929_e(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_);
-
- if (tileentityflowerpot != null && tileentityflowerpot.func_145965_a() != null)
- {
- this.func_149642_a(p_149690_1_, p_149690_2_, p_149690_3_, p_149690_4_, new ItemStack(tileentityflowerpot.func_145965_a(), 1, tileentityflowerpot.func_145966_b()));
- this.func_149642_a(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, new ItemStack(tileentityflowerpot.func_145965_a(), 1, tileentityflowerpot.func_145966_b()));
- }
-
super.func_149749_a(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, p_149749_5_, p_149749_6_);
}
public void func_149749_a(World p_149749_1_, int p_149749_2_, int p_149749_3_, int p_149749_4_, Block p_149749_5_, int p_149749_6_)
@@ -242,4 +237,14 @@
@@ -231,4 +225,14 @@
return new TileEntityFlowerPot(Item.func_150898_a((Block)object), b0);
}

View File

@ -8,7 +8,7 @@
import java.util.Iterator;
import java.util.Random;
import net.minecraft.block.material.Material;
@@ -108,8 +109,6 @@
@@ -109,8 +110,6 @@
return p_149692_1_;
}
@ -17,12 +17,12 @@
public void func_149681_a(World p_149681_1_, int p_149681_2_, int p_149681_3_, int p_149681_4_, int p_149681_5_, EntityPlayer p_149681_6_)
{
if (p_149681_6_.field_71075_bZ.field_75098_d)
@@ -118,29 +117,38 @@
@@ -118,19 +117,28 @@
p_149681_5_ |= 8;
p_149681_1_.func_72921_c(p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, 4);
}
+ this.func_149697_b(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, 0);
+
super.func_149681_a(p_149681_1_, p_149681_2_, p_149681_3_, p_149681_4_, p_149681_5_, p_149681_6_);
}
@ -44,10 +44,11 @@
+ if (tileentityskull == null) return ret;
+
if (tileentityskull.func_145904_a() == 3 && tileentityskull.func_145907_c() != null && tileentityskull.func_145907_c().length() > 0)
if (tileentityskull.func_145904_a() == 3 && tileentityskull.func_152108_a() != null)
{
itemstack.func_77982_d(new NBTTagCompound());
itemstack.func_77978_p().func_74778_a("SkullOwner", tileentityskull.func_145907_c());
@@ -139,11 +147,10 @@
itemstack.func_77978_p().func_74782_a("SkullOwner", nbttagcompound);
}
- this.func_149642_a(p_149749_1_, p_149749_2_, p_149749_3_, p_149749_4_, itemstack);

View File

@ -1,48 +1,32 @@
--- ../src-base/minecraft/net/minecraft/client/Minecraft.java
+++ ../src-work/minecraft/net/minecraft/client/Minecraft.java
@@ -135,6 +135,14 @@
import net.minecraft.world.storage.ISaveFormat;
import net.minecraft.world.storage.ISaveHandler;
import net.minecraft.world.storage.WorldInfo;
+import net.minecraftforge.client.ForgeHooksClient;
+import net.minecraftforge.client.GuiIngameForge;
+import net.minecraftforge.client.event.GuiOpenEvent;
+import net.minecraftforge.common.ForgeHooks;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.event.ForgeEventFactory;
+import net.minecraftforge.event.entity.player.PlayerInteractEvent.Action;
+import net.minecraftforge.event.world.WorldEvent;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.lwjgl.LWJGLException;
@@ -246,7 +254,7 @@
@@ -276,7 +276,6 @@
this.func_71389_H();
this.field_71449_j = p_i1014_1_;
field_147123_G.info("Setting user: " + p_i1014_1_.func_111285_a());
- field_147123_G.info("(Session ID is " + p_i1014_1_.func_111286_b() + ")");
+ //logger.info("(Session ID is " + par1Session.getSessionID() + ")"); //don't print the session to the console.. that's stupid...
this.field_71459_aj = p_i1014_5_;
this.field_71443_c = p_i1014_2_;
this.field_71440_d = p_i1014_3_;
@@ -419,7 +427,7 @@
this.field_71449_j = p_i1103_1_;
field_147123_G.info("Setting user: " + p_i1103_1_.func_111285_a());
- field_147123_G.info("(Session ID is " + p_i1103_1_.func_111286_b() + ")");
this.field_71459_aj = p_i1103_5_;
this.field_71443_c = p_i1103_2_;
this.field_71440_d = p_i1103_3_;
@@ -430,7 +429,7 @@
try
{
- Display.create((new PixelFormat()).withDepthBits(24));
+ ForgeHooksClient.createDisplay();
+ net.minecraftforge.client.ForgeHooksClient.createDisplay();
}
catch (LWJGLException lwjglexception)
{
@@ -518,7 +526,7 @@
@@ -541,7 +540,7 @@
this.field_71452_i = new EffectRenderer(this.field_71441_e, this.field_71446_o);
FMLClientHandler.instance().finishMinecraftLoading();
this.func_71361_d("Post startup");
- this.field_71456_v = new GuiIngame(this);
+ this.field_71456_v = new GuiIngameForge(this);
+ this.field_71456_v = new net.minecraftforge.client.GuiIngameForge(this);
if (this.field_71475_ae != null)
{
@@ -701,11 +709,6 @@
@@ -761,11 +760,6 @@
public void func_147108_a(GuiScreen p_147108_1_)
{
@ -54,14 +38,14 @@
if (p_147108_1_ == null && this.field_71441_e == null)
{
p_147108_1_ = new GuiMainMenu();
@@ -715,6 +718,17 @@
@@ -775,6 +769,17 @@
p_147108_1_ = new GuiGameOver();
}
+ GuiScreen old = this.field_71462_r;
+ GuiOpenEvent event = new GuiOpenEvent(p_147108_1_);
+ net.minecraftforge.client.event.GuiOpenEvent event = new net.minecraftforge.client.event.GuiOpenEvent(p_147108_1_);
+
+ if (MinecraftForge.EVENT_BUS.post(event)) return;
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) return;
+
+ p_147108_1_ = event.gui;
+ if (old != null && p_147108_1_ != old)
@ -72,7 +56,7 @@
if (p_147108_1_ instanceof GuiMainMenu)
{
this.field_71474_y.field_74330_P = false;
@@ -1296,7 +1310,7 @@
@@ -1342,7 +1347,7 @@
if (this.field_71439_g.func_82246_f(i, j, k))
{
@ -81,7 +65,7 @@
this.field_71439_g.func_71038_i();
}
}
@@ -1377,11 +1391,12 @@
@@ -1423,11 +1428,12 @@
int j = this.field_71476_x.field_72312_c;
int k = this.field_71476_x.field_72309_d;
@ -91,43 +75,43 @@
int l = itemstack != null ? itemstack.field_77994_a : 0;
- if (this.field_71442_b.func_78760_a(this.field_71439_g, this.field_71441_e, itemstack, i, j, k, this.field_71476_x.field_72310_e, this.field_71476_x.field_72307_f))
+ boolean result = !ForgeEventFactory.onPlayerInteract(field_71439_g, Action.RIGHT_CLICK_BLOCK, i, j, k, this.field_71476_x.field_72310_e, this.field_71441_e).isCanceled();
+ boolean result = !net.minecraftforge.event.ForgeEventFactory.onPlayerInteract(field_71439_g, net.minecraftforge.event.entity.player.PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK, i, j, k, this.field_71476_x.field_72310_e, this.field_71441_e).isCanceled();
+ if (result && this.field_71442_b.func_78760_a(this.field_71439_g, this.field_71441_e, itemstack, i, j, k, this.field_71476_x.field_72310_e, this.field_71476_x.field_72307_f))
{
flag = false;
this.field_71439_g.func_71038_i();
@@ -1408,7 +1423,8 @@
@@ -1454,7 +1460,8 @@
{
ItemStack itemstack1 = this.field_71439_g.field_71071_by.func_70448_g();
- if (itemstack1 != null && this.field_71442_b.func_78769_a(this.field_71439_g, this.field_71441_e, itemstack1))
+ boolean result = !ForgeEventFactory.onPlayerInteract(field_71439_g, Action.RIGHT_CLICK_AIR, 0, 0, 0, -1, this.field_71441_e).isCanceled();
+ boolean result = !net.minecraftforge.event.ForgeEventFactory.onPlayerInteract(field_71439_g, net.minecraftforge.event.entity.player.PlayerInteractEvent.Action.RIGHT_CLICK_AIR, 0, 0, 0, -1, this.field_71441_e).isCanceled();
+ if (result && itemstack1 != null && this.field_71442_b.func_78769_a(this.field_71439_g, this.field_71441_e, itemstack1))
{
this.field_71460_t.field_78516_c.func_78445_c();
}
@@ -1607,6 +1623,8 @@
@@ -1666,6 +1673,8 @@
while (Mouse.next())
{
+ if (ForgeHooksClient.postMouseEvent()) continue;
+ if (net.minecraftforge.client.ForgeHooksClient.postMouseEvent()) continue;
+
i = Mouse.getEventButton();
j = Mouse.getEventButton();
KeyBinding.func_74510_a(j - 100, Mouse.getEventButtonState());
if (field_142025_a && i == 0 && (Keyboard.isKeyDown(29) || Keyboard.isKeyDown(157)))
@@ -2080,6 +2098,11 @@
@@ -2128,6 +2137,11 @@
public void func_71353_a(WorldClient p_71353_1_, String p_71353_2_)
{
+ if (field_71441_e != null)
+ {
+ MinecraftForge.EVENT_BUS.post(new WorldEvent.Unload(field_71441_e));
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.WorldEvent.Unload(field_71441_e));
+ }
+
if (p_71353_1_ == null)
{
NetHandlerPlayClient nethandlerplayclient = this.func_147114_u();
@@ -2092,6 +2115,18 @@
@@ -2140,6 +2154,18 @@
if (this.field_71437_Z != null)
{
this.field_71437_Z.func_71263_m();
@ -146,7 +130,7 @@
}
this.field_71437_Z = null;
@@ -2240,113 +2275,10 @@
@@ -2288,113 +2314,10 @@
if (this.field_71476_x != null)
{
boolean flag = this.field_71439_g.field_71075_bZ.field_75098_d;
@ -257,13 +241,13 @@
-
- this.field_71439_g.field_71071_by.func_146030_a(item, i, flag1, flag);
-
+ if (!ForgeHooks.onPickBlock(this.field_71476_x, this.field_71439_g, this.field_71441_e)) return;
+ if (!net.minecraftforge.common.ForgeHooks.onPickBlock(this.field_71476_x, this.field_71439_g, this.field_71441_e)) return;
+ // We delete this code wholly instead of commenting it out, to make sure we detect changes in it between MC versions
if (flag)
{
j = this.field_71439_g.field_71069_bz.field_75151_b.size() - 9 + this.field_71439_g.field_71071_by.field_70461_c;
@@ -2513,8 +2445,15 @@
p_70001_1_.func_76472_a("gl_max_texture_size", Integer.valueOf(func_71369_N()));
@@ -2660,8 +2583,15 @@
p_70001_1_.func_152767_b("gl_max_texture_size", Integer.valueOf(func_71369_N()));
}
+ //Forge: Adds a optimization to the getGLMaximumTextureSize, only calculate it once.
@ -278,7 +262,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);
@@ -2522,6 +2461,7 @@
@@ -2669,6 +2599,7 @@
if (j != 0)
{

View File

@ -1,30 +1,14 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiChat.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiChat.java
@@ -1,6 +1,7 @@
package net.minecraft.client.gui;
import com.google.common.collect.Lists;
+import com.google.common.collect.ObjectArrays;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.io.File;
@@ -24,6 +25,7 @@
import net.minecraft.util.ChatComponentTranslation;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
+import net.minecraftforge.client.ClientCommandHandler;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.lwjgl.input.Keyboard;
@@ -131,6 +133,7 @@
@@ -138,6 +138,7 @@
public void func_146403_a(String p_146403_1_)
{
this.field_146297_k.field_71456_v.func_146158_b().func_146239_a(p_146403_1_);
+ if (ClientCommandHandler.instance.func_71556_a(field_146297_k.field_71439_g, p_146403_1_) == 1) return;
+ if (net.minecraftforge.client.ClientCommandHandler.instance.func_71556_a(field_146297_k.field_71439_g, p_146403_1_) == 1) return;
this.field_146297_k.field_71439_g.func_71165_d(p_146403_1_);
}
@@ -305,13 +308,14 @@
@@ -330,13 +331,14 @@
this.field_146297_k.field_71456_v.func_146158_b().func_146234_a(new ChatComponentText(stringbuilder.toString()), 1);
}
@ -36,18 +20,18 @@
{
if (p_146405_1_.length() >= 1)
{
+ ClientCommandHandler.instance.autoComplete(p_146405_1_, p_146405_2_);
+ net.minecraftforge.client.ClientCommandHandler.instance.autoComplete(p_146405_1_, p_146405_2_);
this.field_146297_k.field_71439_g.field_71174_a.func_147297_a(new C14PacketTabComplete(p_146405_1_));
this.field_146414_r = true;
}
@@ -433,6 +437,13 @@
@@ -458,6 +460,13 @@
String[] astring1 = p_146406_1_;
int i = p_146406_1_.length;
+ String[] complete = ClientCommandHandler.instance.latestAutoComplete;
+ String[] complete = net.minecraftforge.client.ClientCommandHandler.instance.latestAutoComplete;
+ if (complete != null)
+ {
+ astring1 = ObjectArrays.concat(complete, astring1, String.class);
+ astring1 = com.google.common.collect.ObjectArrays.concat(complete, astring1, String.class);
+ i = astring1.length;
+ }
+

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/gui/GuiMainMenu.java
+++ ../src-work/minecraft/net/minecraft/client/gui/GuiMainMenu.java
@@ -30,6 +30,7 @@
@@ -25,6 +25,7 @@
import net.minecraft.world.demo.DemoWorldServer;
import net.minecraft.world.storage.ISaveFormat;
import net.minecraft.world.storage.WorldInfo;
@ -8,7 +8,7 @@
import org.apache.commons.io.Charsets;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -614,6 +615,7 @@
@@ -507,6 +508,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);
}
}

View File

@ -1,11 +0,0 @@
--- ../src-base/minecraft/net/minecraft/client/gui/mco/GuiScreenCreateOnlineWorld.java
+++ ../src-work/minecraft/net/minecraft/client/gui/mco/GuiScreenCreateOnlineWorld.java
@@ -202,7 +202,7 @@
GuiScreenCreateOnlineWorld.field_146765_a.error("Couldn\'t create world");
this.func_148416_a(unsupportedencodingexception.getLocalizedMessage());
}
- catch (IOException ioexception)
+ catch (@SuppressWarnings("hiding") IOException ioexception)
{
GuiScreenCreateOnlineWorld.field_146765_a.error("Could not parse response creating world");
this.func_148416_a(ioexception.getLocalizedMessage());

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java
+++ ../src-work/minecraft/net/minecraft/client/network/NetHandlerPlayClient.java
@@ -190,6 +190,8 @@
@@ -195,6 +195,8 @@
import net.minecraft.world.storage.ISaveHandler;
import net.minecraft.world.storage.MapData;
import net.minecraft.world.storage.MapStorage;
@ -9,7 +9,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -673,7 +675,11 @@
@@ -686,7 +688,11 @@
public void func_147251_a(S02PacketChat p_147251_1_)
{
@ -22,7 +22,7 @@
}
public void func_147279_a(S0BPacketAnimation p_147279_1_)
@@ -1113,6 +1119,10 @@
@@ -1126,6 +1132,10 @@
{
tileentity.func_145839_a(p_147273_1_.func_148857_g());
}

View File

@ -77,18 +77,18 @@
}
catch (Throwable throwable)
{
@@ -1203,7 +1210,10 @@
@@ -1213,7 +1220,10 @@
GL11.glPushMatrix();
RenderHelper.func_74519_b();
this.field_78531_r.field_71424_I.func_76318_c("entities");
+ ForgeHooksClient.setRenderPass(0);
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(0);
renderglobal.func_147589_a(entitylivingbase, frustrum, p_78471_1_);
+ ForgeHooksClient.setRenderPass(0);
+ // ToDo: Try and figure out how to make particles render sorted correctly.. {They render behind water}
this.func_78463_b((double)p_78471_1_);
this.field_78531_r.field_71424_I.func_76318_c("litParticles");
effectrenderer.func_78872_b(entitylivingbase, p_78471_1_);
@@ -1221,7 +1231,10 @@
+ net.minecraftforge.client.ForgeHooksClient.setRenderPass(0);
+ //ToDo: Try and figure out how to make particles render sorted correctly.. {They render behind water}
RenderHelper.func_74518_a();
this.func_78483_a((double)p_78471_1_);
GL11.glMatrixMode(GL11.GL_MODELVIEW);
@@ -1225,7 +1235,10 @@
entityplayer = (EntityPlayer)entitylivingbase;
GL11.glDisable(GL11.GL_ALPHA_TEST);
this.field_78531_r.field_71424_I.func_76318_c("outline");
@ -100,7 +100,7 @@
GL11.glEnable(GL11.GL_ALPHA_TEST);
}
}
@@ -1234,14 +1247,17 @@
@@ -1238,14 +1251,17 @@
entityplayer = (EntityPlayer)entitylivingbase;
GL11.glDisable(GL11.GL_ALPHA_TEST);
this.field_78531_r.field_71424_I.func_76318_c("outline");
@ -118,9 +118,9 @@
- renderglobal.func_72717_a(Tessellator.field_78398_a, (EntityPlayer)entitylivingbase, p_78471_1_);
+ renderglobal.drawBlockDamageTexture(Tessellator.field_78398_a, entitylivingbase, p_78471_1_);
GL11.glDisable(GL11.GL_BLEND);
GL11.glDepthMask(false);
GL11.glEnable(GL11.GL_CULL_FACE);
@@ -1296,6 +1312,16 @@
if (this.field_78532_q == 0)
@@ -1313,6 +1329,16 @@
renderglobal.func_72719_a(entitylivingbase, 1, (double)p_78471_1_);
}
@ -137,7 +137,7 @@
GL11.glDepthMask(true);
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glDisable(GL11.GL_BLEND);
@@ -1307,9 +1333,12 @@
@@ -1324,9 +1350,12 @@
this.func_82829_a(renderglobal, p_78471_1_);
}
@ -151,7 +151,7 @@
{
GL11.glClear(GL11.GL_DEPTH_BUFFER_BIT);
this.func_78476_b(p_78471_1_, j);
@@ -1425,6 +1454,13 @@
@@ -1442,6 +1471,13 @@
protected void func_78474_d(float p_78474_1_)
{
@ -165,7 +165,7 @@
float f1 = this.field_78531_r.field_71441_e.func_72867_j(p_78474_1_);
if (f1 > 0.0F)
@@ -1774,6 +1810,13 @@
@@ -1791,6 +1827,13 @@
this.field_78533_p = f7;
}
@ -179,7 +179,7 @@
GL11.glClearColor(this.field_78518_n, this.field_78519_o, this.field_78533_p, 0.0F);
}
@@ -1809,6 +1852,13 @@
@@ -1826,6 +1869,13 @@
Block block = ActiveRenderInfo.func_151460_a(this.field_78531_r.field_71441_e, entitylivingbase, p_78468_2_);
float f1;

View File

@ -22,7 +22,7 @@
@SideOnly(Side.CLIENT)
public class ItemRenderer
{
@@ -49,13 +57,24 @@
@@ -49,6 +57,11 @@
public void func_78443_a(EntityLivingBase p_78443_1_, ItemStack p_78443_2_, int p_78443_3_)
{
@ -34,21 +34,22 @@
GL11.glPushMatrix();
TextureManager texturemanager = this.field_78455_a.func_110434_K();
Item item = p_78443_2_.func_77973_b();
Block block = Block.func_149634_a(item);
- if (p_78443_2_.func_94608_d() == 0 && item instanceof ItemBlock && RenderBlocks.func_147739_a(block.func_149645_b()))
@@ -60,7 +73,13 @@
GL11.glEnable(GL11.GL_CULL_FACE);
OpenGlHelper.func_148821_a(770, 771, 1, 0);
}
-
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(p_78443_2_, type);
+ if (customRenderer != null)
{
+ {
+ texturemanager.func_110577_a(texturemanager.func_130087_a(p_78443_2_.func_94608_d()));
+ ForgeHooksClient.renderEquippedItem(type, customRenderer, field_147720_h, p_78443_1_, p_78443_2_);
+ }
+ else if (p_78443_2_.func_94608_d() == 0 && item instanceof ItemBlock && RenderBlocks.func_147739_a(block.func_149645_b()))
+ {
+ else
if (p_78443_2_.func_94608_d() == 0 && item instanceof ItemBlock && RenderBlocks.func_147739_a(block.func_149645_b()))
{
texturemanager.func_110577_a(texturemanager.func_130087_a(0));
if (p_78443_2_ != null && p_78443_2_.func_77973_b() instanceof ItemCloth)
@@ -100,7 +119,7 @@
@@ -104,7 +123,7 @@
GL11.glTranslatef(-0.9375F, -0.0625F, 0.0F);
func_78439_a(tessellator, f1, f2, f, f3, iicon.func_94211_a(), iicon.func_94216_b(), 0.0625F);
@ -57,7 +58,7 @@
{
GL11.glDepthFunc(GL11.GL_EQUAL);
GL11.glDisable(GL11.GL_LIGHTING);
@@ -273,7 +292,7 @@
@@ -282,7 +301,7 @@
Render render;
RenderPlayer renderplayer;
@ -66,7 +67,7 @@
{
GL11.glPushMatrix();
f13 = 0.8F;
@@ -340,12 +359,21 @@
@@ -349,12 +368,21 @@
tessellator.func_78374_a((double)(128 + b0), (double)(0 - b0), 0.0D, 1.0D, 0.0D);
tessellator.func_78374_a((double)(0 - b0), (double)(0 - b0), 0.0D, 0.0D, 0.0D);
tessellator.func_78381_a();
@ -91,7 +92,7 @@
GL11.glPopMatrix();
}
@@ -446,17 +474,20 @@
@@ -455,17 +483,20 @@
if (itemstack.func_77973_b().func_77623_v())
{

View File

@ -1,7 +1,7 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/OpenGlHelper.java
@@ -24,6 +24,10 @@
public static boolean field_148824_g;
@@ -54,6 +54,10 @@
private static String field_153196_B = "";
private static final String __OBFID = "CL_00001179";
+ /* Stores the last values sent into setLightmapTextureCoords */
@ -10,8 +10,8 @@
+
public static void func_77474_a()
{
field_77477_c = GLContext.getCapabilities().GL_ARB_multitexture && !GLContext.getCapabilities().OpenGL13;
@@ -82,6 +86,12 @@
ContextCapabilities contextcapabilities = GLContext.getCapabilities();
@@ -688,6 +692,12 @@
{
GL13.glMultiTexCoord2f(p_77475_0_, p_77475_1_, p_77475_2_);
}

View File

@ -9,7 +9,7 @@
@SideOnly(Side.CLIENT)
public class RenderBlocks
{
@@ -336,9 +338,9 @@
@@ -339,9 +341,9 @@
public boolean func_147773_v(Block p_147773_1_, int p_147773_2_, int p_147773_3_, int p_147773_4_)
{
Tessellator tessellator = Tessellator.field_78398_a;
@ -22,7 +22,7 @@
float f = 0.5F;
float f1 = 1.0F;
float f2 = 0.8F;
@@ -347,6 +349,7 @@
@@ -350,6 +352,7 @@
tessellator.func_78380_c(j1);
tessellator.func_78386_a(f, f, f);
IIcon iicon = this.func_147793_a(p_147773_1_, this.field_147845_a, p_147773_2_, p_147773_3_, p_147773_4_, 0);
@ -30,7 +30,7 @@
double d0 = (double)iicon.func_94209_e();
double d1 = (double)iicon.func_94212_f();
double d2 = (double)iicon.func_94206_g();
@@ -363,6 +366,7 @@
@@ -366,6 +369,7 @@
tessellator.func_78380_c(p_147773_1_.func_149677_c(this.field_147845_a, p_147773_2_, p_147773_3_ + 1, p_147773_4_));
tessellator.func_78386_a(f1, f1, f1);
iicon = this.func_147793_a(p_147773_1_, this.field_147845_a, p_147773_2_, p_147773_3_, p_147773_4_, 1);
@ -38,7 +38,7 @@
d0 = (double)iicon.func_94209_e();
d1 = (double)iicon.func_94212_f();
d2 = (double)iicon.func_94206_g();
@@ -2037,7 +2041,7 @@
@@ -2040,7 +2044,7 @@
double d10;
double d11;
@ -47,7 +47,7 @@
{
float f2 = 0.2F;
float f1 = 0.0625F;
@@ -2057,7 +2061,7 @@
@@ -2060,7 +2064,7 @@
d0 = d5;
}
@ -56,7 +56,7 @@
{
tessellator.func_78374_a((double)((float)p_147801_2_ + f2), (double)((float)p_147801_3_ + f + f1), (double)(p_147801_4_ + 1), d2, d1);
tessellator.func_78374_a((double)(p_147801_2_ + 0), (double)((float)(p_147801_3_ + 0) + f1), (double)(p_147801_4_ + 1), d2, d3);
@@ -2069,7 +2073,7 @@
@@ -2072,7 +2076,7 @@
tessellator.func_78374_a((double)((float)p_147801_2_ + f2), (double)((float)p_147801_3_ + f + f1), (double)(p_147801_4_ + 1), d2, d1);
}
@ -65,7 +65,7 @@
{
tessellator.func_78374_a((double)((float)(p_147801_2_ + 1) - f2), (double)((float)p_147801_3_ + f + f1), (double)(p_147801_4_ + 0), d0, d1);
tessellator.func_78374_a((double)(p_147801_2_ + 1 - 0), (double)((float)(p_147801_3_ + 0) + f1), (double)(p_147801_4_ + 0), d0, d3);
@@ -2081,7 +2085,7 @@
@@ -2084,7 +2088,7 @@
tessellator.func_78374_a((double)((float)(p_147801_2_ + 1) - f2), (double)((float)p_147801_3_ + f + f1), (double)(p_147801_4_ + 0), d0, d1);
}
@ -74,7 +74,7 @@
{
tessellator.func_78374_a((double)(p_147801_2_ + 0), (double)((float)p_147801_3_ + f + f1), (double)((float)p_147801_4_ + f2), d2, d1);
tessellator.func_78374_a((double)(p_147801_2_ + 0), (double)((float)(p_147801_3_ + 0) + f1), (double)(p_147801_4_ + 0), d2, d3);
@@ -2093,7 +2097,7 @@
@@ -2096,7 +2100,7 @@
tessellator.func_78374_a((double)(p_147801_2_ + 0), (double)((float)p_147801_3_ + f + f1), (double)((float)p_147801_4_ + f2), d2, d1);
}
@ -83,7 +83,7 @@
{
tessellator.func_78374_a((double)(p_147801_2_ + 1), (double)((float)p_147801_3_ + f + f1), (double)((float)(p_147801_4_ + 1) - f2), d0, d1);
tessellator.func_78374_a((double)(p_147801_2_ + 1), (double)((float)(p_147801_3_ + 0) + f1), (double)(p_147801_4_ + 1 - 0), d0, d3);
@@ -2105,7 +2109,7 @@
@@ -2108,7 +2112,7 @@
tessellator.func_78374_a((double)(p_147801_2_ + 1), (double)((float)p_147801_3_ + f + f1), (double)((float)(p_147801_4_ + 1) - f2), d0, d1);
}
@ -92,7 +92,7 @@
{
d5 = (double)p_147801_2_ + 0.5D + 0.5D;
d6 = (double)p_147801_2_ + 0.5D - 0.5D;
@@ -3118,10 +3122,10 @@
@@ -3121,10 +3125,10 @@
double d16 = (double)p_147767_2_ + 0.5D + 0.0625D;
double d17 = (double)p_147767_4_ + 0.5D - 0.0625D;
double d18 = (double)p_147767_4_ + 0.5D + 0.0625D;
@ -107,7 +107,7 @@
boolean flag4 = p_147767_1_.func_149646_a(this.field_147845_a, p_147767_2_, p_147767_3_ + 1, p_147767_4_, 1);
boolean flag5 = p_147767_1_.func_149646_a(this.field_147845_a, p_147767_2_, p_147767_3_ - 1, p_147767_4_, 0);
double d19 = 0.01D;
@@ -8218,4 +8222,18 @@
@@ -8247,4 +8251,18 @@
return (IIcon)p_147758_1_;
}

View File

@ -10,7 +10,7 @@
@SideOnly(Side.CLIENT)
public class RenderGlobal implements IWorldAccess
{
@@ -375,8 +378,10 @@
@@ -376,8 +379,10 @@
public void func_147589_a(EntityLivingBase p_147589_1_, ICamera p_147589_2_, float p_147589_3_)
{
@ -21,7 +21,7 @@
--this.field_72740_G;
}
else
@@ -387,9 +392,12 @@
@@ -388,9 +393,12 @@
this.field_72769_h.field_72984_F.func_76320_a("prepare");
TileEntityRendererDispatcher.field_147556_a.func_147542_a(this.field_72769_h, this.field_72777_q.func_110434_K(), this.field_72777_q.field_71466_p, this.field_72777_q.field_71451_h, p_147589_3_);
RenderManager.field_78727_a.func_147938_a(this.field_72769_h, this.field_72777_q.func_110434_K(), this.field_72777_q.field_71466_p, this.field_72777_q.field_71451_h, this.field_72777_q.field_147125_j, this.field_72777_q.field_71474_y, p_147589_3_);
@ -34,7 +34,7 @@
EntityLivingBase entitylivingbase1 = this.field_72777_q.field_71451_h;
double d3 = entitylivingbase1.field_70142_S + (entitylivingbase1.field_70165_t - entitylivingbase1.field_70142_S) * (double)p_147589_3_;
double d4 = entitylivingbase1.field_70137_T + (entitylivingbase1.field_70163_u - entitylivingbase1.field_70137_T) * (double)p_147589_3_;
@@ -418,13 +426,17 @@
@@ -419,13 +427,17 @@
this.field_72777_q.field_71460_t.func_78463_b((double)p_147589_3_);
this.field_72769_h.field_72984_F.func_76318_c("global");
List list = this.field_72769_h.func_72910_y();
@ -52,7 +52,7 @@
++this.field_72749_I;
if (entity.func_145770_h(d0, d1, d2))
@@ -438,6 +450,7 @@
@@ -439,6 +451,7 @@
for (i = 0; i < list.size(); ++i)
{
entity = (Entity)list.get(i);
@ -60,7 +60,7 @@
boolean flag = entity.func_145770_h(d0, d1, d2) && (entity.field_70158_ak || p_147589_2_.func_78546_a(entity.field_70121_D) || entity.field_70153_n == this.field_72777_q.field_71439_g);
if (!flag && entity instanceof EntityLiving)
@@ -463,7 +476,11 @@
@@ -464,7 +477,11 @@
for (i = 0; i < this.field_147598_a.size(); ++i)
{
@ -73,7 +73,7 @@
}
this.field_72777_q.field_71460_t.func_78483_a((double)p_147589_3_);
@@ -933,6 +950,12 @@
@@ -941,6 +958,12 @@
public void func_72714_a(float p_72714_1_)
{
@ -86,7 +86,7 @@
if (this.field_72777_q.field_71441_e.field_73011_w.field_76574_g == 1)
{
GL11.glDisable(GL11.GL_FOG);
@@ -1171,6 +1194,12 @@
@@ -1179,6 +1202,12 @@
public void func_72718_b(float p_72718_1_)
{
@ -99,7 +99,7 @@
if (this.field_72777_q.field_71441_e.field_73011_w.func_76569_d())
{
if (this.field_72777_q.field_71474_y.field_74347_j)
@@ -1571,6 +1600,11 @@
@@ -1579,6 +1608,11 @@
public void func_72717_a(Tessellator p_72717_1_, EntityPlayer p_72717_2_, float p_72717_3_)
{
@ -111,7 +111,7 @@
double d0 = p_72717_2_.field_70142_S + (p_72717_2_.field_70165_t - p_72717_2_.field_70142_S) * (double)p_72717_3_;
double d1 = p_72717_2_.field_70137_T + (p_72717_2_.field_70163_u - p_72717_2_.field_70137_T) * (double)p_72717_3_;
double d2 = p_72717_2_.field_70136_U + (p_72717_2_.field_70161_v - p_72717_2_.field_70136_U) * (double)p_72717_3_;
@@ -1789,12 +1823,15 @@
@@ -1798,12 +1832,15 @@
{
ItemRecord itemrecord = ItemRecord.func_150926_b(p_72702_1_);

View File

@ -110,7 +110,7 @@
System.arraycopy(p_147565_1_.func_147572_a(), 0, this.field_78405_h, 0, p_147565_1_.func_147572_a().length);
this.field_147569_p = p_147565_1_.func_147576_b();
this.field_78406_i = p_147565_1_.func_147575_c();
@@ -296,6 +324,19 @@
@@ -301,6 +329,19 @@
public void func_78377_a(double p_78377_1_, double p_78377_3_, double p_78377_5_)
{
@ -130,7 +130,7 @@
++this.field_78411_s;
if (this.field_78400_o)
@@ -324,12 +365,6 @@
@@ -329,12 +370,6 @@
this.field_78405_h[this.field_147569_p + 2] = Float.floatToRawIntBits((float)(p_78377_5_ + this.field_78417_x));
this.field_147569_p += 8;
++this.field_78406_i;

View File

@ -1,22 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java
@@ -15,9 +15,15 @@
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.util.ResourceLocation;
import org.lwjgl.opengl.GL11;
+import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED;
+import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D;
+import net.minecraftforge.client.ForgeHooksClient;
+import net.minecraftforge.client.IItemRenderer;
+import net.minecraftforge.client.MinecraftForgeClient;
@SideOnly(Side.CLIENT)
public class RenderBiped extends RenderLiving
@@ -49,11 +55,13 @@
@@ -54,11 +54,13 @@
this.field_82425_h = new ModelBiped(0.5F);
}
@ -30,20 +14,20 @@
public static ResourceLocation func_110858_a(ItemArmor p_110858_0_, int p_110858_1_, String p_110858_2_)
{
String s1 = String.format("textures/models/armor/%s_layer_%d%s.png", new Object[] {field_82424_k[p_110858_0_.field_77880_c], Integer.valueOf(p_110858_1_ == 2 ? 2 : 1), p_110858_2_ == null ? "" : String.format("_%s", new Object[]{p_110858_2_})});
@@ -79,7 +87,7 @@
@@ -84,7 +86,7 @@
if (item instanceof ItemArmor)
{
ItemArmor itemarmor = (ItemArmor)item;
- this.func_110776_a(func_110857_a(itemarmor, p_130006_2_));
+ this.func_110776_a(getArmorResource(p_130006_1_, itemstack, p_130006_2_, null));
ModelBiped modelbiped = p_130006_2_ == 2 ? this.field_82425_h : this.field_82423_g;
modelbiped.field_78116_c.field_78806_j = p_130006_2_ == 0;
modelbiped.field_78114_d.field_78806_j = p_130006_2_ == 0;
@@ -88,14 +96,16 @@
modelbiped.field_78113_g.field_78806_j = p_130006_2_ == 1;
modelbiped.field_78123_h.field_78806_j = p_130006_2_ == 2 || p_130006_2_ == 3;
modelbiped.field_78124_i.field_78806_j = p_130006_2_ == 2 || p_130006_2_ == 3;
+ modelbiped = ForgeHooksClient.getArmorModel(p_130006_1_, itemstack, p_130006_2_, modelbiped);
- this.func_110776_a(func_110857_a(itemarmor, p_77032_2_));
+ this.func_110776_a(getArmorResource(p_77032_1_, itemstack, p_77032_2_, null));
ModelBiped modelbiped = p_77032_2_ == 2 ? this.field_82425_h : this.field_82423_g;
modelbiped.field_78116_c.field_78806_j = p_77032_2_ == 0;
modelbiped.field_78114_d.field_78806_j = p_77032_2_ == 0;
@@ -93,14 +95,16 @@
modelbiped.field_78113_g.field_78806_j = p_77032_2_ == 1;
modelbiped.field_78123_h.field_78806_j = p_77032_2_ == 2 || p_77032_2_ == 3;
modelbiped.field_78124_i.field_78806_j = p_77032_2_ == 2 || p_77032_2_ == 3;
+ modelbiped = net.minecraftforge.client.ForgeHooksClient.getArmorModel(p_77032_1_, itemstack, p_77032_2_, modelbiped);
this.func_77042_a(modelbiped);
modelbiped.field_78095_p = this.field_77045_g.field_78095_p;
modelbiped.field_78093_q = this.field_77045_g.field_78093_q;
@ -58,7 +42,7 @@
float f1 = (float)(j >> 16 & 255) / 255.0F;
float f2 = (float)(j >> 8 & 255) / 255.0F;
float f3 = (float)(j & 255) / 255.0F;
@@ -133,7 +143,7 @@
@@ -138,7 +142,7 @@
if (item instanceof ItemArmor)
{
@ -67,12 +51,12 @@
float f1 = 1.0F;
GL11.glColor3f(1.0F, 1.0F, 1.0F);
}
@@ -184,9 +194,12 @@
@@ -189,9 +193,12 @@
this.field_77071_a.field_78116_c.func_78794_c(0.0625F);
item = itemstack1.func_77973_b();
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D));
+ net.minecraftforge.client.IItemRenderer customRenderer = net.minecraftforge.client.MinecraftForgeClient.getItemRenderer(itemstack1, net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED, itemstack1, net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D));
+
if (item instanceof ItemBlock)
{
@ -81,19 +65,19 @@
{
f1 = 0.625F;
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
@@ -229,7 +242,10 @@
@@ -243,7 +250,10 @@
this.field_77071_a.field_78112_f.func_78794_c(0.0625F);
GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
- if (item instanceof ItemBlock && RenderBlocks.func_147739_a(Block.func_149634_a(item).func_149645_b()))
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D));
+ net.minecraftforge.client.IItemRenderer customRenderer = net.minecraftforge.client.MinecraftForgeClient.getItemRenderer(itemstack, net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED, itemstack, net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D));
+
+ if (item instanceof ItemBlock && (is3D || RenderBlocks.func_147739_a(Block.func_149634_a(item).func_149645_b())))
{
f1 = 0.5F;
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
@@ -278,7 +294,7 @@
@@ -292,7 +302,7 @@
if (itemstack.func_77973_b().func_77623_v())
{
@ -101,8 +85,8 @@
+ for (i = 0; i < itemstack.func_77973_b().getRenderPasses(itemstack.func_77960_j()); ++i)
{
int j = itemstack.func_77973_b().func_82790_a(itemstack, i);
f2 = (float)(j >> 16 & 255) / 255.0F;
@@ -336,4 +352,33 @@
f5 = (float)(j >> 16 & 255) / 255.0F;
@@ -350,4 +360,33 @@
{
this.func_76986_a((EntityLiving)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}
@ -123,7 +107,7 @@
+ String s1 = String.format("textures/models/armor/%s_layer_%d%s.png",
+ field_82424_k[item.field_77880_c], (slot == 2 ? 2 : 1), type == null ? "" : String.format("_%s", type));
+
+ s1 = ForgeHooksClient.getArmorTexture(entity, stack, s1, slot, type);
+ s1 = net.minecraftforge.client.ForgeHooksClient.getArmorTexture(entity, stack, s1, slot, type);
+ ResourceLocation resourcelocation = (ResourceLocation)field_110859_k.get(s1);
+
+ if (resourcelocation == null)

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
@@ -17,6 +17,7 @@
@@ -18,6 +18,7 @@
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityItem;
@ -8,7 +8,7 @@
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemCloth;
import net.minecraft.item.ItemStack;
@@ -27,6 +28,8 @@
@@ -28,6 +29,8 @@
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
@ -17,28 +17,28 @@
@SideOnly(Side.CLIENT)
public class RenderItem extends Render
{
@@ -53,7 +56,7 @@
this.func_110777_b(p_77014_1_);
@@ -55,7 +58,7 @@
TextureUtil.func_152777_a(false, false, 1.0F);
this.field_77025_h.setSeed(187L);
GL11.glPushMatrix();
- float f2 = MathHelper.func_76126_a(((float)p_77014_1_.field_70292_b + p_77014_9_) / 10.0F + p_77014_1_.field_70290_d) * 0.1F + 0.1F;
+ float f2 = shouldBob() ? MathHelper.func_76126_a(((float)p_77014_1_.field_70292_b + p_77014_9_) / 10.0F + p_77014_1_.field_70290_d) * 0.1F + 0.1F : 0F;
float f3 = (((float)p_77014_1_.field_70292_b + p_77014_9_) / 20.0F + p_77014_1_.field_70290_d) * (180F / (float)Math.PI);
- float f2 = MathHelper.func_76126_a(((float)p_76986_1_.field_70292_b + p_76986_9_) / 10.0F + p_76986_1_.field_70290_d) * 0.1F + 0.1F;
+ float f2 = shouldBob() ? MathHelper.func_76126_a(((float)p_76986_1_.field_70292_b + p_76986_9_) / 10.0F + p_76986_1_.field_70290_d) * 0.1F + 0.1F : 0F;
float f3 = (((float)p_76986_1_.field_70292_b + p_76986_9_) / 20.0F + p_76986_1_.field_70290_d) * (180F / (float)Math.PI);
byte b0 = 1;
@@ -77,12 +80,19 @@
@@ -79,12 +82,19 @@
b0 = 5;
}
+ b0 = getMiniBlockCount(itemstack, b0);
+
GL11.glTranslatef((float)p_77014_2_, (float)p_77014_4_ + f2, (float)p_77014_6_);
GL11.glTranslatef((float)p_76986_2_, (float)p_76986_4_ + f2, (float)p_76986_6_);
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
float f6;
float f7;
int k;
+ if (ForgeHooksClient.renderEntityItem(p_77014_1_, itemstack, f2, f3, field_77025_h, field_76990_c.field_78724_e, field_147909_c, b0))
+ if (ForgeHooksClient.renderEntityItem(p_76986_1_, itemstack, f2, f3, field_77025_h, field_76990_c.field_78724_e, field_147909_c, b0))
+ {
+ ;
+ }
@ -46,7 +46,7 @@
if (itemstack.func_94608_d() == 0 && itemstack.func_77973_b() instanceof ItemBlock && RenderBlocks.func_147739_a(Block.func_149634_a(itemstack.func_77973_b()).func_149645_b()))
{
Block block = Block.func_149634_a(itemstack.func_77973_b());
@@ -137,7 +147,7 @@
@@ -139,7 +149,7 @@
{
float f5;
@ -55,7 +55,7 @@
{
if (field_82407_g)
{
@@ -149,10 +159,10 @@
@@ -151,10 +161,10 @@
GL11.glScalef(0.5F, 0.5F, 0.5F);
}
@ -68,21 +68,21 @@
if (this.field_77024_a)
{
@@ -161,11 +171,11 @@
@@ -163,11 +173,11 @@
f6 = (float)(k >> 8 & 255) / 255.0F;
f7 = (float)(k & 255) / 255.0F;
GL11.glColor4f(f5, f6, f7, 1.0F);
- this.func_77020_a(p_77014_1_, iicon1, b0, p_77014_9_, f5, f6, f7);
+ this.renderDroppedItem(p_77014_1_, iicon1, b0, p_77014_9_, f5, f6, f7, j);
- this.func_77020_a(p_76986_1_, iicon1, b0, p_76986_9_, f5, f6, f7);
+ this.renderDroppedItem(p_76986_1_, iicon1, b0, p_76986_9_, f5, f6, f7, j);
}
else
{
- this.func_77020_a(p_77014_1_, iicon1, b0, p_77014_9_, 1.0F, 1.0F, 1.0F);
+ this.renderDroppedItem(p_77014_1_, iicon1, b0, p_77014_9_, 1.0F, 1.0F, 1.0F, j);
- this.func_77020_a(p_76986_1_, iicon1, b0, p_76986_9_, 1.0F, 1.0F, 1.0F);
+ this.renderDroppedItem(p_76986_1_, iicon1, b0, p_76986_9_, 1.0F, 1.0F, 1.0F, j);
}
}
}
@@ -222,6 +232,11 @@
@@ -226,6 +236,11 @@
private void func_77020_a(EntityItem p_77020_1_, IIcon p_77020_2_, int p_77020_3_, float p_77020_4_, float p_77020_5_, float p_77020_6_, float p_77020_7_)
{
@ -94,7 +94,7 @@
Tessellator tessellator = Tessellator.field_78398_a;
if (p_77020_2_ == null)
@@ -276,11 +291,24 @@
@@ -280,11 +295,24 @@
b0 = 4;
}
@ -120,7 +120,7 @@
if (itemstack.func_94608_d() == 0)
{
@@ -294,7 +322,7 @@
@@ -298,7 +326,7 @@
GL11.glColor4f(p_77020_5_, p_77020_6_, p_77020_7_, 1.0F);
ItemRenderer.func_78439_a(tessellator, f15, f4, f14, f5, ((IIcon)p_77020_2_).func_94211_a(), ((IIcon)p_77020_2_).func_94216_b(), f9);
@ -129,7 +129,7 @@
{
GL11.glDepthFunc(GL11.GL_EQUAL);
GL11.glDisable(GL11.GL_LIGHTING);
@@ -362,6 +390,11 @@
@@ -366,6 +394,11 @@
public void func_77015_a(FontRenderer p_77015_1_, TextureManager p_77015_2_, ItemStack p_77015_3_, int p_77015_4_, int p_77015_5_)
{
@ -140,8 +140,8 @@
+ {
int k = p_77015_3_.func_77960_j();
Object object = p_77015_3_.func_77954_c();
GL11.glEnable(GL11.GL_BLEND);
@@ -420,11 +453,13 @@
int l;
@@ -442,11 +475,13 @@
GL11.glColorMask(true, true, true, true);
GL11.glEnable(GL11.GL_TEXTURE_2D);
GL11.glEnable(GL11.GL_ALPHA_TEST);
@ -158,7 +158,7 @@
int i1 = p_77015_3_.func_77973_b().func_82790_a(p_77015_3_, l);
f = (float)(i1 >> 16 & 255) / 255.0F;
float f1 = (float)(i1 >> 8 & 255) / 255.0F;
@@ -435,7 +470,18 @@
@@ -457,7 +492,18 @@
GL11.glColor4f(f, f1, f2, 1.0F);
}
@ -176,18 +176,20 @@
+ }
}
GL11.glDisable(GL11.GL_ALPHA_TEST);
@@ -462,13 +508,25 @@
GL11.glEnable(GL11.GL_LIGHTING);
@@ -485,14 +531,27 @@
GL11.glColor4f(f3, f4, f, 1.0F);
}
+ GL11.glDisable(GL11.GL_LIGHTING); //Forge: Make sure that render states are reset, ad renderEffect can derp them up.
+ GL11.glDisable(GL11.GL_LIGHTING); //Forge: Make sure that render states are reset, a renderEffect can derp them up.
+ GL11.glEnable(GL11.GL_ALPHA_TEST);
+ GL11.glEnable(GL11.GL_BLEND);
+
this.func_94149_a(p_77015_4_, p_77015_5_, (IIcon)object, 16, 16);
+
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glEnable(GL11.GL_LIGHTING);
+ GL11.glDisable(GL11.GL_ALPHA_TEST);
GL11.glDisable(GL11.GL_BLEND);
+
+ if (renderEffect && p_77015_3_.hasEffect(0))
+ {
@ -203,7 +205,7 @@
public void func_82406_b(FontRenderer p_82406_1_, TextureManager p_82406_2_, final ItemStack p_82406_3_, int p_82406_4_, int p_82406_5_)
{
if (p_82406_3_ != null)
@@ -477,7 +535,10 @@
@@ -501,7 +560,10 @@
try
{
@ -215,7 +217,7 @@
}
catch (Throwable throwable)
{
@@ -518,7 +579,8 @@
@@ -542,7 +604,8 @@
throw new ReportedException(crashreport);
}
@ -225,7 +227,7 @@
{
GL11.glDepthFunc(GL11.GL_EQUAL);
GL11.glDisable(GL11.GL_LIGHTING);
@@ -538,6 +600,23 @@
@@ -562,6 +625,23 @@
}
}
@ -249,7 +251,7 @@
private void func_77018_a(int p_77018_1_, int p_77018_2_, int p_77018_3_, int p_77018_4_, int p_77018_5_)
{
for (int j1 = 0; j1 < 2; ++j1)
@@ -584,10 +663,11 @@
@@ -608,10 +688,11 @@
GL11.glEnable(GL11.GL_DEPTH_TEST);
}
@ -264,7 +266,7 @@
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_DEPTH_TEST);
GL11.glDisable(GL11.GL_TEXTURE_2D);
@@ -638,4 +718,54 @@
@@ -664,4 +745,54 @@
{
this.func_76986_a((EntityItem)p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_, p_76986_8_, p_76986_9_);
}

View File

@ -1,34 +1,11 @@
--- ../src-base/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
+++ ../src-work/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
@@ -16,13 +16,22 @@
import net.minecraft.item.Item;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemBlock;
+import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.scoreboard.Score;
import net.minecraft.scoreboard.ScoreObjective;
import net.minecraft.scoreboard.Scoreboard;
import net.minecraft.util.MathHelper;
import net.minecraft.util.ResourceLocation;
+import net.minecraftforge.client.ForgeHooksClient;
+import net.minecraftforge.client.IItemRenderer;
+import net.minecraftforge.client.MinecraftForgeClient;
+import net.minecraftforge.client.event.RenderPlayerEvent;
+import net.minecraftforge.common.MinecraftForge;
+
import org.lwjgl.opengl.GL11;
+import static net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED;
+import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D;
@SideOnly(Side.CLIENT)
public class RenderPlayer extends RendererLivingEntity
@@ -45,6 +54,13 @@
@@ -50,6 +50,13 @@
{
ItemStack itemstack = p_77107_1_.field_71071_by.func_70440_f(3 - p_77107_2_);
ItemStack itemstack = p_77032_1_.field_71071_by.func_70440_f(3 - p_77032_2_);
+ RenderPlayerEvent.SetArmorModel event = new RenderPlayerEvent.SetArmorModel(p_77107_1_, this, 3 - p_77107_2_, p_77107_3_, itemstack);
+ MinecraftForge.EVENT_BUS.post(event);
+ net.minecraftforge.client.event.RenderPlayerEvent.SetArmorModel event = new net.minecraftforge.client.event.RenderPlayerEvent.SetArmorModel(p_77032_1_, this, 3 - p_77032_2_, p_77032_3_, itemstack);
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
+ if (event.result != -1)
+ {
+ return event.result;
@ -37,20 +14,20 @@
if (itemstack != null)
{
Item item = itemstack.func_77973_b();
@@ -52,7 +68,7 @@
@@ -57,7 +64,7 @@
if (item instanceof ItemArmor)
{
ItemArmor itemarmor = (ItemArmor)item;
- this.func_110776_a(RenderBiped.func_110857_a(itemarmor, p_77107_2_));
+ this.func_110776_a(RenderBiped.getArmorResource(p_77107_1_, itemstack, p_77107_2_, null));
ModelBiped modelbiped = p_77107_2_ == 2 ? this.field_77111_i : this.field_77108_b;
modelbiped.field_78116_c.field_78806_j = p_77107_2_ == 0;
modelbiped.field_78114_d.field_78806_j = p_77107_2_ == 0;
@@ -61,14 +77,16 @@
modelbiped.field_78113_g.field_78806_j = p_77107_2_ == 1;
modelbiped.field_78123_h.field_78806_j = p_77107_2_ == 2 || p_77107_2_ == 3;
modelbiped.field_78124_i.field_78806_j = p_77107_2_ == 2 || p_77107_2_ == 3;
+ modelbiped = ForgeHooksClient.getArmorModel(p_77107_1_, itemstack, p_77107_2_, modelbiped);
- this.func_110776_a(RenderBiped.func_110857_a(itemarmor, p_77032_2_));
+ this.func_110776_a(RenderBiped.getArmorResource(p_77032_1_, itemstack, p_77032_2_, null));
ModelBiped modelbiped = p_77032_2_ == 2 ? this.field_77111_i : this.field_77108_b;
modelbiped.field_78116_c.field_78806_j = p_77032_2_ == 0;
modelbiped.field_78114_d.field_78806_j = p_77032_2_ == 0;
@@ -66,14 +73,16 @@
modelbiped.field_78113_g.field_78806_j = p_77032_2_ == 1;
modelbiped.field_78123_h.field_78806_j = p_77032_2_ == 2 || p_77032_2_ == 3;
modelbiped.field_78124_i.field_78806_j = p_77032_2_ == 2 || p_77032_2_ == 3;
+ modelbiped = net.minecraftforge.client.ForgeHooksClient.getArmorModel(p_77032_1_, itemstack, p_77032_2_, modelbiped);
this.func_77042_a(modelbiped);
modelbiped.field_78095_p = this.field_77045_g.field_78095_p;
modelbiped.field_78093_q = this.field_77045_g.field_78093_q;
@ -65,93 +42,89 @@
float f1 = (float)(j >> 16 & 255) / 255.0F;
float f2 = (float)(j >> 8 & 255) / 255.0F;
float f3 = (float)(j & 255) / 255.0F;
@@ -106,7 +124,7 @@
@@ -111,7 +120,7 @@
if (item instanceof ItemArmor)
{
- this.func_110776_a(RenderBiped.func_110858_a((ItemArmor)item, p_130220_2_, "overlay"));
+ this.func_110776_a(RenderBiped.getArmorResource(p_130220_1_, itemstack, p_130220_2_, "overlay"));
- this.func_110776_a(RenderBiped.func_110858_a((ItemArmor)item, p_82408_2_, "overlay"));
+ this.func_110776_a(RenderBiped.getArmorResource(p_82408_1_, itemstack, p_82408_2_, "overlay"));
GL11.glColor3f(1.0F, 1.0F, 1.0F);
}
}
@@ -114,6 +132,7 @@
@@ -119,6 +128,7 @@
public void func_76986_a(AbstractClientPlayer p_130009_1_, double p_130009_2_, double p_130009_4_, double p_130009_6_, float p_130009_8_, float p_130009_9_)
public void func_76986_a(AbstractClientPlayer p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
+ if (MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Pre(p_130009_1_, this, p_130009_9_))) return;
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Pre(p_76986_1_, this, p_76986_9_))) return;
GL11.glColor3f(1.0F, 1.0F, 1.0F);
ItemStack itemstack = p_130009_1_.field_71071_by.func_70448_g();
ItemStack itemstack = p_76986_1_.field_71071_by.func_70448_g();
this.field_77108_b.field_78120_m = this.field_77111_i.field_78120_m = this.field_77109_a.field_78120_m = itemstack != null ? 1 : 0;
@@ -144,6 +163,7 @@
@@ -149,6 +159,7 @@
this.field_77108_b.field_78118_o = this.field_77111_i.field_78118_o = this.field_77109_a.field_78118_o = false;
this.field_77108_b.field_78117_n = this.field_77111_i.field_78117_n = this.field_77109_a.field_78117_n = false;
this.field_77108_b.field_78120_m = this.field_77111_i.field_78120_m = this.field_77109_a.field_78120_m = 0;
+ MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Post(p_130009_1_, this, p_130009_9_));
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Post(p_76986_1_, this, p_76986_9_));
}
protected ResourceLocation func_110775_a(AbstractClientPlayer p_110817_1_)
@@ -153,12 +173,18 @@
protected ResourceLocation func_110775_a(AbstractClientPlayer p_110775_1_)
@@ -158,12 +169,14 @@
protected void func_77029_c(AbstractClientPlayer p_77100_1_, float p_77100_2_)
protected void func_77029_c(AbstractClientPlayer p_77029_1_, float p_77029_2_)
{
+ RenderPlayerEvent.Specials.Pre event = new RenderPlayerEvent.Specials.Pre(p_77100_1_, this, p_77100_2_);
+ if (MinecraftForge.EVENT_BUS.post(event))
+ {
+ return;
+ }
+
+ net.minecraftforge.client.event.RenderPlayerEvent.Specials.Pre event = new net.minecraftforge.client.event.RenderPlayerEvent.Specials.Pre(p_77029_1_, this, p_77029_2_);
+ if (net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event)) return;
GL11.glColor3f(1.0F, 1.0F, 1.0F);
super.func_77029_c(p_77100_1_, p_77100_2_);
super.func_85093_e(p_77100_1_, p_77100_2_);
ItemStack itemstack = p_77100_1_.field_71071_by.func_70440_f(3);
super.func_77029_c(p_77029_1_, p_77029_2_);
super.func_85093_e(p_77029_1_, p_77029_2_);
ItemStack itemstack = p_77029_1_.field_71071_by.func_70440_f(3);
- if (itemstack != null)
+ if (itemstack != null && event.renderHelmet)
{
GL11.glPushMatrix();
this.field_77109_a.field_78116_c.func_78794_c(0.0625F);
@@ -166,7 +192,10 @@
@@ -171,7 +184,10 @@
if (itemstack.func_77973_b() instanceof ItemBlock)
{
- if (RenderBlocks.func_147739_a(Block.func_149634_a(itemstack.func_77973_b()).func_149645_b()))
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack, EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack, BLOCK_3D));
+ net.minecraftforge.client.IItemRenderer customRenderer = net.minecraftforge.client.MinecraftForgeClient.getItemRenderer(itemstack, net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED, itemstack, net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D));
+
+ if (is3D || RenderBlocks.func_147739_a(Block.func_149634_a(itemstack.func_77973_b()).func_149645_b()))
{
f1 = 0.625F;
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
@@ -218,6 +247,7 @@
@@ -232,6 +248,7 @@
}
boolean flag = p_77100_1_.func_110310_o().func_110557_a();
boolean flag = p_77029_1_.func_152122_n();
+ flag = event.renderCape && flag;
float f5;
float f4;
if (flag && !p_77100_1_.func_82150_aj() && !p_77100_1_.func_82238_cc())
@@ -269,7 +299,7 @@
if (flag && !p_77029_1_.func_82150_aj() && !p_77029_1_.func_82238_cc())
@@ -283,7 +300,7 @@
ItemStack itemstack1 = p_77100_1_.field_71071_by.func_70448_g();
ItemStack itemstack1 = p_77029_1_.field_71071_by.func_70448_g();
- if (itemstack1 != null)
+ if (itemstack1 != null && event.renderItem)
{
GL11.glPushMatrix();
this.field_77109_a.field_78112_f.func_78794_c(0.0625F);
@@ -287,7 +317,10 @@
@@ -301,7 +318,10 @@
enumaction = itemstack1.func_77975_n();
}
- if (itemstack1.func_77973_b() instanceof ItemBlock && RenderBlocks.func_147739_a(Block.func_149634_a(itemstack1.func_77973_b()).func_149645_b()))
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(EQUIPPED, itemstack1, BLOCK_3D));
+ net.minecraftforge.client.IItemRenderer customRenderer = net.minecraftforge.client.MinecraftForgeClient.getItemRenderer(itemstack1, net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED);
+ boolean is3D = (customRenderer != null && customRenderer.shouldUseRenderHelper(net.minecraftforge.client.IItemRenderer.ItemRenderType.EQUIPPED, itemstack1, net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D));
+
+ if (is3D || itemstack1.func_77973_b() instanceof ItemBlock && RenderBlocks.func_147739_a(Block.func_149634_a(itemstack1.func_77973_b()).func_149645_b()))
{
f3 = 0.5F;
f2 = 0.5F;
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
@@ -344,7 +377,7 @@
@@ -358,7 +378,7 @@
if (itemstack1.func_77973_b().func_77623_v())
{
@ -160,11 +133,11 @@
{
int i = itemstack1.func_77973_b().func_82790_a(itemstack1, k);
f12 = (float)(i >> 16 & 255) / 255.0F;
@@ -366,6 +399,7 @@
@@ -380,6 +400,7 @@
GL11.glPopMatrix();
}
+ MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Specials.Post(p_77100_1_, this, p_77100_2_));
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.client.event.RenderPlayerEvent.Specials.Post(p_77029_1_, this, p_77029_2_));
}
protected void func_77041_b(AbstractClientPlayer p_77104_1_, float p_77104_2_)
protected void func_77041_b(AbstractClientPlayer p_77041_1_, float p_77041_2_)

View File

@ -22,17 +22,17 @@
this.field_77045_g = p_i1261_1_;
@@ -62,6 +68,7 @@
public void func_76986_a(EntityLivingBase p_130000_1_, double p_130000_2_, double p_130000_4_, double p_130000_6_, float p_130000_8_, float p_130000_9_)
public void func_76986_a(EntityLivingBase p_76986_1_, double p_76986_2_, double p_76986_4_, double p_76986_6_, float p_76986_8_, float p_76986_9_)
{
+ if (MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Pre(p_130000_1_, this, p_130000_2_, p_130000_4_, p_130000_6_))) return;
+ if (MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Pre(p_76986_1_, this, p_76986_2_, p_76986_4_, p_76986_6_))) return;
GL11.glPushMatrix();
GL11.glDisable(GL11.GL_CULL_FACE);
this.field_77045_g.field_78095_p = this.func_77040_d(p_130000_1_, p_130000_9_);
this.field_77045_g.field_78095_p = this.func_77040_d(p_76986_1_, p_76986_9_);
@@ -271,6 +278,7 @@
GL11.glEnable(GL11.GL_CULL_FACE);
GL11.glPopMatrix();
this.func_77033_b(p_130000_1_, p_130000_2_, p_130000_4_, p_130000_6_);
+ MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Post(p_130000_1_, this, p_130000_2_, p_130000_4_, p_130000_6_));
this.func_77033_b(p_76986_1_, p_76986_2_, p_76986_4_, p_76986_6_);
+ MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Post(p_76986_1_, this, p_76986_2_, p_76986_4_, p_76986_6_));
}
protected void func_77036_a(EntityLivingBase p_77036_1_, float p_77036_2_, float p_77036_3_, float p_77036_4_, float p_77036_5_, float p_77036_6_, float p_77036_7_)

View File

@ -13,12 +13,12 @@
{
+ try
+ {
((BlockChest)block).func_149954_e(p_147502_1_.func_145831_w(), p_147502_1_.field_145851_c, p_147502_1_.field_145848_d, p_147502_1_.field_145849_e);
((BlockChest)block).func_149954_e(p_147500_1_.func_145831_w(), p_147500_1_.field_145851_c, p_147500_1_.field_145848_d, p_147500_1_.field_145849_e);
+ }
+ catch (ClassCastException e)
+ {
+ FMLLog.severe("Attempted to render a chest at %d, %d, %d that was not a chest", p_147502_1_.field_145851_c, p_147502_1_.field_145848_d, p_147502_1_.field_145849_e);
+ FMLLog.severe("Attempted to render a chest at %d, %d, %d that was not a chest", p_147500_1_.field_145851_c, p_147500_1_.field_145848_d, p_147500_1_.field_145849_e);
+ }
i = p_147502_1_.func_145832_p();
i = p_147500_1_.func_145832_p();
}

View File

@ -1,29 +1,19 @@
--- ../src-base/minecraft/net/minecraft/client/shader/Framebuffer.java
+++ ../src-work/minecraft/net/minecraft/client/shader/Framebuffer.java
@@ -6,6 +6,9 @@
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraft.client.renderer.Tessellator;
import net.minecraft.client.renderer.texture.TextureUtil;
+import net.minecraftforge.client.MinecraftForgeClient;
+import static org.lwjgl.opengl.EXTPackedDepthStencil.*;
+import static org.lwjgl.opengl.EXTFramebufferObject.*;
import org.lwjgl.opengl.EXTFramebufferObject;
import org.lwjgl.opengl.GL11;
@@ -118,8 +121,17 @@
@@ -117,8 +117,17 @@
if (this.field_147619_e)
{
EXTFramebufferObject.glBindRenderbufferEXT(36161, this.field_147624_h);
+ if (MinecraftForgeClient.getStencilBits() == 0)
OpenGlHelper.func_153176_h(OpenGlHelper.field_153199_f, this.field_147624_h);
+ if (net.minecraftforge.client.MinecraftForgeClient.getStencilBits() == 0)
+ {
EXTFramebufferObject.glRenderbufferStorageEXT(36161, 33190, this.field_147622_a, this.field_147620_b);
EXTFramebufferObject.glFramebufferRenderbufferEXT(36160, 36096, 36161, this.field_147624_h);
OpenGlHelper.func_153186_a(OpenGlHelper.field_153199_f, 33190, this.field_147622_a, this.field_147620_b);
OpenGlHelper.func_153190_b(OpenGlHelper.field_153198_e, OpenGlHelper.field_153201_h, OpenGlHelper.field_153199_f, this.field_147624_h);
+ }
+ else
+ {
+ EXTFramebufferObject.glRenderbufferStorageEXT(36161, GL_DEPTH24_STENCIL8_EXT, this.field_147622_a, this.field_147620_b);
+ EXTFramebufferObject.glFramebufferRenderbufferEXT(36160, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, this.field_147624_h);
+ EXTFramebufferObject.glFramebufferRenderbufferEXT(36160, GL_STENCIL_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, this.field_147624_h);
+ OpenGlHelper.func_153186_a(OpenGlHelper.field_153199_f, org.lwjgl.opengl.EXTPackedDepthStencil.GL_DEPTH24_STENCIL8_EXT, this.field_147622_a, this.field_147620_b);
+ OpenGlHelper.func_153190_b(OpenGlHelper.field_153198_e, org.lwjgl.opengl.EXTFramebufferObject.GL_DEPTH_ATTACHMENT_EXT, OpenGlHelper.field_153199_f, this.field_147624_h);
+ OpenGlHelper.func_153190_b(OpenGlHelper.field_153198_e, org.lwjgl.opengl.EXTFramebufferObject.GL_DEPTH_ATTACHMENT_EXT, OpenGlHelper.field_153199_f, this.field_147624_h);
+ }
}

View File

@ -1,12 +0,0 @@
--- ../src-base/minecraft/net/minecraft/crash/CrashReport.java
+++ ../src-work/minecraft/net/minecraft/crash/CrashReport.java
@@ -315,7 +315,8 @@
StackTraceElement stacktraceelement = null;
StackTraceElement stacktraceelement1 = null;
- if (astacktraceelement != null && astacktraceelement.length - j < astacktraceelement.length)
+ int idx = astacktraceelement.length - j; //Forge fix AIOOB exception.
+ if (astacktraceelement != null && idx < astacktraceelement.length && idx >= 0)
{
stacktraceelement = astacktraceelement[astacktraceelement.length - j];

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/enchantment/Enchantment.java
+++ ../src-work/minecraft/net/minecraft/enchantment/Enchantment.java
@@ -123,6 +123,36 @@
@@ -124,6 +124,36 @@
public void func_151367_b(EntityLivingBase p_151367_1_, Entity p_151367_2_, int p_151367_3_) {}

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
+++ ../src-work/minecraft/net/minecraft/enchantment/EnchantmentHelper.java
@@ -429,7 +429,8 @@
@@ -435,7 +435,8 @@
{
Enchantment enchantment = aenchantment[k];

View File

@ -177,7 +177,7 @@
return entityitem;
}
else
@@ -1676,7 +1768,7 @@
@@ -1687,7 +1779,7 @@
public boolean func_70115_ae()
{
@ -186,7 +186,7 @@
}
public boolean func_70093_af()
@@ -1977,7 +2069,7 @@
@@ -1988,7 +2080,7 @@
public float func_145772_a(Explosion p_145772_1_, World p_145772_2_, int p_145772_3_, int p_145772_4_, int p_145772_5_, Block p_145772_6_)
{
@ -195,7 +195,7 @@
}
public boolean func_145774_a(Explosion p_145774_1_, World p_145774_2_, int p_145774_3_, int p_145774_4_, int p_145774_5_, Block p_145774_6_, float p_145774_7_)
@@ -2047,6 +2139,174 @@
@@ -2058,6 +2150,174 @@
public void func_145781_i(int p_145781_1_) {}

View File

@ -69,7 +69,7 @@
Entity entity = p_70645_1_.func_76346_g();
EntityLivingBase entitylivingbase = this.func_94060_bK();
@@ -907,6 +911,10 @@
@@ -908,6 +912,10 @@
i = EnchantmentHelper.func_77519_f((EntityLivingBase)entity);
}
@ -80,7 +80,7 @@
if (this.func_146066_aG() && this.field_70170_p.func_82736_K().func_82766_b("doMobLoot"))
{
this.func_70628_a(this.field_70718_bc > 0, i);
@@ -914,7 +922,7 @@
@@ -915,7 +923,7 @@
if (this.field_70718_bc > 0)
{
@ -89,7 +89,7 @@
if (j < 5)
{
@@ -922,6 +930,16 @@
@@ -923,6 +931,16 @@
}
}
}
@ -106,7 +106,7 @@
}
this.field_70170_p.func_72960_a(this, (byte)3);
@@ -970,7 +988,7 @@
@@ -971,7 +989,7 @@
int j = MathHelper.func_76128_c(this.field_70121_D.field_72338_b);
int k = MathHelper.func_76128_c(this.field_70161_v);
Block block = this.field_70170_p.func_147439_a(i, j, k);
@ -115,7 +115,7 @@
}
public boolean func_70089_S()
@@ -980,6 +998,8 @@
@@ -981,6 +999,8 @@
protected void func_70069_a(float p_70069_1_)
{
@ -124,7 +124,7 @@
super.func_70069_a(p_70069_1_);
PotionEffect potioneffect = this.func_70660_b(Potion.field_76430_j);
float f1 = potioneffect != null ? (float)(potioneffect.func_76458_c() + 1) : 0.0F;
@@ -1059,7 +1079,7 @@
@@ -1060,7 +1080,7 @@
{
if (this instanceof EntityZombie)
{
@ -133,7 +133,7 @@
}
int i;
@@ -1103,6 +1123,8 @@
@@ -1104,6 +1124,8 @@
{
if (!this.func_85032_ar())
{
@ -142,7 +142,7 @@
p_70665_2_ = this.func_70655_b(p_70665_1_, p_70665_2_);
p_70665_2_ = this.func_70672_c(p_70665_1_, p_70665_2_);
float f1 = p_70665_2_;
@@ -1151,6 +1173,17 @@
@@ -1152,6 +1174,17 @@
public void func_71038_i()
{
@ -160,7 +160,7 @@
if (!this.field_82175_bq || this.field_110158_av >= this.func_82166_i() / 2 || this.field_110158_av < 0)
{
this.field_110158_av = -1;
@@ -1346,6 +1379,7 @@
@@ -1347,6 +1380,7 @@
}
this.field_70160_al = true;
@ -168,7 +168,7 @@
}
public void func_70612_e(float p_70612_1_, float p_70612_2_)
@@ -1520,6 +1554,7 @@
@@ -1521,6 +1555,7 @@
public void func_70071_h_()
{
@ -176,11 +176,10 @@
super.func_70071_h_();
if (!this.field_70170_p.field_72995_K)
@@ -2000,4 +2035,42 @@
{
@@ -2007,6 +2042,44 @@
return this.func_96124_cp() != null ? this.func_96124_cp().func_142054_a(p_142012_1_) : false;
}
+
+ /***
+ * Removes all potion effects that have curativeItem as a curative item for its effect
+ * @param curativeItem The itemstack we are using to cure potion effects
@ -218,4 +217,7 @@
+ {
+ return this instanceof EntityPig;
+ }
}
+
public void func_152111_bt() {}
public void func_152112_bu() {}

View File

@ -10,7 +10,7 @@
else if (this.field_73134_o.contains(p_73117_1_))
{
this.field_73134_o.remove(p_73117_1_);
p_73117_1_.field_71130_g.add(Integer.valueOf(this.field_73132_a.func_145782_y()));
p_73117_1_.func_152339_d(this.field_73132_a);
+ net.minecraftforge.event.ForgeEventFactory.onStopEntityTracking(field_73132_a, p_73117_1_);
}
}

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/entity/monster/EntityZombie.java
+++ ../src-work/minecraft/net/minecraft/entity/monster/EntityZombie.java
@@ -37,6 +37,10 @@
@@ -41,6 +41,10 @@
import net.minecraft.util.MathHelper;
import net.minecraft.world.EnumDifficulty;
import net.minecraft.world.World;
@ -11,7 +11,7 @@
public class EntityZombie extends EntityMob
{
@@ -74,7 +78,7 @@
@@ -78,7 +82,7 @@
this.func_110148_a(SharedMonsterAttributes.field_111265_b).func_111128_a(40.0D);
this.func_110148_a(SharedMonsterAttributes.field_111263_d).func_111128_a(0.23000000417232513D);
this.func_110148_a(SharedMonsterAttributes.field_111264_e).func_111128_a(3.0D);
@ -20,7 +20,7 @@
}
protected void func_70088_a()
@@ -224,12 +228,28 @@
@@ -233,12 +237,28 @@
entitylivingbase = (EntityLivingBase)p_70097_1_.func_76346_g();
}
@ -54,7 +54,7 @@
for (int l = 0; l < 50; ++l)
{
@@ -244,7 +264,7 @@
@@ -253,7 +273,7 @@
if (this.field_70170_p.func_72855_b(entityzombie.field_70121_D) && this.field_70170_p.func_72945_a(entityzombie, entityzombie.field_70121_D).isEmpty() && !this.field_70170_p.func_72953_d(entityzombie.field_70121_D))
{
this.field_70170_p.func_72838_d(entityzombie);
@ -63,7 +63,7 @@
entityzombie.func_110161_a((IEntityLivingData)null);
this.func_110148_a(field_110186_bp).func_111121_a(new AttributeModifier("Zombie reinforcement caller charge", -0.05000000074505806D, 0));
entityzombie.func_110148_a(field_110186_bp).func_111121_a(new AttributeModifier("Zombie reinforcement callee charge", -0.05000000074505806D, 0));
@@ -430,7 +450,7 @@
@@ -439,7 +459,7 @@
if (p_110161_1_1 == null)
{

View File

@ -13,7 +13,7 @@
import net.minecraft.block.Block;
import net.minecraft.block.BlockBed;
import net.minecraft.block.material.Material;
@@ -78,8 +81,24 @@
@@ -77,8 +80,24 @@
import net.minecraft.world.WorldSettings;
import net.minecraft.world.chunk.IChunkProvider;
@ -38,7 +38,7 @@
public InventoryPlayer field_71071_by = new InventoryPlayer(this);
private InventoryEnderChest field_71078_a = new InventoryEnderChest();
public Container field_71069_bz;
@@ -130,6 +149,7 @@
@@ -129,6 +148,7 @@
this.func_70012_b((double)chunkcoordinates.field_71574_a + 0.5D, (double)(chunkcoordinates.field_71572_b + 1), (double)chunkcoordinates.field_71573_c + 0.5D, 0.0F, 0.0F);
this.field_70741_aB = 180.0F;
this.field_70174_ab = 20;
@ -46,7 +46,7 @@
}
protected void func_110147_ax()
@@ -173,7 +193,8 @@
@@ -172,7 +192,8 @@
{
if (this.field_71074_e != null)
{
@ -56,7 +56,7 @@
}
this.func_71041_bz();
@@ -204,14 +225,23 @@
@@ -203,14 +224,23 @@
if (itemstack == this.field_71074_e)
{
@ -85,7 +85,7 @@
}
}
else
@@ -258,7 +288,7 @@
@@ -257,7 +287,7 @@
super.func_70071_h_();
@ -94,7 +94,7 @@
{
this.func_71053_j();
this.field_71070_bA = this.field_71069_bz;
@@ -389,11 +419,13 @@
@@ -388,11 +418,13 @@
int i = this.field_71074_e.field_77994_a;
ItemStack itemstack = this.field_71074_e.func_77950_b(this.field_70170_p, this);
@ -109,7 +109,7 @@
{
this.field_71071_by.field_70462_a[this.field_71071_by.field_70461_c] = null;
}
@@ -467,11 +499,11 @@
@@ -466,11 +498,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);
@ -123,7 +123,7 @@
}
}
}
@@ -596,11 +628,15 @@
@@ -595,11 +627,15 @@
public void func_70645_a(DamageSource p_70645_1_)
{
@ -139,7 +139,7 @@
if (this.func_70005_c_().equals("Notch"))
{
this.func_146097_a(new ItemStack(Items.field_151034_e, 1), true, false);
@@ -611,6 +647,20 @@
@@ -610,6 +646,20 @@
this.field_71071_by.func_70436_m();
}
@ -160,7 +160,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);
@@ -662,12 +712,25 @@
@@ -661,12 +711,25 @@
public EntityItem func_71040_bB(boolean p_71040_1_)
{
@ -188,7 +188,7 @@
}
public EntityItem func_146097_a(ItemStack p_146097_1_, boolean p_146097_2_, boolean p_146097_3_)
@@ -723,13 +786,31 @@
@@ -722,13 +785,31 @@
public void func_71012_a(EntityItem p_71012_1_)
{
@ -221,7 +221,7 @@
if (f > 1.0F)
{
int i = EnchantmentHelper.func_77509_b(this);
@@ -739,7 +820,9 @@
@@ -738,7 +819,9 @@
{
float f1 = (float)(i * i + 1);
@ -232,7 +232,7 @@
{
f += f1 * 0.08F;
}
@@ -770,12 +853,13 @@
@@ -769,12 +852,13 @@
f /= 5.0F;
}
@ -248,7 +248,7 @@
}
public void func_70037_a(NBTTagCompound p_70037_1_)
@@ -804,6 +888,16 @@
@@ -803,6 +887,16 @@
this.field_82248_d = p_70037_1_.func_74767_n("SpawnForced");
}
@ -265,7 +265,7 @@
this.field_71100_bB.func_75112_a(p_70037_1_);
this.field_71075_bZ.func_75095_b(p_70037_1_);
@@ -834,6 +928,23 @@
@@ -833,6 +927,23 @@
p_70014_1_.func_74757_a("SpawnForced", this.field_82248_d);
}
@ -289,7 +289,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());
@@ -855,7 +966,7 @@
@@ -854,7 +965,7 @@
public float func_70047_e()
{
@ -298,7 +298,7 @@
}
protected void func_71061_d_()
@@ -865,6 +976,7 @@
@@ -864,6 +975,7 @@
public boolean func_70097_a(DamageSource p_70097_1_, float p_70097_2_)
{
@ -306,7 +306,7 @@
if (this.func_85032_ar())
{
return false;
@@ -966,12 +1078,15 @@
@@ -965,12 +1077,15 @@
{
if (!this.func_85032_ar())
{
@ -323,7 +323,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);
@@ -1005,6 +1120,7 @@
@@ -1004,6 +1119,7 @@
public boolean func_70998_m(Entity p_70998_1_)
{
@ -331,7 +331,7 @@
ItemStack itemstack = this.func_71045_bC();
ItemStack itemstack1 = itemstack != null ? itemstack.func_77946_l() : null;
@@ -1055,7 +1171,9 @@
@@ -1054,7 +1170,9 @@
public void func_71028_bD()
{
@ -341,7 +341,7 @@
}
public double func_70033_W()
@@ -1065,6 +1183,15 @@
@@ -1064,6 +1182,15 @@
public void func_71059_n(Entity p_71059_1_)
{
@ -357,7 +357,7 @@
if (p_71059_1_.func_70075_an())
{
if (!p_71059_1_.func_85031_j(this))
@@ -1212,6 +1339,12 @@
@@ -1211,6 +1338,12 @@
public EntityPlayer.EnumStatus func_71018_a(int p_71018_1_, int p_71018_2_, int p_71018_3_)
{
@ -370,7 +370,7 @@
if (!this.field_70170_p.field_72995_K)
{
if (this.func_70608_bn() || !this.func_70089_S())
@@ -1254,8 +1387,7 @@
@@ -1253,8 +1386,7 @@
if (this.field_70170_p.func_72899_e(p_71018_1_, p_71018_2_, p_71018_3_))
{
@ -380,7 +380,7 @@
float f1 = 0.5F;
float f = 0.5F;
@@ -1322,11 +1454,12 @@
@@ -1321,11 +1453,12 @@
this.func_71061_d_();
ChunkCoordinates chunkcoordinates = this.field_71081_bT;
ChunkCoordinates chunkcoordinates1 = this.field_71081_bT;
@ -396,7 +396,7 @@
if (chunkcoordinates1 == null)
{
@@ -1360,7 +1493,7 @@
@@ -1359,7 +1492,7 @@
private boolean func_71065_l()
{
@ -405,7 +405,7 @@
}
public static ChunkCoordinates func_71056_a(World p_71056_0_, ChunkCoordinates p_71056_1_, boolean p_71056_2_)
@@ -1371,9 +1504,9 @@
@@ -1370,9 +1503,9 @@
ichunkprovider.func_73158_c(p_71056_1_.field_71574_a - 3 >> 4, p_71056_1_.field_71573_c + 3 >> 4);
ichunkprovider.func_73158_c(p_71056_1_.field_71574_a + 3 >> 4, p_71056_1_.field_71573_c + 3 >> 4);
@ -417,7 +417,7 @@
return chunkcoordinates1;
}
else
@@ -1391,8 +1524,10 @@
@@ -1390,8 +1523,10 @@
{
if (this.field_71081_bT != null)
{
@ -430,7 +430,7 @@
switch (j)
{
@@ -1448,18 +1583,25 @@
@@ -1447,18 +1582,25 @@
public void func_146105_b(IChatComponent p_146105_1_) {}
@ -458,7 +458,7 @@
if (p_71063_1_ != null)
{
this.field_71077_c = new ChunkCoordinates(p_71063_1_);
@@ -1633,6 +1775,10 @@
@@ -1632,6 +1774,10 @@
super.func_70069_a(p_70069_1_);
}
@ -469,7 +469,7 @@
}
protected String func_146067_o(int p_146067_1_)
@@ -1675,11 +1821,6 @@
@@ -1674,11 +1820,6 @@
}
else
{
@ -481,7 +481,7 @@
if (this.field_71074_e != null && p_70620_1_.func_77973_b() == Items.field_151031_f)
{
int j = p_70620_1_.func_77988_m() - this.field_71072_f;
@@ -1699,6 +1840,7 @@
@@ -1698,6 +1839,7 @@
return Items.field_151031_f.func_94599_c(0);
}
}
@ -489,7 +489,7 @@
}
return iicon;
@@ -1782,6 +1924,8 @@
@@ -1781,6 +1923,8 @@
{
if (p_71008_1_ != this.field_71074_e)
{
@ -498,7 +498,7 @@
this.field_71074_e = p_71008_1_;
this.field_71072_f = p_71008_2_;
@@ -1865,6 +2009,10 @@
@@ -1864,6 +2008,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;
@ -509,7 +509,7 @@
}
else if (this.field_70170_p.func_82736_K().func_82766_b("keepInventory"))
{
@@ -1876,6 +2024,18 @@
@@ -1875,6 +2023,18 @@
}
this.field_71078_a = p_71049_1_.field_71078_a;
@ -528,7 +528,7 @@
}
protected boolean func_70041_e_()
@@ -1914,7 +2074,14 @@
@@ -1913,7 +2073,14 @@
public void func_70062_b(int p_70062_1_, ItemStack p_70062_2_)
{
@ -544,7 +544,7 @@
}
@SideOnly(Side.CLIENT)
@@ -1959,7 +2126,7 @@
@@ -1958,7 +2125,7 @@
public IChatComponent func_145748_c_()
{
@ -553,7 +553,7 @@
chatcomponenttext.func_150256_b().func_150241_a(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/msg " + this.func_70005_c_() + " "));
return chatcomponenttext;
}
@@ -2042,6 +2209,118 @@
@@ -2041,6 +2208,118 @@
FMLNetworkHandler.openGui(this, mod, modGuiId, world, x, y, z);
}
@ -564,14 +564,14 @@
+ {
+ if (par1 == 1.0F)
+ {
+ return this.field_70170_p.func_82732_R().func_72345_a(this.field_70165_t, this.field_70163_u + (this.func_70047_e() - this.getDefaultEyeHeight()), this.field_70161_v);
+ return Vec3.func_72443_a(this.field_70165_t, this.field_70163_u + (this.func_70047_e() - this.getDefaultEyeHeight()), this.field_70161_v);
+ }
+ else
+ {
+ double d0 = this.field_70169_q + (this.field_70165_t - this.field_70169_q) * (double)par1;
+ double d1 = this.field_70167_r + (this.field_70163_u - this.field_70167_r) * (double)par1 + (this.func_70047_e() - this.getDefaultEyeHeight());
+ double d2 = this.field_70166_s + (this.field_70161_v - this.field_70166_s) * (double)par1;
+ return this.field_70170_p.func_82732_R().func_72345_a(d0, d1, d2);
+ return Vec3.func_72443_a(d0, d1, d2);
+ }
+ }
+

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/entity/player/EntityPlayerMP.java
+++ ../src-work/minecraft/net/minecraft/entity/player/EntityPlayerMP.java
@@ -99,6 +99,12 @@
@@ -100,6 +100,12 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -13,10 +13,10 @@
public class EntityPlayerMP extends EntityPlayer implements ICrafting
{
private static final Logger field_147102_bM = LogManager.getLogger();
@@ -133,19 +139,11 @@
@@ -132,19 +138,11 @@
super(p_i45285_2_, p_i45285_3_);
p_i45285_4_.field_73090_b = this;
this.field_71134_c = p_i45285_4_;
this.field_71142_cm = p_i45285_1_.func_71203_ab().func_72395_o();
- ChunkCoordinates chunkcoordinates = p_i45285_2_.func_72861_E();
+ ChunkCoordinates chunkcoordinates = p_i45285_2_.field_73011_w.getRandomizedSpawnPoint();
int i = chunkcoordinates.field_71574_a;
@ -32,9 +32,9 @@
- }
-
this.field_71133_b = p_i45285_1_;
this.field_147103_bO = p_i45285_1_.func_71203_ab().func_148538_i(this.func_70005_c_());
this.field_147103_bO = p_i45285_1_.func_71203_ab().func_152602_a(this);
this.field_70138_W = 0.0F;
@@ -199,7 +197,7 @@
@@ -198,7 +196,7 @@
public float func_70047_e()
{
@ -43,7 +43,7 @@
}
public void func_70071_h_()
@@ -214,7 +212,7 @@
@@ -213,7 +211,7 @@
this.field_71070_bA.func_75142_b();
@ -52,7 +52,7 @@
{
this.func_71053_j();
this.field_71070_bA = this.field_71069_bz;
@@ -256,7 +254,8 @@
@@ -255,7 +253,8 @@
if (chunk.func_150802_k())
{
arraylist.add(chunk);
@ -62,7 +62,7 @@
iterator1.remove();
}
}
@@ -284,6 +283,7 @@
@@ -283,6 +282,7 @@
{
chunk = (Chunk)iterator2.next();
this.func_71121_q().func_73039_n().func_85172_a(this, chunk);
@ -70,7 +70,7 @@
}
}
}
@@ -408,11 +408,25 @@
@@ -402,11 +402,25 @@
public void func_70645_a(DamageSource p_70645_1_)
{
@ -96,9 +96,9 @@
}
Collection collection = this.field_70170_p.func_96441_U().func_96520_a(IScoreObjectiveCriteria.field_96642_c);
@@ -985,4 +999,15 @@
@@ -1021,4 +1035,16 @@
{
return this.field_147103_bO;
return this.field_143005_bX;
}
+
+ /* ===================================== FORGE START =====================================*/
@ -111,4 +111,5 @@
+ {
+ return 1.62F;
+ }
+ /* ===================================== FORGE END =====================================*/
}

View File

@ -83,7 +83,7 @@
- double d1 = p_77621_2_.field_70167_r + (p_77621_2_.field_70163_u - p_77621_2_.field_70167_r) * (double)f + 1.62D - (double)p_77621_2_.field_70129_M;
+ double d1 = p_77621_2_.field_70167_r + (p_77621_2_.field_70163_u - p_77621_2_.field_70167_r) * (double)f + (double)(p_77621_1_.field_72995_K ? p_77621_2_.func_70047_e() - p_77621_2_.getDefaultEyeHeight() : p_77621_2_.func_70047_e()); // isRemote check to revert changes to ray trace position due to adding the eye height clientside and player yOffset differences
double d2 = p_77621_2_.field_70166_s + (p_77621_2_.field_70161_v - p_77621_2_.field_70166_s) * (double)f;
Vec3 vec3 = p_77621_1_.func_82732_R().func_72345_a(d0, d1, d2);
Vec3 vec3 = Vec3.func_72443_a(d0, d1, d2);
float f3 = MathHelper.func_76134_b(-f2 * 0.017453292F - (float)Math.PI);
@@ -654,6 +667,10 @@
float f7 = f4 * f5;

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/item/ItemStack.java
+++ ../src-work/minecraft/net/minecraft/item/ItemStack.java
@@ -32,6 +32,7 @@
@@ -33,6 +33,7 @@
import net.minecraft.util.IIcon;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
@ -8,7 +8,7 @@
public final class ItemStack
{
@@ -180,7 +181,7 @@
@@ -181,7 +182,7 @@
public int func_77976_d()
{
@ -17,7 +17,7 @@
}
public boolean func_77985_e()
@@ -190,7 +191,7 @@
@@ -191,7 +192,7 @@
public boolean func_77984_f()
{
@ -26,7 +26,7 @@
}
public boolean func_77981_g()
@@ -200,32 +201,27 @@
@@ -201,32 +202,27 @@
public boolean func_77951_h()
{
@ -64,7 +64,7 @@
}
public boolean func_96631_a(int p_96631_1_, Random p_96631_2_)
@@ -257,8 +253,8 @@
@@ -258,8 +254,8 @@
}
}
@ -75,7 +75,7 @@
}
}
@@ -317,7 +313,7 @@
@@ -318,7 +314,7 @@
public boolean func_150998_b(Block p_150998_1_)
{
@ -84,7 +84,7 @@
}
public boolean func_111282_a(EntityPlayer p_111282_1_, EntityLivingBase p_111282_2_)
@@ -618,16 +614,24 @@
@@ -625,16 +621,24 @@
{
arraylist.add("Durability: " + (this.func_77958_k() - this.func_77952_i()) + " / " + this.func_77958_k());
}
@ -110,7 +110,7 @@
public EnumRarity func_77953_t()
{
return this.func_77973_b().func_77613_e(this);
@@ -729,7 +733,7 @@
@@ -736,7 +740,7 @@
}
else
{

View File

@ -6,9 +6,19 @@
-import cpw.mods.fml.relauncher.Side;
-import cpw.mods.fml.relauncher.SideOnly;
import java.io.BufferedInputStream;
import java.io.BufferedOutputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -90,7 +88,6 @@
@@ -22,6 +20,9 @@
import net.minecraft.crash.CrashReportCategory;
import net.minecraft.util.ReportedException;
+import cpw.mods.fml.relauncher.Side;
+import cpw.mods.fml.relauncher.SideOnly;
+
public class CompressedStreamTools
{
private static final String __OBFID = "CL_00001226";
@@ -91,7 +92,6 @@
return bytearrayoutputstream.toByteArray();
}
@ -16,7 +26,7 @@
public static void func_74793_a(NBTTagCompound p_74793_0_, File p_74793_1_) throws IOException
{
File file2 = new File(p_74793_1_.getAbsolutePath() + "_tmp");
@@ -176,7 +173,6 @@
@@ -182,7 +182,6 @@
}
}
@ -24,11 +34,11 @@
public static void func_74795_b(NBTTagCompound p_74795_0_, File p_74795_1_) throws IOException
{
DataOutputStream dataoutputstream = new DataOutputStream(new FileOutputStream(p_74795_1_));
@@ -191,7 +187,6 @@
@@ -197,7 +196,6 @@
}
}
- @SideOnly(Side.CLIENT)
public static NBTTagCompound func_74797_a(File p_74797_0_) throws IOException
{
if (!p_74797_0_.exists())
return func_152458_a(p_74797_0_, NBTSizeTracker.field_152451_a);

View File

@ -8,7 +8,7 @@
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
@@ -90,7 +88,6 @@
@@ -91,7 +89,6 @@
this.field_74747_a.add(p_74742_1_);
}
@ -16,7 +16,7 @@
public void func_150304_a(int p_150304_1_, NBTBase p_150304_2_)
{
if (p_150304_1_ >= 0 && p_150304_1_ < this.field_74747_a.size())
@@ -113,7 +110,6 @@
@@ -114,7 +111,6 @@
}
}

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/network/NetHandlerPlayServer.java
+++ ../src-work/minecraft/net/minecraft/network/NetHandlerPlayServer.java
@@ -85,6 +85,14 @@
@@ -86,6 +86,14 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -15,7 +15,7 @@
public class NetHandlerPlayServer implements INetHandlerPlayServer
{
private static final Logger field_147370_c = LogManager.getLogger();
@@ -219,6 +227,11 @@
@@ -222,6 +230,11 @@
this.field_147369_b.field_70154_o.func_70043_V();
}
@ -27,7 +27,7 @@
this.field_147367_d.func_71203_ab().func_72358_d(this.field_147369_b);
if (this.field_147380_r)
@@ -296,9 +309,10 @@
@@ -299,9 +312,10 @@
d4 = d1 - this.field_147369_b.field_70165_t;
double d5 = d2 - this.field_147369_b.field_70163_u;
double d6 = d3 - this.field_147369_b.field_70161_v;
@ -41,7 +41,7 @@
double d10 = d7 * d7 + d8 * d8 + d9 * d9;
if (d10 > 100.0D && (!this.field_147367_d.func_71264_H() || !this.field_147367_d.func_71214_G().equals(this.field_147369_b.func_70005_c_())))
@@ -316,6 +330,11 @@
@@ -319,6 +333,11 @@
this.field_147369_b.func_70664_aZ();
}
@ -53,7 +53,7 @@
this.field_147369_b.func_70091_d(d4, d5, d6);
this.field_147369_b.field_70122_E = p_147347_1_.func_149465_i();
this.field_147369_b.func_71000_j(d4, d5, d6);
@@ -338,10 +357,15 @@
@@ -341,10 +360,15 @@
field_147370_c.warn(this.field_147369_b.func_70005_c_() + " moved wrongly!");
}
@ -70,7 +70,7 @@
{
this.func_147364_a(this.field_147373_o, this.field_147382_p, this.field_147381_q, f1, f2);
return;
@@ -349,7 +373,7 @@
@@ -352,7 +376,7 @@
AxisAlignedBB axisalignedbb = this.field_147369_b.field_70121_D.func_72329_c().func_72314_b((double)f3, (double)f3, (double)f3).func_72321_a(0.0D, -0.55D, 0.0D);
@ -79,7 +79,7 @@
{
if (d11 >= -0.03125D)
{
@@ -368,6 +392,11 @@
@@ -371,6 +395,11 @@
this.field_147365_f = 0;
}
@ -91,7 +91,7 @@
this.field_147369_b.field_70122_E = p_147347_1_.func_149465_i();
this.field_147367_d.func_71203_ab().func_72358_d(this.field_147369_b);
this.field_147369_b.func_71122_b(this.field_147369_b.field_70163_u - d0, p_147347_1_.func_149465_i());
@@ -436,7 +465,10 @@
@@ -439,7 +468,10 @@
double d2 = this.field_147369_b.field_70161_v - ((double)k + 0.5D);
double d3 = d0 * d0 + d1 * d1 + d2 * d2;
@ -103,7 +103,7 @@
{
return;
}
@@ -497,7 +529,11 @@
@@ -500,7 +532,11 @@
return;
}
@ -116,7 +116,7 @@
}
else if (p_147346_1_.func_149571_d() >= this.field_147367_d.func_71207_Z() - 1 && (p_147346_1_.func_149568_f() == 1 || p_147346_1_.func_149571_d() >= this.field_147367_d.func_71207_Z()))
{
@@ -508,7 +544,9 @@
@@ -511,7 +547,9 @@
}
else
{
@ -127,7 +127,7 @@
{
this.field_147369_b.field_71134_c.func_73078_a(this.field_147369_b, worldserver, itemstack, i, j, k, l, p_147346_1_.func_149573_h(), p_147346_1_.func_149569_i(), p_147346_1_.func_149575_j());
}
@@ -674,6 +712,8 @@
@@ -677,6 +715,8 @@
else
{
ChatComponentTranslation chatcomponenttranslation1 = new ChatComponentTranslation("chat.type.text", new Object[] {this.field_147369_b.func_145748_c_(), s});
@ -136,7 +136,7 @@
this.field_147367_d.func_71203_ab().func_148544_a(chatcomponenttranslation1, false);
}
@@ -810,7 +850,7 @@
@@ -812,7 +852,7 @@
return;
}

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/server/MinecraftServer.java
+++ ../src-work/minecraft/net/minecraft/server/MinecraftServer.java
@@ -26,6 +26,7 @@
@@ -27,6 +27,7 @@
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
@ -8,7 +8,7 @@
import java.util.Iterator;
import java.util.List;
import java.util.Random;
@@ -74,6 +75,10 @@
@@ -75,6 +76,10 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@ -19,7 +19,7 @@
public abstract class MinecraftServer implements ICommandSender, Runnable, IPlayerUsage
{
private static final Logger field_147145_h = LogManager.getLogger();
@@ -90,7 +95,7 @@
@@ -92,7 +97,7 @@
@SideOnly(Side.SERVER)
private String field_71320_r;
private int field_71319_s = -1;
@ -28,7 +28,7 @@
private ServerConfigurationManager field_71318_t;
private boolean field_71317_u = true;
private boolean field_71316_v;
@@ -107,7 +112,8 @@
@@ -109,7 +114,8 @@
private int field_71280_D;
private int field_143008_E = 0;
public final long[] field_71311_j = new long[100];
@ -38,7 +38,7 @@
private KeyPair field_71292_I;
private String field_71293_J;
private String field_71294_K;
@@ -183,8 +189,6 @@
@@ -191,8 +197,6 @@
{
this.func_71237_c(p_71247_1_);
this.func_71192_d("menu.loadingLevel");
@ -47,7 +47,7 @@
ISaveHandler isavehandler = this.field_71310_m.func_75804_a(p_71247_1_, true);
WorldInfo worldinfo = isavehandler.func_75757_d();
WorldSettings worldsettings;
@@ -204,46 +208,21 @@
@@ -212,46 +216,21 @@
worldsettings.func_77159_a();
}
@ -101,7 +101,7 @@
this.func_147139_a(this.func_147135_j());
this.func_71222_d();
}
@@ -310,6 +289,7 @@
@@ -320,6 +299,7 @@
if (!this.field_71290_O)
{
WorldServer[] aworldserver = this.field_71305_c;
@ -109,24 +109,23 @@
int i = aworldserver.length;
for (int j = 0; j < i; ++j)
@@ -360,9 +340,16 @@
for (int i = 0; i < this.field_71305_c.length; ++i)
{
WorldServer worldserver = this.field_71305_c[i];
+ MinecraftForge.EVENT_BUS.post(new WorldEvent.Unload(worldserver));
worldserver.func_73041_k();
@@ -372,8 +352,15 @@
for (int i = 0; i < this.field_71305_c.length; ++i)
{
WorldServer worldserver = this.field_71305_c[i];
+ MinecraftForge.EVENT_BUS.post(new WorldEvent.Unload(worldserver));
worldserver.func_73041_k();
}
+
+ WorldServer[] tmp = field_71305_c;
+ for (WorldServer world : tmp)
+ {
+ DimensionManager.setWorld(world.field_73011_w.field_76574_g, null);
+ }
}
+ WorldServer[] tmp = field_71305_c;
+ for (WorldServer world : tmp)
+ {
+ DimensionManager.setWorld(world.field_73011_w.field_76574_g, null);
+ }
+
if (this.field_71307_n.func_76468_d())
{
this.field_71307_n.func_76470_e();
@@ -590,15 +577,18 @@
@@ -606,15 +593,18 @@
public void func_71190_q()
{
this.field_71304_b.func_76320_a("levels");
@ -147,8 +146,8 @@
+ WorldServer worldserver = DimensionManager.getWorld(id);
this.field_71304_b.func_76320_a(worldserver.func_72912_H().func_76065_j());
this.field_71304_b.func_76320_a("pools");
worldserver.func_82732_R().func_72343_a();
@@ -645,9 +635,11 @@
this.field_71304_b.func_76319_b();
@@ -660,9 +650,11 @@
this.field_71304_b.func_76319_b();
}
@ -161,7 +160,7 @@
this.field_71304_b.func_76318_c("connection");
this.func_147137_ag().func_151269_c();
this.field_71304_b.func_76318_c("players");
@@ -692,7 +684,13 @@
@@ -707,7 +699,13 @@
public WorldServer func_71218_a(int p_71218_1_)
{
@ -176,7 +175,7 @@
}
public String func_71249_w()
@@ -951,6 +949,7 @@
@@ -971,6 +969,7 @@
if (worldserver != null)
{
@ -184,7 +183,7 @@
worldserver.func_73041_k();
}
}
@@ -1421,7 +1420,6 @@
@@ -1451,7 +1450,6 @@
this.field_147141_M = p_155759_1_;
}

View File

@ -1,30 +1,6 @@
--- ../src-base/minecraft/net/minecraft/server/management/PlayerManager.java
+++ ../src-work/minecraft/net/minecraft/server/management/PlayerManager.java
@@ -1,7 +1,11 @@
package net.minecraft.server.management;
import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
import java.util.List;
+
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.network.Packet;
import net.minecraft.network.play.server.S21PacketChunkData;
@@ -13,6 +17,11 @@
import net.minecraft.world.WorldProvider;
import net.minecraft.world.WorldServer;
import net.minecraft.world.chunk.Chunk;
+import net.minecraftforge.common.ForgeModContainer;
+import net.minecraftforge.common.MinecraftForge;
+import net.minecraftforge.common.chunkio.ChunkIOExecutor;
+import net.minecraftforge.common.util.ChunkCoordComparator;
+import net.minecraftforge.event.world.ChunkWatchEvent;
public class PlayerManager
{
@@ -120,15 +129,24 @@
@@ -120,15 +120,24 @@
int j = (int)p_72683_1_.field_70161_v >> 4;
p_72683_1_.field_71131_d = p_72683_1_.field_70165_t;
p_72683_1_.field_71132_e = p_72683_1_.field_70161_v;
@ -40,7 +16,7 @@
}
}
+ Collections.sort(chunkList, new ChunkCoordComparator(p_72683_1_));
+ java.util.Collections.sort(chunkList, new net.minecraftforge.common.util.ChunkCoordComparator(p_72683_1_));
+
+ for (ChunkCoordIntPair pair : chunkList)
+ {
@ -50,7 +26,7 @@
this.field_72699_b.add(p_72683_1_);
this.func_72691_b(p_72683_1_);
}
@@ -230,6 +248,7 @@
@@ -230,6 +239,7 @@
int i1 = this.field_72698_e;
int j1 = i - k;
int k1 = j - l;
@ -58,7 +34,7 @@
if (j1 != 0 || k1 != 0)
{
@@ -239,7 +258,7 @@
@@ -239,7 +249,7 @@
{
if (!this.func_72684_a(l1, i2, k, l, i1))
{
@ -67,12 +43,12 @@
}
if (!this.func_72684_a(l1 - j1, i2 - k1, i, j, i1))
@@ -257,6 +276,18 @@
@@ -257,6 +267,18 @@
this.func_72691_b(p_72685_1_);
p_72685_1_.field_71131_d = p_72685_1_.field_70165_t;
p_72685_1_.field_71132_e = p_72685_1_.field_70161_v;
+ // send nearest chunks first
+ Collections.sort(chunksToLoad, new ChunkCoordComparator(p_72685_1_));
+ java.util.Collections.sort(chunksToLoad, new net.minecraftforge.common.util.ChunkCoordComparator(p_72685_1_));
+
+ for (ChunkCoordIntPair pair : chunksToLoad)
+ {
@ -81,16 +57,16 @@
+
+ if (i1 > 1 || i1 < -1 || j1 > 1 || j1 < -1)
+ {
+ Collections.sort(p_72685_1_.field_71129_f, new ChunkCoordComparator(p_72685_1_));
+ java.util.Collections.sort(p_72685_1_.field_71129_f, new net.minecraftforge.common.util.ChunkCoordComparator(p_72685_1_));
+ }
}
}
}
@@ -280,15 +311,24 @@
@@ -331,15 +353,24 @@
private int field_73262_e;
private int field_73260_f;
private long field_111198_g;
+ private final HashMap<EntityPlayerMP, Runnable> players = new HashMap<EntityPlayerMP, Runnable>();
+ private final java.util.HashMap<EntityPlayerMP, Runnable> players = new java.util.HashMap<EntityPlayerMP, Runnable>();
+ private boolean loaded = false;
+ private Runnable loadedRunnable = new Runnable()
+ {
@ -113,7 +89,7 @@
{
if (this.field_73263_b.contains(p_73255_1_))
{
@@ -302,7 +342,26 @@
@@ -353,7 +384,26 @@
}
this.field_73263_b.add(p_73255_1_);
@ -141,20 +117,20 @@
}
}
@@ -310,6 +369,24 @@
@@ -361,6 +411,24 @@
{
if (this.field_73263_b.contains(p_73252_1_))
{
+ // If we haven't loaded yet don't load the chunk just so we can clean it up
+ if (!this.loaded)
+ {
+ ChunkIOExecutor.dropQueuedChunkLoad(PlayerManager.this.func_72688_a(), this.field_73264_c.field_77276_a, this.field_73264_c.field_77275_b, this.players.get(p_73252_1_));
+ net.minecraftforge.common.chunkio.ChunkIOExecutor.dropQueuedChunkLoad(PlayerManager.this.func_72688_a(), this.field_73264_c.field_77276_a, this.field_73264_c.field_77275_b, this.players.get(p_73252_1_));
+ this.field_73263_b.remove(p_73252_1_);
+ this.players.remove(p_73252_1_);
+
+ if (this.field_73263_b.isEmpty())
+ {
+ ChunkIOExecutor.dropQueuedChunkLoad(PlayerManager.this.func_72688_a(), this.field_73264_c.field_77276_a, this.field_73264_c.field_77275_b, this.loadedRunnable);
+ net.minecraftforge.common.chunkio.ChunkIOExecutor.dropQueuedChunkLoad(PlayerManager.this.func_72688_a(), this.field_73264_c.field_77276_a, this.field_73264_c.field_77275_b, this.loadedRunnable);
+ long i = (long) this.field_73264_c.field_77276_a + 2147483647L | (long) this.field_73264_c.field_77275_b + 2147483647L << 32;
+ PlayerManager.this.field_72700_c.func_76159_d(i);
+ PlayerManager.this.field_111193_e.remove(this);
@ -166,7 +142,7 @@
Chunk chunk = PlayerManager.this.field_72701_a.func_72964_e(this.field_73264_c.field_77276_a, this.field_73264_c.field_77275_b);
if (chunk.func_150802_k())
@@ -317,9 +394,12 @@
@@ -368,9 +436,12 @@
p_73252_1_.field_71135_a.func_147359_a(new S21PacketChunkData(chunk, true, 0));
}
@ -174,12 +150,12 @@
this.field_73263_b.remove(p_73252_1_);
p_73252_1_.field_71129_f.remove(this.field_73264_c);
+ MinecraftForge.EVENT_BUS.post(new ChunkWatchEvent.UnWatch(field_73264_c, p_73252_1_));
+ net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(new net.minecraftforge.event.world.ChunkWatchEvent.UnWatch(field_73264_c, p_73252_1_));
+
if (this.field_73263_b.isEmpty())
{
long i = (long)this.field_73264_c.field_77276_a + 2147483647L | (long)this.field_73264_c.field_77275_b + 2147483647L << 32;
@@ -357,7 +437,7 @@
@@ -408,7 +479,7 @@
this.field_73260_f |= 1 << (p_151253_2_ >> 4);
@ -188,18 +164,26 @@
{
short short1 = (short)(p_151253_1_ << 12 | p_151253_3_ << 8 | p_151253_2_);
@@ -369,6 +449,10 @@
@@ -420,6 +491,10 @@
}
}
+ if (field_73262_e == field_151254_d.length)
+ {
+ field_151254_d = Arrays.copyOf(field_151254_d, field_151254_d.length << 1);
+ field_151254_d = java.util.Arrays.copyOf(field_151254_d, field_151254_d.length << 1);
+ }
this.field_151254_d[this.field_73262_e++] = short1;
}
}
@@ -401,7 +485,7 @@
@@ -437,6 +512,7 @@
}
}
+ @SuppressWarnings("unused")
public void func_73254_a()
{
if (this.field_73262_e != 0)
@@ -452,7 +528,7 @@
k = this.field_73264_c.field_77275_b * 16 + (this.field_151254_d[0] >> 8 & 15);
this.func_151251_a(new S23PacketBlockChange(i, j, k, PlayerManager.this.field_72701_a));
@ -208,12 +192,12 @@
{
this.func_151252_a(PlayerManager.this.field_72701_a.func_147438_o(i, j, k));
}
@@ -410,13 +494,14 @@
@@ -461,13 +537,14 @@
{
int l;
- if (this.field_73262_e == 64)
+ if (this.field_73262_e == ForgeModContainer.clumpingThreshold)
+ if (this.field_73262_e == net.minecraftforge.common.ForgeModContainer.clumpingThreshold)
{
i = this.field_73264_c.field_77276_a * 16;
j = this.field_73264_c.field_77275_b * 16;
@ -225,7 +209,7 @@
{
if ((this.field_73260_f & 1 << k) != 0)
{
@@ -433,14 +518,17 @@
@@ -484,14 +561,17 @@
else
{
this.func_151251_a(new S22PacketMultiBlockChange(this.field_73262_e, this.field_151254_d, PlayerManager.this.field_72701_a.func_72964_e(this.field_73264_c.field_77276_a, this.field_73264_c.field_77275_b)));

View File

@ -1,22 +1,6 @@
--- ../src-base/minecraft/net/minecraft/server/management/ServerConfigurationManager.java
+++ ../src-work/minecraft/net/minecraft/server/management/ServerConfigurationManager.java
@@ -7,6 +7,7 @@
import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+
import java.io.File;
import java.net.SocketAddress;
import java.text.SimpleDateFormat;
@@ -18,6 +19,7 @@
import java.util.Map;
import java.util.Set;
import java.util.Map.Entry;
+
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.player.EntityPlayer;
@@ -54,11 +56,15 @@
@@ -55,11 +55,15 @@
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.util.IChatComponent;
import net.minecraft.util.MathHelper;
@ -32,9 +16,9 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -93,7 +99,17 @@
public void func_72355_a(NetworkManager p_72355_1_, EntityPlayerMP p_72355_2_, NetHandlerPlayServer nethandlerplayserver)
{
@@ -108,7 +112,17 @@
String s = gameprofile1 == null ? gameprofile.getName() : gameprofile1.getName();
playerprofilecache.func_152649_a(gameprofile);
NBTTagCompound nbttagcompound = this.func_72380_a(p_72355_2_);
- p_72355_2_.func_70029_a(this.field_72400_f.func_71218_a(p_72355_2_.field_71093_bK));
+
@ -49,9 +33,9 @@
+
+ p_72355_2_.func_70029_a(playerWorld);
p_72355_2_.field_71134_c.func_73080_a((WorldServer)p_72355_2_.field_70170_p);
String s = "local";
String s1 = "local";
@@ -217,6 +233,7 @@
@@ -242,6 +256,7 @@
p_72380_1_.func_70020_e(nbttagcompound);
nbttagcompound1 = nbttagcompound;
field_148546_d.debug("loading single player");
@ -59,7 +43,7 @@
}
else
{
@@ -244,6 +261,7 @@
@@ -269,6 +284,7 @@
this.func_148540_a(new S38PacketPlayerListItem(p_72377_1_.func_70005_c_(), true, 1000));
this.field_72404_b.add(p_72377_1_);
WorldServer worldserver = this.field_72400_f.func_71218_a(p_72377_1_.field_71093_bK);
@ -67,15 +51,15 @@
worldserver.func_72838_d(p_72377_1_);
this.func_72375_a(p_72377_1_, (WorldServer)null);
@@ -276,6 +294,7 @@
@@ -301,6 +317,7 @@
worldserver.func_73040_p().func_72695_c(p_72367_1_);
this.field_72404_b.remove(p_72367_1_);
this.field_148547_k.remove(p_72367_1_.func_70005_c_());
+ ChunkIOExecutor.adjustPoolSize(this.func_72394_k());
this.field_148547_k.remove(p_72367_1_.func_110124_au());
+ net.minecraftforge.common.chunkio.ChunkIOExecutor.adjustPoolSize(this.func_72394_k());
this.func_148540_a(new S38PacketPlayerListItem(p_72367_1_.func_70005_c_(), false, 9999));
}
@@ -361,13 +380,23 @@
@@ -382,13 +399,23 @@
public EntityPlayerMP func_72368_a(EntityPlayerMP p_72368_1_, int p_72368_2_, boolean p_72368_3_)
{
@ -101,7 +85,7 @@
p_72368_1_.field_71093_bK = p_72368_2_;
Object object;
@@ -383,6 +412,7 @@
@@ -404,6 +431,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_);
@ -109,7 +93,7 @@
entityplayermp1.func_145769_d(p_72368_1_.func_145782_y());
WorldServer worldserver = this.field_72400_f.func_71218_a(p_72368_1_.field_71093_bK);
this.func_72381_a(entityplayermp1, p_72368_1_, worldserver);
@@ -427,6 +457,11 @@
@@ -448,6 +476,11 @@
public void func_72356_a(EntityPlayerMP p_72356_1_, int p_72356_2_)
{
@ -121,7 +105,7 @@
int j = p_72356_1_.field_71093_bK;
WorldServer worldserver = this.field_72400_f.func_71218_a(p_72356_1_.field_71093_bK);
p_72356_1_.field_71093_bK = p_72356_2_;
@@ -434,7 +469,7 @@
@@ -455,7 +488,7 @@
p_72356_1_.field_71135_a.func_147359_a(new S07PacketRespawn(p_72356_1_.field_71093_bK, p_72356_1_.field_70170_p.field_73013_u, p_72356_1_.field_70170_p.func_72912_H().func_76067_t(), p_72356_1_.field_71134_c.func_73081_b()));
worldserver.func_72973_f(p_72356_1_);
p_72356_1_.field_70128_L = false;
@ -130,7 +114,7 @@
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);
@@ -452,38 +487,47 @@
@@ -473,38 +506,47 @@
public void func_82448_a(Entity p_82448_1_, int p_82448_2_, WorldServer p_82448_3_, WorldServer p_82448_4_)
{
@ -190,7 +174,7 @@
{
ChunkCoordinates chunkcoordinates;
@@ -518,7 +562,7 @@
@@ -539,7 +581,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);

View File

@ -88,11 +88,11 @@
+ Block type = func_145838_q();
+ if (type == Blocks.field_150381_bn)
+ {
+ bb = AxisAlignedBB.func_72332_a().func_72299_a(field_145851_c, field_145848_d, field_145849_e, field_145851_c + 1, field_145848_d + 1, field_145849_e + 1);
+ bb = AxisAlignedBB.func_72330_a(field_145851_c, field_145848_d, field_145849_e, field_145851_c + 1, field_145848_d + 1, field_145849_e + 1);
+ }
+ else if (type == Blocks.field_150486_ae || type == Blocks.field_150447_bR)
+ {
+ bb = AxisAlignedBB.func_72332_a().func_72299_a(field_145851_c - 1, field_145848_d, field_145849_e - 1, field_145851_c + 2, field_145848_d + 2, field_145849_e + 2);
+ bb = AxisAlignedBB.func_72330_a(field_145851_c - 1, field_145848_d, field_145849_e - 1, field_145851_c + 2, field_145848_d + 2, field_145849_e + 2);
+ }
+ else if (type != null && type != Blocks.field_150461_bJ)
+ {

View File

@ -1,16 +1,16 @@
--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityFurnace.java
+++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityFurnace.java
@@ -217,8 +217,7 @@
@@ -219,8 +219,7 @@
if (this.field_145957_n[1].field_77994_a == 0)
{
- Item item = this.field_145957_n[1].func_77973_b().func_77668_q();
- this.field_145957_n[1] = item != null ? new ItemStack(item) : null;
+ this.field_145957_n[1] = field_145957_n[1].func_77973_b().getContainerItem(field_145957_n[1]);
if (this.field_145957_n[1].field_77994_a == 0)
{
- Item item = this.field_145957_n[1].func_77973_b().func_77668_q();
- this.field_145957_n[1] = item != null ? new ItemStack(item) : null;
+ this.field_145957_n[1] = field_145957_n[1].func_77973_b().getContainerItem(field_145957_n[1]);
}
}
}
}
@@ -262,7 +261,11 @@
@@ -265,7 +264,11 @@
else
{
ItemStack itemstack = FurnaceRecipes.func_77602_a().func_151395_a(this.field_145957_n[0]);
@ -23,7 +23,7 @@
}
}
@@ -278,7 +281,7 @@
@@ -281,7 +284,7 @@
}
else if (this.field_145957_n[2].func_77973_b() == itemstack.func_77973_b())
{

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/tileentity/TileEntityHopper.java
+++ ../src-work/minecraft/net/minecraft/tileentity/TileEntityHopper.java
@@ -393,17 +393,30 @@
@@ -518,17 +518,30 @@
if (itemstack1 == null)
{

View File

@ -1,22 +1,22 @@
--- ../src-base/minecraft/net/minecraft/util/Session.java
+++ ../src-work/minecraft/net/minecraft/util/Session.java
@@ -14,6 +14,19 @@
@@ -19,6 +19,19 @@
public Session(String p_i45006_1_, String p_i45006_2_, String p_i45006_3_)
public Session(String p_i1098_1_, String p_i1098_2_, String p_i1098_3_, String p_i1098_4_)
{
+ if (p_i45006_1_ == null || p_i45006_1_.isEmpty())
+ if (p_i1098_1_ == null || p_i1098_1_.isEmpty())
+ {
+ p_i45006_1_ = "MissingName";
+ p_i45006_2_ = p_i45006_3_ = "NotValid";
+ p_i1098_1_ = "MissingName";
+ p_i1098_2_ = p_i1098_3_ = "NotValid";
+ System.out.println("=========================================================");
+ System.out.println("Warning the username was not set for this session, typically");
+ System.out.println("this means you installed Forge incorrectly. We have set your");
+ System.out.println("name to \"MissingName\" and your session to nothing. Please");
+ System.out.println("check your instation and post a console log from the launcher");
+ System.out.println("check your instllation and post a console log from the launcher");
+ System.out.println("when asking for help!");
+ System.out.println("=========================================================");
+
+ }
this.field_74286_b = p_i45006_1_;
this.field_148257_b = p_i45006_2_;
this.field_148258_c = p_i45006_3_;
this.field_74286_b = p_i1098_1_;
this.field_148257_b = p_i1098_2_;
this.field_148258_c = p_i1098_3_;

View File

@ -8,25 +8,25 @@
-
public class Vec3
{
public static final Vec3Pool field_82592_a = new Vec3Pool(-1, -1);
@@ -48,7 +45,6 @@
public double field_72450_a;
@@ -45,7 +42,6 @@
return this;
}
- @SideOnly(Side.CLIENT)
public Vec3 func_72444_a(Vec3 p_72444_1_)
{
return this.field_72447_d.func_72345_a(p_72444_1_.field_72450_a - this.field_72450_a, p_72444_1_.field_72448_b - this.field_72448_b, p_72444_1_.field_72449_c - this.field_72449_c);
@@ -65,7 +61,6 @@
return func_72443_a(p_72444_1_.field_72450_a - this.field_72450_a, p_72444_1_.field_72448_b - this.field_72448_b, p_72444_1_.field_72449_c - this.field_72449_c);
@@ -62,7 +58,6 @@
return this.field_72450_a * p_72430_1_.field_72450_a + this.field_72448_b * p_72430_1_.field_72448_b + this.field_72449_c * p_72430_1_.field_72449_c;
}
- @SideOnly(Side.CLIENT)
public Vec3 func_72431_c(Vec3 p_72431_1_)
{
return this.field_72447_d.func_72345_a(this.field_72448_b * p_72431_1_.field_72449_c - this.field_72449_c * p_72431_1_.field_72448_b, this.field_72449_c * p_72431_1_.field_72450_a - this.field_72450_a * p_72431_1_.field_72449_c, this.field_72450_a * p_72431_1_.field_72448_b - this.field_72448_b * p_72431_1_.field_72450_a);
@@ -185,7 +180,6 @@
this.field_72449_c = d2;
return func_72443_a(this.field_72448_b * p_72431_1_.field_72449_c - this.field_72449_c * p_72431_1_.field_72448_b, this.field_72449_c * p_72431_1_.field_72450_a - this.field_72450_a * p_72431_1_.field_72449_c, this.field_72450_a * p_72431_1_.field_72448_b - this.field_72448_b * p_72431_1_.field_72450_a);
@@ -178,7 +173,6 @@
this.func_72439_b(d0, d1, d2);
}
- @SideOnly(Side.CLIENT)

View File

@ -1,14 +1,14 @@
--- ../src-base/minecraft/net/minecraft/world/ChunkCache.java
+++ ../src-work/minecraft/net/minecraft/world/ChunkCache.java
@@ -9,6 +9,7 @@
import net.minecraft.util.Vec3Pool;
@@ -8,6 +8,7 @@
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk;
+import net.minecraftforge.common.util.ForgeDirection;
public class ChunkCache implements IBlockAccess
{
@@ -92,6 +93,8 @@
@@ -91,6 +92,8 @@
{
int l = (p_147438_1_ >> 4) - this.field_72818_a;
int i1 = (p_147438_3_ >> 4) - this.field_72816_b;
@ -17,7 +17,7 @@
return this.field_72817_c[l][i1].func_150806_e(p_147438_1_ & 15, p_147438_2_, p_147438_3_ & 15);
}
@@ -123,6 +126,8 @@
@@ -122,6 +125,8 @@
{
int l = (p_72805_1_ >> 4) - this.field_72818_a;
int i1 = (p_72805_3_ >> 4) - this.field_72816_b;
@ -26,8 +26,8 @@
return this.field_72817_c[l][i1].func_76628_c(p_72805_1_ & 15, p_72805_2_, p_72805_3_ & 15);
}
}
@@ -139,10 +144,9 @@
return this.field_72815_e.func_82732_R();
@@ -137,10 +142,9 @@
return this.field_72815_e.func_72807_a(p_72807_1_, p_72807_2_);
}
- @SideOnly(Side.CLIENT)
@ -38,9 +38,9 @@
}
@SideOnly(Side.CLIENT)
@@ -248,4 +252,15 @@
@@ -241,4 +245,15 @@
{
return this.func_147439_a(p_72879_1_, p_72879_2_, p_72879_3_).func_149748_c(this, p_72879_1_, p_72879_2_, p_72879_3_, p_72879_4_);
return 256;
}
+
+ @Override

View File

@ -1,25 +1,25 @@
--- ../src-base/minecraft/net/minecraft/world/IBlockAccess.java
+++ ../src-work/minecraft/net/minecraft/world/IBlockAccess.java
@@ -6,6 +6,7 @@
@@ -5,6 +5,7 @@
import net.minecraft.block.Block;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.Vec3Pool;
import net.minecraft.world.biome.BiomeGenBase;
+import net.minecraftforge.common.util.ForgeDirection;
public interface IBlockAccess
{
@@ -18,7 +19,6 @@
@@ -19,7 +20,6 @@
int func_72805_g(int var1, int var2, int var3);
int func_72879_k(int p_72879_1_, int p_72879_2_, int p_72879_3_, int p_72879_4_);
- @SideOnly(Side.CLIENT)
boolean func_147437_c(int var1, int var2, int var3);
boolean func_147437_c(int p_147437_1_, int p_147437_2_, int p_147437_3_);
@SideOnly(Side.CLIENT)
@@ -34,4 +34,16 @@
Vec3Pool func_82732_R();
@@ -30,4 +30,16 @@
int func_72879_k(int var1, int var2, int var3, int var4);
@SideOnly(Side.CLIENT)
boolean func_72806_N();
+
+ /**
+ * FORGE: isSideSolid, pulled up from {@link World}

View File

@ -36,7 +36,7 @@
public boolean field_72999_e;
public List field_72996_f = new ArrayList();
protected List field_72997_g = new ArrayList();
@@ -98,6 +125,11 @@
@@ -97,6 +124,11 @@
public BiomeGenBase func_72807_a(final int p_72807_1_, final int p_72807_2_)
{
@ -48,7 +48,7 @@
if (this.func_72899_e(p_72807_1_, 0, p_72807_2_))
{
Chunk chunk = this.func_72938_d(p_72807_1_, p_72807_2_);
@@ -144,7 +176,13 @@
@@ -143,7 +175,13 @@
this.field_72984_F = p_i45368_5_;
this.field_72986_A = new WorldInfo(p_i45368_4_, p_i45368_2_);
this.field_73011_w = p_i45368_3_;
@ -63,7 +63,7 @@
VillageCollection villagecollection = (VillageCollection)this.field_72988_C.func_75742_a(VillageCollection.class, "villages");
if (villagecollection == null)
@@ -158,7 +196,10 @@
@@ -157,7 +195,10 @@
this.field_72982_D.func_82566_a(this);
}
@ -75,7 +75,7 @@
this.field_73020_y = this.func_72970_h();
this.func_72966_v();
this.func_72947_a();
@@ -173,7 +214,7 @@
@@ -172,7 +213,7 @@
this.field_72994_J = new int[32768];
this.field_73019_z = p_i45369_1_;
this.field_72984_F = p_i45369_5_;
@ -84,7 +84,7 @@
this.field_72986_A = p_i45369_1_.func_75757_d();
if (p_i45369_4_ != null)
@@ -201,6 +242,15 @@
@@ -200,6 +241,15 @@
this.field_73011_w.func_76558_a(this);
this.field_73020_y = this.func_72970_h();
@ -100,7 +100,7 @@
if (!this.field_72986_A.func_76070_v())
{
try
@@ -226,12 +276,12 @@
@@ -225,12 +275,12 @@
this.field_72986_A.func_76091_d(true);
}
@ -115,7 +115,7 @@
}
else
{
@@ -243,6 +293,20 @@
@@ -242,6 +292,20 @@
this.func_72947_a();
}
@ -136,7 +136,7 @@
protected abstract IChunkProvider func_72970_h();
protected void func_72963_a(WorldSettings p_72963_1_)
@@ -296,7 +360,8 @@
@@ -295,7 +359,8 @@
public boolean func_147437_c(int p_147437_1_, int p_147437_2_, int p_147437_3_)
{
@ -146,7 +146,7 @@
}
public boolean func_72899_e(int p_72899_1_, int p_72899_2_, int p_72899_3_)
@@ -928,7 +993,7 @@
@@ -927,7 +992,7 @@
public boolean func_72935_r()
{
@ -155,7 +155,7 @@
}
public MovingObjectPosition func_72933_a(Vec3 p_72933_1_, Vec3 p_72933_2_)
@@ -1159,6 +1224,12 @@
@@ -1158,6 +1223,12 @@
public void func_72956_a(Entity p_72956_1_, String p_72956_2_, float p_72956_3_, float p_72956_4_)
{
@ -168,7 +168,7 @@
for (int i = 0; i < this.field_73021_x.size(); ++i)
{
((IWorldAccess)this.field_73021_x.get(i)).func_72704_a(p_72956_2_, p_72956_1_.field_70165_t, p_72956_1_.field_70163_u - (double)p_72956_1_.field_70129_M, p_72956_1_.field_70161_v, p_72956_3_, p_72956_4_);
@@ -1167,6 +1238,12 @@
@@ -1166,6 +1237,12 @@
public void func_85173_a(EntityPlayer p_85173_1_, String p_85173_2_, float p_85173_3_, float p_85173_4_)
{
@ -181,7 +181,7 @@
for (int i = 0; i < this.field_73021_x.size(); ++i)
{
((IWorldAccess)this.field_73021_x.get(i)).func_85102_a(p_85173_1_, p_85173_2_, p_85173_1_.field_70165_t, p_85173_1_.field_70163_u - (double)p_85173_1_.field_70129_M, p_85173_1_.field_70161_v, p_85173_3_, p_85173_4_);
@@ -1228,6 +1305,7 @@
@@ -1227,6 +1304,7 @@
this.field_73010_i.add(entityplayer);
this.func_72854_c();
}
@ -414,7 +414,7 @@
}
}
}
@@ -2370,13 +2505,15 @@
@@ -2378,13 +2513,15 @@
public void func_147455_a(int p_147455_1_, int p_147455_2_, int p_147455_3_, TileEntity p_147455_4_)
{
@ -434,7 +434,7 @@
Iterator iterator = this.field_147484_a.iterator();
while (iterator.hasNext())
@@ -2395,40 +2532,22 @@
@@ -2403,40 +2540,22 @@
else
{
this.field_147482_g.add(p_147455_4_);
@ -485,7 +485,7 @@
}
public void func_147457_a(TileEntity p_147457_1_)
@@ -2445,8 +2564,7 @@
@@ -2453,8 +2572,7 @@
public static boolean func_147466_a(IBlockAccess p_147466_0_, int p_147466_1_, int p_147466_2_, int p_147466_3_)
{
Block block = p_147466_0_.func_147439_a(p_147466_1_, p_147466_2_, p_147466_3_);
@ -495,7 +495,7 @@
}
public boolean func_147445_c(int p_147445_1_, int p_147445_2_, int p_147445_3_, boolean p_147445_4_)
@@ -2458,7 +2576,7 @@
@@ -2466,7 +2584,7 @@
if (chunk != null && !chunk.func_76621_g())
{
Block block = this.func_147439_a(p_147445_1_, p_147445_2_, p_147445_3_);
@ -504,7 +504,7 @@
}
else
{
@@ -2483,8 +2601,7 @@
@@ -2491,8 +2609,7 @@
public void func_72891_a(boolean p_72891_1_, boolean p_72891_2_)
{
@ -514,7 +514,7 @@
}
public void func_72835_b()
@@ -2494,6 +2611,11 @@
@@ -2502,6 +2619,11 @@
private void func_72947_a()
{
@ -526,7 +526,7 @@
if (this.field_72986_A.func_76059_o())
{
this.field_73004_o = 1.0F;
@@ -2507,6 +2629,11 @@
@@ -2515,6 +2637,11 @@
protected void func_72979_l()
{
@ -538,7 +538,7 @@
if (!this.field_73011_w.field_76576_e)
{
if (!this.field_72995_K)
@@ -2591,6 +2718,7 @@
@@ -2599,6 +2726,7 @@
{
this.field_72993_I.clear();
this.field_72984_F.func_76320_a("buildList");
@ -546,7 +546,7 @@
int i;
EntityPlayer entityplayer;
int j;
@@ -2682,6 +2810,11 @@
@@ -2693,6 +2821,11 @@
public boolean func_72834_c(int p_72834_1_, int p_72834_2_, int p_72834_3_, boolean p_72834_4_)
{
@ -558,7 +558,7 @@
BiomeGenBase biomegenbase = this.func_72807_a(p_72834_1_, p_72834_3_);
float f = biomegenbase.func_150564_a(p_72834_1_, p_72834_2_, p_72834_3_);
@@ -2737,6 +2870,11 @@
@@ -2748,6 +2881,11 @@
public boolean func_147478_e(int p_147478_1_, int p_147478_2_, int p_147478_3_, boolean p_147478_4_)
{
@ -570,7 +570,7 @@
BiomeGenBase biomegenbase = this.func_72807_a(p_147478_1_, p_147478_3_);
float f = biomegenbase.func_150564_a(p_147478_1_, p_147478_2_, p_147478_3_);
@@ -2786,10 +2924,11 @@
@@ -2797,10 +2935,11 @@
else
{
Block block = this.func_147439_a(p_98179_1_, p_98179_2_, p_98179_3_);
@ -585,7 +585,7 @@
{
i1 = 1;
}
@@ -2889,7 +3028,7 @@
@@ -2900,7 +3039,7 @@
int j4 = i2 + Facing.field_71586_b[i4];
int k4 = j2 + Facing.field_71587_c[i4];
int l4 = k2 + Facing.field_71585_d[i4];
@ -594,7 +594,7 @@
i3 = this.func_72972_b(p_147463_1_, j4, k4, l4);
if (i3 == l2 - i5 && i1 < this.field_72994_J.length)
@@ -2987,10 +3126,10 @@
@@ -2998,10 +3137,10 @@
public List func_94576_a(Entity p_94576_1_, AxisAlignedBB p_94576_2_, IEntitySelector p_94576_3_)
{
ArrayList arraylist = new ArrayList();
@ -609,7 +609,7 @@
for (int i1 = i; i1 <= j; ++i1)
{
@@ -3013,10 +3152,10 @@
@@ -3024,10 +3163,10 @@
public List func_82733_a(Class p_82733_1_, AxisAlignedBB p_82733_2_, IEntitySelector p_82733_3_)
{
@ -624,7 +624,7 @@
ArrayList arraylist = new ArrayList();
for (int i1 = i; i1 <= j; ++i1)
@@ -3093,11 +3232,14 @@
@@ -3104,11 +3243,14 @@
public void func_72868_a(List p_72868_1_)
{
@ -642,7 +642,7 @@
}
}
@@ -3110,7 +3252,7 @@
@@ -3121,7 +3263,7 @@
{
Block block1 = this.func_147439_a(p_147472_2_, p_147472_3_, p_147472_4_);
AxisAlignedBB axisalignedbb = p_147472_5_ ? null : p_147472_1_.func_149668_a(this, p_147472_2_, p_147472_3_, p_147472_4_);
@ -651,7 +651,7 @@
}
public PathEntity func_72865_a(Entity p_72865_1_, Entity p_72865_2_, float p_72865_3_, boolean p_72865_4_, boolean p_72865_5_, boolean p_72865_6_, boolean p_72865_7_)
@@ -3215,7 +3357,8 @@
@@ -3226,7 +3368,8 @@
public int func_72878_l(int p_72878_1_, int p_72878_2_, int p_72878_3_, int p_72878_4_)
{
@ -661,7 +661,7 @@
}
public boolean func_72864_z(int p_72864_1_, int p_72864_2_, int p_72864_3_)
@@ -3346,7 +3489,7 @@
@@ -3374,7 +3517,7 @@
public long func_72905_C()
{
@ -670,7 +670,7 @@
}
public long func_82737_E()
@@ -3356,22 +3499,22 @@
@@ -3384,22 +3527,22 @@
public long func_72820_D()
{
@ -697,7 +697,7 @@
}
@SideOnly(Side.CLIENT)
@@ -3391,12 +3534,20 @@
@@ -3419,12 +3562,20 @@
if (!this.field_72996_f.contains(p_72897_1_))
{
@ -719,7 +719,7 @@
return true;
}
@@ -3486,8 +3637,7 @@
@@ -3514,8 +3665,7 @@
public boolean func_72958_C(int p_72958_1_, int p_72958_2_, int p_72958_3_)
{
@ -729,7 +729,7 @@
}
public void func_72823_a(String p_72823_1_, WorldSavedData p_72823_2_)
@@ -3541,12 +3691,12 @@
@@ -3569,12 +3719,12 @@
public int func_72800_K()
{
@ -744,7 +744,7 @@
}
public Random func_72843_D(int p_72843_1_, int p_72843_2_, int p_72843_3_)
@@ -3570,7 +3720,7 @@
@@ -3598,7 +3748,7 @@
@SideOnly(Side.CLIENT)
public double func_72919_O()
{
@ -753,7 +753,7 @@
}
public CrashReportCategory func_72914_a(CrashReport p_72914_1_)
@@ -3641,25 +3791,24 @@
@@ -3663,25 +3813,24 @@
public void func_147453_f(int p_147453_1_, int p_147453_2_, int p_147453_3_, Block p_147453_4_)
{
@ -792,7 +792,7 @@
}
}
}
@@ -3700,4 +3849,110 @@
@@ -3722,4 +3871,110 @@
iworldaccess.func_147584_b();
}
}

View File

@ -1,14 +1,14 @@
--- ../src-base/minecraft/net/minecraft/world/WorldServer.java
+++ ../src-work/minecraft/net/minecraft/world/WorldServer.java
@@ -2,6 +2,7 @@
@@ -3,6 +3,7 @@
import com.google.common.collect.Lists;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
+import java.io.File;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
@@ -49,11 +50,19 @@
@@ -50,11 +51,19 @@
import net.minecraft.world.biome.WorldChunkManager;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.IChunkProvider;
@ -28,7 +28,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -78,6 +87,10 @@
@@ -79,6 +88,10 @@
private IntHashMap field_73066_T;
private static final String __OBFID = "CL_00001437";
@ -39,7 +39,7 @@
public WorldServer(MinecraftServer p_i45284_1_, ISaveHandler p_i45284_2_, String p_i45284_3_, int p_i45284_4_, WorldSettings p_i45284_5_, Profiler p_i45284_6_)
{
super(p_i45284_2_, p_i45284_3_, p_i45284_5_, WorldProvider.func_76570_a(p_i45284_4_), p_i45284_6_);
@@ -110,8 +123,12 @@
@@ -111,8 +124,12 @@
this.field_72988_C.func_75745_a("scoreboard", scoreboardsavedata);
}
@ -53,7 +53,7 @@
}
public void func_72835_b()
@@ -170,6 +187,10 @@
@@ -171,6 +188,10 @@
this.field_72983_E.func_75528_a();
this.field_72984_F.func_76318_c("portalForcer");
this.field_85177_Q.func_85189_a(this.func_82737_E());
@ -64,7 +64,7 @@
this.field_72984_F.func_76319_b();
this.func_147488_Z();
}
@@ -177,6 +198,7 @@
@@ -178,6 +199,7 @@
public BiomeGenBase.SpawnListEntry func_73057_a(EnumCreatureType p_73057_1_, int p_73057_2_, int p_73057_3_, int p_73057_4_)
{
List list = this.func_72863_F().func_73155_a(p_73057_1_, p_73057_2_, p_73057_3_, p_73057_4_);
@ -72,7 +72,7 @@
return list != null && !list.isEmpty() ? (BiomeGenBase.SpawnListEntry)WeightedRandom.func_76271_a(this.field_73012_v, list) : null;
}
@@ -217,10 +239,7 @@
@@ -218,10 +240,7 @@
private void func_73051_P()
{
@ -84,7 +84,7 @@
}
public boolean func_73056_e()
@@ -284,6 +303,14 @@
@@ -285,6 +304,14 @@
int j = 0;
Iterator iterator = this.field_72993_I.iterator();
@ -99,7 +99,7 @@
while (iterator.hasNext())
{
ChunkCoordIntPair chunkcoordintpair = (ChunkCoordIntPair)iterator.next();
@@ -293,14 +320,18 @@
@@ -294,14 +321,18 @@
Chunk chunk = this.func_72964_e(chunkcoordintpair.field_77276_a, chunkcoordintpair.field_77275_b);
this.func_147467_a(k, l, chunk);
this.field_72984_F.func_76318_c("tickChunk");
@ -120,7 +120,7 @@
{
this.field_73005_l = this.field_73005_l * 3 + 1013904223;
i1 = this.field_73005_l >> 2;
@@ -316,7 +347,7 @@
@@ -317,7 +348,7 @@
this.field_72984_F.func_76318_c("iceandsnow");
@ -129,7 +129,7 @@
{
this.field_73005_l = this.field_73005_l * 3 + 1013904223;
i1 = this.field_73005_l >> 2;
@@ -392,6 +423,9 @@
@@ -393,6 +424,9 @@
public void func_147454_a(int p_147454_1_, int p_147454_2_, int p_147454_3_, Block p_147454_4_, int p_147454_5_, int p_147454_6_)
{
NextTickListEntry nextticklistentry = new NextTickListEntry(p_147454_1_, p_147454_2_, p_147454_3_, p_147454_4_);
@ -139,7 +139,7 @@
byte b0 = 0;
if (this.field_72999_e && p_147454_4_.func_149688_o() != Material.field_151579_a)
@@ -451,7 +485,7 @@
@@ -452,7 +486,7 @@
public void func_72939_s()
{
@ -148,7 +148,7 @@
{
if (this.field_80004_Q++ >= 1200)
{
@@ -511,6 +545,9 @@
@@ -512,6 +546,9 @@
{
nextticklistentry = (NextTickListEntry)iterator.next();
iterator.remove();
@ -158,7 +158,7 @@
byte b0 = 0;
if (this.func_72904_c(nextticklistentry.field_77183_a - b0, nextticklistentry.field_77181_b - b0, nextticklistentry.field_77182_c - b0, nextticklistentry.field_77183_a + b0, nextticklistentry.field_77181_b + b0, nextticklistentry.field_77182_c + b0))
@@ -633,13 +670,26 @@
@@ -634,13 +671,26 @@
{
ArrayList arraylist = new ArrayList();
@ -190,7 +190,7 @@
}
}
@@ -648,9 +698,14 @@
@@ -649,9 +699,14 @@
public boolean func_72962_a(EntityPlayer p_72962_1_, int p_72962_2_, int p_72962_3_, int p_72962_4_)
{
@ -206,7 +206,7 @@
protected void func_72963_a(WorldSettings p_72963_1_)
{
if (this.field_73066_T == null)
@@ -725,7 +780,7 @@
@@ -726,7 +781,7 @@
protected void func_73047_i()
{
@ -215,15 +215,15 @@
for (int i = 0; i < 10; ++i)
{
@@ -762,6 +817,7 @@
@@ -763,6 +818,7 @@
}
this.field_73020_y.func_73151_a(p_73044_1_, p_73044_2_);
+ MinecraftForge.EVENT_BUS.post(new WorldEvent.Save(this));
}
}
ArrayList arraylist = Lists.newArrayList(this.field_73059_b.func_152380_a());
Iterator iterator = arraylist.iterator();
@@ -778,6 +834,7 @@
@@ -791,6 +847,7 @@
this.func_72906_B();
this.field_73019_z.func_75755_a(this.field_72986_A, this.field_73061_a.func_71203_ab().func_72378_q());
this.field_72988_C.func_75744_a();
@ -231,7 +231,7 @@
}
public void func_72923_a(Entity p_72923_1_)
@@ -984,6 +1041,11 @@
@@ -1002,6 +1059,11 @@
}
}

View File

@ -1,6 +1,6 @@
--- ../src-base/minecraft/net/minecraft/world/gen/ChunkProviderServer.java
+++ ../src-work/minecraft/net/minecraft/world/gen/ChunkProviderServer.java
@@ -23,7 +23,12 @@
@@ -24,7 +24,12 @@
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.EmptyChunk;
import net.minecraft.world.chunk.IChunkProvider;
@ -13,7 +13,7 @@
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
@@ -38,6 +43,7 @@
@@ -39,6 +44,7 @@
public LongHashMap field_73244_f = new LongHashMap();
public List field_73245_g = new ArrayList();
public WorldServer field_73251_h;
@ -21,7 +21,7 @@
private static final String __OBFID = "CL_00001436";
public ChunkProviderServer(WorldServer p_i1520_1_, IChunkLoader p_i1520_2_, IChunkProvider p_i1520_3_)
@@ -55,7 +61,7 @@
@@ -61,7 +67,7 @@
public void func_73241_b(int p_73241_1_, int p_73241_2_)
{
@ -30,7 +30,7 @@
{
ChunkCoordinates chunkcoordinates = this.field_73251_h.func_72861_E();
int k = p_73241_1_ * 16 + 8 - chunkcoordinates.field_71574_a;
@@ -86,13 +92,66 @@
@@ -92,13 +98,66 @@
public Chunk func_73158_c(int p_73158_1_, int p_73158_2_)
{
@ -98,7 +98,7 @@
if (chunk == null)
{
@@ -120,6 +179,7 @@
@@ -126,6 +185,7 @@
this.field_73244_f.func_76163_a(k, chunk);
this.field_73245_g.add(chunk);
@ -106,7 +106,7 @@
chunk.func_76631_c();
chunk.func_76624_a(this, this, p_73158_1_, p_73158_2_);
}
@@ -258,6 +318,11 @@
@@ -265,6 +325,11 @@
{
if (!this.field_73251_h.field_73058_d)
{
@ -118,15 +118,15 @@
for (int i = 0; i < 100; ++i)
{
if (!this.field_73248_b.isEmpty())
@@ -270,6 +335,11 @@
this.field_73248_b.remove(olong);
this.field_73244_f.func_76159_d(olong.longValue());
this.field_73245_g.remove(chunk);
+ ForgeChunkManager.putDormantChunk(ChunkCoordIntPair.func_77272_a(chunk.field_76635_g, chunk.field_76647_h), chunk);
+ if(field_73245_g.size() == 0 && ForgeChunkManager.getPersistentChunksFor(this.field_73251_h).size() == 0 && !DimensionManager.shouldLoadSpawn(this.field_73251_h.field_73011_w.field_76574_g)){
+ DimensionManager.unloadWorld(this.field_73251_h.field_73011_w.field_76574_g);
+ return field_73246_d.func_73156_b();
+ }
}
}
@@ -278,6 +343,11 @@
this.func_73242_b(chunk);
this.func_73243_a(chunk);
this.field_73245_g.remove(chunk);
+ ForgeChunkManager.putDormantChunk(ChunkCoordIntPair.func_77272_a(chunk.field_76635_g, chunk.field_76647_h), chunk);
+ if(field_73245_g.size() == 0 && ForgeChunkManager.getPersistentChunksFor(this.field_73251_h).size() == 0 && !DimensionManager.shouldLoadSpawn(this.field_73251_h.field_73011_w.field_76574_g)){
+ DimensionManager.unloadWorld(this.field_73251_h.field_73011_w.field_76574_g);
+ return field_73246_d.func_73156_b();
+ }
}
this.field_73248_b.remove(olong);

View File

@ -30,10 +30,20 @@
GenLayer genlayer1 = GenLayerZoom.func_75915_a(1000L, genlayerriverinit, 2);
GenLayerHills genlayerhills = new GenLayerHills(1000L, (GenLayer)object, genlayer1);
genlayer = GenLayerZoom.func_75915_a(1000L, genlayerriverinit, 2);
@@ -145,6 +143,22 @@
return j;
@@ -192,7 +190,7 @@
protected static boolean func_151618_b(int p_151618_0_)
{
- return p_151618_0_ == BiomeGenBase.field_76771_b.field_76756_M || p_151618_0_ == BiomeGenBase.field_150575_M.field_76756_M || p_151618_0_ == BiomeGenBase.field_76776_l.field_76756_M;
+ return BiomeManager.oceanBiomes.contains(BiomeGenBase.func_150568_d(p_151618_0_));
}
protected int func_151619_a(int ... p_151619_1_)
@@ -204,4 +202,27 @@
{
return p_151617_2_ == p_151617_3_ && p_151617_3_ == p_151617_4_ ? p_151617_2_ : (p_151617_1_ == p_151617_2_ && p_151617_1_ == p_151617_3_ ? p_151617_1_ : (p_151617_1_ == p_151617_2_ && p_151617_1_ == p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_3_ && p_151617_1_ == p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_2_ && p_151617_3_ != p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_3_ && p_151617_2_ != p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_4_ && p_151617_2_ != p_151617_3_ ? p_151617_1_ : (p_151617_2_ == p_151617_3_ && p_151617_1_ != p_151617_4_ ? p_151617_2_ : (p_151617_2_ == p_151617_4_ && p_151617_1_ != p_151617_3_ ? p_151617_2_ : (p_151617_3_ == p_151617_4_ && p_151617_1_ != p_151617_2_ ? p_151617_3_ : this.func_151619_a(new int[] {p_151617_1_, p_151617_2_, p_151617_3_, p_151617_4_}))))))))));
}
+
+ /* ======================================== FORGE START =====================================*/
+ protected long nextLong(long par1)
+ {
@ -48,24 +58,6 @@
+ this.field_75908_c += this.field_75907_b;
+ return j;
+ }
+ /* ========================================= FORGE END ======================================*/
+
public abstract int[] func_75904_a(int var1, int var2, int var3, int var4);
protected static boolean func_151616_a(final int p_151616_0_, final int p_151616_1_)
@@ -192,7 +206,7 @@
protected static boolean func_151618_b(int p_151618_0_)
{
- return p_151618_0_ == BiomeGenBase.field_76771_b.field_76756_M || p_151618_0_ == BiomeGenBase.field_150575_M.field_76756_M || p_151618_0_ == BiomeGenBase.field_76776_l.field_76756_M;
+ return BiomeManager.oceanBiomes.contains(BiomeGenBase.func_150568_d(p_151618_0_));
}
protected int func_151619_a(int ... p_151619_1_)
@@ -204,4 +218,11 @@
{
return p_151617_2_ == p_151617_3_ && p_151617_3_ == p_151617_4_ ? p_151617_2_ : (p_151617_1_ == p_151617_2_ && p_151617_1_ == p_151617_3_ ? p_151617_1_ : (p_151617_1_ == p_151617_2_ && p_151617_1_ == p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_3_ && p_151617_1_ == p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_2_ && p_151617_3_ != p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_3_ && p_151617_2_ != p_151617_4_ ? p_151617_1_ : (p_151617_1_ == p_151617_4_ && p_151617_2_ != p_151617_3_ ? p_151617_1_ : (p_151617_2_ == p_151617_3_ && p_151617_1_ != p_151617_4_ ? p_151617_2_ : (p_151617_2_ == p_151617_4_ && p_151617_1_ != p_151617_3_ ? p_151617_2_ : (p_151617_3_ == p_151617_4_ && p_151617_1_ != p_151617_2_ ? p_151617_3_ : this.func_151619_a(new int[] {p_151617_1_, p_151617_2_, p_151617_3_, p_151617_4_}))))))))));
}
+
+ public static byte getModdedBiomeSize(WorldType worldType, byte original)
+ {
@ -73,4 +65,5 @@
+ MinecraftForge.TERRAIN_GEN_BUS.post(event);
+ return event.newSize;
+ }
+ /* ========================================= FORGE END ======================================*/
}

View File

@ -8,7 +8,7 @@
}
catch (Exception exception)
{
@@ -270,6 +271,7 @@
@@ -284,6 +285,7 @@
p_75752_1_.func_70020_e(nbttagcompound);
}

View File

@ -88,7 +88,7 @@ public class GuiIngameForge extends GuiIngame
@Override
public void renderGameOverlay(float partialTicks, boolean hasScreen, int mouseX, int mouseY)
{
res = new ScaledResolution(mc.gameSettings, mc.displayWidth, mc.displayHeight);
res = new ScaledResolution(mc, mc.displayWidth, mc.displayHeight);
eventParent = new RenderGameOverlayEvent(partialTicks, res, mouseX, mouseY);
int width = res.getScaledWidth();
int height = res.getScaledHeight();

View File

@ -3,6 +3,7 @@ package net.minecraftforge.common.util;
import java.util.Iterator;
import java.util.Map;
import java.util.Map.Entry;
import java.util.UUID;
import com.google.common.collect.Maps;
import com.mojang.authlib.GameProfile;
@ -13,7 +14,7 @@ import net.minecraftforge.common.DimensionManager;
//To be expanded for generic Mod fake players?
public class FakePlayerFactory
{
private static GameProfile MINECRAFT = new GameProfile("41C82C87-7AfB-4024-BA57-13D2C99CAE77", "[Minecraft]");
private static GameProfile MINECRAFT = new GameProfile(UUID.fromString("41C82C87-7AfB-4024-BA57-13D2C99CAE77"), "[Minecraft]");
// Map of all active fake player usernames to their entities
private static Map<GameProfile, FakePlayer> fakePlayers = Maps.newHashMap();
private static FakePlayer MINECRAFT_PLAYER = null;

View File

@ -395,7 +395,7 @@ public abstract class BlockFluidBase extends Block implements IFluidBlock
public Vec3 getFlowVector(IBlockAccess world, int x, int y, int z)
{
Vec3 vec = world.getWorldVec3Pool().getVecFromPool(0.0D, 0.0D, 0.0D);
Vec3 vec = Vec3.createVectorHelper(0.0D, 0.0D, 0.0D);
int decay = quantaPerBlock - getQuantaValue(world, x, y, z);
for (int side = 0; side < 4; ++side)