Update MCP mappings to snapshot_nodoc_20161220 (#3551)

This commit is contained in:
James Mitchell authored and LexManos committed 2016-12-21 15:52:30 -08:00
1 parent 1f4007e5d8
commit 5165dc52bf
88 files changed
+445 -436

No files matched your search

@@ -94,20 +94,20 @@ public class ClientCommandHandler extends CommandHandler
}
else
{
sender.addChatMessage(format(RED, "commands.generic.permission"));
sender.sendMessage(format(RED, "commands.generic.permission"));
}
}
catch (WrongUsageException wue)
{
sender.addChatMessage(format(RED, "commands.generic.usage", format(RED, wue.getMessage(), wue.getErrorObjects())));
sender.sendMessage(format(RED, "commands.generic.usage", format(RED, wue.getMessage(), wue.getErrorObjects())));
}
catch (CommandException ce)
{
sender.addChatMessage(format(RED, ce.getMessage(), ce.getErrorObjects()));
sender.sendMessage(format(RED, ce.getMessage(), ce.getErrorObjects()));
}
catch (Throwable t)
{
sender.addChatMessage(format(RED, "commands.generic.exception"));
sender.sendMessage(format(RED, "commands.generic.exception"));
t.printStackTrace();
}
@@ -133,7 +133,7 @@ public class ClientCommandHandler extends CommandHandler
Minecraft mc = FMLClientHandler.instance().getClient();
if (mc.currentScreen instanceof GuiChat)
{
List<String> commands = getTabCompletionOptions(mc.thePlayer, leftOfCursor, mc.thePlayer.getPosition());
List<String> commands = getTabCompletions(mc.player, leftOfCursor, mc.player.getPosition());
if (commands != null && !commands.isEmpty())
{
if (leftOfCursor.indexOf(' ') == -1)
@@ -263,7 +263,7 @@ public class ForgeHooksClient
int distance = 0;
if (settings.fancyGraphics && ranges.length > 0)
{
distance = ranges[MathHelper.clamp_int(settings.renderDistanceChunks, 0, ranges.length-1)];
distance = ranges[MathHelper.clamp(settings.renderDistanceChunks, 0, ranges.length-1)];
}
int r = 0;
@@ -672,8 +672,8 @@ public class ForgeHooksClient
public static boolean shouldCauseReequipAnimation(@Nonnull ItemStack from, @Nonnull ItemStack to, int slot)
{
boolean fromInvalid = from.func_190926_b();
boolean toInvalid = to.func_190926_b();
boolean fromInvalid = from.isEmpty();
boolean toInvalid = to.isEmpty();
if (fromInvalid && toInvalid) return false;
if (fromInvalid || toInvalid) return true;
@@ -107,9 +107,9 @@ public class GuiIngameForge extends GuiIngame
eventParent = new RenderGameOverlayEvent(partialTicks, res);
int width = res.getScaledWidth();
int height = res.getScaledHeight();
renderHealthMount = mc.thePlayer.getRidingEntity() instanceof EntityLivingBase;
renderFood = mc.thePlayer.getRidingEntity() == null;
renderJumpBar = mc.thePlayer.isRidingHorse();
renderHealthMount = mc.player.getRidingEntity() instanceof EntityLivingBase;
renderFood = mc.player.getRidingEntity() == null;
renderJumpBar = mc.player.isRidingHorse();
right_height = 39;
left_height = 39;
@@ -122,7 +122,7 @@ public class GuiIngameForge extends GuiIngame
if (Minecraft.isFancyGraphicsEnabled())
{
renderVignette(mc.thePlayer.getBrightness(partialTicks), res);
renderVignette(mc.player.getBrightness(partialTicks), res);
}
else
{
@@ -132,7 +132,7 @@ public class GuiIngameForge extends GuiIngame
if (renderHelmet) renderHelmet(res, partialTicks);
if (renderPortal && !mc.thePlayer.isPotionActive(MobEffects.NAUSEA))
if (renderPortal && !mc.player.isPotionActive(MobEffects.NAUSEA))
{
renderPortal(res, partialTicks);
}
@@ -176,9 +176,9 @@ public class GuiIngameForge extends GuiIngame
renderTitle(width, height, partialTicks);
Scoreboard scoreboard = this.mc.theWorld.getScoreboard();
Scoreboard scoreboard = this.mc.world.getScoreboard();
ScoreObjective objective = null;
ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(mc.thePlayer.getName());
ScorePlayerTeam scoreplayerteam = scoreboard.getPlayersTeam(mc.player.getName());
if (scoreplayerteam != null)
{
int slot = scoreplayerteam.getChatFormat().getColorIndex();
@@ -251,7 +251,7 @@ public class GuiIngameForge extends GuiIngame
{
if (pre(HELMET)) return;
ItemStack itemstack = this.mc.thePlayer.inventory.armorItemInSlot(3);
ItemStack itemstack = this.mc.player.inventory.armorItemInSlot(3);
if (this.mc.gameSettings.thirdPersonView == 0 && itemstack != null && itemstack.getItem() != null)
{
@@ -261,7 +261,7 @@ public class GuiIngameForge extends GuiIngame
}
else
{
itemstack.getItem().renderHelmetOverlay(itemstack, mc.thePlayer, res, partialTicks);
itemstack.getItem().renderHelmetOverlay(itemstack, mc.player, res, partialTicks);
}
}
@@ -277,7 +277,7 @@ public class GuiIngameForge extends GuiIngame
int left = width / 2 - 91;
int top = height - left_height;
int level = ForgeHooks.getTotalArmorValue(mc.thePlayer);
int level = ForgeHooks.getTotalArmorValue(mc.player);
for (int i = 1; level > 0 && i < 20; i += 2)
{
if (i < level)
@@ -305,7 +305,7 @@ public class GuiIngameForge extends GuiIngame
{
if (pre(PORTAL)) return;
float f1 = mc.thePlayer.prevTimeInPortal + (mc.thePlayer.timeInPortal - mc.thePlayer.prevTimeInPortal) * partialTicks;
float f1 = mc.player.prevTimeInPortal + (mc.player.timeInPortal - mc.player.prevTimeInPortal) * partialTicks;
if (f1 > 0.0F)
{
@@ -344,8 +344,8 @@ public class GuiIngameForge extends GuiIngame
if (player.isInsideOfMaterial(Material.WATER))
{
int air = player.getAir();
int full = MathHelper.ceiling_double_int((double)(air - 2) * 10.0D / 300.0D);
int partial = MathHelper.ceiling_double_int((double)air * 10.0D / 300.0D) - full;
int full = MathHelper.ceil((double)(air - 2) * 10.0D / 300.0D);
int partial = MathHelper.ceil((double)air * 10.0D / 300.0D) - full;
for (int i = 0; i < full + partial; ++i)
{
@@ -367,7 +367,7 @@ public class GuiIngameForge extends GuiIngame
GlStateManager.enableBlend();
EntityPlayer player = (EntityPlayer)this.mc.getRenderViewEntity();
int health = MathHelper.ceiling_float_int(player.getHealth());
int health = MathHelper.ceil(player.getHealth());
boolean highlight = healthUpdateCounter > (long)updateCounter && (healthUpdateCounter - (long)updateCounter) / 3L %2L == 1L;
if (health < this.playerHealth && player.hurtResistantTime > 0)
@@ -393,9 +393,9 @@ public class GuiIngameForge extends GuiIngame
IAttributeInstance attrMaxHealth = player.getEntityAttribute(SharedMonsterAttributes.MAX_HEALTH);
float healthMax = (float)attrMaxHealth.getAttributeValue();
float absorb = MathHelper.ceiling_float_int(player.getAbsorptionAmount());
float absorb = MathHelper.ceil(player.getAbsorptionAmount());
int healthRows = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F / 10.0F);
int healthRows = MathHelper.ceil((healthMax + absorb) / 2.0F / 10.0F);
int rowHeight = Math.max(10 - (healthRows - 2), 3);
this.rand.setSeed((long)(updateCounter * 312871));
@@ -411,17 +411,17 @@ public class GuiIngameForge extends GuiIngame
regen = updateCounter % 25;
}
final int TOP = 9 * (mc.theWorld.getWorldInfo().isHardcoreModeEnabled() ? 5 : 0);
final int TOP = 9 * (mc.world.getWorldInfo().isHardcoreModeEnabled() ? 5 : 0);
final int BACKGROUND = (highlight ? 25 : 16);
int MARGIN = 16;
if (player.isPotionActive(MobEffects.POISON)) MARGIN += 36;
else if (player.isPotionActive(MobEffects.WITHER)) MARGIN += 72;
float absorbRemaining = absorb;
for (int i = MathHelper.ceiling_float_int((healthMax + absorb) / 2.0F) - 1; i >= 0; --i)
for (int i = MathHelper.ceil((healthMax + absorb) / 2.0F) - 1; i >= 0; --i)
{
//int b0 = (highlight ? 1 : 0);
int row = MathHelper.ceiling_float_int((float)(i + 1) / 10.0F) - 1;
int row = MathHelper.ceil((float)(i + 1) / 10.0F) - 1;
int x = left + i % 10 * 8;
int y = top - row * rowHeight;
@@ -477,7 +477,7 @@ public class GuiIngameForge extends GuiIngame
right_height += 10;
boolean unused = false;// Unused flag in vanilla, seems to be part of a 'fade out' mechanic
FoodStats stats = mc.thePlayer.getFoodStats();
FoodStats stats = mc.player.getFoodStats();
int level = stats.getFoodLevel();
for (int i = 0; i < 10; ++i)
@@ -488,7 +488,7 @@ public class GuiIngameForge extends GuiIngame
int icon = 16;
byte background = 0;
if (mc.thePlayer.isPotionActive(MobEffects.HUNGER))
if (mc.player.isPotionActive(MobEffects.HUNGER))
{
icon += 36;
background = 13;
@@ -514,12 +514,12 @@ public class GuiIngameForge extends GuiIngame
protected void renderSleepFade(int width, int height)
{
if (mc.thePlayer.getSleepTimer() > 0)
if (mc.player.getSleepTimer() > 0)
{
mc.mcProfiler.startSection("sleep");
GlStateManager.disableDepth();
GlStateManager.disableAlpha();
int sleepTime = mc.thePlayer.getSleepTimer();
int sleepTime = mc.player.getSleepTimer();
float opacity = (float)sleepTime / 100.0F;
if (opacity > 1.0F)
@@ -545,13 +545,13 @@ public class GuiIngameForge extends GuiIngame
if (mc.playerController.gameIsSurvivalOrAdventure())
{
mc.mcProfiler.startSection("expBar");
int cap = this.mc.thePlayer.xpBarCap();
int cap = this.mc.player.xpBarCap();
int left = width / 2 - 91;
if (cap > 0)
{
short barWidth = 182;
int filled = (int)(mc.thePlayer.experience * (float)(barWidth + 1));
int filled = (int)(mc.player.experience * (float)(barWidth + 1));
int top = height - 32 + 3;
drawTexturedModalRect(left, top, 0, 64, barWidth, 5);
@@ -564,12 +564,12 @@ public class GuiIngameForge extends GuiIngame
this.mc.mcProfiler.endSection();
if (mc.playerController.gameIsSurvivalOrAdventure() && mc.thePlayer.experienceLevel > 0)
if (mc.playerController.gameIsSurvivalOrAdventure() && mc.player.experienceLevel > 0)
{
mc.mcProfiler.startSection("expLevel");
boolean flag1 = false;
int color = flag1 ? 16777215 : 8453920;
String text = "" + mc.thePlayer.experienceLevel;
String text = "" + mc.player.experienceLevel;
int x = (width - fontrenderer.getStringWidth(text)) / 2;
int y = height - 31 - 4;
fontrenderer.drawString(text, x + 1, y, 0);
@@ -594,7 +594,7 @@ public class GuiIngameForge extends GuiIngame
GlStateManager.disableBlend();
mc.mcProfiler.startSection("jumpBar");
float charge = mc.thePlayer.getHorseJumpPower();
float charge = mc.player.getHorseJumpPower();
final int barWidth = 182;
int x = (width / 2) - (barWidth / 2);
int filled = (int)(charge * (float)(barWidth + 1));
@@ -657,7 +657,7 @@ public class GuiIngameForge extends GuiIngame
mc.mcProfiler.endSection();
}
else if (this.mc.thePlayer.isSpectator())
else if (this.mc.player.isSpectator())
{
this.spectatorGui.renderSelectedItem(res);
}
@@ -672,7 +672,7 @@ public class GuiIngameForge extends GuiIngame
if (mc.isDemo())
{
long time = mc.theWorld.getTotalWorldTime();
long time = mc.world.getTotalWorldTime();
if (time >= 120500L)
{
listR.add(I18n.format("demo.demoExpired"));
@@ -729,10 +729,10 @@ public class GuiIngameForge extends GuiIngame
protected void renderRecordOverlay(int width, int height, float partialTicks)
{
if (recordPlayingUpFor > 0)
if (overlayMessageTime > 0)
{
mc.mcProfiler.startSection("overlayMessage");
float hue = (float)recordPlayingUpFor - partialTicks;
float hue = (float)overlayMessageTime - partialTicks;
int opacity = (int)(hue * 256.0F / 20.0F);
if (opacity > 255) opacity = 255;
@@ -742,8 +742,8 @@ public class GuiIngameForge extends GuiIngame
GlStateManager.translate((float)(width / 2), (float)(height - 68), 0.0F);
GlStateManager.enableBlend();
GlStateManager.tryBlendFuncSeparate(GlStateManager.SourceFactor.SRC_ALPHA, GlStateManager.DestFactor.ONE_MINUS_SRC_ALPHA, GlStateManager.SourceFactor.ONE, GlStateManager.DestFactor.ZERO);
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));
int color = (animateOverlayMessageColor ? Color.HSBtoRGB(hue / 50.0F, 0.7F, 0.6F) & WHITE : WHITE);
fontrenderer.drawString(overlayMessage, -fontrenderer.getStringWidth(overlayMessage) / 2, -4, color | (opacity << 24));
GlStateManager.disableBlend();
GlStateManager.popMatrix();
}
@@ -767,7 +767,7 @@ public class GuiIngameForge extends GuiIngame
}
if (titlesTimer <= titleFadeOut) opacity = (int)(age * 255.0F / (float)this.titleFadeOut);
opacity = MathHelper.clamp_int(opacity, 0, 255);
opacity = MathHelper.clamp(opacity, 0, 255);
if (opacity > 8)
{
@@ -811,14 +811,14 @@ public class GuiIngameForge extends GuiIngame
protected void renderPlayerList(int width, int height)
{
ScoreObjective scoreobjective = this.mc.theWorld.getScoreboard().getObjectiveInDisplaySlot(0);
NetHandlerPlayClient handler = mc.thePlayer.connection;
ScoreObjective scoreobjective = this.mc.world.getScoreboard().getObjectiveInDisplaySlot(0);
NetHandlerPlayClient handler = mc.player.connection;
if (mc.gameSettings.keyBindPlayerList.isKeyDown() && (!mc.isIntegratedServerRunning() || handler.getPlayerInfoMap().size() > 1 || scoreobjective != null))
{
this.overlayPlayerList.updatePlayerList(true);
if (pre(PLAYER_LIST)) return;
this.overlayPlayerList.renderPlayerlist(width, this.mc.theWorld.getScoreboard(), scoreobjective);
this.overlayPlayerList.renderPlayerlist(width, this.mc.world.getScoreboard(), scoreobjective);
post(PLAYER_LIST);
}
else
@@ -177,7 +177,7 @@ public final class ModelFluid implements IModelCustomData
if(flow == null) flow = -1000f;
}
int flowRound = (int)Math.round(Math.toDegrees(flow));
flowRound = MathHelper.clamp_int(flowRound, -1000, 1000);
flowRound = MathHelper.clamp(flowRound, -1000, 1000);
return flowRound;
}
@@ -73,11 +73,11 @@ public final class AnimationItemOverrideList extends ItemOverrideList
IAnimationStateMachine asm = stack.getCapability(CapabilityAnimation.ANIMATION_CAPABILITY, null);
if(world == null && entity != null)
{
world = entity.worldObj;
world = entity.world;
}
if(world == null)
{
world = Minecraft.getMinecraft().theWorld;
world = Minecraft.getMinecraft().world;
}
IModelState state = asm.apply(Animation.getWorldTime(world, Animation.getPartialTickTime())).getLeft();
return model.bake(new ModelStateComposition(state, this.state), format, bakedTextureGetter);
@@ -88,7 +88,7 @@ public class AnimationModelBase<T extends Entity> extends ModelBase implements I
VertexBuffer.setTranslation(-0.5, -1.5, -0.5);
lighter.setParent(new VertexBufferConsumer(VertexBuffer));
lighter.setWorld(entity.worldObj);
lighter.setWorld(entity.world);
lighter.setState(Blocks.AIR.getDefaultState());
lighter.setBlockPos(pos);
boolean empty = true;
@@ -54,7 +54,7 @@ public class AnimationTESR<T extends TileEntity> extends FastTESR<T> implements
BlockPos pos = te.getPos();
IBlockAccess world = MinecraftForgeClient.getRegionRenderCache(te.getWorld(), pos);
IBlockState state = world.getBlockState(pos);
if(state.getPropertyNames().contains(Properties.StaticProperty))
if(state.getPropertyKeys().contains(Properties.StaticProperty))
{
state = state.withProperty(Properties.StaticProperty, false);
}
@@ -330,7 +330,7 @@ public class ModelBlockAnimation
{
int length = loop ? var.samples.length : (var.samples.length - 1);
float timeScaled = time * length;
int s1 = MathHelper.clamp_int((int)Math.round(Math.floor(timeScaled)), 0, length - 1);
int s1 = MathHelper.clamp((int)Math.round(Math.floor(timeScaled)), 0, length - 1);
float progress = timeScaled - s1;
int s2 = s1 + 1;
if(s2 == length && loop) s2 = 0;
@@ -190,7 +190,7 @@ public enum B3DLoader implements ICustomModelLoader
this.animation = animation;
this.frame = frame;
this.nextFrame = nextFrame;
this.progress = MathHelper.clamp_float(progress, 0, 1);
this.progress = MathHelper.clamp(progress, 0, 1);
this.parent = getParent(parent);
}
@@ -175,7 +175,7 @@ public class VertexLighterSmoothAo extends VertexLighterFlat
a += ao[sx - 0][sy - 0][sz - 1] * (0 + x) * (0 + y) * (1 - z);
a += ao[sx - 0][sy - 0][sz - 0] * (0 + x) * (0 + y) * (0 + z);
a = MathHelper.clamp_float(a, 0, 1);
a = MathHelper.clamp(a, 0, 1);
return a;
}