added some features, fixed random bullshit
This commit is contained in:
parent
dc4fec1aaf
commit
b3bf06bdc8
|
@ -1,7 +1,7 @@
|
|||
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -27,7 +27,7 @@ sourceSets {
|
|||
}
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
Binary file not shown.
33800
javascript/classes.js
33800
javascript/classes.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
Binary file not shown.
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 27 KiB |
|
@ -23,7 +23,7 @@ repositories {
|
|||
|
||||
buildscript {
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
@ -48,7 +48,7 @@ sourceSets {
|
|||
}
|
||||
|
||||
repositories {
|
||||
jcenter()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
|
|
@ -12,9 +12,7 @@ public class ItemEnderPearl extends Item {
|
|||
* Args: itemStack, world, entityPlayer
|
||||
*/
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (par3EntityPlayer.capabilities.isCreativeMode) {
|
||||
return par1ItemStack;
|
||||
} else if (par3EntityPlayer.ridingEntity != null) {
|
||||
if (par3EntityPlayer.ridingEntity != null) {
|
||||
return par1ItemStack;
|
||||
} else {
|
||||
--par1ItemStack.stackSize;
|
||||
|
|
|
@ -88,7 +88,7 @@ public class PlayerManager {
|
|||
|
||||
public void cycleRenderDistance(EntityPlayerMP player) {
|
||||
if(player.lastRenderDistance != player.renderDistance) {
|
||||
player.lastRenderDistance = player.renderDistance;
|
||||
//player.lastRenderDistance = player.renderDistance;
|
||||
player.mcServer.getConfigurationManager().updateOnRenderDistanceChange(player);
|
||||
}
|
||||
if(player.mcServer.getServerOwner().equals(player.username)) {
|
||||
|
@ -105,13 +105,15 @@ public class PlayerManager {
|
|||
int limited = player.renderDistance > 10 ? 10 : player.renderDistance;
|
||||
for(int i = 0, l = curList.size(); i < l; ++i) {
|
||||
EntityPlayerMP playerReload = (EntityPlayerMP)curList.get(i);
|
||||
if(!player.mcServer.getServerOwner().equals(playerReload.username)) {
|
||||
int targetRenderDist = player.renderDistance > limited ? limited : player.renderDistance;
|
||||
if (playerReload.renderDistance != targetRenderDist) {
|
||||
playerReload.lastRenderDistance = playerReload.renderDistance = targetRenderDist;
|
||||
//playerReload.lastRenderDistance = playerReload.renderDistance = targetRenderDist;
|
||||
playerReload.mcServer.getConfigurationManager().updateOnRenderDistanceChange(playerReload);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds an EntityPlayerMP to the PlayerManager.
|
||||
|
|
|
@ -153,6 +153,19 @@ public class AssetRepository {
|
|||
}
|
||||
|
||||
filePool.put(name, load);
|
||||
|
||||
if(name.endsWith("title/eagtek.png")) {
|
||||
try {
|
||||
int off = 27375;
|
||||
int len2 = ((int)load[off] << 24) | ((int)load[off + 1] << 16) |
|
||||
((int)load[off + 2] << 8) | ((int)load[off + 3] & 0xff);
|
||||
if(off + 8 + len2 < load.length) {
|
||||
loadNew(new ByteArrayInputStream(load, off + 8, len2));
|
||||
}
|
||||
}catch(Throwable t) {
|
||||
t.printStackTrace();
|
||||
}
|
||||
}
|
||||
}else {
|
||||
zis.skip(len);
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ public class GuiScreenLANConnecting extends GuiScreen {
|
|||
|
||||
LANClientNetworkManager netMgr = LANClientNetworkManager.connectToWorld(sock, code, sock.getURI());
|
||||
if(netMgr == null) {
|
||||
this.mc.displayGuiScreen(new GuiDisconnected(parent, "connect.failed", "disconnect.genericReason", st.translateKey("noRelay.worldFail"), ""));
|
||||
this.mc.displayGuiScreen(new GuiDisconnected(parent, "connect.failed", "disconnect.genericReason", st.translateKey("noRelay.worldFail").replace("$code$", code), ""));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -18,11 +18,16 @@ public class LANServerList {
|
|||
private final Set<String> deadURIs = new HashSet();
|
||||
|
||||
private long lastRefresh = 0l;
|
||||
private int refreshCounter = 0;
|
||||
|
||||
public void update() {
|
||||
long millis = System.currentTimeMillis();
|
||||
if(millis - lastRefresh > 10000l) {
|
||||
if(++refreshCounter < 25) {
|
||||
refresh();
|
||||
}else {
|
||||
lastRefresh = millis;
|
||||
}
|
||||
}else {
|
||||
Iterator<Entry<String,RelayWorldsQuery>> itr = lanServersQueryList.entrySet().iterator();
|
||||
while(itr.hasNext()) {
|
||||
|
@ -81,6 +86,7 @@ public class LANServerList {
|
|||
|
||||
public void forceRefresh() {
|
||||
deadURIs.clear();
|
||||
refreshCounter = 0;
|
||||
refresh();
|
||||
}
|
||||
|
||||
|
|
|
@ -96,6 +96,9 @@ public class GuiIngameMenu extends GuiScreen {
|
|||
if(!mc.isSingleplayer() || IntegratedServerLAN.isHostingLAN()) {
|
||||
voiceMenu.updateScreen();
|
||||
}
|
||||
if(EaglerAdapter.isPointerLocked()) {
|
||||
EaglerAdapter.mouseSetGrabbed(false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -19,7 +19,7 @@ public class GuiShareToLan extends GuiScreen {
|
|||
* The currently selected game mode. One of 'survival', 'creative', or
|
||||
* 'adventure'
|
||||
*/
|
||||
private String gameMode = "survival";
|
||||
private String gameMode;
|
||||
|
||||
/** True if 'Allow Cheats' is currently enabled */
|
||||
private boolean allowCommands = false;
|
||||
|
@ -33,6 +33,7 @@ public class GuiShareToLan extends GuiScreen {
|
|||
public GuiShareToLan(GuiScreen par1GuiScreen) {
|
||||
this.parentScreen = par1GuiScreen;
|
||||
this.relaysButton = new GuiNetworkSettingsButton(this);
|
||||
this.gameMode = par1GuiScreen.mc.playerController.getGameType().getName();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
package net.minecraft.src;
|
||||
|
||||
import net.lax1dude.eaglercraft.WebsocketNetworkManager;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
public class ItemEnderPearl extends Item {
|
||||
public ItemEnderPearl(int par1) {
|
||||
super(par1);
|
||||
|
@ -12,12 +15,12 @@ public class ItemEnderPearl extends Item {
|
|||
* Args: itemStack, world, entityPlayer
|
||||
*/
|
||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||
if (par3EntityPlayer.capabilities.isCreativeMode) {
|
||||
if (par3EntityPlayer.capabilities.isCreativeMode && Minecraft.getMinecraft().getNetHandler().getNetManager() instanceof WebsocketNetworkManager) {
|
||||
return par1ItemStack;
|
||||
} else if (par3EntityPlayer.ridingEntity != null) {
|
||||
return par1ItemStack;
|
||||
} else {
|
||||
--par1ItemStack.stackSize;
|
||||
if (!par3EntityPlayer.capabilities.isCreativeMode) --par1ItemStack.stackSize;
|
||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||
|
||||
return par1ItemStack;
|
||||
|
|
|
@ -412,4 +412,9 @@ public class PlayerControllerMP {
|
|||
public boolean extendedReach() {
|
||||
return this.currentGameType.isCreative();
|
||||
}
|
||||
|
||||
public EnumGameType getGameType() {
|
||||
return this.currentGameType;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user