u29
This commit is contained in:
parent
d262f9c825
commit
ddc90126af
170 changed files with 7183 additions and 747 deletions
|
|
@ -99,7 +99,7 @@ public class BlockRedstoneWire extends Block {
|
|||
BlockPos posTmp = new BlockPos(0, 0, 0);
|
||||
Block block = worldIn.getBlockState(blockpos).getBlock();
|
||||
if (!canConnectTo(worldIn.getBlockState(blockpos), direction) && (block.isBlockNormalCube()
|
||||
|| !canConnectUpwardsTo(worldIn.getBlockState(blockpos.offsetEvenFaster(EnumFacing.UP, posTmp))))) {
|
||||
|| !canConnectUpwardsTo(worldIn.getBlockState(blockpos.offsetEvenFaster(EnumFacing.DOWN, posTmp))))) {
|
||||
Block block1 = worldIn.getBlockState(pos.up()).getBlock();
|
||||
return !block1.isBlockNormalCube() && block.isBlockNormalCube()
|
||||
&& canConnectUpwardsTo(worldIn.getBlockState(blockpos.offsetEvenFaster(EnumFacing.UP, posTmp)))
|
||||
|
|
@ -177,11 +177,13 @@ public class BlockRedstoneWire extends Block {
|
|||
if (worldIn.getBlockState(blockpos).getBlock().isNormalCube()
|
||||
&& !worldIn.getBlockState(pos1.up()).getBlock().isNormalCube()) {
|
||||
if (flag && pos1.getY() >= pos2.getY()) {
|
||||
l = this.getMaxCurrentStrength(worldIn, blockpos.up(), l);
|
||||
++blockpos.y;
|
||||
l = this.getMaxCurrentStrength(worldIn, blockpos, l);
|
||||
}
|
||||
} else if (!worldIn.getBlockState(blockpos).getBlock().isNormalCube() && flag
|
||||
&& pos1.getY() <= pos2.getY()) {
|
||||
l = this.getMaxCurrentStrength(worldIn, blockpos.down(), l);
|
||||
--blockpos.y;
|
||||
l = this.getMaxCurrentStrength(worldIn, blockpos, l);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -205,6 +207,7 @@ public class BlockRedstoneWire extends Block {
|
|||
|
||||
this.blocksNeedingUpdate.add(pos1);
|
||||
|
||||
facings = EnumFacing._VALUES;
|
||||
for (int m = 0; m < facings.length; ++m) {
|
||||
this.blocksNeedingUpdate.add(pos1.offset(facings[m]));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
|||
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFolderResourcePack;
|
||||
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFontRenderer;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.EaglerMeshLoader;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ImageData;
|
||||
|
|
@ -63,6 +64,8 @@ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenIntegratedServerBusy;
|
|||
import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenSingleplayerConnecting;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController;
|
||||
import net.lax1dude.eaglercraft.v1_8.update.RelayUpdateChecker;
|
||||
import net.lax1dude.eaglercraft.v1_8.voice.GuiVoiceOverlay;
|
||||
import net.lax1dude.eaglercraft.v1_8.voice.VoiceClientController;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.material.Material;
|
||||
import net.minecraft.client.audio.MusicTicker;
|
||||
|
|
@ -304,6 +307,12 @@ public class Minecraft implements IThreadListener {
|
|||
|
||||
public SkullCommand eagskullCommand;
|
||||
|
||||
public GuiVoiceOverlay voiceOverlay;
|
||||
|
||||
public float startZoomValue = 18.0f;
|
||||
public float adjustedZoomValue = 18.0f;
|
||||
public boolean isZoomKey = false;
|
||||
|
||||
public Minecraft(GameConfiguration gameConfig) {
|
||||
theMinecraft = this;
|
||||
StringTranslate.initClient();
|
||||
|
|
@ -416,6 +425,7 @@ public class Minecraft implements IThreadListener {
|
|||
this.mcResourceManager.registerReloadListener(new MetalsLUT());
|
||||
this.mcResourceManager.registerReloadListener(new EmissiveItems());
|
||||
this.mcResourceManager.registerReloadListener(new BlockVertexIDs());
|
||||
this.mcResourceManager.registerReloadListener(new EaglerMeshLoader());
|
||||
AchievementList.openInventory.setStatStringFormatter(new IStatStringFormat() {
|
||||
public String formatString(String parString1) {
|
||||
try {
|
||||
|
|
@ -466,6 +476,9 @@ public class Minecraft implements IThreadListener {
|
|||
this.checkGLError("Post startup");
|
||||
this.ingameGUI = new GuiIngame(this);
|
||||
this.eagskullCommand = new SkullCommand(this);
|
||||
this.voiceOverlay = new GuiVoiceOverlay(this);
|
||||
ScaledResolution voiceRes = new ScaledResolution(this);
|
||||
this.voiceOverlay.setResolution(voiceRes.getScaledWidth(), voiceRes.getScaledHeight());
|
||||
|
||||
ServerList.initServerList(this);
|
||||
EaglerProfile.read();
|
||||
|
|
@ -863,6 +876,7 @@ public class Minecraft implements IThreadListener {
|
|||
|
||||
public void updateDisplay() {
|
||||
this.mcProfiler.startSection("display_update");
|
||||
Display.setVSync(this.gameSettings.enableVsync);
|
||||
Display.update();
|
||||
this.mcProfiler.endSection();
|
||||
this.checkWindowResize();
|
||||
|
|
@ -1209,12 +1223,14 @@ public class Minecraft implements IThreadListener {
|
|||
private void resize(int width, int height) {
|
||||
this.displayWidth = Math.max(1, width);
|
||||
this.displayHeight = Math.max(1, height);
|
||||
ScaledResolution scaledresolution = new ScaledResolution(this);
|
||||
if (this.currentScreen != null) {
|
||||
ScaledResolution scaledresolution = new ScaledResolution(this);
|
||||
this.currentScreen.onResize(this, scaledresolution.getScaledWidth(), scaledresolution.getScaledHeight());
|
||||
}
|
||||
|
||||
this.loadingScreen = new LoadingScreenRenderer(this);
|
||||
|
||||
this.voiceOverlay.setResolution(scaledresolution.getScaledWidth(), scaledresolution.getScaledHeight());
|
||||
}
|
||||
|
||||
public MusicTicker func_181535_r() {
|
||||
|
|
@ -1253,6 +1269,9 @@ public class Minecraft implements IThreadListener {
|
|||
this.ingameGUI.updateTick();
|
||||
}
|
||||
|
||||
this.mcProfiler.endStartSection("eaglerVoice");
|
||||
VoiceClientController.tickVoiceClient(this);
|
||||
|
||||
this.mcProfiler.endSection();
|
||||
this.entityRenderer.getMouseOver(1.0F);
|
||||
this.mcProfiler.startSection("gameMode");
|
||||
|
|
@ -1340,7 +1359,9 @@ public class Minecraft implements IThreadListener {
|
|||
if (i1 <= 200L) {
|
||||
int j = Mouse.getEventDWheel();
|
||||
if (j != 0) {
|
||||
if (this.thePlayer.isSpectator()) {
|
||||
if (this.isZoomKey) {
|
||||
this.adjustedZoomValue = MathHelper.clamp_float(adjustedZoomValue - j * 4.0f, 5.0f, 32.0f);
|
||||
} else if (this.thePlayer.isSpectator()) {
|
||||
j = j < 0 ? -1 : 1;
|
||||
if (this.ingameGUI.getSpectatorGui().func_175262_a()) {
|
||||
this.ingameGUI.getSpectatorGui().func_175259_b(-j);
|
||||
|
|
@ -1529,6 +1550,12 @@ public class Minecraft implements IThreadListener {
|
|||
}
|
||||
}
|
||||
|
||||
boolean zoomKey = this.gameSettings.keyBindZoomCamera.isKeyDown();
|
||||
if (zoomKey != isZoomKey) {
|
||||
adjustedZoomValue = startZoomValue;
|
||||
isZoomKey = zoomKey;
|
||||
}
|
||||
|
||||
boolean flag = this.gameSettings.chatVisibility != EntityPlayer.EnumChatVisibility.HIDDEN;
|
||||
|
||||
while (this.gameSettings.keyBindInventory.isPressed()) {
|
||||
|
|
@ -1718,6 +1745,7 @@ public class Minecraft implements IThreadListener {
|
|||
*/
|
||||
public void launchIntegratedServer(String folderName, String worldName, WorldSettings worldSettingsIn) {
|
||||
this.loadWorld((WorldClient) null);
|
||||
Minecraft.getMinecraft().getRenderManager().setEnableFNAWSkins(this.gameSettings.enableFNAWSkins);
|
||||
session.reset();
|
||||
SingleplayerServerController.launchEaglercraftServer(folderName, gameSettings.difficulty.getDifficultyId(),
|
||||
Math.max(gameSettings.renderDistanceChunks, 2), worldSettingsIn);
|
||||
|
|
@ -2261,4 +2289,12 @@ public class Minecraft implements IThreadListener {
|
|||
public void clearTitles() {
|
||||
ingameGUI.displayTitle(null, null, -1, -1, -1);
|
||||
}
|
||||
|
||||
public boolean getEnableFNAWSkins() {
|
||||
boolean ret = this.gameSettings.enableFNAWSkins;
|
||||
if (this.thePlayer != null) {
|
||||
ret &= this.thePlayer.sendQueue.currentFNAWSkinAllowedState;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.client.entity;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
|
||||
import net.lax1dude.eaglercraft.v1_8.profile.SkinModel;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.network.NetworkPlayerInfo;
|
||||
import net.minecraft.client.resources.DefaultPlayerSkin;
|
||||
|
|
@ -35,6 +36,14 @@ import net.minecraft.world.WorldSettings;
|
|||
public abstract class AbstractClientPlayer extends EntityPlayer {
|
||||
private NetworkPlayerInfo playerInfo;
|
||||
|
||||
public long eaglerHighPolyAnimationTick = System.currentTimeMillis();
|
||||
public float eaglerHighPolyAnimationFloat1 = 0.0f;
|
||||
public float eaglerHighPolyAnimationFloat2 = 0.0f;
|
||||
public float eaglerHighPolyAnimationFloat3 = 0.0f;
|
||||
public float eaglerHighPolyAnimationFloat4 = 0.0f;
|
||||
public float eaglerHighPolyAnimationFloat5 = 0.0f;
|
||||
public float eaglerHighPolyAnimationFloat6 = 0.0f;
|
||||
|
||||
public AbstractClientPlayer(World worldIn, GameProfile playerProfile) {
|
||||
super(worldIn, playerProfile);
|
||||
}
|
||||
|
|
@ -92,6 +101,11 @@ public abstract class AbstractClientPlayer extends EntityPlayer {
|
|||
: networkplayerinfo.getSkinType();
|
||||
}
|
||||
|
||||
public SkinModel getEaglerSkinModel() {
|
||||
NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
|
||||
return networkplayerinfo == null ? SkinModel.STEVE : networkplayerinfo.getEaglerSkinModel();
|
||||
}
|
||||
|
||||
public float getFovModifier() {
|
||||
float f = 1.0F;
|
||||
if (this.capabilities.isFlying) {
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ import net.minecraft.util.ResourceLocation;
|
|||
*/
|
||||
public class GuiButton extends Gui {
|
||||
protected static final ResourceLocation buttonTextures = new ResourceLocation("textures/gui/widgets.png");
|
||||
protected int width;
|
||||
protected int height;
|
||||
public int width;
|
||||
public int height;
|
||||
public int xPosition;
|
||||
public int yPosition;
|
||||
public String displayString;
|
||||
|
|
|
|||
|
|
@ -337,4 +337,8 @@ public class GuiChat extends GuiScreen {
|
|||
public boolean doesGuiPauseGame() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean blockPTTKey() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -189,4 +189,8 @@ public class GuiCommandBlock extends GuiScreen {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
public boolean blockPTTKey() {
|
||||
return commandTextField.isFocused();
|
||||
}
|
||||
}
|
||||
|
|
@ -27,6 +27,8 @@ public class GuiCustomizeSkin extends GuiScreen {
|
|||
private final GuiScreen parentScreen;
|
||||
private String title;
|
||||
|
||||
private GuiButton enableFNAWSkinsButton;
|
||||
|
||||
public GuiCustomizeSkin(GuiScreen parentScreenIn) {
|
||||
this.parentScreen = parentScreenIn;
|
||||
}
|
||||
|
|
@ -53,7 +55,10 @@ public class GuiCustomizeSkin extends GuiScreen {
|
|||
++i;
|
||||
}
|
||||
|
||||
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 24 * (i >> 1),
|
||||
this.buttonList.add(enableFNAWSkinsButton = new GuiButton(201, this.width / 2 - 100,
|
||||
this.height / 6 + 10 + 24 * (i >> 1), I18n.format("options.skinCustomisation.enableFNAWSkins") + ": "
|
||||
+ I18n.format(mc.gameSettings.enableFNAWSkins ? "options.on" : "options.off")));
|
||||
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 40 + 24 * (i >> 1),
|
||||
I18n.format("gui.done", new Object[0])));
|
||||
}
|
||||
|
||||
|
|
@ -66,6 +71,11 @@ public class GuiCustomizeSkin extends GuiScreen {
|
|||
if (parGuiButton.id == 200) {
|
||||
this.mc.gameSettings.saveOptions();
|
||||
this.mc.displayGuiScreen(this.parentScreen);
|
||||
} else if (parGuiButton.id == 201) {
|
||||
mc.gameSettings.enableFNAWSkins = !mc.gameSettings.enableFNAWSkins;
|
||||
mc.getRenderManager().setEnableFNAWSkins(mc.getEnableFNAWSkins());
|
||||
enableFNAWSkinsButton.displayString = I18n.format("options.skinCustomisation.enableFNAWSkins") + ": "
|
||||
+ I18n.format(mc.gameSettings.enableFNAWSkins ? "options.on" : "options.off");
|
||||
} else if (parGuiButton instanceof GuiCustomizeSkin.ButtonPart) {
|
||||
EnumPlayerModelParts enumplayermodelparts = ((GuiCustomizeSkin.ButtonPart) parGuiButton).playerModelParts;
|
||||
this.mc.gameSettings.switchModelPartEnabled(enumplayermodelparts);
|
||||
|
|
|
|||
|
|
@ -285,6 +285,10 @@ public class GuiIngame extends Gui {
|
|||
this.renderScoreboard(scoreobjective1, scaledresolution);
|
||||
}
|
||||
|
||||
if (this.mc.currentScreen == null) {
|
||||
this.mc.voiceOverlay.drawOverlay();
|
||||
}
|
||||
|
||||
GlStateManager.enableBlend();
|
||||
GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, 1, 0);
|
||||
GlStateManager.disableAlpha();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
package net.minecraft.client.gui;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
|
||||
|
|
@ -8,6 +9,8 @@ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANNotSupported;
|
|||
import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiShareToLan;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController;
|
||||
import net.lax1dude.eaglercraft.v1_8.update.GuiUpdateCheckerOverlay;
|
||||
import net.lax1dude.eaglercraft.v1_8.voice.GuiVoiceMenu;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
import net.minecraft.client.gui.achievement.GuiAchievements;
|
||||
import net.minecraft.client.gui.achievement.GuiStats;
|
||||
|
|
@ -44,9 +47,13 @@ public class GuiIngameMenu extends GuiScreen {
|
|||
boolean hasSentAutoSave = !SingleplayerServerController.isWorldRunning();
|
||||
|
||||
private GuiUpdateCheckerOverlay updateCheckerOverlay;
|
||||
private GuiVoiceMenu voiceMenu;
|
||||
|
||||
public GuiIngameMenu() {
|
||||
updateCheckerOverlay = new GuiUpdateCheckerOverlay(true, this);
|
||||
if (EagRuntime.getConfiguration().isAllowVoiceClient()) {
|
||||
voiceMenu = new GuiVoiceMenu(this);
|
||||
}
|
||||
}
|
||||
|
||||
/**+
|
||||
|
|
@ -139,6 +146,10 @@ public class GuiIngameMenu extends GuiScreen {
|
|||
*/
|
||||
public void updateScreen() {
|
||||
super.updateScreen();
|
||||
if (EagRuntime.getConfiguration().isAllowVoiceClient()
|
||||
&& (!mc.isSingleplayer() || LANServerController.isHostingLAN())) {
|
||||
voiceMenu.updateScreen();
|
||||
}
|
||||
if (Mouse.isActuallyGrabbed()) {
|
||||
Mouse.setGrabbed(false);
|
||||
}
|
||||
|
|
@ -156,37 +167,67 @@ public class GuiIngameMenu extends GuiScreen {
|
|||
this.updateCheckerOverlay.drawScreen(i, j, f);
|
||||
|
||||
if (LANServerController.isLANOpen()) {
|
||||
int offset = this.updateCheckerOverlay.getSharedWorldInfoYOffset();
|
||||
String str = I18n.format("lanServer.pauseMenu0");
|
||||
drawString(fontRendererObj, str, 6, 32, 0xFFFF55);
|
||||
drawString(fontRendererObj, str, 6, 10 + offset, 0xFFFF55);
|
||||
|
||||
if (mc.gameSettings.hideJoinCode) {
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(7.0f, 47.0f, 0.0f);
|
||||
GlStateManager.translate(7.0f, 25.0f + offset, 0.0f);
|
||||
GlStateManager.scale(0.75f, 0.75f, 0.75f);
|
||||
str = I18n.format("lanServer.showCode");
|
||||
int w = fontRendererObj.getStringWidth(str);
|
||||
boolean hover = i > 6 && i < 8 + w * 3 / 4 && j > 46 && j < 47 + 8;
|
||||
boolean hover = i > 4 && i < 8 + w * 3 / 4 && j > 24 + offset && j < 25 + offset + 8;
|
||||
drawString(fontRendererObj, EnumChatFormatting.UNDERLINE + str, 0, 0, hover ? 0xEEEEAA : 0xCCCC55);
|
||||
GlStateManager.popMatrix();
|
||||
} else {
|
||||
int w = fontRendererObj.getStringWidth(str);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.translate(6 + w + 3, 33, 0.0f);
|
||||
GlStateManager.translate(6 + w + 3, 11 + offset, 0.0f);
|
||||
GlStateManager.scale(0.75f, 0.75f, 0.75f);
|
||||
str = I18n.format("lanServer.hideCode");
|
||||
int w2 = fontRendererObj.getStringWidth(str);
|
||||
boolean hover = i > 6 + w + 2 && i < 6 + w + 3 + w2 * 3 / 4 && j > 33 - 1 && j < 33 + 6;
|
||||
boolean hover = i > 6 + w + 2 && i < 6 + w + 3 + w2 * 3 / 4 && j > 11 + offset - 1
|
||||
&& j < 11 + offset + 6;
|
||||
drawString(fontRendererObj, EnumChatFormatting.UNDERLINE + str, 0, 0, hover ? 0xEEEEAA : 0xCCCC55);
|
||||
GlStateManager.popMatrix();
|
||||
|
||||
drawString(fontRendererObj, EnumChatFormatting.GRAY + I18n.format("lanServer.pauseMenu1") + " "
|
||||
+ EnumChatFormatting.RESET + LANServerController.getCurrentURI(), 6, 47, 0xFFFFFF);
|
||||
drawString(fontRendererObj, EnumChatFormatting.GRAY + I18n.format("lanServer.pauseMenu2") + " "
|
||||
+ EnumChatFormatting.RESET + LANServerController.getCurrentCode(), 6, 57, 0xFFFFFF);
|
||||
drawString(
|
||||
fontRendererObj, EnumChatFormatting.GRAY + I18n.format("lanServer.pauseMenu1") + " "
|
||||
+ EnumChatFormatting.RESET + LANServerController.getCurrentURI(),
|
||||
6, 25 + offset, 0xFFFFFF);
|
||||
drawString(
|
||||
fontRendererObj, EnumChatFormatting.GRAY + I18n.format("lanServer.pauseMenu2") + " "
|
||||
+ EnumChatFormatting.RESET + LANServerController.getCurrentCode(),
|
||||
6, 35 + offset, 0xFFFFFF);
|
||||
}
|
||||
}
|
||||
|
||||
super.drawScreen(i, j, f);
|
||||
try {
|
||||
if (EagRuntime.getConfiguration().isAllowVoiceClient()
|
||||
&& (!mc.isSingleplayer() || LANServerController.isHostingLAN())) {
|
||||
if (voiceMenu.isBlockingInput()) {
|
||||
super.drawScreen(0, 0, f);
|
||||
} else {
|
||||
super.drawScreen(i, j, f);
|
||||
}
|
||||
voiceMenu.drawScreen(i, j, f);
|
||||
} else {
|
||||
super.drawScreen(i, j, f);
|
||||
}
|
||||
} catch (GuiVoiceMenu.AbortedException ex) {
|
||||
}
|
||||
}
|
||||
|
||||
protected void keyTyped(char par1, int par2) {
|
||||
try {
|
||||
if (EagRuntime.getConfiguration().isAllowVoiceClient()
|
||||
&& (!mc.isSingleplayer() || LANServerController.isHostingLAN())) {
|
||||
voiceMenu.keyTyped(par1, par2);
|
||||
}
|
||||
super.keyTyped(par1, par2);
|
||||
} catch (GuiVoiceMenu.AbortedException ex) {
|
||||
}
|
||||
}
|
||||
|
||||
public void confirmClicked(boolean par1, int par2) {
|
||||
|
|
@ -201,11 +242,20 @@ public class GuiIngameMenu extends GuiScreen {
|
|||
}
|
||||
|
||||
protected void mouseClicked(int par1, int par2, int par3) {
|
||||
try {
|
||||
if (EagRuntime.getConfiguration().isAllowVoiceClient()
|
||||
&& (!mc.isSingleplayer() || LANServerController.isHostingLAN())) {
|
||||
voiceMenu.mouseClicked(par1, par2, par3);
|
||||
}
|
||||
} catch (GuiVoiceMenu.AbortedException ex) {
|
||||
return;
|
||||
}
|
||||
if (par3 == 0) {
|
||||
int offset = this.updateCheckerOverlay.getSharedWorldInfoYOffset();
|
||||
if (mc.gameSettings.hideJoinCode) {
|
||||
String str = I18n.format("lanServer.showCode");
|
||||
int w = fontRendererObj.getStringWidth(str);
|
||||
if (par1 > 6 && par1 < 8 + w * 3 / 4 && par2 > 46 && par2 < 47 + 8) {
|
||||
if (par1 > 4 && par1 < 8 + w * 3 / 4 && par2 > 24 + offset && par2 < 25 + offset + 8) {
|
||||
mc.gameSettings.hideJoinCode = false;
|
||||
this.mc.getSoundHandler()
|
||||
.playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
|
|
@ -216,7 +266,8 @@ public class GuiIngameMenu extends GuiScreen {
|
|||
int w = fontRendererObj.getStringWidth(str);
|
||||
str = I18n.format("lanServer.hideCode");
|
||||
int w2 = fontRendererObj.getStringWidth(str);
|
||||
if (par1 > 6 + w + 2 && par1 < 6 + w + 3 + w2 * 3 / 4 && par2 > 33 - 1 && par2 < 33 + 6) {
|
||||
if (par1 > 6 + w + 2 && par1 < 6 + w + 3 + w2 * 3 / 4 && par2 > 11 + offset - 1
|
||||
&& par2 < 11 + offset + 6) {
|
||||
mc.gameSettings.hideJoinCode = true;
|
||||
this.mc.getSoundHandler()
|
||||
.playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
|
|
@ -228,4 +279,22 @@ public class GuiIngameMenu extends GuiScreen {
|
|||
this.updateCheckerOverlay.mouseClicked(par1, par2, par3);
|
||||
super.mouseClicked(par1, par2, par3);
|
||||
}
|
||||
|
||||
public void setWorldAndResolution(Minecraft par1Minecraft, int par2, int par3) {
|
||||
super.setWorldAndResolution(par1Minecraft, par2, par3);
|
||||
if (EagRuntime.getConfiguration().isAllowVoiceClient()) {
|
||||
voiceMenu.setResolution(par1Minecraft, par2, par3);
|
||||
}
|
||||
}
|
||||
|
||||
protected void mouseReleased(int par1, int par2, int par3) {
|
||||
try {
|
||||
if (EagRuntime.getConfiguration().isAllowVoiceClient()
|
||||
&& (!mc.isSingleplayer() || LANServerController.isHostingLAN())) {
|
||||
voiceMenu.mouseReleased(par1, par2, par3);
|
||||
}
|
||||
super.mouseReleased(par1, par2, par3);
|
||||
} catch (GuiVoiceMenu.AbortedException ex) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -133,7 +133,7 @@ public class GuiOptions extends GuiScreen implements GuiYesNoCallback {
|
|||
chatcomponenttext.appendText(": ");
|
||||
chatcomponenttext.appendSibling(
|
||||
new ChatComponentTranslation(parEnumDifficulty.getDifficultyResourceKey(), new Object[0]));
|
||||
return chatcomponenttext.getFormattedText();
|
||||
return chatcomponenttext.getUnformattedText();
|
||||
}
|
||||
|
||||
public void confirmClicked(boolean flag, int i) {
|
||||
|
|
|
|||
|
|
@ -224,4 +224,8 @@ public class GuiRepair extends GuiContainer implements ICrafting {
|
|||
|
||||
public void func_175173_a(Container parContainer, IInventory parIInventory) {
|
||||
}
|
||||
|
||||
public boolean blockPTTKey() {
|
||||
return nameField.isFocused();
|
||||
}
|
||||
}
|
||||
|
|
@ -673,4 +673,8 @@ public abstract class GuiScreen extends Gui implements GuiYesNoCallback {
|
|||
public boolean shouldHangupIntegratedServer() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean blockPTTKey() {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
@ -551,4 +551,8 @@ public class GuiScreenBook extends GuiScreen {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public boolean blockPTTKey() {
|
||||
return this.bookIsUnsigned;
|
||||
}
|
||||
}
|
||||
|
|
@ -30,16 +30,20 @@ public class GuiVideoSettings extends GuiScreen {
|
|||
protected String screenTitle = "Video Settings";
|
||||
private GameSettings guiGameSettings;
|
||||
private GuiListExtended optionsRowList;
|
||||
/**
|
||||
* + An array of all of GameSettings.Options's video options.
|
||||
*/
|
||||
/**+
|
||||
* An array of all of GameSettings.Options's video options.
|
||||
*/
|
||||
private static final GameSettings.Options[] videoOptions = new GameSettings.Options[] {
|
||||
GameSettings.Options.GRAPHICS, GameSettings.Options.RENDER_DISTANCE, GameSettings.Options.AMBIENT_OCCLUSION,
|
||||
GameSettings.Options.FRAMERATE_LIMIT, GameSettings.Options.ANAGLYPH, GameSettings.Options.VIEW_BOBBING,
|
||||
GameSettings.Options.GUI_SCALE, GameSettings.Options.GAMMA, GameSettings.Options.RENDER_CLOUDS,
|
||||
GameSettings.Options.PARTICLES, GameSettings.Options.FXAA, GameSettings.Options.MIPMAP_LEVELS,
|
||||
GameSettings.Options.BLOCK_ALTERNATIVES, GameSettings.Options.ENTITY_SHADOWS, GameSettings.Options.FOG,
|
||||
GameSettings.Options.FULLSCREEN, GameSettings.Options.HUD_FPS, GameSettings.Options.HUD_COORDS,
|
||||
GameSettings.Options.FRAMERATE_LIMIT, GameSettings.Options.EAGLER_VSYNC, GameSettings.Options.ANAGLYPH,
|
||||
GameSettings.Options.VIEW_BOBBING, GameSettings.Options.GUI_SCALE, GameSettings.Options.GAMMA,
|
||||
GameSettings.Options.RENDER_CLOUDS, GameSettings.Options.PARTICLES, GameSettings.Options.FXAA,
|
||||
GameSettings.Options.MIPMAP_LEVELS, GameSettings.Options.BLOCK_ALTERNATIVES,
|
||||
GameSettings.Options.ENTITY_SHADOWS, GameSettings.Options.FOG, GameSettings.Options.FULLSCREEN,
|
||||
GameSettings.Options.FNAW_SKINS, GameSettings.Options.HUD_FPS, GameSettings.Options.HUD_COORDS,
|
||||
GameSettings.Options.HUD_PLAYER, GameSettings.Options.HUD_STATS, GameSettings.Options.HUD_WORLD,
|
||||
GameSettings.Options.HUD_24H, GameSettings.Options.CHUNK_FIX };
|
||||
|
||||
|
|
@ -97,6 +101,7 @@ public class GuiVideoSettings extends GuiScreen {
|
|||
int j = scaledresolution.getScaledWidth();
|
||||
int k = scaledresolution.getScaledHeight();
|
||||
this.setWorldAndResolution(this.mc, j, k);
|
||||
this.mc.voiceOverlay.setResolution(j, k);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -854,4 +854,8 @@ public class GuiContainerCreative extends InventoryEffectRenderer {
|
|||
return this.slot.isHere(inv, slotIn);
|
||||
}
|
||||
}
|
||||
|
||||
public boolean blockPTTKey() {
|
||||
return searchField.isFocused();
|
||||
}
|
||||
}
|
||||
|
|
@ -172,4 +172,8 @@ public class GuiEditSign extends GuiScreen {
|
|||
GlStateManager.popMatrix();
|
||||
super.drawScreen(i, j, f);
|
||||
}
|
||||
|
||||
public boolean blockPTTKey() {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,7 @@
|
|||
package net.minecraft.client.model;
|
||||
|
||||
import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.entity.Entity;
|
||||
|
||||
|
|
@ -119,7 +121,14 @@ public class ModelPlayer extends ModelBiped {
|
|||
}
|
||||
|
||||
public void renderCape(float parFloat1) {
|
||||
GlStateManager.matrixMode(GL_TEXTURE);
|
||||
GlStateManager.pushMatrix();
|
||||
GlStateManager.scale(2.0f, 1.0f, 1.0f);
|
||||
GlStateManager.matrixMode(GL_MODELVIEW);
|
||||
this.bipedCape.render(parFloat1);
|
||||
GlStateManager.matrixMode(GL_TEXTURE);
|
||||
GlStateManager.popMatrix();
|
||||
GlStateManager.matrixMode(GL_MODELVIEW);
|
||||
}
|
||||
|
||||
/**+
|
||||
|
|
|
|||
|
|
@ -313,6 +313,7 @@ public class PlayerControllerMP {
|
|||
.closeChannel(new ChatComponentText("Exception thrown: " + ex.toString()));
|
||||
}
|
||||
this.netClientHandler.getSkinCache().flush();
|
||||
this.netClientHandler.getCapeCache().flush();
|
||||
} else {
|
||||
this.netClientHandler.getNetworkManager().checkDisconnected();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,12 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
|||
import com.google.common.collect.Maps;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
|
||||
import net.lax1dude.eaglercraft.v1_8.profile.CapePackets;
|
||||
import net.lax1dude.eaglercraft.v1_8.profile.ServerCapeCache;
|
||||
import net.lax1dude.eaglercraft.v1_8.profile.ServerSkinCache;
|
||||
import net.lax1dude.eaglercraft.v1_8.profile.SkinPackets;
|
||||
import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.lan.LANClientNetworkManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.socket.ClientIntegratedServerNetworkManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.update.UpdateService;
|
||||
import net.lax1dude.eaglercraft.v1_8.voice.VoiceClientController;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFolderResourcePack;
|
||||
|
|
@ -253,6 +256,8 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
|||
*/
|
||||
private final EaglercraftRandom avRandomizer = new EaglercraftRandom();
|
||||
private final ServerSkinCache skinCache;
|
||||
private final ServerCapeCache capeCache;
|
||||
public boolean currentFNAWSkinAllowedState = true;
|
||||
|
||||
public NetHandlerPlayClient(Minecraft mcIn, GuiScreen parGuiScreen, EaglercraftNetworkManager parNetworkManager,
|
||||
GameProfile parGameProfile) {
|
||||
|
|
@ -261,6 +266,7 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
|||
this.netManager = parNetworkManager;
|
||||
this.profile = parGameProfile;
|
||||
this.skinCache = new ServerSkinCache(parNetworkManager, mcIn.getTextureManager());
|
||||
this.capeCache = new ServerCapeCache(parNetworkManager, mcIn.getTextureManager());
|
||||
this.isIntegratedServer = (parNetworkManager instanceof ClientIntegratedServerNetworkManager)
|
||||
|| (parNetworkManager instanceof LANClientNetworkManager);
|
||||
}
|
||||
|
|
@ -272,12 +278,17 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
|||
public void cleanup() {
|
||||
this.clientWorldController = null;
|
||||
this.skinCache.destroy();
|
||||
this.capeCache.destroy();
|
||||
}
|
||||
|
||||
public ServerSkinCache getSkinCache() {
|
||||
return this.skinCache;
|
||||
}
|
||||
|
||||
public ServerCapeCache getCapeCache() {
|
||||
return this.capeCache;
|
||||
}
|
||||
|
||||
/**+
|
||||
* Registers some server properties
|
||||
* (gametype,hardcore-mode,terraintype,difficulty,player limit),
|
||||
|
|
@ -301,6 +312,10 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
|||
this.gameController.gameSettings.sendSettingsToServer();
|
||||
this.netManager.sendPacket(new C17PacketCustomPayload("MC|Brand",
|
||||
(new PacketBuffer(Unpooled.buffer())).writeString(ClientBrandRetriever.getClientModName())));
|
||||
if (VoiceClientController.isClientSupported()) {
|
||||
VoiceClientController.initializeVoiceClient((pkt) -> this.netManager
|
||||
.sendPacket(new C17PacketCustomPayload(VoiceClientController.SIGNAL_CHANNEL, pkt)));
|
||||
}
|
||||
}
|
||||
|
||||
/**+
|
||||
|
|
@ -723,6 +738,9 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
|||
* describing the reason for termination
|
||||
*/
|
||||
public void onDisconnect(IChatComponent ichatcomponent) {
|
||||
VoiceClientController.handleServerDisconnect();
|
||||
Minecraft.getMinecraft().getRenderManager()
|
||||
.setEnableFNAWSkins(this.gameController.gameSettings.enableFNAWSkins);
|
||||
if (this.gameController.theWorld != null) {
|
||||
this.gameController.loadWorld((WorldClient) null);
|
||||
}
|
||||
|
|
@ -1373,6 +1391,7 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
|||
EaglercraftUUID uuid = s38packetplayerlistitem$addplayerdata.getProfile().getId();
|
||||
this.playerInfoMap.remove(uuid);
|
||||
this.skinCache.evictSkin(uuid);
|
||||
this.capeCache.evictCape(uuid);
|
||||
} else {
|
||||
NetworkPlayerInfo networkplayerinfo = (NetworkPlayerInfo) this.playerInfoMap
|
||||
.get(s38packetplayerlistitem$addplayerdata.getProfile().getId());
|
||||
|
|
@ -1547,6 +1566,13 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
|||
logger.error("Couldn't read EAG|Skins-1.8 packet!");
|
||||
logger.error(e);
|
||||
}
|
||||
} else if ("EAG|Capes-1.8".equals(packetIn.getChannelName())) {
|
||||
try {
|
||||
CapePackets.readPluginMessage(packetIn.getBufferData(), capeCache);
|
||||
} catch (IOException e) {
|
||||
logger.error("Couldn't read EAG|Capes-1.8 packet!");
|
||||
logger.error(e);
|
||||
}
|
||||
} else if ("EAG|UpdateCert-1.8".equals(packetIn.getChannelName())) {
|
||||
if (EagRuntime.getConfiguration().allowUpdateSvc()) {
|
||||
try {
|
||||
|
|
@ -1559,8 +1585,15 @@ public class NetHandlerPlayClient implements INetHandlerPlayClient {
|
|||
logger.error(e);
|
||||
}
|
||||
}
|
||||
} else if (VoiceClientController.SIGNAL_CHANNEL.equals(packetIn.getChannelName())) {
|
||||
if (VoiceClientController.isClientSupported()) {
|
||||
VoiceClientController.handleVoiceSignalPacket(packetIn.getBufferData());
|
||||
}
|
||||
} else if ("EAG|FNAWSEn-1.8".equals(packetIn.getChannelName())) {
|
||||
this.currentFNAWSkinAllowedState = packetIn.getBufferData().readBoolean();
|
||||
Minecraft.getMinecraft().getRenderManager().setEnableFNAWSkins(
|
||||
this.currentFNAWSkinAllowedState && Minecraft.getMinecraft().gameSettings.enableFNAWSkins);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**+
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package net.minecraft.client.network;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
|
||||
import net.lax1dude.eaglercraft.v1_8.profile.SkinModel;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.network.play.server.S38PacketPlayerListItem;
|
||||
import net.minecraft.scoreboard.ScorePlayerTeam;
|
||||
|
|
@ -84,12 +85,17 @@ public class NetworkPlayerInfo {
|
|||
.getSkinModel().profileSkinType;
|
||||
}
|
||||
|
||||
public SkinModel getEaglerSkinModel() {
|
||||
return Minecraft.getMinecraft().getNetHandler().getSkinCache().getSkin(this.gameProfile).getSkinModel();
|
||||
}
|
||||
|
||||
public ResourceLocation getLocationSkin() {
|
||||
return Minecraft.getMinecraft().getNetHandler().getSkinCache().getSkin(this.gameProfile).getResourceLocation();
|
||||
}
|
||||
|
||||
public ResourceLocation getLocationCape() {
|
||||
return null;
|
||||
return Minecraft.getMinecraft().getNetHandler().getCapeCache().getCape(this.gameProfile.getId())
|
||||
.getResourceLocation();
|
||||
}
|
||||
|
||||
public ScorePlayerTeam getPlayerTeam() {
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ShadersRenderPassFuture
|
|||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui.GuiShaderConfig;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.EmissiveItems;
|
||||
import net.lax1dude.eaglercraft.v1_8.vector.Vector4f;
|
||||
import net.lax1dude.eaglercraft.v1_8.voice.VoiceTagRenderer;
|
||||
import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBed;
|
||||
|
|
@ -173,6 +174,8 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
|||
private GameOverlayFramebuffer overlayFramebuffer;
|
||||
private float eagPartialTicks = 0.0f;
|
||||
|
||||
public float currentProjMatrixFOV = 0.0f;
|
||||
|
||||
public EntityRenderer(Minecraft mcIn, IResourceManager resourceManagerIn) {
|
||||
this.useShader = false;
|
||||
this.frameCount = 0;
|
||||
|
|
@ -413,7 +416,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
|||
Entity entity = this.mc.getRenderViewEntity();
|
||||
float f = 70.0F;
|
||||
if (parFlag) {
|
||||
f = this.mc.gameSettings.keyBindZoomCamera.isKeyDown() ? 17.0f : this.mc.gameSettings.fovSetting;
|
||||
f = this.mc.isZoomKey ? this.mc.adjustedZoomValue : this.mc.gameSettings.fovSetting;
|
||||
f = f * (this.fovModifierHandPrev + (this.fovModifierHand - this.fovModifierHandPrev) * partialTicks);
|
||||
}
|
||||
|
||||
|
|
@ -594,7 +597,7 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
|||
}
|
||||
|
||||
float farPlane = this.farPlaneDistance * 2.0f * MathHelper.SQRT_2;
|
||||
GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true),
|
||||
GlStateManager.gluPerspective(currentProjMatrixFOV = this.getFOVModifier(partialTicks, true),
|
||||
(float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, farPlane);
|
||||
DeferredStateManager.setGBufferNearFarPlanes(0.05f, farPlane);
|
||||
GlStateManager.matrixMode(GL_MODELVIEW);
|
||||
|
|
@ -1015,6 +1018,8 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
|||
});
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
this.mc.voiceOverlay.drawOverlay();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1087,6 +1092,8 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
|||
EffectPipelineFXAA.begin(this.mc.displayWidth, this.mc.displayHeight);
|
||||
}
|
||||
|
||||
VoiceTagRenderer.clearTagsDrawnSet();
|
||||
|
||||
GlStateManager.enableDepth();
|
||||
GlStateManager.enableAlpha();
|
||||
GlStateManager.alphaFunc(GL_GREATER, 0.5F);
|
||||
|
|
@ -1149,14 +1156,14 @@ public class EntityRenderer implements IResourceManagerReloadListener {
|
|||
this.mc.mcProfiler.endStartSection("sky");
|
||||
GlStateManager.matrixMode(GL_PROJECTION);
|
||||
GlStateManager.loadIdentity();
|
||||
GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true),
|
||||
(float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F, this.farPlaneDistance * 4.0F);
|
||||
float vigg = this.getFOVModifier(partialTicks, true);
|
||||
GlStateManager.gluPerspective(vigg, (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F,
|
||||
this.farPlaneDistance * 4.0F);
|
||||
GlStateManager.matrixMode(GL_MODELVIEW);
|
||||
renderglobal.renderSky(partialTicks, pass);
|
||||
GlStateManager.matrixMode(GL_PROJECTION);
|
||||
GlStateManager.loadIdentity();
|
||||
GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true),
|
||||
(float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F,
|
||||
GlStateManager.gluPerspective(vigg, (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F,
|
||||
this.farPlaneDistance * MathHelper.SQRT_2);
|
||||
GlStateManager.matrixMode(GL_MODELVIEW);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,6 +161,7 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene
|
|||
private double lastViewEntityZ = Double.MIN_VALUE;
|
||||
private double lastViewEntityPitch = Double.MIN_VALUE;
|
||||
private double lastViewEntityYaw = Double.MIN_VALUE;
|
||||
private float lastViewProjMatrixFOV = Float.MIN_VALUE;
|
||||
private final ChunkUpdateManager renderDispatcher = new ChunkUpdateManager();
|
||||
private ChunkRenderContainer renderContainer;
|
||||
private int renderDistanceChunks = -1;
|
||||
|
|
@ -857,12 +858,14 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene
|
|||
|| viewEntity.posX != this.lastViewEntityX || viewEntity.posY != this.lastViewEntityY
|
||||
|| viewEntity.posZ != this.lastViewEntityZ
|
||||
|| (double) viewEntity.rotationPitch != this.lastViewEntityPitch
|
||||
|| (double) viewEntity.rotationYaw != this.lastViewEntityYaw;
|
||||
|| (double) viewEntity.rotationYaw != this.lastViewEntityYaw
|
||||
|| this.mc.entityRenderer.currentProjMatrixFOV != this.lastViewProjMatrixFOV;
|
||||
this.lastViewEntityX = viewEntity.posX;
|
||||
this.lastViewEntityY = viewEntity.posY;
|
||||
this.lastViewEntityZ = viewEntity.posZ;
|
||||
this.lastViewEntityPitch = (double) viewEntity.rotationPitch;
|
||||
this.lastViewEntityYaw = (double) viewEntity.rotationYaw;
|
||||
this.lastViewProjMatrixFOV = this.mc.entityRenderer.currentProjMatrixFOV;
|
||||
boolean flag = this.debugFixedClippingHelper != null;
|
||||
if (!flag && this.displayListEntitiesDirty) {
|
||||
this.displayListEntitiesDirty = false;
|
||||
|
|
|
|||
|
|
@ -8,8 +8,12 @@ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
|||
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.NameTagRenderer;
|
||||
import net.lax1dude.eaglercraft.v1_8.voice.EnumVoiceChannelStatus;
|
||||
import net.lax1dude.eaglercraft.v1_8.voice.VoiceClientController;
|
||||
import net.lax1dude.eaglercraft.v1_8.voice.VoiceTagRenderer;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.EntityOtherPlayerMP;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.renderer.Tessellator;
|
||||
import net.minecraft.client.renderer.culling.ICamera;
|
||||
|
|
@ -126,6 +130,9 @@ public abstract class Render<T extends Entity> {
|
|||
* partialTickTime
|
||||
*/
|
||||
private void renderEntityOnFire(Entity entity, double x, double y, double z, float partialTicks) {
|
||||
if (entity.width == 0 || entity.height == 0) {
|
||||
return;
|
||||
}
|
||||
GlStateManager.disableLighting();
|
||||
TextureMap texturemap = Minecraft.getMinecraft().getTextureMapBlocks();
|
||||
EaglerTextureAtlasSprite textureatlassprite = texturemap.getAtlasSprite("minecraft:blocks/fire_layer_0");
|
||||
|
|
@ -386,6 +393,13 @@ public abstract class Render<T extends Entity> {
|
|||
GlStateManager.enableLighting();
|
||||
GlStateManager.disableBlend();
|
||||
GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
|
||||
if (entityIn instanceof EntityOtherPlayerMP) {
|
||||
if (VoiceClientController.getVoiceStatus() == EnumVoiceChannelStatus.CONNECTED) {
|
||||
VoiceTagRenderer.renderVoiceNameTag(Minecraft.getMinecraft(), (EntityOtherPlayerMP) entityIn, b0);
|
||||
}
|
||||
}
|
||||
|
||||
GlStateManager.popMatrix();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,9 +8,11 @@ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
|||
import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.profile.RenderHighPoly;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockBed;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
import net.minecraft.client.Minecraft;
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraft.client.gui.FontRenderer;
|
||||
import net.minecraft.client.model.ModelChicken;
|
||||
|
|
@ -128,6 +130,7 @@ public class RenderManager {
|
|||
private Map<Class<? extends Entity>, Render<? extends Entity>> entityRenderMap = Maps.newHashMap();
|
||||
private Map<String, RenderPlayer> skinMap = Maps.newHashMap();
|
||||
private RenderPlayer playerRenderer;
|
||||
private RenderPlayer eaglerRenderer;
|
||||
private FontRenderer textRenderer;
|
||||
private double renderPosX;
|
||||
private double renderPosY;
|
||||
|
|
@ -215,6 +218,14 @@ public class RenderManager {
|
|||
this.skinMap.put("default", this.playerRenderer);
|
||||
this.skinMap.put("slim", new RenderPlayer(this, true, false));
|
||||
this.skinMap.put("zombie", new RenderPlayer(this, false, true));
|
||||
this.eaglerRenderer = new RenderHighPoly(this, this.playerRenderer.getMainModel(),
|
||||
this.playerRenderer.shadowSize);
|
||||
this.skinMap.put("eagler",
|
||||
Minecraft.getMinecraft().gameSettings.enableFNAWSkins ? this.eaglerRenderer : this.playerRenderer);
|
||||
}
|
||||
|
||||
public void setEnableFNAWSkins(boolean en) {
|
||||
this.skinMap.put("eagler", en ? this.eaglerRenderer : this.playerRenderer);
|
||||
}
|
||||
|
||||
public void setRenderPosition(double renderPosXIn, double renderPosYIn, double renderPosZIn) {
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package net.minecraft.client.renderer.entity;
|
|||
import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
import net.minecraft.client.entity.AbstractClientPlayer;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.model.ModelBase;
|
||||
import net.minecraft.client.model.ModelBiped;
|
||||
import net.minecraft.client.model.ModelPlayer;
|
||||
import net.minecraft.client.model.ModelZombie;
|
||||
|
|
@ -60,6 +61,10 @@ public class RenderPlayer extends RendererLivingEntity<AbstractClientPlayer> {
|
|||
this.addLayer(new LayerCustomHead(this.getMainModel().bipedHead));
|
||||
}
|
||||
|
||||
protected RenderPlayer(RenderManager renderManager, ModelBase modelBase, float size) {
|
||||
super(renderManager, modelBase, size);
|
||||
}
|
||||
|
||||
public ModelBiped getMainModel() {
|
||||
return (ModelBiped) super.getMainModel();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -193,7 +193,8 @@ public abstract class RendererLivingEntity<T extends EntityLivingBase> extends R
|
|||
|
||||
GlStateManager.disableRescaleNormal();
|
||||
} catch (Exception exception) {
|
||||
logger.error("Couldn\'t render entity", exception);
|
||||
logger.error("Couldn\'t render entity");
|
||||
logger.error(exception);
|
||||
}
|
||||
|
||||
GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
|
||||
|
|
|
|||
|
|
@ -57,8 +57,8 @@ public class TextureManager implements ITickable, IResourceManagerReloadListener
|
|||
|
||||
public void bindTexture(ResourceLocation resource) {
|
||||
int glTex;
|
||||
if (resource.cachedPointer != null) {
|
||||
TextureUtil.bindTexture(glTex = ((ITextureObject) resource.cachedPointer).getGlTextureId()); // unsafe, lol
|
||||
if (resource.cachedPointerType == ResourceLocation.CACHED_POINTER_TEXTURE) {
|
||||
TextureUtil.bindTexture(glTex = ((ITextureObject) resource.cachedPointer).getGlTextureId());
|
||||
} else {
|
||||
Object object = (ITextureObject) this.mapTextureObjects.get(resource);
|
||||
if (object == null) {
|
||||
|
|
@ -67,6 +67,7 @@ public class TextureManager implements ITickable, IResourceManagerReloadListener
|
|||
}
|
||||
|
||||
resource.cachedPointer = object;
|
||||
resource.cachedPointerType = ResourceLocation.CACHED_POINTER_TEXTURE;
|
||||
TextureUtil.bindTexture(glTex = ((ITextureObject) object).getGlTextureId());
|
||||
}
|
||||
if (DeferredStateManager.isInDeferredPass()) {
|
||||
|
|
@ -114,15 +115,17 @@ public class TextureManager implements ITickable, IResourceManagerReloadListener
|
|||
throw new ReportedException(crashreport);
|
||||
}
|
||||
|
||||
textureLocation.cachedPointerType = ResourceLocation.CACHED_POINTER_TEXTURE;
|
||||
textureLocation.cachedPointer = textureObj;
|
||||
this.mapTextureObjects.put(textureLocation, textureObj);
|
||||
return flag;
|
||||
}
|
||||
|
||||
public ITextureObject getTexture(ResourceLocation textureLocation) {
|
||||
if (textureLocation.cachedPointer != null) {
|
||||
if (textureLocation.cachedPointerType == ResourceLocation.CACHED_POINTER_TEXTURE) {
|
||||
return (ITextureObject) textureLocation.cachedPointer;
|
||||
} else {
|
||||
textureLocation.cachedPointerType = ResourceLocation.CACHED_POINTER_TEXTURE;
|
||||
return (ITextureObject) (textureLocation.cachedPointer = this.mapTextureObjects.get(textureLocation));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ import java.util.Map;
|
|||
import java.util.Set;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.voice.VoiceClientController;
|
||||
|
||||
import org.json.JSONArray;
|
||||
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
|
|
@ -24,6 +26,7 @@ import net.lax1dude.eaglercraft.v1_8.EaglerZLIB;
|
|||
import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
|
||||
import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
|
|
@ -105,7 +108,7 @@ public class GameSettings {
|
|||
public boolean chatLinksPrompt = true;
|
||||
public float chatOpacity = 1.0F;
|
||||
public boolean snooperEnabled = true;
|
||||
public boolean enableVsync = true;
|
||||
public boolean enableVsync = EagRuntime.getPlatformType() != EnumPlatformType.DESKTOP;
|
||||
public boolean allowBlockAlternatives = true;
|
||||
public boolean reducedDebugInfo = false;
|
||||
public boolean hideServerAddress;
|
||||
|
|
@ -198,6 +201,12 @@ public class GameSettings {
|
|||
public boolean shadersAODisable = false;
|
||||
public EaglerDeferredConfig deferredShaderConf = new EaglerDeferredConfig();
|
||||
public boolean enableUpdateSvc = true;
|
||||
public boolean enableFNAWSkins = true;
|
||||
|
||||
public int voiceListenRadius = 16;
|
||||
public float voiceListenVolume = 0.5f;
|
||||
public float voiceSpeakVolume = 0.5f;
|
||||
public int voicePTTKey = 47; // V
|
||||
|
||||
public GameSettings(Minecraft mcIn) {
|
||||
this.keyBindings = (KeyBinding[]) ArrayUtils.addAll(new KeyBinding[] { this.keyBindAttack, this.keyBindUseItem,
|
||||
|
|
@ -447,6 +456,15 @@ public class GameSettings {
|
|||
this.mc.toggleFullscreen();
|
||||
}
|
||||
|
||||
if (parOptions == GameSettings.Options.FNAW_SKINS) {
|
||||
this.enableFNAWSkins = !this.enableFNAWSkins;
|
||||
this.mc.getRenderManager().setEnableFNAWSkins(this.mc.getEnableFNAWSkins());
|
||||
}
|
||||
|
||||
if (parOptions == GameSettings.Options.EAGLER_VSYNC) {
|
||||
this.enableVsync = !this.enableVsync;
|
||||
}
|
||||
|
||||
this.saveOptions();
|
||||
}
|
||||
|
||||
|
|
@ -519,6 +537,10 @@ public class GameSettings {
|
|||
return this.fog;
|
||||
case FULLSCREEN:
|
||||
return this.mc.isFullScreen();
|
||||
case FNAW_SKINS:
|
||||
return this.enableFNAWSkins;
|
||||
case EAGLER_VSYNC:
|
||||
return this.enableVsync;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
|
|
@ -805,7 +827,7 @@ public class GameSettings {
|
|||
this.snooperEnabled = astring[1].equals("true");
|
||||
}
|
||||
|
||||
if (astring[0].equals("enableVsync")) {
|
||||
if (astring[0].equals("enableVsyncEag")) {
|
||||
this.enableVsync = astring[1].equals("true");
|
||||
}
|
||||
|
||||
|
|
@ -932,7 +954,21 @@ public class GameSettings {
|
|||
this.enableUpdateSvc = astring[1].equals("true");
|
||||
}
|
||||
|
||||
Keyboard.setFunctionKeyModifier(keyBindFunction.getKeyCode());
|
||||
if (astring[0].equals("voiceListenRadius")) {
|
||||
voiceListenRadius = Integer.parseInt(astring[1]);
|
||||
}
|
||||
|
||||
if (astring[0].equals("voiceListenVolume")) {
|
||||
voiceListenVolume = this.parseFloat(astring[1]);
|
||||
}
|
||||
|
||||
if (astring[0].equals("voiceSpeakVolume")) {
|
||||
voiceSpeakVolume = this.parseFloat(astring[1]);
|
||||
}
|
||||
|
||||
if (astring[0].equals("voicePTTKey")) {
|
||||
voicePTTKey = Integer.parseInt(astring[1]);
|
||||
}
|
||||
|
||||
for (SoundCategory soundcategory : SoundCategory._VALUES) {
|
||||
if (astring[0].equals("soundCategory_" + soundcategory.getCategoryName())) {
|
||||
|
|
@ -946,6 +982,10 @@ public class GameSettings {
|
|||
}
|
||||
}
|
||||
|
||||
if (astring[0].equals("enableFNAWSkins")) {
|
||||
this.enableFNAWSkins = astring[1].equals("true");
|
||||
}
|
||||
|
||||
deferredShaderConf.readOption(astring[0], astring[1]);
|
||||
} catch (Exception var8) {
|
||||
logger.warn("Skipping bad option: " + s);
|
||||
|
|
@ -953,8 +993,16 @@ public class GameSettings {
|
|||
}
|
||||
|
||||
KeyBinding.resetKeyBindingArrayAndHash();
|
||||
|
||||
Keyboard.setFunctionKeyModifier(keyBindFunction.getKeyCode());
|
||||
VoiceClientController.setVoiceListenVolume(voiceListenVolume);
|
||||
VoiceClientController.setVoiceSpeakVolume(voiceSpeakVolume);
|
||||
VoiceClientController.setVoiceProximity(voiceListenRadius);
|
||||
if (this.mc.getRenderManager() != null)
|
||||
this.mc.getRenderManager().setEnableFNAWSkins(this.enableFNAWSkins);
|
||||
} catch (Exception exception) {
|
||||
logger.error("Failed to load options", exception);
|
||||
logger.error("Failed to load options");
|
||||
logger.error(exception);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1021,7 +1069,7 @@ public class GameSettings {
|
|||
printwriter.println("chatLinksPrompt:" + this.chatLinksPrompt);
|
||||
printwriter.println("chatOpacity:" + this.chatOpacity);
|
||||
printwriter.println("snooperEnabled:" + this.snooperEnabled);
|
||||
printwriter.println("enableVsync:" + this.enableVsync);
|
||||
printwriter.println("enableVsyncEag:" + this.enableVsync);
|
||||
printwriter.println("hideServerAddress:" + this.hideServerAddress);
|
||||
printwriter.println("advancedItemTooltips:" + this.advancedItemTooltips);
|
||||
printwriter.println("pauseOnLostFocus:" + this.pauseOnLostFocus);
|
||||
|
|
@ -1051,6 +1099,11 @@ public class GameSettings {
|
|||
printwriter.println("fxaa:" + this.fxaa);
|
||||
printwriter.println("shaders:" + this.shaders);
|
||||
printwriter.println("enableUpdateSvc:" + this.enableUpdateSvc);
|
||||
printwriter.println("voiceListenRadius:" + this.voiceListenRadius);
|
||||
printwriter.println("voiceListenVolume:" + this.voiceListenVolume);
|
||||
printwriter.println("voiceSpeakVolume:" + this.voiceSpeakVolume);
|
||||
printwriter.println("voicePTTKey:" + this.voicePTTKey);
|
||||
printwriter.println("enableFNAWSkins:" + this.enableFNAWSkins);
|
||||
|
||||
for (KeyBinding keybinding : this.keyBindings) {
|
||||
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
|
||||
|
|
@ -1073,7 +1126,8 @@ public class GameSettings {
|
|||
printwriter.close();
|
||||
return bao.toByteArray();
|
||||
} catch (Exception exception) {
|
||||
logger.error("Failed to save options", exception);
|
||||
logger.error("Failed to save options");
|
||||
logger.error(exception);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -1182,7 +1236,9 @@ public class GameSettings {
|
|||
HUD_WORLD("options.hud.world", false, true), HUD_PLAYER("options.hud.player", false, true),
|
||||
HUD_24H("options.hud.24h", false, true), CHUNK_FIX("options.chunkFix", false, true),
|
||||
FOG("options.fog", false, true), FXAA("options.fxaa", false, false),
|
||||
FULLSCREEN("options.fullscreen", false, true), FAST_MATH("options.fastMath", false, false);
|
||||
FULLSCREEN("options.fullscreen", false, true),
|
||||
FNAW_SKINS("options.skinCustomisation.enableFNAWSkins", false, true),
|
||||
EAGLER_VSYNC("options.vsync", false, true);
|
||||
|
||||
private final boolean enumFloat;
|
||||
private final boolean enumBoolean;
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ import net.minecraft.util.IntHashMap;
|
|||
import net.minecraft.util.ReportedException;
|
||||
import net.minecraft.world.WorldServer;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.socket.IntegratedServerPlayerNetworkManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.voice.IntegratedVoiceService;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
|
|
@ -1239,6 +1240,15 @@ public class NetHandlerPlayServer implements INetHandlerPlayServer, ITickable {
|
|||
byte[] r = new byte[c17packetcustompayload.getBufferData().readableBytes()];
|
||||
c17packetcustompayload.getBufferData().readBytes(r);
|
||||
((EaglerMinecraftServer) serverController).getSkinService().processPacket(r, playerEntity);
|
||||
} else if ("EAG|Capes-1.8".equals(c17packetcustompayload.getChannelName())) {
|
||||
byte[] r = new byte[c17packetcustompayload.getBufferData().readableBytes()];
|
||||
c17packetcustompayload.getBufferData().readBytes(r);
|
||||
((EaglerMinecraftServer) serverController).getCapeService().processPacket(r, playerEntity);
|
||||
} else if ("EAG|Voice-1.8".equals(c17packetcustompayload.getChannelName())) {
|
||||
IntegratedVoiceService vcs = ((EaglerMinecraftServer) serverController).getVoiceService();
|
||||
if (vcs != null) {
|
||||
vcs.processPacket(c17packetcustompayload.getBufferData(), playerEntity);
|
||||
}
|
||||
} else if ("EAG|MyUpdCert-1.8".equals(c17packetcustompayload.getChannelName())) {
|
||||
if (playerEntity.updateCertificate == null) {
|
||||
PacketBuffer pb = c17packetcustompayload.getBufferData();
|
||||
|
|
|
|||
|
|
@ -30,13 +30,15 @@ import net.minecraft.network.login.INetHandlerLoginServer;
|
|||
public class C00PacketLoginStart implements Packet<INetHandlerLoginServer> {
|
||||
private GameProfile profile;
|
||||
private byte[] skin;
|
||||
private byte[] cape;
|
||||
|
||||
public C00PacketLoginStart() {
|
||||
}
|
||||
|
||||
public C00PacketLoginStart(GameProfile profileIn, byte[] skin) {
|
||||
public C00PacketLoginStart(GameProfile profileIn, byte[] skin, byte[] cape) {
|
||||
this.profile = profileIn;
|
||||
this.skin = skin;
|
||||
this.cape = cape;
|
||||
}
|
||||
|
||||
/**+
|
||||
|
|
@ -45,6 +47,7 @@ public class C00PacketLoginStart implements Packet<INetHandlerLoginServer> {
|
|||
public void readPacketData(PacketBuffer parPacketBuffer) throws IOException {
|
||||
this.profile = new GameProfile((EaglercraftUUID) null, parPacketBuffer.readStringFromBuffer(16));
|
||||
this.skin = parPacketBuffer.readByteArray();
|
||||
this.cape = parPacketBuffer.readableBytes() > 0 ? parPacketBuffer.readByteArray() : null;
|
||||
}
|
||||
|
||||
/**+
|
||||
|
|
@ -53,6 +56,7 @@ public class C00PacketLoginStart implements Packet<INetHandlerLoginServer> {
|
|||
public void writePacketData(PacketBuffer parPacketBuffer) throws IOException {
|
||||
parPacketBuffer.writeString(this.profile.getName());
|
||||
parPacketBuffer.writeByteArray(this.skin);
|
||||
parPacketBuffer.writeByteArray(this.cape);
|
||||
}
|
||||
|
||||
/**+
|
||||
|
|
@ -69,4 +73,8 @@ public class C00PacketLoginStart implements Packet<INetHandlerLoginServer> {
|
|||
public byte[] getSkin() {
|
||||
return this.skin;
|
||||
}
|
||||
|
||||
public byte[] getCape() {
|
||||
return this.cape;
|
||||
}
|
||||
}
|
||||
|
|
@ -60,7 +60,9 @@ import net.minecraft.world.border.WorldBorder;
|
|||
import net.minecraft.world.demo.DemoWorldManager;
|
||||
import net.minecraft.world.storage.IPlayerFileData;
|
||||
import net.minecraft.world.storage.WorldInfo;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerMinecraftServer;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.socket.IntegratedServerPlayerNetworkManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.voice.IntegratedVoiceService;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
|
||||
|
|
@ -347,6 +349,13 @@ public abstract class ServerConfigurationManager {
|
|||
this.playerStatFiles.remove(entityplayermp.getName());
|
||||
}
|
||||
|
||||
((EaglerMinecraftServer) mcServer).getSkinService().unregisterPlayer(uuid);
|
||||
((EaglerMinecraftServer) mcServer).getCapeService().unregisterPlayer(uuid);
|
||||
IntegratedVoiceService vcs = ((EaglerMinecraftServer) mcServer).getVoiceService();
|
||||
if (vcs != null) {
|
||||
vcs.handlePlayerLoggedOut(playerIn);
|
||||
}
|
||||
|
||||
this.sendPacketToAllPlayers(new S38PacketPlayerListItem(S38PacketPlayerListItem.Action.REMOVE_PLAYER,
|
||||
new EntityPlayerMP[] { playerIn }));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ import net.minecraft.util.ChatComponentText;
|
|||
import net.minecraft.util.IChatComponent;
|
||||
import net.minecraft.util.ITickable;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.socket.IntegratedServerPlayerNetworkManager;
|
||||
import net.lax1dude.eaglercraft.v1_8.sp.server.voice.IntegratedVoiceService;
|
||||
|
||||
import org.apache.commons.lang3.Validate;
|
||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
|
|
@ -52,6 +53,7 @@ public class NetHandlerLoginServer implements INetHandlerLoginServer, ITickable
|
|||
private int connectionTimer;
|
||||
private GameProfile loginGameProfile;
|
||||
private byte[] loginSkinPacket;
|
||||
private byte[] loginCapePacket;
|
||||
private String serverId = "";
|
||||
private EntityPlayerMP field_181025_l;
|
||||
|
||||
|
|
@ -77,6 +79,14 @@ public class NetHandlerLoginServer implements INetHandlerLoginServer, ITickable
|
|||
this.field_181025_l);
|
||||
((EaglerMinecraftServer) field_181025_l.mcServer).getSkinService()
|
||||
.processLoginPacket(this.loginSkinPacket, field_181025_l);
|
||||
if (this.loginCapePacket != null) {
|
||||
((EaglerMinecraftServer) field_181025_l.mcServer).getCapeService()
|
||||
.processLoginPacket(this.loginCapePacket, field_181025_l);
|
||||
}
|
||||
IntegratedVoiceService svc = ((EaglerMinecraftServer) field_181025_l.mcServer).getVoiceService();
|
||||
if (svc != null) {
|
||||
svc.handlePlayerLoggedIn(entityplayermp);
|
||||
}
|
||||
this.field_181025_l = null;
|
||||
}
|
||||
}
|
||||
|
|
@ -117,6 +127,14 @@ public class NetHandlerLoginServer implements INetHandlerLoginServer, ITickable
|
|||
this.server.getConfigurationManager().initializeConnectionToPlayer(this.networkManager, entityplayermp);
|
||||
((EaglerMinecraftServer) entityplayermp.mcServer).getSkinService()
|
||||
.processLoginPacket(this.loginSkinPacket, entityplayermp);
|
||||
if (this.loginCapePacket != null) {
|
||||
((EaglerMinecraftServer) entityplayermp.mcServer).getCapeService()
|
||||
.processLoginPacket(this.loginCapePacket, entityplayermp);
|
||||
}
|
||||
IntegratedVoiceService svc = ((EaglerMinecraftServer) entityplayermp.mcServer).getVoiceService();
|
||||
if (svc != null) {
|
||||
svc.handlePlayerLoggedIn(entityplayermp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -141,6 +159,7 @@ public class NetHandlerLoginServer implements INetHandlerLoginServer, ITickable
|
|||
new Object[0]);
|
||||
this.loginGameProfile = this.getOfflineProfile(c00packetloginstart.getProfile());
|
||||
this.loginSkinPacket = c00packetloginstart.getSkin();
|
||||
this.loginCapePacket = c00packetloginstart.getCape();
|
||||
this.currentLoginState = NetHandlerLoginServer.LoginState.READY_TO_ACCEPT;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,6 +27,11 @@ public class ResourceLocation {
|
|||
protected final String resourcePath;
|
||||
|
||||
public Object cachedPointer = null;
|
||||
public int cachedPointerType = 0;
|
||||
|
||||
public static final int CACHED_POINTER_NONE = 0;
|
||||
public static final int CACHED_POINTER_TEXTURE = 1;
|
||||
public static final int CACHED_POINTER_EAGLER_MESH = 2;
|
||||
|
||||
protected ResourceLocation(int parInt1, String... resourceName) {
|
||||
this.resourceDomain = org.apache.commons.lang3.StringUtils.isEmpty(resourceName[0]) ? "minecraft"
|
||||
|
|
|
|||
|
|
@ -2701,9 +2701,10 @@ public abstract class World implements IBlockAccess {
|
|||
int i = 0;
|
||||
|
||||
EnumFacing[] facings = EnumFacing._VALUES;
|
||||
BlockPos tmp = new BlockPos(0, 0, 0);
|
||||
for (int k = 0; k < facings.length; ++k) {
|
||||
EnumFacing enumfacing = facings[k];
|
||||
int j = this.getRedstonePower(pos.offset(enumfacing), enumfacing);
|
||||
int j = this.getRedstonePower(pos.offsetEvenFaster(enumfacing, tmp), enumfacing);
|
||||
if (j >= 15) {
|
||||
return 15;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -172,7 +172,8 @@ public class ChunkProviderServer implements IChunkProvider {
|
|||
|
||||
return chunk;
|
||||
} catch (Exception exception) {
|
||||
logger.error("Couldn\'t load chunk", exception);
|
||||
logger.error("Couldn\'t load chunk");
|
||||
logger.error(exception);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
|
@ -183,7 +184,8 @@ public class ChunkProviderServer implements IChunkProvider {
|
|||
try {
|
||||
this.chunkLoader.saveExtraChunkData(this.worldObj, parChunk);
|
||||
} catch (Exception exception) {
|
||||
logger.error("Couldn\'t save entities", exception);
|
||||
logger.error("Couldn\'t save entities");
|
||||
logger.error(exception);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -196,10 +198,11 @@ public class ChunkProviderServer implements IChunkProvider {
|
|||
this.chunkLoader.saveChunk(this.worldObj, parChunk);
|
||||
++EaglerMinecraftServer.counterChunkWrite;
|
||||
} catch (IOException ioexception) {
|
||||
logger.error("Couldn\'t save chunk", ioexception);
|
||||
logger.error("Couldn\'t save chunk");
|
||||
logger.error(ioexception);
|
||||
} catch (MinecraftException minecraftexception) {
|
||||
logger.error("Couldn\'t save chunk; already in use by another instance of Minecraft?",
|
||||
minecraftexception);
|
||||
logger.error("Couldn\'t save chunk; already in use by another instance of Minecraft?");
|
||||
logger.error(minecraftexception);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue