Updated FML:

MinecraftForge/FML@155e846818 Add in support for mods/<mcversion> as a mod location. Also drop coremods as a location. They go in mods too now.
MinecraftForge/FML@3f4bf61ae6 Update key
MinecraftForge/FML@4545beb49d Add deobf-data to setup env.
MinecraftForge/FML@e24f949517 Fix eclipse workspaces and launch configurations.
MinecraftForge/FML@532bee7ce1 Update to new MCP bugfix version, Fixes: Missing Armor/Item rendering, and Boss health mapping issues.
This commit is contained in:
LexManos 2013-07-03 18:54:41 -07:00
parent f9236c4c98
commit 125b134d87
21 changed files with 52 additions and 178 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@
/mcp/
/eclipse/
/target/
/temp/

View File

@ -63,7 +63,7 @@ public class GuiControlsScrollPanel extends GuiSlot
}
@Override
protected void func_130003_c() {}
protected void drawBackground() {}
@Override
public void drawScreen(int mX, int mY, float f)

View File

@ -21,5 +21,5 @@ public class FakePlayer extends EntityPlayer
}
@Override
public void func_110122_a(ChatMessageComponent chatmessagecomponent){}
public void sendChatToPlayer(ChatMessageComponent chatmessagecomponent){}
}

2
fml

@ -1 +1 @@
Subproject commit ba3707af22376f8f18103f63db56e4614a9c37db
Subproject commit 532bee7ce1c4392ee11f0389d98f0c2be6240aa0

View File

@ -32,7 +32,7 @@
- this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, I18n.func_135053_a("gui.done")));
+ scrollPane = new GuiControlsScrollPanel(this, options, mc);
+ this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height - 28, I18n.func_135053_a("gui.done")));
+ scrollPane.func_110509_d(7, 8);
+ scrollPane.registerScrollButtons(7, 8);
this.screenTitle = I18n.func_135053_a("controls.title");
}

View File

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/client/gui/GuiSlot.java
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiSlot.java
@@ -325,16 +325,7 @@
@@ -331,16 +331,7 @@
GL11.glDisable(GL11.GL_LIGHTING);
GL11.glDisable(GL11.GL_FOG);
Tessellator tessellator = Tessellator.instance;
@ -18,7 +18,7 @@
j1 = this.width / 2 - 92 - 16;
k1 = this.top + 4 - (int)this.amountScrolled;
@@ -478,4 +469,18 @@
@@ -484,4 +475,18 @@
tessellator.addVertexWithUV(0.0D, (double)par1, 0.0D, 0.0D, (double)((float)par1 / f));
tessellator.draw();
}

View File

@ -24,13 +24,13 @@
GL11.glTranslatef(0.0F, 0.0F, 32.0F);
this.zLevel = 200.0F;
itemRenderer.zLevel = 200.0F;
- itemRenderer.func_110797_b(this.fontRenderer, this.mc.func_110434_K(), par1ItemStack, par2, par3);
- itemRenderer.func_110793_a(this.fontRenderer, this.mc.func_110434_K(), par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
- itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.func_110434_K(), par1ItemStack, par2, par3);
- itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.func_110434_K(), par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
+ FontRenderer font = null;
+ if (par1ItemStack != null) font = par1ItemStack.getItem().getFontRenderer(par1ItemStack);
+ if (font == null) font = fontRenderer;
+ itemRenderer.func_110797_b(font, this.mc.func_110434_K(), par1ItemStack, par2, par3);
+ itemRenderer.func_110793_a(font, this.mc.func_110434_K(), par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
+ itemRenderer.renderItemAndEffectIntoGUI(font, this.mc.func_110434_K(), par1ItemStack, par2, par3);
+ itemRenderer.renderItemOverlayIntoGUI(font, this.mc.func_110434_K(), par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
this.zLevel = 0.0F;
itemRenderer.zLevel = 0.0F;
}

View File

@ -196,8 +196,8 @@
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
- ItemStack itemstack = new ItemStack(par1CreativeTabs.getTabIconItem());
+ ItemStack itemstack = par1CreativeTabs.getIconItemStack();
itemRenderer.func_110797_b(this.fontRenderer, this.mc.func_110434_K(), itemstack, l, i1);
itemRenderer.func_110794_c(this.fontRenderer, this.mc.func_110434_K(), itemstack, l, i1);
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.func_110434_K(), itemstack, l, i1);
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.func_110434_K(), itemstack, l, i1);
GL11.glDisable(GL11.GL_LIGHTING);
@@ -912,6 +984,15 @@
{

View File

@ -75,7 +75,7 @@
-
- if (mapdata != null)
- {
- this.mapItemRenderer.func_111275_a(this.mc.thePlayer, this.mc.func_110434_K(), mapdata);
- this.mapItemRenderer.renderMap(this.mc.thePlayer, this.mc.func_110434_K(), mapdata);
+
+ IItemRenderer custom = MinecraftForgeClient.getItemRenderer(itemstack, FIRST_PERSON_MAP);
+ MapData mapdata = ((ItemMap)itemstack.getItem()).getMapData(itemstack, this.mc.theWorld);
@ -84,7 +84,7 @@
+ {
+ if (mapdata != null)
+ {
+ this.mapItemRenderer.func_111275_a(this.mc.thePlayer, this.mc.func_110434_K(), mapdata);
+ this.mapItemRenderer.renderMap(this.mc.thePlayer, this.mc.func_110434_K(), mapdata);
+ }
+ }
+ else

View File

@ -99,7 +99,7 @@
if (item instanceof ItemArmor)
{
- this.func_110776_a(func_110858_a((ItemArmor)item, par2, "overlay"));
+ this.func_110776_a(getArmorResource(par1EntityLiving, itemstack, par2, "overlay"));
+ this.func_110776_a(getArmorResource(par1, itemstack, par2, "overlay"));
float f1 = 1.0F;
GL11.glColor3f(f1, f1, f1);
}

View File

@ -124,7 +124,7 @@
{
this.func_110776_a(TextureMap.field_110575_b);
}
@@ -353,10 +338,10 @@
@@ -356,10 +341,10 @@
float f1;
float f2;
@ -137,7 +137,7 @@
GL11.glPushMatrix();
GL11.glTranslatef((float)(par4 - 2), (float)(par5 + 3), -3.0F + this.zLevel);
GL11.glScalef(10.0F, 10.0F, 10.0F);
@@ -383,11 +368,11 @@
@@ -386,11 +371,11 @@
else if (Item.itemsList[k].requiresMultipleRenderPasses())
{
GL11.glDisable(GL11.GL_LIGHTING);
@ -154,19 +154,19 @@
int k1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, j1);
f1 = (float)(k1 >> 16 & 255) / 255.0F;
f2 = (float)(k1 >> 8 & 255) / 255.0F;
@@ -435,7 +420,10 @@
@@ -441,7 +426,10 @@
{
if (par3ItemStack != null)
{
- this.func_110795_a(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5);
- this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5);
+ if (!ForgeHooksClient.renderInventoryItem(renderBlocks, par2TextureManager, par3ItemStack, renderWithColor, zLevel, (float)par4, (float)par5))
+ {
+ this.func_110795_a(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5);
+ this.renderItemIntoGUI(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5);
+ }
if (par3ItemStack.hasEffect())
{
@@ -573,4 +561,47 @@
@@ -583,4 +571,47 @@
{
this.doRenderItem((EntityItem)par1Entity, par2, par4, par6, par8, par9);
}

View File

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
@@ -224,12 +224,14 @@
@@ -223,12 +223,14 @@
if (par4EntityLivingBase.isPlayerSleeping())
{

View File

@ -17,7 +17,7 @@
@SideOnly(Side.CLIENT)
public class RenderPlayer extends RendererLivingEntity
@@ -43,6 +52,13 @@
@@ -46,6 +55,13 @@
{
ItemStack itemstack = par1AbstractClientPlayer.inventory.armorItemInSlot(3 - par2);
@ -31,7 +31,7 @@
if (itemstack != null)
{
Item item = itemstack.getItem();
@@ -50,7 +66,7 @@
@@ -53,7 +69,7 @@
if (item instanceof ItemArmor)
{
ItemArmor itemarmor = (ItemArmor)item;
@ -40,7 +40,7 @@
ModelBiped modelbiped = par2 == 2 ? this.modelArmor : this.modelArmorChestplate;
modelbiped.bipedHead.showModel = par2 == 0;
modelbiped.bipedHeadwear.showModel = par2 == 0;
@@ -59,15 +75,17 @@
@@ -62,15 +78,17 @@
modelbiped.bipedLeftArm.showModel = par2 == 1;
modelbiped.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
modelbiped.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
@ -61,34 +61,34 @@
float f2 = (float)(j >> 16 & 255) / 255.0F;
float f3 = (float)(j >> 8 & 255) / 255.0F;
float f4 = (float)(j & 255) / 255.0F;
@@ -105,7 +123,7 @@
@@ -108,7 +126,7 @@
if (item instanceof ItemArmor)
{
- this.func_110776_a(RenderBiped.func_110858_a((ItemArmor)item, par2, "overlay"));
+ this.func_110776_a(RenderBiped.getArmorResource(par1AbstractClientPlayer, itemstack, par2, "overlay"));
+ this.func_110776_a(RenderBiped.getArmorResource(par1, itemstack, par2, "overlay"));
float f1 = 1.0F;
GL11.glColor3f(f1, f1, f1);
}
@@ -114,6 +132,7 @@
@@ -117,6 +135,7 @@
public void func_110819_a(AbstractClientPlayer par1AbstractClientPlayer, double par2, double par4, double par6, float par8, float par9)
public void renderPlayer(AbstractClientPlayer par1, double par2, double par4, double par6, float par8, float par9)
{
+ if (MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Pre(par1AbstractClientPlayer, this))) return;
+ if (MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Pre(par1, this))) return;
float f2 = 1.0F;
GL11.glColor3f(f2, f2, f2);
ItemStack itemstack = par1AbstractClientPlayer.inventory.getCurrentItem();
@@ -145,6 +164,7 @@
ItemStack itemstack = par1.inventory.getCurrentItem();
@@ -148,6 +167,7 @@
this.modelArmorChestplate.aimedBow = this.modelArmor.aimedBow = this.modelBipedMain.aimedBow = false;
this.modelArmorChestplate.isSneak = this.modelArmor.isSneak = this.modelBipedMain.isSneak = false;
this.modelArmorChestplate.heldItemRight = this.modelArmor.heldItemRight = this.modelBipedMain.heldItemRight = 0;
+ MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Post(par1AbstractClientPlayer, this));
+ MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Post(par1, this));
}
protected ResourceLocation func_110817_a(AbstractClientPlayer par1AbstractClientPlayer)
@@ -154,21 +174,30 @@
protected void func_110820_a(AbstractClientPlayer par1AbstractClientPlayer, float par2)
@@ -160,21 +180,30 @@
*/
protected void renderSpecials(AbstractClientPlayer par1AbstractClientPlayer, float par2)
{
+ RenderPlayerEvent.Specials.Pre event = new RenderPlayerEvent.Specials.Pre(par1AbstractClientPlayer, this, par2);
+ if (MinecraftForge.EVENT_BUS.post(event))
@ -121,7 +121,7 @@
{
f2 = 0.625F;
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
@@ -220,6 +249,7 @@
@@ -226,6 +255,7 @@
boolean flag = par1AbstractClientPlayer.func_110310_o().func_110557_a();
boolean flag1 = !par1AbstractClientPlayer.isInvisible();
boolean flag2 = !par1AbstractClientPlayer.getHideCape();
@ -129,7 +129,7 @@
float f6;
if (flag && flag1 && flag2)
@@ -271,7 +301,7 @@
@@ -277,7 +307,7 @@
ItemStack itemstack1 = par1AbstractClientPlayer.inventory.getCurrentItem();
@ -138,7 +138,7 @@
{
GL11.glPushMatrix();
this.modelBipedMain.bipedRightArm.postRender(0.0625F);
@@ -291,7 +321,11 @@
@@ -297,7 +327,11 @@
float f11;
@ -151,7 +151,7 @@
{
f11 = 0.5F;
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
@@ -348,7 +382,7 @@
@@ -354,7 +388,7 @@
if (itemstack1.getItem().requiresMultipleRenderPasses())
{
@ -160,7 +160,7 @@
{
int k = itemstack1.getItem().getColorFromItemStack(itemstack1, j);
f13 = (float)(k >> 16 & 255) / 255.0F;
@@ -370,6 +404,7 @@
@@ -376,6 +410,7 @@
GL11.glPopMatrix();
}

View File

@ -20,9 +20,9 @@
public RendererLivingEntity(ModelBase par1ModelBase, float par2)
{
@@ -439,12 +445,13 @@
protected void func_130008_a(EntityLivingBase par1EntityLivingBase, double par2, double par4, double par6)
@@ -442,12 +448,13 @@
*/
protected void passSpecialRender(EntityLivingBase par1EntityLivingBase, double par2, double par4, double par6)
{
+ if (MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Specials.Pre(par1EntityLivingBase, this))) return;
if (this.func_110813_b(par1EntityLivingBase))
@ -35,7 +35,7 @@
if (d3 < (double)(f2 * f2))
{
@@ -488,6 +495,7 @@
@@ -491,6 +498,7 @@
}
}
}

View File

@ -1,6 +1,6 @@
--- ../src_base/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
@@ -184,7 +184,7 @@
@@ -186,7 +186,7 @@
if (flag4 ^ flag5)
{

View File

@ -1,11 +0,0 @@
--- ../src_base/minecraft/net/minecraft/entity/boss/BossStatus.java
+++ ../src_work/minecraft/net/minecraft/entity/boss/BossStatus.java
@@ -13,7 +13,7 @@
public static void func_82824_a(IBossDisplayData par0IBossDisplayData, boolean par1)
{
- healthScale = par0IBossDisplayData.func_110183_aJ() / par0IBossDisplayData.getMaxHealth();
+ healthScale = par0IBossDisplayData.func_110143_aJ() / par0IBossDisplayData.func_110138_aP();
statusBarLength = 100;
bossName = par0IBossDisplayData.getEntityName();
field_82825_d = par1;

View File

@ -1,45 +1,5 @@
--- ../src_base/minecraft/net/minecraft/entity/boss/EntityDragon.java
+++ ../src_work/minecraft/net/minecraft/entity/boss/EntityDragon.java
@@ -75,7 +75,7 @@
{
super(par1World);
this.dragonPartArray = new EntityDragonPart[] {this.dragonPartHead = new EntityDragonPart(this, "head", 6.0F, 6.0F), this.dragonPartBody = new EntityDragonPart(this, "body", 8.0F, 8.0F), this.dragonPartTail1 = new EntityDragonPart(this, "tail", 4.0F, 4.0F), this.dragonPartTail2 = new EntityDragonPart(this, "tail", 4.0F, 4.0F), this.dragonPartTail3 = new EntityDragonPart(this, "tail", 4.0F, 4.0F), this.dragonPartWing1 = new EntityDragonPart(this, "wing", 4.0F, 4.0F), this.dragonPartWing2 = new EntityDragonPart(this, "wing", 4.0F, 4.0F)};
- this.setEntityHealth(this.getMaxHealth());
+ this.setEntityHealth(this.func_110138_aP());
this.setSize(16.0F, 8.0F);
this.noClip = true;
this.isImmuneToFire = true;
@@ -100,7 +100,7 @@
*/
public double[] getMovementOffsets(int par1, float par2)
{
- if (this.func_110183_aJ() <= 0.0F)
+ if (this.func_110143_aJ() <= 0.0F)
{
par2 = 0.0F;
}
@@ -142,7 +142,7 @@
this.prevAnimTime = this.animTime;
float f2;
- if (this.func_110183_aJ() <= 0.0F)
+ if (this.func_110143_aJ() <= 0.0F)
{
f = (this.rand.nextFloat() - 0.5F) * 8.0F;
f1 = (this.rand.nextFloat() - 0.5F) * 4.0F;
@@ -396,9 +396,9 @@
this.healingEnderCrystal = null;
}
- else if (this.ticksExisted % 10 == 0 && this.func_110183_aJ() < this.getMaxHealth())
- {
- this.setEntityHealth(this.func_110183_aJ() + 1.0F);
+ else if (this.ticksExisted % 10 == 0 && this.func_110143_aJ() < this.func_110138_aP())
+ {
+ this.setEntityHealth(this.func_110143_aJ() + 1.0F);
}
}
@@ -527,10 +527,11 @@
for (int i2 = k; i2 <= j1; ++i2)
{
@ -55,20 +15,3 @@
{
flag1 = this.worldObj.setBlockToAir(k1, l1, i2) || flag1;
}
@@ -753,16 +754,4 @@
{
return 5.0F;
}
-
- @Override
- public float getMaxHealth()
- {
- return 0.0f;
- }
-
- @Override
- public float func_110183_aJ()
- {
- return 0.0f;
- }
}

View File

@ -1,46 +0,0 @@
--- ../src_base/minecraft/net/minecraft/entity/boss/EntityWither.java
+++ ../src_work/minecraft/net/minecraft/entity/boss/EntityWither.java
@@ -45,7 +45,7 @@
public EntityWither(World par1World)
{
super(par1World);
- this.setEntityHealth(this.getMaxHealth());
+ this.setEntityHealth(this.func_110138_aP());
this.setSize(0.9F, 4.0F);
this.isImmuneToFire = true;
this.getNavigator().setCanSwim(true);
@@ -380,7 +380,7 @@
public void func_82206_m()
{
this.func_82215_s(220);
- this.setEntityHealth(this.getMaxHealth() / 3.0F);
+ this.setEntityHealth(this.func_110138_aP() / 3.0F);
}
/**
@@ -633,7 +633,7 @@
*/
public boolean isArmored()
{
- return this.func_110183_aJ() <= this.getMaxHealth() / 2.0F;
+ return this.func_110143_aJ() <= this.func_110138_aP() / 2.0F;
}
/**
@@ -651,16 +651,4 @@
{
this.ridingEntity = null;
}
-
- @Override
- public float getMaxHealth()
- {
- return 0.0f;
- }
-
- @Override
- public float func_110183_aJ()
- {
- return 0.0f;
- }
}

View File

@ -1,14 +0,0 @@
--- ../src_base/minecraft/net/minecraft/entity/boss/IBossDisplayData.java
+++ ../src_work/minecraft/net/minecraft/entity/boss/IBossDisplayData.java
@@ -2,9 +2,9 @@
public interface IBossDisplayData
{
- float getMaxHealth();
+ float func_110138_aP();
- float func_110183_aJ();
+ float func_110143_aJ();
/**
* Gets the username of the entity.

View File

@ -53,12 +53,12 @@
}
}
}
@@ -375,11 +377,24 @@
@@ -375,11 +377,25 @@
*/
public void onDeath(DamageSource par1DamageSource)
{
+ if (ForgeHooks.onLivingDeath(this, par1DamageSource)) return;
this.mcServer.getConfigurationManager().func_110460_a(this.func_110142_aN().func_111182_b());
this.mcServer.getConfigurationManager().sendChatMsg(this.func_110142_aN().func_94546_b());
if (!this.worldObj.getGameRules().getGameRuleBooleanValue("keepInventory"))
{
@ -66,6 +66,7 @@
+ capturedDrops.clear();
+
this.inventory.dropAllItems();
+
+ captureDrops = false;
+ PlayerDropsEvent event = new PlayerDropsEvent(this, par1DamageSource, capturedDrops, recentlyHit > 0);
+ if (!MinecraftForge.EVENT_BUS.post(event))

View File

@ -35,8 +35,8 @@ def main(options, args):
print('Could not extract start and end range')
sys.exit(1)
print('Start: %s' % start)
print('End: %s' % end)
#print('Start: %s' % start)
#print('End: %s' % end)
output = run_command(['git', 'log', '--reverse', '--pretty=oneline', '%s...%s' % (start, end)], './fml')
print('Updated FML:')