commit
895580de42
147 changed files with 1787 additions and 2445 deletions
|
@ -19,8 +19,8 @@ import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLiving;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.client.texturepacks.ITexturePack;
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemBlock;
|
import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -28,47 +28,33 @@ import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.client.model.ModelBiped;
|
import net.minecraft.client.model.ModelBiped;
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.client.renderer.RenderBlocks;
|
||||||
import net.minecraft.client.renderer.RenderEngine;
|
|
||||||
import net.minecraft.client.renderer.RenderGlobal;
|
import net.minecraft.client.renderer.RenderGlobal;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
import net.minecraft.client.renderer.entity.RenderItem;
|
import net.minecraft.client.renderer.entity.RenderItem;
|
||||||
|
import net.minecraft.client.renderer.texture.TextureManager;
|
||||||
import net.minecraft.client.renderer.texture.TextureMap;
|
import net.minecraft.client.renderer.texture.TextureMap;
|
||||||
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
|
import net.minecraftforge.client.IItemRenderer.ItemRenderType;
|
||||||
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
||||||
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
import net.minecraftforge.client.event.RenderWorldLastEvent;
|
||||||
import net.minecraftforge.client.event.TextureLoadEvent;
|
|
||||||
import net.minecraftforge.client.event.TextureStitchEvent;
|
import net.minecraftforge.client.event.TextureStitchEvent;
|
||||||
import net.minecraftforge.common.IArmorTextureProvider;
|
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import static net.minecraftforge.client.IItemRenderer.ItemRenderType.*;
|
import static net.minecraftforge.client.IItemRenderer.ItemRenderType.*;
|
||||||
import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*;
|
import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.*;
|
||||||
|
|
||||||
public class ForgeHooksClient
|
public class ForgeHooksClient
|
||||||
{
|
{
|
||||||
static RenderEngine engine()
|
static TextureManager engine()
|
||||||
{
|
{
|
||||||
return FMLClientHandler.instance().getClient().renderEngine;
|
return FMLClientHandler.instance().getClient().renderEngine;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated //Deprecated in 1.5.1, move to the more detailed one below.
|
public static String getArmorTexture(Entity entity, ItemStack armor, String _default, int slot, int layer, String type)
|
||||||
@SuppressWarnings("deprecation")
|
|
||||||
public static String getArmorTexture(ItemStack armor, String _default)
|
|
||||||
{
|
|
||||||
String result = null;
|
|
||||||
if (armor.getItem() instanceof IArmorTextureProvider)
|
|
||||||
{
|
|
||||||
result = ((IArmorTextureProvider)armor.getItem()).getArmorTextureFile(armor);
|
|
||||||
}
|
|
||||||
return result != null ? result : _default;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String getArmorTexture(Entity entity, ItemStack armor, String _default, int slot, int layer)
|
|
||||||
{
|
{
|
||||||
String result = armor.getItem().getArmorTexture(armor, entity, slot, layer);
|
String result = armor.getItem().getArmorTexture(armor, entity, slot, layer);
|
||||||
return result != null ? result : _default;
|
return result != null ? result : _default;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean renderEntityItem(EntityItem entity, ItemStack item, float bobing, float rotation, Random random, RenderEngine engine, RenderBlocks renderBlocks)
|
public static boolean renderEntityItem(EntityItem entity, ItemStack item, float bobing, float rotation, Random random, TextureManager engine, RenderBlocks renderBlocks)
|
||||||
{
|
{
|
||||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(item, ENTITY);
|
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(item, ENTITY);
|
||||||
if (customRenderer == null)
|
if (customRenderer == null)
|
||||||
|
@ -86,7 +72,7 @@ public class ForgeHooksClient
|
||||||
}
|
}
|
||||||
boolean is3D = customRenderer.shouldUseRenderHelper(ENTITY, item, BLOCK_3D);
|
boolean is3D = customRenderer.shouldUseRenderHelper(ENTITY, item, BLOCK_3D);
|
||||||
|
|
||||||
engine.bindTexture(item.getItemSpriteNumber() == 0 ? "/terrain.png" : "/gui/items.png");
|
engine.func_110577_a(item.getItemSpriteNumber() == 0 ? TextureMap.field_110575_b : TextureMap.field_110576_c);
|
||||||
Block block = (item.itemID < Block.blocksList.length ? Block.blocksList[item.itemID] : null);
|
Block block = (item.itemID < Block.blocksList.length ? Block.blocksList[item.itemID] : null);
|
||||||
if (is3D || (block != null && RenderBlocks.renderItemIn3d(block.getRenderType())))
|
if (is3D || (block != null && RenderBlocks.renderItemIn3d(block.getRenderType())))
|
||||||
{
|
{
|
||||||
|
@ -127,7 +113,7 @@ public class ForgeHooksClient
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean renderInventoryItem(RenderBlocks renderBlocks, RenderEngine engine, ItemStack item, boolean inColor, float zLevel, float x, float y)
|
public static boolean renderInventoryItem(RenderBlocks renderBlocks, TextureManager engine, ItemStack item, boolean inColor, float zLevel, float x, float y)
|
||||||
{
|
{
|
||||||
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(item, INVENTORY);
|
IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(item, INVENTORY);
|
||||||
if (customRenderer == null)
|
if (customRenderer == null)
|
||||||
|
@ -135,7 +121,7 @@ public class ForgeHooksClient
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
engine.bindTexture(item.getItemSpriteNumber() == 0 ? "/terrain.png" : "/gui/items.png");
|
engine.func_110577_a(item.getItemSpriteNumber() == 0 ? TextureMap.field_110575_b : TextureMap.field_110576_c);
|
||||||
if (customRenderer.shouldUseRenderHelper(INVENTORY, item, INVENTORY_BLOCK))
|
if (customRenderer.shouldUseRenderHelper(INVENTORY, item, INVENTORY_BLOCK))
|
||||||
{
|
{
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
|
@ -183,13 +169,7 @@ public class ForgeHooksClient
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Deprecated
|
public static void renderEquippedItem(ItemRenderType type, IItemRenderer customRenderer, RenderBlocks renderBlocks, EntityLivingBase entity, ItemStack item)
|
||||||
public static void renderEquippedItem(IItemRenderer customRenderer, RenderBlocks renderBlocks, EntityLiving entity, ItemStack item)
|
|
||||||
{
|
|
||||||
renderEquippedItem(ItemRenderType.EQUIPPED, customRenderer, renderBlocks, entity, item);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void renderEquippedItem(ItemRenderType type, IItemRenderer customRenderer, RenderBlocks renderBlocks, EntityLiving entity, ItemStack item)
|
|
||||||
{
|
{
|
||||||
if (customRenderer.shouldUseRenderHelper(type, item, EQUIPPED_BLOCK))
|
if (customRenderer.shouldUseRenderHelper(type, item, EQUIPPED_BLOCK))
|
||||||
{
|
{
|
||||||
|
@ -216,7 +196,7 @@ public class ForgeHooksClient
|
||||||
//Optifine Helper Functions u.u, these are here specifically for Optifine
|
//Optifine Helper Functions u.u, these are here specifically for Optifine
|
||||||
//Note: When using Optfine, these methods are invoked using reflection, which
|
//Note: When using Optfine, these methods are invoked using reflection, which
|
||||||
//incurs a major performance penalty.
|
//incurs a major performance penalty.
|
||||||
public static void orientBedCamera(Minecraft mc, EntityLiving entity)
|
public static void orientBedCamera(Minecraft mc, EntityLivingBase entity)
|
||||||
{
|
{
|
||||||
int x = MathHelper.floor_double(entity.posX);
|
int x = MathHelper.floor_double(entity.posX);
|
||||||
int y = MathHelper.floor_double(entity.posY);
|
int y = MathHelper.floor_double(entity.posY);
|
||||||
|
@ -240,11 +220,6 @@ public class ForgeHooksClient
|
||||||
MinecraftForge.EVENT_BUS.post(new RenderWorldLastEvent(context, partialTicks));
|
MinecraftForge.EVENT_BUS.post(new RenderWorldLastEvent(context, partialTicks));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void onTextureLoad(String texture, ITexturePack pack)
|
|
||||||
{
|
|
||||||
MinecraftForge.EVENT_BUS.post(new TextureLoadEvent(texture, pack));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void onTextureStitchedPre(TextureMap map)
|
public static void onTextureStitchedPre(TextureMap map)
|
||||||
{
|
{
|
||||||
MinecraftForge.EVENT_BUS.post(new TextureStitchEvent.Pre(map));
|
MinecraftForge.EVENT_BUS.post(new TextureStitchEvent.Pre(map));
|
||||||
|
@ -285,7 +260,7 @@ public class ForgeHooksClient
|
||||||
renderPass = pass;
|
renderPass = pass;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static ModelBiped getArmorModel(EntityLiving entityLiving, ItemStack itemStack, int slotID, ModelBiped _default)
|
public static ModelBiped getArmorModel(EntityLivingBase entityLiving, ItemStack itemStack, int slotID, ModelBiped _default)
|
||||||
{
|
{
|
||||||
ModelBiped modelbiped = itemStack.getItem().getArmorModel(entityLiving, itemStack, slotID);
|
ModelBiped modelbiped = itemStack.getItem().getArmorModel(entityLiving, itemStack, slotID);
|
||||||
return modelbiped == null ? _default : modelbiped;
|
return modelbiped == null ? _default : modelbiped;
|
||||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.client.gui.GuiControls;
|
||||||
import net.minecraft.client.gui.GuiSlot;
|
import net.minecraft.client.gui.GuiSlot;
|
||||||
import net.minecraft.client.settings.KeyBinding;
|
import net.minecraft.client.settings.KeyBinding;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.Tessellator;
|
||||||
|
import net.minecraft.client.renderer.texture.TextureMap;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
|
||||||
public class GuiControlsScrollPanel extends GuiSlot
|
public class GuiControlsScrollPanel extends GuiSlot
|
||||||
|
@ -60,7 +61,7 @@ public class GuiControlsScrollPanel extends GuiSlot
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void drawBackground() {}
|
protected void func_130003_c() {}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void drawScreen(int mX, int mY, float f)
|
public void drawScreen(int mX, int mY, float f)
|
||||||
|
@ -91,7 +92,7 @@ public class GuiControlsScrollPanel extends GuiSlot
|
||||||
boolean flag = _mouseX >= xPosition && _mouseY >= yPosition && _mouseX < xPosition + width && _mouseY < yPosition + height;
|
boolean flag = _mouseX >= xPosition && _mouseY >= yPosition && _mouseX < xPosition + width && _mouseY < yPosition + height;
|
||||||
int k = (flag ? 2 : 1);
|
int k = (flag ? 2 : 1);
|
||||||
|
|
||||||
mc.renderEngine.bindTexture("/gui/gui.png");
|
mc.renderEngine.func_110577_a(TextureMap.field_110576_c);
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
controls.drawTexturedModalRect(xPosition, yPosition, 0, 46 + k * 20, width / 2, height);
|
controls.drawTexturedModalRect(xPosition, yPosition, 0, 46 + k * 20, width / 2, height);
|
||||||
controls.drawTexturedModalRect(xPosition + width / 2, yPosition, 200 - width / 2, 46 + k * 20, width / 2, height);
|
controls.drawTexturedModalRect(xPosition + width / 2, yPosition, 200 - width / 2, 46 + k * 20, width / 2, height);
|
||||||
|
|
|
@ -1,42 +1,37 @@
|
||||||
package net.minecraftforge.client;
|
package net.minecraftforge.client;
|
||||||
|
|
||||||
|
import static net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.*;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Random;
|
|
||||||
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
import org.lwjgl.opengl.GL12;
|
|
||||||
|
|
||||||
import cpw.mods.fml.common.FMLCommonHandler;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
import net.minecraft.client.gui.FontRenderer;
|
import net.minecraft.client.gui.FontRenderer;
|
||||||
|
import net.minecraft.client.gui.Gui;
|
||||||
import net.minecraft.client.gui.GuiIngame;
|
import net.minecraft.client.gui.GuiIngame;
|
||||||
import net.minecraft.client.gui.GuiNewChat;
|
|
||||||
import net.minecraft.client.gui.GuiPlayerInfo;
|
import net.minecraft.client.gui.GuiPlayerInfo;
|
||||||
import net.minecraft.client.gui.ScaledResolution;
|
import net.minecraft.client.gui.ScaledResolution;
|
||||||
import net.minecraft.client.multiplayer.NetClientHandler;
|
import net.minecraft.client.multiplayer.NetClientHandler;
|
||||||
import net.minecraft.client.renderer.RenderHelper;
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.renderer.texture.TextureMap;
|
||||||
import net.minecraft.client.renderer.entity.RenderItem;
|
import net.minecraft.client.resources.ResourceLocation;
|
||||||
import net.minecraft.crash.CallableMinecraftVersion;
|
import net.minecraft.crash.CallableMinecraftVersion;
|
||||||
import net.minecraft.entity.boss.BossStatus;
|
import net.minecraft.entity.Entity;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
import net.minecraft.entity.SharedMonsterAttributes;
|
||||||
|
import net.minecraft.entity.ai.attributes.AttributeInstance;
|
||||||
import net.minecraft.entity.player.InventoryPlayer;
|
import net.minecraft.entity.player.InventoryPlayer;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.potion.Potion;
|
import net.minecraft.potion.Potion;
|
||||||
import net.minecraft.scoreboard.Score;
|
import net.minecraft.scoreboard.Score;
|
||||||
import net.minecraft.scoreboard.ScoreObjective;
|
import net.minecraft.scoreboard.ScoreObjective;
|
||||||
import net.minecraft.scoreboard.ScorePlayerTeam;
|
import net.minecraft.scoreboard.ScorePlayerTeam;
|
||||||
import net.minecraft.scoreboard.Scoreboard;
|
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.util.FoodStats;
|
import net.minecraft.util.FoodStats;
|
||||||
import net.minecraft.util.Icon;
|
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.StatCollector;
|
import net.minecraft.util.StatCollector;
|
||||||
import net.minecraft.util.StringUtils;
|
import net.minecraft.util.StringUtils;
|
||||||
|
@ -46,10 +41,18 @@ import net.minecraftforge.client.event.RenderGameOverlayEvent;
|
||||||
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
import net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType;
|
||||||
import net.minecraftforge.common.ForgeHooks;
|
import net.minecraftforge.common.ForgeHooks;
|
||||||
import net.minecraftforge.common.MinecraftForge;
|
import net.minecraftforge.common.MinecraftForge;
|
||||||
import static net.minecraftforge.client.event.RenderGameOverlayEvent.ElementType.*;
|
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
|
import cpw.mods.fml.common.FMLCommonHandler;
|
||||||
|
|
||||||
public class GuiIngameForge extends GuiIngame
|
public class GuiIngameForge extends GuiIngame
|
||||||
{
|
{
|
||||||
|
private static final ResourceLocation VIGNETTE = new ResourceLocation("textures/misc/vignette.png");
|
||||||
|
private static final ResourceLocation WIDGITS = new ResourceLocation("textures/gui/widgets.png");
|
||||||
|
private static final ResourceLocation PUMPKIN_BLUR = new ResourceLocation("textures/misc/pumpkinblur.png");
|
||||||
|
|
||||||
private static final int WHITE = 0xFFFFFF;
|
private static final int WHITE = 0xFFFFFF;
|
||||||
|
|
||||||
//Flags to toggle the rendering of certain aspects of the HUD, valid conditions
|
//Flags to toggle the rendering of certain aspects of the HUD, valid conditions
|
||||||
|
@ -63,10 +66,15 @@ public class GuiIngameForge extends GuiIngame
|
||||||
public static boolean renderHealth = true;
|
public static boolean renderHealth = true;
|
||||||
public static boolean renderArmor = true;
|
public static boolean renderArmor = true;
|
||||||
public static boolean renderFood = true;
|
public static boolean renderFood = true;
|
||||||
|
public static boolean renderHealthMount = true;
|
||||||
public static boolean renderAir = true;
|
public static boolean renderAir = true;
|
||||||
public static boolean renderExperiance = true;
|
public static boolean renderExperiance = true;
|
||||||
|
public static boolean renderJumpBar = true;
|
||||||
public static boolean renderObjective = true;
|
public static boolean renderObjective = true;
|
||||||
|
|
||||||
|
public static int left_height = 39;
|
||||||
|
public static int right_height = 39;
|
||||||
|
|
||||||
private ScaledResolution res = null;
|
private ScaledResolution res = null;
|
||||||
private FontRenderer fontrenderer = null;
|
private FontRenderer fontrenderer = null;
|
||||||
private RenderGameOverlayEvent eventParent;
|
private RenderGameOverlayEvent eventParent;
|
||||||
|
@ -84,6 +92,12 @@ public class GuiIngameForge extends GuiIngame
|
||||||
eventParent = new RenderGameOverlayEvent(partialTicks, res, mouseX, mouseY);
|
eventParent = new RenderGameOverlayEvent(partialTicks, res, mouseX, mouseY);
|
||||||
int width = res.getScaledWidth();
|
int width = res.getScaledWidth();
|
||||||
int height = res.getScaledHeight();
|
int height = res.getScaledHeight();
|
||||||
|
renderHealthMount = mc.thePlayer.ridingEntity instanceof EntityLivingBase;
|
||||||
|
renderFood = mc.thePlayer.ridingEntity == null;
|
||||||
|
renderJumpBar = mc.thePlayer.func_110317_t();
|
||||||
|
|
||||||
|
right_height = 39;
|
||||||
|
left_height = 39;
|
||||||
|
|
||||||
if (pre(ALL)) return;
|
if (pre(ALL)) return;
|
||||||
|
|
||||||
|
@ -112,22 +126,30 @@ public class GuiIngameForge extends GuiIngame
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
zLevel = -90.0F;
|
zLevel = -90.0F;
|
||||||
rand.setSeed((long)(updateCounter * 312871));
|
rand.setSeed((long)(updateCounter * 312871));
|
||||||
mc.renderEngine.bindTexture("/gui/icons.png");
|
|
||||||
|
|
||||||
if (renderCrosshairs) renderCrosshairs(width, height);
|
if (renderCrosshairs) renderCrosshairs(width, height);
|
||||||
if (renderBossHealth) renderBossHealth();
|
if (renderBossHealth) renderBossHealth();
|
||||||
|
|
||||||
if (this.mc.playerController.shouldDrawHUD())
|
if (this.mc.playerController.shouldDrawHUD())
|
||||||
{
|
{
|
||||||
if (renderArmor) renderArmor(width, height);
|
|
||||||
if (renderHealth) renderHealth(width, height);
|
if (renderHealth) renderHealth(width, height);
|
||||||
|
if (renderArmor) renderArmor(width, height);
|
||||||
if (renderFood) renderFood(width, height);
|
if (renderFood) renderFood(width, height);
|
||||||
|
if (renderHealthMount) renderHealthMount(width, height);
|
||||||
if (renderAir) renderAir(width, height);
|
if (renderAir) renderAir(width, height);
|
||||||
}
|
}
|
||||||
if (renderHotbar) renderHotbar(width, height, partialTicks);
|
if (renderHotbar) renderHotbar(width, height, partialTicks);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (renderExperiance) renderExperience(width, height);
|
if (renderJumpBar)
|
||||||
|
{
|
||||||
|
renderJumpBar(width, height);
|
||||||
|
}
|
||||||
|
else if (renderExperiance)
|
||||||
|
{
|
||||||
|
renderExperience(width, height);
|
||||||
|
}
|
||||||
|
|
||||||
renderSleepFade(width, height);
|
renderSleepFade(width, height);
|
||||||
renderToolHightlight(width, height);
|
renderToolHightlight(width, height);
|
||||||
renderHUDText(width, height);
|
renderHUDText(width, height);
|
||||||
|
@ -167,7 +189,7 @@ public class GuiIngameForge extends GuiIngame
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
mc.renderEngine.bindTexture("/gui/gui.png");
|
mc.renderEngine.func_110577_a(WIDGITS);
|
||||||
|
|
||||||
InventoryPlayer inv = mc.thePlayer.inventory;
|
InventoryPlayer inv = mc.thePlayer.inventory;
|
||||||
drawTexturedModalRect(width / 2 - 91, height - 22, 0, 0, 182, 22);
|
drawTexturedModalRect(width / 2 - 91, height - 22, 0, 0, 182, 22);
|
||||||
|
@ -193,6 +215,7 @@ public class GuiIngameForge extends GuiIngame
|
||||||
protected void renderCrosshairs(int width, int height)
|
protected void renderCrosshairs(int width, int height)
|
||||||
{
|
{
|
||||||
if (pre(CROSSHAIRS)) return;
|
if (pre(CROSSHAIRS)) return;
|
||||||
|
bind(Gui.field_110324_m);
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
GL11.glBlendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR);
|
GL11.glBlendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR);
|
||||||
drawTexturedModalRect(width / 2 - 7, height / 2 - 7, 0, 0, 16, 16);
|
drawTexturedModalRect(width / 2 - 7, height / 2 - 7, 0, 0, 16, 16);
|
||||||
|
@ -237,7 +260,7 @@ public class GuiIngameForge extends GuiIngame
|
||||||
mc.mcProfiler.startSection("armor");
|
mc.mcProfiler.startSection("armor");
|
||||||
|
|
||||||
int left = width / 2 - 91;
|
int left = width / 2 - 91;
|
||||||
int top = height - 49;
|
int top = height - left_height;
|
||||||
|
|
||||||
int level = ForgeHooks.getTotalArmorValue(mc.thePlayer);
|
int level = ForgeHooks.getTotalArmorValue(mc.thePlayer);
|
||||||
for (int i = 1; level > 0 && i < 20; i += 2)
|
for (int i = 1; level > 0 && i < 20; i += 2)
|
||||||
|
@ -256,6 +279,7 @@ public class GuiIngameForge extends GuiIngame
|
||||||
}
|
}
|
||||||
left += 8;
|
left += 8;
|
||||||
}
|
}
|
||||||
|
left_height += 10;
|
||||||
|
|
||||||
mc.mcProfiler.endSection();
|
mc.mcProfiler.endSection();
|
||||||
post(ARMOR);
|
post(ARMOR);
|
||||||
|
@ -269,7 +293,7 @@ public class GuiIngameForge extends GuiIngame
|
||||||
|
|
||||||
if (f1 > 0.0F)
|
if (f1 > 0.0F)
|
||||||
{
|
{
|
||||||
renderPortalOverlay(f1, width, height);
|
func_130015_b(f1, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
post(PORTAL);
|
post(PORTAL);
|
||||||
|
@ -280,7 +304,7 @@ public class GuiIngameForge extends GuiIngame
|
||||||
if (pre(AIR)) return;
|
if (pre(AIR)) return;
|
||||||
mc.mcProfiler.startSection("air");
|
mc.mcProfiler.startSection("air");
|
||||||
int left = width / 2 + 91;
|
int left = width / 2 + 91;
|
||||||
int top = height - 49;
|
int top = height - right_height;
|
||||||
|
|
||||||
if (mc.thePlayer.isInsideOfMaterial(Material.water))
|
if (mc.thePlayer.isInsideOfMaterial(Material.water))
|
||||||
{
|
{
|
||||||
|
@ -292,6 +316,7 @@ public class GuiIngameForge extends GuiIngame
|
||||||
{
|
{
|
||||||
drawTexturedModalRect(left - i * 8 - 9, top, (i < full ? 16 : 25), 18, 9, 9);
|
drawTexturedModalRect(left - i * 8 - 9, top, (i < full ? 16 : 25), 18, 9, 9);
|
||||||
}
|
}
|
||||||
|
right_height += 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
mc.mcProfiler.endSection();
|
mc.mcProfiler.endSection();
|
||||||
|
@ -300,6 +325,7 @@ public class GuiIngameForge extends GuiIngame
|
||||||
|
|
||||||
public void renderHealth(int width, int height)
|
public void renderHealth(int width, int height)
|
||||||
{
|
{
|
||||||
|
bind(field_110324_m);
|
||||||
if (pre(HEALTH)) return;
|
if (pre(HEALTH)) return;
|
||||||
mc.mcProfiler.startSection("health");
|
mc.mcProfiler.startSection("health");
|
||||||
|
|
||||||
|
@ -310,47 +336,72 @@ public class GuiIngameForge extends GuiIngame
|
||||||
highlight = false;
|
highlight = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int health = mc.thePlayer.getHealth();
|
AttributeInstance attrMaxHealth = this.mc.thePlayer.func_110148_a(SharedMonsterAttributes.field_111267_a);
|
||||||
int healthLast = mc.thePlayer.prevHealth;
|
int health = MathHelper.ceiling_float_int(mc.thePlayer.func_110143_aJ());
|
||||||
|
int healthLast = MathHelper.ceiling_float_int(mc.thePlayer.prevHealth);
|
||||||
|
float healthMax = (float)attrMaxHealth.func_111126_e();
|
||||||
|
float absorb = this.mc.thePlayer.func_110139_bj();
|
||||||
|
|
||||||
|
int healthRows = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F / 10.0F);
|
||||||
|
int rowHeight = Math.max(10 - (healthRows - 2), 3);
|
||||||
|
|
||||||
|
this.rand.setSeed((long)(updateCounter * 312871));
|
||||||
|
|
||||||
int left = width / 2 - 91;
|
int left = width / 2 - 91;
|
||||||
int top = height - 39;
|
int top = height - left_height;
|
||||||
|
left_height += (healthRows * rowHeight);
|
||||||
|
if (rowHeight != 10) left_height += 10 - rowHeight;
|
||||||
|
|
||||||
int regen = -1;
|
int regen = -1;
|
||||||
if (mc.thePlayer.isPotionActive(Potion.regeneration))
|
if (mc.thePlayer.isPotionActive(Potion.regeneration))
|
||||||
{
|
{
|
||||||
regen = this.updateCounter % 25;
|
regen = updateCounter % 25;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < 10; ++i)
|
final int TOP = 9 * (mc.theWorld.getWorldInfo().isHardcoreModeEnabled() ? 5 : 0);
|
||||||
{
|
final int BACKGROUND = (highlight ? 25 : 16);
|
||||||
int idx = i * 2 + 1;
|
int MARGIN = 16;
|
||||||
int iconX = 16;
|
if (mc.thePlayer.isPotionActive(Potion.poison)) MARGIN += 36;
|
||||||
if (mc.thePlayer.isPotionActive(Potion.poison)) iconX += 36;
|
else if (mc.thePlayer.isPotionActive(Potion.wither)) MARGIN += 72;
|
||||||
else if (mc.thePlayer.isPotionActive(Potion.wither)) iconX += 72;
|
float absorbRemaining = absorb;
|
||||||
|
|
||||||
int x = left + i * 8;
|
for (int i = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F) - 1; i >= 0; --i)
|
||||||
int y = top;
|
{
|
||||||
if (health <= 4) y = top + rand.nextInt(2);
|
int b0 = (highlight ? 1 : 0);
|
||||||
|
int row = MathHelper.ceiling_float_int((float)(i + 1) / 10.0F) - 1;
|
||||||
|
int x = left + i % 10 * 8;
|
||||||
|
int y = top - row * rowHeight;
|
||||||
|
|
||||||
|
if (health <= 4) y += rand.nextInt(2);
|
||||||
if (i == regen) y -= 2;
|
if (i == regen) y -= 2;
|
||||||
|
|
||||||
byte iconY = 0;
|
drawTexturedModalRect(x, y, BACKGROUND, TOP, 9, 9);
|
||||||
if (mc.theWorld.getWorldInfo().isHardcoreModeEnabled()) iconY = 5;
|
|
||||||
|
|
||||||
drawTexturedModalRect(x, y, 16 + (highlight ? 9 : 0), 9 * iconY, 9, 9);
|
|
||||||
|
|
||||||
if (highlight)
|
if (highlight)
|
||||||
{
|
{
|
||||||
if (idx < healthLast)
|
if (i * 2 + 1 < healthLast)
|
||||||
drawTexturedModalRect(x, y, iconX + 54, 9 * iconY, 9, 9);
|
drawTexturedModalRect(x, y, MARGIN + 54, TOP, 9, 9); //6
|
||||||
else if (idx == healthLast)
|
else if (i * 2 + 1 == healthLast)
|
||||||
drawTexturedModalRect(x, y, iconX + 63, 9 * iconY, 9, 9);
|
drawTexturedModalRect(x, y, MARGIN + 63, TOP, 9, 9); //7
|
||||||
}
|
}
|
||||||
|
|
||||||
if (idx < health)
|
if (absorbRemaining > 0.0F)
|
||||||
drawTexturedModalRect(x, y, iconX + 36, 9 * iconY, 9, 9);
|
{
|
||||||
else if (idx == health)
|
if (absorbRemaining == absorb && absorb % 2.0F == 1.0F)
|
||||||
drawTexturedModalRect(x, y, iconX + 45, 9 * iconY, 9, 9);
|
drawTexturedModalRect(x, y, MARGIN + 153, TOP, 9, 9); //17
|
||||||
|
else
|
||||||
|
drawTexturedModalRect(x, y, MARGIN + 144, TOP, 9, 9); //16
|
||||||
|
absorbRemaining -= 2.0F;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (i * 2 + 1 < health)
|
||||||
|
drawTexturedModalRect(x, y, MARGIN + 36, TOP, 9, 9); //4
|
||||||
|
else if (i * 2 + 1 == health)
|
||||||
|
drawTexturedModalRect(x, y, MARGIN + 45, TOP, 9, 9); //5
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
mc.mcProfiler.endSection();
|
mc.mcProfiler.endSection();
|
||||||
post(HEALTH);
|
post(HEALTH);
|
||||||
}
|
}
|
||||||
|
@ -361,7 +412,8 @@ public class GuiIngameForge extends GuiIngame
|
||||||
mc.mcProfiler.startSection("food");
|
mc.mcProfiler.startSection("food");
|
||||||
|
|
||||||
int left = width / 2 + 91;
|
int left = width / 2 + 91;
|
||||||
int top = height - 39;
|
int top = height - right_height;
|
||||||
|
right_height += 10;
|
||||||
boolean unused = false;// Unused flag in vanilla, seems to be part of a 'fade out' mechanic
|
boolean unused = false;// Unused flag in vanilla, seems to be part of a 'fade out' mechanic
|
||||||
|
|
||||||
FoodStats stats = mc.thePlayer.getFoodStats();
|
FoodStats stats = mc.thePlayer.getFoodStats();
|
||||||
|
@ -388,31 +440,21 @@ public class GuiIngameForge extends GuiIngame
|
||||||
y = top + (rand.nextInt(3) - 1);
|
y = top + (rand.nextInt(3) - 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
this.drawTexturedModalRect(x, y, 16 + backgound * 9, 27, 9, 9);
|
drawTexturedModalRect(x, y, 16 + backgound * 9, 27, 9, 9);
|
||||||
|
|
||||||
if (unused)
|
if (unused)
|
||||||
{
|
{
|
||||||
if (idx < levelLast)
|
if (idx < levelLast)
|
||||||
{
|
|
||||||
drawTexturedModalRect(x, y, icon + 54, 27, 9, 9);
|
drawTexturedModalRect(x, y, icon + 54, 27, 9, 9);
|
||||||
}
|
else if (idx == levelLast)
|
||||||
|
|
||||||
if (idx == levelLast)
|
|
||||||
{
|
|
||||||
drawTexturedModalRect(x, y, icon + 63, 27, 9, 9);
|
drawTexturedModalRect(x, y, icon + 63, 27, 9, 9);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (idx < level)
|
if (idx < level)
|
||||||
{
|
|
||||||
drawTexturedModalRect(x, y, icon + 36, 27, 9, 9);
|
drawTexturedModalRect(x, y, icon + 36, 27, 9, 9);
|
||||||
}
|
else if (idx == level)
|
||||||
|
|
||||||
if (idx == level)
|
|
||||||
{
|
|
||||||
drawTexturedModalRect(x, y, icon + 45, 27, 9, 9);
|
drawTexturedModalRect(x, y, icon + 45, 27, 9, 9);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
mc.mcProfiler.endSection();
|
mc.mcProfiler.endSection();
|
||||||
post(FOOD);
|
post(FOOD);
|
||||||
}
|
}
|
||||||
|
@ -442,29 +484,31 @@ public class GuiIngameForge extends GuiIngame
|
||||||
|
|
||||||
protected void renderExperience(int width, int height)
|
protected void renderExperience(int width, int height)
|
||||||
{
|
{
|
||||||
|
bind(field_110324_m);
|
||||||
if (pre(EXPERIENCE)) return;
|
if (pre(EXPERIENCE)) return;
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
if (mc.playerController.shouldDrawHUD())
|
|
||||||
|
if (mc.playerController.func_78763_f())
|
||||||
{
|
{
|
||||||
mc.mcProfiler.startSection("expBar");
|
mc.mcProfiler.startSection("expBar");
|
||||||
mc.renderEngine.bindTexture("/gui/icons.png");
|
|
||||||
int cap = this.mc.thePlayer.xpBarCap();
|
int cap = this.mc.thePlayer.xpBarCap();
|
||||||
int left = width / 2 - 91;
|
int left = width / 2 - 91;
|
||||||
|
|
||||||
if (cap > 0)
|
if (cap > 0)
|
||||||
{
|
{
|
||||||
short short1 = 182;
|
short barWidth = 182;
|
||||||
int l2 = (int)(this.mc.thePlayer.experience * (float)(short1 + 1));
|
int filled = (int)(mc.thePlayer.experience * (float)(barWidth + 1));
|
||||||
int k2 = height - 32 + 3;
|
int top = height - 32 + 3;
|
||||||
this.drawTexturedModalRect(left, k2, 0, 64, short1, 5);
|
drawTexturedModalRect(left, top, 0, 64, barWidth, 5);
|
||||||
|
|
||||||
if (l2 > 0)
|
if (filled > 0)
|
||||||
{
|
{
|
||||||
this.drawTexturedModalRect(left, k2, 0, 69, l2, 5);
|
drawTexturedModalRect(left, top, 0, 69, filled, 5);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mc.mcProfiler.endSection();
|
|
||||||
}
|
this.mc.mcProfiler.endSection();
|
||||||
|
|
||||||
|
|
||||||
if (mc.playerController.func_78763_f() && mc.thePlayer.experienceLevel > 0)
|
if (mc.playerController.func_78763_f() && mc.thePlayer.experienceLevel > 0)
|
||||||
{
|
{
|
||||||
|
@ -481,11 +525,38 @@ public class GuiIngameForge extends GuiIngame
|
||||||
fontrenderer.drawString(text, x, y, color);
|
fontrenderer.drawString(text, x, y, color);
|
||||||
mc.mcProfiler.endSection();
|
mc.mcProfiler.endSection();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
|
||||||
post(EXPERIENCE);
|
post(EXPERIENCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void renderJumpBar(int width, int height)
|
||||||
|
{
|
||||||
|
bind(field_110324_m);
|
||||||
|
if (pre(JUMPBAR)) return;
|
||||||
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
|
||||||
|
mc.mcProfiler.startSection("jumpBar");
|
||||||
|
float charge = mc.thePlayer.func_110319_bJ();
|
||||||
|
final int barWidth = 182;
|
||||||
|
int x = (width / 2) - (barWidth / 2);
|
||||||
|
int filled = (int)(charge * (float)(barWidth + 1));
|
||||||
|
int top = height - 32 + 3;
|
||||||
|
|
||||||
|
drawTexturedModalRect(x, top, 0, 84, barWidth, 5);
|
||||||
|
|
||||||
|
if (filled > 0)
|
||||||
|
{
|
||||||
|
this.drawTexturedModalRect(x, top, 0, 89, filled, 5);
|
||||||
|
}
|
||||||
|
|
||||||
|
mc.mcProfiler.endSection();
|
||||||
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
|
||||||
|
post(JUMPBAR);
|
||||||
|
}
|
||||||
|
|
||||||
protected void renderToolHightlight(int width, int height)
|
protected void renderToolHightlight(int width, int height)
|
||||||
{
|
{
|
||||||
if (this.mc.gameSettings.heldItemTooltips)
|
if (this.mc.gameSettings.heldItemTooltips)
|
||||||
|
@ -719,7 +790,7 @@ public class GuiIngameForge extends GuiIngame
|
||||||
|
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
|
||||||
mc.renderEngine.bindTexture("/gui/icons.png");
|
mc.func_110434_K().func_110577_a(Gui.field_110324_m);
|
||||||
int pingIndex = 4;
|
int pingIndex = 4;
|
||||||
int ping = player.responseTime;
|
int ping = player.responseTime;
|
||||||
if (ping < 0) pingIndex = 5;
|
if (ping < 0) pingIndex = 5;
|
||||||
|
@ -736,6 +807,54 @@ public class GuiIngameForge extends GuiIngame
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected void renderHealthMount(int width, int height)
|
||||||
|
{
|
||||||
|
Entity tmp = mc.thePlayer.ridingEntity;
|
||||||
|
if (!(tmp instanceof EntityLivingBase)) return;
|
||||||
|
|
||||||
|
bind(field_110324_m);
|
||||||
|
|
||||||
|
if (pre(HEALTHMOUNT)) return;
|
||||||
|
|
||||||
|
boolean unused = false;
|
||||||
|
int left_align = width / 2 + 91;
|
||||||
|
|
||||||
|
mc.mcProfiler.endStartSection("mountHealth");
|
||||||
|
EntityLivingBase mount = (EntityLivingBase)tmp;
|
||||||
|
int health = (int)Math.ceil((double)mount.func_110143_aJ());
|
||||||
|
float healthMax = mount.func_110138_aP();
|
||||||
|
int hearts = (int)(healthMax + 0.5F) / 2;
|
||||||
|
|
||||||
|
if (hearts > 30) hearts = 30;
|
||||||
|
|
||||||
|
final int MARGIN = 52;
|
||||||
|
final int BACKGROUND = MARGIN + (unused ? 1 : 0);
|
||||||
|
final int HALF = MARGIN + 45;
|
||||||
|
final int FULL = MARGIN + 36;
|
||||||
|
|
||||||
|
for (int heart = 0; hearts > 0; heart += 20)
|
||||||
|
{
|
||||||
|
int top = height - right_height;
|
||||||
|
|
||||||
|
int rowCount = Math.min(hearts, 10);
|
||||||
|
hearts -= rowCount;
|
||||||
|
|
||||||
|
for (int i = 0; i < rowCount; ++i)
|
||||||
|
{
|
||||||
|
int x = left_align - i * 8 - 9;
|
||||||
|
drawTexturedModalRect(x, top, BACKGROUND, 9, 9, 9);
|
||||||
|
|
||||||
|
if (i * 2 + 1 + heart < health)
|
||||||
|
drawTexturedModalRect(x, top, FULL, 9, 9, 9);
|
||||||
|
else if (i * 2 + 1 + heart == health)
|
||||||
|
drawTexturedModalRect(x, top, HALF, 9, 9, 9);
|
||||||
|
}
|
||||||
|
|
||||||
|
right_height += 10;
|
||||||
|
}
|
||||||
|
post(HEALTHMOUNT);
|
||||||
|
}
|
||||||
|
|
||||||
//Helper macros
|
//Helper macros
|
||||||
private boolean pre(ElementType type)
|
private boolean pre(ElementType type)
|
||||||
{
|
{
|
||||||
|
@ -745,4 +864,8 @@ public class GuiIngameForge extends GuiIngame
|
||||||
{
|
{
|
||||||
MinecraftForge.EVENT_BUS.post(new RenderGameOverlayEvent.Post(eventParent, type));
|
MinecraftForge.EVENT_BUS.post(new RenderGameOverlayEvent.Post(eventParent, type));
|
||||||
}
|
}
|
||||||
|
private void bind(ResourceLocation res)
|
||||||
|
{
|
||||||
|
mc.func_110434_K().func_110577_a(res);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,15 +20,6 @@ import net.minecraftforge.common.MinecraftForge;
|
||||||
|
|
||||||
public class MinecraftForgeClient
|
public class MinecraftForgeClient
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* NO-OP now. Not needed with new texturing system in MC 1.5
|
|
||||||
*/
|
|
||||||
@Deprecated // without replacement
|
|
||||||
public static void preloadTexture(String texture)
|
|
||||||
{
|
|
||||||
// ForgeHooksClient.engine().getTexture(texture);
|
|
||||||
}
|
|
||||||
|
|
||||||
private static IItemRenderer[] customItemRenderers = new IItemRenderer[Item.itemsList.length];
|
private static IItemRenderer[] customItemRenderers = new IItemRenderer[Item.itemsList.length];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,278 +0,0 @@
|
||||||
package net.minecraftforge.client;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.lang.reflect.Field;
|
|
||||||
import java.util.logging.Level;
|
|
||||||
|
|
||||||
import cpw.mods.fml.client.FMLClientHandler;
|
|
||||||
import cpw.mods.fml.common.FMLLog;
|
|
||||||
|
|
||||||
import paulscode.sound.SoundSystemConfig;
|
|
||||||
import paulscode.sound.codecs.CodecIBXM;
|
|
||||||
|
|
||||||
import net.minecraft.client.Minecraft;
|
|
||||||
import net.minecraft.client.audio.SoundManager;
|
|
||||||
import net.minecraft.client.audio.SoundPool;
|
|
||||||
import net.minecraft.client.audio.SoundPoolEntry;
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
import net.minecraft.network.packet.Packet100OpenWindow;
|
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
import net.minecraft.world.World;
|
|
||||||
|
|
||||||
public class ModCompatibilityClient
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Tries to get the class for the specified name, will also try the
|
|
||||||
* net.minecraft.src package in case we are in MCP
|
|
||||||
* Returns null if not found.
|
|
||||||
*
|
|
||||||
* @param name The class name
|
|
||||||
* @return The Class, or null if not found
|
|
||||||
*/
|
|
||||||
private static Class getClass(String name)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return Class.forName(name);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return Class.forName("net.minecraft.src." + name);
|
|
||||||
}
|
|
||||||
catch (Exception e2)
|
|
||||||
{
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/************************************************************************************************
|
|
||||||
* Risugami's AudioMod Compatibility
|
|
||||||
* http://www.minecraftforum.net/topic/75440-
|
|
||||||
*
|
|
||||||
* AudioMod adds a few extra codecs, loads audio from /resources/mods/*,
|
|
||||||
* introduces the concept of 'cave' sounds, which are determined by if
|
|
||||||
* the player is underneath a solid block.
|
|
||||||
*
|
|
||||||
* It also lowers the interval between background music songs to 6000
|
|
||||||
*/
|
|
||||||
public static SoundPool audioModSoundPoolCave;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Populates the sound pools with with sounds from the /resources/mods folder
|
|
||||||
* And sets the interval between background music to 6000
|
|
||||||
*
|
|
||||||
* @param mngr The SoundManager instance
|
|
||||||
*/
|
|
||||||
public static void audioModLoad(SoundManager mngr)
|
|
||||||
{
|
|
||||||
audioModSoundPoolCave = new SoundPool();
|
|
||||||
audioModLoadModAudio("resources/mod/sound", mngr.soundPoolSounds);
|
|
||||||
audioModLoadModAudio("resources/mod/streaming", mngr.soundPoolStreaming);
|
|
||||||
audioModLoadModAudio("resources/mod/music", mngr.soundPoolMusic);
|
|
||||||
audioModLoadModAudio("resources/mod/cavemusic", audioModSoundPoolCave);
|
|
||||||
|
|
||||||
if (mngr.MUSIC_INTERVAL == 12000)
|
|
||||||
{
|
|
||||||
mngr.MUSIC_INTERVAL = 6000;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Walks the given path in the Minecraft app directory and adds audio to the SoundPool
|
|
||||||
*
|
|
||||||
* @param path The path to walk
|
|
||||||
* @param pool The pool to add sound to
|
|
||||||
*/
|
|
||||||
private static void audioModLoadModAudio(String path, SoundPool pool)
|
|
||||||
{
|
|
||||||
File folder = new File(Minecraft.getMinecraftDir(), path);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
audioModWalkFolder(folder, folder, pool);
|
|
||||||
}
|
|
||||||
catch (IOException ex)
|
|
||||||
{
|
|
||||||
FMLLog.log(Level.FINE, ex, "Loading Mod audio failed for folder: %s", path);
|
|
||||||
ex.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Walks the folder path recursively and calls pool.addSound on any file it finds.
|
|
||||||
*
|
|
||||||
* @param base The base path for the folder, determines the name when calling addSound
|
|
||||||
* @param folder The current folder
|
|
||||||
* @param pool The SoundPool to add the sound to
|
|
||||||
* @throws IOException
|
|
||||||
*/
|
|
||||||
private static void audioModWalkFolder(File base, File folder, SoundPool pool) throws IOException
|
|
||||||
{
|
|
||||||
if (folder.exists() || folder.mkdirs())
|
|
||||||
{
|
|
||||||
for (File file : folder.listFiles())
|
|
||||||
{
|
|
||||||
if (!file.getName().startsWith("."))
|
|
||||||
{
|
|
||||||
if (file.isDirectory())
|
|
||||||
{
|
|
||||||
audioModWalkFolder(base, file, pool);
|
|
||||||
}
|
|
||||||
else if (file.isFile())
|
|
||||||
{
|
|
||||||
String subpath = file.getPath().substring(base.getPath().length() + 1).replace('\\', '/');
|
|
||||||
pool.addSound(subpath, file);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds the IBXM codec and associates it with .xm, .s3m, and .mod
|
|
||||||
*/
|
|
||||||
public static void audioModAddCodecs()
|
|
||||||
{
|
|
||||||
SoundSystemConfig.setCodec("xm", CodecIBXM.class);
|
|
||||||
SoundSystemConfig.setCodec("s3m", CodecIBXM.class);
|
|
||||||
SoundSystemConfig.setCodec("mod", CodecIBXM.class);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* If the current player is underground, it picks a random song from the cave sound pool,
|
|
||||||
* if they are not it returns the passed in entry.
|
|
||||||
*
|
|
||||||
* @param soundManager The SoundManager instance
|
|
||||||
* @param current The currently selected entry
|
|
||||||
* @return A soundPool entry to be played as the background music
|
|
||||||
*/
|
|
||||||
public static SoundPoolEntry audioModPickBackgroundMusic(SoundManager soundManager, SoundPoolEntry current)
|
|
||||||
{
|
|
||||||
Minecraft mc = FMLClientHandler.instance().getClient();
|
|
||||||
if (mc != null && mc.theWorld != null && audioModSoundPoolCave != null)
|
|
||||||
{
|
|
||||||
Entity ent = mc.renderViewEntity;
|
|
||||||
int x = MathHelper.truncateDoubleToInt(ent.posX);
|
|
||||||
int y = MathHelper.truncateDoubleToInt(ent.posY);
|
|
||||||
int z = MathHelper.truncateDoubleToInt(ent.posZ);
|
|
||||||
return (mc.theWorld.canBlockSeeTheSky(x, y, z) ? current : audioModSoundPoolCave.getRandomSound());
|
|
||||||
}
|
|
||||||
return current;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************************************************
|
|
||||||
* SDK's ModLoaderMP
|
|
||||||
* http://www.minecraftforum.net/topic/86765-
|
|
||||||
*
|
|
||||||
* ModLoaderMP was supposed to be a reliable server side version of ModLoader, however it has
|
|
||||||
* gotten the reputation of being really slow to update. Never having bugfixes, breaking compatibility
|
|
||||||
* with the client side ModLoader.
|
|
||||||
*
|
|
||||||
* So we have replaced it with our own system called FML (Forge ModLoader)
|
|
||||||
* it is a stand alone mod, that Forge relies on, and that is open source/community driven.
|
|
||||||
* https://github.com/cpw/FML
|
|
||||||
*
|
|
||||||
* However, for compatibilities sake, we provide the ModLoaderMP's hooks so that the end user
|
|
||||||
* does not need to make a choice between the two on the client side.
|
|
||||||
**/
|
|
||||||
private static int isMLMPInstalled = -1;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Determine if ModLoaderMP is installed by checking for the existence of the BaseModMp class.
|
|
||||||
* @return True if BaseModMp was installed (indicating the existance of MLMP)
|
|
||||||
*/
|
|
||||||
public static boolean isMLMPInstalled()
|
|
||||||
{
|
|
||||||
if (isMLMPInstalled == -1)
|
|
||||||
{
|
|
||||||
isMLMPInstalled = (getClass("ModLoaderMp") != null ? 1 : 0);
|
|
||||||
}
|
|
||||||
return isMLMPInstalled == 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attempts to spawn a vehicle using ModLoaderMP's vehicle spawn registry, if MLMP is not installed
|
|
||||||
* it returns the passed in currentEntity
|
|
||||||
*
|
|
||||||
* @param type The Type ID of the vehicle
|
|
||||||
* @param world The current world
|
|
||||||
* @param x The spawn X position
|
|
||||||
* @param y The spawn Y position
|
|
||||||
* @param z The spawn Z position
|
|
||||||
* @param thrower The entity that spawned the vehicle {possibly null}
|
|
||||||
* @param currentEntity The current value to return if MLMP is not installed
|
|
||||||
* @return The new spawned entity
|
|
||||||
* @throws Exception
|
|
||||||
*/
|
|
||||||
public static Object mlmpVehicleSpawn(int type, World world, double x, double y, double z, Entity thrower, Object currentEntity) throws Exception
|
|
||||||
{
|
|
||||||
Class mlmp = getClass("ModLoaderMp");
|
|
||||||
if (!isMLMPInstalled() || mlmp == null)
|
|
||||||
{
|
|
||||||
return currentEntity;
|
|
||||||
}
|
|
||||||
|
|
||||||
Object entry = mlmp.getDeclaredMethod("handleNetClientHandlerEntities", int.class).invoke(null, type);
|
|
||||||
if (entry == null)
|
|
||||||
{
|
|
||||||
return currentEntity;
|
|
||||||
}
|
|
||||||
|
|
||||||
Class entityClass = (Class)entry.getClass().getDeclaredField("entityClass").get(entry);
|
|
||||||
Object ret = (Entity)entityClass.getConstructor(World.class, Double.TYPE, Double.TYPE, Double.TYPE).newInstance(world, x, y, z);
|
|
||||||
|
|
||||||
if (entry.getClass().getDeclaredField("entityHasOwner").getBoolean(entry))
|
|
||||||
{
|
|
||||||
Field owner = entityClass.getField("owner");
|
|
||||||
|
|
||||||
if (!Entity.class.isAssignableFrom(owner.getType()))
|
|
||||||
{
|
|
||||||
throw new Exception(String.format("Entity\'s owner field must be of type Entity, but it is of type %s.", owner.getType()));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (thrower == null)
|
|
||||||
{
|
|
||||||
System.out.println("Received spawn packet for entity with owner, but owner was not found.");
|
|
||||||
FMLLog.fine("Received spawn packet for entity with owner, but owner was not found.");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (!owner.getType().isAssignableFrom(thrower.getClass()))
|
|
||||||
{
|
|
||||||
throw new Exception(String.format("Tried to assign an entity of type %s to entity owner, which is of type %s.", thrower.getClass(), owner.getType()));
|
|
||||||
}
|
|
||||||
|
|
||||||
owner.set(ret, thrower);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Attempts to invoke ModLoaderMp.handleGUI if ModLoaderMP is installed.
|
|
||||||
* If not, it does nothing
|
|
||||||
*
|
|
||||||
* @param pkt The open window packet
|
|
||||||
*/
|
|
||||||
public static void mlmpOpenWindow(Packet100OpenWindow pkt)
|
|
||||||
{
|
|
||||||
Class mlmp = getClass("ModLoaderMp");
|
|
||||||
if (!isMLMPInstalled() || mlmp == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
mlmp.getDeclaredMethod("handleGUI", Packet100OpenWindow.class).invoke(null, pkt);
|
|
||||||
}
|
|
||||||
catch (Exception e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -22,7 +22,9 @@ public class RenderGameOverlayEvent extends Event
|
||||||
AIR,
|
AIR,
|
||||||
HOTBAR,
|
HOTBAR,
|
||||||
EXPERIENCE,
|
EXPERIENCE,
|
||||||
TEXT
|
TEXT,
|
||||||
|
HEALTHMOUNT,
|
||||||
|
JUMPBAR
|
||||||
}
|
}
|
||||||
|
|
||||||
public final float partialTicks;
|
public final float partialTicks;
|
||||||
|
|
|
@ -1,18 +1,16 @@
|
||||||
package net.minecraftforge.client.event;
|
package net.minecraftforge.client.event;
|
||||||
|
|
||||||
import net.minecraft.client.renderer.entity.RenderLiving;
|
import net.minecraft.client.renderer.entity.RendererLivingEntity;
|
||||||
import net.minecraft.client.renderer.entity.RenderPlayer;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.EntityLiving;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraftforge.event.Cancelable;
|
import net.minecraftforge.event.Cancelable;
|
||||||
import net.minecraftforge.event.Event;
|
import net.minecraftforge.event.Event;
|
||||||
|
|
||||||
public abstract class RenderLivingEvent extends Event
|
public abstract class RenderLivingEvent extends Event
|
||||||
{
|
{
|
||||||
public final EntityLiving entity;
|
public final EntityLivingBase entity;
|
||||||
public final RenderLiving renderer;
|
public final RendererLivingEntity renderer;
|
||||||
|
|
||||||
public RenderLivingEvent(EntityLiving entity, RenderLiving renderer)
|
public RenderLivingEvent(EntityLivingBase entity, RendererLivingEntity renderer)
|
||||||
{
|
{
|
||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
this.renderer = renderer;
|
this.renderer = renderer;
|
||||||
|
@ -20,16 +18,16 @@ public abstract class RenderLivingEvent extends Event
|
||||||
|
|
||||||
public abstract static class Specials extends RenderLivingEvent
|
public abstract static class Specials extends RenderLivingEvent
|
||||||
{
|
{
|
||||||
public Specials(EntityLiving entity, RenderLiving renderer){ super(entity, renderer); }
|
public Specials(EntityLivingBase entity, RendererLivingEntity renderer){ super(entity, renderer); }
|
||||||
|
|
||||||
@Cancelable
|
@Cancelable
|
||||||
public static class Pre extends Specials
|
public static class Pre extends Specials
|
||||||
{
|
{
|
||||||
public Pre(EntityLiving entity, RenderLiving renderer){ super(entity, renderer); }
|
public Pre(EntityLivingBase entity, RendererLivingEntity renderer){ super(entity, renderer); }
|
||||||
}
|
}
|
||||||
public static class Post extends Specials
|
public static class Post extends Specials
|
||||||
{
|
{
|
||||||
public Post(EntityLiving entity, RenderLiving renderer){ super(entity, renderer); }
|
public Post(EntityLivingBase entity, RendererLivingEntity renderer){ super(entity, renderer); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package net.minecraftforge.client.event;
|
|
||||||
|
|
||||||
import net.minecraft.client.texturepacks.ITexturePack;
|
|
||||||
import net.minecraftforge.event.Event;
|
|
||||||
|
|
||||||
public class TextureLoadEvent extends Event
|
|
||||||
{
|
|
||||||
|
|
||||||
public final String texture;
|
|
||||||
public final ITexturePack pack;
|
|
||||||
|
|
||||||
public TextureLoadEvent(String texture, ITexturePack pack)
|
|
||||||
{
|
|
||||||
this.texture = texture;
|
|
||||||
this.pack = pack;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,158 +1,162 @@
|
||||||
#Main Forge Access Transformer configuration file
|
#Main Forge Access Transformer configuration file
|
||||||
# Tessellator
|
# Tessellator
|
||||||
public-f bgd.a #FD:Tessellator/field_78398_a #instance
|
public-f bff.a #FD:Tessellator/field_78398_a #instance
|
||||||
public bgd.u #FD:Tessellator/field_78409_u #drawMode
|
public bff.u #FD:Tessellator/field_78409_u #drawMode
|
||||||
public bgd.v #FD:Tessellator/field_78408_v #xOffset
|
public bff.v #FD:Tessellator/field_78408_v #xOffset
|
||||||
public bgd.w #FD:Tessellator/field_78407_w #yOffset
|
public bff.w #FD:Tessellator/field_78407_w #yOffset
|
||||||
public bgd.x #FD:Tessellator/field_78417_x #zOffset
|
public bff.x #FD:Tessellator/field_78417_x #zOffset
|
||||||
public bgd.z #FD:Tessellator/field_78415_z #isDrawing
|
public bff.z #FD:Tessellator/field_78415_z #isDrawing
|
||||||
# ItemPickaxe
|
# ItemPickaxe
|
||||||
public wu.<init>(ILwl;)V #MD:ItemPickaxe/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
|
public yi.<init>(ILxy;)V #MD:ItemPickaxe/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
|
||||||
public+f wu.c #FD:ItemPickaxe/field_77867_c #blocksEffectiveAgainst
|
public+f yi.c #FD:ItemPickaxe/field_77867_c #blocksEffectiveAgainst
|
||||||
# ItemAxe
|
# ItemAxe
|
||||||
public wi.<init>(ILwl;)V #MD:ItemAxe/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
|
public xv.<init>(ILxy;)V #MD:ItemAxe/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
|
||||||
public+f wi.c #FD:ItemAxe/field_77868_c #blocksEffectiveAgainst
|
public+f xv.c #FD:ItemAxe/field_77868_c #blocksEffectiveAgainst
|
||||||
# ItemSpade
|
# ItemSpade
|
||||||
public xf.<init>(ILwl;)V #MD:ItemSpade/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
|
public yt.<init>(ILxy;)V #MD:ItemSpade/<init>(ILnet/minecraft/src/EnumToolMaterial;) #constructor
|
||||||
public+f xf.c #FD:ItemSpade/field_77866_c #blocksEffectiveAgainst
|
public+f yt.c #FD:ItemSpade/field_77866_c #blocksEffectiveAgainst
|
||||||
# ItemTool
|
# ItemTool
|
||||||
public vr.a #FD:ItemTool/field_77864_a #efficiencyOnProperMaterial
|
public xe.a #FD:ItemTool/field_77864_a #efficiencyOnProperMaterial
|
||||||
public vr.d #FD:ItemTool/field_77865_bY #damageVsEntity
|
public xe.d #FD:ItemTool/field_77865_bY #damageVsEntity
|
||||||
# EntityEnderman
|
# EntityEnderman
|
||||||
public rv.d #FD:EntityEnderman/field_70827_d #carriableBlocks
|
public td.br #FD:EntityEnderman/field_70827_d #carriableBlocks
|
||||||
# RenderEngine
|
# RenderEngine
|
||||||
public bge.f(Ljava/lang/String;)I #MD:RenderEngine/func_78341_b #getTexture
|
# -- MISSING MAPPING public bge.f(Ljava/lang/String;)I #MD:RenderEngine/func_78341_b #getTexture
|
||||||
public bge.i #FD:RenderEngine/field_94154_l #terrainTextureMap
|
# -- MISSING MAPPING public bge.i #FD:RenderEngine/field_94154_l #terrainTextureMap
|
||||||
public bge.j #FD:RenderEngine/field_94155_m #itemTextureMap
|
# -- MISSING MAPPING public bge.j #FD:RenderEngine/field_94155_m #itemTextureMap
|
||||||
# RenderGlobal
|
# RenderGlobal
|
||||||
public bfy.h #FD:RenderGlobal/field_72769_h #theWorld
|
public bfa.k #FD:RenderGlobal/field_72769_h #theWorld
|
||||||
public bfy.i #FD:RenderGlobal/field_72770_i #renderEngine
|
public bfa.l #FD:RenderGlobal/field_72770_i #renderEngine
|
||||||
public bfy.q #FD:RenderGlobal/field_72777_q #mc
|
public bfa.t #FD:RenderGlobal/field_72777_q #mc
|
||||||
public bfy.r #FD:RenderGlobal/field_72776_r #globalRenderBlocks
|
public bfa.u #FD:RenderGlobal/field_72776_r #globalRenderBlocks
|
||||||
public bfy.E #FD:RenderGlobal/field_72738_E #damagedBlocks
|
public bfa.H #FD:RenderGlobal/field_72738_E #damagedBlocks
|
||||||
# SoundManager
|
# SoundManager
|
||||||
public bkc.a #FD:SoundManager/field_77381_a #sndSystem
|
public blc.b #FD:SoundManager/field_77381_a #sndSystem
|
||||||
public bkc.b #FD:SoundManager/field_77379_b #soundPoolSounds
|
public blc.d #FD:SoundManager/field_77379_b #soundPoolSounds
|
||||||
public bkc.c #FD:SoundManager/field_77380_c #soundPoolStreaming
|
public blc.e #FD:SoundManager/field_77380_c #soundPoolStreaming
|
||||||
public bkc.d #FD:SoundManager/field_77377_d #soundPoolMusic
|
public blc.f #FD:SoundManager/field_77377_d #soundPoolMusic
|
||||||
# EntityMinecart
|
# EntityMinecart
|
||||||
protected ri.* #FD:EntityMinecart/* # All private -> protected
|
protected sq.* #FD:EntityMinecart/* # All private -> protected
|
||||||
# -- MISSING MAPPING public py.h()Z #MD:EntityMinecart/func_70490_h #isMinecartPowered
|
# -- MISSING MAPPING public py.h()Z #MD:EntityMinecart/func_70490_h #isMinecartPowered
|
||||||
# Block
|
# Block
|
||||||
public apa.<init>(ILaif;)V #MD:Block/<init>(ILnet/minecraft/src/Material;) #Constructor
|
public aqs.<init>(ILajv;)V #MD:Block/<init>(ILnet/minecraft/src/Material;) #Constructor
|
||||||
public apa.<init>(IILaif;)V #MD:Block/<init>(IILnet/minecraft/src/Material;) #Constructor
|
public aqs.<init>(IILajv;)V #MD:Block/<init>(IILnet/minecraft/src/Material;) #Constructor
|
||||||
public apa.cB #FD:Block/field_72029_cc #blockResistance
|
public aqs.cH #FD:Block/field_72029_cc #blockResistance
|
||||||
public apa.cA #FD:Block/field_71989_cb #blockHardness
|
public aqs.cG #FD:Block/field_71989_cb #blockHardness
|
||||||
# -- MISSING MAPPING public amq.r()Lamq; #MD:Block/func_71912_p #setRequiresSelfNotify
|
# -- MISSING MAPPING public amq.r()Lamq; #MD:Block/func_71912_p #setRequiresSelfNotify
|
||||||
public apa.a(Lape;)Lapa; #MD:Block/func_71884_a #setStepSound
|
public aqs.a(Laqw;)Laqs; #MD:Block/func_71884_a #setStepSound
|
||||||
public apa.b(F)Lapa; #MD:Block/func_71894_b #setResistance
|
public aqs.b(F)Laqs; #MD:Block/func_71894_b #setResistance
|
||||||
public apa.c(F)Lapa; #MD:Block/func_71848_c #setHardness
|
public aqs.c(F)Laqs; #MD:Block/func_71848_c #setHardness
|
||||||
public apa.k(I)Lapa; #MD:Block/func_71868_h #setLightOpacity
|
public aqs.k(I)Laqs; #MD:Block/func_71868_h #setLightOpacity
|
||||||
public apa.a(F)Lapa; #MD:Block/func_71900_a #setLightValue
|
public aqs.a(F)Laqs; #MD:Block/func_71900_a #setLightValue
|
||||||
public apa.r()Lapa; #MD:Block/func_71875_q #setBlockUnbreakable
|
public aqs.r()Laqs; #MD:Block/func_71875_q #setBlockUnbreakable
|
||||||
public apa.b(Z)Lapa; #MD:Block/func_71907_b #setTickRandomly
|
public aqs.b(Z)Laqs; #MD:Block/func_71907_b #setTickRandomly
|
||||||
public apa.a(FFFFFF)V #MD:Block/func_71905_a #setBlockBounds
|
public aqs.a(FFFFFF)V #MD:Block/func_71905_a #setBlockBounds
|
||||||
# NetServerHandler
|
# NetServerHandler
|
||||||
public jh.f #FD:NetServerHandler/field_72572_g #playerInAirTime
|
public jx.f #FD:NetServerHandler/field_72572_g #playerInAirTime
|
||||||
# TileEntity
|
# TileEntity
|
||||||
public aqp.k #FD:TileEntity/field_70331_k #worldObj
|
public asi.k #FD:TileEntity/field_70331_k #worldObj
|
||||||
# BlockLeavesBase
|
# BlockLeavesBase
|
||||||
public api.d #FD:BlockLeavesBase/field_72131_c #graphicsLevel
|
public ara.d #FD:BlockLeavesBase/field_72131_c #graphicsLevel
|
||||||
# Item
|
# Item
|
||||||
public wk.<init>(I)V #MD:Item/<init>(I) #Constructor
|
public xx.<init>(I)V #MD:Item/<init>(I) #Constructor
|
||||||
public wk.e(I)Lwk; #MD:Item/func_77656_e #setMaxDamage
|
public xx.e(I)Lxx; #MD:Item/func_77656_e #setMaxDamage
|
||||||
public-f wk.h(Lwm;)Llx; #MD:Item/func_77650_f #getIconIndex
|
public-f xx.h(Lxz;)Lmp; #MD:Item/func_77650_f #getIconIndex
|
||||||
public wk.c(Ljava/lang/String;)Lwk; #MD:Item/func_77631_c #setPotionEffect
|
public xx.c(Ljava/lang/String;)Lxx; #MD:Item/func_77631_c #setPotionEffect
|
||||||
# RailLogic
|
# RailLogic
|
||||||
public alc #CL:BlockBaseRailLogic
|
public ams #CL:BlockBaseRailLogic
|
||||||
public alc.a()I #MD:BlockBaseRailLogic/func_94505_a #getNAdjacentTiles
|
public ams.a()I #MD:BlockBaseRailLogic/func_94505_a #getNAdjacentTiles
|
||||||
# EntityPlayer
|
# EntityPlayer
|
||||||
public sq.a(Lrh;)V #MD:EntityPlayer/func_71012_a #joinEntityItemWithWorld
|
public ua.a(Lsp;)V #MD:EntityPlayer/func_71012_a #joinEntityItemWithWorld
|
||||||
public sq.h()V #MD:EntityPlayer/func_71053_j #closeScreen
|
public ua.i()V #MD:EntityPlayer/func_71053_j #closeScreen
|
||||||
public sq.b #FD:EntityPlayer/field_71076_b #sleepTimer
|
public ua.b #FD:EntityPlayer/field_71076_b #sleepTimer
|
||||||
# EntityPlayerMP
|
# EntityPlayerMP
|
||||||
public bdv.a(Lrh;)V #MD:EntityClientPlayerMP/func_71012_a #joinEntityItemWithWorld
|
public bcx.a(Lsp;)V #MD:EntityClientPlayerMP/func_71012_a #joinEntityItemWithWorld
|
||||||
# World Gen Chests Related
|
# World Gen Chests Related
|
||||||
public lp.* #FD:WeightedRandomChestContent/* #all
|
public mh.* #FD:WeightedRandomChestContent/* #all
|
||||||
public iz.S #FD:WorldServer/field_73069_S #bonusChestContent
|
public jp.T #FD:WorldServer/field_73069_S #bonusChestContent
|
||||||
public aem.a #FD:StructureMineshaftPieces/field_78818_a #mineshaftChestContents
|
public agc.a #FD:StructureMineshaftPieces/field_78818_a #mineshaftChestContents
|
||||||
public afq.i #FD:ComponentScatteredFeatureDesertPyramid/field_74941_i #itemsToGenerateInTemple
|
public ahg.i #FD:ComponentScatteredFeatureDesertPyramid/field_74941_i #itemsToGenerateInTemple
|
||||||
public afr.l #FD:ComponentScatteredFeatureJunglePyramid/field_74943_l #junglePyramidsChestContents
|
public ahh.l #FD:ComponentScatteredFeatureJunglePyramid/field_74943_l #junglePyramidsChestContents
|
||||||
public afr.m #FD:ComponentScatteredFeatureJunglePyramid/field_74944_m #junglePyramidsDispenserContents
|
public ahh.m #FD:ComponentScatteredFeatureJunglePyramid/field_74944_m #junglePyramidsDispenserContents
|
||||||
public agb.a #FD:ComponentStrongholdChestCorridor/field_75003_a #strongholdChestContents
|
public ahr.a #FD:ComponentStrongholdChestCorridor/field_75003_a #strongholdChestContents
|
||||||
public agf.b #FD:ComponentStrongholdLibrary/field_75007_b #strongholdLibraryChestContents
|
public ahv.b #FD:ComponentStrongholdLibrary/field_75007_b #strongholdLibraryChestContents
|
||||||
public agk.c #FD:ComponentStrongholdRoomCrossing/field_75014_c #strongholdCorridorChestContents
|
public aia.c #FD:ComponentStrongholdRoomCrossing/field_75014_c #strongholdCorridorChestContents
|
||||||
public ahl.a #FD:ComponentVillageHouse2/field_74918_a #villageBlacksmithChestContents
|
public ajb.a #FD:ComponentVillageHouse2/field_74918_a #villageBlacksmithChestContents
|
||||||
# AnvilChunkLoader.chunkSaveLocation
|
# AnvilChunkLoader.chunkSaveLocation
|
||||||
public acj.d #FD:AnvilChunkLoader/field_75825_d
|
public adz.d #FD:AnvilChunkLoader/field_75825_d
|
||||||
# ChunkProviderServer.currentChunkLoader
|
# ChunkProviderServer.currentChunkLoader
|
||||||
public iy.e #FD:ChunkProviderServer/field_73247_e
|
public jo.e #FD:ChunkProviderServer/field_73247_e
|
||||||
# PlayerManager
|
# PlayerManager
|
||||||
public iw.a(IIZ)Lix; #MD:PlayerManager/func_72690_a #getOrCreateChunkWatcher
|
public jm.a(IIZ)Ljn; #MD:PlayerManager/func_72690_a #getOrCreateChunkWatcher
|
||||||
# PlayerInstance
|
# PlayerInstance
|
||||||
public ix #CL:PlayerInstance
|
public jn #CL:PlayerInstance
|
||||||
# World
|
# World
|
||||||
public-f aab.A #FD:World/field_72982_D #villageCollectionObj
|
public-f abr.A #FD:World/field_72982_D #villageCollectionObj
|
||||||
public aab.G #FD:World/field_72993_I #activeChunkSet
|
public abr.G #FD:World/field_72993_I #activeChunkSet
|
||||||
# EntityLiving
|
# EntityLiving
|
||||||
public ng.be #FD:EntityLiving/field_70728_aV #experienceValue
|
public od.b #FD:EntityLiving/field_70728_aV #experienceValue
|
||||||
public ng.bt #FD:EntityLiving/field_94063_bt #combatTracker
|
# -- MISSING MAPPING public ng.bt #FD:EntityLiving/field_94063_bt #combatTracker
|
||||||
public ng.bp #FD:EntityLiving/field_70715_bh #targetTasks
|
public od.d #FD:EntityLiving/field_70715_bh #targetTasks
|
||||||
# GuiFlatPresets
|
# GuiFlatPresets
|
||||||
public axm.a(Ljava/lang/String;ILaav;Ljava/util/List;[Laei;)V #MD:GuiFlatPresets/func_82294_a
|
public avq.a(Ljava/lang/String;ILacl;Ljava/util/List;[Lafy;)V #MD:GuiFlatPresets/func_82294_a
|
||||||
public axm.a(Ljava/lang/String;ILaav;[Laei;)V #MD:GuiFlatPresets/func_82297_a
|
public avq.a(Ljava/lang/String;ILacl;[Lafy;)V #MD:GuiFlatPresets/func_82297_a
|
||||||
# BiomeGenBase
|
# BiomeGenBase
|
||||||
public aav.*() #MD:BiomeGenBase/* #Everything protected->public
|
public acl.*() #MD:BiomeGenBase/* #Everything protected->public
|
||||||
# MapGenVillage
|
# MapGenVillage
|
||||||
public-f agz.e #FD:MapGenVillage/field_75055_e #villageSpawnBiomes
|
public-f aip.e #FD:MapGenVillage/field_75055_e #villageSpawnBiomes
|
||||||
# ShapedRecipes
|
# ShapedRecipes
|
||||||
public+f yn.d #FD:ShapedRecipes/field_77574_d #recipeItems
|
public+f aad.d #FD:ShapedRecipes/field_77574_d #recipeItems
|
||||||
public+f yn.b #FD:ShapedRecipes/field_77576_b #recipeWidth
|
public+f aad.b #FD:ShapedRecipes/field_77576_b #recipeWidth
|
||||||
public+f yn.c #FD:ShapedRecipes/field_77577_c #recipeHeight
|
public+f aad.c #FD:ShapedRecipes/field_77577_c #recipeHeight
|
||||||
# ShapelessRecipes
|
# ShapelessRecipes
|
||||||
public yo.b #FD:ShapelessRecipes/field_77579_b #recipeItems
|
public aae.b #FD:ShapelessRecipes/field_77579_b #recipeItems
|
||||||
# GuiContainer
|
# GuiContainer
|
||||||
protected ayl.a(Lul;)V #MD:GuiContainer/func_74192_a #drawSlotInventory
|
protected awp.a(Lvz;)V #MD:GuiContainer/func_74192_a #drawSlotInventory
|
||||||
# ContainerPlayer
|
# ContainerPlayer
|
||||||
protected tz.h #FD:ContainerPlayer/field_82862_h #player
|
protected vq.h #FD:ContainerPlayer/field_82862_h #player
|
||||||
# BlockButton
|
# BlockButton
|
||||||
protected ali.n(Laab;III)V #MD:BlockButton/func_82535_o #checkActivation
|
protected amy.n(Labr;III)V #MD:BlockButton/func_82535_o #checkActivation
|
||||||
protected-f ali.a #FD:BlockButton/field_82537_a #sensible
|
protected-f amy.a #FD:BlockButton/field_82537_a #sensible
|
||||||
# BiomeDecorator
|
# BiomeDecorator
|
||||||
public aaz.* #FD:BiomeDecorator/* # All private -> protected
|
public acp.* #FD:BiomeDecorator/* # All private -> protected
|
||||||
# CreativeTabs
|
# CreativeTabs
|
||||||
public-f ve.a #FD:CreativeTabs/field_78032_a # creativeTabArray non-final
|
public-f wr.a #FD:CreativeTabs/field_78032_a # creativeTabArray non-final
|
||||||
# Packet
|
# Packet
|
||||||
public ei.a(IZZLjava/lang/Class;)V #MD:Packet/func_73285_a #addIdClassMapping
|
public ex.a(IZZLjava/lang/Class;)V #MD:Packet/func_73285_a #addIdClassMapping
|
||||||
# SaveHandler
|
# SaveHandler
|
||||||
public ajt.b()Ljava/io/File; #MD:SaveHandler/func_75765_b
|
public alj.b()Ljava/io/File; #MD:SaveHandler/func_75765_b
|
||||||
# World stuff
|
# World stuff
|
||||||
public aab.b(Lmp;)V #MD:World/func_72847_b #releaseEntitySkin
|
public abr.b(Lnk;)V #MD:World/func_72847_b #releaseEntitySkin
|
||||||
public aab.m #FD:World/field_73003_n #prevRainingStrength
|
public abr.m #FD:World/field_73003_n #prevRainingStrength
|
||||||
public aab.n #FD:World/field_73004_o #rainingStrength
|
public abr.n #FD:World/field_73004_o #rainingStrength
|
||||||
public aab.p #FD:World/field_73017_q #thunderingStrength
|
public abr.p #FD:World/field_73017_q #thunderingStrength
|
||||||
public aab.o #FD:World/field_73018_p #prevThunderingStrength
|
public abr.o #FD:World/field_73018_p #prevThunderingStrength
|
||||||
#WorldClient
|
#WorldClient
|
||||||
public bds.b(Lmp;)V #MD:WorldClient/func_72847_b #releaseEntitySkin
|
public bcu.b(Lnk;)V #MD:WorldClient/func_72847_b #releaseEntitySkin
|
||||||
#WorldServer
|
#WorldServer
|
||||||
public iz.b(Lmp;)V #MD:WorldServer/func_72847_b #releaseEntitySkin
|
public jp.b(Lnk;)V #MD:WorldServer/func_72847_b #releaseEntitySkin
|
||||||
public iz.N #FD:WorldServer/field_73068_P #allPlayersSleeping
|
public jp.N #FD:WorldServer/field_73068_P #allPlayersSleeping
|
||||||
#TextureMap
|
#TextureMap
|
||||||
public bir.a #FD:TextureMap/field_94255_a
|
public bhz.g #FD:TextureMap/field_94255_a
|
||||||
public bir.b #FD:TextureMap/field_94253_b
|
# -- MISSING MAPPING public bir.b #FD:TextureMap/field_94253_b
|
||||||
public bir.c #FD:TextureMap/field_94254_c
|
public bhz.h #FD:TextureMap/field_94254_c
|
||||||
public bir.d #FD:TextureMap/field_94251_d
|
# -- MISSING MAPPING public bir.d #FD:TextureMap/field_94251_d
|
||||||
#Potion
|
#Potion
|
||||||
public mk.b(II)Lmk; #MD:Potion/func_76399_b #setIconIndex
|
public nf.b(II)Lnf; #MD:Potion/func_76399_b #setIconIndex
|
||||||
#PotionHelper
|
#PotionHelper
|
||||||
public xu.m #FD:PotionHelper/field_77927_l #potionRequirements
|
public zk.m #FD:PotionHelper/field_77927_l #potionRequirements
|
||||||
public xu.n #FD:PotionHelper/field_77928_m #potionAmplifiers
|
public zk.n #FD:PotionHelper/field_77928_m #potionAmplifiers
|
||||||
#PotionEffect
|
#PotionEffect
|
||||||
public ml.b #FD:PotionEffect/field_76460_b #duration
|
public ng.b #FD:PotionEffect/field_76460_b #duration
|
||||||
#BlockFluid
|
#BlockFluid
|
||||||
protected ane.a #FD:BlockFluid/field_94425_a #theIcon
|
protected aov.a #FD:BlockFluid/field_94425_a #theIcon
|
||||||
#GuiIngame
|
#GuiIngame
|
||||||
protected aww.* #FD:GuiIngame/* # All private -> protected
|
protected ava.* #FD:GuiIngame/* # All private -> protected
|
||||||
protected aww.*() #MD:GuiIngame/* # All private -> protected
|
protected ava.*() #MD:GuiIngame/* # All private -> protected
|
||||||
#ItemStack
|
#ItemStack
|
||||||
default wm.e #FD:ItemStack/field_77991_e # make default access for itemDamage
|
default xz.f #FD:ItemStack/field_77991_e # make default access for itemDamage
|
||||||
|
#GuiSlot
|
||||||
|
protected avx.b(IIII)V #MD:GuiSlot/func_77206_b #overlayBackground
|
||||||
|
#EntityPlayer
|
||||||
|
public ua.bu #FD:EntityPlayer/field_71092_bJ #username
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package net.minecraftforge.common;
|
package net.minecraftforge.common;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.util.ChatMessageComponent;
|
||||||
import net.minecraft.util.ChunkCoordinates;
|
import net.minecraft.util.ChunkCoordinates;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
@ -9,8 +10,7 @@ public class FakePlayer extends EntityPlayer
|
||||||
{
|
{
|
||||||
public FakePlayer(World world, String name)
|
public FakePlayer(World world, String name)
|
||||||
{
|
{
|
||||||
super(world);
|
super(world, name);
|
||||||
this.username = name;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void sendChatToPlayer(String s){}
|
public void sendChatToPlayer(String s){}
|
||||||
|
@ -19,4 +19,7 @@ public class FakePlayer extends EntityPlayer
|
||||||
{
|
{
|
||||||
return new ChunkCoordinates(0,0,0);
|
return new ChunkCoordinates(0,0,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void func_110122_a(ChatMessageComponent chatmessagecomponent){}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,16 +1,14 @@
|
||||||
package net.minecraftforge.common;
|
package net.minecraftforge.common;
|
||||||
|
|
||||||
import java.util.*;
|
import java.util.ArrayList;
|
||||||
import java.util.Map.Entry;
|
import java.util.Arrays;
|
||||||
|
import java.util.HashMap;
|
||||||
import com.google.common.collect.ArrayListMultimap;
|
import java.util.HashSet;
|
||||||
import com.google.common.collect.ListMultimap;
|
import java.util.List;
|
||||||
|
|
||||||
import cpw.mods.fml.common.FMLLog;
|
|
||||||
import cpw.mods.fml.common.Loader;
|
|
||||||
|
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLiving;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
|
@ -19,6 +17,8 @@ import net.minecraft.item.ItemAxe;
|
||||||
import net.minecraft.item.ItemPickaxe;
|
import net.minecraft.item.ItemPickaxe;
|
||||||
import net.minecraft.item.ItemSpade;
|
import net.minecraft.item.ItemSpade;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.network.NetServerHandler;
|
||||||
|
import net.minecraft.util.ChatMessageComponent;
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.util.EnumMovingObjectType;
|
import net.minecraft.util.EnumMovingObjectType;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
|
@ -26,9 +26,16 @@ import net.minecraft.util.WeightedRandom;
|
||||||
import net.minecraft.util.WeightedRandomItem;
|
import net.minecraft.util.WeightedRandomItem;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraftforge.event.ForgeEventFactory;
|
import net.minecraftforge.event.ForgeEventFactory;
|
||||||
|
import net.minecraftforge.event.ServerChatEvent;
|
||||||
import net.minecraftforge.event.entity.item.ItemTossEvent;
|
import net.minecraftforge.event.entity.item.ItemTossEvent;
|
||||||
import net.minecraftforge.event.entity.living.*;
|
import net.minecraftforge.event.entity.living.LivingAttackEvent;
|
||||||
import net.minecraftforge.event.entity.living.LivingEvent.*;
|
import net.minecraftforge.event.entity.living.LivingDeathEvent;
|
||||||
|
import net.minecraftforge.event.entity.living.LivingDropsEvent;
|
||||||
|
import net.minecraftforge.event.entity.living.LivingEvent.LivingJumpEvent;
|
||||||
|
import net.minecraftforge.event.entity.living.LivingEvent.LivingUpdateEvent;
|
||||||
|
import net.minecraftforge.event.entity.living.LivingFallEvent;
|
||||||
|
import net.minecraftforge.event.entity.living.LivingHurtEvent;
|
||||||
|
import net.minecraftforge.event.entity.living.LivingSetAttackTargetEvent;
|
||||||
|
|
||||||
public class ForgeHooks
|
public class ForgeHooks
|
||||||
{
|
{
|
||||||
|
@ -307,54 +314,49 @@ public class ForgeHooks
|
||||||
//Optifine Helper Functions u.u, these are here specifically for Optifine
|
//Optifine Helper Functions u.u, these are here specifically for Optifine
|
||||||
//Note: When using Optfine, these methods are invoked using reflection, which
|
//Note: When using Optfine, these methods are invoked using reflection, which
|
||||||
//incurs a major performance penalty.
|
//incurs a major performance penalty.
|
||||||
public static void onLivingSetAttackTarget(EntityLiving entity, EntityLiving target)
|
public static void onLivingSetAttackTarget(EntityLivingBase entity, EntityLivingBase target)
|
||||||
{
|
{
|
||||||
MinecraftForge.EVENT_BUS.post(new LivingSetAttackTargetEvent(entity, target));
|
MinecraftForge.EVENT_BUS.post(new LivingSetAttackTargetEvent(entity, target));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean onLivingUpdate(EntityLiving entity)
|
public static boolean onLivingUpdate(EntityLivingBase entity)
|
||||||
{
|
{
|
||||||
return MinecraftForge.EVENT_BUS.post(new LivingUpdateEvent(entity));
|
return MinecraftForge.EVENT_BUS.post(new LivingUpdateEvent(entity));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean onLivingAttack(EntityLiving entity, DamageSource src, int amount)
|
public static boolean onLivingAttack(EntityLivingBase entity, DamageSource src, float amount)
|
||||||
{
|
{
|
||||||
return MinecraftForge.EVENT_BUS.post(new LivingAttackEvent(entity, src, amount));
|
return MinecraftForge.EVENT_BUS.post(new LivingAttackEvent(entity, src, amount));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int onLivingHurt(EntityLiving entity, DamageSource src, int amount)
|
public static float onLivingHurt(EntityLivingBase entity, DamageSource src, float amount)
|
||||||
{
|
{
|
||||||
LivingHurtEvent event = new LivingHurtEvent(entity, src, amount);
|
LivingHurtEvent event = new LivingHurtEvent(entity, src, amount);
|
||||||
return (MinecraftForge.EVENT_BUS.post(event) ? 0 : event.ammount);
|
return (MinecraftForge.EVENT_BUS.post(event) ? 0 : event.ammount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean onLivingDeath(EntityLiving entity, DamageSource src)
|
public static boolean onLivingDeath(EntityLivingBase entity, DamageSource src)
|
||||||
{
|
{
|
||||||
return MinecraftForge.EVENT_BUS.post(new LivingDeathEvent(entity, src));
|
return MinecraftForge.EVENT_BUS.post(new LivingDeathEvent(entity, src));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean onLivingDrops(EntityLiving entity, DamageSource source, ArrayList<EntityItem> drops, int lootingLevel, boolean recentlyHit, int specialDropValue)
|
public static boolean onLivingDrops(EntityLivingBase entity, DamageSource source, ArrayList<EntityItem> drops, int lootingLevel, boolean recentlyHit, int specialDropValue)
|
||||||
{
|
{
|
||||||
return MinecraftForge.EVENT_BUS.post(new LivingDropsEvent(entity, source, drops, lootingLevel, recentlyHit, specialDropValue));
|
return MinecraftForge.EVENT_BUS.post(new LivingDropsEvent(entity, source, drops, lootingLevel, recentlyHit, specialDropValue));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static float onLivingFall(EntityLiving entity, float distance)
|
public static float onLivingFall(EntityLivingBase entity, float distance)
|
||||||
{
|
{
|
||||||
LivingFallEvent event = new LivingFallEvent(entity, distance);
|
LivingFallEvent event = new LivingFallEvent(entity, distance);
|
||||||
return (MinecraftForge.EVENT_BUS.post(event) ? 0.0f : event.distance);
|
return (MinecraftForge.EVENT_BUS.post(event) ? 0.0f : event.distance);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isLivingOnLadder(Block block, World world, int x, int y, int z, EntityLiving entity)
|
public static boolean isLivingOnLadder(Block block, World world, int x, int y, int z, EntityLivingBase entity)
|
||||||
{
|
{
|
||||||
return block != null && block.isLadder(world, x, y, z, entity);
|
return block != null && block.isLadder(world, x, y, z, entity);
|
||||||
}
|
}
|
||||||
@Deprecated //See above
|
|
||||||
public static boolean isLivingOnLadder(Block block, World world, int x, int y, int z)
|
|
||||||
{
|
|
||||||
return block != null && block.isLadder(world, x, y, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void onLivingJump(EntityLiving entity)
|
public static void onLivingJump(EntityLivingBase entity)
|
||||||
{
|
{
|
||||||
MinecraftForge.EVENT_BUS.post(new LivingJumpEvent(entity));
|
MinecraftForge.EVENT_BUS.post(new LivingJumpEvent(entity));
|
||||||
}
|
}
|
||||||
|
@ -386,4 +388,14 @@ public class ForgeHooks
|
||||||
Block block = Block.blocksList[world.getBlockId(x, y, z)];
|
Block block = Block.blocksList[world.getBlockId(x, y, z)];
|
||||||
return (block == null ? 0 : block.getEnchantPowerBonus(world, x, y, z));
|
return (block == null ? 0 : block.getEnchantPowerBonus(world, x, y, z));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static ChatMessageComponent onServerChatEvent(NetServerHandler net, String raw, ChatMessageComponent comp)
|
||||||
|
{
|
||||||
|
ServerChatEvent event = new ServerChatEvent(net.playerEntity, raw, comp);
|
||||||
|
if (MinecraftForge.EVENT_BUS.post(event))
|
||||||
|
{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return event.component;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,11 +8,11 @@ package net.minecraftforge.common;
|
||||||
public class ForgeVersion
|
public class ForgeVersion
|
||||||
{
|
{
|
||||||
//This number is incremented every time we remove deprecated code/major API changes, never reset
|
//This number is incremented every time we remove deprecated code/major API changes, never reset
|
||||||
public static final int majorVersion = 7;
|
public static final int majorVersion = 8;
|
||||||
//This number is incremented every minecraft release, never reset
|
//This number is incremented every minecraft release, never reset
|
||||||
public static final int minorVersion = 8;
|
public static final int minorVersion = 9;
|
||||||
//This number is incremented every time a interface changes or new major feature is added, and reset every Minecraft version
|
//This number is incremented every time a interface changes or new major feature is added, and reset every Minecraft version
|
||||||
public static final int revisionVersion = 1;
|
public static final int revisionVersion = 0;
|
||||||
//This number is incremented every time Jenkins builds Forge, and never reset. Should always be 0 in the repo code.
|
//This number is incremented every time Jenkins builds Forge, and never reset. Should always be 0 in the repo code.
|
||||||
public static final int buildVersion = 0;
|
public static final int buildVersion = 0;
|
||||||
|
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
/**
|
|
||||||
* This software is provided under the terms of the Minecraft Forge Public
|
|
||||||
* License v1.0.
|
|
||||||
*/
|
|
||||||
|
|
||||||
package net.minecraftforge.common;
|
|
||||||
|
|
||||||
import net.minecraft.item.ItemStack;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This interface has to be implemented by an instance of ItemArmor.
|
|
||||||
* It allows for the application of a custom texture file to the player skin
|
|
||||||
* when the armor is worn.
|
|
||||||
*/
|
|
||||||
@Deprecated //See Item.getArmorTexture
|
|
||||||
public interface IArmorTextureProvider
|
|
||||||
{
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This interface has to return the path to a file that is the same
|
|
||||||
* format as iron_1.png (or any of the other armor files). It will be
|
|
||||||
* applied to the player skin when the armor is worn.
|
|
||||||
*/
|
|
||||||
public String getArmorTextureFile(ItemStack itemstack);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
|
@ -9,7 +9,7 @@ import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.ItemArmor;
|
import net.minecraft.item.ItemArmor;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -39,7 +39,7 @@ public interface ISpecialArmor
|
||||||
* @param slot The armor slot the item is in.
|
* @param slot The armor slot the item is in.
|
||||||
* @return A ArmorProperties instance holding information about how the armor effects damage.
|
* @return A ArmorProperties instance holding information about how the armor effects damage.
|
||||||
*/
|
*/
|
||||||
public ArmorProperties getProperties(EntityLiving player, ItemStack armor, DamageSource source, double damage, int slot);
|
public ArmorProperties getProperties(EntityLivingBase player, ItemStack armor, DamageSource source, double damage, int slot);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the displayed effective armor.
|
* Get the displayed effective armor.
|
||||||
|
@ -63,7 +63,7 @@ public interface ISpecialArmor
|
||||||
* @param damage The amount of damage being applied to the armor
|
* @param damage The amount of damage being applied to the armor
|
||||||
* @param slot The armor slot the item is in.
|
* @param slot The armor slot the item is in.
|
||||||
*/
|
*/
|
||||||
public abstract void damageArmor(EntityLiving entity, ItemStack stack, DamageSource source, int damage, int slot);
|
public abstract void damageArmor(EntityLivingBase entity, ItemStack stack, DamageSource source, int damage, int slot);
|
||||||
|
|
||||||
public static class ArmorProperties implements Comparable<ArmorProperties>
|
public static class ArmorProperties implements Comparable<ArmorProperties>
|
||||||
{
|
{
|
||||||
|
@ -90,7 +90,7 @@ public interface ISpecialArmor
|
||||||
* @param damage The total damage being done
|
* @param damage The total damage being done
|
||||||
* @return The left over damage that has not been absorbed by the armor
|
* @return The left over damage that has not been absorbed by the armor
|
||||||
*/
|
*/
|
||||||
public static int ApplyArmor(EntityLiving entity, ItemStack[] inventory, DamageSource source, double damage)
|
public static float ApplyArmor(EntityLivingBase entity, ItemStack[] inventory, DamageSource source, double damage)
|
||||||
{
|
{
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
{
|
{
|
||||||
|
@ -167,13 +167,11 @@ public interface ISpecialArmor
|
||||||
}
|
}
|
||||||
damage -= (damage * ratio);
|
damage -= (damage * ratio);
|
||||||
}
|
}
|
||||||
damage += entity.carryoverDamage;
|
|
||||||
if (DEBUG)
|
if (DEBUG)
|
||||||
{
|
{
|
||||||
System.out.println("Return: " + (int)(damage / 25D) + " " + damage);
|
System.out.println("Return: " + (int)(damage / 25.0F) + " " + damage);
|
||||||
}
|
}
|
||||||
entity.carryoverDamage = (int)damage % 25;
|
return (float)(damage / 25.0F);
|
||||||
return (int)(damage / 25D);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,23 +0,0 @@
|
||||||
package net.minecraftforge.common;
|
|
||||||
|
|
||||||
import net.minecraft.entity.Entity;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This interface should be implemented by an Entity that can be 'thrown', like snowballs.
|
|
||||||
* This was created to mimic ModLoaderMP's 'owner' functionality.
|
|
||||||
*/
|
|
||||||
@Deprecated //Moved to FML cpw.mods.fml.common.registry.IThrowableEntity
|
|
||||||
public interface IThrowableEntity
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Gets the entity that threw/created this entity.
|
|
||||||
* @return The owner instance, Null if none.
|
|
||||||
*/
|
|
||||||
public Entity getThrower();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sets the entity that threw/created this entity.
|
|
||||||
* @param entity The new thrower/creator.
|
|
||||||
*/
|
|
||||||
public void setThrower(Entity entity);
|
|
||||||
}
|
|
|
@ -1,19 +1,20 @@
|
||||||
package net.minecraftforge.event;
|
package net.minecraftforge.event;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.entity.player.EntityPlayerMP;
|
||||||
|
import net.minecraft.util.ChatMessageComponent;
|
||||||
|
|
||||||
@Cancelable
|
@Cancelable
|
||||||
public class ServerChatEvent extends Event
|
public class ServerChatEvent extends Event
|
||||||
{
|
{
|
||||||
public final String message, username;
|
public final String message, username;
|
||||||
public final EntityPlayerMP player;
|
public final EntityPlayerMP player;
|
||||||
public String line;
|
public ChatMessageComponent component;
|
||||||
public ServerChatEvent(EntityPlayerMP player, String message, String line)
|
public ServerChatEvent(EntityPlayerMP player, String message, ChatMessageComponent component)
|
||||||
{
|
{
|
||||||
super();
|
super();
|
||||||
this.message = message;
|
this.message = message;
|
||||||
this.player = player;
|
this.player = player;
|
||||||
this.username = player.username;
|
this.username = player.username;
|
||||||
this.line = line;
|
this.component = component;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package net.minecraftforge.event.entity.living;
|
package net.minecraftforge.event.entity.living;
|
||||||
|
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLiving;
|
||||||
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraftforge.event.Cancelable;
|
import net.minecraftforge.event.Cancelable;
|
||||||
import net.minecraftforge.event.Event;
|
import net.minecraftforge.event.Event;
|
||||||
|
|
||||||
|
@ -16,9 +17,9 @@ public class EnderTeleportEvent extends LivingEvent
|
||||||
public double targetX;
|
public double targetX;
|
||||||
public double targetY;
|
public double targetY;
|
||||||
public double targetZ;
|
public double targetZ;
|
||||||
public int attackDamage;
|
public float attackDamage;
|
||||||
|
|
||||||
public EnderTeleportEvent(EntityLiving entity, double targetX, double targetY, double targetZ, int attackDamage)
|
public EnderTeleportEvent(EntityLivingBase entity, double targetX, double targetY, double targetZ, float attackDamage)
|
||||||
{
|
{
|
||||||
super(entity);
|
super(entity);
|
||||||
this.targetX = targetX;
|
this.targetX = targetX;
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package net.minecraftforge.event.entity.living;
|
package net.minecraftforge.event.entity.living;
|
||||||
|
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraftforge.event.Cancelable;
|
import net.minecraftforge.event.Cancelable;
|
||||||
|
|
||||||
@Cancelable
|
@Cancelable
|
||||||
public class LivingAttackEvent extends LivingEvent
|
public class LivingAttackEvent extends LivingEvent
|
||||||
{
|
{
|
||||||
public final DamageSource source;
|
public final DamageSource source;
|
||||||
public final int ammount;
|
public final float ammount;
|
||||||
public LivingAttackEvent(EntityLiving entity, DamageSource source, int ammount)
|
public LivingAttackEvent(EntityLivingBase entity, DamageSource source, float ammount)
|
||||||
{
|
{
|
||||||
super(entity);
|
super(entity);
|
||||||
this.source = source;
|
this.source = source;
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
package net.minecraftforge.event.entity.living;
|
package net.minecraftforge.event.entity.living;
|
||||||
|
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraftforge.event.Cancelable;
|
import net.minecraftforge.event.Cancelable;
|
||||||
|
|
||||||
@Cancelable
|
@Cancelable
|
||||||
public class LivingDeathEvent extends LivingEvent
|
public class LivingDeathEvent extends LivingEvent
|
||||||
{
|
{
|
||||||
public final DamageSource source;
|
public final DamageSource source;
|
||||||
public LivingDeathEvent(EntityLiving entity, DamageSource source)
|
public LivingDeathEvent(EntityLivingBase entity, DamageSource source)
|
||||||
{
|
{
|
||||||
super(entity);
|
super(entity);
|
||||||
this.source = source;
|
this.source = source;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import java.util.ArrayList;
|
||||||
|
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraftforge.event.Cancelable;
|
import net.minecraftforge.event.Cancelable;
|
||||||
|
|
||||||
@Cancelable
|
@Cancelable
|
||||||
|
@ -16,7 +16,7 @@ public class LivingDropsEvent extends LivingEvent
|
||||||
public final boolean recentlyHit;
|
public final boolean recentlyHit;
|
||||||
public final int specialDropValue;
|
public final int specialDropValue;
|
||||||
|
|
||||||
public LivingDropsEvent(EntityLiving entity, DamageSource source, ArrayList<EntityItem> drops, int lootingLevel, boolean recentlyHit, int specialDropValue)
|
public LivingDropsEvent(EntityLivingBase entity, DamageSource source, ArrayList<EntityItem> drops, int lootingLevel, boolean recentlyHit, int specialDropValue)
|
||||||
{
|
{
|
||||||
super(entity);
|
super(entity);
|
||||||
this.source = source;
|
this.source = source;
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package net.minecraftforge.event.entity.living;
|
package net.minecraftforge.event.entity.living;
|
||||||
|
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraftforge.event.Cancelable;
|
import net.minecraftforge.event.Cancelable;
|
||||||
import net.minecraftforge.event.entity.EntityEvent;
|
import net.minecraftforge.event.entity.EntityEvent;
|
||||||
|
|
||||||
public class LivingEvent extends EntityEvent
|
public class LivingEvent extends EntityEvent
|
||||||
{
|
{
|
||||||
public final EntityLiving entityLiving;
|
public final EntityLivingBase entityLiving;
|
||||||
public LivingEvent(EntityLiving entity)
|
public LivingEvent(EntityLivingBase entity)
|
||||||
{
|
{
|
||||||
super(entity);
|
super(entity);
|
||||||
entityLiving = entity;
|
entityLiving = entity;
|
||||||
|
@ -16,11 +16,11 @@ public class LivingEvent extends EntityEvent
|
||||||
@Cancelable
|
@Cancelable
|
||||||
public static class LivingUpdateEvent extends LivingEvent
|
public static class LivingUpdateEvent extends LivingEvent
|
||||||
{
|
{
|
||||||
public LivingUpdateEvent(EntityLiving e){ super(e); }
|
public LivingUpdateEvent(EntityLivingBase e){ super(e); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public static class LivingJumpEvent extends LivingEvent
|
public static class LivingJumpEvent extends LivingEvent
|
||||||
{
|
{
|
||||||
public LivingJumpEvent(EntityLiving e){ super(e); }
|
public LivingJumpEvent(EntityLivingBase e){ super(e); }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package net.minecraftforge.event.entity.living;
|
package net.minecraftforge.event.entity.living;
|
||||||
|
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraftforge.event.Cancelable;
|
import net.minecraftforge.event.Cancelable;
|
||||||
|
|
||||||
@Cancelable
|
@Cancelable
|
||||||
public class LivingFallEvent extends LivingEvent
|
public class LivingFallEvent extends LivingEvent
|
||||||
{
|
{
|
||||||
public float distance;
|
public float distance;
|
||||||
public LivingFallEvent(EntityLiving entity, float distance)
|
public LivingFallEvent(EntityLivingBase entity, float distance)
|
||||||
{
|
{
|
||||||
super(entity);
|
super(entity);
|
||||||
this.distance = distance;
|
this.distance = distance;
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
package net.minecraftforge.event.entity.living;
|
package net.minecraftforge.event.entity.living;
|
||||||
|
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraftforge.event.Cancelable;
|
import net.minecraftforge.event.Cancelable;
|
||||||
|
|
||||||
@Cancelable
|
@Cancelable
|
||||||
public class LivingHurtEvent extends LivingEvent
|
public class LivingHurtEvent extends LivingEvent
|
||||||
{
|
{
|
||||||
public final DamageSource source;
|
public final DamageSource source;
|
||||||
public int ammount;
|
public float ammount;
|
||||||
public LivingHurtEvent(EntityLiving entity, DamageSource source, int ammount)
|
public LivingHurtEvent(EntityLivingBase entity, DamageSource source, float ammount)
|
||||||
{
|
{
|
||||||
super(entity);
|
super(entity);
|
||||||
this.source = source;
|
this.source = source;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package net.minecraftforge.event.entity.living;
|
package net.minecraftforge.event.entity.living;
|
||||||
|
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
|
||||||
public class LivingSetAttackTargetEvent extends LivingEvent
|
public class LivingSetAttackTargetEvent extends LivingEvent
|
||||||
{
|
{
|
||||||
|
|
||||||
public final EntityLiving target;
|
public final EntityLivingBase target;
|
||||||
public LivingSetAttackTargetEvent(EntityLiving entity, EntityLiving target)
|
public LivingSetAttackTargetEvent(EntityLivingBase entity, EntityLivingBase target)
|
||||||
{
|
{
|
||||||
super(entity);
|
super(entity);
|
||||||
this.target = target;
|
this.target = target;
|
||||||
|
|
|
@ -66,17 +66,6 @@ public class LiquidStack
|
||||||
return nbt;
|
return nbt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* NO-OP now. Use {@link #loadLiquidStackFromNBT(NBTTagCompound)} to get a new instance
|
|
||||||
*
|
|
||||||
* @param nbt
|
|
||||||
*/
|
|
||||||
@Deprecated
|
|
||||||
public void readFromNBT(NBTTagCompound nbt)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return A copy of this LiquidStack
|
* @return A copy of this LiquidStack
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -2,6 +2,7 @@ package net.minecraftforge.transformers;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.launchwrapper.IClassTransformer;
|
||||||
import net.minecraftforge.event.Event;
|
import net.minecraftforge.event.Event;
|
||||||
import net.minecraftforge.event.ListenerList;
|
import net.minecraftforge.event.ListenerList;
|
||||||
|
|
||||||
|
@ -11,8 +12,6 @@ import static org.objectweb.asm.Opcodes.*;
|
||||||
import static org.objectweb.asm.Type.*;
|
import static org.objectweb.asm.Type.*;
|
||||||
import static org.objectweb.asm.ClassWriter.*;
|
import static org.objectweb.asm.ClassWriter.*;
|
||||||
|
|
||||||
import cpw.mods.fml.relauncher.IClassTransformer;
|
|
||||||
|
|
||||||
public class EventTransformer implements IClassTransformer
|
public class EventTransformer implements IClassTransformer
|
||||||
{
|
{
|
||||||
public EventTransformer()
|
public EventTransformer()
|
||||||
|
|
Binary file not shown.
2
fml
2
fml
|
@ -1 +1 @@
|
||||||
Subproject commit 05a854cd2af53ca822ee8b249b0b3bbe44f94675
|
Subproject commit 7fecf2ad6bdd918149a3c43453f6a78bd11e5404
|
|
@ -18,7 +18,7 @@
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
import net.minecraft.enchantment.EnchantmentHelper;
|
import net.minecraft.enchantment.EnchantmentHelper;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
+import net.minecraft.entity.EnumCreatureType;
|
+import net.minecraft.entity.EnumCreatureType;
|
||||||
import net.minecraft.entity.item.EntityItem;
|
import net.minecraft.entity.item.EntityItem;
|
||||||
import net.minecraft.entity.item.EntityXPOrb;
|
import net.minecraft.entity.item.EntityXPOrb;
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
/**
|
/**
|
||||||
* used as foreach item, if item.tab = current tab, display it on the screen
|
* used as foreach item, if item.tab = current tab, display it on the screen
|
||||||
*/
|
*/
|
||||||
@@ -454,9 +471,10 @@
|
@@ -460,9 +477,10 @@
|
||||||
return this.needsRandomTick;
|
return this.needsRandomTick;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -479,7 +497,7 @@
|
@@ -485,7 +503,7 @@
|
||||||
*/
|
*/
|
||||||
public float getBlockBrightness(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
|
public float getBlockBrightness(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@@ -489,7 +507,7 @@
|
@@ -495,7 +513,7 @@
|
||||||
*/
|
*/
|
||||||
public int getMixedBrightnessForBlock(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
|
public int getMixedBrightnessForBlock(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
|
@ -84,7 +84,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@@ -639,7 +657,13 @@
|
@@ -645,7 +663,13 @@
|
||||||
/**
|
/**
|
||||||
* ejects contained items into the world, and notifies neighbours of an update, as appropriate
|
* ejects contained items into the world, and notifies neighbours of an update, as appropriate
|
||||||
*/
|
*/
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the quantity of items to drop on block destruction.
|
* Returns the quantity of items to drop on block destruction.
|
||||||
@@ -664,7 +688,7 @@
|
@@ -670,7 +694,7 @@
|
||||||
public float getPlayerRelativeBlockHardness(EntityPlayer par1EntityPlayer, World par2World, int par3, int par4, int par5)
|
public float getPlayerRelativeBlockHardness(EntityPlayer par1EntityPlayer, World par2World, int par3, int par4, int par5)
|
||||||
{
|
{
|
||||||
float f = this.getBlockHardness(par2World, par3, par4, par5);
|
float f = this.getBlockHardness(par2World, par3, par4, par5);
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -682,18 +706,13 @@
|
@@ -688,18 +712,13 @@
|
||||||
{
|
{
|
||||||
if (!par1World.isRemote)
|
if (!par1World.isRemote)
|
||||||
{
|
{
|
||||||
|
@ -131,7 +131,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -926,7 +945,8 @@
|
@@ -932,7 +951,8 @@
|
||||||
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
|
public boolean canPlaceBlockAt(World par1World, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
int l = par1World.getBlockId(par2, par3, par4);
|
int l = par1World.getBlockId(par2, par3, par4);
|
||||||
|
@ -141,7 +141,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1086,7 +1106,7 @@
|
@@ -1092,7 +1112,7 @@
|
||||||
par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1);
|
par2EntityPlayer.addStat(StatList.mineBlockStatArray[this.blockID], 1);
|
||||||
par2EntityPlayer.addExhaustion(0.025F);
|
par2EntityPlayer.addExhaustion(0.025F);
|
||||||
|
|
||||||
|
@ -150,7 +150,7 @@
|
||||||
{
|
{
|
||||||
ItemStack itemstack = this.createStackedBlock(par6);
|
ItemStack itemstack = this.createStackedBlock(par6);
|
||||||
|
|
||||||
@@ -1102,12 +1122,13 @@
|
@@ -1108,12 +1128,13 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1443,4 +1464,950 @@
|
@@ -1453,4 +1474,939 @@
|
||||||
canBlockGrass[0] = true;
|
canBlockGrass[0] = true;
|
||||||
StatList.initBreakableStats();
|
StatList.initBreakableStats();
|
||||||
}
|
}
|
||||||
|
@ -200,12 +200,7 @@
|
||||||
+ * @param entity The entity trying to use the ladder, CAN be null.
|
+ * @param entity The entity trying to use the ladder, CAN be null.
|
||||||
+ * @return True if the block should act like a ladder
|
+ * @return True if the block should act like a ladder
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isLadder(World world, int x, int y, int z, EntityLiving entity)
|
+ public boolean isLadder(World world, int x, int y, int z, EntityLivingBase entity)
|
||||||
+ {
|
|
||||||
+ return isLadder(world, x, y, z);
|
|
||||||
+ }
|
|
||||||
+ @Deprecated //See EntityLiving sensitive version above
|
|
||||||
+ public boolean isLadder(World world, int x, int y, int z)
|
|
||||||
+ {
|
+ {
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
|
@ -575,7 +570,7 @@
|
||||||
+ * @param player The player or camera entity, null in some cases.
|
+ * @param player The player or camera entity, null in some cases.
|
||||||
+ * @return True to treat this as a bed
|
+ * @return True to treat this as a bed
|
||||||
+ */
|
+ */
|
||||||
+ public boolean isBed(World world, int x, int y, int z, EntityLiving player)
|
+ public boolean isBed(World world, int x, int y, int z, EntityLivingBase player)
|
||||||
+ {
|
+ {
|
||||||
+ return blockID == Block.bed.blockID;
|
+ return blockID == Block.bed.blockID;
|
||||||
+ }
|
+ }
|
||||||
|
@ -1084,12 +1079,6 @@
|
||||||
+ */
|
+ */
|
||||||
+ public float getEnchantPowerBonus(World world, int x, int y, int z)
|
+ public float getEnchantPowerBonus(World world, int x, int y, int z)
|
||||||
+ {
|
+ {
|
||||||
+ return getEnchantPower(world, x, y, z);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ @Deprecated //Changed return to float, see above.
|
|
||||||
+ public int getEnchantPower(World world, int x, int y, int z)
|
|
||||||
+ {
|
|
||||||
+ return blockID == bookShelf.blockID ? 1 : 0;
|
+ return blockID == bookShelf.blockID ? 1 : 0;
|
||||||
+ }
|
+ }
|
||||||
+ /**
|
+ /**
|
||||||
|
|
|
@ -8,12 +8,12 @@
|
||||||
+
|
+
|
||||||
final BlockRailBase theRail;
|
final BlockRailBase theRail;
|
||||||
|
|
||||||
public BlockBaseRailLogic(BlockRailBase par1, World par2, int par3, int par4, int par5)
|
public BlockBaseRailLogic(BlockRailBase par1BlockRailBase, World par2World, int par3, int par4, int par5)
|
||||||
@@ -27,17 +29,11 @@
|
@@ -27,17 +29,11 @@
|
||||||
this.railY = par4;
|
this.railY = par4;
|
||||||
this.railZ = par5;
|
this.railZ = par5;
|
||||||
int l = par2.getBlockId(par3, par4, par5);
|
int l = par2World.getBlockId(par3, par4, par5);
|
||||||
- int i1 = par2.getBlockMetadata(par3, par4, par5);
|
- int i1 = par2World.getBlockMetadata(par3, par4, par5);
|
||||||
-
|
-
|
||||||
- if (((BlockRailBase)Block.blocksList[l]).isPowered)
|
- if (((BlockRailBase)Block.blocksList[l]).isPowered)
|
||||||
- {
|
- {
|
||||||
|
@ -26,9 +26,9 @@
|
||||||
- }
|
- }
|
||||||
+
|
+
|
||||||
+ BlockRailBase target = (BlockRailBase)Block.blocksList[l];
|
+ BlockRailBase target = (BlockRailBase)Block.blocksList[l];
|
||||||
+ int i1 = target.getBasicRailMetadata(par2, null, par3, par4, par5);
|
+ int i1 = target.getBasicRailMetadata(par2World, null, par3, par4, par5);
|
||||||
+ isStraightRail = !target.isFlexibleRail(par2, par3, par4, par5);
|
+ isStraightRail = !target.isFlexibleRail(par2World, par3, par4, par5);
|
||||||
+ canMakeSlopes = target.canMakeSlopes(par2, par3, par4, par5);
|
+ canMakeSlopes = target.canMakeSlopes(par2World, par3, par4, par5);
|
||||||
|
|
||||||
this.setBasicRail(i1);
|
this.setBasicRail(i1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,4 +186,22 @@
|
@@ -182,4 +186,22 @@
|
||||||
this.cactusTopIcon = par1IconRegister.registerIcon("cactus_top");
|
this.cactusTopIcon = par1IconRegister.registerIcon(this.func_111023_E() + "_top");
|
||||||
this.cactusBottomIcon = par1IconRegister.registerIcon("cactus_bottom");
|
this.cactusBottomIcon = par1IconRegister.registerIcon(this.func_111023_E() + "_bottom");
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.client.renderer.texture.IconRegister;
|
import net.minecraft.client.renderer.texture.IconRegister;
|
||||||
@@ -202,7 +204,14 @@
|
@@ -201,7 +203,14 @@
|
||||||
*/
|
*/
|
||||||
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
|
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
|
||||||
{
|
{
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
byte b0 = 1;
|
byte b0 = 1;
|
||||||
|
|
||||||
if (j1 >= 2)
|
if (j1 >= 2)
|
||||||
@@ -212,8 +221,9 @@
|
@@ -211,8 +220,9 @@
|
||||||
|
|
||||||
for (int k1 = 0; k1 < b0; ++k1)
|
for (int k1 = 0; k1 < b0; ++k1)
|
||||||
{
|
{
|
||||||
|
@ -37,8 +37,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
@@ -249,4 +259,10 @@
|
@@ -248,4 +258,10 @@
|
||||||
this.iconArray[i] = par1IconRegister.registerIcon(cocoaIcons[i]);
|
this.iconArray[i] = par1IconRegister.registerIcon(this.func_111023_E() + "_stage_" + i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/block/BlockDoor.java
|
--- ../src_base/minecraft/net/minecraft/block/BlockDoor.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/block/BlockDoor.java
|
+++ ../src_work/minecraft/net/minecraft/block/BlockDoor.java
|
||||||
@@ -303,7 +303,7 @@
|
@@ -290,7 +290,7 @@
|
||||||
{
|
{
|
||||||
if (this.blockMaterial == Material.iron)
|
if (this.blockMaterial == Material.iron)
|
||||||
{
|
{
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
this.setBurnRate(Block.planks.blockID, 5, 20);
|
this.setBurnRate(Block.planks.blockID, 5, 20);
|
||||||
this.setBurnRate(Block.woodDoubleSlab.blockID, 5, 20);
|
this.setBurnRate(Block.woodDoubleSlab.blockID, 5, 20);
|
||||||
this.setBurnRate(Block.woodSingleSlab.blockID, 5, 20);
|
this.setBurnRate(Block.woodSingleSlab.blockID, 5, 20);
|
||||||
@@ -60,8 +65,7 @@
|
@@ -62,8 +67,7 @@
|
||||||
*/
|
*/
|
||||||
private void setBurnRate(int par1, int par2, int par3)
|
private void setBurnRate(int par1, int par2, int par3)
|
||||||
{
|
{
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -121,12 +125,8 @@
|
@@ -123,12 +127,8 @@
|
||||||
{
|
{
|
||||||
if (par1World.getGameRules().getGameRuleBooleanValue("doFireTick"))
|
if (par1World.getGameRules().getGameRuleBooleanValue("doFireTick"))
|
||||||
{
|
{
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
|
|
||||||
if (!this.canPlaceBlockAt(par1World, par2, par3, par4))
|
if (!this.canPlaceBlockAt(par1World, par2, par3, par4))
|
||||||
{
|
{
|
||||||
@@ -155,7 +155,7 @@
|
@@ -157,7 +157,7 @@
|
||||||
par1World.setBlockToAir(par2, par3, par4);
|
par1World.setBlockToAir(par2, par3, par4);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -53,7 +53,7 @@
|
||||||
{
|
{
|
||||||
par1World.setBlockToAir(par2, par3, par4);
|
par1World.setBlockToAir(par2, par3, par4);
|
||||||
}
|
}
|
||||||
@@ -169,12 +169,12 @@
|
@@ -171,12 +171,12 @@
|
||||||
b0 = -50;
|
b0 = -50;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@
|
||||||
|
|
||||||
for (int i1 = par2 - 1; i1 <= par2 + 1; ++i1)
|
for (int i1 = par2 - 1; i1 <= par2 + 1; ++i1)
|
||||||
{
|
{
|
||||||
@@ -228,9 +228,20 @@
|
@@ -230,9 +230,20 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
|
|
||||||
if (par6Random.nextInt(par5) < j1)
|
if (par6Random.nextInt(par5) < j1)
|
||||||
{
|
{
|
||||||
@@ -264,7 +275,12 @@
|
@@ -266,7 +277,12 @@
|
||||||
*/
|
*/
|
||||||
private boolean canNeighborBurn(World par1World, int par2, int par3, int par4)
|
private boolean canNeighborBurn(World par1World, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
|
@ -108,7 +108,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -280,12 +296,12 @@
|
@@ -282,12 +298,12 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -127,7 +127,7 @@
|
||||||
return l;
|
return l;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -300,21 +316,24 @@
|
@@ -302,21 +318,24 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks the specified block coordinate to see if it can catch fire. Args: blockAccess, x, y, z
|
* Checks the specified block coordinate to see if it can catch fire. Args: blockAccess, x, y, z
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -372,9 +391,9 @@
|
@@ -374,9 +393,9 @@
|
||||||
float f1;
|
float f1;
|
||||||
float f2;
|
float f2;
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@
|
||||||
{
|
{
|
||||||
for (l = 0; l < 2; ++l)
|
for (l = 0; l < 2; ++l)
|
||||||
{
|
{
|
||||||
@@ -385,7 +404,7 @@
|
@@ -387,7 +406,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -179,7 +179,7 @@
|
||||||
{
|
{
|
||||||
for (l = 0; l < 2; ++l)
|
for (l = 0; l < 2; ++l)
|
||||||
{
|
{
|
||||||
@@ -396,7 +415,7 @@
|
@@ -398,7 +417,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +188,7 @@
|
||||||
{
|
{
|
||||||
for (l = 0; l < 2; ++l)
|
for (l = 0; l < 2; ++l)
|
||||||
{
|
{
|
||||||
@@ -407,7 +426,7 @@
|
@@ -409,7 +428,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -197,7 +197,7 @@
|
||||||
{
|
{
|
||||||
for (l = 0; l < 2; ++l)
|
for (l = 0; l < 2; ++l)
|
||||||
{
|
{
|
||||||
@@ -418,7 +437,7 @@
|
@@ -420,7 +439,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@
|
||||||
{
|
{
|
||||||
for (l = 0; l < 2; ++l)
|
for (l = 0; l < 2; ++l)
|
||||||
{
|
{
|
||||||
@@ -467,4 +486,46 @@
|
@@ -469,4 +488,46 @@
|
||||||
{
|
{
|
||||||
return this.iconArray[0];
|
return this.iconArray[0];
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
+import net.minecraft.entity.EntityLiving;
|
+import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.util.AxisAlignedBB;
|
import net.minecraft.util.AxisAlignedBB;
|
||||||
import net.minecraft.world.IBlockAccess;
|
import net.minecraft.world.IBlockAccess;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean isLadder(World world, int x, int y, int z, EntityLiving entity)
|
+ public boolean isLadder(World world, int x, int y, int z, EntityLivingBase entity)
|
||||||
+ {
|
+ {
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
+public class BlockLeaves extends BlockLeavesBase implements IShearable
|
+public class BlockLeaves extends BlockLeavesBase implements IShearable
|
||||||
{
|
{
|
||||||
public static final String[] LEAF_TYPES = new String[] {"oak", "spruce", "birch", "jungle"};
|
public static final String[] LEAF_TYPES = new String[] {"oak", "spruce", "birch", "jungle"};
|
||||||
public static final String[][] field_94396_b = new String[][] {{"leaves", "leaves_spruce", "leaves", "leaves_jungle"}, {"leaves_opaque", "leaves_spruce_opaque", "leaves_opaque", "leaves_jungle_opaque"}};
|
public static final String[][] field_94396_b = new String[][] {{"leaves_oak", "leaves_spruce", "leaves_birch", "leaves_jungle"}, {"leaves_oak_opaque", "leaves_spruce_opaque", "leaves_birch_opaque", "leaves_jungle_opaque"}};
|
||||||
@@ -107,10 +111,9 @@
|
@@ -107,10 +111,9 @@
|
||||||
{
|
{
|
||||||
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
|
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/block/BlockLog.java
|
--- ../src_base/minecraft/net/minecraft/block/BlockLog.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/block/BlockLog.java
|
+++ ../src_work/minecraft/net/minecraft/block/BlockLog.java
|
||||||
@@ -69,14 +69,9 @@
|
@@ -60,14 +60,9 @@
|
||||||
{
|
{
|
||||||
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
|
int j2 = par1World.getBlockId(par2 + k1, par3 + l1, par4 + i2);
|
||||||
|
|
||||||
|
@ -17,8 +17,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -176,4 +171,16 @@
|
@@ -125,4 +120,16 @@
|
||||||
this.iconArray[i] = par1IconRegister.registerIcon(treeTextureTypes[i]);
|
this.tree_top[i] = par1IconRegister.registerIcon(this.func_111023_E() + "_" + woodType[i] + "_top");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/block/BlockMushroom.java
|
--- ../src_base/minecraft/net/minecraft/block/BlockMushroom.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/block/BlockMushroom.java
|
+++ ../src_work/minecraft/net/minecraft/block/BlockMushroom.java
|
||||||
@@ -6,6 +6,8 @@
|
@@ -3,6 +3,8 @@
|
||||||
import net.minecraft.client.renderer.texture.IconRegister;
|
import java.util.Random;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.gen.feature.WorldGenBigMushroom;
|
import net.minecraft.world.gen.feature.WorldGenBigMushroom;
|
||||||
+
|
+
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
public class BlockMushroom extends BlockFlower
|
public class BlockMushroom extends BlockFlower
|
||||||
{
|
{
|
||||||
@@ -102,7 +104,9 @@
|
@@ -96,7 +98,9 @@
|
||||||
if (par3 >= 0 && par3 < 256)
|
if (par3 >= 0 && par3 < 256)
|
||||||
{
|
{
|
||||||
int l = par1World.getBlockId(par2, par3 - 1, par4);
|
int l = par1World.getBlockId(par2, par3 - 1, par4);
|
||||||
|
|
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
public class BlockNetherStalk extends BlockFlower
|
public class BlockNetherStalk extends BlockFlower
|
||||||
{
|
{
|
||||||
@@ -39,7 +42,8 @@
|
@@ -38,7 +41,8 @@
|
||||||
*/
|
*/
|
||||||
public boolean canBlockStay(World par1World, int par2, int par3, int par4)
|
public boolean canBlockStay(World par1World, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -81,25 +85,7 @@
|
@@ -80,25 +84,7 @@
|
||||||
*/
|
*/
|
||||||
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
|
public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7)
|
||||||
{
|
{
|
||||||
|
@ -54,8 +54,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -143,4 +129,23 @@
|
@@ -142,4 +128,23 @@
|
||||||
this.iconArray[i] = par1IconRegister.registerIcon(field_94373_a[i]);
|
this.iconArray[i] = par1IconRegister.registerIcon(this.func_111023_E() + "_stage_" + i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/block/BlockPistonBase.java
|
--- ../src_base/minecraft/net/minecraft/block/BlockPistonBase.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/block/BlockPistonBase.java
|
+++ ../src_work/minecraft/net/minecraft/block/BlockPistonBase.java
|
||||||
@@ -437,7 +437,7 @@
|
@@ -439,7 +439,7 @@
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -455,14 +455,14 @@
|
@@ -457,14 +457,14 @@
|
||||||
{
|
{
|
||||||
if (l1 < 13)
|
if (l1 < 13)
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
{
|
{
|
||||||
if (!canPushBlock(i2, par0World, i1, j1, k1, true))
|
if (!canPushBlock(i2, par0World, i1, j1, k1, true))
|
||||||
{
|
{
|
||||||
@@ -505,14 +505,14 @@
|
@@ -507,14 +507,14 @@
|
||||||
|
|
||||||
if (l1 < 13)
|
if (l1 < 13)
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
{
|
{
|
||||||
if (!canPushBlock(i2, par1World, i1, j1, k1, true))
|
if (!canPushBlock(i2, par1World, i1, j1, k1, true))
|
||||||
{
|
{
|
||||||
@@ -533,7 +533,9 @@
|
@@ -535,7 +535,9 @@
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
public class BlockSapling extends BlockFlower
|
public class BlockSapling extends BlockFlower
|
||||||
{
|
{
|
||||||
public static final String[] WOOD_TYPES = new String[] {"oak", "spruce", "birch", "jungle"};
|
public static final String[] WOOD_TYPES = new String[] {"oak", "spruce", "birch", "jungle"};
|
||||||
@@ -77,6 +79,8 @@
|
@@ -76,6 +78,8 @@
|
||||||
*/
|
*/
|
||||||
public void growTree(World par1World, int par2, int par3, int par4, Random par5Random)
|
public void growTree(World par1World, int par2, int par3, int par4, Random par5Random)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import net.minecraft.block.material.Material;
|
import net.minecraft.block.material.Material;
|
||||||
import net.minecraft.creativetab.CreativeTabs;
|
import net.minecraft.creativetab.CreativeTabs;
|
||||||
+import net.minecraft.entity.EntityLiving;
|
+import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
{
|
{
|
||||||
public BlockVine(int par1)
|
public BlockVine(int par1)
|
||||||
{
|
{
|
||||||
@@ -439,14 +444,26 @@
|
@@ -440,14 +445,26 @@
|
||||||
*/
|
*/
|
||||||
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
|
public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6)
|
||||||
{
|
{
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean isLadder(World world, int x, int y, int z, EntityLiving entity)
|
+ public boolean isLadder(World world, int x, int y, int z, EntityLivingBase entity)
|
||||||
+ {
|
+ {
|
||||||
+ return true;
|
+ return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/Minecraft.java
|
--- ../src_base/minecraft/net/minecraft/client/Minecraft.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/Minecraft.java
|
+++ ../src_work/minecraft/net/minecraft/client/Minecraft.java
|
||||||
@@ -123,6 +123,14 @@
|
@@ -136,6 +136,14 @@
|
||||||
|
|
||||||
import com.google.common.collect.MapDifference;
|
import com.google.common.collect.MapDifference;
|
||||||
|
|
||||||
|
@ -13,9 +13,9 @@
|
||||||
+import net.minecraftforge.event.world.WorldEvent;
|
+import net.minecraftforge.event.world.WorldEvent;
|
||||||
+
|
+
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public abstract class Minecraft implements Runnable, IPlayerUsage
|
public class Minecraft implements IPlayerUsage
|
||||||
{
|
{
|
||||||
@@ -372,7 +380,7 @@
|
@@ -414,7 +422,7 @@
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -24,16 +24,16 @@
|
||||||
}
|
}
|
||||||
catch (LWJGLException lwjglexception)
|
catch (LWJGLException lwjglexception)
|
||||||
{
|
{
|
||||||
@@ -450,7 +458,7 @@
|
@@ -493,7 +501,7 @@
|
||||||
}
|
this.effectRenderer = new EffectRenderer(this.theWorld, this.renderEngine);
|
||||||
|
FMLClientHandler.instance().finishMinecraftLoading();
|
||||||
this.checkGLError("Post startup");
|
this.checkGLError("Post startup");
|
||||||
- this.ingameGUI = new GuiIngame(this);
|
- this.ingameGUI = new GuiIngame(this);
|
||||||
+ this.ingameGUI = new GuiIngameForge(this);
|
+ this.ingameGUI = new GuiIngameForge(this);
|
||||||
|
|
||||||
if (this.serverName != null)
|
if (this.serverName != null)
|
||||||
{
|
{
|
||||||
@@ -1238,7 +1246,7 @@
|
@@ -1296,7 +1304,7 @@
|
||||||
|
|
||||||
if (this.thePlayer.canCurrentToolHarvestBlock(j, k, l))
|
if (this.thePlayer.canCurrentToolHarvestBlock(j, k, l))
|
||||||
{
|
{
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
this.thePlayer.swingItem();
|
this.thePlayer.swingItem();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1304,7 +1312,8 @@
|
@@ -1362,7 +1370,8 @@
|
||||||
{
|
{
|
||||||
int j1 = itemstack != null ? itemstack.stackSize : 0;
|
int j1 = itemstack != null ? itemstack.stackSize : 0;
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@
|
||||||
{
|
{
|
||||||
flag = false;
|
flag = false;
|
||||||
this.thePlayer.swingItem();
|
this.thePlayer.swingItem();
|
||||||
@@ -1330,7 +1339,8 @@
|
@@ -1388,7 +1397,8 @@
|
||||||
{
|
{
|
||||||
ItemStack itemstack1 = this.thePlayer.inventory.getCurrentItem();
|
ItemStack itemstack1 = this.thePlayer.inventory.getCurrentItem();
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@
|
||||||
{
|
{
|
||||||
this.entityRenderer.itemRenderer.resetEquippedProgress2();
|
this.entityRenderer.itemRenderer.resetEquippedProgress2();
|
||||||
}
|
}
|
||||||
@@ -2010,6 +2020,11 @@
|
@@ -2036,6 +2046,11 @@
|
||||||
{
|
{
|
||||||
this.statFileWriter.syncStats();
|
this.statFileWriter.syncStats();
|
||||||
|
|
||||||
|
@ -74,7 +74,7 @@
|
||||||
if (par1WorldClient == null)
|
if (par1WorldClient == null)
|
||||||
{
|
{
|
||||||
NetClientHandler netclienthandler = this.getNetHandler();
|
NetClientHandler netclienthandler = this.getNetHandler();
|
||||||
@@ -2027,6 +2042,18 @@
|
@@ -2053,6 +2068,18 @@
|
||||||
if (this.theIntegratedServer != null)
|
if (this.theIntegratedServer != null)
|
||||||
{
|
{
|
||||||
this.theIntegratedServer.initiateShutdown();
|
this.theIntegratedServer.initiateShutdown();
|
||||||
|
@ -93,7 +93,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.theIntegratedServer = null;
|
this.theIntegratedServer = null;
|
||||||
@@ -2354,103 +2381,12 @@
|
@@ -2223,103 +2250,12 @@
|
||||||
if (this.objectMouseOver != null)
|
if (this.objectMouseOver != null)
|
||||||
{
|
{
|
||||||
boolean flag = this.thePlayer.capabilities.isCreativeMode;
|
boolean flag = this.thePlayer.capabilities.isCreativeMode;
|
||||||
|
@ -201,7 +201,7 @@
|
||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
@@ -2539,11 +2475,18 @@
|
@@ -2401,11 +2337,18 @@
|
||||||
par1PlayerUsageSnooper.addData("gl_max_texture_size", Integer.valueOf(getGLMaximumTextureSize()));
|
par1PlayerUsageSnooper.addData("gl_max_texture_size", Integer.valueOf(getGLMaximumTextureSize()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -220,7 +220,7 @@
|
||||||
for (int i = 16384; i > 0; i >>= 1)
|
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);
|
GL11.glTexImage2D(GL11.GL_PROXY_TEXTURE_2D, 0, GL11.GL_RGBA, i, i, 0, GL11.GL_RGBA, GL11.GL_UNSIGNED_BYTE, (ByteBuffer)null);
|
||||||
@@ -2551,6 +2494,7 @@
|
@@ -2413,6 +2356,7 @@
|
||||||
|
|
||||||
if (j != 0)
|
if (j != 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -10,52 +10,49 @@
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
@@ -53,9 +57,11 @@
|
@@ -61,9 +65,11 @@
|
||||||
private Random rand = new Random();
|
private Random rand = new Random();
|
||||||
private int ticksBeforeMusic;
|
private int ticksBeforeMusic;
|
||||||
|
|
||||||
+ public static int MUSIC_INTERVAL = 12000;
|
+ public static int MUSIC_INTERVAL = 12000;
|
||||||
+
|
+
|
||||||
public SoundManager()
|
public SoundManager(ResourceManager par1ResourceManager, GameSettings par2GameSettings, File par3File)
|
||||||
{
|
{
|
||||||
- this.ticksBeforeMusic = this.rand.nextInt(12000);
|
- this.ticksBeforeMusic = this.rand.nextInt(12000);
|
||||||
+ this.ticksBeforeMusic = this.rand.nextInt(MUSIC_INTERVAL);
|
+ this.ticksBeforeMusic = this.rand.nextInt(MUSIC_INTERVAL);
|
||||||
|
this.options = par2GameSettings;
|
||||||
|
this.field_130085_i = par3File;
|
||||||
|
this.soundPoolSounds = new SoundPool(par1ResourceManager, "sound", true);
|
||||||
|
@@ -75,6 +81,7 @@
|
||||||
|
SoundSystemConfig.addLibrary(LibraryLWJGLOpenAL.class);
|
||||||
|
SoundSystemConfig.setCodec("ogg", CodecJOrbis.class);
|
||||||
|
SoundSystemConfig.setCodec("wav", CodecWav.class);
|
||||||
|
+ MinecraftForge.EVENT_BUS.post(new SoundSetupEvent(this));
|
||||||
}
|
}
|
||||||
|
catch (SoundSystemException soundsystemexception)
|
||||||
/**
|
|
||||||
@@ -70,6 +76,8 @@
|
|
||||||
{
|
{
|
||||||
|
@@ -90,6 +97,7 @@
|
||||||
|
this.stopAllSounds();
|
||||||
|
this.closeMinecraft();
|
||||||
this.tryToSetLibraryAndCodecs();
|
this.tryToSetLibraryAndCodecs();
|
||||||
}
|
|
||||||
+ ModCompatibilityClient.audioModLoad(this);
|
|
||||||
+ MinecraftForge.EVENT_BUS.post(new SoundLoadEvent(this));
|
+ MinecraftForge.EVENT_BUS.post(new SoundLoadEvent(this));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
private void func_130083_h()
|
||||||
@@ -89,6 +97,8 @@
|
@@ -236,10 +244,11 @@
|
||||||
SoundSystemConfig.setCodec("ogg", CodecJOrbis.class);
|
else
|
||||||
SoundSystemConfig.setCodec("mus", CodecMus.class);
|
{
|
||||||
SoundSystemConfig.setCodec("wav", CodecWav.class);
|
|
||||||
+ ModCompatibilityClient.audioModAddCodecs();
|
|
||||||
+ MinecraftForge.EVENT_BUS.post(new SoundSetupEvent(this));
|
|
||||||
sndSystem = new SoundSystem();
|
|
||||||
this.options.soundVolume = f;
|
|
||||||
this.options.musicVolume = f1;
|
|
||||||
@@ -179,10 +189,12 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
SoundPoolEntry soundpoolentry = this.soundPoolMusic.getRandomSound();
|
SoundPoolEntry soundpoolentry = this.soundPoolMusic.getRandomSound();
|
||||||
+ soundpoolentry = ModCompatibilityClient.audioModPickBackgroundMusic(this, soundpoolentry);
|
|
||||||
+ soundpoolentry = SoundEvent.getResult(new PlayBackgroundMusicEvent(this, soundpoolentry));
|
+ soundpoolentry = SoundEvent.getResult(new PlayBackgroundMusicEvent(this, soundpoolentry));
|
||||||
|
|
||||||
if (soundpoolentry != null)
|
if (soundpoolentry != null)
|
||||||
{
|
{
|
||||||
- this.ticksBeforeMusic = this.rand.nextInt(12000) + 12000;
|
- this.ticksBeforeMusic = this.rand.nextInt(12000) + 12000;
|
||||||
+ this.ticksBeforeMusic = this.rand.nextInt(MUSIC_INTERVAL) + MUSIC_INTERVAL;
|
+ this.ticksBeforeMusic = this.rand.nextInt(MUSIC_INTERVAL) + MUSIC_INTERVAL;
|
||||||
sndSystem.backgroundMusic("BgMusic", soundpoolentry.soundUrl, soundpoolentry.soundName, false);
|
this.sndSystem.backgroundMusic("BgMusic", soundpoolentry.func_110457_b(), soundpoolentry.func_110458_a(), false);
|
||||||
sndSystem.setVolume("BgMusic", this.options.musicVolume);
|
this.sndSystem.setVolume("BgMusic", this.options.musicVolume);
|
||||||
sndSystem.play("BgMusic");
|
this.sndSystem.play("BgMusic");
|
||||||
@@ -249,6 +261,7 @@
|
@@ -307,6 +316,7 @@
|
||||||
if (par1Str != null)
|
if (par1Str != null)
|
||||||
{
|
{
|
||||||
SoundPoolEntry soundpoolentry = this.soundPoolStreaming.getRandomSoundFromSoundPool(par1Str);
|
SoundPoolEntry soundpoolentry = this.soundPoolStreaming.getRandomSoundFromSoundPool(par1Str);
|
||||||
|
@ -63,43 +60,43 @@
|
||||||
|
|
||||||
if (soundpoolentry != null)
|
if (soundpoolentry != null)
|
||||||
{
|
{
|
||||||
@@ -260,6 +273,7 @@
|
@@ -317,6 +327,7 @@
|
||||||
float f3 = 16.0F;
|
|
||||||
sndSystem.newStreamingSource(true, s1, soundpoolentry.soundUrl, soundpoolentry.soundName, false, par2, par3, par4, 2, f3 * 4.0F);
|
this.sndSystem.newStreamingSource(true, s1, soundpoolentry.func_110457_b(), soundpoolentry.func_110458_a(), false, par2, par3, par4, 2, 64.0F);
|
||||||
sndSystem.setVolume(s1, 0.5F * this.options.soundVolume);
|
this.sndSystem.setVolume(s1, 0.5F * this.options.soundVolume);
|
||||||
+ MinecraftForge.EVENT_BUS.post(new PlayStreamingSourceEvent(this, s1, par2, par3, par4));
|
+ MinecraftForge.EVENT_BUS.post(new PlayStreamingSourceEvent(this, s1, par2, par3, par4));
|
||||||
sndSystem.play(s1);
|
this.sndSystem.play(s1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -439,6 +453,7 @@
|
@@ -485,6 +496,7 @@
|
||||||
if (loaded && this.options.soundVolume != 0.0F)
|
if (this.loaded && this.options.soundVolume != 0.0F)
|
||||||
{
|
{
|
||||||
SoundPoolEntry soundpoolentry = this.soundPoolSounds.getRandomSoundFromSoundPool(par1Str);
|
SoundPoolEntry soundpoolentry = this.soundPoolSounds.getRandomSoundFromSoundPool(par1Str);
|
||||||
+ soundpoolentry = SoundEvent.getResult(new PlaySoundEvent(this, soundpoolentry, par1Str, par2, par3, par4, par5, par6));
|
+ soundpoolentry = SoundEvent.getResult(new PlaySoundEvent(this, soundpoolentry, par1Str, par2, par3, par4, par5, par6));
|
||||||
|
|
||||||
if (soundpoolentry != null && par5 > 0.0F)
|
if (soundpoolentry != null && par5 > 0.0F)
|
||||||
{
|
{
|
||||||
@@ -460,6 +475,7 @@
|
@@ -506,6 +518,7 @@
|
||||||
}
|
|
||||||
|
|
||||||
sndSystem.setVolume(s1, par5 * this.options.soundVolume);
|
this.sndSystem.setPitch(s1, par6);
|
||||||
|
this.sndSystem.setVolume(s1, par5 * this.options.soundVolume);
|
||||||
+ MinecraftForge.EVENT_BUS.post(new PlaySoundSourceEvent(this, s1, par2, par3, par4));
|
+ MinecraftForge.EVENT_BUS.post(new PlaySoundSourceEvent(this, s1, par2, par3, par4));
|
||||||
sndSystem.play(s1);
|
this.sndSystem.play(s1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -474,6 +490,7 @@
|
@@ -520,6 +533,7 @@
|
||||||
if (loaded && this.options.soundVolume != 0.0F)
|
if (this.loaded && this.options.soundVolume != 0.0F)
|
||||||
{
|
{
|
||||||
SoundPoolEntry soundpoolentry = this.soundPoolSounds.getRandomSoundFromSoundPool(par1Str);
|
SoundPoolEntry soundpoolentry = this.soundPoolSounds.getRandomSoundFromSoundPool(par1Str);
|
||||||
+ soundpoolentry = SoundEvent.getResult(new PlaySoundEffectEvent(this, soundpoolentry, par1Str, par2, par3));
|
+ soundpoolentry = SoundEvent.getResult(new PlaySoundEffectEvent(this, soundpoolentry, par1Str, par2, par3));
|
||||||
|
|
||||||
if (soundpoolentry != null)
|
if (soundpoolentry != null && par2 > 0.0F)
|
||||||
{
|
{
|
||||||
@@ -489,6 +506,7 @@
|
@@ -535,6 +549,7 @@
|
||||||
par2 *= 0.25F;
|
par2 *= 0.25F;
|
||||||
sndSystem.setPitch(s1, par3);
|
this.sndSystem.setPitch(s1, par3);
|
||||||
sndSystem.setVolume(s1, par2 * this.options.soundVolume);
|
this.sndSystem.setVolume(s1, par2 * this.options.soundVolume);
|
||||||
+ MinecraftForge.EVENT_BUS.post(new PlaySoundEffectSourceEvent(this, s1));
|
+ MinecraftForge.EVENT_BUS.post(new PlaySoundEffectSourceEvent(this, s1));
|
||||||
sndSystem.play(s1);
|
this.sndSystem.play(s1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,53 +0,0 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/audio/SoundPool.java
|
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/audio/SoundPool.java
|
|
||||||
@@ -4,6 +4,7 @@
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
import java.io.File;
|
|
||||||
import java.net.MalformedURLException;
|
|
||||||
+import java.net.URL;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
|
||||||
@@ -36,6 +37,26 @@
|
|
||||||
*/
|
|
||||||
public SoundPoolEntry addSound(String par1Str, File par2File)
|
|
||||||
{
|
|
||||||
+ try
|
|
||||||
+ {
|
|
||||||
+ return addSound(par1Str, par2File.toURI().toURL());
|
|
||||||
+ }
|
|
||||||
+ catch (MalformedURLException ex)
|
|
||||||
+ {
|
|
||||||
+ ex.printStackTrace();
|
|
||||||
+ throw new RuntimeException(ex);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * URL version of addSound, as the back-end sound engine has full support for various types of URLs
|
|
||||||
+ *
|
|
||||||
+ * @param par1Str The name of the sound to add
|
|
||||||
+ * @param url The url of the sound resource
|
|
||||||
+ * @return A SoundPoolEntry for the newly added sound
|
|
||||||
+ */
|
|
||||||
+ public SoundPoolEntry addSound(String par1Str, URL url)
|
|
||||||
+ {
|
|
||||||
try
|
|
||||||
{
|
|
||||||
String s1 = par1Str;
|
|
||||||
@@ -56,13 +77,13 @@
|
|
||||||
this.nameToSoundPoolEntriesMapping.put(par1Str, new ArrayList());
|
|
||||||
}
|
|
||||||
|
|
||||||
- SoundPoolEntry soundpoolentry = new SoundPoolEntry(s1, par2File.toURI().toURL());
|
|
||||||
+ SoundPoolEntry soundpoolentry = new SoundPoolEntry(s1, url);
|
|
||||||
((List)this.nameToSoundPoolEntriesMapping.get(par1Str)).add(soundpoolentry);
|
|
||||||
this.allSoundPoolEntries.add(soundpoolentry);
|
|
||||||
++this.numberOfSoundPoolEntries;
|
|
||||||
return soundpoolentry;
|
|
||||||
}
|
|
||||||
- catch (MalformedURLException malformedurlexception)
|
|
||||||
+ catch (Exception malformedurlexception)
|
|
||||||
{
|
|
||||||
malformedurlexception.printStackTrace();
|
|
||||||
throw new RuntimeException(malformedurlexception);
|
|
|
@ -1,15 +1,15 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
|
--- ../src_base/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
|
+++ ../src_work/minecraft/net/minecraft/client/entity/EntityPlayerSP.java
|
||||||
@@ -46,6 +46,8 @@
|
@@ -49,6 +49,8 @@
|
||||||
|
import net.minecraft.util.MovementInput;
|
||||||
import net.minecraft.util.Session;
|
import net.minecraft.util.Session;
|
||||||
import net.minecraft.util.StringUtils;
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
+import net.minecraftforge.common.MinecraftForge;
|
+import net.minecraftforge.common.MinecraftForge;
|
||||||
+import net.minecraftforge.event.entity.PlaySoundAtEntityEvent;
|
+import net.minecraftforge.event.entity.PlaySoundAtEntityEvent;
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class EntityPlayerSP extends EntityPlayer
|
public class EntityPlayerSP extends AbstractClientPlayer
|
||||||
@@ -661,6 +663,12 @@
|
@@ -685,6 +687,12 @@
|
||||||
|
|
||||||
public void playSound(String par1Str, float par2, float par3)
|
public void playSound(String par1Str, float par2, float par3)
|
||||||
{
|
{
|
||||||
|
@ -21,4 +21,4 @@
|
||||||
+ par1Str = event.name;
|
+ par1Str = event.name;
|
||||||
this.worldObj.playSound(this.posX, this.posY - (double)this.yOffset, this.posZ, par1Str, par2, par3, false);
|
this.worldObj.playSound(this.posX, this.posY - (double)this.yOffset, this.posZ, par1Str, par2, par3, false);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/gui/GuiControls.java
|
--- ../src_base/minecraft/net/minecraft/client/gui/GuiControls.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiControls.java
|
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiControls.java
|
||||||
@@ -6,6 +6,8 @@
|
@@ -6,6 +6,8 @@
|
||||||
|
import net.minecraft.client.settings.GameSettings;
|
||||||
import net.minecraft.client.settings.KeyBinding;
|
import net.minecraft.client.settings.KeyBinding;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
import net.minecraft.util.StringTranslate;
|
|
||||||
+
|
+
|
||||||
+import net.minecraftforge.client.GuiControlsScrollPanel;
|
+import net.minecraftforge.client.GuiControlsScrollPanel;
|
||||||
|
|
||||||
|
@ -18,12 +18,10 @@
|
||||||
|
|
||||||
public GuiControls(GuiScreen par1GuiScreen, GameSettings par2GameSettings)
|
public GuiControls(GuiScreen par1GuiScreen, GameSettings par2GameSettings)
|
||||||
{
|
{
|
||||||
@@ -43,15 +47,10 @@
|
@@ -43,14 +47,9 @@
|
||||||
*/
|
*/
|
||||||
public void initGui()
|
public void initGui()
|
||||||
{
|
{
|
||||||
+ scrollPane = new GuiControlsScrollPanel(this, options, mc);
|
|
||||||
StringTranslate stringtranslate = StringTranslate.getInstance();
|
|
||||||
- int i = this.getLeftBorder();
|
- int i = this.getLeftBorder();
|
||||||
-
|
-
|
||||||
- for (int j = 0; j < this.options.keyBindings.length; ++j)
|
- for (int j = 0; j < this.options.keyBindings.length; ++j)
|
||||||
|
@ -31,13 +29,14 @@
|
||||||
- this.buttonList.add(new GuiSmallButton(j, i + j % 2 * 160, this.height / 6 + 24 * (j >> 1), 70, 20, this.options.getOptionDisplayString(j)));
|
- this.buttonList.add(new GuiSmallButton(j, i + j % 2 * 160, this.height / 6 + 24 * (j >> 1), 70, 20, this.options.getOptionDisplayString(j)));
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
- this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, stringtranslate.translateKey("gui.done")));
|
- this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, I18n.func_135053_a("gui.done")));
|
||||||
+ this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height - 28, stringtranslate.translateKey("gui.done")));
|
+ scrollPane = new GuiControlsScrollPanel(this, options, mc);
|
||||||
+ scrollPane.registerScrollButtons(buttonList, 7, 8);
|
+ this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height - 28, I18n.func_135053_a("gui.done")));
|
||||||
this.screenTitle = stringtranslate.translateKey("controls.title");
|
+ scrollPane.func_110509_d(7, 8);
|
||||||
|
this.screenTitle = I18n.func_135053_a("controls.title");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -59,20 +58,10 @@
|
@@ -58,20 +57,10 @@
|
||||||
* Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
|
* Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
|
||||||
*/
|
*/
|
||||||
protected void actionPerformed(GuiButton par1GuiButton)
|
protected void actionPerformed(GuiButton par1GuiButton)
|
||||||
|
@ -59,7 +58,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -81,17 +70,7 @@
|
@@ -80,17 +69,7 @@
|
||||||
*/
|
*/
|
||||||
protected void mouseClicked(int par1, int par2, int par3)
|
protected void mouseClicked(int par1, int par2, int par3)
|
||||||
{
|
{
|
||||||
|
@ -78,7 +77,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -99,14 +78,7 @@
|
@@ -98,14 +77,7 @@
|
||||||
*/
|
*/
|
||||||
protected void keyTyped(char par1, int par2)
|
protected void keyTyped(char par1, int par2)
|
||||||
{
|
{
|
||||||
|
@ -94,7 +93,7 @@
|
||||||
{
|
{
|
||||||
super.keyTyped(par1, par2);
|
super.keyTyped(par1, par2);
|
||||||
}
|
}
|
||||||
@@ -118,6 +90,7 @@
|
@@ -117,6 +89,7 @@
|
||||||
public void drawScreen(int par1, int par2, float par3)
|
public void drawScreen(int par1, int par2, float par3)
|
||||||
{
|
{
|
||||||
this.drawDefaultBackground();
|
this.drawDefaultBackground();
|
||||||
|
@ -102,7 +101,7 @@
|
||||||
this.drawCenteredString(this.fontRenderer, this.screenTitle, this.width / 2, 20, 16777215);
|
this.drawCenteredString(this.fontRenderer, this.screenTitle, this.width / 2, 20, 16777215);
|
||||||
int k = this.getLeftBorder();
|
int k = this.getLeftBorder();
|
||||||
int l = 0;
|
int l = 0;
|
||||||
@@ -158,6 +131,10 @@
|
@@ -157,6 +130,10 @@
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
--- ../src_base/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiCreateWorld.java
|
||||||
@@ -377,7 +377,7 @@
|
@@ -376,7 +376,7 @@
|
||||||
}
|
}
|
||||||
else if (par1GuiButton.id == 8)
|
else if (par1GuiButton.id == 8)
|
||||||
{
|
{
|
||||||
|
@ -9,13 +9,12 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -395,7 +395,8 @@
|
@@ -394,7 +394,7 @@
|
||||||
this.buttonBonusItems.drawButton = this.moreOptions;
|
this.buttonBonusItems.drawButton = this.moreOptions;
|
||||||
this.buttonWorldType.drawButton = this.moreOptions;
|
this.buttonWorldType.drawButton = this.moreOptions;
|
||||||
this.buttonAllowCommands.drawButton = this.moreOptions;
|
this.buttonAllowCommands.drawButton = this.moreOptions;
|
||||||
- this.buttonCustomize.drawButton = this.moreOptions && WorldType.worldTypes[this.worldTypeId] == WorldType.FLAT;
|
- this.buttonCustomize.drawButton = this.moreOptions && WorldType.worldTypes[this.worldTypeId] == WorldType.FLAT;
|
||||||
+ this.buttonCustomize.drawButton = this.moreOptions && (WorldType.worldTypes[this.worldTypeId].isCustomizable());
|
+ this.buttonCustomize.drawButton = this.moreOptions && (WorldType.worldTypes[this.worldTypeId].isCustomizable());
|
||||||
+
|
|
||||||
StringTranslate stringtranslate;
|
|
||||||
|
|
||||||
if (this.moreOptions)
|
if (this.moreOptions)
|
||||||
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/gui/GuiIngame.java
|
--- ../src_base/minecraft/net/minecraft/client/gui/GuiIngame.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiIngame.java
|
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiIngame.java
|
||||||
@@ -34,6 +34,8 @@
|
@@ -40,6 +40,8 @@
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class GuiIngame extends Gui
|
public class GuiIngame extends Gui
|
||||||
{
|
{
|
||||||
@@ -90,9 +92,16 @@
|
@@ -99,9 +101,16 @@
|
||||||
|
|
||||||
ItemStack itemstack = this.mc.thePlayer.inventory.armorItemInSlot(3);
|
ItemStack itemstack = this.mc.thePlayer.inventory.armorItemInSlot(3);
|
||||||
|
|
||||||
|
@ -29,30 +29,29 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.mc.thePlayer.isPotionActive(Potion.confusion))
|
if (!this.mc.thePlayer.isPotionActive(Potion.confusion))
|
||||||
@@ -174,7 +183,7 @@
|
@@ -275,6 +284,16 @@
|
||||||
|
|
||||||
k3 = l - 39;
|
|
||||||
l2 = k3 - 10;
|
|
||||||
- k2 = this.mc.thePlayer.getTotalArmorValue();
|
|
||||||
+ k2 = ForgeHooks.getTotalArmorValue(mc.thePlayer);
|
|
||||||
i3 = -1;
|
|
||||||
|
|
||||||
if (this.mc.thePlayer.isPotionActive(Potion.regeneration))
|
|
||||||
@@ -435,7 +444,16 @@
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
|
||||||
- fontrenderer.drawStringWithShadow(s1, i1, j1, 16777215 + (j5 << 24));
|
fontrenderer.drawStringWithShadow(s1, k1, i2, 16777215 + (j2 << 24));
|
||||||
+ FontRenderer font = highlightingItemStack.getItem().getFontRenderer(highlightingItemStack);
|
+ FontRenderer font = highlightingItemStack.getItem().getFontRenderer(highlightingItemStack);
|
||||||
+ if (font != null)
|
+ if (font != null)
|
||||||
+ {
|
+ {
|
||||||
+ i1 = (k - font.getStringWidth(s1)) / 2;
|
+ k1 = (k - font.getStringWidth(s1)) / 2;
|
||||||
+ font.drawStringWithShadow(s1, i1, j1, 16777215 + (j5 << 24));
|
+ font.drawStringWithShadow(s1, k1, i2, 16777215 + (j2 << 24));
|
||||||
+ }
|
+ }
|
||||||
+ else
|
+ else
|
||||||
+ {
|
+ {
|
||||||
+ fontrenderer.drawStringWithShadow(s1, i1, j1, 16777215 + (j5 << 24));
|
+ fontrenderer.drawStringWithShadow(s1, k1, i2, 16777215 + (j2 << 24));
|
||||||
+ }
|
+ }
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
|
@@ -563,7 +582,7 @@
|
||||||
|
int k2 = Math.max(10 - (j2 - 2), 3);
|
||||||
|
int l2 = i2 - (j2 - 1) * k2 - 10;
|
||||||
|
float f2 = f1;
|
||||||
|
- int i3 = this.mc.thePlayer.getTotalArmorValue();
|
||||||
|
+ int i3 = ForgeHooks.getTotalArmorValue(mc.thePlayer);
|
||||||
|
int j3 = -1;
|
||||||
|
|
||||||
|
if (this.mc.thePlayer.isPotionActive(Potion.regeneration))
|
||||||
|
|
|
@ -1,19 +1,10 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/gui/GuiSlot.java
|
--- ../src_base/minecraft/net/minecraft/client/gui/GuiSlot.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiSlot.java
|
+++ ../src_work/minecraft/net/minecraft/client/gui/GuiSlot.java
|
||||||
@@ -68,6 +68,8 @@
|
@@ -325,16 +325,7 @@
|
||||||
private boolean showSelectionBox = true;
|
|
||||||
private boolean field_77243_s;
|
|
||||||
private int field_77242_t;
|
|
||||||
+
|
|
||||||
+ public String BACKGROUND_IMAGE = "/gui/background.png";
|
|
||||||
|
|
||||||
public GuiSlot(Minecraft par1Minecraft, int par2, int par3, int par4, int par5, int par6)
|
|
||||||
{
|
|
||||||
@@ -332,16 +334,7 @@
|
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
GL11.glDisable(GL11.GL_FOG);
|
GL11.glDisable(GL11.GL_FOG);
|
||||||
Tessellator tessellator = Tessellator.instance;
|
Tessellator tessellator = Tessellator.instance;
|
||||||
- this.mc.renderEngine.bindTexture("/gui/background.png");
|
- this.mc.func_110434_K().func_110577_a(Gui.field_110325_k);
|
||||||
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
- GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
- float f1 = 32.0F;
|
- float f1 = 32.0F;
|
||||||
- tessellator.startDrawingQuads();
|
- tessellator.startDrawingQuads();
|
||||||
|
@ -27,27 +18,14 @@
|
||||||
j1 = this.width / 2 - 92 - 16;
|
j1 = this.width / 2 - 92 - 16;
|
||||||
k1 = this.top + 4 - (int)this.amountScrolled;
|
k1 = this.top + 4 - (int)this.amountScrolled;
|
||||||
|
|
||||||
@@ -470,10 +463,10 @@
|
@@ -478,4 +469,18 @@
|
||||||
/**
|
|
||||||
* Overlays the background to hide scrolled items
|
|
||||||
*/
|
|
||||||
- private void overlayBackground(int par1, int par2, int par3, int par4)
|
|
||||||
+ protected void overlayBackground(int par1, int par2, int par3, int par4)
|
|
||||||
{
|
|
||||||
Tessellator tessellator = Tessellator.instance;
|
|
||||||
- this.mc.renderEngine.bindTexture("/gui/background.png");
|
|
||||||
+ this.mc.renderEngine.bindTexture(BACKGROUND_IMAGE);
|
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
|
||||||
float f = 32.0F;
|
|
||||||
tessellator.startDrawingQuads();
|
|
||||||
@@ -485,4 +478,18 @@
|
|
||||||
tessellator.addVertexWithUV(0.0D, (double)par1, 0.0D, 0.0D, (double)((float)par1 / f));
|
tessellator.addVertexWithUV(0.0D, (double)par1, 0.0D, 0.0D, (double)((float)par1 / f));
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ protected void drawContainerBackground(Tessellator tess)
|
+ protected void drawContainerBackground(Tessellator tess)
|
||||||
+ {
|
+ {
|
||||||
+ this.mc.renderEngine.bindTexture(BACKGROUND_IMAGE);
|
+ this.mc.func_110434_K().func_110577_a(Gui.field_110325_k);
|
||||||
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
+ GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
+ float height = 32.0F;
|
+ float height = 32.0F;
|
||||||
+ tess.startDrawingQuads();
|
+ tess.startDrawingQuads();
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/gui/RunnableTitleScreen.java
|
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/gui/RunnableTitleScreen.java
|
|
||||||
@@ -40,6 +40,10 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ catch (java.io.FileNotFoundException e)
|
|
||||||
+ {
|
|
||||||
+ //NomNomNom, Don't print the error when the flag isn't found.
|
|
||||||
+ }
|
|
||||||
catch (Throwable throwable)
|
|
||||||
{
|
|
||||||
throwable.printStackTrace();
|
|
|
@ -10,7 +10,7 @@
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.client.Minecraft;
|
import net.minecraft.client.Minecraft;
|
||||||
@@ -20,6 +23,8 @@
|
@@ -22,6 +25,8 @@
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
|
@ -19,8 +19,8 @@
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class GuiAchievements extends GuiScreen
|
public class GuiAchievements extends GuiScreen
|
||||||
{
|
{
|
||||||
@@ -57,6 +62,10 @@
|
@@ -60,6 +65,10 @@
|
||||||
private int isMouseButtonDown = 0;
|
private int isMouseButtonDown;
|
||||||
private StatFileWriter statFileWriter;
|
private StatFileWriter statFileWriter;
|
||||||
|
|
||||||
+ private int currentPage = -1;
|
+ private int currentPage = -1;
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
public GuiAchievements(StatFileWriter par1StatFileWriter)
|
public GuiAchievements(StatFileWriter par1StatFileWriter)
|
||||||
{
|
{
|
||||||
this.statFileWriter = par1StatFileWriter;
|
this.statFileWriter = par1StatFileWriter;
|
||||||
@@ -64,6 +73,14 @@
|
@@ -67,6 +76,14 @@
|
||||||
short short2 = 141;
|
short short2 = 141;
|
||||||
this.field_74117_m = this.guiMapX = this.field_74124_q = (double)(AchievementList.openInventory.displayColumn * 24 - short1 / 2 - 12);
|
this.field_74117_m = this.guiMapX = this.field_74124_q = (double)(AchievementList.openInventory.displayColumn * 24 - short1 / 2 - 12);
|
||||||
this.field_74115_n = this.guiMapY = this.field_74123_r = (double)(AchievementList.openInventory.displayRow * 24 - short2 / 2);
|
this.field_74115_n = this.guiMapY = this.field_74123_r = (double)(AchievementList.openInventory.displayRow * 24 - short2 / 2);
|
||||||
|
@ -45,15 +45,15 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -73,6 +90,7 @@
|
@@ -76,6 +93,7 @@
|
||||||
{
|
{
|
||||||
this.buttonList.clear();
|
this.buttonList.clear();
|
||||||
this.buttonList.add(new GuiSmallButton(1, this.width / 2 + 24, this.height / 2 + 74, 80, 20, StatCollector.translateToLocal("gui.done")));
|
this.buttonList.add(new GuiSmallButton(1, this.width / 2 + 24, this.height / 2 + 74, 80, 20, I18n.func_135053_a("gui.done")));
|
||||||
+ this.buttonList.add(button = new GuiSmallButton(2, (width - achievementsPaneWidth) / 2 + 24, height / 2 + 74, 125, 20, AchievementPage.getTitle(currentPage)));
|
+ this.buttonList.add(button = new GuiSmallButton(2, (width - achievementsPaneWidth) / 2 + 24, height / 2 + 74, 125, 20, AchievementPage.getTitle(currentPage)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -84,6 +102,16 @@
|
@@ -87,6 +105,16 @@
|
||||||
{
|
{
|
||||||
this.mc.displayGuiScreen((GuiScreen)null);
|
this.mc.displayGuiScreen((GuiScreen)null);
|
||||||
this.mc.setIngameFocus();
|
this.mc.setIngameFocus();
|
||||||
|
@ -70,7 +70,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
super.actionPerformed(par1GuiButton);
|
super.actionPerformed(par1GuiButton);
|
||||||
@@ -306,11 +334,12 @@
|
@@ -314,11 +342,12 @@
|
||||||
int i4;
|
int i4;
|
||||||
int j4;
|
int j4;
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
{
|
{
|
||||||
k3 = achievement.displayColumn * 24 - k + 11 + k1;
|
k3 = achievement.displayColumn * 24 - k + 11 + k1;
|
||||||
j3 = achievement.displayRow * 24 - l + 11 + l1;
|
j3 = achievement.displayRow * 24 - l + 11 + l1;
|
||||||
@@ -344,9 +373,9 @@
|
@@ -352,9 +381,9 @@
|
||||||
int l4;
|
int l4;
|
||||||
int i5;
|
int i5;
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
import net.minecraft.client.gui.GuiScreen;
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
import net.minecraft.client.renderer.OpenGlHelper;
|
import net.minecraft.client.renderer.OpenGlHelper;
|
||||||
import net.minecraft.client.renderer.RenderHelper;
|
import net.minecraft.client.renderer.RenderHelper;
|
||||||
@@ -139,7 +140,11 @@
|
@@ -143,7 +144,11 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,21 +20,21 @@
|
||||||
InventoryPlayer inventoryplayer = this.mc.thePlayer.inventory;
|
InventoryPlayer inventoryplayer = this.mc.thePlayer.inventory;
|
||||||
ItemStack itemstack = this.draggedStack == null ? inventoryplayer.getItemStack() : this.draggedStack;
|
ItemStack itemstack = this.draggedStack == null ? inventoryplayer.getItemStack() : this.draggedStack;
|
||||||
|
|
||||||
@@ -203,8 +208,11 @@
|
@@ -207,8 +212,11 @@
|
||||||
GL11.glTranslatef(0.0F, 0.0F, 32.0F);
|
GL11.glTranslatef(0.0F, 0.0F, 32.0F);
|
||||||
this.zLevel = 200.0F;
|
this.zLevel = 200.0F;
|
||||||
itemRenderer.zLevel = 200.0F;
|
itemRenderer.zLevel = 200.0F;
|
||||||
- itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, par1ItemStack, par2, par3);
|
- itemRenderer.func_110797_b(this.fontRenderer, this.mc.func_110434_K(), par1ItemStack, par2, par3);
|
||||||
- itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
|
- itemRenderer.func_110793_a(this.fontRenderer, this.mc.func_110434_K(), par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
|
||||||
+ FontRenderer font = null;
|
+ FontRenderer font = null;
|
||||||
+ if (par1ItemStack != null) font = par1ItemStack.getItem().getFontRenderer(par1ItemStack);
|
+ if (par1ItemStack != null) font = par1ItemStack.getItem().getFontRenderer(par1ItemStack);
|
||||||
+ if (font == null) font = fontRenderer;
|
+ if (font == null) font = fontRenderer;
|
||||||
+ itemRenderer.renderItemAndEffectIntoGUI(font, this.mc.renderEngine, par1ItemStack, par2, par3);
|
+ itemRenderer.func_110797_b(font, this.mc.func_110434_K(), par1ItemStack, par2, par3);
|
||||||
+ itemRenderer.renderItemOverlayIntoGUI(font, this.mc.renderEngine, par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
|
+ itemRenderer.func_110793_a(font, this.mc.func_110434_K(), par1ItemStack, par2, par3 - (this.draggedStack == null ? 0 : 8), par4Str);
|
||||||
this.zLevel = 0.0F;
|
this.zLevel = 0.0F;
|
||||||
itemRenderer.zLevel = 0.0F;
|
itemRenderer.zLevel = 0.0F;
|
||||||
}
|
}
|
||||||
@@ -225,7 +233,8 @@
|
@@ -229,7 +237,8 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,7 +44,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -238,6 +247,11 @@
|
@@ -242,6 +251,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void func_102021_a(List par1List, int par2, int par3)
|
protected void func_102021_a(List par1List, int par2, int par3)
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
{
|
{
|
||||||
if (!par1List.isEmpty())
|
if (!par1List.isEmpty())
|
||||||
{
|
{
|
||||||
@@ -251,7 +265,7 @@
|
@@ -255,7 +269,7 @@
|
||||||
while (iterator.hasNext())
|
while (iterator.hasNext())
|
||||||
{
|
{
|
||||||
String s = (String)iterator.next();
|
String s = (String)iterator.next();
|
||||||
|
@ -65,7 +65,7 @@
|
||||||
|
|
||||||
if (l > k)
|
if (l > k)
|
||||||
{
|
{
|
||||||
@@ -296,7 +310,7 @@
|
@@ -300,7 +314,7 @@
|
||||||
for (int k2 = 0; k2 < par1List.size(); ++k2)
|
for (int k2 = 0; k2 < par1List.size(); ++k2)
|
||||||
{
|
{
|
||||||
String s1 = (String)par1List.get(k2);
|
String s1 = (String)par1List.get(k2);
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
|
--- ../src_base/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
|
+++ ../src_work/minecraft/net/minecraft/client/gui/inventory/GuiContainerCreative.java
|
||||||
@@ -56,6 +56,8 @@
|
@@ -61,6 +61,8 @@
|
||||||
private Slot field_74235_v = null;
|
private Slot field_74235_v;
|
||||||
private boolean field_74234_w = false;
|
private boolean field_74234_w;
|
||||||
private CreativeCrafting field_82324_x;
|
private CreativeCrafting field_82324_x;
|
||||||
+ private static int tabPage = 0;
|
+ private static int tabPage = 0;
|
||||||
+ private int maxPages = 0;
|
+ private int maxPages = 0;
|
||||||
|
|
||||||
public GuiContainerCreative(EntityPlayer par1EntityPlayer)
|
public GuiContainerCreative(EntityPlayer par1EntityPlayer)
|
||||||
{
|
{
|
||||||
@@ -196,7 +198,7 @@
|
@@ -201,7 +203,7 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
{
|
{
|
||||||
if (par3 == 0)
|
if (par3 == 0)
|
||||||
{
|
{
|
||||||
@@ -274,6 +276,13 @@
|
@@ -279,6 +281,13 @@
|
||||||
this.setCurrentCreativeTab(CreativeTabs.creativeTabArray[i]);
|
this.setCurrentCreativeTab(CreativeTabs.creativeTabArray[i]);
|
||||||
this.field_82324_x = new CreativeCrafting(this.mc);
|
this.field_82324_x = new CreativeCrafting(this.mc);
|
||||||
this.mc.thePlayer.inventoryContainer.addCraftingToCrafters(this.field_82324_x);
|
this.mc.thePlayer.inventoryContainer.addCraftingToCrafters(this.field_82324_x);
|
||||||
|
@ -32,16 +32,16 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -408,7 +417,7 @@
|
@@ -413,7 +422,7 @@
|
||||||
{
|
{
|
||||||
CreativeTabs creativetabs = CreativeTabs.creativeTabArray[selectedTabIndex];
|
CreativeTabs creativetabs = CreativeTabs.creativeTabArray[selectedTabIndex];
|
||||||
|
|
||||||
- if (creativetabs.drawInForegroundOfTab())
|
- if (creativetabs.drawInForegroundOfTab())
|
||||||
+ if (creativetabs != null && creativetabs.drawInForegroundOfTab())
|
+ if (creativetabs != null && creativetabs.drawInForegroundOfTab())
|
||||||
{
|
{
|
||||||
this.fontRenderer.drawString(creativetabs.getTranslatedTabLabel(), 8, 6, 4210752);
|
this.fontRenderer.drawString(I18n.func_135053_a(creativetabs.getTranslatedTabLabel()), 8, 6, 4210752);
|
||||||
}
|
}
|
||||||
@@ -457,7 +466,7 @@
|
@@ -462,7 +471,7 @@
|
||||||
{
|
{
|
||||||
CreativeTabs creativetabs = acreativetabs[k1];
|
CreativeTabs creativetabs = acreativetabs[k1];
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@
|
||||||
{
|
{
|
||||||
this.setCurrentCreativeTab(creativetabs);
|
this.setCurrentCreativeTab(creativetabs);
|
||||||
return;
|
return;
|
||||||
@@ -473,11 +482,17 @@
|
@@ -478,11 +487,17 @@
|
||||||
*/
|
*/
|
||||||
private boolean needsScrollBars()
|
private boolean needsScrollBars()
|
||||||
{
|
{
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
int i = selectedTabIndex;
|
int i = selectedTabIndex;
|
||||||
selectedTabIndex = par1CreativeTabs.getTabIndex();
|
selectedTabIndex = par1CreativeTabs.getTabIndex();
|
||||||
ContainerCreative containercreative = (ContainerCreative)this.inventorySlots;
|
ContainerCreative containercreative = (ContainerCreative)this.inventorySlots;
|
||||||
@@ -648,21 +663,42 @@
|
@@ -653,21 +668,42 @@
|
||||||
|
|
||||||
super.drawScreen(par1, par2, par3);
|
super.drawScreen(par1, par2, par3);
|
||||||
CreativeTabs[] acreativetabs = CreativeTabs.creativeTabArray;
|
CreativeTabs[] acreativetabs = CreativeTabs.creativeTabArray;
|
||||||
|
@ -86,7 +86,7 @@
|
||||||
|
|
||||||
- if (this.renderCreativeInventoryHoveringText(creativetabs, par1, par2))
|
- if (this.renderCreativeInventoryHoveringText(creativetabs, par1, par2))
|
||||||
- {
|
- {
|
||||||
+ if (creativetabs != null && renderCreativeInventoryHoveringText(creativetabs, par1, par2))
|
+ if (creativetabs != null && this.renderCreativeInventoryHoveringText(creativetabs, par1, par2))
|
||||||
+ {
|
+ {
|
||||||
+ rendered = true;
|
+ rendered = true;
|
||||||
break;
|
break;
|
||||||
|
@ -100,7 +100,7 @@
|
||||||
+
|
+
|
||||||
if (this.field_74235_v != null && selectedTabIndex == CreativeTabs.tabInventory.getTabIndex() && this.isPointInRegion(this.field_74235_v.xDisplayPosition, this.field_74235_v.yDisplayPosition, 16, 16, par1, par2))
|
if (this.field_74235_v != null && selectedTabIndex == CreativeTabs.tabInventory.getTabIndex() && this.isPointInRegion(this.field_74235_v.xDisplayPosition, this.field_74235_v.yDisplayPosition, 16, 16, par1, par2))
|
||||||
{
|
{
|
||||||
this.drawCreativeTabHoveringText(StringTranslate.getInstance().translateKey("inventory.binSlot"), par1, par2);
|
this.drawCreativeTabHoveringText(I18n.func_135053_a("inventory.binSlot"), par1, par2);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ if (maxPages != 0)
|
+ if (maxPages != 0)
|
||||||
|
@ -116,7 +116,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
@@ -681,14 +717,32 @@
|
@@ -741,14 +777,32 @@
|
||||||
int k = acreativetabs.length;
|
int k = acreativetabs.length;
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@
|
||||||
+ for (l = start; l < k; ++l)
|
+ for (l = start; l < k; ++l)
|
||||||
{
|
{
|
||||||
CreativeTabs creativetabs1 = acreativetabs[l];
|
CreativeTabs creativetabs1 = acreativetabs[l];
|
||||||
this.mc.renderEngine.bindTexture("/gui/allitems.png");
|
this.mc.func_110434_K().func_110577_a(field_110424_t);
|
||||||
|
|
||||||
- if (creativetabs1.getTabIndex() != selectedTabIndex)
|
- if (creativetabs1.getTabIndex() != selectedTabIndex)
|
||||||
+ if (creativetabs1 != null && creativetabs1.getTabIndex() != selectedTabIndex)
|
+ if (creativetabs1 != null && creativetabs1.getTabIndex() != selectedTabIndex)
|
||||||
|
@ -141,17 +141,17 @@
|
||||||
+ {
|
+ {
|
||||||
+ if (creativetabs != CreativeTabs.tabAllSearch)
|
+ if (creativetabs != CreativeTabs.tabAllSearch)
|
||||||
+ {
|
+ {
|
||||||
+ mc.renderEngine.bindTexture("/gui/allitems.png");
|
+ this.mc.func_110434_K().func_110577_a(field_110424_t);
|
||||||
+ renderCreativeTab(CreativeTabs.tabAllSearch);
|
+ renderCreativeTab(CreativeTabs.tabAllSearch);
|
||||||
+ }
|
+ }
|
||||||
+ if (creativetabs != CreativeTabs.tabInventory)
|
+ if (creativetabs != CreativeTabs.tabInventory)
|
||||||
+ {
|
+ {
|
||||||
+ mc.renderEngine.bindTexture("/gui/allitems.png");
|
+ this.mc.func_110434_K().func_110577_a(field_110424_t);
|
||||||
+ renderCreativeTab(CreativeTabs.tabInventory);
|
+ renderCreativeTab(CreativeTabs.tabInventory);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -706,6 +760,14 @@
|
@@ -766,6 +820,14 @@
|
||||||
this.drawTexturedModalRect(i1, k + (int)((float)(l - k - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15);
|
this.drawTexturedModalRect(i1, k + (int)((float)(l - k - 17) * this.currentScroll), 232 + (this.needsScrollBars() ? 0 : 12), 0, 12, 15);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@
|
||||||
this.renderCreativeTab(creativetabs);
|
this.renderCreativeTab(creativetabs);
|
||||||
|
|
||||||
if (creativetabs == CreativeTabs.tabInventory)
|
if (creativetabs == CreativeTabs.tabInventory)
|
||||||
@@ -716,6 +778,15 @@
|
@@ -776,6 +838,15 @@
|
||||||
|
|
||||||
protected boolean func_74232_a(CreativeTabs par1CreativeTabs, int par2, int par3)
|
protected boolean func_74232_a(CreativeTabs par1CreativeTabs, int par2, int par3)
|
||||||
{
|
{
|
||||||
|
@ -182,7 +182,7 @@
|
||||||
int k = par1CreativeTabs.getTabColumn();
|
int k = par1CreativeTabs.getTabColumn();
|
||||||
int l = 28 * k;
|
int l = 28 * k;
|
||||||
byte b0 = 0;
|
byte b0 = 0;
|
||||||
@@ -823,6 +894,7 @@
|
@@ -883,6 +954,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
|
@ -190,16 +190,16 @@
|
||||||
this.drawTexturedModalRect(l, i1, j, k, 28, b0);
|
this.drawTexturedModalRect(l, i1, j, k, 28, b0);
|
||||||
this.zLevel = 100.0F;
|
this.zLevel = 100.0F;
|
||||||
itemRenderer.zLevel = 100.0F;
|
itemRenderer.zLevel = 100.0F;
|
||||||
@@ -830,7 +902,7 @@
|
@@ -890,7 +962,7 @@
|
||||||
i1 += 8 + (flag1 ? 1 : -1);
|
i1 += 8 + (flag1 ? 1 : -1);
|
||||||
GL11.glEnable(GL11.GL_LIGHTING);
|
GL11.glEnable(GL11.GL_LIGHTING);
|
||||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||||
- ItemStack itemstack = new ItemStack(par1CreativeTabs.getTabIconItem());
|
- ItemStack itemstack = new ItemStack(par1CreativeTabs.getTabIconItem());
|
||||||
+ ItemStack itemstack = par1CreativeTabs.getIconItemStack();
|
+ ItemStack itemstack = par1CreativeTabs.getIconItemStack();
|
||||||
itemRenderer.renderItemAndEffectIntoGUI(this.fontRenderer, this.mc.renderEngine, itemstack, l, i1);
|
itemRenderer.func_110797_b(this.fontRenderer, this.mc.func_110434_K(), itemstack, l, i1);
|
||||||
itemRenderer.renderItemOverlayIntoGUI(this.fontRenderer, this.mc.renderEngine, itemstack, l, i1);
|
itemRenderer.func_110794_c(this.fontRenderer, this.mc.func_110434_K(), itemstack, l, i1);
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
@@ -852,6 +924,15 @@
|
@@ -912,6 +984,15 @@
|
||||||
{
|
{
|
||||||
this.mc.displayGuiScreen(new GuiStats(this, this.mc.statFileWriter));
|
this.mc.displayGuiScreen(new GuiStats(this, this.mc.statFileWriter));
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/model/ModelBase.java
|
+++ ../src_work/minecraft/net/minecraft/client/model/ModelBase.java
|
||||||
@@ -10,7 +10,6 @@
|
@@ -10,7 +10,6 @@
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
|
|
||||||
-@SideOnly(Side.CLIENT)
|
-@SideOnly(Side.CLIENT)
|
||||||
public abstract class ModelBase
|
public abstract class ModelBase
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
public class ModelRenderer
|
public class ModelRenderer
|
||||||
{
|
{
|
||||||
/** The size of the texture file's width in pixels. */
|
/** The size of the texture file's width in pixels. */
|
||||||
@@ -121,7 +120,8 @@
|
@@ -117,7 +116,8 @@
|
||||||
this.rotationPointY = par2;
|
this.rotationPointY = par2;
|
||||||
this.rotationPointZ = par3;
|
this.rotationPointZ = par3;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@
|
||||||
public void render(float par1)
|
public void render(float par1)
|
||||||
{
|
{
|
||||||
if (!this.isHidden)
|
if (!this.isHidden)
|
||||||
@@ -204,6 +204,7 @@
|
@@ -200,6 +200,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
public void renderWithRotation(float par1)
|
public void renderWithRotation(float par1)
|
||||||
{
|
{
|
||||||
if (!this.isHidden)
|
if (!this.isHidden)
|
||||||
@@ -242,6 +243,7 @@
|
@@ -238,6 +239,7 @@
|
||||||
/**
|
/**
|
||||||
* Allows the changing of Angles after a box has been rendered
|
* Allows the changing of Angles after a box has been rendered
|
||||||
*/
|
*/
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
public void postRender(float par1)
|
public void postRender(float par1)
|
||||||
{
|
{
|
||||||
if (!this.isHidden)
|
if (!this.isHidden)
|
||||||
@@ -286,6 +288,7 @@
|
@@ -282,6 +284,7 @@
|
||||||
/**
|
/**
|
||||||
* Compiles a GL display list for this model
|
* Compiles a GL display list for this model
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
|
--- ../src_base/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
|
+++ ../src_work/minecraft/net/minecraft/client/multiplayer/NetClientHandler.java
|
||||||
@@ -176,6 +176,11 @@
|
@@ -186,6 +186,11 @@
|
||||||
import net.minecraft.world.storage.MapStorage;
|
import net.minecraft.world.storage.MapStorage;
|
||||||
import org.lwjgl.input.Keyboard;
|
import org.lwjgl.input.Keyboard;
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class NetClientHandler extends NetHandler
|
public class NetClientHandler extends NetHandler
|
||||||
{
|
{
|
||||||
@@ -762,7 +767,7 @@
|
@@ -778,7 +783,7 @@
|
||||||
|
|
||||||
public void handleKickDisconnect(Packet255KickDisconnect par1Packet255KickDisconnect)
|
public void handleKickDisconnect(Packet255KickDisconnect par1Packet255KickDisconnect)
|
||||||
{
|
{
|
||||||
|
@ -21,20 +21,20 @@
|
||||||
this.disconnected = true;
|
this.disconnected = true;
|
||||||
this.mc.loadWorld((WorldClient)null);
|
this.mc.loadWorld((WorldClient)null);
|
||||||
|
|
||||||
@@ -844,7 +849,11 @@
|
@@ -860,7 +865,11 @@
|
||||||
public void handleChat(Packet3Chat par1Packet3Chat)
|
public void handleChat(Packet3Chat par1Packet3Chat)
|
||||||
{
|
{
|
||||||
par1Packet3Chat = FMLNetworkHandler.handleChatMessage(this, par1Packet3Chat);
|
par1Packet3Chat = FMLNetworkHandler.handleChatMessage(this, par1Packet3Chat);
|
||||||
- this.mc.ingameGUI.getChatGUI().printChatMessage(par1Packet3Chat.message);
|
- this.mc.ingameGUI.getChatGUI().printChatMessage(ChatMessageComponent.func_111078_c(par1Packet3Chat.message).func_111068_a(true));
|
||||||
+ ClientChatReceivedEvent event = new ClientChatReceivedEvent(par1Packet3Chat.message);
|
+ ClientChatReceivedEvent event = new ClientChatReceivedEvent(par1Packet3Chat.message);
|
||||||
+ if (!MinecraftForge.EVENT_BUS.post(event) && event.message != null)
|
+ if (!MinecraftForge.EVENT_BUS.post(event) && event.message != null)
|
||||||
+ {
|
+ {
|
||||||
+ this.mc.ingameGUI.getChatGUI().printChatMessage(par1Packet3Chat.message);
|
+ this.mc.ingameGUI.getChatGUI().printChatMessage(ChatMessageComponent.func_111078_c(event.message).func_111068_a(true));
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handleAnimation(Packet18Animation par1Packet18Animation)
|
public void handleAnimation(Packet18Animation par1Packet18Animation)
|
||||||
@@ -1278,6 +1287,10 @@
|
@@ -1329,6 +1338,10 @@
|
||||||
{
|
{
|
||||||
tileentity.readFromNBT(par1Packet132TileEntityData.customParam1);
|
tileentity.readFromNBT(par1Packet132TileEntityData.customParam1);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java
|
--- ../src_base/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java
|
+++ ../src_work/minecraft/net/minecraft/client/multiplayer/PlayerControllerMP.java
|
||||||
@@ -20,6 +20,10 @@
|
@@ -22,6 +22,10 @@
|
||||||
import net.minecraft.world.EnumGameType;
|
import net.minecraft.world.EnumGameType;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class PlayerControllerMP
|
public class PlayerControllerMP
|
||||||
{
|
{
|
||||||
@@ -124,6 +128,12 @@
|
@@ -125,6 +129,12 @@
|
||||||
*/
|
*/
|
||||||
public boolean onPlayerDestroyBlock(int par1, int par2, int par3, int par4)
|
public boolean onPlayerDestroyBlock(int par1, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
|
@ -24,7 +24,7 @@
|
||||||
if (this.currentGameType.isAdventure() && !this.mc.thePlayer.canCurrentToolHarvestBlock(par1, par2, par3))
|
if (this.currentGameType.isAdventure() && !this.mc.thePlayer.canCurrentToolHarvestBlock(par1, par2, par3))
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
@@ -141,7 +151,7 @@
|
@@ -146,7 +156,7 @@
|
||||||
{
|
{
|
||||||
worldclient.playAuxSFX(2001, par1, par2, par3, block.blockID + (worldclient.getBlockMetadata(par1, par2, par3) << 12));
|
worldclient.playAuxSFX(2001, par1, par2, par3, block.blockID + (worldclient.getBlockMetadata(par1, par2, par3) << 12));
|
||||||
int i1 = worldclient.getBlockMetadata(par1, par2, par3);
|
int i1 = worldclient.getBlockMetadata(par1, par2, par3);
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
|
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
@@ -342,6 +352,12 @@
|
@@ -347,6 +357,12 @@
|
||||||
float f2 = (float)par8Vec3.zCoord - (float)par6;
|
float f2 = (float)par8Vec3.zCoord - (float)par6;
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
int i1;
|
int i1;
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
|
|
||||||
if (!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null)
|
if (!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null)
|
||||||
{
|
{
|
||||||
@@ -384,7 +400,15 @@
|
@@ -389,7 +405,15 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -406,9 +430,10 @@
|
@@ -411,9 +435,10 @@
|
||||||
{
|
{
|
||||||
par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = itemstack1;
|
par1EntityPlayer.inventory.mainInventory[par1EntityPlayer.inventory.currentItem] = itemstack1;
|
||||||
|
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -291,6 +297,12 @@
|
@@ -296,6 +302,12 @@
|
||||||
*/
|
*/
|
||||||
protected void updateWeather()
|
protected void updateWeather()
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,14 +1,14 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/particle/EffectRenderer.java
|
--- ../src_base/minecraft/net/minecraft/client/particle/EffectRenderer.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/particle/EffectRenderer.java
|
+++ ../src_work/minecraft/net/minecraft/client/particle/EffectRenderer.java
|
||||||
@@ -11,6 +11,7 @@
|
@@ -13,6 +13,7 @@
|
||||||
import net.minecraft.client.renderer.Tessellator;
|
import net.minecraft.client.resources.ResourceLocation;
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
+import net.minecraft.util.MovingObjectPosition;
|
+import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
@@ -59,9 +60,13 @@
|
@@ -63,9 +64,13 @@
|
||||||
for (int j = 0; j < this.fxLayers[i].size(); ++j)
|
for (int j = 0; j < this.fxLayers[i].size(); ++j)
|
||||||
{
|
{
|
||||||
EntityFX entityfx = (EntityFX)this.fxLayers[i].get(j);
|
EntityFX entityfx = (EntityFX)this.fxLayers[i].get(j);
|
||||||
|
@ -25,7 +25,7 @@
|
||||||
{
|
{
|
||||||
this.fxLayers[i].remove(j--);
|
this.fxLayers[i].remove(j--);
|
||||||
}
|
}
|
||||||
@@ -111,6 +116,7 @@
|
@@ -115,6 +120,7 @@
|
||||||
for (int j = 0; j < this.fxLayers[i].size(); ++j)
|
for (int j = 0; j < this.fxLayers[i].size(); ++j)
|
||||||
{
|
{
|
||||||
EntityFX entityfx = (EntityFX)this.fxLayers[i].get(j);
|
EntityFX entityfx = (EntityFX)this.fxLayers[i].get(j);
|
||||||
|
@ -33,15 +33,15 @@
|
||||||
tessellator.setBrightness(entityfx.getBrightnessForRender(par2));
|
tessellator.setBrightness(entityfx.getBrightnessForRender(par2));
|
||||||
entityfx.renderParticle(tessellator, par2, f1, f5, f2, f3, f4);
|
entityfx.renderParticle(tessellator, par2, f1, f5, f2, f3, f4);
|
||||||
}
|
}
|
||||||
@@ -139,6 +145,7 @@
|
@@ -145,6 +151,7 @@
|
||||||
for (int i = 0; i < this.fxLayers[b0].size(); ++i)
|
for (int i = 0; i < list.size(); ++i)
|
||||||
{
|
{
|
||||||
EntityFX entityfx = (EntityFX)this.fxLayers[b0].get(i);
|
EntityFX entityfx = (EntityFX)list.get(i);
|
||||||
+ if (entityfx == null) continue;
|
+ if (entityfx == null) continue;
|
||||||
tessellator.setBrightness(entityfx.getBrightnessForRender(par2));
|
tessellator.setBrightness(entityfx.getBrightnessForRender(par2));
|
||||||
entityfx.renderParticle(tessellator, par2, f1, f5, f2, f3, f4);
|
entityfx.renderParticle(tessellator, par2, f2, f6, f3, f4, f5);
|
||||||
}
|
}
|
||||||
@@ -157,9 +164,9 @@
|
@@ -163,9 +170,9 @@
|
||||||
|
|
||||||
public void addBlockDestroyEffects(int par1, int par2, int par3, int par4, int par5)
|
public void addBlockDestroyEffects(int par1, int par2, int par3, int par4, int par5)
|
||||||
{
|
{
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
byte b0 = 4;
|
byte b0 = 4;
|
||||||
|
|
||||||
for (int j1 = 0; j1 < b0; ++j1)
|
for (int j1 = 0; j1 < b0; ++j1)
|
||||||
@@ -232,4 +239,13 @@
|
@@ -237,4 +244,13 @@
|
||||||
{
|
{
|
||||||
return "" + (this.fxLayers[0].size() + this.fxLayers[1].size() + this.fxLayers[2].size());
|
return "" + (this.fxLayers[0].size() + this.fxLayers[1].size() + this.fxLayers[2].size());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,21 +1,26 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/particle/EntityDiggingFX.java
|
--- ../src_base/minecraft/net/minecraft/client/particle/EntityDiggingFX.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/particle/EntityDiggingFX.java
|
+++ ../src_work/minecraft/net/minecraft/client/particle/EntityDiggingFX.java
|
||||||
@@ -11,20 +11,22 @@
|
@@ -10,20 +10,27 @@
|
||||||
public class EntityDiggingFX extends EntityFX
|
public class EntityDiggingFX extends EntityFX
|
||||||
{
|
{
|
||||||
private Block blockInstance;
|
private Block blockInstance;
|
||||||
+ private int side;
|
+ private int side;
|
||||||
|
|
||||||
public EntityDiggingFX(World par1World, double par2, double par4, double par6, double par8, double par10, double par12, Block par14Block, int par15, int par16, RenderEngine par17RenderEngine)
|
public EntityDiggingFX(World par1World, double par2, double par4, double par6, double par8, double par10, double par12, Block par14Block, int par15)
|
||||||
{
|
{
|
||||||
|
+ this(par1World, par2, par4, par6, par8, par10, par12, par14Block, par15, par1World.rand.nextInt(6));
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ public EntityDiggingFX(World par1World, double par2, double par4, double par6, double par8, double par10, double par12, Block par14Block, int par15, int side)
|
||||||
|
+ {
|
||||||
super(par1World, par2, par4, par6, par8, par10, par12);
|
super(par1World, par2, par4, par6, par8, par10, par12);
|
||||||
this.blockInstance = par14Block;
|
this.blockInstance = par14Block;
|
||||||
- this.setParticleIcon(par17RenderEngine, par14Block.getIcon(0, par16));
|
- this.func_110125_a(par14Block.getIcon(0, par15));
|
||||||
+ this.setParticleIcon(par17RenderEngine, par14Block.getIcon(par15, par16));
|
+ this.func_110125_a(par14Block.getIcon(side, par15));
|
||||||
this.particleGravity = par14Block.blockParticleGravity;
|
this.particleGravity = par14Block.blockParticleGravity;
|
||||||
this.particleRed = this.particleGreen = this.particleBlue = 0.6F;
|
this.particleRed = this.particleGreen = this.particleBlue = 0.6F;
|
||||||
this.particleScale /= 2.0F;
|
this.particleScale /= 2.0F;
|
||||||
+ this.side = par15;
|
+ this.side = side;
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityDiggingFX func_70596_a(int par1, int par2, int par3)
|
public EntityDiggingFX func_70596_a(int par1, int par2, int par3)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/EntityRenderer.java
|
--- ../src_base/minecraft/net/minecraft/client/renderer/EntityRenderer.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/EntityRenderer.java
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/EntityRenderer.java
|
||||||
@@ -37,6 +37,11 @@
|
@@ -40,6 +40,11 @@
|
||||||
import org.lwjgl.opengl.GLContext;
|
import org.lwjgl.opengl.GLContext;
|
||||||
import org.lwjgl.util.glu.GLU;
|
import org.lwjgl.util.glu.Project;
|
||||||
|
|
||||||
+import net.minecraftforge.client.ForgeHooksClient;
|
+import net.minecraftforge.client.ForgeHooksClient;
|
||||||
+import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
+import net.minecraftforge.client.event.DrawBlockHighlightEvent;
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class EntityRenderer
|
public class EntityRenderer
|
||||||
{
|
{
|
||||||
@@ -339,8 +344,15 @@
|
@@ -354,8 +359,15 @@
|
||||||
*/
|
*/
|
||||||
private void updateFovModifierHand()
|
private void updateFovModifierHand()
|
||||||
{
|
{
|
||||||
|
@ -30,87 +30,84 @@
|
||||||
this.fovModifierHandPrev = this.fovModifierHand;
|
this.fovModifierHandPrev = this.fovModifierHand;
|
||||||
this.fovModifierHand += (this.fovMultiplierTemp - this.fovModifierHand) * 0.5F;
|
this.fovModifierHand += (this.fovMultiplierTemp - this.fovModifierHand) * 0.5F;
|
||||||
|
|
||||||
@@ -366,7 +378,7 @@
|
@@ -381,7 +393,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
- EntityPlayer entityplayer = (EntityPlayer)this.mc.renderViewEntity;
|
- EntityPlayer entityplayer = (EntityPlayer)this.mc.renderViewEntity;
|
||||||
+ EntityLiving entityplayer = (EntityLiving)this.mc.renderViewEntity;
|
+ EntityLivingBase entityplayer = (EntityLivingBase)this.mc.renderViewEntity;
|
||||||
float f1 = 70.0F;
|
float f1 = 70.0F;
|
||||||
|
|
||||||
if (par2)
|
if (par2)
|
||||||
@@ -453,15 +465,7 @@
|
@@ -468,15 +480,7 @@
|
||||||
|
|
||||||
if (!this.mc.gameSettings.debugCamEnable)
|
if (!this.mc.gameSettings.debugCamEnable)
|
||||||
{
|
{
|
||||||
- int i = this.mc.theWorld.getBlockId(MathHelper.floor_double(entityliving.posX), MathHelper.floor_double(entityliving.posY), MathHelper.floor_double(entityliving.posZ));
|
- int i = this.mc.theWorld.getBlockId(MathHelper.floor_double(entitylivingbase.posX), MathHelper.floor_double(entitylivingbase.posY), MathHelper.floor_double(entitylivingbase.posZ));
|
||||||
-
|
-
|
||||||
- if (i == Block.bed.blockID)
|
- if (i == Block.bed.blockID)
|
||||||
- {
|
- {
|
||||||
- int j = this.mc.theWorld.getBlockMetadata(MathHelper.floor_double(entityliving.posX), MathHelper.floor_double(entityliving.posY), MathHelper.floor_double(entityliving.posZ));
|
- int j = this.mc.theWorld.getBlockMetadata(MathHelper.floor_double(entitylivingbase.posX), MathHelper.floor_double(entitylivingbase.posY), MathHelper.floor_double(entitylivingbase.posZ));
|
||||||
- int k = j & 3;
|
- int k = j & 3;
|
||||||
- GL11.glRotatef((float)(k * 90), 0.0F, 1.0F, 0.0F);
|
- GL11.glRotatef((float)(k * 90), 0.0F, 1.0F, 0.0F);
|
||||||
- }
|
- }
|
||||||
-
|
-
|
||||||
+ ForgeHooksClient.orientBedCamera(mc, entityliving);
|
+ ForgeHooksClient.orientBedCamera(mc, entitylivingbase);
|
||||||
GL11.glRotatef(entityliving.prevRotationYaw + (entityliving.rotationYaw - entityliving.prevRotationYaw) * par1 + 180.0F, 0.0F, -1.0F, 0.0F);
|
GL11.glRotatef(entitylivingbase.prevRotationYaw + (entitylivingbase.rotationYaw - entitylivingbase.prevRotationYaw) * par1 + 180.0F, 0.0F, -1.0F, 0.0F);
|
||||||
GL11.glRotatef(entityliving.prevRotationPitch + (entityliving.rotationPitch - entityliving.prevRotationPitch) * par1, -1.0F, 0.0F, 0.0F);
|
GL11.glRotatef(entitylivingbase.prevRotationPitch + (entitylivingbase.rotationPitch - entitylivingbase.prevRotationPitch) * par1, -1.0F, 0.0F, 0.0F);
|
||||||
}
|
}
|
||||||
@@ -1142,23 +1146,20 @@
|
@@ -1152,7 +1156,10 @@
|
||||||
{
|
{
|
||||||
RenderHelper.enableStandardItemLighting();
|
RenderHelper.enableStandardItemLighting();
|
||||||
this.mc.mcProfiler.endStartSection("entities");
|
this.mc.mcProfiler.endStartSection("entities");
|
||||||
+ ForgeHooksClient.setRenderPass(0);
|
+ ForgeHooksClient.setRenderPass(0);
|
||||||
renderglobal.renderEntities(entityliving.getPosition(par1), frustrum, par1);
|
renderglobal.renderEntities(entitylivingbase.getPosition(par1), frustrum, par1);
|
||||||
- this.enableLightmap((double)par1);
|
+ ForgeHooksClient.setRenderPass(0);
|
||||||
- this.mc.mcProfiler.endStartSection("litParticles");
|
+ /* Forge: Moved down
|
||||||
- effectrenderer.renderLitParticles(entityliving, par1);
|
this.enableLightmap((double)par1);
|
||||||
- RenderHelper.disableStandardItemLighting();
|
this.mc.mcProfiler.endStartSection("litParticles");
|
||||||
- this.setupFog(0, par1);
|
effectrenderer.renderLitParticles(entitylivingbase, par1);
|
||||||
- this.mc.mcProfiler.endStartSection("particles");
|
@@ -1161,13 +1168,17 @@
|
||||||
- effectrenderer.renderParticles(entityliving, par1);
|
this.mc.mcProfiler.endStartSection("particles");
|
||||||
- this.disableLightmap((double)par1);
|
effectrenderer.renderParticles(entitylivingbase, par1);
|
||||||
+ ForgeHooksClient.setRenderPass(-1);
|
this.disableLightmap((double)par1);
|
||||||
|
+ */
|
||||||
|
|
||||||
if (this.mc.objectMouseOver != null && entityliving.isInsideOfMaterial(Material.water) && entityliving instanceof EntityPlayer && !this.mc.gameSettings.hideGUI)
|
if (this.mc.objectMouseOver != null && entitylivingbase.isInsideOfMaterial(Material.water) && entitylivingbase instanceof EntityPlayer && !this.mc.gameSettings.hideGUI)
|
||||||
{
|
{
|
||||||
entityplayer = (EntityPlayer)entityliving;
|
entityplayer = (EntityPlayer)entitylivingbase;
|
||||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||||
this.mc.mcProfiler.endStartSection("outline");
|
this.mc.mcProfiler.endStartSection("outline");
|
||||||
- renderglobal.drawBlockBreaking(entityplayer, this.mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1);
|
- renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, par1);
|
||||||
- renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1);
|
|
||||||
+ if (!ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer, mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1))
|
+ if (!ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer, mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1))
|
||||||
+ {
|
+ {
|
||||||
+ renderglobal.drawBlockBreaking(entityplayer, this.mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1);
|
+ renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, par1);
|
||||||
+ renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1);
|
|
||||||
+ }
|
+ }
|
||||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1213,6 +1214,13 @@
|
@@ -1222,6 +1233,13 @@
|
||||||
renderglobal.sortAndRender(entityliving, 1, (double)par1);
|
renderglobal.sortAndRender(entitylivingbase, 1, (double)par1);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ RenderHelper.enableStandardItemLighting();
|
+ RenderHelper.enableStandardItemLighting();
|
||||||
+ this.mc.mcProfiler.endStartSection("entities");
|
+ this.mc.mcProfiler.endStartSection("entities");
|
||||||
+ ForgeHooksClient.setRenderPass(1);
|
+ ForgeHooksClient.setRenderPass(1);
|
||||||
+ renderglobal.renderEntities(entityliving.getPosition(par1), frustrum, par1);
|
+ renderglobal.renderEntities(entitylivingbase.getPosition(par1), frustrum, par1);
|
||||||
+ ForgeHooksClient.setRenderPass(-1);
|
+ ForgeHooksClient.setRenderPass(-1);
|
||||||
+ RenderHelper.disableStandardItemLighting();
|
+ RenderHelper.disableStandardItemLighting();
|
||||||
+
|
+
|
||||||
GL11.glDepthMask(true);
|
GL11.glDepthMask(true);
|
||||||
GL11.glEnable(GL11.GL_CULL_FACE);
|
GL11.glEnable(GL11.GL_CULL_FACE);
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
@@ -1222,15 +1230,18 @@
|
@@ -1231,14 +1249,17 @@
|
||||||
entityplayer = (EntityPlayer)entityliving;
|
entityplayer = (EntityPlayer)entitylivingbase;
|
||||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||||
this.mc.mcProfiler.endStartSection("outline");
|
this.mc.mcProfiler.endStartSection("outline");
|
||||||
- renderglobal.drawBlockBreaking(entityplayer, this.mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1);
|
- renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, par1);
|
||||||
- renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1);
|
|
||||||
+ if (!ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer, mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1))
|
+ if (!ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer, mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1))
|
||||||
+ {
|
+ {
|
||||||
+ renderglobal.drawBlockBreaking(entityplayer, this.mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1);
|
+ renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, par1);
|
||||||
+ renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, entityplayer.inventory.getCurrentItem(), par1);
|
|
||||||
+ }
|
+ }
|
||||||
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
GL11.glEnable(GL11.GL_ALPHA_TEST);
|
||||||
}
|
}
|
||||||
|
@ -118,12 +115,12 @@
|
||||||
this.mc.mcProfiler.endStartSection("destroyProgress");
|
this.mc.mcProfiler.endStartSection("destroyProgress");
|
||||||
GL11.glEnable(GL11.GL_BLEND);
|
GL11.glEnable(GL11.GL_BLEND);
|
||||||
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE);
|
||||||
- renderglobal.drawBlockDamageTexture(Tessellator.instance, (EntityPlayer)entityliving, par1);
|
- renderglobal.drawBlockDamageTexture(Tessellator.instance, (EntityPlayer)entitylivingbase, par1);
|
||||||
+ renderglobal.drawBlockDamageTexture(Tessellator.instance, entityliving, par1);
|
+ renderglobal.drawBlockDamageTexture(Tessellator.instance, entitylivingbase, par1);
|
||||||
GL11.glDisable(GL11.GL_BLEND);
|
GL11.glDisable(GL11.GL_BLEND);
|
||||||
this.mc.mcProfiler.endStartSection("weather");
|
this.mc.mcProfiler.endStartSection("weather");
|
||||||
this.renderRainSnow(par1);
|
this.renderRainSnow(par1);
|
||||||
@@ -1240,6 +1251,19 @@
|
@@ -1248,6 +1269,20 @@
|
||||||
{
|
{
|
||||||
this.renderCloudsCheck(renderglobal, par1);
|
this.renderCloudsCheck(renderglobal, par1);
|
||||||
}
|
}
|
||||||
|
@ -131,12 +128,13 @@
|
||||||
+ //Forge: Moved section from above, now particles are the last thing to render.
|
+ //Forge: Moved section from above, now particles are the last thing to render.
|
||||||
+ this.enableLightmap((double)par1);
|
+ this.enableLightmap((double)par1);
|
||||||
+ this.mc.mcProfiler.endStartSection("litParticles");
|
+ this.mc.mcProfiler.endStartSection("litParticles");
|
||||||
+ effectrenderer.renderLitParticles(entityliving, par1);
|
+ effectrenderer.renderLitParticles(entitylivingbase, par1);
|
||||||
+ RenderHelper.disableStandardItemLighting();
|
+ RenderHelper.disableStandardItemLighting();
|
||||||
+ this.setupFog(0, par1);
|
+ this.setupFog(0, par1);
|
||||||
+ this.mc.mcProfiler.endStartSection("particles");
|
+ this.mc.mcProfiler.endStartSection("particles");
|
||||||
+ effectrenderer.renderParticles(entityliving, par1);
|
+ effectrenderer.renderParticles(entitylivingbase, par1);
|
||||||
+ this.disableLightmap((double)par1);
|
+ this.disableLightmap((double)par1);
|
||||||
|
+ //Forge: End Move
|
||||||
+
|
+
|
||||||
+ this.mc.mcProfiler.endStartSection("FRenderLast");
|
+ this.mc.mcProfiler.endStartSection("FRenderLast");
|
||||||
+ ForgeHooksClient.dispatchRenderLast(renderglobal, par1);
|
+ ForgeHooksClient.dispatchRenderLast(renderglobal, par1);
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/ItemRenderer.java
|
--- ../src_base/minecraft/net/minecraft/client/renderer/ItemRenderer.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/ItemRenderer.java
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/ItemRenderer.java
|
||||||
@@ -14,6 +14,8 @@
|
@@ -17,6 +17,8 @@
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.item.EnumAction;
|
import net.minecraft.item.EnumAction;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
+import net.minecraft.item.ItemBlock;
|
+import net.minecraft.item.ItemBlock;
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.Icon;
|
import net.minecraft.util.Icon;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
@@ -21,6 +23,13 @@
|
@@ -24,6 +26,13 @@
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
|
@ -23,25 +23,25 @@
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class ItemRenderer
|
public class ItemRenderer
|
||||||
{
|
{
|
||||||
@@ -46,15 +55,40 @@
|
@@ -54,15 +63,32 @@
|
||||||
this.mc = par1Minecraft;
|
this.mapItemRenderer = new MapItemRenderer(par1Minecraft.gameSettings, par1Minecraft.func_110434_K());
|
||||||
this.mapItemRenderer = new MapItemRenderer(par1Minecraft.fontRenderer, par1Minecraft.gameSettings, par1Minecraft.renderEngine);
|
|
||||||
}
|
}
|
||||||
+
|
|
||||||
+ public void renderItem(EntityLiving par1EntityLiving, ItemStack par2ItemStack, int par3)
|
|
||||||
+ {
|
|
||||||
+ this.renderItem(par1EntityLiving, par2ItemStack, par3, ItemRenderType.EQUIPPED);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
|
+ public void renderItem(EntityLivingBase par1EntityLivingBase, ItemStack par2ItemStack, int par3)
|
||||||
|
+ {
|
||||||
|
+ this.renderItem(par1EntityLivingBase, par2ItemStack, par3, ItemRenderType.EQUIPPED);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
/**
|
/**
|
||||||
* Renders the item stack for being in an entity's hand Args: itemStack
|
* Renders the item stack for being in an entity's hand Args: itemStack
|
||||||
*/
|
*/
|
||||||
- public void renderItem(EntityLiving par1EntityLiving, ItemStack par2ItemStack, int par3)
|
- public void renderItem(EntityLivingBase par1EntityLivingBase, ItemStack par2ItemStack, int par3)
|
||||||
+ public void renderItem(EntityLiving par1EntityLiving, ItemStack par2ItemStack, int par3, ItemRenderType type)
|
+ public void renderItem(EntityLivingBase par1EntityLivingBase, ItemStack par2ItemStack, int par3, ItemRenderType type)
|
||||||
{
|
{
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
|
TextureManager texturemanager = this.mc.func_110434_K();
|
||||||
|
|
||||||
- if (par2ItemStack.getItemSpriteNumber() == 0 && Block.blocksList[par2ItemStack.itemID] != null && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))
|
- if (par2ItemStack.getItemSpriteNumber() == 0 && par2ItemStack.itemID < Block.blocksList.length && Block.blocksList[par2ItemStack.itemID] != null && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))
|
||||||
+ Block block = null;
|
+ Block block = null;
|
||||||
+ if (par2ItemStack.getItem() instanceof ItemBlock && par2ItemStack.itemID < Block.blocksList.length)
|
+ if (par2ItemStack.getItem() instanceof ItemBlock && par2ItemStack.itemID < Block.blocksList.length)
|
||||||
+ {
|
+ {
|
||||||
|
@ -49,24 +49,16 @@
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(par2ItemStack, type);
|
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(par2ItemStack, type);
|
||||||
+ //Backwards compatibility, Remove in 1.6, For 1.5 if they implement EQUIPPED then
|
|
||||||
+ //they must handle it how it was when 1.5 began.
|
|
||||||
+ if (customRenderer == null && type == ItemRenderType.EQUIPPED_FIRST_PERSON)
|
|
||||||
+ {
|
|
||||||
+ type = ItemRenderType.EQUIPPED;
|
|
||||||
+ customRenderer = MinecraftForgeClient.getItemRenderer(par2ItemStack, type);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if (customRenderer != null)
|
+ if (customRenderer != null)
|
||||||
+ {
|
+ {
|
||||||
+ this.mc.renderEngine.bindTexture(par2ItemStack.getItemSpriteNumber() == 0 ? "/terrain.png" : "/gui/items.png");
|
+ texturemanager.func_110577_a(texturemanager.func_130087_a(par2ItemStack.getItemSpriteNumber()));
|
||||||
+ ForgeHooksClient.renderEquippedItem(type, customRenderer, renderBlocksInstance, par1EntityLiving, par2ItemStack);
|
+ ForgeHooksClient.renderEquippedItem(type, customRenderer, renderBlocksInstance, par1EntityLivingBase, par2ItemStack);
|
||||||
+ }
|
+ }
|
||||||
+ else if (block != null && par2ItemStack.getItemSpriteNumber() == 0 && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))
|
+ else if (block != null && par2ItemStack.getItemSpriteNumber() == 0 && RenderBlocks.renderItemIn3d(Block.blocksList[par2ItemStack.itemID].getRenderType()))
|
||||||
{
|
{
|
||||||
this.mc.renderEngine.bindTexture("/terrain.png");
|
texturemanager.func_110577_a(texturemanager.func_130087_a(0));
|
||||||
this.renderBlocksInstance.renderBlockAsItem(Block.blocksList[par2ItemStack.itemID], par2ItemStack.getItemDamage(), 1.0F);
|
this.renderBlocksInstance.renderBlockAsItem(Block.blocksList[par2ItemStack.itemID], par2ItemStack.getItemDamage(), 1.0F);
|
||||||
@@ -272,7 +306,7 @@
|
@@ -266,7 +292,7 @@
|
||||||
Render render;
|
Render render;
|
||||||
RenderPlayer renderplayer;
|
RenderPlayer renderplayer;
|
||||||
|
|
||||||
|
@ -74,8 +66,8 @@
|
||||||
+ if (itemstack != null && itemstack.getItem() instanceof ItemMap)
|
+ if (itemstack != null && itemstack.getItem() instanceof ItemMap)
|
||||||
{
|
{
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
f4 = 0.8F;
|
f12 = 0.8F;
|
||||||
@@ -340,11 +374,20 @@
|
@@ -333,11 +359,20 @@
|
||||||
tessellator.addVertexWithUV((double)(128 + b0), (double)(0 - b0), 0.0D, 1.0D, 0.0D);
|
tessellator.addVertexWithUV((double)(128 + b0), (double)(0 - b0), 0.0D, 1.0D, 0.0D);
|
||||||
tessellator.addVertexWithUV((double)(0 - b0), (double)(0 - b0), 0.0D, 0.0D, 0.0D);
|
tessellator.addVertexWithUV((double)(0 - b0), (double)(0 - b0), 0.0D, 0.0D, 0.0D);
|
||||||
tessellator.draw();
|
tessellator.draw();
|
||||||
|
@ -83,7 +75,7 @@
|
||||||
-
|
-
|
||||||
- if (mapdata != null)
|
- if (mapdata != null)
|
||||||
- {
|
- {
|
||||||
- this.mapItemRenderer.renderMap(this.mc.thePlayer, this.mc.renderEngine, mapdata);
|
- this.mapItemRenderer.func_111275_a(this.mc.thePlayer, this.mc.func_110434_K(), mapdata);
|
||||||
+
|
+
|
||||||
+ IItemRenderer custom = MinecraftForgeClient.getItemRenderer(itemstack, FIRST_PERSON_MAP);
|
+ IItemRenderer custom = MinecraftForgeClient.getItemRenderer(itemstack, FIRST_PERSON_MAP);
|
||||||
+ MapData mapdata = ((ItemMap)itemstack.getItem()).getMapData(itemstack, this.mc.theWorld);
|
+ MapData mapdata = ((ItemMap)itemstack.getItem()).getMapData(itemstack, this.mc.theWorld);
|
||||||
|
@ -92,34 +84,34 @@
|
||||||
+ {
|
+ {
|
||||||
+ if (mapdata != null)
|
+ if (mapdata != null)
|
||||||
+ {
|
+ {
|
||||||
+ this.mapItemRenderer.renderMap(this.mc.thePlayer, this.mc.renderEngine, mapdata);
|
+ this.mapItemRenderer.func_111275_a(this.mc.thePlayer, this.mc.func_110434_K(), mapdata);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ else
|
+ else
|
||||||
+ {
|
+ {
|
||||||
+ custom.renderItem(FIRST_PERSON_MAP, itemstack, mc.thePlayer, mc.renderEngine, mapdata);
|
+ custom.renderItem(FIRST_PERSON_MAP, itemstack, mc.thePlayer, mc.func_110434_K(), mapdata);
|
||||||
}
|
}
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
@@ -446,17 +489,20 @@
|
@@ -439,17 +474,20 @@
|
||||||
|
|
||||||
if (itemstack.getItem().requiresMultipleRenderPasses())
|
if (itemstack.getItem().requiresMultipleRenderPasses())
|
||||||
{
|
{
|
||||||
- this.renderItem(entityclientplayermp, itemstack, 0);
|
- this.renderItem(entityclientplayermp, itemstack, 0);
|
||||||
- int i1 = Item.itemsList[itemstack.itemID].getColorFromItemStack(itemstack, 1);
|
- int i1 = Item.itemsList[itemstack.itemID].getColorFromItemStack(itemstack, 1);
|
||||||
- f10 = (float)(i1 >> 16 & 255) / 255.0F;
|
- f11 = (float)(i1 >> 16 & 255) / 255.0F;
|
||||||
- f11 = (float)(i1 >> 8 & 255) / 255.0F;
|
- f13 = (float)(i1 >> 8 & 255) / 255.0F;
|
||||||
- f12 = (float)(i1 & 255) / 255.0F;
|
- f14 = (float)(i1 & 255) / 255.0F;
|
||||||
- GL11.glColor4f(f3 * f10, f3 * f11, f3 * f12, 1.0F);
|
- GL11.glColor4f(f5 * f11, f5 * f13, f5 * f14, 1.0F);
|
||||||
- this.renderItem(entityclientplayermp, itemstack, 1);
|
- this.renderItem(entityclientplayermp, itemstack, 1);
|
||||||
+ this.renderItem(entityclientplayermp, itemstack, 0, ItemRenderType.EQUIPPED_FIRST_PERSON);
|
+ this.renderItem(entityclientplayermp, itemstack, 0, ItemRenderType.EQUIPPED_FIRST_PERSON);
|
||||||
+ for (int x = 1; x < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); x++)
|
+ for (int x = 1; x < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); x++)
|
||||||
+ {
|
+ {
|
||||||
+ int i1 = Item.itemsList[itemstack.itemID].getColorFromItemStack(itemstack, x);
|
+ int i1 = Item.itemsList[itemstack.itemID].getColorFromItemStack(itemstack, x);
|
||||||
+ f10 = (float)(i1 >> 16 & 255) / 255.0F;
|
+ f11 = (float)(i1 >> 16 & 255) / 255.0F;
|
||||||
+ f11 = (float)(i1 >> 8 & 255) / 255.0F;
|
+ f13 = (float)(i1 >> 8 & 255) / 255.0F;
|
||||||
+ f12 = (float)(i1 & 255) / 255.0F;
|
+ f14 = (float)(i1 & 255) / 255.0F;
|
||||||
+ GL11.glColor4f(f3 * f10, f3 * f11, f3 * f12, 1.0F);
|
+ GL11.glColor4f(f5 * f11, f5 * f13, f5 * f14, 1.0F);
|
||||||
+ this.renderItem(entityclientplayermp, itemstack, x, ItemRenderType.EQUIPPED_FIRST_PERSON);
|
+ this.renderItem(entityclientplayermp, itemstack, x, ItemRenderType.EQUIPPED_FIRST_PERSON);
|
||||||
+ }
|
+ }
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
@@ -25,6 +25,10 @@
|
@@ -25,6 +25,10 @@
|
||||||
* True if the renderer supports multitextures and the OpenGL version != 1.3
|
* True if the renderer supports multitextures and the OpenGL version != 1.3
|
||||||
*/
|
*/
|
||||||
private static boolean useMultitextureARB = false;
|
private static boolean useMultitextureARB;
|
||||||
+
|
+
|
||||||
+ /* Stores the last values sent into setLightmapTextureCoords */
|
+ /* Stores the last values sent into setLightmapTextureCoords */
|
||||||
+ public static float lastBrightnessX = 0.0f;
|
+ public static float lastBrightnessX = 0.0f;
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/RenderBlocks.java
|
--- ../src_base/minecraft/net/minecraft/client/renderer/RenderBlocks.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderBlocks.java
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderBlocks.java
|
||||||
@@ -44,6 +44,8 @@
|
@@ -45,6 +45,8 @@
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class RenderBlocks
|
public class RenderBlocks
|
||||||
{
|
{
|
||||||
@@ -533,9 +535,8 @@
|
@@ -534,9 +536,8 @@
|
||||||
public boolean renderBlockBed(Block par1Block, int par2, int par3, int par4)
|
public boolean renderBlockBed(Block par1Block, int par2, int par3, int par4)
|
||||||
{
|
{
|
||||||
Tessellator tessellator = Tessellator.instance;
|
Tessellator tessellator = Tessellator.instance;
|
||||||
|
@ -21,7 +21,7 @@
|
||||||
float f = 0.5F;
|
float f = 0.5F;
|
||||||
float f1 = 1.0F;
|
float f1 = 1.0F;
|
||||||
float f2 = 0.8F;
|
float f2 = 0.8F;
|
||||||
@@ -544,6 +545,7 @@
|
@@ -545,6 +546,7 @@
|
||||||
tessellator.setBrightness(j1);
|
tessellator.setBrightness(j1);
|
||||||
tessellator.setColorOpaque_F(f, f, f);
|
tessellator.setColorOpaque_F(f, f, f);
|
||||||
Icon icon = this.getBlockIcon(par1Block, this.blockAccess, par2, par3, par4, 0);
|
Icon icon = this.getBlockIcon(par1Block, this.blockAccess, par2, par3, par4, 0);
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
double d0 = (double)icon.getMinU();
|
double d0 = (double)icon.getMinU();
|
||||||
double d1 = (double)icon.getMaxU();
|
double d1 = (double)icon.getMaxU();
|
||||||
double d2 = (double)icon.getMinV();
|
double d2 = (double)icon.getMinV();
|
||||||
@@ -560,6 +562,7 @@
|
@@ -561,6 +563,7 @@
|
||||||
tessellator.setBrightness(par1Block.getMixedBrightnessForBlock(this.blockAccess, par2, par3 + 1, par4));
|
tessellator.setBrightness(par1Block.getMixedBrightnessForBlock(this.blockAccess, par2, par3 + 1, par4));
|
||||||
tessellator.setColorOpaque_F(f1, f1, f1);
|
tessellator.setColorOpaque_F(f1, f1, f1);
|
||||||
icon = this.getBlockIcon(par1Block, this.blockAccess, par2, par3, par4, 1);
|
icon = this.getBlockIcon(par1Block, this.blockAccess, par2, par3, par4, 1);
|
||||||
|
@ -37,7 +37,7 @@
|
||||||
d0 = (double)icon.getMinU();
|
d0 = (double)icon.getMinU();
|
||||||
d1 = (double)icon.getMaxU();
|
d1 = (double)icon.getMaxU();
|
||||||
d2 = (double)icon.getMinV();
|
d2 = (double)icon.getMinV();
|
||||||
@@ -2351,7 +2354,7 @@
|
@@ -2358,7 +2361,7 @@
|
||||||
double d9;
|
double d9;
|
||||||
double d10;
|
double d10;
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
{
|
{
|
||||||
float f1 = 0.2F;
|
float f1 = 0.2F;
|
||||||
float f2 = 0.0625F;
|
float f2 = 0.0625F;
|
||||||
@@ -2371,7 +2374,7 @@
|
@@ -2378,7 +2381,7 @@
|
||||||
d0 = d5;
|
d0 = d5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@
|
||||||
{
|
{
|
||||||
tessellator.addVertexWithUV((double)((float)par2 + f1), (double)((float)par3 + f + f2), (double)(par4 + 1), d2, d1);
|
tessellator.addVertexWithUV((double)((float)par2 + f1), (double)((float)par3 + f + f2), (double)(par4 + 1), d2, d1);
|
||||||
tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + f2), (double)(par4 + 1), d2, d3);
|
tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + f2), (double)(par4 + 1), d2, d3);
|
||||||
@@ -2383,7 +2386,7 @@
|
@@ -2390,7 +2393,7 @@
|
||||||
tessellator.addVertexWithUV((double)((float)par2 + f1), (double)((float)par3 + f + f2), (double)(par4 + 1), d2, d1);
|
tessellator.addVertexWithUV((double)((float)par2 + f1), (double)((float)par3 + f + f2), (double)(par4 + 1), d2, d1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +64,7 @@
|
||||||
{
|
{
|
||||||
tessellator.addVertexWithUV((double)((float)(par2 + 1) - f1), (double)((float)par3 + f + f2), (double)(par4 + 0), d0, d1);
|
tessellator.addVertexWithUV((double)((float)(par2 + 1) - f1), (double)((float)par3 + f + f2), (double)(par4 + 0), d0, d1);
|
||||||
tessellator.addVertexWithUV((double)(par2 + 1 - 0), (double)((float)(par3 + 0) + f2), (double)(par4 + 0), d0, d3);
|
tessellator.addVertexWithUV((double)(par2 + 1 - 0), (double)((float)(par3 + 0) + f2), (double)(par4 + 0), d0, d3);
|
||||||
@@ -2395,7 +2398,7 @@
|
@@ -2402,7 +2405,7 @@
|
||||||
tessellator.addVertexWithUV((double)((float)(par2 + 1) - f1), (double)((float)par3 + f + f2), (double)(par4 + 0), d0, d1);
|
tessellator.addVertexWithUV((double)((float)(par2 + 1) - f1), (double)((float)par3 + f + f2), (double)(par4 + 0), d0, d1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
{
|
{
|
||||||
tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + f + f2), (double)((float)par4 + f1), d2, d1);
|
tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + f + f2), (double)((float)par4 + f1), d2, d1);
|
||||||
tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + f2), (double)(par4 + 0), d2, d3);
|
tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)(par3 + 0) + f2), (double)(par4 + 0), d2, d3);
|
||||||
@@ -2407,7 +2410,7 @@
|
@@ -2414,7 +2417,7 @@
|
||||||
tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + f + f2), (double)((float)par4 + f1), d2, d1);
|
tessellator.addVertexWithUV((double)(par2 + 0), (double)((float)par3 + f + f2), (double)((float)par4 + f1), d2, d1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -82,7 +82,7 @@
|
||||||
{
|
{
|
||||||
tessellator.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + f + f2), (double)((float)(par4 + 1) - f1), d0, d1);
|
tessellator.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + f + f2), (double)((float)(par4 + 1) - f1), d0, d1);
|
||||||
tessellator.addVertexWithUV((double)(par2 + 1), (double)((float)(par3 + 0) + f2), (double)(par4 + 1 - 0), d0, d3);
|
tessellator.addVertexWithUV((double)(par2 + 1), (double)((float)(par3 + 0) + f2), (double)(par4 + 1 - 0), d0, d3);
|
||||||
@@ -2419,7 +2422,7 @@
|
@@ -2426,7 +2429,7 @@
|
||||||
tessellator.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + f + f2), (double)((float)(par4 + 1) - f1), d0, d1);
|
tessellator.addVertexWithUV((double)(par2 + 1), (double)((float)par3 + f + f2), (double)((float)(par4 + 1) - f1), d0, d1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@
|
||||||
{
|
{
|
||||||
d5 = (double)par2 + 0.5D + 0.5D;
|
d5 = (double)par2 + 0.5D + 0.5D;
|
||||||
d6 = (double)par2 + 0.5D - 0.5D;
|
d6 = (double)par2 + 0.5D - 0.5D;
|
||||||
@@ -3050,10 +3053,10 @@
|
@@ -3057,10 +3060,10 @@
|
||||||
double d17 = (double)par2 + 0.5D + 0.0625D;
|
double d17 = (double)par2 + 0.5D + 0.0625D;
|
||||||
double d18 = (double)par4 + 0.5D - 0.0625D;
|
double d18 = (double)par4 + 0.5D - 0.0625D;
|
||||||
double d19 = (double)par4 + 0.5D + 0.0625D;
|
double d19 = (double)par4 + 0.5D + 0.0625D;
|
||||||
|
@ -105,4 +105,4 @@
|
||||||
+ boolean flag3 = par1BlockPane.canPaneConnectTo(this.blockAccess,par2, par3, par4, EAST);
|
+ boolean flag3 = par1BlockPane.canPaneConnectTo(this.blockAccess,par2, par3, par4, EAST);
|
||||||
boolean flag4 = par1BlockPane.shouldSideBeRendered(this.blockAccess, par2, par3 + 1, par4, 1);
|
boolean flag4 = par1BlockPane.shouldSideBeRendered(this.blockAccess, par2, par3 + 1, par4, 1);
|
||||||
boolean flag5 = par1BlockPane.shouldSideBeRendered(this.blockAccess, par2, par3 - 1, par4, 0);
|
boolean flag5 = par1BlockPane.shouldSideBeRendered(this.blockAccess, par2, par3 - 1, par4, 0);
|
||||||
|
double d20 = 0.01D;
|
||||||
|
|
|
@ -1,43 +0,0 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/RenderEngine.java
|
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderEngine.java
|
|
||||||
@@ -28,6 +28,8 @@
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
import org.lwjgl.opengl.GL12;
|
|
||||||
|
|
||||||
+import net.minecraftforge.client.ForgeHooksClient;
|
|
||||||
+
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public class RenderEngine
|
|
||||||
{
|
|
||||||
@@ -186,6 +188,7 @@
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
+ ForgeHooksClient.onTextureLoadPre(par1Str);
|
|
||||||
int i = GLAllocation.generateTextureNames();
|
|
||||||
TextureFXManager.instance().bindTextureToName(par1Str, i);
|
|
||||||
boolean flag = par1Str.startsWith("%blur%");
|
|
||||||
@@ -216,6 +219,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
this.textureMap.put(s1, Integer.valueOf(i));
|
|
||||||
+ ForgeHooksClient.onTextureLoad(par1Str, texturePack.getSelectedTexturePack());
|
|
||||||
return i;
|
|
||||||
}
|
|
||||||
catch (Exception exception)
|
|
||||||
@@ -417,6 +421,7 @@
|
|
||||||
{
|
|
||||||
this.textureMapBlocks.updateAnimations();
|
|
||||||
this.textureMapItems.updateAnimations();
|
|
||||||
+ this.resetBoundTexture(); //Forge: BugFix, Animations don't use our bindTexture, and thus don't change the cached texture.
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
@@ -515,6 +520,7 @@
|
|
||||||
{
|
|
||||||
this.textureMapBlocks.refreshTextures();
|
|
||||||
this.textureMapItems.refreshTextures();
|
|
||||||
+ this.resetBoundTexture(); //Forge: BugFix, Animations don't use our bindTexture, and thus don't change the cached texture.
|
|
||||||
}
|
|
||||||
|
|
||||||
public Icon getMissingIcon(int par1)
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/RenderGlobal.java
|
--- ../src_base/minecraft/net/minecraft/client/renderer/RenderGlobal.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderGlobal.java
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/RenderGlobal.java
|
||||||
@@ -65,6 +65,9 @@
|
@@ -67,6 +67,9 @@
|
||||||
import org.lwjgl.opengl.ARBOcclusionQuery;
|
import org.lwjgl.opengl.ARBOcclusionQuery;
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class RenderGlobal implements IWorldAccess
|
public class RenderGlobal implements IWorldAccess
|
||||||
{
|
{
|
||||||
@@ -443,35 +446,47 @@
|
@@ -446,35 +449,47 @@
|
||||||
*/
|
*/
|
||||||
public void renderEntities(Vec3 par1Vec3, ICamera par2ICamera, float par3)
|
public void renderEntities(Vec3 par1Vec3, ICamera par2ICamera, float par3)
|
||||||
{
|
{
|
||||||
|
@ -26,32 +26,32 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this.theWorld.theProfiler.startSection("prepare");
|
this.theWorld.theProfiler.startSection("prepare");
|
||||||
- TileEntityRenderer.instance.cacheActiveRenderInfo(this.theWorld, this.renderEngine, this.mc.fontRenderer, this.mc.renderViewEntity, par3);
|
- TileEntityRenderer.instance.cacheActiveRenderInfo(this.theWorld, this.mc.func_110434_K(), this.mc.fontRenderer, this.mc.renderViewEntity, par3);
|
||||||
- RenderManager.instance.cacheActiveRenderInfo(this.theWorld, this.renderEngine, this.mc.fontRenderer, this.mc.renderViewEntity, this.mc.pointedEntityLiving, this.mc.gameSettings, par3);
|
- RenderManager.instance.cacheActiveRenderInfo(this.theWorld, this.mc.func_110434_K(), this.mc.fontRenderer, this.mc.renderViewEntity, this.mc.pointedEntityLiving, this.mc.gameSettings, par3);
|
||||||
- this.countEntitiesTotal = 0;
|
- this.countEntitiesTotal = 0;
|
||||||
- this.countEntitiesRendered = 0;
|
- this.countEntitiesRendered = 0;
|
||||||
- this.countEntitiesHidden = 0;
|
- this.countEntitiesHidden = 0;
|
||||||
- EntityLiving entityliving = this.mc.renderViewEntity;
|
- EntityLivingBase entitylivingbase = this.mc.renderViewEntity;
|
||||||
- RenderManager.renderPosX = entityliving.lastTickPosX + (entityliving.posX - entityliving.lastTickPosX) * (double)par3;
|
- RenderManager.renderPosX = entitylivingbase.lastTickPosX + (entitylivingbase.posX - entitylivingbase.lastTickPosX) * (double)par3;
|
||||||
- RenderManager.renderPosY = entityliving.lastTickPosY + (entityliving.posY - entityliving.lastTickPosY) * (double)par3;
|
- RenderManager.renderPosY = entitylivingbase.lastTickPosY + (entitylivingbase.posY - entitylivingbase.lastTickPosY) * (double)par3;
|
||||||
- RenderManager.renderPosZ = entityliving.lastTickPosZ + (entityliving.posZ - entityliving.lastTickPosZ) * (double)par3;
|
- RenderManager.renderPosZ = entitylivingbase.lastTickPosZ + (entitylivingbase.posZ - entitylivingbase.lastTickPosZ) * (double)par3;
|
||||||
- TileEntityRenderer.staticPlayerX = entityliving.lastTickPosX + (entityliving.posX - entityliving.lastTickPosX) * (double)par3;
|
- TileEntityRenderer.staticPlayerX = entitylivingbase.lastTickPosX + (entitylivingbase.posX - entitylivingbase.lastTickPosX) * (double)par3;
|
||||||
- TileEntityRenderer.staticPlayerY = entityliving.lastTickPosY + (entityliving.posY - entityliving.lastTickPosY) * (double)par3;
|
- TileEntityRenderer.staticPlayerY = entitylivingbase.lastTickPosY + (entitylivingbase.posY - entitylivingbase.lastTickPosY) * (double)par3;
|
||||||
- TileEntityRenderer.staticPlayerZ = entityliving.lastTickPosZ + (entityliving.posZ - entityliving.lastTickPosZ) * (double)par3;
|
- TileEntityRenderer.staticPlayerZ = entitylivingbase.lastTickPosZ + (entitylivingbase.posZ - entitylivingbase.lastTickPosZ) * (double)par3;
|
||||||
+ if (pass == 0)
|
+ if (pass == 0)
|
||||||
+ {
|
+ {
|
||||||
+ TileEntityRenderer.instance.cacheActiveRenderInfo(this.theWorld, this.renderEngine, this.mc.fontRenderer, this.mc.renderViewEntity, par3);
|
+ TileEntityRenderer.instance.cacheActiveRenderInfo(this.theWorld, this.mc.func_110434_K(), this.mc.fontRenderer, this.mc.renderViewEntity, par3);
|
||||||
+ RenderManager.instance.cacheActiveRenderInfo(this.theWorld, this.renderEngine, this.mc.fontRenderer, this.mc.renderViewEntity, this.mc.pointedEntityLiving, this.mc.gameSettings, par3);
|
+ RenderManager.instance.cacheActiveRenderInfo(this.theWorld, this.mc.func_110434_K(), this.mc.fontRenderer, this.mc.renderViewEntity, this.mc.pointedEntityLiving, this.mc.gameSettings, par3);
|
||||||
+ this.countEntitiesTotal = 0;
|
+ this.countEntitiesTotal = 0;
|
||||||
+ this.countEntitiesRendered = 0;
|
+ this.countEntitiesRendered = 0;
|
||||||
+ this.countEntitiesHidden = 0;
|
+ this.countEntitiesHidden = 0;
|
||||||
+ EntityLiving entityliving = this.mc.renderViewEntity;
|
+ EntityLivingBase entitylivingbase = this.mc.renderViewEntity;
|
||||||
+ RenderManager.renderPosX = entityliving.lastTickPosX + (entityliving.posX - entityliving.lastTickPosX) * (double)par3;
|
+ RenderManager.renderPosX = entitylivingbase.lastTickPosX + (entitylivingbase.posX - entitylivingbase.lastTickPosX) * (double)par3;
|
||||||
+ RenderManager.renderPosY = entityliving.lastTickPosY + (entityliving.posY - entityliving.lastTickPosY) * (double)par3;
|
+ RenderManager.renderPosY = entitylivingbase.lastTickPosY + (entitylivingbase.posY - entitylivingbase.lastTickPosY) * (double)par3;
|
||||||
+ RenderManager.renderPosZ = entityliving.lastTickPosZ + (entityliving.posZ - entityliving.lastTickPosZ) * (double)par3;
|
+ RenderManager.renderPosZ = entitylivingbase.lastTickPosZ + (entitylivingbase.posZ - entitylivingbase.lastTickPosZ) * (double)par3;
|
||||||
+ TileEntityRenderer.staticPlayerX = entityliving.lastTickPosX + (entityliving.posX - entityliving.lastTickPosX) * (double)par3;
|
+ TileEntityRenderer.staticPlayerX = entitylivingbase.lastTickPosX + (entitylivingbase.posX - entitylivingbase.lastTickPosX) * (double)par3;
|
||||||
+ TileEntityRenderer.staticPlayerY = entityliving.lastTickPosY + (entityliving.posY - entityliving.lastTickPosY) * (double)par3;
|
+ TileEntityRenderer.staticPlayerY = entitylivingbase.lastTickPosY + (entitylivingbase.posY - entitylivingbase.lastTickPosY) * (double)par3;
|
||||||
+ TileEntityRenderer.staticPlayerZ = entityliving.lastTickPosZ + (entityliving.posZ - entityliving.lastTickPosZ) * (double)par3;
|
+ TileEntityRenderer.staticPlayerZ = entitylivingbase.lastTickPosZ + (entitylivingbase.posZ - entitylivingbase.lastTickPosZ) * (double)par3;
|
||||||
+ }
|
+ }
|
||||||
this.mc.entityRenderer.enableLightmap((double)par3);
|
this.mc.entityRenderer.enableLightmap((double)par3);
|
||||||
this.theWorld.theProfiler.endStartSection("global");
|
this.theWorld.theProfiler.endStartSection("global");
|
||||||
|
@ -71,7 +71,7 @@
|
||||||
++this.countEntitiesRendered;
|
++this.countEntitiesRendered;
|
||||||
|
|
||||||
if (entity.isInRangeToRenderVec3D(par1Vec3))
|
if (entity.isInRangeToRenderVec3D(par1Vec3))
|
||||||
@@ -485,6 +500,7 @@
|
@@ -488,6 +503,7 @@
|
||||||
for (i = 0; i < list.size(); ++i)
|
for (i = 0; i < list.size(); ++i)
|
||||||
{
|
{
|
||||||
entity = (Entity)list.get(i);
|
entity = (Entity)list.get(i);
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
|
|
||||||
if (entity.isInRangeToRenderVec3D(par1Vec3) && (entity.ignoreFrustumCheck || par2ICamera.isBoundingBoxInFrustum(entity.boundingBox) || entity.riddenByEntity == this.mc.thePlayer) && (entity != this.mc.renderViewEntity || this.mc.gameSettings.thirdPersonView != 0 || this.mc.renderViewEntity.isPlayerSleeping()) && this.theWorld.blockExists(MathHelper.floor_double(entity.posX), 0, MathHelper.floor_double(entity.posZ)))
|
if (entity.isInRangeToRenderVec3D(par1Vec3) && (entity.ignoreFrustumCheck || par2ICamera.isBoundingBoxInFrustum(entity.boundingBox) || entity.riddenByEntity == this.mc.thePlayer) && (entity != this.mc.renderViewEntity || this.mc.gameSettings.thirdPersonView != 0 || this.mc.renderViewEntity.isPlayerSleeping()) && this.theWorld.blockExists(MathHelper.floor_double(entity.posX), 0, MathHelper.floor_double(entity.posZ)))
|
||||||
{
|
{
|
||||||
@@ -498,7 +514,11 @@
|
@@ -501,7 +517,11 @@
|
||||||
|
|
||||||
for (i = 0; i < this.tileEntities.size(); ++i)
|
for (i = 0; i < this.tileEntities.size(); ++i)
|
||||||
{
|
{
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.mc.entityRenderer.disableLightmap((double)par3);
|
this.mc.entityRenderer.disableLightmap((double)par3);
|
||||||
@@ -933,6 +953,12 @@
|
@@ -936,6 +956,12 @@
|
||||||
*/
|
*/
|
||||||
public void renderSky(float par1)
|
public void renderSky(float par1)
|
||||||
{
|
{
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
if (this.mc.theWorld.provider.dimensionId == 1)
|
if (this.mc.theWorld.provider.dimensionId == 1)
|
||||||
{
|
{
|
||||||
GL11.glDisable(GL11.GL_FOG);
|
GL11.glDisable(GL11.GL_FOG);
|
||||||
@@ -1171,6 +1197,13 @@
|
@@ -1174,6 +1200,13 @@
|
||||||
|
|
||||||
public void renderClouds(float par1)
|
public void renderClouds(float par1)
|
||||||
{
|
{
|
||||||
|
@ -119,15 +119,15 @@
|
||||||
if (this.mc.theWorld.provider.isSurfaceWorld())
|
if (this.mc.theWorld.provider.isSurfaceWorld())
|
||||||
{
|
{
|
||||||
if (this.mc.gameSettings.fancyGraphics)
|
if (this.mc.gameSettings.fancyGraphics)
|
||||||
@@ -1599,6 +1632,11 @@
|
@@ -1582,6 +1615,11 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityPlayer par2EntityPlayer, float par3)
|
public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityPlayer par2EntityPlayer, float par3)
|
||||||
+ {
|
+ {
|
||||||
+ drawBlockDamageTexture(par1Tessellator, (EntityLiving)par2EntityPlayer, par3);
|
+ drawBlockDamageTexture(par1Tessellator, (EntityLivingBase)par2EntityPlayer, par3);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityLiving par2EntityPlayer, float par3)
|
+ public void drawBlockDamageTexture(Tessellator par1Tessellator, EntityLivingBase par2EntityPlayer, float par3)
|
||||||
{
|
{
|
||||||
double d0 = par2EntityPlayer.lastTickPosX + (par2EntityPlayer.posX - par2EntityPlayer.lastTickPosX) * (double)par3;
|
double d0 = par2EntityPlayer.lastTickPosX + (par2EntityPlayer.posX - par2EntityPlayer.lastTickPosX) * (double)par3;
|
||||||
double d1 = par2EntityPlayer.lastTickPosY + (par2EntityPlayer.posY - par2EntityPlayer.lastTickPosY) * (double)par3;
|
double d1 = par2EntityPlayer.lastTickPosY + (par2EntityPlayer.posY - par2EntityPlayer.lastTickPosY) * (double)par3;
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
* Boolean used to check whether quads should be drawn as two triangles. Initialized to false and never changed.
|
* Boolean used to check whether quads should be drawn as two triangles. Initialized to false and never changed.
|
||||||
*/
|
*/
|
||||||
@@ -25,16 +33,16 @@
|
@@ -25,16 +33,16 @@
|
||||||
private static boolean tryVBO = false;
|
private static boolean tryVBO;
|
||||||
|
|
||||||
/** The byte buffer used for GL allocation. */
|
/** The byte buffer used for GL allocation. */
|
||||||
- private ByteBuffer byteBuffer;
|
- private ByteBuffer byteBuffer;
|
||||||
|
@ -44,10 +44,10 @@
|
||||||
/** Raw integer array. */
|
/** Raw integer array. */
|
||||||
private int[] rawBuffer;
|
private int[] rawBuffer;
|
||||||
@@ -110,10 +118,10 @@
|
@@ -110,10 +118,10 @@
|
||||||
public boolean isDrawing = false;
|
public boolean isDrawing;
|
||||||
|
|
||||||
/** Whether we are currently using VBO or not. */
|
/** Whether we are currently using VBO or not. */
|
||||||
- private boolean useVBO = false;
|
- private boolean useVBO;
|
||||||
+ private static boolean useVBO = false;
|
+ private static boolean useVBO = false;
|
||||||
|
|
||||||
/** An IntBuffer used to store the indices of vertex buffer objects. */
|
/** An IntBuffer used to store the indices of vertex buffer objects. */
|
||||||
|
@ -57,7 +57,7 @@
|
||||||
/**
|
/**
|
||||||
* The index of the last VBO used. This is used in round-robin fashion, sequentially, through the vboCount vertex
|
* The index of the last VBO used. This is used in round-robin fashion, sequentially, through the vboCount vertex
|
||||||
@@ -122,25 +130,28 @@
|
@@ -122,25 +130,28 @@
|
||||||
private int vboIndex = 0;
|
private int vboIndex;
|
||||||
|
|
||||||
/** Number of vertex buffer objects allocated for use. */
|
/** Number of vertex buffer objects allocated for use. */
|
||||||
- private int vboCount = 10;
|
- private int vboCount = 10;
|
||||||
|
|
|
@ -1,23 +1,15 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/WorldRenderer.java
|
--- ../src_base/minecraft/net/minecraft/client/renderer/WorldRenderer.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/WorldRenderer.java
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/WorldRenderer.java
|
||||||
@@ -17,13 +17,15 @@
|
@@ -23,7 +23,7 @@
|
||||||
import net.minecraft.world.chunk.Chunk;
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
|
|
||||||
+import net.minecraftforge.client.ForgeHooksClient;
|
|
||||||
+
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
public class WorldRenderer
|
|
||||||
{
|
|
||||||
/** Reference to the World object. */
|
/** Reference to the World object. */
|
||||||
public World worldObj;
|
public World worldObj;
|
||||||
private int glRenderList = -1;
|
private int glRenderList = -1;
|
||||||
- private static Tessellator tessellator = Tessellator.instance;
|
- private static Tessellator tessellator = Tessellator.instance;
|
||||||
+ //private static Tessellator tessellator = Tessellator.instance;
|
+ //private static Tessellator tessellator = Tessellator.instance;
|
||||||
public static int chunksUpdated = 0;
|
public static int chunksUpdated;
|
||||||
public int posX;
|
public int posX;
|
||||||
public int posY;
|
public int posY;
|
||||||
@@ -192,15 +194,16 @@
|
@@ -192,15 +192,16 @@
|
||||||
GL11.glTranslatef(-8.0F, -8.0F, -8.0F);
|
GL11.glTranslatef(-8.0F, -8.0F, -8.0F);
|
||||||
GL11.glScalef(f, f, f);
|
GL11.glScalef(f, f, f);
|
||||||
GL11.glTranslatef(8.0F, 8.0F, 8.0F);
|
GL11.glTranslatef(8.0F, 8.0F, 8.0F);
|
||||||
|
@ -37,7 +29,7 @@
|
||||||
{
|
{
|
||||||
TileEntity tileentity = chunkcache.getBlockTileEntity(k2, i2, j2);
|
TileEntity tileentity = chunkcache.getBlockTileEntity(k2, i2, j2);
|
||||||
|
|
||||||
@@ -212,14 +215,15 @@
|
@@ -212,14 +213,15 @@
|
||||||
|
|
||||||
int i3 = block.getRenderBlockPass();
|
int i3 = block.getRenderBlockPass();
|
||||||
|
|
||||||
|
@ -56,7 +48,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -228,10 +232,11 @@
|
@@ -228,10 +230,11 @@
|
||||||
|
|
||||||
if (flag2)
|
if (flag2)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java
|
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderBiped.java
|
||||||
@@ -11,9 +11,15 @@
|
@@ -14,9 +14,15 @@
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.item.EnumArmorMaterial;
|
import net.minecraft.item.EnumArmorMaterial;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
+import net.minecraft.item.ItemBlock;
|
+import net.minecraft.item.ItemBlock;
|
||||||
|
@ -16,25 +16,72 @@
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class RenderBiped extends RenderLiving
|
public class RenderBiped extends RenderLiving
|
||||||
@@ -59,7 +65,7 @@
|
@@ -49,11 +55,13 @@
|
||||||
|
this.field_82425_h = new ModelBiped(0.5F);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ @Deprecated //Use the more sensitve version getArmorResource below
|
||||||
|
public static ResourceLocation func_110857_a(ItemArmor par0ItemArmor, int par1)
|
||||||
|
{
|
||||||
|
return func_110858_a(par0ItemArmor, par1, (String)null);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ @Deprecated //Use the more sensitve version getArmorResource below
|
||||||
|
public static ResourceLocation func_110858_a(ItemArmor par0ItemArmor, int par1, String par2Str)
|
||||||
|
{
|
||||||
|
String s1 = String.format("textures/models/armor/%s_layer_%d%s.png", new Object[] {bipedArmorFilenamePrefix[par0ItemArmor.renderIndex], Integer.valueOf(par1 == 2 ? 2 : 1), par2Str == null ? "" : String.format("_%s", new Object[]{par2Str})});
|
||||||
|
@@ -68,6 +76,33 @@
|
||||||
|
return resourcelocation;
|
||||||
|
}
|
||||||
|
|
||||||
|
+ /**
|
||||||
|
+ * More generic ForgeHook version of the above function, it allows for Items to have more control over what texture they provide.
|
||||||
|
+ *
|
||||||
|
+ * @param entity Entity wearing the armor
|
||||||
|
+ * @param stack ItemStack for the armor
|
||||||
|
+ * @param slot Slot ID that the item is in
|
||||||
|
+ * @param type Subtype, can be null or "overlay"
|
||||||
|
+ * @return ResourceLocation pointing at the armor's texture
|
||||||
|
+ */
|
||||||
|
+ public static ResourceLocation getArmorResource(Entity entity, ItemStack stack, int slot, String type)
|
||||||
|
+ {
|
||||||
|
+ ItemArmor item = (ItemArmor)stack.getItem();
|
||||||
|
+ String s1 = String.format("textures/models/armor/%s_layer_%d%s.png",
|
||||||
|
+ bipedArmorFilenamePrefix[item.renderIndex], (slot == 2 ? 2 : 1), type == null ? "" : String.format("_%s", type));
|
||||||
|
+
|
||||||
|
+ s1 = ForgeHooksClient.getArmorTexture(entity, stack, s1, slot, (slot == 2 ? 2 : 1), type);
|
||||||
|
+ ResourceLocation resourcelocation = (ResourceLocation)field_110859_k.get(s1);
|
||||||
|
+
|
||||||
|
+ if (resourcelocation == null)
|
||||||
|
+ {
|
||||||
|
+ resourcelocation = new ResourceLocation(s1);
|
||||||
|
+ field_110859_k.put(s1, resourcelocation);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ return resourcelocation;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
protected int func_130006_a(EntityLiving par1EntityLiving, int par2, float par3)
|
||||||
|
{
|
||||||
|
ItemStack itemstack = par1EntityLiving.getCurrentArmor(3 - par2);
|
||||||
|
@@ -79,7 +114,7 @@
|
||||||
if (item instanceof ItemArmor)
|
if (item instanceof ItemArmor)
|
||||||
{
|
{
|
||||||
ItemArmor itemarmor = (ItemArmor)item;
|
ItemArmor itemarmor = (ItemArmor)item;
|
||||||
- this.loadTexture("/armor/" + bipedArmorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + ".png");
|
- this.func_110776_a(func_110857_a(itemarmor, par2));
|
||||||
+ this.loadTexture(ForgeHooksClient.getArmorTexture(par1EntityLiving, itemstack, "/armor/" + bipedArmorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + ".png", par2, 1));
|
+ this.func_110776_a(getArmorResource(par1EntityLiving, itemstack, par2, null));
|
||||||
ModelBiped modelbiped = par2 == 2 ? this.field_82425_h : this.field_82423_g;
|
ModelBiped modelbiped = par2 == 2 ? this.field_82425_h : this.field_82423_g;
|
||||||
modelbiped.bipedHead.showModel = par2 == 0;
|
modelbiped.bipedHead.showModel = par2 == 0;
|
||||||
modelbiped.bipedHeadwear.showModel = par2 == 0;
|
modelbiped.bipedHeadwear.showModel = par2 == 0;
|
||||||
@@ -68,6 +74,7 @@
|
@@ -88,15 +123,17 @@
|
||||||
modelbiped.bipedLeftArm.showModel = par2 == 1;
|
modelbiped.bipedLeftArm.showModel = par2 == 1;
|
||||||
modelbiped.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
|
modelbiped.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
|
||||||
modelbiped.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
|
modelbiped.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
|
||||||
+ modelbiped = ForgeHooksClient.getArmorModel(par1EntityLiving, itemstack, par2, modelbiped);
|
+ modelbiped = ForgeHooksClient.getArmorModel(par1EntityLiving, itemstack, par2, modelbiped);
|
||||||
this.setRenderPassModel(modelbiped);
|
this.setRenderPassModel(modelbiped);
|
||||||
|
modelbiped.onGround = this.mainModel.onGround;
|
||||||
if (modelbiped != null)
|
modelbiped.isRiding = this.mainModel.isRiding;
|
||||||
@@ -87,9 +94,10 @@
|
modelbiped.isChild = this.mainModel.isChild;
|
||||||
|
|
||||||
float f1 = 1.0F;
|
float f1 = 1.0F;
|
||||||
|
|
||||||
- if (itemarmor.getArmorMaterial() == EnumArmorMaterial.CLOTH)
|
- if (itemarmor.getArmorMaterial() == EnumArmorMaterial.CLOTH)
|
||||||
|
@ -47,16 +94,16 @@
|
||||||
float f2 = (float)(j >> 16 & 255) / 255.0F;
|
float f2 = (float)(j >> 16 & 255) / 255.0F;
|
||||||
float f3 = (float)(j >> 8 & 255) / 255.0F;
|
float f3 = (float)(j >> 8 & 255) / 255.0F;
|
||||||
float f4 = (float)(j & 255) / 255.0F;
|
float f4 = (float)(j & 255) / 255.0F;
|
||||||
@@ -128,7 +136,7 @@
|
@@ -134,7 +171,7 @@
|
||||||
|
|
||||||
if (item instanceof ItemArmor)
|
if (item instanceof ItemArmor)
|
||||||
{
|
{
|
||||||
ItemArmor itemarmor = (ItemArmor)item;
|
- this.func_110776_a(func_110858_a((ItemArmor)item, par2, "overlay"));
|
||||||
- this.loadTexture("/armor/" + bipedArmorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + "_b.png");
|
+ this.func_110776_a(getArmorResource(par1EntityLiving, itemstack, par2, "overlay"));
|
||||||
+ this.loadTexture(ForgeHooksClient.getArmorTexture(par1EntityLiving, itemstack, "/armor/" + bipedArmorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + "_b.png", par2, 2));
|
|
||||||
float f1 = 1.0F;
|
float f1 = 1.0F;
|
||||||
GL11.glColor3f(f1, f1, f1);
|
GL11.glColor3f(f1, f1, f1);
|
||||||
}
|
}
|
||||||
@@ -174,9 +182,12 @@
|
@@ -185,9 +222,12 @@
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
this.modelBipedMain.bipedHead.postRender(0.0625F);
|
this.modelBipedMain.bipedHead.postRender(0.0625F);
|
||||||
|
|
||||||
|
@ -72,7 +119,7 @@
|
||||||
{
|
{
|
||||||
f2 = 0.625F;
|
f2 = 0.625F;
|
||||||
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
|
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
|
||||||
@@ -218,7 +229,10 @@
|
@@ -229,7 +269,10 @@
|
||||||
this.modelBipedMain.bipedRightArm.postRender(0.0625F);
|
this.modelBipedMain.bipedRightArm.postRender(0.0625F);
|
||||||
GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
|
GL11.glTranslatef(-0.0625F, 0.4375F, 0.0625F);
|
||||||
|
|
||||||
|
@ -84,7 +131,7 @@
|
||||||
{
|
{
|
||||||
f2 = 0.5F;
|
f2 = 0.5F;
|
||||||
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
|
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
|
||||||
@@ -265,7 +279,10 @@
|
@@ -276,7 +319,10 @@
|
||||||
|
|
||||||
if (itemstack.getItem().requiresMultipleRenderPasses())
|
if (itemstack.getItem().requiresMultipleRenderPasses())
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
|
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderItem.java
|
||||||
@@ -19,6 +19,8 @@
|
@@ -21,6 +21,8 @@
|
||||||
import org.lwjgl.opengl.GL11;
|
import org.lwjgl.opengl.GL11;
|
||||||
import org.lwjgl.opengl.GL12;
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class RenderItem extends Render
|
public class RenderItem extends Render
|
||||||
{
|
{
|
||||||
@@ -49,29 +51,9 @@
|
@@ -53,29 +55,9 @@
|
||||||
if (itemstack.getItem() != null)
|
if (itemstack.getItem() != null)
|
||||||
{
|
{
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
|
@ -41,11 +41,11 @@
|
||||||
|
|
||||||
GL11.glTranslatef((float)par2, (float)par4 + f2, (float)par6);
|
GL11.glTranslatef((float)par2, (float)par4 + f2, (float)par6);
|
||||||
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
GL11.glEnable(GL12.GL_RESCALE_NORMAL);
|
||||||
@@ -80,9 +62,18 @@
|
@@ -84,9 +66,18 @@
|
||||||
float f5;
|
|
||||||
float f6;
|
float f6;
|
||||||
|
int i;
|
||||||
|
|
||||||
- if (itemstack.getItemSpriteNumber() == 0 && Block.blocksList[itemstack.itemID] != null && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
|
- if (itemstack.getItemSpriteNumber() == 0 && itemstack.itemID < Block.blocksList.length && Block.blocksList[itemstack.itemID] != null && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack.itemID].getRenderType()))
|
||||||
- {
|
- {
|
||||||
- Block block = Block.blocksList[itemstack.itemID];
|
- Block block = Block.blocksList[itemstack.itemID];
|
||||||
+ Block block = null;
|
+ Block block = null;
|
||||||
|
@ -63,9 +63,9 @@
|
||||||
GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);
|
GL11.glRotatef(f3, 0.0F, 1.0F, 0.0F);
|
||||||
|
|
||||||
if (renderInFrame)
|
if (renderInFrame)
|
||||||
@@ -138,10 +129,10 @@
|
@@ -139,10 +130,10 @@
|
||||||
|
GL11.glScalef(0.5F, 0.5F, 0.5F);
|
||||||
this.loadTexture("/gui/items.png");
|
}
|
||||||
|
|
||||||
- for (int k = 0; k <= 1; ++k)
|
- for (int k = 0; k <= 1; ++k)
|
||||||
+ for (int k = 0; k < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); ++k)
|
+ for (int k = 0; k < itemstack.getItem().getRenderPasses(itemstack.getItemDamage()); ++k)
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
f8 = 1.0F;
|
f8 = 1.0F;
|
||||||
|
|
||||||
if (this.renderWithColor)
|
if (this.renderWithColor)
|
||||||
@@ -241,32 +232,26 @@
|
@@ -240,32 +231,26 @@
|
||||||
f11 = 0.021875F;
|
f11 = 0.021875F;
|
||||||
ItemStack itemstack = par1EntityItem.getEntityItem();
|
ItemStack itemstack = par1EntityItem.getEntityItem();
|
||||||
int j = itemstack.stackSize;
|
int j = itemstack.stackSize;
|
||||||
|
@ -122,9 +122,9 @@
|
||||||
+
|
+
|
||||||
+ if (itemstack.getItemSpriteNumber() == 0)
|
+ if (itemstack.getItemSpriteNumber() == 0)
|
||||||
{
|
{
|
||||||
this.loadTexture("/terrain.png");
|
this.func_110776_a(TextureMap.field_110575_b);
|
||||||
}
|
}
|
||||||
@@ -356,10 +341,10 @@
|
@@ -353,10 +338,10 @@
|
||||||
float f1;
|
float f1;
|
||||||
float f2;
|
float f2;
|
||||||
|
|
||||||
|
@ -132,41 +132,41 @@
|
||||||
+ Block block = (k < Block.blocksList.length ? Block.blocksList[k] : null);
|
+ Block block = (k < Block.blocksList.length ? Block.blocksList[k] : null);
|
||||||
+ if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[k].getRenderType()))
|
+ if (par3ItemStack.getItemSpriteNumber() == 0 && block != null && RenderBlocks.renderItemIn3d(Block.blocksList[k].getRenderType()))
|
||||||
{
|
{
|
||||||
par2RenderEngine.bindTexture("/terrain.png");
|
par2TextureManager.func_110577_a(TextureMap.field_110575_b);
|
||||||
- Block block = Block.blocksList[k];
|
- Block block = Block.blocksList[k];
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
GL11.glTranslatef((float)(par4 - 2), (float)(par5 + 3), -3.0F + this.zLevel);
|
GL11.glTranslatef((float)(par4 - 2), (float)(par5 + 3), -3.0F + this.zLevel);
|
||||||
GL11.glScalef(10.0F, 10.0F, 10.0F);
|
GL11.glScalef(10.0F, 10.0F, 10.0F);
|
||||||
@@ -390,11 +375,11 @@
|
@@ -383,11 +368,11 @@
|
||||||
if (Item.itemsList[k].requiresMultipleRenderPasses())
|
else if (Item.itemsList[k].requiresMultipleRenderPasses())
|
||||||
{
|
{
|
||||||
GL11.glDisable(GL11.GL_LIGHTING);
|
GL11.glDisable(GL11.GL_LIGHTING);
|
||||||
- par2RenderEngine.bindTexture("/gui/items.png");
|
- par2TextureManager.func_110577_a(TextureMap.field_110576_c);
|
||||||
-
|
-
|
||||||
- for (j1 = 0; j1 <= 1; ++j1)
|
- for (int j1 = 0; j1 <= 1; ++j1)
|
||||||
- {
|
- {
|
||||||
- Icon icon1 = Item.itemsList[k].getIconFromDamageForRenderPass(l, j1);
|
- Icon icon = Item.itemsList[k].getIconFromDamageForRenderPass(l, j1);
|
||||||
+ par2RenderEngine.bindTexture(par3ItemStack.getItemSpriteNumber() == 0 ? "/terrain.png" : "/gui/items.png");
|
+ par2TextureManager.func_110577_a(par3ItemStack.getItemSpriteNumber() == 0 ? TextureMap.field_110575_b : TextureMap.field_110576_c);
|
||||||
+
|
+
|
||||||
+ for (j1 = 0; j1 < Item.itemsList[k].getRenderPasses(l); ++j1)
|
+ for (int j1 = 0; j1 <= Item.itemsList[k].getRenderPasses(l); ++j1)
|
||||||
+ {
|
+ {
|
||||||
+ Icon icon1 = Item.itemsList[k].getIcon(par3ItemStack, j1);
|
+ Icon icon = Item.itemsList[k].getIcon(par3ItemStack, j1);
|
||||||
int k1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, j1);
|
int k1 = Item.itemsList[k].getColorFromItemStack(par3ItemStack, j1);
|
||||||
f = (float)(k1 >> 16 & 255) / 255.0F;
|
f1 = (float)(k1 >> 16 & 255) / 255.0F;
|
||||||
f1 = (float)(k1 >> 8 & 255) / 255.0F;
|
f2 = (float)(k1 >> 8 & 255) / 255.0F;
|
||||||
@@ -453,7 +438,10 @@
|
@@ -435,7 +420,10 @@
|
||||||
{
|
{
|
||||||
if (par3ItemStack != null)
|
if (par3ItemStack != null)
|
||||||
{
|
{
|
||||||
- this.renderItemIntoGUI(par1FontRenderer, par2RenderEngine, par3ItemStack, par4, par5);
|
- this.func_110795_a(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5);
|
||||||
+ if (!ForgeHooksClient.renderInventoryItem(renderBlocks, par2RenderEngine, par3ItemStack, renderWithColor, zLevel, (float)par4, (float)par5))
|
+ if (!ForgeHooksClient.renderInventoryItem(renderBlocks, par2TextureManager, par3ItemStack, renderWithColor, zLevel, (float)par4, (float)par5))
|
||||||
+ {
|
+ {
|
||||||
+ this.renderItemIntoGUI(par1FontRenderer, par2RenderEngine, par3ItemStack, par4, par5);
|
+ this.func_110795_a(par1FontRenderer, par2TextureManager, par3ItemStack, par4, par5);
|
||||||
+ }
|
+ }
|
||||||
|
|
||||||
if (par3ItemStack.hasEffect())
|
if (par3ItemStack.hasEffect())
|
||||||
{
|
{
|
||||||
@@ -590,4 +578,47 @@
|
@@ -573,4 +561,47 @@
|
||||||
{
|
{
|
||||||
this.doRenderItem((EntityItem)par1Entity, par2, par4, par6, par8, par9);
|
this.doRenderItem((EntityItem)par1Entity, par2, par4, par6, par8, par9);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,44 +0,0 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderLiving.java
|
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderLiving.java
|
|
||||||
@@ -15,6 +15,9 @@
|
|
||||||
import net.minecraft.entity.EntityLiving;
|
|
||||||
import net.minecraft.entity.projectile.EntityArrow;
|
|
||||||
import net.minecraft.util.MathHelper;
|
|
||||||
+import net.minecraftforge.client.event.RenderLivingEvent;
|
|
||||||
+import net.minecraftforge.common.MinecraftForge;
|
|
||||||
+
|
|
||||||
import org.lwjgl.opengl.GL11;
|
|
||||||
import org.lwjgl.opengl.GL12;
|
|
||||||
|
|
||||||
@@ -25,6 +28,8 @@
|
|
||||||
|
|
||||||
/** The model to be used during the render passes. */
|
|
||||||
protected ModelBase renderPassModel;
|
|
||||||
+ public static float NAME_TAG_RANGE = 64.0f;
|
|
||||||
+ public static float NAME_TAG_RANGE_SNEAK = 32.0f;
|
|
||||||
|
|
||||||
public RenderLiving(ModelBase par1ModelBase, float par2)
|
|
||||||
{
|
|
||||||
@@ -413,12 +418,13 @@
|
|
||||||
*/
|
|
||||||
protected void passSpecialRender(EntityLiving par1EntityLiving, double par2, double par4, double par6)
|
|
||||||
{
|
|
||||||
+ if (MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Specials.Pre(par1EntityLiving, this))) return;
|
|
||||||
if (Minecraft.isGuiEnabled() && par1EntityLiving != this.renderManager.livingPlayer && !par1EntityLiving.func_98034_c(Minecraft.getMinecraft().thePlayer) && (par1EntityLiving.func_94059_bO() || par1EntityLiving.func_94056_bM() && par1EntityLiving == this.renderManager.field_96451_i))
|
|
||||||
{
|
|
||||||
float f = 1.6F;
|
|
||||||
float f1 = 0.016666668F * f;
|
|
||||||
double d3 = par1EntityLiving.getDistanceSqToEntity(this.renderManager.livingPlayer);
|
|
||||||
- float f2 = par1EntityLiving.isSneaking() ? 32.0F : 64.0F;
|
|
||||||
+ float f2 = par1EntityLiving.isSneaking() ? NAME_TAG_RANGE_SNEAK : NAME_TAG_RANGE;
|
|
||||||
|
|
||||||
if (d3 < (double)(f2 * f2))
|
|
||||||
{
|
|
||||||
@@ -462,6 +468,7 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+ MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Specials.Post(par1EntityLiving, this));
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void func_96449_a(EntityLiving par1EntityLiving, double par2, double par4, double par6, String par8Str, float par9, double par10)
|
|
|
@ -1,22 +1,22 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
|
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
|
||||||
@@ -221,12 +221,14 @@
|
@@ -224,12 +224,14 @@
|
||||||
|
|
||||||
if (par4EntityLiving.isPlayerSleeping())
|
if (par4EntityLivingBase.isPlayerSleeping())
|
||||||
{
|
{
|
||||||
- int i = par1World.getBlockId(MathHelper.floor_double(par4EntityLiving.posX), MathHelper.floor_double(par4EntityLiving.posY), MathHelper.floor_double(par4EntityLiving.posZ));
|
- int i = par1World.getBlockId(MathHelper.floor_double(par4EntityLivingBase.posX), MathHelper.floor_double(par4EntityLivingBase.posY), MathHelper.floor_double(par4EntityLivingBase.posZ));
|
||||||
-
|
-
|
||||||
- if (i == Block.bed.blockID)
|
- if (i == Block.bed.blockID)
|
||||||
+ int x = MathHelper.floor_double(par4EntityLiving.posX);
|
+ int x = MathHelper.floor_double(par4EntityLivingBase.posX);
|
||||||
+ int y = MathHelper.floor_double(par4EntityLiving.posY);
|
+ int y = MathHelper.floor_double(par4EntityLivingBase.posY);
|
||||||
+ int z = MathHelper.floor_double(par4EntityLiving.posZ);
|
+ int z = MathHelper.floor_double(par4EntityLivingBase.posZ);
|
||||||
+ Block block = Block.blocksList[par1World.getBlockId(x, y, z)];
|
+ Block block = Block.blocksList[par1World.getBlockId(x, y, z)];
|
||||||
+
|
+
|
||||||
+ if (block != null && block.isBed(par1World, x, y, z, par4EntityLiving))
|
+ if (block != null && block.isBed(par1World, x, y, z, par4EntityLivingBase))
|
||||||
{
|
{
|
||||||
- int j = par1World.getBlockMetadata(MathHelper.floor_double(par4EntityLiving.posX), MathHelper.floor_double(par4EntityLiving.posY), MathHelper.floor_double(par4EntityLiving.posZ));
|
- int j = par1World.getBlockMetadata(MathHelper.floor_double(par4EntityLivingBase.posX), MathHelper.floor_double(par4EntityLivingBase.posY), MathHelper.floor_double(par4EntityLivingBase.posZ));
|
||||||
- int k = j & 3;
|
- int k = j & 3;
|
||||||
+ int k = block.getBedDirection(par1World, x, y, z);;
|
+ int k = block.getBedDirection(par1World, x, y, z);
|
||||||
this.playerViewY = (float)(k * 90 + 180);
|
this.playerViewY = (float)(k * 90 + 180);
|
||||||
this.playerViewX = 0.0F;
|
this.playerViewX = 0.0F;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
|
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderPlayer.java
|
||||||
@@ -19,7 +19,16 @@
|
@@ -21,7 +21,16 @@
|
||||||
import net.minecraft.scoreboard.ScoreObjective;
|
import net.minecraft.scoreboard.ScoreObjective;
|
||||||
import net.minecraft.scoreboard.Scoreboard;
|
import net.minecraft.scoreboard.Scoreboard;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
|
@ -16,23 +16,12 @@
|
||||||
+import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D;
|
+import static net.minecraftforge.client.IItemRenderer.ItemRendererHelper.BLOCK_3D;
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class RenderPlayer extends RenderLiving
|
public class RenderPlayer extends RendererLivingEntity
|
||||||
@@ -28,6 +37,10 @@
|
@@ -43,6 +52,13 @@
|
||||||
private ModelBiped modelArmorChestplate;
|
|
||||||
private ModelBiped modelArmor;
|
|
||||||
public static String[] armorFilenamePrefix = new String[] {"cloth", "chain", "iron", "diamond", "gold"};
|
|
||||||
+ @Deprecated //Old dead code, tags are now in RenderLiving
|
|
||||||
+ public static float NAME_TAG_RANGE = 64.0f;
|
|
||||||
+ @Deprecated //Old dead code, tags are now in RenderLiving
|
|
||||||
+ public static float NAME_TAG_RANGE_SNEAK = 32.0f;
|
|
||||||
|
|
||||||
public RenderPlayer()
|
|
||||||
{
|
{
|
||||||
@@ -49,6 +62,13 @@
|
ItemStack itemstack = par1AbstractClientPlayer.inventory.armorItemInSlot(3 - par2);
|
||||||
{
|
|
||||||
ItemStack itemstack = par1EntityPlayer.inventory.armorItemInSlot(3 - par2);
|
|
||||||
|
|
||||||
+ RenderPlayerEvent.SetArmorModel event = new RenderPlayerEvent.SetArmorModel(par1EntityPlayer, this, 3 - par2, par3, itemstack);
|
+ RenderPlayerEvent.SetArmorModel event = new RenderPlayerEvent.SetArmorModel(par1AbstractClientPlayer, this, 3 - par2, par3, itemstack);
|
||||||
+ MinecraftForge.EVENT_BUS.post(event);
|
+ MinecraftForge.EVENT_BUS.post(event);
|
||||||
+ if (event.result != -1)
|
+ if (event.result != -1)
|
||||||
+ {
|
+ {
|
||||||
|
@ -42,25 +31,24 @@
|
||||||
if (itemstack != null)
|
if (itemstack != null)
|
||||||
{
|
{
|
||||||
Item item = itemstack.getItem();
|
Item item = itemstack.getItem();
|
||||||
@@ -56,7 +76,7 @@
|
@@ -50,7 +66,7 @@
|
||||||
if (item instanceof ItemArmor)
|
if (item instanceof ItemArmor)
|
||||||
{
|
{
|
||||||
ItemArmor itemarmor = (ItemArmor)item;
|
ItemArmor itemarmor = (ItemArmor)item;
|
||||||
- this.loadTexture("/armor/" + armorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + ".png");
|
- this.func_110776_a(RenderBiped.func_110857_a(itemarmor, par2));
|
||||||
+ this.loadTexture(ForgeHooksClient.getArmorTexture(par1EntityPlayer, itemstack, "/armor/" + armorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + ".png", par2, 1));
|
+ this.func_110776_a(RenderBiped.getArmorResource(par1AbstractClientPlayer, itemstack, par2, null));
|
||||||
ModelBiped modelbiped = par2 == 2 ? this.modelArmor : this.modelArmorChestplate;
|
ModelBiped modelbiped = par2 == 2 ? this.modelArmor : this.modelArmorChestplate;
|
||||||
modelbiped.bipedHead.showModel = par2 == 0;
|
modelbiped.bipedHead.showModel = par2 == 0;
|
||||||
modelbiped.bipedHeadwear.showModel = par2 == 0;
|
modelbiped.bipedHeadwear.showModel = par2 == 0;
|
||||||
@@ -65,6 +85,7 @@
|
@@ -59,15 +75,17 @@
|
||||||
modelbiped.bipedLeftArm.showModel = par2 == 1;
|
modelbiped.bipedLeftArm.showModel = par2 == 1;
|
||||||
modelbiped.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
|
modelbiped.bipedRightLeg.showModel = par2 == 2 || par2 == 3;
|
||||||
modelbiped.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
|
modelbiped.bipedLeftLeg.showModel = par2 == 2 || par2 == 3;
|
||||||
+ modelbiped = ForgeHooksClient.getArmorModel(par1EntityPlayer, itemstack, par2, modelbiped);
|
+ modelbiped = ForgeHooksClient.getArmorModel(par1AbstractClientPlayer, itemstack, par2, modelbiped);
|
||||||
this.setRenderPassModel(modelbiped);
|
this.setRenderPassModel(modelbiped);
|
||||||
|
modelbiped.onGround = this.mainModel.onGround;
|
||||||
if (modelbiped != null)
|
modelbiped.isRiding = this.mainModel.isRiding;
|
||||||
@@ -84,9 +105,10 @@
|
modelbiped.isChild = this.mainModel.isChild;
|
||||||
|
|
||||||
float f1 = 1.0F;
|
float f1 = 1.0F;
|
||||||
|
|
||||||
- if (itemarmor.getArmorMaterial() == EnumArmorMaterial.CLOTH)
|
- if (itemarmor.getArmorMaterial() == EnumArmorMaterial.CLOTH)
|
||||||
|
@ -73,36 +61,36 @@
|
||||||
float f2 = (float)(j >> 16 & 255) / 255.0F;
|
float f2 = (float)(j >> 16 & 255) / 255.0F;
|
||||||
float f3 = (float)(j >> 8 & 255) / 255.0F;
|
float f3 = (float)(j >> 8 & 255) / 255.0F;
|
||||||
float f4 = (float)(j & 255) / 255.0F;
|
float f4 = (float)(j & 255) / 255.0F;
|
||||||
@@ -125,7 +147,7 @@
|
@@ -105,7 +123,7 @@
|
||||||
|
|
||||||
if (item instanceof ItemArmor)
|
if (item instanceof ItemArmor)
|
||||||
{
|
{
|
||||||
ItemArmor itemarmor = (ItemArmor)item;
|
- this.func_110776_a(RenderBiped.func_110858_a((ItemArmor)item, par2, "overlay"));
|
||||||
- this.loadTexture("/armor/" + armorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + "_b.png");
|
+ this.func_110776_a(RenderBiped.getArmorResource(par1AbstractClientPlayer, itemstack, par2, "overlay"));
|
||||||
+ this.loadTexture(ForgeHooksClient.getArmorTexture(par1EntityPlayer, itemstack, "/armor/" + armorFilenamePrefix[itemarmor.renderIndex] + "_" + (par2 == 2 ? 2 : 1) + "_b.png", par2, 2));
|
|
||||||
float f1 = 1.0F;
|
float f1 = 1.0F;
|
||||||
GL11.glColor3f(f1, f1, f1);
|
GL11.glColor3f(f1, f1, f1);
|
||||||
}
|
}
|
||||||
@@ -134,6 +156,7 @@
|
@@ -114,6 +132,7 @@
|
||||||
|
|
||||||
public void renderPlayer(EntityPlayer par1EntityPlayer, double par2, double par4, double par6, float par8, float par9)
|
public void func_110819_a(AbstractClientPlayer par1AbstractClientPlayer, double par2, double par4, double par6, float par8, float par9)
|
||||||
{
|
{
|
||||||
+ if (MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Pre(par1EntityPlayer, this))) return;
|
+ if (MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Pre(par1AbstractClientPlayer, this))) return;
|
||||||
float f2 = 1.0F;
|
float f2 = 1.0F;
|
||||||
GL11.glColor3f(f2, f2, f2);
|
GL11.glColor3f(f2, f2, f2);
|
||||||
ItemStack itemstack = par1EntityPlayer.inventory.getCurrentItem();
|
ItemStack itemstack = par1AbstractClientPlayer.inventory.getCurrentItem();
|
||||||
@@ -165,6 +188,7 @@
|
@@ -145,6 +164,7 @@
|
||||||
this.modelArmorChestplate.aimedBow = this.modelArmor.aimedBow = this.modelBipedMain.aimedBow = false;
|
this.modelArmorChestplate.aimedBow = this.modelArmor.aimedBow = this.modelBipedMain.aimedBow = false;
|
||||||
this.modelArmorChestplate.isSneak = this.modelArmor.isSneak = this.modelBipedMain.isSneak = false;
|
this.modelArmorChestplate.isSneak = this.modelArmor.isSneak = this.modelBipedMain.isSneak = false;
|
||||||
this.modelArmorChestplate.heldItemRight = this.modelArmor.heldItemRight = this.modelBipedMain.heldItemRight = 0;
|
this.modelArmorChestplate.heldItemRight = this.modelArmor.heldItemRight = this.modelBipedMain.heldItemRight = 0;
|
||||||
+ MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Post(par1EntityPlayer, this));
|
+ MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Post(par1AbstractClientPlayer, this));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
protected ResourceLocation func_110817_a(AbstractClientPlayer par1AbstractClientPlayer)
|
||||||
@@ -172,21 +196,30 @@
|
@@ -154,21 +174,30 @@
|
||||||
*/
|
|
||||||
protected void renderSpecials(EntityPlayer par1EntityPlayer, float par2)
|
protected void func_110820_a(AbstractClientPlayer par1AbstractClientPlayer, float par2)
|
||||||
{
|
{
|
||||||
+ RenderPlayerEvent.Specials.Pre event = new RenderPlayerEvent.Specials.Pre(par1EntityPlayer, this, par2);
|
+ RenderPlayerEvent.Specials.Pre event = new RenderPlayerEvent.Specials.Pre(par1AbstractClientPlayer, this, par2);
|
||||||
+ if (MinecraftForge.EVENT_BUS.post(event))
|
+ if (MinecraftForge.EVENT_BUS.post(event))
|
||||||
+ {
|
+ {
|
||||||
+ return;
|
+ return;
|
||||||
|
@ -110,9 +98,9 @@
|
||||||
+
|
+
|
||||||
float f1 = 1.0F;
|
float f1 = 1.0F;
|
||||||
GL11.glColor3f(f1, f1, f1);
|
GL11.glColor3f(f1, f1, f1);
|
||||||
super.renderEquippedItems(par1EntityPlayer, par2);
|
super.renderEquippedItems(par1AbstractClientPlayer, par2);
|
||||||
super.renderArrowsStuckInEntity(par1EntityPlayer, par2);
|
super.renderArrowsStuckInEntity(par1AbstractClientPlayer, par2);
|
||||||
ItemStack itemstack = par1EntityPlayer.inventory.armorItemInSlot(3);
|
ItemStack itemstack = par1AbstractClientPlayer.inventory.armorItemInSlot(3);
|
||||||
|
|
||||||
- if (itemstack != null)
|
- if (itemstack != null)
|
||||||
+ if (itemstack != null && event.renderHelmet)
|
+ if (itemstack != null && event.renderHelmet)
|
||||||
|
@ -133,27 +121,26 @@
|
||||||
{
|
{
|
||||||
f2 = 0.625F;
|
f2 = 0.625F;
|
||||||
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
|
GL11.glTranslatef(0.0F, -0.25F, 0.0F);
|
||||||
@@ -238,7 +271,7 @@
|
@@ -220,6 +249,7 @@
|
||||||
|
boolean flag = par1AbstractClientPlayer.func_110310_o().func_110557_a();
|
||||||
|
boolean flag1 = !par1AbstractClientPlayer.isInvisible();
|
||||||
|
boolean flag2 = !par1AbstractClientPlayer.getHideCape();
|
||||||
|
+ flag = event.renderCape && flag;
|
||||||
float f6;
|
float f6;
|
||||||
|
|
||||||
- if (this.loadDownloadableImageTexture(par1EntityPlayer.cloakUrl, (String)null) && !par1EntityPlayer.isInvisible() && !par1EntityPlayer.getHideCape())
|
if (flag && flag1 && flag2)
|
||||||
+ if (event.renderCape && this.loadDownloadableImageTexture(par1EntityPlayer.cloakUrl, (String)null) && !par1EntityPlayer.isInvisible() && !par1EntityPlayer.getHideCape())
|
@@ -271,7 +301,7 @@
|
||||||
{
|
|
||||||
GL11.glPushMatrix();
|
|
||||||
GL11.glTranslatef(0.0F, 0.0F, 0.125F);
|
|
||||||
@@ -286,7 +319,7 @@
|
|
||||||
|
|
||||||
ItemStack itemstack1 = par1EntityPlayer.inventory.getCurrentItem();
|
ItemStack itemstack1 = par1AbstractClientPlayer.inventory.getCurrentItem();
|
||||||
|
|
||||||
- if (itemstack1 != null)
|
- if (itemstack1 != null)
|
||||||
+ if (itemstack1 != null && event.renderItem)
|
+ if (itemstack1 != null && event.renderItem)
|
||||||
{
|
{
|
||||||
GL11.glPushMatrix();
|
GL11.glPushMatrix();
|
||||||
this.modelBipedMain.bipedRightArm.postRender(0.0625F);
|
this.modelBipedMain.bipedRightArm.postRender(0.0625F);
|
||||||
@@ -304,7 +337,11 @@
|
@@ -291,7 +321,11 @@
|
||||||
enumaction = itemstack1.getItemUseAction();
|
|
||||||
}
|
float f11;
|
||||||
|
|
||||||
- if (itemstack1.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType()))
|
- if (itemstack1.itemID < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType()))
|
||||||
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED);
|
+ IItemRenderer customRenderer = MinecraftForgeClient.getItemRenderer(itemstack1, EQUIPPED);
|
||||||
|
@ -162,9 +149,9 @@
|
||||||
+
|
+
|
||||||
+ if (is3D || (isBlock && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType())))
|
+ if (is3D || (isBlock && RenderBlocks.renderItemIn3d(Block.blocksList[itemstack1.itemID].getRenderType())))
|
||||||
{
|
{
|
||||||
f3 = 0.5F;
|
f11 = 0.5F;
|
||||||
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
|
GL11.glTranslatef(0.0F, 0.1875F, -0.3125F);
|
||||||
@@ -361,7 +398,7 @@
|
@@ -348,7 +382,7 @@
|
||||||
|
|
||||||
if (itemstack1.getItem().requiresMultipleRenderPasses())
|
if (itemstack1.getItem().requiresMultipleRenderPasses())
|
||||||
{
|
{
|
||||||
|
@ -172,12 +159,12 @@
|
||||||
+ for (j = 0; j < itemstack1.getItem().getRenderPasses(itemstack1.getItemDamage()); ++j)
|
+ for (j = 0; j < itemstack1.getItem().getRenderPasses(itemstack1.getItemDamage()); ++j)
|
||||||
{
|
{
|
||||||
int k = itemstack1.getItem().getColorFromItemStack(itemstack1, j);
|
int k = itemstack1.getItem().getColorFromItemStack(itemstack1, j);
|
||||||
f12 = (float)(k >> 16 & 255) / 255.0F;
|
f13 = (float)(k >> 16 & 255) / 255.0F;
|
||||||
@@ -383,6 +420,7 @@
|
@@ -370,6 +404,7 @@
|
||||||
|
|
||||||
GL11.glPopMatrix();
|
GL11.glPopMatrix();
|
||||||
}
|
}
|
||||||
+ MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Specials.Post(par1EntityPlayer, this, par2));
|
+ MinecraftForge.EVENT_BUS.post(new RenderPlayerEvent.Specials.Post(par1AbstractClientPlayer, this, par2));
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void renderPlayerScale(EntityPlayer par1EntityPlayer, float par2)
|
protected void renderPlayerScale(AbstractClientPlayer par1AbstractClientPlayer, float par2)
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java
|
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RenderSnowMan.java
|
||||||
@@ -7,8 +7,14 @@
|
@@ -9,8 +9,14 @@
|
||||||
import net.minecraft.client.renderer.RenderBlocks;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.entity.monster.EntitySnowman;
|
import net.minecraft.entity.monster.EntitySnowman;
|
||||||
+import net.minecraft.item.ItemBlock;
|
+import net.minecraft.item.ItemBlock;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class RenderSnowMan extends RenderLiving
|
public class RenderSnowMan extends RenderLiving
|
||||||
@@ -31,12 +37,15 @@
|
@@ -35,12 +41,15 @@
|
||||||
super.renderEquippedItems(par1EntitySnowman, par2);
|
super.renderEquippedItems(par1EntitySnowman, par2);
|
||||||
ItemStack itemstack = new ItemStack(Block.pumpkin, 1);
|
ItemStack itemstack = new ItemStack(Block.pumpkin, 1);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,45 @@
|
||||||
|
--- ../src_base/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java
|
||||||
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/entity/RendererLivingEntity.java
|
||||||
|
@@ -17,6 +17,9 @@
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.entity.projectile.EntityArrow;
|
||||||
|
import net.minecraft.util.MathHelper;
|
||||||
|
+import net.minecraftforge.client.event.RenderLivingEvent;
|
||||||
|
+import net.minecraftforge.common.MinecraftForge;
|
||||||
|
+
|
||||||
|
import org.lwjgl.opengl.GL11;
|
||||||
|
import org.lwjgl.opengl.GL12;
|
||||||
|
|
||||||
|
@@ -28,6 +31,9 @@
|
||||||
|
|
||||||
|
/** The model to be used during the render passes. */
|
||||||
|
protected ModelBase renderPassModel;
|
||||||
|
+
|
||||||
|
+ public static float NAME_TAG_RANGE = 64.0f;
|
||||||
|
+ public static float NAME_TAG_RANGE_SNEAK = 32.0f;
|
||||||
|
|
||||||
|
public RendererLivingEntity(ModelBase par1ModelBase, float par2)
|
||||||
|
{
|
||||||
|
@@ -439,12 +445,13 @@
|
||||||
|
|
||||||
|
protected void func_130008_a(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))
|
||||||
|
{
|
||||||
|
float f = 1.6F;
|
||||||
|
float f1 = 0.016666668F * f;
|
||||||
|
double d3 = par1EntityLivingBase.getDistanceSqToEntity(this.renderManager.livingPlayer);
|
||||||
|
- float f2 = par1EntityLivingBase.isSneaking() ? 32.0F : 64.0F;
|
||||||
|
+ float f2 = par1EntityLivingBase.isSneaking() ? NAME_TAG_RANGE_SNEAK : NAME_TAG_RANGE;
|
||||||
|
|
||||||
|
if (d3 < (double)(f2 * f2))
|
||||||
|
{
|
||||||
|
@@ -488,6 +495,7 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+ MinecraftForge.EVENT_BUS.post(new RenderLivingEvent.Specials.Post(par1EntityLivingBase, this));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected boolean func_110813_b(EntityLivingBase par1EntityLivingBase)
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
|
--- ../src_base/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/Stitcher.java
|
||||||
@@ -182,7 +182,7 @@
|
@@ -184,7 +184,7 @@
|
||||||
|
|
||||||
if (flag4 ^ flag5)
|
if (flag4 ^ flag5)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,50 +0,0 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/texture/TextureManager.java
|
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/TextureManager.java
|
|
||||||
@@ -66,17 +66,42 @@
|
|
||||||
|
|
||||||
public List createTexture(String par1Str)
|
|
||||||
{
|
|
||||||
+ return createNewTexture(par1Str, par1Str, null);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ public List createNewTexture(String textureName, String textureFile, TextureStitched stitched)
|
|
||||||
+ {
|
|
||||||
+ String par1Str = textureFile;
|
|
||||||
ArrayList arraylist = new ArrayList();
|
|
||||||
ITexturePack itexturepack = Minecraft.getMinecraft().texturePackList.getSelectedTexturePack();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
- BufferedImage bufferedimage = ImageIO.read(itexturepack.getResourceAsStream("/" + par1Str));
|
|
||||||
- int i = bufferedimage.getHeight();
|
|
||||||
- int j = bufferedimage.getWidth();
|
|
||||||
- String s1 = this.getBasename(par1Str);
|
|
||||||
+ BufferedImage bufferedimage = null;
|
|
||||||
+ int i = 0;
|
|
||||||
+ int j = 0;
|
|
||||||
+ FileNotFoundException fnfe = null;
|
|
||||||
+ try
|
|
||||||
+ {
|
|
||||||
+ bufferedimage = ImageIO.read(itexturepack.getResourceAsStream("/" + textureFile));
|
|
||||||
+ i = bufferedimage.getHeight();
|
|
||||||
+ j = bufferedimage.getWidth();
|
|
||||||
+ }
|
|
||||||
+ catch (FileNotFoundException e)
|
|
||||||
+ {
|
|
||||||
+ fnfe = e;
|
|
||||||
+ }
|
|
||||||
+ String s1 = textureName;
|
|
||||||
|
|
||||||
- if (this.hasAnimationTxt(par1Str, itexturepack))
|
|
||||||
+ if (stitched != null && stitched.loadTexture(this, itexturepack, textureName, textureFile, bufferedimage, arraylist))
|
|
||||||
+ {
|
|
||||||
+ ;
|
|
||||||
+ }
|
|
||||||
+ else if (fnfe != null)
|
|
||||||
+ {
|
|
||||||
+ throw fnfe;
|
|
||||||
+ }
|
|
||||||
+ else if (this.hasAnimationTxt(par1Str, itexturepack))
|
|
||||||
{
|
|
||||||
int k = j;
|
|
||||||
int l = j;
|
|
|
@ -1,105 +1,40 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
|
--- ../src_base/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
|
+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
|
||||||
@@ -20,6 +20,8 @@
|
@@ -21,6 +21,7 @@
|
||||||
import net.minecraft.client.texturepacks.ITexturePack;
|
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
import net.minecraft.util.Icon;
|
import net.minecraft.util.Icon;
|
||||||
|
import net.minecraft.util.ReportedException;
|
||||||
+import net.minecraftforge.client.ForgeHooksClient;
|
+import net.minecraftforge.client.ForgeHooksClient;
|
||||||
+import net.minecraftforge.common.ForgeDummyContainer;
|
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
@SideOnly(Side.CLIENT)
|
||||||
public class TextureMap implements IconRegister
|
public class TextureMap extends AbstractTexture implements TickableTextureObject, IconRegister
|
||||||
@@ -48,6 +50,7 @@
|
@@ -62,6 +63,7 @@
|
||||||
public void refreshTextures()
|
Stitcher stitcher = new Stitcher(i, i, true);
|
||||||
{
|
this.mapTexturesStiched.clear();
|
||||||
this.textureStichedMap.clear();
|
this.listTextureStiched.clear();
|
||||||
+ ForgeHooksClient.onTextureStitchedPre(this);
|
+ ForgeHooksClient.onTextureStitchedPre(this);
|
||||||
int i;
|
Iterator iterator = this.field_110574_e.entrySet().iterator();
|
||||||
int j;
|
|
||||||
|
|
||||||
@@ -91,14 +94,22 @@
|
|
||||||
StitchHolder stitchholder = new StitchHolder(texture);
|
|
||||||
stitcher.addStitchHolder(stitchholder);
|
|
||||||
hashmap.put(stitchholder, Arrays.asList(new Texture[] {texture}));
|
|
||||||
- Iterator iterator = this.textureStichedMap.keySet().iterator();
|
|
||||||
-
|
|
||||||
- while (iterator.hasNext())
|
|
||||||
- {
|
|
||||||
- String s = (String)iterator.next();
|
|
||||||
- String s1 = this.basePath + s + this.textureExt;
|
|
||||||
- List list = TextureManager.instance().createTexture(s1);
|
|
||||||
-
|
|
||||||
+
|
|
||||||
+ for (Map.Entry<String, TextureStitched> entry : ((Map<String, TextureStitched>)textureStichedMap).entrySet())
|
|
||||||
+ {
|
|
||||||
+ String name = entry.getKey();
|
|
||||||
+ String path;
|
|
||||||
+ if (name.indexOf(':') == -1)
|
|
||||||
+ {
|
|
||||||
+ path = this.basePath + name + this.textureExt;
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ String domain = name.substring(0, name.indexOf(':'));
|
|
||||||
+ String file = name.substring(name.indexOf(':') + 1);
|
|
||||||
+ path = "mods/" + domain +"/" + basePath + file + textureExt;
|
|
||||||
+ }
|
|
||||||
+ List list = TextureManager.instance().createNewTexture(name, path, entry.getValue());
|
|
||||||
if (!list.isEmpty())
|
|
||||||
{
|
|
||||||
StitchHolder stitchholder1 = new StitchHolder((Texture)list.get(0));
|
|
||||||
@@ -117,7 +128,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
this.atlasTexture = stitcher.getTexture();
|
|
||||||
- iterator = stitcher.getStichSlots().iterator();
|
|
||||||
+ Iterator iterator = stitcher.getStichSlots().iterator();
|
|
||||||
|
|
||||||
while (iterator.hasNext())
|
while (iterator.hasNext())
|
||||||
{
|
@@ -142,6 +144,7 @@
|
||||||
@@ -151,7 +162,17 @@
|
textureatlassprite1 = (TextureAtlasSprite)iterator1.next();
|
||||||
if (list1.size() > 1)
|
textureatlassprite1.copyFrom(this.missingImage);
|
||||||
{
|
|
||||||
this.listTextureStiched.add(texturestitched);
|
|
||||||
- String s3 = this.basePath + s2 + ".txt";
|
|
||||||
+ String s3;
|
|
||||||
+ if (s2.indexOf(':') == -1)
|
|
||||||
+ {
|
|
||||||
+ s3 = basePath + s2 + ".txt";
|
|
||||||
+ }
|
|
||||||
+ else
|
|
||||||
+ {
|
|
||||||
+ String domain = s2.substring(0, s2.indexOf(':'));
|
|
||||||
+ String file = s2.substring(s2.indexOf(':') + 1);
|
|
||||||
+ s3 = "mods/" + domain + "/" + basePath + file + ".txt";
|
|
||||||
+ }
|
|
||||||
ITexturePack itexturepack = Minecraft.getMinecraft().texturePackList.getSelectedTexturePack();
|
|
||||||
boolean flag1 = !itexturepack.func_98138_b("/" + this.basePath + s2 + ".png", false);
|
|
||||||
|
|
||||||
@@ -177,7 +198,11 @@
|
|
||||||
texturestitched1.copyFrom(this.missingTextureStiched);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- this.atlasTexture.writeImage("debug.stitched_" + this.textureName + ".png");
|
|
||||||
+ if (!ForgeDummyContainer.disableStitchedFileSaving)
|
|
||||||
+ {
|
|
||||||
+ this.atlasTexture.writeImage("debug.stitched_" + this.textureName + ".png");
|
|
||||||
+ }
|
|
||||||
+ ForgeHooksClient.onTextureStitchedPost(this);
|
+ ForgeHooksClient.onTextureStitchedPost(this);
|
||||||
this.atlasTexture.uploadTexture();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -202,6 +227,7 @@
|
private void func_110573_f()
|
||||||
|
@@ -212,6 +215,7 @@
|
||||||
if (par1Str == null)
|
if (par1Str == null)
|
||||||
{
|
{
|
||||||
(new RuntimeException("Don\'t register null!")).printStackTrace();
|
(new RuntimeException("Don\'t register null!")).printStackTrace();
|
||||||
+ par1Str = "null"; //Don't allow things to actually register null..
|
+ par1Str = "null"; //Don't allow things to actually register null..
|
||||||
}
|
}
|
||||||
|
|
||||||
TextureStitched texturestitched = (TextureStitched)this.textureStichedMap.get(par1Str);
|
Object object = (TextureAtlasSprite)this.field_110574_e.get(par1Str);
|
||||||
@@ -219,4 +245,37 @@
|
@@ -253,4 +257,37 @@
|
||||||
{
|
{
|
||||||
return this.missingTextureStiched;
|
this.updateAnimations();
|
||||||
}
|
}
|
||||||
+
|
+
|
||||||
+ //===================================================================================================
|
+ //===================================================================================================
|
||||||
|
@ -107,14 +42,14 @@
|
||||||
+ //===================================================================================================
|
+ //===================================================================================================
|
||||||
+ /**
|
+ /**
|
||||||
+ * Grabs the registered entry for the specified name, returning null if there was not a entry.
|
+ * Grabs the registered entry for the specified name, returning null if there was not a entry.
|
||||||
+ * Opposed to func_94245_a, this will not instantiate the entry, useful to test if a maping exists.
|
+ * Opposed to registerIcon, this will not instantiate the entry, useful to test if a mapping exists.
|
||||||
+ *
|
+ *
|
||||||
+ * @param name The name of the entry to find
|
+ * @param name The name of the entry to find
|
||||||
+ * @return The registered entry, null if nothing was registered.
|
+ * @return The registered entry, null if nothing was registered.
|
||||||
+ */
|
+ */
|
||||||
+ public TextureStitched getTextureExtry(String name)
|
+ public TextureAtlasSprite getTextureExtry(String name)
|
||||||
+ {
|
+ {
|
||||||
+ return (TextureStitched)textureStichedMap.get(name);
|
+ return (TextureAtlasSprite)field_110574_e.get(name);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -125,11 +60,11 @@
|
||||||
+ * @param entry Entry instance
|
+ * @param entry Entry instance
|
||||||
+ * @return True if the entry was added to the map, false otherwise.
|
+ * @return True if the entry was added to the map, false otherwise.
|
||||||
+ */
|
+ */
|
||||||
+ public boolean setTextureEntry(String name, TextureStitched entry)
|
+ public boolean setTextureEntry(String name, TextureAtlasSprite entry)
|
||||||
+ {
|
+ {
|
||||||
+ if (!textureStichedMap.containsKey(name))
|
+ if (!field_110574_e.containsKey(name))
|
||||||
+ {
|
+ {
|
||||||
+ textureStichedMap.put(name, entry);
|
+ field_110574_e.put(name, entry);
|
||||||
+ return true;
|
+ return true;
|
||||||
+ }
|
+ }
|
||||||
+ return false;
|
+ return false;
|
||||||
|
|
|
@ -1,45 +0,0 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/client/renderer/texture/TextureStitched.java
|
|
||||||
+++ ../src_work/minecraft/net/minecraft/client/renderer/texture/TextureStitched.java
|
|
||||||
@@ -3,9 +3,13 @@
|
|
||||||
import cpw.mods.fml.client.TextureFXManager;
|
|
||||||
import cpw.mods.fml.relauncher.Side;
|
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
|
||||||
+
|
|
||||||
+import java.awt.image.BufferedImage;
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
+
|
|
||||||
+import net.minecraft.client.texturepacks.ITexturePack;
|
|
||||||
import net.minecraft.util.Icon;
|
|
||||||
import net.minecraft.util.Tuple;
|
|
||||||
|
|
||||||
@@ -252,4 +256,28 @@
|
|
||||||
t.createAndUploadTexture();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ //===================================================================================================
|
|
||||||
+ // Forge Start
|
|
||||||
+ //===================================================================================================
|
|
||||||
+ /**
|
|
||||||
+ * Called when texture packs are refreshed, from TextureManager.createNewTexture,
|
|
||||||
+ * allows for finer control over loading the animation lists and verification of the image.
|
|
||||||
+ * If the return value from this is true, no further loading will be done by vanilla code.
|
|
||||||
+ *
|
|
||||||
+ * You need to add all Texture's to the textures argument. At the end of this function at least one
|
|
||||||
+ * entry should be in that argument, or a error should of been thrown.
|
|
||||||
+ *
|
|
||||||
+ * @param manager The invoking manager
|
|
||||||
+ * @param texturepack Current texture pack
|
|
||||||
+ * @param name The name of the texture
|
|
||||||
+ * @param fileName Resource path for this texture
|
|
||||||
+ * @param image Buffered image of the loaded resource
|
|
||||||
+ * @param textures ArrayList of element type Texture, split textures should be added to this list for the stitcher to handle.
|
|
||||||
+ * @return Return true to skip further vanilla texture loading for this texture
|
|
||||||
+ */
|
|
||||||
+ public boolean loadTexture(TextureManager manager, ITexturePack texturepack, String name, String fileName, BufferedImage image, ArrayList textures)
|
|
||||||
+ {
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
}
|
|
|
@ -7,7 +7,7 @@
|
||||||
import cpw.mods.fml.relauncher.Side;
|
import cpw.mods.fml.relauncher.Side;
|
||||||
import cpw.mods.fml.relauncher.SideOnly;
|
import cpw.mods.fml.relauncher.SideOnly;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
@@ -52,7 +53,15 @@
|
@@ -60,7 +61,15 @@
|
||||||
|
|
||||||
if (block instanceof BlockChest && i == 0)
|
if (block instanceof BlockChest && i == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/command/CommandHandler.java
|
--- ../src_base/minecraft/net/minecraft/command/CommandHandler.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/command/CommandHandler.java
|
+++ ../src_work/minecraft/net/minecraft/command/CommandHandler.java
|
||||||
@@ -11,6 +11,9 @@
|
@@ -12,6 +12,9 @@
|
||||||
import net.minecraft.entity.player.EntityPlayerMP;
|
import net.minecraft.util.ChatMessageComponent;
|
||||||
import net.minecraft.util.EnumChatFormatting;
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
|
||||||
+import net.minecraftforge.common.MinecraftForge;
|
+import net.minecraftforge.common.MinecraftForge;
|
||||||
|
@ -10,7 +10,7 @@
|
||||||
public class CommandHandler implements ICommandManager
|
public class CommandHandler implements ICommandManager
|
||||||
{
|
{
|
||||||
/** Map of Strings to the ICommand objects they represent */
|
/** Map of Strings to the ICommand objects they represent */
|
||||||
@@ -44,6 +47,16 @@
|
@@ -45,6 +48,16 @@
|
||||||
|
|
||||||
if (icommand.canCommandSenderUseCommand(par1ICommandSender))
|
if (icommand.canCommandSenderUseCommand(par1ICommandSender))
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/crash/CrashReport.java
|
--- ../src_base/minecraft/net/minecraft/crash/CrashReport.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/crash/CrashReport.java
|
+++ ../src_work/minecraft/net/minecraft/crash/CrashReport.java
|
||||||
@@ -253,7 +253,8 @@
|
@@ -245,7 +245,8 @@
|
||||||
StackTraceElement stacktraceelement = null;
|
StackTraceElement stacktraceelement = null;
|
||||||
StackTraceElement stacktraceelement1 = null;
|
StackTraceElement stacktraceelement1 = null;
|
||||||
|
|
||||||
|
|
|
@ -5,12 +5,12 @@
|
||||||
import net.minecraft.enchantment.EnumEnchantmentType;
|
import net.minecraft.enchantment.EnumEnchantmentType;
|
||||||
import net.minecraft.item.Item;
|
import net.minecraft.item.Item;
|
||||||
+import net.minecraft.item.ItemStack;
|
+import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.StringTranslate;
|
|
||||||
|
|
||||||
public class CreativeTabs
|
public class CreativeTabs
|
||||||
|
{
|
||||||
@@ -34,8 +35,22 @@
|
@@ -34,8 +35,22 @@
|
||||||
/** Whether to draw the title in the foreground of the creative GUI */
|
|
||||||
private boolean drawTitle = true;
|
private boolean drawTitle = true;
|
||||||
|
private EnumEnchantmentType[] field_111230_s;
|
||||||
|
|
||||||
+ public CreativeTabs(String label)
|
+ public CreativeTabs(String label)
|
||||||
+ {
|
+ {
|
||||||
|
@ -53,15 +53,13 @@
|
||||||
return this.tabIndex < 6;
|
return this.tabIndex < 6;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -149,11 +172,41 @@
|
@@ -187,9 +210,17 @@
|
||||||
{
|
{
|
||||||
Item item = aitem[j];
|
Item item = aitem[j];
|
||||||
|
|
||||||
- if (item != null && item.getCreativeTab() == this)
|
- if (item != null && item.getCreativeTab() == this)
|
||||||
- {
|
- {
|
||||||
- item.getSubItems(item.itemID, this, par1List);
|
- item.getSubItems(item.itemID, this, par1List);
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ if (item == null)
|
+ if (item == null)
|
||||||
+ {
|
+ {
|
||||||
+ continue;
|
+ continue;
|
||||||
|
@ -73,9 +71,13 @@
|
||||||
+ {
|
+ {
|
||||||
+ item.getSubItems(item.itemID, this, par1List);
|
+ item.getSubItems(item.itemID, this, par1List);
|
||||||
+ }
|
+ }
|
||||||
+ }
|
}
|
||||||
+ }
|
}
|
||||||
+ }
|
|
||||||
|
@@ -228,4 +259,26 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+
|
+
|
||||||
+ public int getTabPage()
|
+ public int getTabPage()
|
||||||
+ {
|
+ {
|
||||||
|
@ -97,6 +99,5 @@
|
||||||
+ public ItemStack getIconItemStack()
|
+ public ItemStack getIconItemStack()
|
||||||
+ {
|
+ {
|
||||||
+ return new ItemStack(getTabIconItem());
|
+ return new ItemStack(getTabIconItem());
|
||||||
|
+ }
|
||||||
}
|
}
|
||||||
|
|
||||||
@SideOnly(Side.CLIENT)
|
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
+
|
+
|
||||||
+import com.google.common.collect.ObjectArrays;
|
+import com.google.common.collect.ObjectArrays;
|
||||||
+
|
+
|
||||||
import net.minecraft.entity.EntityLiving;
|
import net.minecraft.entity.EntityLivingBase;
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
@@ -205,6 +208,27 @@
|
@@ -205,6 +208,27 @@
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
import net.minecraft.item.ItemStack;
|
import net.minecraft.item.ItemStack;
|
||||||
import net.minecraft.nbt.NBTTagCompound;
|
import net.minecraft.nbt.NBTTagCompound;
|
||||||
import net.minecraft.nbt.NBTTagDouble;
|
import net.minecraft.nbt.NBTTagDouble;
|
||||||
@@ -25,12 +33,16 @@
|
@@ -26,12 +34,16 @@
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.util.Direction;
|
import net.minecraft.util.Direction;
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
|
|
||||||
public abstract class Entity
|
public abstract class Entity
|
||||||
{
|
{
|
||||||
@@ -225,6 +237,13 @@
|
@@ -218,6 +230,13 @@
|
||||||
private boolean invulnerable;
|
private boolean invulnerable;
|
||||||
private UUID entityUniqueID;
|
private UUID entityUniqueID;
|
||||||
public EnumEntitySize myEntitySize;
|
public EnumEntitySize myEntitySize;
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
|
|
||||||
public Entity(World par1World)
|
public Entity(World par1World)
|
||||||
{
|
{
|
||||||
@@ -274,6 +293,15 @@
|
@@ -245,6 +264,15 @@
|
||||||
this.dataWatcher.addObject(0, Byte.valueOf((byte)0));
|
this.dataWatcher.addObject(0, Byte.valueOf((byte)0));
|
||||||
this.dataWatcher.addObject(1, Short.valueOf((short)300));
|
this.dataWatcher.addObject(1, Short.valueOf((short)300));
|
||||||
this.entityInit();
|
this.entityInit();
|
||||||
|
@ -72,16 +72,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
protected abstract void entityInit();
|
protected abstract void entityInit();
|
||||||
@@ -554,7 +582,7 @@
|
@@ -1515,6 +1543,21 @@
|
||||||
if (!this.worldObj.isRemote)
|
|
||||||
{
|
|
||||||
this.setFlag(0, this.fire > 0);
|
|
||||||
- this.setFlag(2, this.ridingEntity != null);
|
|
||||||
+ this.setFlag(2, this.ridingEntity != null && ridingEntity.shouldRiderSit());
|
|
||||||
}
|
|
||||||
|
|
||||||
this.firstUpdate = false;
|
|
||||||
@@ -1534,6 +1562,21 @@
|
|
||||||
par1NBTTagCompound.setInteger("PortalCooldown", this.timeUntilPortal);
|
par1NBTTagCompound.setInteger("PortalCooldown", this.timeUntilPortal);
|
||||||
par1NBTTagCompound.setLong("UUIDMost", this.entityUniqueID.getMostSignificantBits());
|
par1NBTTagCompound.setLong("UUIDMost", this.entityUniqueID.getMostSignificantBits());
|
||||||
par1NBTTagCompound.setLong("UUIDLeast", this.entityUniqueID.getLeastSignificantBits());
|
par1NBTTagCompound.setLong("UUIDLeast", this.entityUniqueID.getLeastSignificantBits());
|
||||||
|
@ -103,7 +94,7 @@
|
||||||
this.writeEntityToNBT(par1NBTTagCompound);
|
this.writeEntityToNBT(par1NBTTagCompound);
|
||||||
|
|
||||||
if (this.ridingEntity != null)
|
if (this.ridingEntity != null)
|
||||||
@@ -1604,6 +1647,26 @@
|
@@ -1585,6 +1628,26 @@
|
||||||
|
|
||||||
this.setPosition(this.posX, this.posY, this.posZ);
|
this.setPosition(this.posX, this.posY, this.posZ);
|
||||||
this.setRotation(this.rotationYaw, this.rotationPitch);
|
this.setRotation(this.rotationYaw, this.rotationPitch);
|
||||||
|
@ -130,7 +121,7 @@
|
||||||
this.readEntityFromNBT(par1NBTTagCompound);
|
this.readEntityFromNBT(par1NBTTagCompound);
|
||||||
}
|
}
|
||||||
catch (Throwable throwable)
|
catch (Throwable throwable)
|
||||||
@@ -1698,7 +1761,14 @@
|
@@ -1687,7 +1750,14 @@
|
||||||
{
|
{
|
||||||
EntityItem entityitem = new EntityItem(this.worldObj, this.posX, this.posY + (double)par2, this.posZ, par1ItemStack);
|
EntityItem entityitem = new EntityItem(this.worldObj, this.posX, this.posY + (double)par2, this.posZ, par1ItemStack);
|
||||||
entityitem.delayBeforeCanPickup = 10;
|
entityitem.delayBeforeCanPickup = 10;
|
||||||
|
@ -145,17 +136,17 @@
|
||||||
+ }
|
+ }
|
||||||
return entityitem;
|
return entityitem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
@@ -2056,7 +2126,7 @@
|
@@ -1985,7 +2055,7 @@
|
||||||
*/
|
*/
|
||||||
public boolean isRiding()
|
public boolean isRiding()
|
||||||
{
|
{
|
||||||
- return this.ridingEntity != null || this.getFlag(2);
|
- return this.ridingEntity != null;
|
||||||
+ return (this.ridingEntity != null && ridingEntity.shouldRiderSit()) || this.getFlag(2);
|
+ return this.ridingEntity != null && ridingEntity.shouldRiderSit();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2400,7 +2470,7 @@
|
@@ -2344,7 +2414,7 @@
|
||||||
|
|
||||||
public float func_82146_a(Explosion par1Explosion, World par2World, int par3, int par4, int par5, Block par6Block)
|
public float func_82146_a(Explosion par1Explosion, World par2World, int par3, int par4, int par5, Block par6Block)
|
||||||
{
|
{
|
||||||
|
@ -164,7 +155,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean func_96091_a(Explosion par1Explosion, World par2World, int par3, int par4, int par5, int par6, float par7)
|
public boolean func_96091_a(Explosion par1Explosion, World par2World, int par3, int par4, int par5, int par6, float par7)
|
||||||
@@ -2458,4 +2528,145 @@
|
@@ -2407,4 +2477,145 @@
|
||||||
{
|
{
|
||||||
return this.getEntityName();
|
return this.getEntityName();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,223 +1,27 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/entity/EntityLiving.java
|
--- ../src_base/minecraft/net/minecraft/entity/EntityLiving.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/entity/EntityLiving.java
|
+++ ../src_work/minecraft/net/minecraft/entity/EntityLiving.java
|
||||||
@@ -22,6 +22,7 @@
|
@@ -31,6 +31,7 @@
|
||||||
import net.minecraft.entity.item.EntityXPOrb;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.entity.monster.EntityCreeper;
|
|
||||||
import net.minecraft.entity.monster.EntityGhast;
|
|
||||||
+import net.minecraft.entity.passive.EntityPig;
|
|
||||||
import net.minecraft.entity.passive.EntityWolf;
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
|
||||||
import net.minecraft.entity.projectile.EntityArrow;
|
|
||||||
@@ -50,6 +51,11 @@
|
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.WorldServer;
|
import net.minecraft.world.WorldServer;
|
||||||
|
|
||||||
+import net.minecraftforge.common.ForgeHooks;
|
+import net.minecraftforge.common.ForgeHooks;
|
||||||
+import net.minecraftforge.common.MinecraftForge;
|
|
||||||
+import net.minecraftforge.event.entity.living.*;
|
public abstract class EntityLiving extends EntityLivingBase
|
||||||
+import static net.minecraftforge.event.entity.living.LivingEvent.*;
|
|
||||||
+
|
|
||||||
public abstract class EntityLiving extends Entity
|
|
||||||
{
|
{
|
||||||
/**
|
@@ -141,6 +142,7 @@
|
||||||
@@ -400,6 +406,7 @@
|
public void setAttackTarget(EntityLivingBase par1EntityLivingBase)
|
||||||
public void setAttackTarget(EntityLiving par1EntityLiving)
|
|
||||||
{
|
{
|
||||||
this.attackTarget = par1EntityLiving;
|
this.attackTarget = par1EntityLivingBase;
|
||||||
+ ForgeHooks.onLivingSetAttackTarget(this, par1EntityLiving);
|
+ ForgeHooks.onLivingSetAttackTarget(this, par1EntityLivingBase);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -496,6 +503,7 @@
|
@@ -726,8 +728,6 @@
|
||||||
{
|
return this.worldObj.checkNoEntityCollision(this.boundingBox) && this.worldObj.getCollidingBoundingBoxes(this, this.boundingBox).isEmpty() && !this.worldObj.isAnyLiquid(this.boundingBox);
|
||||||
this.entityLivingToAttack = par1EntityLiving;
|
|
||||||
this.revengeTimer = this.entityLivingToAttack != null ? 100 : 0;
|
|
||||||
+ ForgeHooks.onLivingSetAttackTarget(this, par1EntityLiving);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void entityInit()
|
|
||||||
@@ -807,6 +815,11 @@
|
|
||||||
*/
|
|
||||||
public void onUpdate()
|
|
||||||
{
|
|
||||||
+ if (ForgeHooks.onLivingUpdate(this))
|
|
||||||
+ {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
super.onUpdate();
|
|
||||||
|
|
||||||
if (!this.worldObj.isRemote)
|
|
||||||
@@ -992,6 +1005,11 @@
|
|
||||||
*/
|
|
||||||
public boolean attackEntityFrom(DamageSource par1DamageSource, int par2)
|
|
||||||
{
|
|
||||||
+ if (ForgeHooks.onLivingAttack(this, par1DamageSource, par2))
|
|
||||||
+ {
|
|
||||||
+ return false;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (this.isEntityInvulnerable())
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
@@ -1229,6 +1247,11 @@
|
|
||||||
{
|
|
||||||
if (!this.isEntityInvulnerable())
|
|
||||||
{
|
|
||||||
+ par2 = ForgeHooks.onLivingHurt(this, par1DamageSource, par2);
|
|
||||||
+ if (par2 <= 0)
|
|
||||||
+ {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
par2 = this.applyArmorCalculations(par1DamageSource, par2);
|
|
||||||
par2 = this.applyPotionDamageCalculations(par1DamageSource, par2);
|
|
||||||
int j = this.getHealth();
|
|
||||||
@@ -1295,6 +1318,11 @@
|
|
||||||
*/
|
|
||||||
public void onDeath(DamageSource par1DamageSource)
|
|
||||||
{
|
|
||||||
+ if (ForgeHooks.onLivingDeath(this, par1DamageSource))
|
|
||||||
+ {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
Entity entity = par1DamageSource.getEntity();
|
|
||||||
EntityLiving entityliving = this.func_94060_bK();
|
|
||||||
|
|
||||||
@@ -1319,6 +1347,10 @@
|
|
||||||
i = EnchantmentHelper.getLootingModifier((EntityLiving)entity);
|
|
||||||
}
|
|
||||||
|
|
||||||
+ captureDrops = true;
|
|
||||||
+ capturedDrops.clear();
|
|
||||||
+ int j = 0;
|
|
||||||
+
|
|
||||||
if (!this.isChild() && this.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot"))
|
|
||||||
{
|
|
||||||
this.dropFewItems(this.recentlyHit > 0, i);
|
|
||||||
@@ -1326,7 +1358,7 @@
|
|
||||||
|
|
||||||
if (this.recentlyHit > 0)
|
|
||||||
{
|
|
||||||
- int j = this.rand.nextInt(200) - i;
|
|
||||||
+ j = this.rand.nextInt(200) - i;
|
|
||||||
|
|
||||||
if (j < 5)
|
|
||||||
{
|
|
||||||
@@ -1334,6 +1366,16 @@
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ captureDrops = false;
|
|
||||||
+
|
|
||||||
+ if (!ForgeHooks.onLivingDrops(this, par1DamageSource, capturedDrops, i, recentlyHit > 0, j))
|
|
||||||
+ {
|
|
||||||
+ for (EntityItem item : capturedDrops)
|
|
||||||
+ {
|
|
||||||
+ worldObj.spawnEntityInWorld(item);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
||||||
this.worldObj.setEntityState(this, (byte)3);
|
|
||||||
@@ -1378,6 +1420,12 @@
|
|
||||||
*/
|
|
||||||
protected void fall(float par1)
|
|
||||||
{
|
|
||||||
+ par1 = ForgeHooks.onLivingFall(this, par1);
|
|
||||||
+ if (par1 <= 0)
|
|
||||||
+ {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
super.fall(par1);
|
|
||||||
int i = MathHelper.ceiling_float_int(par1 - 3.0F);
|
|
||||||
|
|
||||||
@@ -1580,7 +1628,7 @@
|
|
||||||
int j = MathHelper.floor_double(this.boundingBox.minY);
|
|
||||||
int k = MathHelper.floor_double(this.posZ);
|
|
||||||
int l = this.worldObj.getBlockId(i, j, k);
|
|
||||||
- return l == Block.ladder.blockID || l == Block.vine.blockID;
|
|
||||||
+ return ForgeHooks.isLivingOnLadder(Block.blocksList[l], worldObj, i, j, k, this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
@@ -2002,6 +2050,7 @@
|
|
||||||
}
|
|
||||||
|
|
||||||
this.isAirBorne = true;
|
|
||||||
+ ForgeHooks.onLivingJump(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
@@ -2554,8 +2603,6 @@
|
|
||||||
return this.getCreatureAttribute() == EnumCreatureAttribute.UNDEAD;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- @SideOnly(Side.CLIENT)
|
- @SideOnly(Side.CLIENT)
|
||||||
-
|
-
|
||||||
/**
|
/**
|
||||||
* Remove the speified potion effect from this entity.
|
* Returns render size modifier
|
||||||
*/
|
*/
|
||||||
@@ -2984,6 +3031,17 @@
|
|
||||||
*/
|
|
||||||
public void swingItem()
|
|
||||||
{
|
|
||||||
+ ItemStack stack = this.getHeldItem();
|
|
||||||
+
|
|
||||||
+ if (stack != null && stack.getItem() != null)
|
|
||||||
+ {
|
|
||||||
+ Item item = stack.getItem();
|
|
||||||
+ if (item.onEntitySwing(this, stack))
|
|
||||||
+ {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
if (!this.isSwingInProgress || this.swingProgressInt >= this.getArmSwingAnimationEnd() / 2 || this.swingProgressInt < 0)
|
|
||||||
{
|
|
||||||
this.swingProgressInt = -1;
|
|
||||||
@@ -3084,4 +3142,42 @@
|
|
||||||
{
|
|
||||||
return this.persistenceRequired;
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ /***
|
|
||||||
+ * 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
|
|
||||||
+ */
|
|
||||||
+ public void curePotionEffects(ItemStack curativeItem)
|
|
||||||
+ {
|
|
||||||
+ Iterator<Integer> potionKey = activePotionsMap.keySet().iterator();
|
|
||||||
+
|
|
||||||
+ if (worldObj.isRemote)
|
|
||||||
+ {
|
|
||||||
+ return;
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ while (potionKey.hasNext())
|
|
||||||
+ {
|
|
||||||
+ Integer key = potionKey.next();
|
|
||||||
+ PotionEffect effect = (PotionEffect)activePotionsMap.get(key);
|
|
||||||
+
|
|
||||||
+ if (effect.isCurativeItem(curativeItem))
|
|
||||||
+ {
|
|
||||||
+ potionKey.remove();
|
|
||||||
+ onFinishedPotionEffect(effect);
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ /**
|
|
||||||
+ * Returns true if the entity's rider (EntityPlayer) should face forward when mounted.
|
|
||||||
+ * currently only used in vanilla code by pigs.
|
|
||||||
+ *
|
|
||||||
+ * @param player The player who is riding the entity.
|
|
||||||
+ * @return If the player should orient the same direction as this entity.
|
|
||||||
+ */
|
|
||||||
+ public boolean shouldRiderFaceForward(EntityPlayer player)
|
|
||||||
+ {
|
|
||||||
+ return this instanceof EntityPig;
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
|
|
|
@ -0,0 +1,198 @@
|
||||||
|
--- ../src_base/minecraft/net/minecraft/entity/EntityLivingBase.java
|
||||||
|
+++ ../src_work/minecraft/net/minecraft/entity/EntityLivingBase.java
|
||||||
|
@@ -21,9 +21,11 @@
|
||||||
|
import net.minecraft.entity.item.EntityItem;
|
||||||
|
import net.minecraft.entity.item.EntityXPOrb;
|
||||||
|
import net.minecraft.entity.monster.EntityZombie;
|
||||||
|
+import net.minecraft.entity.passive.EntityPig;
|
||||||
|
import net.minecraft.entity.passive.EntityWolf;
|
||||||
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
|
import net.minecraft.entity.projectile.EntityArrow;
|
||||||
|
+import net.minecraft.item.Item;
|
||||||
|
import net.minecraft.item.ItemArmor;
|
||||||
|
import net.minecraft.item.ItemStack;
|
||||||
|
import net.minecraft.nbt.NBTBase;
|
||||||
|
@@ -46,6 +48,7 @@
|
||||||
|
import net.minecraft.util.Vec3;
|
||||||
|
import net.minecraft.world.World;
|
||||||
|
import net.minecraft.world.WorldServer;
|
||||||
|
+import net.minecraftforge.common.ForgeHooks;
|
||||||
|
|
||||||
|
public abstract class EntityLivingBase extends Entity
|
||||||
|
{
|
||||||
|
@@ -451,6 +454,7 @@
|
||||||
|
{
|
||||||
|
this.entityLivingToAttack = par1EntityLivingBase;
|
||||||
|
this.revengeTimer = this.entityLivingToAttack != null ? 100 : 0;
|
||||||
|
+ ForgeHooks.onLivingSetAttackTarget(this, par1EntityLivingBase);
|
||||||
|
}
|
||||||
|
|
||||||
|
public EntityLivingBase func_110144_aD()
|
||||||
|
@@ -738,8 +742,6 @@
|
||||||
|
return this.getCreatureAttribute() == EnumCreatureAttribute.UNDEAD;
|
||||||
|
}
|
||||||
|
|
||||||
|
- @SideOnly(Side.CLIENT)
|
||||||
|
-
|
||||||
|
/**
|
||||||
|
* Remove the speified potion effect from this entity.
|
||||||
|
*/
|
||||||
|
@@ -824,6 +826,7 @@
|
||||||
|
*/
|
||||||
|
public boolean attackEntityFrom(DamageSource par1DamageSource, float par2)
|
||||||
|
{
|
||||||
|
+ if (ForgeHooks.onLivingAttack(this, par1DamageSource, par2)) return false;
|
||||||
|
if (this.isEntityInvulnerable())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
@@ -974,6 +977,7 @@
|
||||||
|
*/
|
||||||
|
public void onDeath(DamageSource par1DamageSource)
|
||||||
|
{
|
||||||
|
+ if (ForgeHooks.onLivingDeath(this, par1DamageSource)) return;
|
||||||
|
Entity entity = par1DamageSource.getEntity();
|
||||||
|
EntityLivingBase entitylivingbase = this.func_94060_bK();
|
||||||
|
|
||||||
|
@@ -998,6 +1002,10 @@
|
||||||
|
i = EnchantmentHelper.getLootingModifier((EntityLivingBase)entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ captureDrops = true;
|
||||||
|
+ capturedDrops.clear();
|
||||||
|
+ int j = 0;
|
||||||
|
+
|
||||||
|
if (!this.isChild() && this.worldObj.getGameRules().getGameRuleBooleanValue("doMobLoot"))
|
||||||
|
{
|
||||||
|
this.dropFewItems(this.recentlyHit > 0, i);
|
||||||
|
@@ -1005,12 +1013,22 @@
|
||||||
|
|
||||||
|
if (this.recentlyHit > 0)
|
||||||
|
{
|
||||||
|
- int j = this.rand.nextInt(200) - i;
|
||||||
|
+ j = this.rand.nextInt(200) - i;
|
||||||
|
|
||||||
|
if (j < 5)
|
||||||
|
{
|
||||||
|
this.dropRareDrop(j <= 0 ? 1 : 0);
|
||||||
|
}
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ captureDrops = false;
|
||||||
|
+
|
||||||
|
+ if (!ForgeHooks.onLivingDrops(this, par1DamageSource, capturedDrops, i, recentlyHit > 0, j))
|
||||||
|
+ {
|
||||||
|
+ for (EntityItem item : capturedDrops)
|
||||||
|
+ {
|
||||||
|
+ worldObj.spawnEntityInWorld(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -1080,7 +1098,7 @@
|
||||||
|
int j = MathHelper.floor_double(this.boundingBox.minY);
|
||||||
|
int k = MathHelper.floor_double(this.posZ);
|
||||||
|
int l = this.worldObj.getBlockId(i, j, k);
|
||||||
|
- return l == Block.ladder.blockID || l == Block.vine.blockID;
|
||||||
|
+ return ForgeHooks.isLivingOnLadder(Block.blocksList[l], worldObj, i, j, k, this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -1096,6 +1114,8 @@
|
||||||
|
*/
|
||||||
|
protected void fall(float par1)
|
||||||
|
{
|
||||||
|
+ par1 = ForgeHooks.onLivingFall(this, par1);
|
||||||
|
+ if (par1 <= 0) return;
|
||||||
|
super.fall(par1);
|
||||||
|
PotionEffect potioneffect = this.getActivePotionEffect(Potion.jump);
|
||||||
|
float f1 = potioneffect != null ? (float)(potioneffect.getAmplifier() + 1) : 0.0F;
|
||||||
|
@@ -1229,6 +1249,8 @@
|
||||||
|
{
|
||||||
|
if (!this.isEntityInvulnerable())
|
||||||
|
{
|
||||||
|
+ par2 = ForgeHooks.onLivingHurt(this, par1DamageSource, par2);
|
||||||
|
+ if (par2 <= 0) return;
|
||||||
|
par2 = this.applyArmorCalculations(par1DamageSource, par2);
|
||||||
|
par2 = this.applyPotionDamageCalculations(par1DamageSource, par2);
|
||||||
|
float f1 = par2;
|
||||||
|
@@ -1290,6 +1312,17 @@
|
||||||
|
*/
|
||||||
|
public void swingItem()
|
||||||
|
{
|
||||||
|
+ ItemStack stack = this.getHeldItem();
|
||||||
|
+
|
||||||
|
+ if (stack != null && stack.getItem() != null)
|
||||||
|
+ {
|
||||||
|
+ Item item = stack.getItem();
|
||||||
|
+ if (item.onEntitySwing(this, stack))
|
||||||
|
+ {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
if (!this.isSwingInProgress || this.field_110158_av >= this.getArmSwingAnimationEnd() / 2 || this.field_110158_av < 0)
|
||||||
|
{
|
||||||
|
this.field_110158_av = -1;
|
||||||
|
@@ -1531,6 +1564,7 @@
|
||||||
|
}
|
||||||
|
|
||||||
|
this.isAirBorne = true;
|
||||||
|
+ ForgeHooks.onLivingJump(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
@@ -1735,6 +1769,11 @@
|
||||||
|
*/
|
||||||
|
public void onUpdate()
|
||||||
|
{
|
||||||
|
+ if (ForgeHooks.onLivingUpdate(this))
|
||||||
|
+ {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
super.onUpdate();
|
||||||
|
|
||||||
|
if (!this.worldObj.isRemote)
|
||||||
|
@@ -2255,4 +2294,42 @@
|
||||||
|
|
||||||
|
this.field_110151_bq = par1;
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ /***
|
||||||
|
+ * 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
|
||||||
|
+ */
|
||||||
|
+ public void curePotionEffects(ItemStack curativeItem)
|
||||||
|
+ {
|
||||||
|
+ Iterator<Integer> potionKey = activePotionsMap.keySet().iterator();
|
||||||
|
+
|
||||||
|
+ if (worldObj.isRemote)
|
||||||
|
+ {
|
||||||
|
+ return;
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ while (potionKey.hasNext())
|
||||||
|
+ {
|
||||||
|
+ Integer key = potionKey.next();
|
||||||
|
+ PotionEffect effect = (PotionEffect)activePotionsMap.get(key);
|
||||||
|
+
|
||||||
|
+ if (effect.isCurativeItem(curativeItem))
|
||||||
|
+ {
|
||||||
|
+ potionKey.remove();
|
||||||
|
+ onFinishedPotionEffect(effect);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ /**
|
||||||
|
+ * Returns true if the entity's rider (EntityPlayer) should face forward when mounted.
|
||||||
|
+ * currently only used in vanilla code by pigs.
|
||||||
|
+ *
|
||||||
|
+ * @param player The player who is riding the entity.
|
||||||
|
+ * @return If the player should orient the same direction as this entity.
|
||||||
|
+ */
|
||||||
|
+ public boolean shouldRiderFaceForward(EntityPlayer player)
|
||||||
|
+ {
|
||||||
|
+ return this instanceof EntityPig;
|
||||||
|
+ }
|
||||||
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/entity/boss/EntityDragon.java
|
--- ../src_base/minecraft/net/minecraft/entity/boss/EntityDragon.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/entity/boss/EntityDragon.java
|
+++ ../src_work/minecraft/net/minecraft/entity/boss/EntityDragon.java
|
||||||
@@ -531,10 +531,11 @@
|
@@ -527,10 +527,11 @@
|
||||||
for (int i2 = k; i2 <= j1; ++i2)
|
for (int i2 = k; i2 <= j1; ++i2)
|
||||||
{
|
{
|
||||||
int j2 = this.worldObj.getBlockId(k1, l1, i2);
|
int j2 = this.worldObj.getBlockId(k1, l1, i2);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/entity/item/EntityEnderPearl.java
|
--- ../src_base/minecraft/net/minecraft/entity/item/EntityEnderPearl.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/entity/item/EntityEnderPearl.java
|
+++ ../src_work/minecraft/net/minecraft/entity/item/EntityEnderPearl.java
|
||||||
@@ -8,6 +8,8 @@
|
@@ -9,6 +9,8 @@
|
||||||
import net.minecraft.util.DamageSource;
|
import net.minecraft.util.DamageSource;
|
||||||
import net.minecraft.util.MovingObjectPosition;
|
import net.minecraft.util.MovingObjectPosition;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -9,20 +9,28 @@
|
||||||
|
|
||||||
public class EntityEnderPearl extends EntityThrowable
|
public class EntityEnderPearl extends EntityThrowable
|
||||||
{
|
{
|
||||||
@@ -50,9 +52,13 @@
|
@@ -51,14 +53,18 @@
|
||||||
|
|
||||||
if (!entityplayermp.playerNetServerHandler.connectionClosed && entityplayermp.worldObj == this.worldObj)
|
if (!entityplayermp.playerNetServerHandler.connectionClosed && entityplayermp.worldObj == this.worldObj)
|
||||||
{
|
{
|
||||||
- this.getThrower().setPositionAndUpdate(this.posX, this.posY, this.posZ);
|
- if (this.getThrower().isRiding())
|
||||||
- this.getThrower().fallDistance = 0.0F;
|
+ EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, this.posX, this.posY, this.posZ, 5.0F);
|
||||||
- this.getThrower().attackEntityFrom(DamageSource.fall, 5);
|
+ if (!MinecraftForge.EVENT_BUS.post(event))
|
||||||
+ EnderTeleportEvent event = new EnderTeleportEvent(entityplayermp, this.posX, this.posY, this.posZ, 5);
|
{
|
||||||
+ if (!MinecraftForge.EVENT_BUS.post(event)){
|
- this.getThrower().mountEntity((Entity)null);
|
||||||
|
+ if (this.getThrower().isRiding())
|
||||||
|
+ {
|
||||||
|
+ this.getThrower().mountEntity((Entity)null);
|
||||||
|
+ }
|
||||||
|
+
|
||||||
+ this.getThrower().setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
|
+ this.getThrower().setPositionAndUpdate(event.targetX, event.targetY, event.targetZ);
|
||||||
+ this.getThrower().fallDistance = 0.0F;
|
+ this.getThrower().fallDistance = 0.0F;
|
||||||
+ this.getThrower().attackEntityFrom(DamageSource.fall, event.attackDamage);
|
+ this.getThrower().attackEntityFrom(DamageSource.fall, event.attackDamage);
|
||||||
+ }
|
}
|
||||||
+
|
-
|
||||||
|
- this.getThrower().setPositionAndUpdate(this.posX, this.posY, this.posZ);
|
||||||
|
- this.getThrower().fallDistance = 0.0F;
|
||||||
|
- this.getThrower().attackEntityFrom(DamageSource.fall, 5.0F);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
public EntityItem(World par1World, double par2, double par4, double par6)
|
public EntityItem(World par1World, double par2, double par4, double par6)
|
||||||
{
|
{
|
||||||
super(par1World);
|
super(par1World);
|
||||||
@@ -49,6 +59,7 @@
|
@@ -48,6 +58,7 @@
|
||||||
{
|
{
|
||||||
this(par1World, par2, par4, par6);
|
this(par1World, par2, par4, par6);
|
||||||
this.setEntityItemStack(par8ItemStack);
|
this.setEntityItemStack(par8ItemStack);
|
||||||
|
@ -32,7 +32,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -80,6 +91,15 @@
|
@@ -78,6 +89,15 @@
|
||||||
*/
|
*/
|
||||||
public void onUpdate()
|
public void onUpdate()
|
||||||
{
|
{
|
||||||
|
@ -48,7 +48,7 @@
|
||||||
super.onUpdate();
|
super.onUpdate();
|
||||||
|
|
||||||
if (this.delayBeforeCanPickup > 0)
|
if (this.delayBeforeCanPickup > 0)
|
||||||
@@ -135,7 +155,29 @@
|
@@ -133,7 +153,29 @@
|
||||||
|
|
||||||
++this.age;
|
++this.age;
|
||||||
|
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
{
|
{
|
||||||
this.setDead();
|
this.setDead();
|
||||||
}
|
}
|
||||||
@@ -270,6 +312,7 @@
|
@@ -268,6 +310,7 @@
|
||||||
{
|
{
|
||||||
par1NBTTagCompound.setShort("Health", (short)((byte)this.health));
|
par1NBTTagCompound.setShort("Health", (short)((byte)this.health));
|
||||||
par1NBTTagCompound.setShort("Age", (short)this.age);
|
par1NBTTagCompound.setShort("Age", (short)this.age);
|
||||||
|
@ -87,7 +87,7 @@
|
||||||
|
|
||||||
if (this.getEntityItem() != null)
|
if (this.getEntityItem() != null)
|
||||||
{
|
{
|
||||||
@@ -287,10 +330,17 @@
|
@@ -285,10 +328,17 @@
|
||||||
NBTTagCompound nbttagcompound1 = par1NBTTagCompound.getCompoundTag("Item");
|
NBTTagCompound nbttagcompound1 = par1NBTTagCompound.getCompoundTag("Item");
|
||||||
this.setEntityItemStack(ItemStack.loadItemStackFromNBT(nbttagcompound1));
|
this.setEntityItemStack(ItemStack.loadItemStackFromNBT(nbttagcompound1));
|
||||||
|
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -300,10 +350,22 @@
|
@@ -298,10 +348,22 @@
|
||||||
{
|
{
|
||||||
if (!this.worldObj.isRemote)
|
if (!this.worldObj.isRemote)
|
||||||
{
|
{
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
public EntityMinecart(World par1World)
|
public EntityMinecart(World par1World)
|
||||||
{
|
{
|
||||||
super(par1World);
|
super(par1World);
|
||||||
@@ -105,6 +123,10 @@
|
@@ -104,6 +122,10 @@
|
||||||
*/
|
*/
|
||||||
public AxisAlignedBB getCollisionBox(Entity par1Entity)
|
public AxisAlignedBB getCollisionBox(Entity par1Entity)
|
||||||
{
|
{
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
return par1Entity.canBePushed() ? par1Entity.boundingBox : null;
|
return par1Entity.canBePushed() ? par1Entity.boundingBox : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,6 +135,10 @@
|
@@ -112,6 +134,10 @@
|
||||||
*/
|
*/
|
||||||
public AxisAlignedBB getBoundingBox()
|
public AxisAlignedBB getBoundingBox()
|
||||||
{
|
{
|
||||||
|
@ -54,7 +54,7 @@
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -121,7 +147,7 @@
|
@@ -120,7 +146,7 @@
|
||||||
*/
|
*/
|
||||||
public boolean canBePushed()
|
public boolean canBePushed()
|
||||||
{
|
{
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityMinecart(World par1World, double par2, double par4, double par6)
|
public EntityMinecart(World par1World, double par2, double par4, double par6)
|
||||||
@@ -353,19 +379,21 @@
|
@@ -352,19 +378,21 @@
|
||||||
double d5 = 0.0078125D;
|
double d5 = 0.0078125D;
|
||||||
int l = this.worldObj.getBlockId(j, i, k);
|
int l = this.worldObj.getBlockId(j, i, k);
|
||||||
|
|
||||||
|
@ -92,7 +92,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.doBlockCollisions();
|
this.doBlockCollisions();
|
||||||
@@ -392,7 +420,18 @@
|
@@ -391,7 +419,18 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
this.setRotation(this.rotationYaw, this.rotationPitch);
|
this.setRotation(this.rotationYaw, this.rotationPitch);
|
||||||
|
@ -112,7 +112,7 @@
|
||||||
|
|
||||||
if (list != null && !list.isEmpty())
|
if (list != null && !list.isEmpty())
|
||||||
{
|
{
|
||||||
@@ -416,6 +455,8 @@
|
@@ -415,6 +454,8 @@
|
||||||
|
|
||||||
this.riddenByEntity = null;
|
this.riddenByEntity = null;
|
||||||
}
|
}
|
||||||
|
@ -121,7 +121,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -444,6 +485,17 @@
|
@@ -443,6 +484,17 @@
|
||||||
if (this.motionZ > par1)
|
if (this.motionZ > par1)
|
||||||
{
|
{
|
||||||
this.motionZ = par1;
|
this.motionZ = par1;
|
||||||
|
@ -139,7 +139,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.onGround)
|
if (this.onGround)
|
||||||
@@ -453,13 +505,13 @@
|
@@ -452,13 +504,13 @@
|
||||||
this.motionZ *= 0.5D;
|
this.motionZ *= 0.5D;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -157,7 +157,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -473,7 +525,7 @@
|
@@ -472,7 +524,7 @@
|
||||||
|
|
||||||
if (par8 == Block.railPowered.blockID)
|
if (par8 == Block.railPowered.blockID)
|
||||||
{
|
{
|
||||||
|
@ -166,7 +166,7 @@
|
||||||
flag1 = !flag;
|
flag1 = !flag;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -544,7 +596,7 @@
|
@@ -551,7 +603,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
{
|
{
|
||||||
d7 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
d7 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||||
|
|
||||||
@@ -592,36 +644,8 @@
|
@@ -599,36 +651,8 @@
|
||||||
this.posX = d8 + d2 * d7;
|
this.posX = d8 + d2 * d7;
|
||||||
this.posZ = d9 + d3 * d7;
|
this.posZ = d9 + d3 * d7;
|
||||||
this.setPosition(this.posX, this.posY + (double)this.yOffset, this.posZ);
|
this.setPosition(this.posX, this.posY + (double)this.yOffset, this.posZ);
|
||||||
|
@ -214,7 +214,7 @@
|
||||||
|
|
||||||
if (aint[0][1] != 0 && MathHelper.floor_double(this.posX) - par1 == aint[0][0] && MathHelper.floor_double(this.posZ) - par3 == aint[0][2])
|
if (aint[0][1] != 0 && MathHelper.floor_double(this.posX) - par1 == aint[0][0] && MathHelper.floor_double(this.posZ) - par3 == aint[0][2])
|
||||||
{
|
{
|
||||||
@@ -659,7 +683,12 @@
|
@@ -666,7 +690,12 @@
|
||||||
this.motionZ = d6 * (double)(k1 - par3);
|
this.motionZ = d6 * (double)(k1 - par3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -228,7 +228,7 @@
|
||||||
{
|
{
|
||||||
double d15 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
double d15 = Math.sqrt(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||||
|
|
||||||
@@ -730,12 +759,7 @@
|
@@ -737,12 +766,7 @@
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -242,7 +242,7 @@
|
||||||
|
|
||||||
par3 = (double)j;
|
par3 = (double)j;
|
||||||
|
|
||||||
@@ -781,13 +805,8 @@
|
@@ -788,13 +812,8 @@
|
||||||
|
|
||||||
if (BlockRailBase.isRailBlock(l))
|
if (BlockRailBase.isRailBlock(l))
|
||||||
{
|
{
|
||||||
|
@ -257,7 +257,7 @@
|
||||||
|
|
||||||
if (i1 >= 2 && i1 <= 5)
|
if (i1 >= 2 && i1 <= 5)
|
||||||
{
|
{
|
||||||
@@ -893,11 +912,17 @@
|
@@ -900,11 +919,17 @@
|
||||||
*/
|
*/
|
||||||
public void applyEntityCollision(Entity par1Entity)
|
public void applyEntityCollision(Entity par1Entity)
|
||||||
{
|
{
|
||||||
|
@ -271,12 +271,12 @@
|
||||||
{
|
{
|
||||||
if (par1Entity != this.riddenByEntity)
|
if (par1Entity != this.riddenByEntity)
|
||||||
{
|
{
|
||||||
- if (par1Entity instanceof EntityLiving && !(par1Entity instanceof EntityPlayer) && !(par1Entity instanceof EntityIronGolem) && this.getMinecartType() == 0 && this.motionX * this.motionX + this.motionZ * this.motionZ > 0.01D && this.riddenByEntity == null && par1Entity.ridingEntity == null)
|
- if (par1Entity instanceof EntityLivingBase && !(par1Entity instanceof EntityPlayer) && !(par1Entity instanceof EntityIronGolem) && this.getMinecartType() == 0 && this.motionX * this.motionX + this.motionZ * this.motionZ > 0.01D && this.riddenByEntity == null && par1Entity.ridingEntity == null)
|
||||||
+ if (par1Entity instanceof EntityLiving && !(par1Entity instanceof EntityPlayer) && !(par1Entity instanceof EntityIronGolem) && canBeRidden() && this.motionX * this.motionX + this.motionZ * this.motionZ > 0.01D && this.riddenByEntity == null && par1Entity.ridingEntity == null)
|
+ if (par1Entity instanceof EntityLivingBase && !(par1Entity instanceof EntityPlayer) && !(par1Entity instanceof EntityIronGolem) && canBeRidden() && this.motionX * this.motionX + this.motionZ * this.motionZ > 0.01D && this.riddenByEntity == null && par1Entity.ridingEntity == null)
|
||||||
{
|
{
|
||||||
par1Entity.mountEntity(this);
|
par1Entity.mountEntity(this);
|
||||||
}
|
}
|
||||||
@@ -943,7 +968,7 @@
|
@@ -950,7 +975,7 @@
|
||||||
double d7 = par1Entity.motionX + this.motionX;
|
double d7 = par1Entity.motionX + this.motionX;
|
||||||
double d8 = par1Entity.motionZ + this.motionZ;
|
double d8 = par1Entity.motionZ + this.motionZ;
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@
|
||||||
{
|
{
|
||||||
this.motionX *= 0.20000000298023224D;
|
this.motionX *= 0.20000000298023224D;
|
||||||
this.motionZ *= 0.20000000298023224D;
|
this.motionZ *= 0.20000000298023224D;
|
||||||
@@ -951,7 +976,7 @@
|
@@ -958,7 +983,7 @@
|
||||||
par1Entity.motionX *= 0.949999988079071D;
|
par1Entity.motionX *= 0.949999988079071D;
|
||||||
par1Entity.motionZ *= 0.949999988079071D;
|
par1Entity.motionZ *= 0.949999988079071D;
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,7 @@
|
||||||
{
|
{
|
||||||
par1Entity.motionX *= 0.20000000298023224D;
|
par1Entity.motionX *= 0.20000000298023224D;
|
||||||
par1Entity.motionZ *= 0.20000000298023224D;
|
par1Entity.motionZ *= 0.20000000298023224D;
|
||||||
@@ -1158,4 +1183,211 @@
|
@@ -1165,4 +1190,211 @@
|
||||||
{
|
{
|
||||||
return this.entityName;
|
return this.entityName;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
|
|
||||||
public abstract class EntityMinecartContainer extends EntityMinecart implements IInventory
|
public abstract class EntityMinecartContainer extends EntityMinecart implements IInventory
|
||||||
{
|
{
|
||||||
@@ -283,6 +285,10 @@
|
@@ -280,6 +282,10 @@
|
||||||
*/
|
|
||||||
public boolean interact(EntityPlayer par1EntityPlayer)
|
public boolean func_130002_c(EntityPlayer par1EntityPlayer)
|
||||||
{
|
{
|
||||||
+ if(MinecraftForge.EVENT_BUS.post(new MinecartInteractEvent(this, par1EntityPlayer)))
|
+ if(MinecraftForge.EVENT_BUS.post(new MinecartInteractEvent(this, par1EntityPlayer)))
|
||||||
+ {
|
+ {
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
|
|
||||||
public class EntityMinecartEmpty extends EntityMinecart
|
public class EntityMinecartEmpty extends EntityMinecart
|
||||||
{
|
{
|
||||||
@@ -20,6 +22,10 @@
|
@@ -17,6 +19,10 @@
|
||||||
*/
|
|
||||||
public boolean interact(EntityPlayer par1EntityPlayer)
|
public boolean func_130002_c(EntityPlayer par1EntityPlayer)
|
||||||
{
|
{
|
||||||
+ if(MinecraftForge.EVENT_BUS.post(new MinecartInteractEvent(this, par1EntityPlayer)))
|
+ if(MinecraftForge.EVENT_BUS.post(new MinecartInteractEvent(this, par1EntityPlayer)))
|
||||||
+ {
|
+ {
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
|
|
||||||
public class EntityMinecartFurnace extends EntityMinecart
|
public class EntityMinecartFurnace extends EntityMinecart
|
||||||
{
|
{
|
||||||
@@ -126,6 +128,10 @@
|
@@ -123,6 +125,10 @@
|
||||||
*/
|
|
||||||
public boolean interact(EntityPlayer par1EntityPlayer)
|
public boolean func_130002_c(EntityPlayer par1EntityPlayer)
|
||||||
{
|
{
|
||||||
+ if(MinecraftForge.EVENT_BUS.post(new MinecartInteractEvent(this, par1EntityPlayer)))
|
+ if(MinecraftForge.EVENT_BUS.post(new MinecartInteractEvent(this, par1EntityPlayer)))
|
||||||
+ {
|
+ {
|
||||||
|
|
|
@ -9,9 +9,9 @@
|
||||||
|
|
||||||
public class EntityMinecartHopper extends EntityMinecartContainer implements Hopper
|
public class EntityMinecartHopper extends EntityMinecartContainer implements Hopper
|
||||||
{
|
{
|
||||||
@@ -54,6 +56,10 @@
|
@@ -51,6 +53,10 @@
|
||||||
*/
|
|
||||||
public boolean interact(EntityPlayer par1EntityPlayer)
|
public boolean func_130002_c(EntityPlayer par1EntityPlayer)
|
||||||
{
|
{
|
||||||
+ if(MinecraftForge.EVENT_BUS.post(new MinecartInteractEvent(this, par1EntityPlayer)))
|
+ if(MinecraftForge.EVENT_BUS.post(new MinecartInteractEvent(this, par1EntityPlayer)))
|
||||||
+ {
|
+ {
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/entity/monster/EntityEnderman.java
|
--- ../src_base/minecraft/net/minecraft/entity/monster/EntityEnderman.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/entity/monster/EntityEnderman.java
|
+++ ../src_work/minecraft/net/minecraft/entity/monster/EntityEnderman.java
|
||||||
@@ -12,6 +12,8 @@
|
@@ -16,6 +16,8 @@
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.util.Vec3;
|
import net.minecraft.util.Vec3;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
|
|
||||||
public class EntityEnderman extends EntityMob
|
public class EntityEnderman extends EntityMob
|
||||||
{
|
{
|
||||||
@@ -275,12 +277,17 @@
|
@@ -291,12 +293,17 @@
|
||||||
*/
|
*/
|
||||||
protected boolean teleportTo(double par1, double par3, double par5)
|
protected boolean teleportTo(double par1, double par3, double par5)
|
||||||
{
|
{
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
boolean flag = false;
|
boolean flag = false;
|
||||||
int i = MathHelper.floor_double(this.posX);
|
int i = MathHelper.floor_double(this.posX);
|
||||||
int j = MathHelper.floor_double(this.posY);
|
int j = MathHelper.floor_double(this.posY);
|
||||||
@@ -457,7 +464,7 @@
|
@@ -473,7 +480,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
{
|
{
|
||||||
public EntityMooshroom(World par1World)
|
public EntityMooshroom(World par1World)
|
||||||
{
|
{
|
||||||
@@ -39,31 +43,7 @@
|
@@ -38,31 +42,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
- {
|
- {
|
||||||
- EntityCow entitycow = new EntityCow(this.worldObj);
|
- EntityCow entitycow = new EntityCow(this.worldObj);
|
||||||
- entitycow.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
|
- entitycow.setLocationAndAngles(this.posX, this.posY, this.posZ, this.rotationYaw, this.rotationPitch);
|
||||||
- entitycow.setEntityHealth(this.getHealth());
|
- entitycow.setEntityHealth(this.func_110143_aJ());
|
||||||
- entitycow.renderYawOffset = this.renderYawOffset;
|
- entitycow.renderYawOffset = this.renderYawOffset;
|
||||||
- this.worldObj.spawnEntityInWorld(entitycow);
|
- this.worldObj.spawnEntityInWorld(entitycow);
|
||||||
-
|
-
|
||||||
|
@ -46,7 +46,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public EntityMooshroom func_94900_c(EntityAgeable par1EntityAgeable)
|
public EntityMooshroom func_94900_c(EntityAgeable par1EntityAgeable)
|
||||||
@@ -83,4 +63,29 @@
|
@@ -82,4 +62,29 @@
|
||||||
{
|
{
|
||||||
return this.func_94900_c(par1EntityAgeable);
|
return this.func_94900_c(par1EntityAgeable);
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@
|
||||||
+ setDead();
|
+ setDead();
|
||||||
+ EntityCow entitycow = new EntityCow(worldObj);
|
+ EntityCow entitycow = new EntityCow(worldObj);
|
||||||
+ entitycow.setLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch);
|
+ entitycow.setLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch);
|
||||||
+ entitycow.setEntityHealth(getHealth());
|
+ entitycow.setEntityHealth(func_110143_aJ());
|
||||||
+ entitycow.renderYawOffset = renderYawOffset;
|
+ entitycow.renderYawOffset = renderYawOffset;
|
||||||
+ worldObj.spawnEntityInWorld(entitycow);
|
+ worldObj.spawnEntityInWorld(entitycow);
|
||||||
+ worldObj.spawnParticle("largeexplode", posX, posY + (double)(height / 2.0F), posZ, 0.0D, 0.0D, 0.0D);
|
+ worldObj.spawnParticle("largeexplode", posX, posY + (double)(height / 2.0F), posZ, 0.0D, 0.0D, 0.0D);
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
--- ../src_base/minecraft/net/minecraft/entity/passive/EntityOcelot.java
|
--- ../src_base/minecraft/net/minecraft/entity/passive/EntityOcelot.java
|
||||||
+++ ../src_work/minecraft/net/minecraft/entity/passive/EntityOcelot.java
|
+++ ../src_work/minecraft/net/minecraft/entity/passive/EntityOcelot.java
|
||||||
@@ -355,8 +355,9 @@
|
@@ -334,8 +334,9 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
int l = this.worldObj.getBlockId(i, j - 1, k);
|
int l = this.worldObj.getBlockId(i, j - 1, k);
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
import java.util.Random;
|
import java.util.Random;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.entity.EntityAgeable;
|
import net.minecraft.entity.EntityAgeable;
|
||||||
@@ -24,7 +26,9 @@
|
@@ -26,7 +28,9 @@
|
||||||
import net.minecraft.util.MathHelper;
|
import net.minecraft.util.MathHelper;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
||||||
{
|
{
|
||||||
private final InventoryCrafting field_90016_e = new InventoryCrafting(new ContainerSheep(this), 2, 1);
|
private final InventoryCrafting field_90016_e = new InventoryCrafting(new ContainerSheep(this), 2, 1);
|
||||||
|
|
||||||
@@ -159,28 +163,6 @@
|
@@ -141,28 +145,6 @@
|
||||||
*/
|
*/
|
||||||
public boolean interact(EntityPlayer par1EntityPlayer)
|
public boolean interact(EntityPlayer par1EntityPlayer)
|
||||||
{
|
{
|
||||||
|
@ -49,7 +49,7 @@
|
||||||
return super.interact(par1EntityPlayer);
|
return super.interact(par1EntityPlayer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,4 +331,24 @@
|
@@ -343,4 +325,24 @@
|
||||||
{
|
{
|
||||||
return this.func_90015_b(par1EntityAgeable);
|
return this.func_90015_b(par1EntityAgeable);
|
||||||
}
|
}
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue