mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Updated FML:
MinecraftForge/FML@03fb1879d7 Fix obf error when right clicking a Empty Map. MinecraftForge/FML@6bb9b8b953 Clean up FMLEventChannel. Closes #367. MinecraftForge/FML@b7b3450dcd Update MCP mapping snapshot to latest crowdsourced names. MinecraftForge/FML@8c9e8b5270 Fix isRemote, this is integral to so many parts of the code, everyone knows it by this name, People should not change it.
This commit is contained in:
1 parent
9d919f8ac9
commit
e68577ffd3
188 files changed
+1869
-1870
No files matched your search
@@ -74,20 +74,20 @@ public class ClientCommandHandler extends CommandHandler
|
||||
}
|
||||
else
|
||||
{
|
||||
sender.func_145747_a(format(RED, "commands.generic.permission"));
|
||||
sender.addChatMessage(format(RED, "commands.generic.permission"));
|
||||
}
|
||||
}
|
||||
catch (WrongUsageException wue)
|
||||
{
|
||||
sender.func_145747_a(format(RED, "commands.generic.usage", format(RED, wue.getMessage(), wue.getErrorOjbects())));
|
||||
sender.addChatMessage(format(RED, "commands.generic.usage", format(RED, wue.getMessage(), wue.getErrorOjbects())));
|
||||
}
|
||||
catch (CommandException ce)
|
||||
{
|
||||
sender.func_145747_a(format(RED, ce.getMessage(), ce.getErrorOjbects()));
|
||||
sender.addChatMessage(format(RED, ce.getMessage(), ce.getErrorOjbects()));
|
||||
}
|
||||
catch (Throwable t)
|
||||
{
|
||||
sender.func_145747_a(format(RED, "commands.generic.exception"));
|
||||
sender.addChatMessage(format(RED, "commands.generic.exception"));
|
||||
t.printStackTrace();
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ public class ClientCommandHandler extends CommandHandler
|
||||
private ChatComponentTranslation format(EnumChatFormatting color, String str, Object... args)
|
||||
{
|
||||
ChatComponentTranslation ret = new ChatComponentTranslation(str, args);
|
||||
ret.func_150256_b().func_150238_a(color);
|
||||
ret.getChatStyle().setColor(color);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -90,12 +90,12 @@ public class ForgeHooksClient
|
||||
boolean is3D = customRenderer.shouldUseRenderHelper(ENTITY, item, BLOCK_3D);
|
||||
|
||||
engine.bindTexture(item.getItemSpriteNumber() == 0 ? TextureMap.locationBlocksTexture : TextureMap.locationItemsTexture);
|
||||
Block block = item.getItem() instanceof ItemBlock ? Block.func_149634_a(item.getItem()) : null;
|
||||
if (is3D || (block != null && RenderBlocks.func_147739_a(block.func_149645_b())))
|
||||
Block block = item.getItem() instanceof ItemBlock ? Block.getBlockFromItem(item.getItem()) : null;
|
||||
if (is3D || (block != null && RenderBlocks.renderItemIn3d(block.getRenderType())))
|
||||
{
|
||||
int renderType = (block != null ? block.func_149645_b() : 1);
|
||||
int renderType = (block != null ? block.getRenderType() : 1);
|
||||
float scale = (renderType == 1 || renderType == 19 || renderType == 12 || renderType == 2 ? 0.5F : 0.25F);
|
||||
boolean blend = block != null && block.func_149701_w() > 0;
|
||||
boolean blend = block != null && block.getRenderBlockPass() > 0;
|
||||
|
||||
if (RenderItem.renderInFrame)
|
||||
{
|
||||
@@ -108,7 +108,7 @@ public class ForgeHooksClient
|
||||
{
|
||||
GL11.glAlphaFunc(GL11.GL_GREATER, 0.1F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.func_148821_a(770, 771, 1, 0);
|
||||
OpenGlHelper.glBlendFunc(770, 771, 1, 0);
|
||||
}
|
||||
|
||||
GL11.glScalef(scale, scale, scale);
|
||||
@@ -169,9 +169,9 @@ public class ForgeHooksClient
|
||||
}
|
||||
|
||||
GL11.glRotatef(-90F, 0.0F, 1.0F, 0.0F);
|
||||
renderBlocks.field_147844_c = inColor;
|
||||
renderBlocks.useInventoryTint = inColor;
|
||||
customRenderer.renderItem(INVENTORY, item, renderBlocks);
|
||||
renderBlocks.field_147844_c = true;
|
||||
renderBlocks.useInventoryTint = true;
|
||||
GL11.glPopMatrix();
|
||||
}
|
||||
else
|
||||
@@ -233,7 +233,7 @@ public class ForgeHooksClient
|
||||
int x = MathHelper.floor_double(entity.posX);
|
||||
int y = MathHelper.floor_double(entity.posY);
|
||||
int z = MathHelper.floor_double(entity.posZ);
|
||||
Block block = mc.theWorld.func_147439_a(x, y, z);
|
||||
Block block = mc.theWorld.getBlock(x, y, z);
|
||||
|
||||
if (block != null && block.isBed(mc.theWorld, x, y, z, entity))
|
||||
{
|
||||
@@ -260,8 +260,8 @@ public class ForgeHooksClient
|
||||
{
|
||||
MinecraftForge.EVENT_BUS.post(new TextureStitchEvent.Post(map));
|
||||
|
||||
FluidRegistry.WATER.setIcons(BlockLiquid.func_149803_e("water_still"), BlockLiquid.func_149803_e("water_flow"));
|
||||
FluidRegistry.LAVA.setIcons(BlockLiquid.func_149803_e("lava_still"), BlockLiquid.func_149803_e("lava_flow"));
|
||||
FluidRegistry.WATER.setIcons(BlockLiquid.getLiquidIcon("water_still"), BlockLiquid.getLiquidIcon("water_flow"));
|
||||
FluidRegistry.LAVA.setIcons(BlockLiquid.getLiquidIcon("lava_still"), BlockLiquid.getLiquidIcon("lava_flow"));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -280,7 +280,7 @@ public class ForgeHooksClient
|
||||
Minecraft mc = FMLClientHandler.instance().getClient();
|
||||
if (mc.ingameGUI != null)
|
||||
{
|
||||
mc.ingameGUI.func_146158_b().func_146227_a(new ChatComponentTranslation("forge.texture.preload.warning", texture));
|
||||
mc.ingameGUI.getChatGUI().printChatMessage(new ChatComponentTranslation("forge.texture.preload.warning", texture));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -366,9 +366,9 @@ public class ForgeHooksClient
|
||||
GameSettings settings = Minecraft.getMinecraft().gameSettings;
|
||||
int[] ranges = ForgeModContainer.blendRanges;
|
||||
int distance = 0;
|
||||
if (settings.fancyGraphics && settings.field_151451_c >= 0 && settings.field_151451_c < ranges.length)
|
||||
if (settings.fancyGraphics && settings.renderDistanceChunks >= 0 && settings.renderDistanceChunks < ranges.length)
|
||||
{
|
||||
distance = ranges[settings.field_151451_c];
|
||||
distance = ranges[settings.renderDistanceChunks];
|
||||
}
|
||||
|
||||
int r = 0;
|
||||
@@ -381,7 +381,7 @@ public class ForgeHooksClient
|
||||
for (int z = -distance; z <= distance; ++z)
|
||||
{
|
||||
BiomeGenBase biome = world.getBiomeGenForCoords(playerX + x, playerZ + z);
|
||||
int colour = biome.getSkyColorByTemp(biome.func_150564_a(playerX + x, playerY, playerZ + z));
|
||||
int colour = biome.getSkyColorByTemp(biome.getFloatTemperature(playerX + x, playerY, playerZ + z));
|
||||
r += (colour & 0xFF0000) >> 16;
|
||||
g += (colour & 0x00FF00) >> 8;
|
||||
b += colour & 0x0000FF;
|
||||
|
||||
@@ -111,7 +111,7 @@ public class GuiIngameForge extends GuiIngame
|
||||
}
|
||||
else
|
||||
{
|
||||
OpenGlHelper.func_148821_a(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
}
|
||||
|
||||
if (renderHelmet) renderHelmet(res, partialTicks, hasScreen, mouseX, mouseY);
|
||||
@@ -162,7 +162,7 @@ public class GuiIngameForge extends GuiIngame
|
||||
}
|
||||
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.func_148821_a(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
GL11.glDisable(GL11.GL_ALPHA_TEST);
|
||||
|
||||
renderChat(width, height);
|
||||
@@ -217,9 +217,9 @@ public class GuiIngameForge extends GuiIngame
|
||||
if (pre(CROSSHAIRS)) return;
|
||||
bind(Gui.icons);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.func_148821_a(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR, 1, 0);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_ONE_MINUS_DST_COLOR, GL11.GL_ONE_MINUS_SRC_COLOR, 1, 0);
|
||||
drawTexturedModalRect(width / 2 - 7, height / 2 - 7, 0, 0, 16, 16);
|
||||
OpenGlHelper.func_148821_a(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
post(CROSSHAIRS);
|
||||
}
|
||||
@@ -244,7 +244,7 @@ public class GuiIngameForge extends GuiIngame
|
||||
|
||||
if (this.mc.gameSettings.thirdPersonView == 0 && itemstack != null && itemstack.getItem() != null)
|
||||
{
|
||||
if (itemstack.getItem() == Item.func_150898_a(Blocks.pumpkin))
|
||||
if (itemstack.getItem() == Item.getItemFromBlock(Blocks.pumpkin))
|
||||
{
|
||||
renderPumpkinBlur(res.getScaledWidth(), res.getScaledHeight());
|
||||
}
|
||||
@@ -312,7 +312,7 @@ public class GuiIngameForge extends GuiIngame
|
||||
int left = width / 2 + 91;
|
||||
int top = height - right_height;
|
||||
|
||||
if (mc.thePlayer.isInsideOfMaterial(Material.field_151586_h))
|
||||
if (mc.thePlayer.isInsideOfMaterial(Material.water))
|
||||
{
|
||||
int air = mc.thePlayer.getAir();
|
||||
int full = MathHelper.ceiling_double_int((double)(air - 2) * 10.0D / 300.0D);
|
||||
@@ -499,7 +499,7 @@ public class GuiIngameForge extends GuiIngame
|
||||
if (pre(EXPERIENCE)) return;
|
||||
GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
if (mc.playerController.func_78763_f())
|
||||
if (mc.playerController.gameIsSurvivalOrAdventure())
|
||||
{
|
||||
mc.mcProfiler.startSection("expBar");
|
||||
int cap = this.mc.thePlayer.xpBarCap();
|
||||
@@ -521,7 +521,7 @@ public class GuiIngameForge extends GuiIngame
|
||||
this.mc.mcProfiler.endSection();
|
||||
|
||||
|
||||
if (mc.playerController.func_78763_f() && mc.thePlayer.experienceLevel > 0)
|
||||
if (mc.playerController.gameIsSurvivalOrAdventure() && mc.thePlayer.experienceLevel > 0)
|
||||
{
|
||||
mc.mcProfiler.startSection("expLevel");
|
||||
boolean flag1 = false;
|
||||
@@ -588,7 +588,7 @@ public class GuiIngameForge extends GuiIngame
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.func_148821_a(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
FontRenderer font = highlightingItemStack.getItem().getFontRenderer(highlightingItemStack);
|
||||
if (font != null)
|
||||
{
|
||||
@@ -612,7 +612,7 @@ public class GuiIngameForge extends GuiIngame
|
||||
protected void renderHUDText(int width, int height)
|
||||
{
|
||||
mc.mcProfiler.startSection("forgeHudText");
|
||||
OpenGlHelper.func_148821_a(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
ArrayList<String> left = new ArrayList<String>();
|
||||
ArrayList<String> right = new ArrayList<String>();
|
||||
|
||||
@@ -621,11 +621,11 @@ public class GuiIngameForge extends GuiIngame
|
||||
long time = mc.theWorld.getTotalWorldTime();
|
||||
if (time >= 120500L)
|
||||
{
|
||||
right.add(I18n.getStringParams("demo.demoExpired"));
|
||||
right.add(I18n.format("demo.demoExpired"));
|
||||
}
|
||||
else
|
||||
{
|
||||
right.add(I18n.getStringParams("demo.remainingTime", StringUtils.ticksToElapsedTime((int)(120500L - time))));
|
||||
right.add(I18n.format("demo.remainingTime", StringUtils.ticksToElapsedTime((int)(120500L - time))));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -676,9 +676,9 @@ public class GuiIngameForge extends GuiIngame
|
||||
}
|
||||
|
||||
left.add(String.format("ws: %.3f, fs: %.3f, g: %b, fl: %d", mc.thePlayer.capabilities.getWalkSpeed(), mc.thePlayer.capabilities.getFlySpeed(), mc.thePlayer.onGround, mc.theWorld.getHeightValue(x, z)));
|
||||
if (mc.entityRenderer != null && mc.entityRenderer.func_147702_a())
|
||||
if (mc.entityRenderer != null && mc.entityRenderer.isShaderActive())
|
||||
{
|
||||
left.add(String.format("shader: %s", mc.entityRenderer.func_147706_e().func_148022_b()));
|
||||
left.add(String.format("shader: %s", mc.entityRenderer.getShaderGroup().getShaderGroupName()));
|
||||
}
|
||||
|
||||
right.add(null);
|
||||
@@ -727,7 +727,7 @@ public class GuiIngameForge extends GuiIngame
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)(width / 2), (float)(height - 48), 0.0F);
|
||||
GL11.glEnable(GL11.GL_BLEND);
|
||||
OpenGlHelper.func_148821_a(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
OpenGlHelper.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
int color = (recordIsPlaying ? Color.HSBtoRGB(hue / 50.0F, 0.7F, 0.6F) & WHITE : WHITE);
|
||||
fontrenderer.drawString(recordPlaying, -fontrenderer.getStringWidth(recordPlaying) / 2, -4, color | (opacity << 24));
|
||||
GL11.glDisable(GL11.GL_BLEND);
|
||||
@@ -747,7 +747,7 @@ public class GuiIngameForge extends GuiIngame
|
||||
|
||||
GL11.glPushMatrix();
|
||||
GL11.glTranslatef((float)event.posX, (float)event.posY, 0.0F);
|
||||
persistantChatGUI.func_146230_a(updateCounter);
|
||||
persistantChatGUI.drawChat(updateCounter);
|
||||
GL11.glPopMatrix();
|
||||
|
||||
post(CHAT);
|
||||
@@ -761,12 +761,12 @@ public class GuiIngameForge extends GuiIngame
|
||||
ScoreObjective scoreobjective = this.mc.theWorld.getScoreboard().func_96539_a(0);
|
||||
NetHandlerPlayClient handler = mc.thePlayer.sendQueue;
|
||||
|
||||
if (mc.gameSettings.keyBindPlayerList.func_151470_d() && (!mc.isIntegratedServerRunning() || handler.field_147303_b.size() > 1 || scoreobjective != null))
|
||||
if (mc.gameSettings.keyBindPlayerList.getIsKeyPressed() && (!mc.isIntegratedServerRunning() || handler.playerInfoList.size() > 1 || scoreobjective != null))
|
||||
{
|
||||
if (pre(PLAYER_LIST)) return;
|
||||
this.mc.mcProfiler.startSection("playerList");
|
||||
List<GuiPlayerInfo> players = (List<GuiPlayerInfo>)handler.field_147303_b;
|
||||
int maxPlayers = handler.field_147304_c;
|
||||
List<GuiPlayerInfo> players = (List<GuiPlayerInfo>)handler.playerInfoList;
|
||||
int maxPlayers = handler.currentServerMaxPlayers;
|
||||
int rows = maxPlayers;
|
||||
int columns = 1;
|
||||
|
||||
|
||||
@@ -37,7 +37,6 @@ import net.minecraftforge.client.model.ModelFormatException;
|
||||
/**
|
||||
* Techne model importer, based on iChun's Hats importer
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
@SideOnly(Side.CLIENT)
|
||||
public class TechneModel extends ModelBase implements IModelCustom {
|
||||
public static final List<String> cubeTypes = Arrays.asList(
|
||||
|
||||
Reference in new issue
Block a user