added some features, fixed random bullshit
This commit is contained in:
parent
dc4fec1aaf
commit
b3bf06bdc8
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
buildscript {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -27,7 +27,7 @@ sourceSets {
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
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 {
|
buildscript {
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
@ -48,7 +48,7 @@ sourceSets {
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
jcenter()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
@ -12,9 +12,7 @@ public class ItemEnderPearl extends Item {
|
||||||
* Args: itemStack, world, entityPlayer
|
* Args: itemStack, world, entityPlayer
|
||||||
*/
|
*/
|
||||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
||||||
if (par3EntityPlayer.capabilities.isCreativeMode) {
|
if (par3EntityPlayer.ridingEntity != null) {
|
||||||
return par1ItemStack;
|
|
||||||
} else if (par3EntityPlayer.ridingEntity != null) {
|
|
||||||
return par1ItemStack;
|
return par1ItemStack;
|
||||||
} else {
|
} else {
|
||||||
--par1ItemStack.stackSize;
|
--par1ItemStack.stackSize;
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class PlayerManager {
|
||||||
|
|
||||||
public void cycleRenderDistance(EntityPlayerMP player) {
|
public void cycleRenderDistance(EntityPlayerMP player) {
|
||||||
if(player.lastRenderDistance != player.renderDistance) {
|
if(player.lastRenderDistance != player.renderDistance) {
|
||||||
player.lastRenderDistance = player.renderDistance;
|
//player.lastRenderDistance = player.renderDistance;
|
||||||
player.mcServer.getConfigurationManager().updateOnRenderDistanceChange(player);
|
player.mcServer.getConfigurationManager().updateOnRenderDistanceChange(player);
|
||||||
}
|
}
|
||||||
if(player.mcServer.getServerOwner().equals(player.username)) {
|
if(player.mcServer.getServerOwner().equals(player.username)) {
|
||||||
|
@ -105,10 +105,12 @@ public class PlayerManager {
|
||||||
int limited = player.renderDistance > 10 ? 10 : player.renderDistance;
|
int limited = player.renderDistance > 10 ? 10 : player.renderDistance;
|
||||||
for(int i = 0, l = curList.size(); i < l; ++i) {
|
for(int i = 0, l = curList.size(); i < l; ++i) {
|
||||||
EntityPlayerMP playerReload = (EntityPlayerMP)curList.get(i);
|
EntityPlayerMP playerReload = (EntityPlayerMP)curList.get(i);
|
||||||
int targetRenderDist = player.renderDistance > limited ? limited : player.renderDistance;
|
if(!player.mcServer.getServerOwner().equals(playerReload.username)) {
|
||||||
if (playerReload.renderDistance != targetRenderDist) {
|
int targetRenderDist = player.renderDistance > limited ? limited : player.renderDistance;
|
||||||
playerReload.lastRenderDistance = playerReload.renderDistance = targetRenderDist;
|
if (playerReload.renderDistance != targetRenderDist) {
|
||||||
playerReload.mcServer.getConfigurationManager().updateOnRenderDistanceChange(playerReload);
|
//playerReload.lastRenderDistance = playerReload.renderDistance = targetRenderDist;
|
||||||
|
playerReload.mcServer.getConfigurationManager().updateOnRenderDistanceChange(playerReload);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,6 +153,19 @@ public class AssetRepository {
|
||||||
}
|
}
|
||||||
|
|
||||||
filePool.put(name, load);
|
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 {
|
}else {
|
||||||
zis.skip(len);
|
zis.skip(len);
|
||||||
}
|
}
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class GuiScreenLANConnecting extends GuiScreen {
|
||||||
|
|
||||||
LANClientNetworkManager netMgr = LANClientNetworkManager.connectToWorld(sock, code, sock.getURI());
|
LANClientNetworkManager netMgr = LANClientNetworkManager.connectToWorld(sock, code, sock.getURI());
|
||||||
if(netMgr == null) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,11 +18,16 @@ public class LANServerList {
|
||||||
private final Set<String> deadURIs = new HashSet();
|
private final Set<String> deadURIs = new HashSet();
|
||||||
|
|
||||||
private long lastRefresh = 0l;
|
private long lastRefresh = 0l;
|
||||||
|
private int refreshCounter = 0;
|
||||||
|
|
||||||
public void update() {
|
public void update() {
|
||||||
long millis = System.currentTimeMillis();
|
long millis = System.currentTimeMillis();
|
||||||
if(millis - lastRefresh > 10000l) {
|
if(millis - lastRefresh > 10000l) {
|
||||||
refresh();
|
if(++refreshCounter < 25) {
|
||||||
|
refresh();
|
||||||
|
}else {
|
||||||
|
lastRefresh = millis;
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
Iterator<Entry<String,RelayWorldsQuery>> itr = lanServersQueryList.entrySet().iterator();
|
Iterator<Entry<String,RelayWorldsQuery>> itr = lanServersQueryList.entrySet().iterator();
|
||||||
while(itr.hasNext()) {
|
while(itr.hasNext()) {
|
||||||
|
@ -81,6 +86,7 @@ public class LANServerList {
|
||||||
|
|
||||||
public void forceRefresh() {
|
public void forceRefresh() {
|
||||||
deadURIs.clear();
|
deadURIs.clear();
|
||||||
|
refreshCounter = 0;
|
||||||
refresh();
|
refresh();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -96,6 +96,9 @@ public class GuiIngameMenu extends GuiScreen {
|
||||||
if(!mc.isSingleplayer() || IntegratedServerLAN.isHostingLAN()) {
|
if(!mc.isSingleplayer() || IntegratedServerLAN.isHostingLAN()) {
|
||||||
voiceMenu.updateScreen();
|
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
|
* The currently selected game mode. One of 'survival', 'creative', or
|
||||||
* 'adventure'
|
* 'adventure'
|
||||||
*/
|
*/
|
||||||
private String gameMode = "survival";
|
private String gameMode;
|
||||||
|
|
||||||
/** True if 'Allow Cheats' is currently enabled */
|
/** True if 'Allow Cheats' is currently enabled */
|
||||||
private boolean allowCommands = false;
|
private boolean allowCommands = false;
|
||||||
|
@ -33,6 +33,7 @@ public class GuiShareToLan extends GuiScreen {
|
||||||
public GuiShareToLan(GuiScreen par1GuiScreen) {
|
public GuiShareToLan(GuiScreen par1GuiScreen) {
|
||||||
this.parentScreen = par1GuiScreen;
|
this.parentScreen = par1GuiScreen;
|
||||||
this.relaysButton = new GuiNetworkSettingsButton(this);
|
this.relaysButton = new GuiNetworkSettingsButton(this);
|
||||||
|
this.gameMode = par1GuiScreen.mc.playerController.getGameType().getName();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,5 +1,8 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.WebsocketNetworkManager;
|
||||||
|
import net.minecraft.client.Minecraft;
|
||||||
|
|
||||||
public class ItemEnderPearl extends Item {
|
public class ItemEnderPearl extends Item {
|
||||||
public ItemEnderPearl(int par1) {
|
public ItemEnderPearl(int par1) {
|
||||||
super(par1);
|
super(par1);
|
||||||
|
@ -12,12 +15,12 @@ public class ItemEnderPearl extends Item {
|
||||||
* Args: itemStack, world, entityPlayer
|
* Args: itemStack, world, entityPlayer
|
||||||
*/
|
*/
|
||||||
public ItemStack onItemRightClick(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer) {
|
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;
|
return par1ItemStack;
|
||||||
} else if (par3EntityPlayer.ridingEntity != null) {
|
} else if (par3EntityPlayer.ridingEntity != null) {
|
||||||
return par1ItemStack;
|
return par1ItemStack;
|
||||||
} else {
|
} else {
|
||||||
--par1ItemStack.stackSize;
|
if (!par3EntityPlayer.capabilities.isCreativeMode) --par1ItemStack.stackSize;
|
||||||
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
par2World.playSoundAtEntity(par3EntityPlayer, "random.bow", 0.5F, 0.4F / (itemRand.nextFloat() * 0.4F + 0.8F));
|
||||||
|
|
||||||
return par1ItemStack;
|
return par1ItemStack;
|
||||||
|
|
|
@ -412,4 +412,9 @@ public class PlayerControllerMP {
|
||||||
public boolean extendedReach() {
|
public boolean extendedReach() {
|
||||||
return this.currentGameType.isCreative();
|
return this.currentGameType.isCreative();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public EnumGameType getGameType() {
|
||||||
|
return this.currentGameType;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user