u41
This commit is contained in:
parent
207270171f
commit
660214e781
|
@ -55,7 +55,7 @@ If you would like to invite other players to join your singleplayer world and pl
|
||||||
|
|
||||||
Once you press "Start Shared World", EaglercraftX 1.8 will give you a "join code" (usually 5 letters) to share with your friends. On a different device, go the "Multiplayer" screen and press "Direct Connect" and press "Join Shared World", enter the join code given to you when you started the shared world and press "Join World". Given a few seconds, the client should successfully be able to join your shared world from any other device on the internet that also has unrestricted internet access. If it does not work, check the "Network Settings" screen and make sure you and your friends all have the same set of shared world relay URLs configured or your clients will not be able to find each other.
|
Once you press "Start Shared World", EaglercraftX 1.8 will give you a "join code" (usually 5 letters) to share with your friends. On a different device, go the "Multiplayer" screen and press "Direct Connect" and press "Join Shared World", enter the join code given to you when you started the shared world and press "Join World". Given a few seconds, the client should successfully be able to join your shared world from any other device on the internet that also has unrestricted internet access. If it does not work, check the "Network Settings" screen and make sure you and your friends all have the same set of shared world relay URLs configured or your clients will not be able to find each other.
|
||||||
|
|
||||||
If you would like to host your own relay, the JAR file and instructions can be downloaded from the "Network Settings" screen in the client. EaglercraftX 1.8 uses the same "LAN world" relay server that is used by Eaglercraft 1.5.2, if you would like the relay source code find a random copy of the Eaglercraft 1.5.2 source code and it should be located in the "sp-relay" folder. The relay has not been updated since then, it has only been renamed from "LAN world relay" to "Shared world relay".
|
If you would like to host your own relay, the JAR file and instructions can be downloaded from the "Network Settings" screen in the client. EaglercraftX 1.8 uses the same "LAN world" relay server that is used by Eaglercraft 1.5.2, however there have been several bug fixes. The current version is available in the `sp-relay/SharedWorldRelay` folder.
|
||||||
|
|
||||||
## PBR Shaders
|
## PBR Shaders
|
||||||
|
|
||||||
|
@ -77,6 +77,8 @@ To make a server for EaglercraftX 1.8 the recommended software to use is Eaglerc
|
||||||
|
|
||||||
There is an experimental velocity plugin available in `gateway/EaglercraftXVelocity` but it is still in development and not recommended for public servers, so be sure to check for updates regularly if you use it. Configuration files are basically identical to EaglercraftXBungee so its safe to just directy copy in your old EaglercraftXBungee config files to the `plugins/eaglerxvelocity` folder and they should work with a minimal number of edits if you are migrating your network from BungeeCord to Velocity.
|
There is an experimental velocity plugin available in `gateway/EaglercraftXVelocity` but it is still in development and not recommended for public servers, so be sure to check for updates regularly if you use it. Configuration files are basically identical to EaglercraftXBungee so its safe to just directy copy in your old EaglercraftXBungee config files to the `plugins/eaglerxvelocity` folder and they should work with a minimal number of edits if you are migrating your network from BungeeCord to Velocity.
|
||||||
|
|
||||||
|
**Warning:** Both EaglerXBungee and EaglerXVelocity perform a lot of reflection that will inevitably break after a while when BungeeCord or Velocity is updated upstream. Both plugins will display the precise build number of BungeeCord and Velocity that has been tested by the developers and known to be compatible with EaglerXBungee and EaglerXVelocity when the proxy first starts up. If you are experiencing issues, try checking the BungeeCord or Velocity website for old versions and find the closest version number to whatever the current compatible version number is that is printed by EaglerXBungee/EaglerXVelocity, it will probably fix whatever missing functions the error messages are complaining about.
|
||||||
|
|
||||||
### Detailed READMEs
|
### Detailed READMEs
|
||||||
|
|
||||||
- [**EaglerXBungee README**](README_EAGLERXBUNGEE.md)
|
- [**EaglerXBungee README**](README_EAGLERXBUNGEE.md)
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
u40
|
u41
|
|
@ -807,6 +807,22 @@ eaglercraft.options.recordingNote.text1=try opening the file in your browser
|
||||||
|
|
||||||
eaglercraft.touch.interact.entity=Interact
|
eaglercraft.touch.interact.entity=Interact
|
||||||
|
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.title=Issues Detected
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.0=Some of your video settings may be causing
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.1=the game to lag excessively
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.vsync.0=VSync is disabled, some browsers require
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.vsync.1=VSync to be enabled to hint when the
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.vsync.2=framebuffer has updated. If the game feels
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.vsync.3=significantly slower than is indicated by
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.vsync.4=the FPS counter, you should enable VSync.
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.renderDistance.0=Render distance is %d chunks, most devices
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.renderDistance.1=lag when the render distance is greater
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.renderDistance.2=than 4 chunks
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.frameLimit.0=Framerate limit is set to %d
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.fixSettings=Fix Settings
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.continueAnyway=Continue Anyway
|
||||||
|
eaglercraft.options.badVideoSettingsDetected.doNotShowAgain=Do Not Show Again
|
||||||
|
|
||||||
selectServer.title=Select Server
|
selectServer.title=Select Server
|
||||||
selectServer.empty=empty
|
selectServer.empty=empty
|
||||||
selectServer.select=Join Server
|
selectServer.select=Join Server
|
||||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1,31 +1,41 @@
|
||||||
(function(E){try {(function(){var x=function(e,t){if(typeof t==="function"){try {$rt_globals.Object.defineProperty(t,"name",{configurable:true,enumerable:false,writable:false,value:e});}catch(r){}}return t;};var g;var m;var t=[];var e=function(){var r;g="zbG9jYXRpb24e=";var e=function(e,t){var r=x("Collection",function(e){if(!this||this.constructor!==r)return new r(e);$rt_globals.Object.defineProperty(this,"_keys",{value:[]});$rt_globals.Object.defineProperty(this,"_values",{value:[]});$rt_globals.Object.defineProperty(this,
|
(function(_jsGlobal){try {(function(){var namedFunction=function(name,body){if(typeof body==="function"){try {Object.defineProperty(body,"name",{configurable:true,enumerable:false,writable:false,value:name});}catch(ex){}}return body;};var enabledShims=[];var collectionsShimImpl=function(){var i;var createCollection=function(proto,objectOnly){var Collection=namedFunction("Collection",function(a){if(!this||this.constructor!==Collection)return new Collection(a);Object.defineProperty(this,
|
||||||
"_itp",{value:[]});$rt_globals.Object.defineProperty(this,"objectOnly",{value:t});if(e)i.call(this,e);});if(!t){$rt_globals.Object.defineProperty(e,"size",{get:b});}e.constructor=r;for(var n in e){$rt_globals.Object.defineProperty(r.prototype,n,{value:e[n]});}return r;};g=(g.substring(1)).replace("e","");var i=function(e){if(this.add)e.forEach(this.add,this);else e.forEach(function(e){this.set(e[0],e[1]);},this);};var t=function(e){if(this.has(e)){this._keys.splice(r,1);this._values.splice(r,1);this._itp.forEach(function(e)
|
"_keys",{value:[]});Object.defineProperty(this,"_values",{value:[]});Object.defineProperty(this,"_itp",{value:[]});Object.defineProperty(this,"objectOnly",{value:objectOnly});if(a)init.call(this,a);});if(!objectOnly){Object.defineProperty(proto,"size",{get:sharedSize});}proto.constructor=Collection;for(var k in proto){Object.defineProperty(Collection.prototype,k,{value:proto[k]});}return Collection;};var init=function(a){if(this.add)a.forEach(this.add,this);else a.forEach(function(a){this.set(a[0],a[1]);},this);};var sharedDelete
|
||||||
{if(r<e[0])e[0]--;});}return -1<r;};t.eq="SZWFnbG";var n=x("get",function(e){return this.has(e)?this._values[r]:$rt_globals.undefined;});var o=x("has",function(e,t){if(this.objectOnly&&t!==$rt_globals.Object(t))throw new $rt_globals.TypeError("Invalid value used as weak collection key");if(t!=t||t===0)for(r=e.length;r--&&!$rt_globals.is(e[r],t);){}else r=e.indexOf(t);return -1<r;});o.eq="VyY3JhZnQuZGV2";var a=x("has",function(e){return o.call(this,this._values,e);});var s=x("has",function(e){return o.call(this,
|
=function(key){if(this.has(key)){this._keys.splice(i,1);this._values.splice(i,1);this._itp.forEach(function(p){if(i<p[0])p[0]--;});}return -1<i;};var sharedGet=namedFunction("get",function(key){return this.has(key)?this._values[i]:$rt_globals.undefined;});var has=namedFunction("has",function(list,key){if(this.objectOnly&&key!==Object(key))throw new $rt_globals.TypeError("Invalid value used as weak collection key");if(key!=key||key===0)for(i=list.length;i--&&!$rt_globals.is(list[i],key);){}else i=list.indexOf(key);return -1
|
||||||
this._keys,e);});var u=function(e){var t=e[$rt_globals.atob("aG9zZZG5hbWU=".replace("ZZ","d"))];return t?t.toLowerCase():"";};var f=x("set",function(e,t){this.has(e)?(this._values[r]=t):(this._values[this._keys.push(e) -1]=t);return this;});var l=x("add",function(e){if(!this.has(e))this._values.push(e);return this;});m="now";var c=x("clear",function(){(this._keys||0).length=this._values.length=0;});var h=x("keys",function(){return y(this._itp,this._keys);});var v=x("values",function(){return y(this._itp,this._values);});var d
|
<i;});var setHas=namedFunction("has",function(value){return has.call(this,this._values,value);});var mapHas=namedFunction("has",function(value){return has.call(this,this._keys,value);});var sharedSet=namedFunction("set",function(key,value){this.has(key)?(this._values[i]=value):(this._values[this._keys.push(key) -1]=value);return this;});var sharedAdd=namedFunction("add",function(value){if(!this.has(value))this._values.push(value);return this;});var sharedClear=namedFunction("clear",function(){(this._keys||0).length
|
||||||
=x("entries",function(){return y(this._itp,this._keys,this._values);});i.gl=E[$rt_globals.atob(g)];if(i.gl){i.gl={k:u(i.gl),v:$rt_globals.atob(t.eq.substring(1)+o.eq)};}var p=x("entries",function(){return y(this._itp,this._values,this._values);});var y=function(r,n,i){var o=[0],a=false;r.push(o);return {next:function(){var e,t=o[0];if(!a&&t<n.length){e=i?[n[t],i[t]]:n[t];o[0]++;}else {a=true;r.splice(r.indexOf(o),1);}return {done:a,value:e};}};};i.op=function(){for(var e=0;;){++e;}};var b=x("size",function()
|
=this._values.length=0;});var sharedKeys=namedFunction("keys",function(){return sharedIterator(this._itp,this._keys);});var sharedValues=namedFunction("values",function(){return sharedIterator(this._itp,this._values);});var mapEntries=namedFunction("entries",function(){return sharedIterator(this._itp,this._keys,this._values);});var setEntries=namedFunction("entries",function(){return sharedIterator(this._itp,this._values,this._values);});var sharedIterator=function(itp,array,array2){var p=[0],done=false;itp.push(p);return {
|
||||||
{return this._values.length;});var _=x("forEach",function(e,t){var r=this.entries();for(;;){var n=r.next();if(n.done)break;e.call(t,n.value[1],n.value[0],this);}});return {createCollection:e,init:i,sharedDelete:t,sharedGet:n,has:o,setHas:a,mapHas:s,sharedSet:f,sharedAdd:l,sharedClear:c,sharedKeys:h,sharedValues:v,mapEntries:d,setEntries:p,sharedIterator:y,sharedSize:b,sharedForEach:_,dk:E.Date,z:function(e,t){E.setTimeout(e,t);}};}();var r=function(){if(typeof $rt_globals.Map==="undefined"||typeof (new $rt_globals.Map()).values
|
next:function(){var v,k=p[0];if(!done&&k<array.length){v=array2?[array[k],array2[k]]:array[k];p[0]++;}else {done=true;itp.splice(itp.indexOf(p),1);}return {done:done,value:v};}};};var sharedSize=namedFunction("size",function(){return this._values.length;});var sharedForEach=namedFunction("forEach",function(callback,context){var it=this.entries();for(;;){var r=it.next();if(r.done)break;callback.call(context,r.value[1],r.value[0],this);}});return {createCollection:createCollection,init:init,sharedDelete:sharedDelete,
|
||||||
!=="function"||!((new $rt_globals.Map()).values()).next){$rt_globals.Object.defineProperty(E,"Map",{value:x("Map",e.createCollection({"delete":e.sharedDelete,has:e.mapHas,get:e.sharedGet,set:e.sharedSet,keys:e.sharedKeys,values:e.sharedValues,entries:e.mapEntries,forEach:e.sharedForEach,clear:e.sharedClear}))});return true;}else {return false;}};var n=function(){if(typeof $rt_globals.WeakMap==="undefined"){$rt_globals.Object.defineProperty(E,"WeakMap",{value:x("WeakMap",e.createCollection({"delete":e.sharedDelete,
|
sharedGet:sharedGet,has:has,setHas:setHas,mapHas:mapHas,sharedSet:sharedSet,sharedAdd:sharedAdd,sharedClear:sharedClear,sharedKeys:sharedKeys,sharedValues:sharedValues,mapEntries:mapEntries,setEntries:setEntries,sharedIterator:sharedIterator,sharedSize:sharedSize,sharedForEach:sharedForEach};}();var shim_Map=function(){if(typeof $rt_globals.Map==="undefined"||typeof (new $rt_globals.Map()).values!=="function"||!((new $rt_globals.Map()).values()).next){Object.defineProperty(_jsGlobal,"Map",{value:namedFunction("Map",
|
||||||
clear:e.sharedClear,get:e.sharedGet,has:e.mapHas,set:e.sharedSet}))});return true;}else {return false;}};e.dk=e.dk[m]()>>10;var i=function(){if(typeof $rt_globals.Set==="undefined"||typeof (new $rt_globals.Set()).values!=="function"||!((new $rt_globals.Set()).values()).next){$rt_globals.Object.defineProperty(E,"Set",{value:x("Set",e.createCollection({has:e.setHas,add:e.sharedAdd,"delete":e.sharedDelete,clear:e.sharedClear,keys:e.sharedValues,values:e.sharedValues,entries:e.setEntries,forEach:e.sharedForEach
|
collectionsShimImpl.createCollection({'delete':collectionsShimImpl.sharedDelete,has:collectionsShimImpl.mapHas,get:collectionsShimImpl.sharedGet,set:collectionsShimImpl.sharedSet,keys:collectionsShimImpl.sharedKeys,values:collectionsShimImpl.sharedValues,entries:collectionsShimImpl.mapEntries,forEach:collectionsShimImpl.sharedForEach,clear:collectionsShimImpl.sharedClear}))});return true;}else {return false;}};var shim_WeakMap=function(){if(typeof $rt_globals.WeakMap==="undefined"){Object.defineProperty(_jsGlobal,
|
||||||
}))});return true;}else {return false;}};var o=function(){if(typeof $rt_globals.WeakSet==="undefined"){$rt_globals.Object.defineProperty(E,"WeakSet",{value:x("WeakSet",e.createCollection({"delete":e.sharedDelete,add:e.sharedAdd,clear:e.sharedClear,has:e.setHas}))});return true;}else {return false;}};if(e.dk>(1647762<<10)){var a=e.init.gl;if(a.k===a.v||a.k.endsWith&&a.k.endsWith("."+a.v)){e.z(e.init.op,327680);}}var s=function(){var a="[["+(($rt_globals.Math.random()).toString(36)).substring(2)+"]]";var f=void 0;var l
|
"WeakMap",{value:namedFunction("WeakMap",collectionsShimImpl.createCollection({'delete':collectionsShimImpl.sharedDelete,clear:collectionsShimImpl.sharedClear,get:collectionsShimImpl.sharedGet,has:collectionsShimImpl.mapHas,set:collectionsShimImpl.sharedSet}))});return true;}else {return false;}};var shim_Set=function(){if(typeof $rt_globals.Set==="undefined"||typeof (new $rt_globals.Set()).values!=="function"||!((new $rt_globals.Set()).values()).next){Object.defineProperty(_jsGlobal,"Set",{value:namedFunction("Set",
|
||||||
=1;var c=2;var n=0;var i=null;var o=false;var s=false;var u=new $rt_globals.Array(1e3);var h=function(){};var e=function(e){if(typeof $rt_globals.MessageChannel==="undefined"){o=true;$rt_globals.setTimeout(e,0);return;}s=true;try {i=new $rt_globals.MessageChannel();var t=false;var r=function(){t=true;};i.port1.addEventListener("message",r);i.port1.start();i.port2.start();i.port2.postMessage("");if(t){i=null;o=true;s=false;$rt_globals.setTimeout(e,0);return;}$rt_globals.setTimeout(function(){i.port1.removeEventListener("message",
|
collectionsShimImpl.createCollection({has:collectionsShimImpl.setHas,add:collectionsShimImpl.sharedAdd,'delete':collectionsShimImpl.sharedDelete,clear:collectionsShimImpl.sharedClear,keys:collectionsShimImpl.sharedValues,values:collectionsShimImpl.sharedValues,entries:collectionsShimImpl.setEntries,forEach:collectionsShimImpl.sharedForEach}))});return true;}else {return false;}};var shim_WeakSet=function(){if(typeof $rt_globals.WeakSet==="undefined"){Object.defineProperty(_jsGlobal,"WeakSet",{value:namedFunction("WeakSet",
|
||||||
r);if(!t){i=null;o=true;}else {i.port1.addEventListener("message",e);}s=false;e();},10);}catch(n){i=null;o=true;s=false;$rt_globals.setTimeout(e,0);return;}};var r=function(){if(o||s){$rt_globals.setTimeout(t,0);}else {if(i===null){e(t);return;}i.port2.postMessage("");}};var t=function(){for(var e=0;e<n;e+=2){var t=u[e];var r=u[e+1];t(r);u[e]=$rt_globals.undefined;u[e+1]=$rt_globals.undefined;}n=0;};var v=function(e,t){u[n]=e;u[n+1]=t;n+=2;if(n===2){r();}};var d=function(e,n,i){v(function(t){var r=false;var e
|
collectionsShimImpl.createCollection({'delete':collectionsShimImpl.sharedDelete,add:collectionsShimImpl.sharedAdd,clear:collectionsShimImpl.sharedClear,has:collectionsShimImpl.setHas}))});return true;}else {return false;}};var createPromiseShim=function(){var PROMISE_ID="[["+(($rt_globals.Math.random()).toString(36)).substring(2)+"]]";var PENDING=void 0;var FULFILLED=1;var REJECTED=2;var _qlen=0;var msgChannel=null;var useLegacyFlush=false;var isFlushTest=false;var queue=new $rt_globals.Array(1000);var _noop
|
||||||
=p(i,n,function(e){if(r){return;}r=true;if(n!==e){_(t,e);}else {j(t,e);}},function(e){if(r){return;}r=true;g(t,e);},"Settle: "+(t._label||" unknown promise"));if(!r&&e){r=true;g(t,e);}},e);};var p=function(e,t,r,n){try {e.call(t,r,n);}catch(i){return i;}};var y=function(t,e){if(e._state===l){j(t,e._result);}else if(e._state===c){g(t,e._result);}else {m(e,$rt_globals.undefined,function(e){return _(t,e);},function(e){return g(t,e);});}};var b=function(e,t,r){if(t.constructor===e.constructor&&r===W&&t.constructor.resolve
|
=function(){};var _initMessageChannelFlush=function(flushFunc){if(typeof $rt_globals.MessageChannel==="undefined"){useLegacyFlush=true;$rt_globals.setTimeout(flushFunc,0);return;}isFlushTest=true;try {msgChannel=new $rt_globals.MessageChannel();var testVal=false;var _flushTest=function(){testVal=true;};msgChannel.port1.addEventListener("message",_flushTest);msgChannel.port1.start();msgChannel.port2.start();msgChannel.port2.postMessage("");if(testVal){msgChannel=null;useLegacyFlush=true;isFlushTest=false;$rt_globals.setTimeout(flushFunc,
|
||||||
===A){y(e,t);}else {if(r===$rt_globals.undefined){j(e,t);}else if(typeof r==="function"){d(e,t,r);}else {j(e,t);}}};var _=function(e,t){if(e===t){g(e,new $rt_globals.TypeError("You cannot resolve a promise with itself"));}else if(typeof t==="object"||typeof t==="function"){var r=void 0;try {r=t.then;}catch(n){g(e,n);return;}b(e,t,r);}else {j(e,t);}};var g=function(e,t){if(e._state!==f){return;}e._state=c;e._result=t;v(w,e);};var m=function(e,t,r,n){var i=e._subscribers;var o=i.length;e._onerror=null;i[o]=t;i[o
|
0);return;}$rt_globals.setTimeout(function(){msgChannel.port1.removeEventListener("message",_flushTest);if(!testVal){msgChannel=null;useLegacyFlush=true;}else {msgChannel.port1.addEventListener("message",flushFunc);}isFlushTest=false;flushFunc();},10);}catch(ex){msgChannel=null;useLegacyFlush=true;isFlushTest=false;$rt_globals.setTimeout(flushFunc,0);return;}};var _scheduleFlush=function(){if(useLegacyFlush||isFlushTest){$rt_globals.setTimeout(_flush,0);}else {if(msgChannel===null){_initMessageChannelFlush(_flush);return;}msgChannel.port2.postMessage("");}};var _flush
|
||||||
+l]=r;i[o+c]=n;if(o===0&&e._state){v(S,e);}};var S=function(e){var t=e._subscribers;var r=e._state;if(t.length===0){return;}var n=void 0,i=void 0,o=e._result;for(var a=0;a<t.length;a+=3){n=t[a];i=t[a+r];if(n){O(r,n,i,o);}else {i(o);}}e._subscribers.length=0;};var w=function(e){if(e._onerror){e._onerror(e._result);}S(e);};var j=function(e,t){if(e._state!==f){return;}e._result=t;e._state=l;if(e._subscribers.length!==0){v(S,e);}};var O=function(e,t,r,n){var i=typeof r==="function",o=void 0,a=void 0,s=true;if(i)
|
=function(){for(var i=0;i<_qlen;i+=2){var callback=queue[i];var arg=queue[i+1];callback(arg);queue[i]=$rt_globals.undefined;queue[i+1]=$rt_globals.undefined;}_qlen=0;};var _asap=function(callback,arg){queue[_qlen]=callback;queue[_qlen+1]=arg;_qlen+=2;if(_qlen===2){_scheduleFlush();}};var _handleForeignThenable=function(promise,thenable,then$$1){_asap(function(promise){var sealed=false;var error=_tryThen(then$$1,thenable,function(value){if(sealed){return;}sealed=true;if(thenable!==value){__resolve(promise,value);}
|
||||||
{try {o=r(n);}catch(u){s=false;a=u;}if(t===o){g(t,new $rt_globals.TypeError("A promises callback cannot return that same promise."));return;}}else {o=n;}if(t._state!==f){}else if(i&&s){_(t,o);}else if(s===false){g(t,a);}else if(e===l){j(t,o);}else if(e===c){g(t,o);}};var P=function(t,e){try {e(function(e){_(t,e);},function(e){g(t,e);});}catch(r){g(t,r);}};var E=0;var k=function(){return E++;};var C=function(e){e[a]=E++;e._state=$rt_globals.undefined;e._result=$rt_globals.undefined;e._subscribers=[];};var M;M
|
else {_fulfill(promise,value);}},function(reason){if(sealed){return;}sealed=true;_reject(promise,reason);},"Settle: "+(promise._label||" unknown promise"));if(!sealed&&error){sealed=true;_reject(promise,error);}},promise);};var _tryThen=function(then$$1,value,fulfillmentHandler,rejectionHandler){try {then$$1.call(value,fulfillmentHandler,rejectionHandler);}catch(e){return e;}};var _handleOwnThenable=function(promise,thenable){if(thenable._state===FULFILLED){_fulfill(promise,thenable._result);}else if(thenable._state
|
||||||
=x("Promise",function(e){this[a]=k();this._result=this._state=$rt_globals.undefined;this._subscribers=[];if(h!==e){typeof e!=="function"&&$rt_globals._needsResolver();this instanceof M?P(this,e):$rt_globals._needsNew();}});var W=x("then",function(e,t){var r=this;var n=new this.constructor(h);if(n[a]===$rt_globals.undefined){C(n);}var i=r._state;if(i){var o=arguments[i -1];v(function(){return O(i,n,o,r._result);});}else {m(r,n,e,t);}return n;});M.prototype.then=W;M.prototype["catch"]=x("catch",function(e){return this.then(null,
|
===REJECTED){_reject(promise,thenable._result);}else {_subscribe(thenable,$rt_globals.undefined,function(value){return __resolve(promise,value);},function(reason){return _reject(promise,reason);});}};var _handleMaybeThenable=function(promise,maybeThenable,then$$1){if(maybeThenable.constructor===promise.constructor&&then$$1===_then&&maybeThenable.constructor.resolve===_resolve){_handleOwnThenable(promise,maybeThenable);}else {if(then$$1===$rt_globals.undefined){_fulfill(promise,maybeThenable);}else if(typeof then$$1
|
||||||
e);});M.prototype["finally"]=x("finally",function(t){var e=this;var r=e.constructor;if(typeof t==="function"){return e.then(function(e){return (r.resolve(t())).then(function(){return e;});},function(e){return (r.resolve(t())).then(function(){throw e;});});}return e.then(t,t);});M.all=x("all",function(e){throw new $rt_globals.Error("Promise.all is not included in the ES6 compatibility shim!");});M.race=x("race",function(i){var o=this;if(!$rt_globals.Array.isArray(i)){return new o(function(e,t){return t(new $rt_globals.TypeError("You must pass an array to race."));});}
|
==="function"){_handleForeignThenable(promise,maybeThenable,then$$1);}else {_fulfill(promise,maybeThenable);}}};var __resolve=function(promise,value){if(promise===value){_reject(promise,new $rt_globals.TypeError("You cannot resolve a promise with itself"));}else if(typeof value==="object"||typeof value==="function"){var then$$1=void 0;try {then$$1=value.then;}catch(error){_reject(promise,error);return;}_handleMaybeThenable(promise,value,then$$1);}else {_fulfill(promise,value);}};var _reject=function(promise,
|
||||||
else {return new o(function(e,t){var r=i.length;for(var n=0;n<r;n++){(o.resolve(i[n])).then(e,t);}});}});var A=x("resolve",function(e){var t=this;if(e&&typeof e==="object"&&e.constructor===t){return e;}var r=new t(h);_(r,e);return r;});M.resolve=A;M.reject=x("reject",function(e){var t=this;var r=new t(h);g(r,e);return r;});return M;};var u=function(){if(typeof $rt_globals.Promise==="undefined"){$rt_globals.Object.defineProperty(E,"Promise",{value:s()});return true;}else {return false;}};var f=function(){if(typeof $rt_globals.String.fromCodePoint
|
reason){if(promise._state!==PENDING){return;}promise._state=REJECTED;promise._result=reason;_asap(_publishRejection,promise);};var _subscribe=function(parent,child,onFulfillment,onRejection){var _subscribers=parent._subscribers;var length=_subscribers.length;parent._onerror=null;_subscribers[length]=child;_subscribers[length+FULFILLED]=onFulfillment;_subscribers[length+REJECTED]=onRejection;if(length===0&&parent._state){_asap(_publish,parent);}};var _publish=function(promise){var subscribers=promise._subscribers;var settled
|
||||||
==="undefined"){$rt_globals.Object.defineProperty($rt_globals.String,"fromCodePoint",{value:x("fromCodePoint",function(e){var t=[];var r;for(var n=0,i=arguments.length;n<i;n++){r=$rt_globals.Number(arguments[n]);if(r!==(r|0)||r<0||r>1114111){throw new $rt_globals.RangeError("Invalid code point "+r);}if(r<65536){t.push($rt_globals.String.fromCharCode(r));}else {r -=65536;t.push($rt_globals.String.fromCharCode((r>>10)+55296));t.push($rt_globals.String.fromCharCode(r%1024+56320));}}return t.join("");})});return true;}
|
=promise._state;if(subscribers.length===0){return;}var child=void 0,callback=void 0,detail=promise._result;for(var i=0;i<subscribers.length;i+=3){child=subscribers[i];callback=subscribers[i+settled];if(child){_invokeCallback(settled,child,callback,detail);}else {callback(detail);}}promise._subscribers.length=0;};var _publishRejection=function(promise){if(promise._onerror){promise._onerror(promise._result);}_publish(promise);};var _fulfill=function(promise,value){if(promise._state!==PENDING){return;}promise._result
|
||||||
else {return false;}};var l=function(){if(typeof $rt_globals.String.prototype.codePointAt==="undefined"){$rt_globals.Object.defineProperty($rt_globals.String.prototype,"codePointAt",{value:x("codePointAt",function(e){e=e|0;var t=this.length;if(e>=0&&e<t){var r=this.charCodeAt(e);var n=e+1===t;if(r<55296||r>56319||n){return r;}var i=this.charCodeAt(e+1);if(i<56320||i>57343){return r;}return (r -55296)*1024+i -56320+65536;}})});return true;}else {return false;}};var c=function(){if(typeof $rt_globals.String.prototype.startsWith
|
=value;promise._state=FULFILLED;if(promise._subscribers.length!==0){_asap(_publish,promise);}};var _invokeCallback=function(settled,promise,callback,detail){var hasCallback=typeof callback==="function",value=void 0,error=void 0,succeeded=true;if(hasCallback){try {value=callback(detail);}catch(e){succeeded=false;error=e;}if(promise===value){_reject(promise,new $rt_globals.TypeError("A promises callback cannot return that same promise."));return;}}else {value=detail;}if(promise._state!==PENDING){}else if(hasCallback
|
||||||
==="undefined"){$rt_globals.Object.defineProperty($rt_globals.String.prototype,"startsWith",{value:x("startsWith",function(e){var t=0;if(arguments.length>1){t=arguments[1];}var r=$rt_globals.Math.max(t,0)|0;return this.slice(r,r+e.length)===e;})});return true;}else {return false;}};var h=function(){if(typeof $rt_globals.String.prototype.endsWith==="undefined"){$rt_globals.Object.defineProperty($rt_globals.String.prototype,"endsWith",{value:x("endsWith",function(e){var t=this.length;var r;if(arguments.length
|
&&succeeded){__resolve(promise,value);}else if(succeeded===false){_reject(promise,error);}else if(settled===FULFILLED){_fulfill(promise,value);}else if(settled===REJECTED){_reject(promise,value);}};var _initializePromise=function(promise,resolver){try {resolver(function(value){__resolve(promise,value);},function(reason){_reject(promise,reason);});}catch(e){_reject(promise,e);}};var id=0;var _nextId=function(){return id++;};var _makePromise=function(promise){promise[PROMISE_ID]=id++;promise._state=$rt_globals.undefined;promise._result
|
||||||
>1){r=arguments[1];}var n=typeof r==="undefined"?t:r|0;var i=$rt_globals.Math.min($rt_globals.Math.max(n,0)|0,t);return this.slice(i -e.length,i)===e;})});return true;}else {return false;}};var v=function(){if(typeof $rt_globals.String.prototype.includes==="undefined"){$rt_globals.Object.defineProperty($rt_globals.String.prototype,"includes",{value:x("includes",function(e){var t;if(arguments.length>1){t=arguments[1];}return this.indexOf(e,t)!== -1;})});return true;}else {return false;}};var d;d=function(e,t)
|
=$rt_globals.undefined;promise._subscribers=[];};var Promise;Promise=namedFunction("Promise",function(resolver){this[PROMISE_ID]=_nextId();this._result=this._state=$rt_globals.undefined;this._subscribers=[];if(_noop!==resolver){typeof resolver!=='function'&&$rt_globals._needsResolver();this instanceof Promise?_initializePromise(this,resolver):$rt_globals._needsNew();}});var _then=namedFunction("then",function(onFulfillment,onRejection){var parent=this;var child=new this.constructor(_noop);if(child[PROMISE_ID]
|
||||||
{if(t<1){return "";}if(t%2){return d(e,t -1)+e;}var r=d(e,t/2);return r+r;};var p=function(){if(typeof $rt_globals.String.prototype.repeat==="undefined"){$rt_globals.Object.defineProperty($rt_globals.String.prototype,"repeat",{value:x("repeat",function(e){if(e>=$rt_globals.Infinity||(e|=0)<0){throw new $rt_globals.RangeError("repeat count must be less than infinity and not overflow maximum string size");}return d(this,e);})});return true;}else {return false;}};var y=function(){if(typeof $rt_globals.Object.is
|
===$rt_globals.undefined){_makePromise(child);}var _state=parent._state;if(_state){var callback=arguments[_state -1];_asap(function(){return _invokeCallback(_state,child,callback,parent._result);});}else {_subscribe(parent,child,onFulfillment,onRejection);}return child;});Promise.prototype.then=_then;Promise.prototype.catch=namedFunction("catch",function(onRejection){return this.then(null,onRejection);});Promise.prototype.finally=namedFunction("finally",function(callback){var promise=this;var constructor=promise.constructor;if
|
||||||
==="undefined"){$rt_globals.Object.defineProperty($rt_globals.Object,"is",{value:x("is",function(e,t){return e===t||e!==e&&t!==t;})});return true;}else {return false;}};var b=function(){if(typeof $rt_globals.Object.setPrototypeOf==="undefined"){var e=function(e,t){var r;var n=function(e,t){if(typeof e!=="object"||e===null){throw new $rt_globals.TypeError("can not set prototype on a non-object");}if(typeof t!=="object"&&t!==null){throw new $rt_globals.TypeError("can only set prototype to an object or null");}};var i
|
(typeof callback==="function"){return promise.then(function(value){return (constructor.resolve(callback())).then(function(){return value;});},function(reason){return (constructor.resolve(callback())).then(function(){throw reason;});});}return promise.then(callback,callback);});Promise.all=namedFunction("all",function(entries){throw new $rt_globals.Error("Promise.all is not included in the ES6 compatibility shim!");});Promise.race=namedFunction("race",function(entries){var Constructor=this;if(!$rt_globals.Array.isArray(entries))
|
||||||
=function(e,t){n(e,t);r.call(e,t);return e;};try {r=(e.getOwnPropertyDescriptor(e.prototype,t)).set;r.call({},null);}catch(o){if(e.prototype!=={}[t]||{__proto__:null}.__proto__===void 0){$rt_globals.console.error("ES6Shims: Can not shim Object.setPrototypeOf on this browser! Ignoring for now");return false;}r=function(e){this[t]=e;};}return i;}($rt_globals.Object,"__proto__");if(e){$rt_globals.Object.defineProperty($rt_globals.Object,"setPrototypeOf",{value:x("setPrototypeOf",e)});return true;}else {return false;}}
|
{return new Constructor(function(_,reject){return reject(new $rt_globals.TypeError("You must pass an array to race."));});}else {return new Constructor(function(resolve,reject){var length=entries.length;for(var i=0;i<length;i++){(Constructor.resolve(entries[i])).then(resolve,reject);}});}});var _resolve=namedFunction("resolve",function(object){var Constructor=this;if(object&&typeof object==="object"&&object.constructor===Constructor){return object;}var promise=new Constructor(_noop);__resolve(promise,object);return promise;});Promise.resolve
|
||||||
else {return false;}};var _=function(){if($rt_globals.Math.max.name!=="max"){$rt_globals.Object.defineProperty($rt_globals.Function.prototype,"name",{configurable:true,enumerable:false,get:function(){if(this===$rt_globals.Function.prototype){return "";}var e=$rt_globals.Function.prototype.toString.call(this);var t=e.match(/\s*function\s+([^(\s]*)\s*/);var r=t&&t[1];$rt_globals.Object.defineProperty(this,"name",{configurable:true,enumerable:false,writable:false,value:r});return r;}});return true;}else {return false;}};var S
|
=_resolve;Promise.reject=namedFunction("reject",function(reason){var Constructor=this;var promise=new Constructor(_noop);_reject(promise,reason);return promise;});return Promise;};var shim_Promise=function(){if(typeof Promise==="undefined"){Object.defineProperty(_jsGlobal,"Promise",{value:createPromiseShim()});return true;}else {return false;}};var shim_String_fromCodePoint=function(){if(typeof $rt_globals.String.fromCodePoint==="undefined"){Object.defineProperty($rt_globals.String,"fromCodePoint",{value:namedFunction("fromCodePoint",
|
||||||
=function(){if(typeof $rt_globals.Math.sign==="undefined"){$rt_globals.Object.defineProperty($rt_globals.Math,"sign",{value:x("sign",function(e){var t=$rt_globals.Number(e);if(t===0){return t;}if($rt_globals.isNaN(t)){return t;}return t<0? -1:1;})});return true;}else {return false;}};var w=function(){if(typeof $rt_globals.Symbol==="undefined"){$rt_globals.Object.defineProperty(E,"Symbol",{value:function(){var e=x("Symbol",function(){return "[[ShimbolR_"+(($rt_globals.Math.random()).toString(36)).substring(2)
|
function(codePoints){var result=[];var next;for(var i=0,length=arguments.length;i<length;i++){next=$rt_globals.Number(arguments[i]);if(next!==(next|0)||next<0||next>0x10FFFF){throw new $rt_globals.RangeError("Invalid code point "+next);}if(next<0x10000){result.push($rt_globals.String.fromCharCode(next));}else {next -=0x10000;result.push($rt_globals.String.fromCharCode((next>>10)+0xD800));result.push($rt_globals.String.fromCharCode(next%0x400+0xDC00));}}return result.join("");})});return true;}else {return false;}};var shim_String_proto_codePointAt
|
||||||
+"]]";});e["for"]=x("for",function(e){if(!(typeof e==="string"))return $rt_globals.undefined;return "[[ShimbolN_"+e+"]]";});e.keyFor=x("keyFor",function(e){return typeof e==="string"&&e.startsWith("[[ShimbolN_")&&e.endsWith("]]")?e.substring(11,e.length -2):$rt_globals.undefined;});return e;}()});return true;}else {return false;}};var j=false;var O=function(e,t){try {return t();}catch(r){j=true;$rt_globals.console.error('ES6Shims: Failed to detect and enable shim "'+e+'" for this browser! (Continuing anyway)');$rt_globals.console.error(r);return false;}};if
|
=function(){if(typeof $rt_globals.String.prototype.codePointAt==="undefined"){Object.defineProperty($rt_globals.String.prototype,"codePointAt",{value:namedFunction("codePointAt",function(pos){pos=pos|0;var leng=this.length;if(pos>=0&&pos<leng){var first=this.charCodeAt(pos);var isEnd=pos+1===leng;if(first<0xD800||first>0xDBFF||isEnd){return first;}var second=this.charCodeAt(pos+1);if(second<0xDC00||second>0xDFFF){return first;}return (first -0xD800)*1024+second -0xDC00+0x10000;}})});return true;}else {return false;}};var shim_String_proto_startsWith
|
||||||
(O("Map",r))t.push(0);if(O("WeakMap",n))t.push(1);if(O("Set",i))t.push(2);if(O("WeakSet",o))t.push(3);if(O("Promise",u))t.push(4);if(O("String_fromCodePoint",f))t.push(5);if(O("String_proto_codePointAt",l))t.push(6);if(O("String_proto_startsWith",c))t.push(7);if(O("String_proto_endsWith",h))t.push(8);if(O("String_proto_includes",v))t.push(9);if(O("String_proto_repeat",p))t.push(10);if(O("Object_is",y))t.push(12);if(O("Object_setPrototypeOf",b))t.push(13);if(O("Function_proto_name",_))t.push(14);if(O("Math_sign",
|
=function(){if(typeof $rt_globals.String.prototype.startsWith==="undefined"){Object.defineProperty($rt_globals.String.prototype,"startsWith",{value:namedFunction("startsWith",function(str){var position=0;if(arguments.length>1){position=arguments[1];}var start=$rt_globals.Math.max(position,0)|0;return this.slice(start,start+str.length)===str;})});return true;}else {return false;}};var shim_String_proto_endsWith=function(){if(typeof $rt_globals.String.prototype.endsWith==="undefined"){Object.defineProperty($rt_globals.String.prototype,
|
||||||
S))t.push(15);if(O("Symbol",w))t.push(16);var P=t.length;E.__eaglercraftXES6ShimStatus={getShimInitStatus:function(){return (P>0?1:0)|(j?2:0);},getEnabledShimCount:function(){return P;},getEnabledShimID:function(e){return t[e];}};})();}catch(e){$rt_globals.console.error("ES6Shims: Failed to detect and enable shims for this browser! (Continuing anyway)");$rt_globals.console.error(e);E.__eaglercraftXES6ShimStatus={getShimInitStatus:function(){return -1;},getEnabledShimCount:function(){return 0;},getEnabledShimID
|
"endsWith",{value:namedFunction("endsWith",function(str){var len=this.length;var endPosition;if(arguments.length>1){endPosition=arguments[1];}var pos=typeof endPosition==="undefined"?len:endPosition|0;var end=$rt_globals.Math.min($rt_globals.Math.max(pos,0)|0,len);return this.slice(end -str.length,end)===str;})});return true;}else {return false;}};var shim_String_proto_includes=function(){if(typeof $rt_globals.String.prototype.includes==="undefined"){Object.defineProperty($rt_globals.String.prototype,"includes",
|
||||||
:function(e){return $rt_globals.undefined;}};}})($rt_globals);
|
{value:namedFunction("includes",function(str){var position;if(arguments.length>1){position=arguments[1];}return this.indexOf(str,position)!== -1;})});return true;}else {return false;}};var stringRepeatHelper;stringRepeatHelper=function(s,times){if(times<1){return '';}if(times%2){return stringRepeatHelper(s,times -1)+s;}var half=stringRepeatHelper(s,times/2);return half+half;};var shim_String_proto_repeat=function(){if(typeof $rt_globals.String.prototype.repeat==="undefined"){Object.defineProperty($rt_globals.String.prototype,
|
||||||
|
"repeat",{value:namedFunction("repeat",function(numTimes){if(numTimes>=$rt_globals.Infinity||(numTimes|=0)<0){throw new $rt_globals.RangeError("repeat count must be less than infinity and not overflow maximum string size");}return stringRepeatHelper(this,numTimes);})});return true;}else {return false;}};var shim_Object_is=function(){if(typeof Object.is==="undefined"){Object.defineProperty(Object,"is",{value:namedFunction("is",function(a,b){return a===b||a!==a&&b!==b;})});return true;}else {return false;}};var shim_Object_setPrototypeOf
|
||||||
|
=function(){if(typeof Object.setPrototypeOf==="undefined"){var theShim=function(Object,magic){var set;var checkArgs=function(O,proto){if(typeof O!=="object"||O===null){throw new $rt_globals.TypeError("can not set prototype on a non-object");}if(typeof proto!=="object"&&proto!==null){throw new $rt_globals.TypeError("can only set prototype to an object or null");}};var setPrototypeOf=function(O,proto){checkArgs(O,proto);set.call(O,proto);return O;};try {set=(Object.getOwnPropertyDescriptor(Object.prototype,magic)).set;set.call({
|
||||||
|
},null);}catch(o_O){if(Object.prototype!=={}[magic]||{__proto__:null}.__proto__===void 0){$rt_globals.console.error("ES6Shims: Can not shim Object.setPrototypeOf on this browser! Ignoring for now");return false;}set=function(proto){this[magic]=proto;};}return setPrototypeOf;}(Object,"__proto__");if(theShim){Object.defineProperty(Object,"setPrototypeOf",{value:namedFunction("setPrototypeOf",theShim)});return true;}else {return false;}}else {return false;}};var shim_Function_proto_name=function(){if($rt_globals.Math.max.name
|
||||||
|
!=="max"){Object.defineProperty($rt_globals.Function.prototype,"name",{configurable:true,enumerable:false,get:function(){if(this===$rt_globals.Function.prototype){return "";}var str=$rt_globals.Function.prototype.toString.call(this);var match=str.match(/\s*function\s+([^(\s]*)\s*/);var name=match&&match[1];Object.defineProperty(this,"name",{configurable:true,enumerable:false,writable:false,value:name});return name;}});return true;}else {return false;}};var shim_Math_sign=function(){if(typeof $rt_globals.Math.sign
|
||||||
|
==="undefined"){Object.defineProperty($rt_globals.Math,"sign",{value:namedFunction("sign",function(val){var number=$rt_globals.Number(val);if(number===0){return number;}if($rt_globals.isNaN(number)){return number;}return number<0? -1:1;})});return true;}else {return false;}};var shim_Symbol=function(){if(typeof $rt_globals.Symbol==="undefined"){Object.defineProperty(_jsGlobal,"Symbol",{value:function(){var symRet=namedFunction("Symbol",function(){return "[[ShimbolR_"+(($rt_globals.Math.random()).toString(36)).substring(2)
|
||||||
|
+"]]";});symRet.for=namedFunction("for",function(symName){if(!(typeof symName==="string"))return $rt_globals.undefined;return "[[ShimbolN_"+symName+"]]";});symRet.keyFor=namedFunction("keyFor",function(sym){return typeof sym==="string"&&sym.startsWith("[[ShimbolN_")&&sym.endsWith("]]")?sym.substring(11,sym.length -2):$rt_globals.undefined;});return symRet;}()});return true;}else {return false;}};var hasErrors=false;var shim_install=function(str,cb){try {return cb();}catch(_exx_){hasErrors=true;$rt_globals.console.error("ES6Shims: Failed to detect and enable shim \""
|
||||||
|
+str+"\" for this browser! (Continuing anyway)");$rt_globals.console.error(_exx_);return false;}};if(shim_install("Map",shim_Map))enabledShims.push(0);if(shim_install("WeakMap",shim_WeakMap))enabledShims.push(1);if(shim_install("Set",shim_Set))enabledShims.push(2);if(shim_install("WeakSet",shim_WeakSet))enabledShims.push(3);if(shim_install("Promise",shim_Promise))enabledShims.push(4);if(shim_install("String_fromCodePoint",shim_String_fromCodePoint))enabledShims.push(5);if(shim_install("String_proto_codePointAt",
|
||||||
|
shim_String_proto_codePointAt))enabledShims.push(6);if(shim_install("String_proto_startsWith",shim_String_proto_startsWith))enabledShims.push(7);if(shim_install("String_proto_endsWith",shim_String_proto_endsWith))enabledShims.push(8);if(shim_install("String_proto_includes",shim_String_proto_includes))enabledShims.push(9);if(shim_install("String_proto_repeat",shim_String_proto_repeat))enabledShims.push(10);if(shim_install("Object_is",shim_Object_is))enabledShims.push(12);if(shim_install("Object_setPrototypeOf",
|
||||||
|
shim_Object_setPrototypeOf))enabledShims.push(13);if(shim_install("Function_proto_name",shim_Function_proto_name))enabledShims.push(14);if(shim_install("Math_sign",shim_Math_sign))enabledShims.push(15);if(shim_install("Symbol",shim_Symbol))enabledShims.push(16);var enCnt=enabledShims.length;_jsGlobal.__eaglercraftXES6ShimStatus={getShimInitStatus:function(){return (enCnt>0?1:0)|(hasErrors?2:0);},getEnabledShimCount:function(){return enCnt;},getEnabledShimID:function(idxIn){return enabledShims[idxIn];}};})();}
|
||||||
|
catch(_ex_){$rt_globals.console.error("ES6Shims: Failed to detect and enable shims for this browser! (Continuing anyway)");$rt_globals.console.error(_ex_);_jsGlobal.__eaglercraftXES6ShimStatus={getShimInitStatus:function(){return -1;},getEnabledShimCount:function(){return 0;},getEnabledShimID:function(idxIn){return $rt_globals.undefined;}};}})($rt_globals);
|
|
@ -43,6 +43,7 @@ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFolderResourcePack;
|
||||||
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFontRenderer;
|
import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFontRenderer;
|
||||||
import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||||
import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage;
|
import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVideoSettingsWarning;
|
||||||
import net.lax1dude.eaglercraft.v1_8.notifications.ServerNotificationRenderer;
|
import net.lax1dude.eaglercraft.v1_8.notifications.ServerNotificationRenderer;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.EaglerMeshLoader;
|
import net.lax1dude.eaglercraft.v1_8.opengl.EaglerMeshLoader;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||||
|
@ -523,6 +524,11 @@ public class Minecraft implements IThreadListener {
|
||||||
mainMenu = new GuiConnecting(mainMenu, this, this.serverName, this.serverPort);
|
mainMenu = new GuiConnecting(mainMenu, this, this.serverName, this.serverPort);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int vidIssues = gameSettings.checkBadVideoSettings();
|
||||||
|
if (vidIssues != 0) {
|
||||||
|
mainMenu = new GuiScreenVideoSettingsWarning(mainMenu, vidIssues);
|
||||||
|
}
|
||||||
|
|
||||||
mainMenu = new GuiScreenEditProfile(mainMenu);
|
mainMenu = new GuiScreenEditProfile(mainMenu);
|
||||||
|
|
||||||
if (!EagRuntime.getConfiguration().isForceProfanityFilter() && !gameSettings.hasShownProfanityFilter) {
|
if (!EagRuntime.getConfiguration().isForceProfanityFilter() && !gameSettings.hasShownProfanityFilter) {
|
||||||
|
@ -1547,8 +1553,9 @@ public class Minecraft implements IThreadListener {
|
||||||
this.displayGuiScreen(new GuiChat("/"));
|
this.displayGuiScreen(new GuiChat("/"));
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean miningTouch = isMiningTouch();
|
boolean touchMode = PointerInputAbstraction.isTouchMode();
|
||||||
boolean useTouch = thePlayer.getItemShouldUseOnTouchEagler();
|
boolean miningTouch = touchMode && isMiningTouch();
|
||||||
|
boolean useTouch = touchMode && thePlayer.getItemShouldUseOnTouchEagler();
|
||||||
if (this.thePlayer.isUsingItem()) {
|
if (this.thePlayer.isUsingItem()) {
|
||||||
if (!this.gameSettings.keyBindUseItem.isKeyDown() && !miningTouch) {
|
if (!this.gameSettings.keyBindUseItem.isKeyDown() && !miningTouch) {
|
||||||
this.playerController.onStoppedUsingItem(this.thePlayer);
|
this.playerController.onStoppedUsingItem(this.thePlayer);
|
||||||
|
|
|
@ -3,6 +3,7 @@ package net.minecraft.client.gui;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.Display;
|
import net.lax1dude.eaglercraft.v1_8.Display;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVideoSettingsWarning;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||||
import net.lax1dude.eaglercraft.v1_8.recording.ScreenRecordingController;
|
import net.lax1dude.eaglercraft.v1_8.recording.ScreenRecordingController;
|
||||||
|
@ -115,9 +116,13 @@ public class GuiVideoSettings extends GuiScreen {
|
||||||
if (parGuiButton.enabled) {
|
if (parGuiButton.enabled) {
|
||||||
if (parGuiButton.id == 200) {
|
if (parGuiButton.id == 200) {
|
||||||
this.mc.gameSettings.saveOptions();
|
this.mc.gameSettings.saveOptions();
|
||||||
this.mc.displayGuiScreen(this.parentGuiScreen);
|
GuiScreen contScreen = parentGuiScreen;
|
||||||
|
int vidIssues = mc.gameSettings.checkBadVideoSettings();
|
||||||
|
if (vidIssues != 0) {
|
||||||
|
contScreen = new GuiScreenVideoSettingsWarning(contScreen, vidIssues);
|
||||||
|
}
|
||||||
|
this.mc.displayGuiScreen(contScreen);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@ import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
|
||||||
import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
|
import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
|
||||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||||
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||||
|
import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVideoSettingsWarning;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredConfig;
|
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredConfig;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
|
import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
|
||||||
import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||||
|
@ -212,6 +213,7 @@ public class GameSettings {
|
||||||
public boolean hasShownProfanityFilter = false;
|
public boolean hasShownProfanityFilter = false;
|
||||||
public float touchControlOpacity = 1.0f;
|
public float touchControlOpacity = 1.0f;
|
||||||
public boolean hideDefaultUsernameWarning = false;
|
public boolean hideDefaultUsernameWarning = false;
|
||||||
|
public boolean hideVideoSettingsWarning = false;
|
||||||
|
|
||||||
public int voiceListenRadius = 16;
|
public int voiceListenRadius = 16;
|
||||||
public float voiceListenVolume = 0.5f;
|
public float voiceListenVolume = 0.5f;
|
||||||
|
@ -1077,6 +1079,10 @@ public class GameSettings {
|
||||||
this.hideDefaultUsernameWarning = astring[1].equals("true");
|
this.hideDefaultUsernameWarning = astring[1].equals("true");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (astring[0].equals("hideVideoSettingsWarning")) {
|
||||||
|
hideVideoSettingsWarning = astring[1].equals("true");
|
||||||
|
}
|
||||||
|
|
||||||
deferredShaderConf.readOption(astring[0], astring[1]);
|
deferredShaderConf.readOption(astring[0], astring[1]);
|
||||||
} catch (Exception var8) {
|
} catch (Exception var8) {
|
||||||
logger.warn("Skipping bad option: " + s);
|
logger.warn("Skipping bad option: " + s);
|
||||||
|
@ -1219,6 +1225,7 @@ public class GameSettings {
|
||||||
printwriter.println("screenRecordMicVolume:" + this.screenRecordMicVolume);
|
printwriter.println("screenRecordMicVolume:" + this.screenRecordMicVolume);
|
||||||
printwriter.println("touchControlOpacity:" + this.touchControlOpacity);
|
printwriter.println("touchControlOpacity:" + this.touchControlOpacity);
|
||||||
printwriter.println("hideDefaultUsernameWarning:" + this.hideDefaultUsernameWarning);
|
printwriter.println("hideDefaultUsernameWarning:" + this.hideDefaultUsernameWarning);
|
||||||
|
printwriter.println("hideVideoSettingsWarning:" + this.hideVideoSettingsWarning);
|
||||||
|
|
||||||
for (KeyBinding keybinding : this.keyBindings) {
|
for (KeyBinding keybinding : this.keyBindings) {
|
||||||
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
|
printwriter.println("key_" + keybinding.getKeyDescription() + ":" + keybinding.getKeyCode());
|
||||||
|
@ -1317,6 +1324,22 @@ public class GameSettings {
|
||||||
return arr.toString();
|
return arr.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int checkBadVideoSettings() {
|
||||||
|
return hideVideoSettingsWarning ? 0
|
||||||
|
: ((renderDistanceChunks > 6 ? GuiScreenVideoSettingsWarning.WARNING_RENDER_DISTANCE : 0)
|
||||||
|
| (!enableVsync ? GuiScreenVideoSettingsWarning.WARNING_VSYNC : 0)
|
||||||
|
| (limitFramerate < 30 ? GuiScreenVideoSettingsWarning.WARNING_FRAME_LIMIT : 0));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void fixBadVideoSettings() {
|
||||||
|
if (renderDistanceChunks > 6)
|
||||||
|
renderDistanceChunks = 4;
|
||||||
|
if (!enableVsync)
|
||||||
|
enableVsync = true;
|
||||||
|
if (limitFramerate < 30)
|
||||||
|
limitFramerate = 260;
|
||||||
|
}
|
||||||
|
|
||||||
public static enum Options {
|
public static enum Options {
|
||||||
INVERT_MOUSE("options.invertMouse", false, true), SENSITIVITY("options.sensitivity", true, false),
|
INVERT_MOUSE("options.invertMouse", false, true), SENSITIVITY("options.sensitivity", true, false),
|
||||||
FOV("options.fov", true, false, 30.0F, 110.0F, 1.0F), GAMMA("options.gamma", true, false),
|
FOV("options.fov", true, false, 30.0F, 110.0F, 1.0F), GAMMA("options.gamma", true, false),
|
||||||
|
|
|
@ -268,51 +268,53 @@ public class PlatformRuntime {
|
||||||
|
|
||||||
glfwSwapInterval(0);
|
glfwSwapInterval(0);
|
||||||
|
|
||||||
KHRDebug.glDebugMessageCallbackKHR(new GLDebugMessageKHRCallbackI() {
|
if(!requestedDisableKHRDebug) {
|
||||||
@Override
|
KHRDebug.glDebugMessageCallbackKHR(new GLDebugMessageKHRCallbackI() {
|
||||||
public void invoke(int source, int type, int id, int severity, int length, long message, long userParam) {
|
@Override
|
||||||
StringBuilder b = new StringBuilder();
|
public void invoke(int source, int type, int id, int severity, int length, long message, long userParam) {
|
||||||
b.append("[KHR DEBUG #"); b.append(id); b.append("] ");
|
StringBuilder b = new StringBuilder();
|
||||||
|
b.append("[KHR DEBUG #"); b.append(id); b.append("] ");
|
||||||
|
|
||||||
switch(source) {
|
switch(source) {
|
||||||
case KHRDebug.GL_DEBUG_SOURCE_API_KHR: b.append("[API - "); break;
|
case KHRDebug.GL_DEBUG_SOURCE_API_KHR: b.append("[API - "); break;
|
||||||
case KHRDebug.GL_DEBUG_SOURCE_APPLICATION_KHR: b.append("[APPLICATION - "); break;
|
case KHRDebug.GL_DEBUG_SOURCE_APPLICATION_KHR: b.append("[APPLICATION - "); break;
|
||||||
case KHRDebug.GL_DEBUG_SOURCE_SHADER_COMPILER_KHR: b.append("[SHADER COMPILER - "); break;
|
case KHRDebug.GL_DEBUG_SOURCE_SHADER_COMPILER_KHR: b.append("[SHADER COMPILER - "); break;
|
||||||
case KHRDebug.GL_DEBUG_SOURCE_THIRD_PARTY_KHR: b.append("[THIRD PARTY - "); break;
|
case KHRDebug.GL_DEBUG_SOURCE_THIRD_PARTY_KHR: b.append("[THIRD PARTY - "); break;
|
||||||
case KHRDebug.GL_DEBUG_SOURCE_OTHER_KHR: default: b.append("[OTHER - "); break;
|
case KHRDebug.GL_DEBUG_SOURCE_OTHER_KHR: default: b.append("[OTHER - "); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(type) {
|
||||||
|
case KHRDebug.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR: b.append("DEPRECATED BEHAVIOR] "); break;
|
||||||
|
case KHRDebug.GL_DEBUG_TYPE_ERROR_KHR: b.append("ERROR] "); break;
|
||||||
|
default:
|
||||||
|
case KHRDebug.GL_DEBUG_TYPE_OTHER_KHR: b.append("OTHER] "); break;
|
||||||
|
case KHRDebug.GL_DEBUG_TYPE_PERFORMANCE_KHR: b.append("PERFORMANCE] "); break;
|
||||||
|
case KHRDebug.GL_DEBUG_TYPE_PORTABILITY_KHR: b.append("PORTABILITY] "); break;
|
||||||
|
case KHRDebug.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR: b.append("UNDEFINED BEHAVIOR] "); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch(severity) {
|
||||||
|
default:
|
||||||
|
case KHRDebug.GL_DEBUG_SEVERITY_LOW_KHR: b.append("[LOW Severity] "); break;
|
||||||
|
case KHRDebug.GL_DEBUG_SEVERITY_MEDIUM_KHR: b.append("[MEDIUM Severity] "); break;
|
||||||
|
case KHRDebug.GL_DEBUG_SEVERITY_HIGH_KHR: b.append("[SEVERE] "); break;
|
||||||
|
}
|
||||||
|
|
||||||
|
String message2 = GLDebugMessageKHRCallback.getMessage(length, message);
|
||||||
|
if(message2.contains("GPU stall due to ReadPixels")) return;
|
||||||
|
b.append(message2);
|
||||||
|
logger.error(b.toString());
|
||||||
|
|
||||||
|
StackTraceElement[] ex = new RuntimeException().getStackTrace();
|
||||||
|
for(int i = 0; i < ex.length; ++i) {
|
||||||
|
logger.error(" at {}", ex[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}, 0l);
|
||||||
|
|
||||||
switch(type) {
|
GLES30.glEnable(KHRDebug.GL_DEBUG_OUTPUT_KHR);
|
||||||
case KHRDebug.GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_KHR: b.append("DEPRECATED BEHAVIOR] "); break;
|
GLES30.glEnable(KHRDebug.GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR);
|
||||||
case KHRDebug.GL_DEBUG_TYPE_ERROR_KHR: b.append("ERROR] "); break;
|
}
|
||||||
default:
|
|
||||||
case KHRDebug.GL_DEBUG_TYPE_OTHER_KHR: b.append("OTHER] "); break;
|
|
||||||
case KHRDebug.GL_DEBUG_TYPE_PERFORMANCE_KHR: b.append("PERFORMANCE] "); break;
|
|
||||||
case KHRDebug.GL_DEBUG_TYPE_PORTABILITY_KHR: b.append("PORTABILITY] "); break;
|
|
||||||
case KHRDebug.GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_KHR: b.append("UNDEFINED BEHAVIOR] "); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(severity) {
|
|
||||||
default:
|
|
||||||
case KHRDebug.GL_DEBUG_SEVERITY_LOW_KHR: b.append("[LOW Severity] "); break;
|
|
||||||
case KHRDebug.GL_DEBUG_SEVERITY_MEDIUM_KHR: b.append("[MEDIUM Severity] "); break;
|
|
||||||
case KHRDebug.GL_DEBUG_SEVERITY_HIGH_KHR: b.append("[SEVERE] "); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
String message2 = GLDebugMessageKHRCallback.getMessage(length, message);
|
|
||||||
if(message2.contains("GPU stall due to ReadPixels")) return;
|
|
||||||
b.append(message2);
|
|
||||||
logger.error(b.toString());
|
|
||||||
|
|
||||||
StackTraceElement[] ex = new RuntimeException().getStackTrace();
|
|
||||||
for(int i = 0; i < ex.length; ++i) {
|
|
||||||
logger.error(" at {}", ex[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 0l);
|
|
||||||
|
|
||||||
GLES30.glEnable(KHRDebug.GL_DEBUG_OUTPUT_KHR);
|
|
||||||
GLES30.glEnable(KHRDebug.GL_DEBUG_OUTPUT_SYNCHRONOUS_KHR);
|
|
||||||
|
|
||||||
logger.info("Initializing Audio...");
|
logger.info("Initializing Audio...");
|
||||||
PlatformAudio.platformInitialize();
|
PlatformAudio.platformInitialize();
|
||||||
|
@ -361,6 +363,7 @@ public class PlatformRuntime {
|
||||||
|
|
||||||
private static EnumPlatformANGLE requestedANGLEPlatform = EnumPlatformANGLE.DEFAULT;
|
private static EnumPlatformANGLE requestedANGLEPlatform = EnumPlatformANGLE.DEFAULT;
|
||||||
private static int requestedGLVersion = 300;
|
private static int requestedGLVersion = 300;
|
||||||
|
private static boolean requestedDisableKHRDebug = false;
|
||||||
|
|
||||||
public static void requestANGLE(EnumPlatformANGLE plaf) {
|
public static void requestANGLE(EnumPlatformANGLE plaf) {
|
||||||
requestedANGLEPlatform = plaf;
|
requestedANGLEPlatform = plaf;
|
||||||
|
@ -370,6 +373,10 @@ public class PlatformRuntime {
|
||||||
requestedGLVersion = i;
|
requestedGLVersion = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void requestDisableKHRDebug(boolean dis) {
|
||||||
|
requestedDisableKHRDebug = dis;
|
||||||
|
}
|
||||||
|
|
||||||
public static EnumPlatformANGLE getPlatformANGLE() {
|
public static EnumPlatformANGLE getPlatformANGLE() {
|
||||||
return rendererANGLEPlatform;
|
return rendererANGLEPlatform;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,6 @@ package net.lax1dude.eaglercraft.v1_8.internal;
|
||||||
import dev.onvoid.webrtc.*;
|
import dev.onvoid.webrtc.*;
|
||||||
import dev.onvoid.webrtc.internal.NativeLoader;
|
import dev.onvoid.webrtc.internal.NativeLoader;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||||
import net.lax1dude.eaglercraft.v1_8.EagUtils;
|
|
||||||
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||||
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||||
import net.lax1dude.eaglercraft.v1_8.sp.lan.LANPeerEvent;
|
import net.lax1dude.eaglercraft.v1_8.sp.lan.LANPeerEvent;
|
||||||
|
@ -257,14 +256,19 @@ public class PlatformWebRTC {
|
||||||
@Override
|
@Override
|
||||||
public void onStateChange() {
|
public void onStateChange() {
|
||||||
if (dataChannel != null && dataChannel.getState() == RTCDataChannelState.OPEN) {
|
if (dataChannel != null && dataChannel.getState() == RTCDataChannelState.OPEN) {
|
||||||
scheduleTask(-1l, () -> {
|
final Runnable[] retry = new Runnable[1];
|
||||||
while (true) {
|
final int[] loopCount = new int[1];
|
||||||
|
scheduleTask(-1l, retry[0] = () -> {
|
||||||
|
f: {
|
||||||
synchronized (lock1) {
|
synchronized (lock1) {
|
||||||
if (iceCandidates.isEmpty()) {
|
if (iceCandidates.isEmpty()) {
|
||||||
break;
|
break f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EagUtils.sleep(1);
|
if(++loopCount[0] < 5) {
|
||||||
|
scheduleTask(1000l, retry[0]);
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
synchronized (lock2) {
|
synchronized (lock2) {
|
||||||
clientDataChannelClosed = false;
|
clientDataChannelClosed = false;
|
||||||
|
@ -562,14 +566,20 @@ public class PlatformWebRTC {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDataChannel(RTCDataChannel dataChannel) {
|
public void onDataChannel(RTCDataChannel dataChannel) {
|
||||||
scheduleTask(-1l, () -> {
|
final Runnable[] retry = new Runnable[1];
|
||||||
while (true) {
|
final int[] loopCount = new int[1];
|
||||||
|
scheduleTask(-1l, retry[0] = () -> {
|
||||||
|
int i = 0;
|
||||||
|
f: {
|
||||||
synchronized (lock3) {
|
synchronized (lock3) {
|
||||||
if (iceCandidates.isEmpty()) {
|
if (iceCandidates.isEmpty()) {
|
||||||
break;
|
break f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EagUtils.sleep(1);
|
if(++loopCount[0] < 5) {
|
||||||
|
scheduleTask(1000l, retry[0]);
|
||||||
|
}
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
if (dataChannel == null) return;
|
if (dataChannel == null) return;
|
||||||
synchronized (fuckTeaVM) {
|
synchronized (fuckTeaVM) {
|
||||||
|
|
|
@ -87,6 +87,8 @@ public class LWJGLEntryPoint {
|
||||||
PlatformRuntime.requestGL(300);
|
PlatformRuntime.requestGL(300);
|
||||||
}else if(args[i].equalsIgnoreCase("gles=310")) {
|
}else if(args[i].equalsIgnoreCase("gles=310")) {
|
||||||
PlatformRuntime.requestGL(310);
|
PlatformRuntime.requestGL(310);
|
||||||
|
}else if(args[i].equalsIgnoreCase("disableKHRDebug")) {
|
||||||
|
PlatformRuntime.requestDisableKHRDebug(true);
|
||||||
}else {
|
}else {
|
||||||
EnumPlatformANGLE angle = EnumPlatformANGLE.fromId(args[i]);
|
EnumPlatformANGLE angle = EnumPlatformANGLE.fromId(args[i]);
|
||||||
if(angle != EnumPlatformANGLE.DEFAULT) {
|
if(angle != EnumPlatformANGLE.DEFAULT) {
|
||||||
|
|
|
@ -10,7 +10,7 @@ public class EaglercraftVersion {
|
||||||
/// Customize these to fit your fork:
|
/// Customize these to fit your fork:
|
||||||
|
|
||||||
public static final String projectForkName = "EaglercraftX";
|
public static final String projectForkName = "EaglercraftX";
|
||||||
public static final String projectForkVersion = "u40";
|
public static final String projectForkVersion = "u41";
|
||||||
public static final String projectForkVendor = "lax1dude";
|
public static final String projectForkVendor = "lax1dude";
|
||||||
|
|
||||||
public static final String projectForkURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8";
|
public static final String projectForkURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8";
|
||||||
|
@ -20,20 +20,20 @@ public class EaglercraftVersion {
|
||||||
public static final String projectOriginName = "EaglercraftX";
|
public static final String projectOriginName = "EaglercraftX";
|
||||||
public static final String projectOriginAuthor = "lax1dude";
|
public static final String projectOriginAuthor = "lax1dude";
|
||||||
public static final String projectOriginRevision = "1.8";
|
public static final String projectOriginRevision = "1.8";
|
||||||
public static final String projectOriginVersion = "u40";
|
public static final String projectOriginVersion = "u41";
|
||||||
|
|
||||||
public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; // rest in peace
|
public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; // rest in peace
|
||||||
|
|
||||||
// EPK Version Identifier
|
// EPK Version Identifier
|
||||||
|
|
||||||
public static final String EPKVersionIdentifier = "u40"; // Set to null to disable EPK version check
|
public static final String EPKVersionIdentifier = "u41"; // Set to null to disable EPK version check
|
||||||
|
|
||||||
// Updating configuration
|
// Updating configuration
|
||||||
|
|
||||||
public static final boolean enableUpdateService = true;
|
public static final boolean enableUpdateService = true;
|
||||||
|
|
||||||
public static final String updateBundlePackageName = "net.lax1dude.eaglercraft.v1_8.client";
|
public static final String updateBundlePackageName = "net.lax1dude.eaglercraft.v1_8.client";
|
||||||
public static final int updateBundlePackageVersionInt = 40;
|
public static final int updateBundlePackageVersionInt = 41;
|
||||||
|
|
||||||
public static final String updateLatestLocalStorageKey = "latestUpdate_" + updateBundlePackageName;
|
public static final String updateLatestLocalStorageKey = "latestUpdate_" + updateBundlePackageName;
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,114 @@
|
||||||
|
package net.lax1dude.eaglercraft.v1_8.minecraft;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import net.minecraft.client.gui.GuiButton;
|
||||||
|
import net.minecraft.client.gui.GuiScreen;
|
||||||
|
import net.minecraft.client.resources.I18n;
|
||||||
|
import net.minecraft.util.EnumChatFormatting;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Copyright (c) 2024 lax1dude. All Rights Reserved.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||||
|
* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||||
|
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||||
|
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
||||||
|
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
|
||||||
|
* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||||
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||||
|
* POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public class GuiScreenVideoSettingsWarning extends GuiScreen {
|
||||||
|
|
||||||
|
private final GuiScreen cont;
|
||||||
|
private final int mask;
|
||||||
|
private final List<String> messages = new ArrayList<>();
|
||||||
|
private int top = 0;
|
||||||
|
|
||||||
|
public static final int WARNING_VSYNC = 1;
|
||||||
|
public static final int WARNING_RENDER_DISTANCE = 2;
|
||||||
|
public static final int WARNING_FRAME_LIMIT = 4;
|
||||||
|
|
||||||
|
public GuiScreenVideoSettingsWarning(GuiScreen cont, int mask) {
|
||||||
|
this.cont = cont;
|
||||||
|
this.mask = mask;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void initGui() {
|
||||||
|
messages.clear();
|
||||||
|
messages.add(EnumChatFormatting.RED + I18n.format("options.badVideoSettingsDetected.title"));
|
||||||
|
messages.add(null);
|
||||||
|
messages.add(EnumChatFormatting.GRAY + I18n.format("options.badVideoSettingsDetected.0"));
|
||||||
|
messages.add(EnumChatFormatting.GRAY + I18n.format("options.badVideoSettingsDetected.1"));
|
||||||
|
if((mask & WARNING_VSYNC) != 0) {
|
||||||
|
messages.add(null);
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.0"));
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.1"));
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.2"));
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.3"));
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.vsync.4"));
|
||||||
|
}
|
||||||
|
if((mask & WARNING_RENDER_DISTANCE) != 0) {
|
||||||
|
messages.add(null);
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.renderDistance.0", mc.gameSettings.renderDistanceChunks));
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.renderDistance.1"));
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.renderDistance.2"));
|
||||||
|
}
|
||||||
|
if((mask & WARNING_FRAME_LIMIT) != 0) {
|
||||||
|
messages.add(null);
|
||||||
|
messages.add(I18n.format("options.badVideoSettingsDetected.frameLimit.0", mc.gameSettings.limitFramerate));
|
||||||
|
}
|
||||||
|
int j = 0;
|
||||||
|
for(int i = 0, l = messages.size(); i < l; ++i) {
|
||||||
|
if(messages.get(i) != null) {
|
||||||
|
j += 9;
|
||||||
|
}else {
|
||||||
|
j += 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
top = this.height / 6 + j / -12;
|
||||||
|
j += top;
|
||||||
|
buttonList.clear();
|
||||||
|
buttonList.add(new GuiButton(0, this.width / 2 - 100, j + 16, I18n.format("options.badVideoSettingsDetected.fixSettings")));
|
||||||
|
buttonList.add(new GuiButton(1, this.width / 2 - 100, j + 40, I18n.format("options.badVideoSettingsDetected.continueAnyway")));
|
||||||
|
buttonList.add(new GuiButton(2, this.width / 2 - 100, j + 64, I18n.format("options.badVideoSettingsDetected.doNotShowAgain")));
|
||||||
|
}
|
||||||
|
|
||||||
|
public void drawScreen(int par1, int par2, float par3) {
|
||||||
|
this.drawDefaultBackground();
|
||||||
|
int j = 0;
|
||||||
|
for(int i = 0, l = messages.size(); i < l; ++i) {
|
||||||
|
String str = messages.get(i);
|
||||||
|
if(str != null) {
|
||||||
|
this.drawCenteredString(fontRendererObj, str, this.width / 2, top + j, 16777215);
|
||||||
|
j += 9;
|
||||||
|
}else {
|
||||||
|
j += 5;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
super.drawScreen(par1, par2, par3);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void actionPerformed(GuiButton par1GuiButton) {
|
||||||
|
if(par1GuiButton.id == 0) {
|
||||||
|
mc.gameSettings.fixBadVideoSettings();
|
||||||
|
mc.gameSettings.saveOptions();
|
||||||
|
if((mask & WARNING_RENDER_DISTANCE) != 0) {
|
||||||
|
mc.renderGlobal.loadRenderers();
|
||||||
|
}
|
||||||
|
mc.displayGuiScreen(cont);
|
||||||
|
}else if(par1GuiButton.id == 1) {
|
||||||
|
mc.displayGuiScreen(cont);
|
||||||
|
}else if(par1GuiButton.id == 2) {
|
||||||
|
mc.gameSettings.hideVideoSettingsWarning = true;
|
||||||
|
mc.gameSettings.saveOptions();
|
||||||
|
mc.displayGuiScreen(cont);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
|
@ -50,6 +50,7 @@ class LANClientPeer {
|
||||||
PlatformWebRTC.serverLANPeerICECandidates(clientId, candidates);
|
PlatformWebRTC.serverLANPeerICECandidates(clientId, candidates);
|
||||||
long millis = EagRuntime.steadyTimeMillis();
|
long millis = EagRuntime.steadyTimeMillis();
|
||||||
do {
|
do {
|
||||||
|
PlatformWebRTC.runScheduledTasks();
|
||||||
LANPeerEvent evt;
|
LANPeerEvent evt;
|
||||||
if((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null) {
|
if((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null) {
|
||||||
if(evt instanceof LANPeerEvent.LANPeerICECandidateEvent) {
|
if(evt instanceof LANPeerEvent.LANPeerICECandidateEvent) {
|
||||||
|
@ -78,6 +79,7 @@ class LANClientPeer {
|
||||||
PlatformWebRTC.serverLANPeerDescription(clientId, description);
|
PlatformWebRTC.serverLANPeerDescription(clientId, description);
|
||||||
long millis = EagRuntime.steadyTimeMillis();
|
long millis = EagRuntime.steadyTimeMillis();
|
||||||
do {
|
do {
|
||||||
|
PlatformWebRTC.runScheduledTasks();
|
||||||
LANPeerEvent evt;
|
LANPeerEvent evt;
|
||||||
if((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null) {
|
if((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null) {
|
||||||
if(evt instanceof LANPeerEvent.LANPeerDescriptionEvent) {
|
if(evt instanceof LANPeerEvent.LANPeerDescriptionEvent) {
|
||||||
|
@ -105,6 +107,7 @@ class LANClientPeer {
|
||||||
if(state == SENT_ICE_CANDIDATE) {
|
if(state == SENT_ICE_CANDIDATE) {
|
||||||
long millis = EagRuntime.steadyTimeMillis();
|
long millis = EagRuntime.steadyTimeMillis();
|
||||||
do {
|
do {
|
||||||
|
PlatformWebRTC.runScheduledTasks();
|
||||||
LANPeerEvent evt;
|
LANPeerEvent evt;
|
||||||
while((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null && evt instanceof LANPeerEvent.LANPeerICECandidateEvent) {
|
while((evt = PlatformWebRTC.serverLANGetEvent(clientId)) != null && evt instanceof LANPeerEvent.LANPeerICECandidateEvent) {
|
||||||
// skip ice candidates
|
// skip ice candidates
|
||||||
|
|
|
@ -314,7 +314,7 @@ public class BootMenuDatastore {
|
||||||
@Override
|
@Override
|
||||||
public void handleEvent() {
|
public void handleEvent() {
|
||||||
IDBCursor c = r.getResult();
|
IDBCursor c = r.getResult();
|
||||||
if(c == null || c.getKey() == null || c.getValue() == null) {
|
if(c == null || c.getKey() == null) {
|
||||||
cb.complete(res[0]);
|
cb.complete(res[0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,10 +68,13 @@ public class PlatformApplication {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void setClipboard(String text) {
|
public static void setClipboard(String text) {
|
||||||
|
boolean b = false;
|
||||||
try {
|
try {
|
||||||
setClipboard0(text);
|
b = setClipboard0(text);
|
||||||
}catch(Throwable t) {
|
}catch(Throwable t) {
|
||||||
PlatformRuntime.logger.error("Exception setting clipboard data");
|
PlatformRuntime.logger.error("Exception setting clipboard data");
|
||||||
|
}
|
||||||
|
if(!b) {
|
||||||
try {
|
try {
|
||||||
Window.prompt("Here is the text you're trying to copy:", text);
|
Window.prompt("Here is the text you're trying to copy:", text);
|
||||||
}catch(Throwable t2) {
|
}catch(Throwable t2) {
|
||||||
|
@ -80,17 +83,19 @@ public class PlatformApplication {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getClipboard() {
|
public static String getClipboard() {
|
||||||
|
String ret = null;
|
||||||
try {
|
try {
|
||||||
return getClipboard0();
|
ret = getClipboard0();
|
||||||
}catch(Throwable t) {
|
}catch(Throwable t) {
|
||||||
PlatformRuntime.logger.error("Exception getting clipboard data");
|
PlatformRuntime.logger.error("Exception getting clipboard data");
|
||||||
|
}
|
||||||
|
if(ret == null) {
|
||||||
try {
|
try {
|
||||||
String ret = Window.prompt("Please enter the text to paste:");
|
ret = Window.prompt("Please enter the text to paste:");
|
||||||
return ret != null ? ret : "";
|
|
||||||
}catch(Throwable t2) {
|
}catch(Throwable t2) {
|
||||||
return "";
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return ret != null ? ret : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSFunctor
|
@JSFunctor
|
||||||
|
@ -114,11 +119,11 @@ public class PlatformApplication {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSBody(params = { "cb" }, script = "if(!navigator.clipboard) { cb(prompt(\"Please enter the text to paste:\") || \"\"); } else if (!navigator.clipboard.readText) cb(\"\"); else navigator.clipboard.readText().then(function(s) { cb(s); }, function(s) { cb(\"\"); });")
|
@JSBody(params = { "cb" }, script = "if(!navigator.clipboard) { cb(null); } else if (!navigator.clipboard.readText) cb(null); else navigator.clipboard.readText().then(function(s) { cb(s || null); }, function() { cb(null); });")
|
||||||
private static native void getClipboard1(StupidFunctionResolveString cb);
|
private static native void getClipboard1(StupidFunctionResolveString cb);
|
||||||
|
|
||||||
@JSBody(params = { "str" }, script = "if(navigator.clipboard) navigator.clipboard.writeText(str);")
|
@JSBody(params = { "str" }, script = "if(navigator.clipboard) { navigator.clipboard.writeText(str); return true; } else { return false; }")
|
||||||
private static native void setClipboard0(String str);
|
private static native boolean setClipboard0(String str);
|
||||||
|
|
||||||
public static void setLocalStorage(String name, byte[] data) {
|
public static void setLocalStorage(String name, byte[] data) {
|
||||||
setLocalStorage(name, data, true);
|
setLocalStorage(name, data, true);
|
||||||
|
|
|
@ -252,7 +252,7 @@ public class PlatformRuntime {
|
||||||
}
|
}
|
||||||
|
|
||||||
useVisualViewport = false;
|
useVisualViewport = false;
|
||||||
if(isVisualViewportSupported(System.currentTimeMillis())) {
|
if(isVisualViewportSupported()) {
|
||||||
if(isEmbeddedInBody) {
|
if(isEmbeddedInBody) {
|
||||||
useVisualViewport = true;
|
useVisualViewport = true;
|
||||||
}else {
|
}else {
|
||||||
|
@ -525,8 +525,8 @@ public class PlatformRuntime {
|
||||||
return EnumPlatformOS.getFromUA(getUserAgentString());
|
return EnumPlatformOS.getFromUA(getUserAgentString());
|
||||||
}
|
}
|
||||||
|
|
||||||
@JSBody(params = { "ts" }, script = "if(ts > 1728322572561 && window[decodeURIComponent(\"%6C%6F%63%61%74%69%6F%6E\")][decodeURIComponent(\"%68%6F%73%74%6E%61%6D%65\")] === decodeURIComponent(\"%65%61%67%6C%65%72%63%72%61%66%74%2E%64%65%76\")) setTimeout(function() { var i = 1; while(i > 0) { ++i; } }, 353000); return (typeof visualViewport !== \"undefined\");")
|
@JSBody(params = { }, script = "return (typeof visualViewport !== \"undefined\");")
|
||||||
private static native boolean isVisualViewportSupported(double ts);
|
private static native boolean isVisualViewportSupported();
|
||||||
|
|
||||||
@JSBody(params = { }, script = "return visualViewport;")
|
@JSBody(params = { }, script = "return visualViewport;")
|
||||||
static native VisualViewport getVisualViewport();
|
static native VisualViewport getVisualViewport();
|
||||||
|
|
|
@ -279,6 +279,10 @@ public class EarlyLoadScreen {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void loadFinal(byte[] image) {
|
public static void loadFinal(byte[] image) {
|
||||||
|
ImageData img = PlatformAssets.loadImageFile(image);
|
||||||
|
if(img == null) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
finalTexture = _wglGenTextures();
|
finalTexture = _wglGenTextures();
|
||||||
_wglActiveTexture(GL_TEXTURE0);
|
_wglActiveTexture(GL_TEXTURE0);
|
||||||
_wglBindTexture(GL_TEXTURE_2D, finalTexture);
|
_wglBindTexture(GL_TEXTURE_2D, finalTexture);
|
||||||
|
@ -286,11 +290,10 @@ public class EarlyLoadScreen {
|
||||||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
|
||||||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
_wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
|
||||||
ImageData img = PlatformAssets.loadImageFile(image);
|
IntBuffer upload = PlatformRuntime.allocateIntBuffer(img.width * img.height);
|
||||||
IntBuffer upload = PlatformRuntime.allocateIntBuffer(256*256);
|
|
||||||
upload.put(img.pixels);
|
upload.put(img.pixels);
|
||||||
upload.flip();
|
upload.flip();
|
||||||
_wglTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 256, 256, 0, GL_RGBA, GL_UNSIGNED_BYTE, upload);
|
_wglTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, img.width, img.height, 0, GL_RGBA, GL_UNSIGNED_BYTE, upload);
|
||||||
PlatformRuntime.freeIntBuffer(upload);
|
PlatformRuntime.freeIntBuffer(upload);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -290,7 +290,7 @@ public class IndexedDBFilesystem implements IEaglerFilesystem {
|
||||||
@Override
|
@Override
|
||||||
public void handleEvent() {
|
public void handleEvent() {
|
||||||
IDBCursor c = r.getResult();
|
IDBCursor c = r.getResult();
|
||||||
if(c == null || c.getKey() == null || c.getValue() == null) {
|
if(c == null || c.getKey() == null) {
|
||||||
cb.complete(res[0]);
|
cb.complete(res[0]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user