Update #37 - Touch support without userscript, many other feats
This commit is contained in:
parent
173727c8c4
commit
ec1ab8ece3
CODE_STANDARDS.mdCREDITSREADME.md
buildtools
BuildTools.jarproduction-index-ext.htmlproduction-index.html
client_versionsrc/main/java/net/lax1dude/eaglercraft/v1_8/buildtools
patches/minecraft
delete.txt
net/minecraft
client
LoadingScreenRenderer.edit.javaMinecraft.edit.java
audio
entity
gui
ChatLine.edit.javaFontRenderer.edit.javaGuiButton.edit.javaGuiChat.edit.javaGuiCommandBlock.edit.javaGuiControls.edit.javaGuiCreateFlatWorld.edit.javaGuiCreateWorld.edit.javaGuiCustomizeWorldScreen.edit.javaGuiDownloadTerrain.edit.javaGuiEnchantment.edit.javaGuiFlatPresets.edit.javaGuiIngame.edit.javaGuiIngameMenu.edit.javaGuiKeyBindingList.edit.javaGuiLanguage.edit.javaGuiMainMenu.edit.javaGuiMultiplayer.edit.javaGuiNewChat.edit.javaGuiOptionSlider.edit.javaGuiOptions.edit.javaGuiOptionsRowList.edit.javaGuiOverlayDebug.edit.javaGuiPageButtonList.edit.javaGuiPlayerTabOverlay.edit.javaGuiRenameWorld.edit.javaGuiRepair.edit.javaGuiScreen.edit.javaGuiScreenAddServer.edit.javaGuiScreenBook.edit.javaGuiScreenCustomizePresets.edit.javaGuiScreenOptionsSounds.edit.javaGuiScreenResourcePacks.edit.javaGuiScreenServerList.edit.javaGuiSelectWorld.edit.javaGuiSlider.edit.javaGuiSlot.edit.javaGuiTextField.edit.javaGuiUtilRenderComponents.edit.javaGuiVideoSettings.edit.javaScaledResolution.edit.javaScreenChatOptions.edit.java
achievement
inventory
multiplayer
ChunkProviderClient.edit.javaGuiConnecting.edit.javaPlayerControllerMP.edit.javaServerData.edit.javaServerList.edit.javaWorldClient.edit.java
network
particle
renderer
resources
settings
entity
306
CODE_STANDARDS.md
Normal file
306
CODE_STANDARDS.md
Normal file
@ -0,0 +1,306 @@
|
||||
# Eaglercraft Code Standards
|
||||
|
||||
**These are some basic rules to follow if you would like to write code that is consistent with the Eaglercraft 1.8 codebase. If you are already familiar with Eaglercraft 1.5 or b1.3, please abandon whatever you think is the best practice as a result of reading that code, those clients should be considered as obsolete prototypes.**
|
||||
|
||||
## Part A. Coding Style
|
||||
|
||||
### 1. Tabs, not spaces
|
||||
|
||||
Tabs not spaces, it makes indentation easier to manage and reduces file size. Other popular projects that are also known to use tabs instead of spaces include the linux kernel. We prefer to set tab width to 4 spaces on our editors.
|
||||
|
||||
Format code like the eclipse formatter on factory settings
|
||||
|
||||
### 2. Avoid redundant hash map lookups
|
||||
|
||||
Don't retrieve the same value from a hash map more than once, that includes checking if an entry exists first before retrieving its value. If you do this, you are a horrible person!
|
||||
|
||||
**Incorrect:**
|
||||
|
||||
```java
|
||||
if(hashMap.containsKey("eagler")) {
|
||||
Object val = hashMap.get("eagler");
|
||||
// do something with val
|
||||
}
|
||||
```
|
||||
|
||||
**Correct:**
|
||||
|
||||
```java
|
||||
Object val = hashMap.get("eagler");
|
||||
if(val != null) {
|
||||
// do something with val
|
||||
}
|
||||
```
|
||||
|
||||
### 3. Cache the return value of a function if you plan to use it multiple times
|
||||
|
||||
This is somewhat an extension of rule #2, don't repeatedly call the same function multiple times if there's no reason to, even if its a relatively fast function. Everything is slower and less efficient in a browser.
|
||||
|
||||
**Incorrect:**
|
||||
|
||||
```java
|
||||
while(itr.hasNext()) {
|
||||
if(!Minecraft.getMinecraft().getRenderManager().getEntityClassRenderObject(SomeEntity.class).shouldRender(itr.next())) {
|
||||
itr.remove();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
**Correct:**
|
||||
|
||||
```java
|
||||
Render<SomeEntity> render = Minecraft.getMinecraft().getRenderManager().getEntityClassRenderObject(SomeEntity.class);
|
||||
while(itr.hasNext()) {
|
||||
if(!render.shouldRender(itr.next())) {
|
||||
itr.remove();
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### 4. Iterators aren't that great
|
||||
|
||||
Avoid using iterators when possible, this includes a `for(Item item : list)` type loop, since this may compile into bytecode that uses an iterator. If the list is a linked list or some other type of data structure that can’t perform random access efficiently, then it is recommended to use an iterator, but if the collection is guaranteed to be something similar to an ArrayList then implement it via a traditional for loop instead.
|
||||
|
||||
**Recommended way to iterate an ArrayList:**
|
||||
|
||||
```java
|
||||
for(int i = 0, l = list.size(); i < l; ++i) {
|
||||
Item item = list.get(i);
|
||||
// do something
|
||||
}
|
||||
```
|
||||
|
||||
### 5. Don't shit on the heap
|
||||
|
||||
Avoid creating temporary single-use objects in performance critical code, since the overhead of doing so is larger in a browser where there’s no type safety to predefine object structures. This includes using lambdas or using most of the stuff in the google guava package. Also this is partially why I prefer not using iterators whenever possible.
|
||||
|
||||
**Incorrect, creates 5 temporary objects:**
|
||||
|
||||
```java
|
||||
List<String> list1 = Arrays.asList("eagler", "eagler", "deevis");
|
||||
List<String> list2 = Lists.newArrayList(
|
||||
Collections2.transform(
|
||||
Collections2.filter(
|
||||
list1,
|
||||
(e) -> !e.equals("deevis")
|
||||
),
|
||||
(e) -> (e + "!")
|
||||
)
|
||||
);
|
||||
```
|
||||
|
||||
**Correct, creates no temporary objects:**
|
||||
|
||||
```java
|
||||
List<String> list1 = Arrays.asList("eagler", "eagler", "deevis");
|
||||
List<String> list2 = Lists.newArrayList();
|
||||
for(int i = 0, l = list1.size(); i < l; ++i) {
|
||||
String s = list1.get(i);
|
||||
if(!s.equals("deevis")) {
|
||||
list2.add(s + "!");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
(note: we are ignoring the StringBuilder instances that the compiler generates from ` + "!"`)
|
||||
|
||||
### 6. Don't base game/render logic off of the system time
|
||||
|
||||
Use `EagRuntime.steadyTimeMillis()` instead to access a monotonic clock, as in a clock that is guaranteed to only run forwards, and is not affected by changes in the system time. `System.currentTimeMillis()` should only be used in situations where you want to know the actual wall time or are measuring elapsed time across multiple page refreshes.
|
||||
|
||||
### 7. Prefer multiplication over division
|
||||
|
||||
If you're always gonna divide a number by some constant, it is better to multiply it by one-over-the-constant instead.
|
||||
|
||||
**Incorrect**
|
||||
|
||||
```java
|
||||
float b = a / 50.0f;
|
||||
```
|
||||
|
||||
**Correct**
|
||||
|
||||
```java
|
||||
float b = a * 0.02f;
|
||||
```
|
||||
|
||||
### 8. Shaders should take advantage of compiler intrinsics
|
||||
|
||||
Although you may think these two pieces of code are identical, its more than likely that the "Correct" example will compile to a more efficient shader on almost any hardware. The functions in GLSL are not a library, they are compiler intrinsics that usually compile to inline assembly that can take advantage of different acceleration instructions in the GPU's instruction set. Vector math should be done in ways that promotes the use of SIMD instructions when the code is compiled to a shader.
|
||||
|
||||
**Incorrect:**
|
||||
|
||||
```glsl
|
||||
float dx = pos1.x - pos2.x;
|
||||
float dy = pos1.y - pos2.y;
|
||||
float dz = pos1.z - pos2.z;
|
||||
float distance = sqrt(dx * dx + dy * dy + dz * dz);
|
||||
float fogDensity = pow(2.718, -density * distance);
|
||||
```
|
||||
|
||||
**Correct:**
|
||||
|
||||
```glsl
|
||||
float fogDensity = exp(-density * length(pos1.xyz - pos2.xyz));
|
||||
```
|
||||
|
||||
### 9. Flatten the control flow of shaders
|
||||
|
||||
Modern GPUs are able to execute multiple instances of a shader on a single core, but if one of those shaders encounters a branch (if statement, or related) that causes it to begin executing different code from the other instances of the shader running on that core, that instance of the shader can no longer be executed at the same time as the other instances, and suddenly you've significantly increased the amount of time this core will now be busy executing shader instructions to account for all of the branches the different shader instances have taken.
|
||||
|
||||
**Incorrect:**
|
||||
|
||||
```glsl
|
||||
float lightValue = dot(lightDirection, normal);
|
||||
if(lightValue > 0.0) {
|
||||
color += lightValue * lightColor * diffuseColor;
|
||||
}
|
||||
```
|
||||
|
||||
**Correct:**
|
||||
```glsl
|
||||
float lightValue = max(dot(lightDirection, normal), 0.0);
|
||||
color += lightValue * lightColor * diffuseColor;
|
||||
```
|
||||
|
||||
### 10. Use textureLod unless mipmapping is necessary
|
||||
|
||||
This will prevent the shader from wasting time trying to determine what mipmap levels to read from when the texture is sampled.
|
||||
|
||||
**Incorrect:**
|
||||
|
||||
```glsl
|
||||
float depthValue = texture(depthBuffer, pos).r;
|
||||
```
|
||||
|
||||
**Correct:**
|
||||
|
||||
```glsl
|
||||
float depthValue = textureLod(depthBuffer, pos, 0.0).r;
|
||||
```
|
||||
|
||||
### 11. Divide complex and branch-intensive shaders into multiple draw calls
|
||||
|
||||
You can use a variety of different blending modes to mathematically combine the results of shaders. This is done for the same reason as flattening the control flow, to try and keep instruction pointers in sync by periodically resetting their positions, and also to allow for the driver to multitask better on GPUs with insane numbers of cores. It also allows the shader’s execution to be distributed across multiple frames in the case of something that doesn’t need to update often (like clouds).
|
||||
|
||||
|
||||
### 12. Don't abuse `@JSBody` in TeaVM code
|
||||
|
||||
TeaVM provides lots of ways of interacting with JavaScript, using `@JSBody` is not the only way, consider using an overlay type.
|
||||
|
||||
**Incorrect**
|
||||
|
||||
```java
|
||||
@JSObject(params = { "obj" }, script = "return obj.valueA;")
|
||||
public static native JSObject getValueA(JSObject obj);
|
||||
|
||||
@JSObject(params = { "obj" }, script = "return obj.valueB;")
|
||||
public static native JSObject getValueB(JSObject obj);
|
||||
|
||||
@JSObject(params = { "obj" }, script = "return obj.valueC;")
|
||||
public static native JSObject getValueC(JSObject obj);
|
||||
|
||||
@JSObject(params = { "obj" }, script = "obj.dumbFunction();")
|
||||
public static native void callDumbFunction(JSObject obj);
|
||||
```
|
||||
|
||||
**Correct**
|
||||
|
||||
```java
|
||||
public interface MyObject extends JSObject {
|
||||
|
||||
@JSProperty
|
||||
JSObject getValueA();
|
||||
|
||||
@JSProperty
|
||||
JSObject getValueB();
|
||||
|
||||
@JSProperty
|
||||
JSObject getValueC();
|
||||
|
||||
void dumbFunction();
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
### 13. Don't fall for TeaVM's threads
|
||||
|
||||
It is impossible to have multithreading in JavaScript, only worker objects can be used to execute code concurrently, which can't share javascript variables. Therefore, when you create a thread in TeaVM, you're creating a virtual thread that isn't capable of running at the same time as any other virtual thread in the TeaVM context. This means it's impossible to speed a TeaVM program up through the use of multiple Java threads, instead it is more than likely that it will just slow the program down more to implement multithreading through TeaVM's threads due to the additional time required for synchronization and context switches. Its more efficient to just program the entire application to be single threaded to begin with, just put everything in the main loop and realize that if it was in a different thread it would just periodically interrupt the main loop.
|
||||
|
||||
### 14. Always use try-with-resources
|
||||
|
||||
For any code that deals with streams to be considered safe, it should either use a try-with-resources or try/finally in order to release resources when complete, since otherwise the stream might not close if an IO error causes the function to return early. This is especially important for plugin code since its supposed to be able to run on a large server for weeks at a time without the underlying JVM being restarted. If hackers discover a bug in the code to cause a function to return early like this without closing a stream, they might exploit it to fatally crash the server by spamming whatever corrupt packet causes the function to leak the stream, so all code must be written so it can fail at any time without leaking resources.
|
||||
|
||||
**Incorrect**
|
||||
|
||||
```java
|
||||
InputStream is = new FileInputStream(new File("phile.txt"));
|
||||
is.write(someArray);
|
||||
is.close();
|
||||
```
|
||||
|
||||
**Correct**
|
||||
|
||||
```java
|
||||
try(InputStream is = new FileInputStream(new File("phile.txt"))) {
|
||||
is.write(someArray);
|
||||
}
|
||||
```
|
||||
|
||||
Notice that the `.close()` can be omitted completely when using a try-with-resources
|
||||
|
||||
### 15. Always close compression/decompression streams
|
||||
|
||||
In the desktop runtime, the default oracle JDK uses native code to implement the compression/decompression streams (InflaterInputStream, GZIPInputStream, etc) and therefore if you forget to close the compression/decompression stream it will cause a memory leak when the code isn't running in a browser. This is a common issue when using byte array input/output streams since you might believe when decompressing data from a byte array that there's no reason to close the stream when you're done since its not a file, but that will still cause a memory leak due to the decompression stream not being cleaned up.
|
||||
|
||||
## Part B. Project Structure
|
||||
|
||||
### 1. Code decompiled from Minecraft goes in `src/game/java`
|
||||
|
||||
Don't add any new classes to `src/game/java`, and ideally any significant additions to the game's source (functions, etc) should be done through creating new classes in `src/main/java` instead of adding it directly to the decompiled classes.
|
||||
|
||||
### 2. Do not put platform-dependent code in `src/main/java` or `src/game/java`
|
||||
|
||||
One of the objectives of Eaglercraft is to make Minecraft Java edition truly cross platform, why stop at just a desktop and JavaScript runtime? There are plans to create an Android runtime and several WebAssembly runtimes, all of which will be compatible with any pre-existing eaglercraft clients that only depend on the EaglercraftX runtime library and don't directly depend on components of TeaVM or LWJGL. Ideally, all core features of the client should be implemented in the `src/main/java` and `src/game/java` and any platform-dependent features should be stubbed out in some abstract platform-independent way in classes in the `src/teavm/java` and `src/lwjgl/java` and any other future runtime you want your client to support. Ideally, every source folder of platform-dependent code should expose an identical API for access to the platform-independent code as all the other platform-dependant code folders currently expose.
|
||||
|
||||
### 3. Don't mix JavaScript with Java
|
||||
|
||||
Don’t implement features in the JavaScript runtime by requiring additional JavaScript files be included on index.html, if you must access browser APIs then use the TeaVM JSO to write your code in Java instead so it’s baked directly into classes.js. Certain browser APIs may be missing from the default TeaVM JSO-APIs library but it is not difficult to create the overlay types for them manually. Clients that violate this rule may also not possible to automatically import into the EaglercraftX boot menu depending on how fucked up they are. There aren't any limitations to the TeaVM JSO that give you a good enough excuse not to follow this rule.
|
||||
|
||||
### 4. Don't access the classes named "Platform\*" directly from your platform-independent code
|
||||
|
||||
Much like the Java runtime environment itself, Eaglercraft's runtime library consists of two layers, the internal classes full of platform-dependent code that expose an intermediate API not meant to be used by programmers directly, and the platform-independent API classes that provide a platform-independent wrapper for the platform dependent classes and also provide all the miscellaneous utility functions that don't require platform dependent code to be implemented. Chances are if you are directly using a function on a class that has a name that starts with "Platform\*", that there is a different class in `src/main/java` that you are meant to use in order to access that feature, that may perform additional checks or adjust the values you are passing to the function before calling the function in the Platform class.
|
||||
|
||||
## Part C. Compatibility Standards
|
||||
|
||||
### 1. Target minimum JDK version is Java 8
|
||||
|
||||
Its difficult to find a platform where its not possible to run Java 8 in some capacity, therefore the desktop runtime of EaglercraftX and the BungeeCord plugin should target Java 8. The Velocity plugin is an exception since Velocity itself doesn't support Java 8 either.
|
||||
|
||||
### 2. Target minimum supported browser is Google Chrome 38
|
||||
|
||||
Released on October 7, 2014, we think its a good target for the JavaScript versions of EaglercraftX. This is the last version of Chrome that supports hardware accelerated WebGL 1.0 on Windows XP. All base features of the underlying Minecraft 1.8 client must be functional, however things such as EaglercraftX's shaders or dynamic lighting are not required to work. The client cannot crash as a result of any missing features on an old browser, you must either implement fallbacks or safely disable the unsupported features.
|
||||
|
||||
### 3. Target minimum supported graphics API is OpenGL ES 2.0 (WebGL 1.0)
|
||||
|
||||
The most widely supported graphics API in the world is currently OpenGL ES 2.0, so ideally that should be the target for EaglercraftX 1.8. We can guarantee the client will be on an OpenGL ES 3.0 context 99% of the time, however its not that hard to also maintain support for GLES 2.0 (WebGL 1.0) as well with slightly reduced functionality so we might as well make it a feature in case of the 1% of the time that functionality is not available. The client cannot depend on any GL extensions in order to run in GLES 2.0 mode, however its reasonable to assume there will be VAO support via extensions in most GLES 2.0 contexts so the client includes an abstraction layer (via EaglercraftGPU.java) to seamlessly emulate VAO functionality even when the client is running in GLES 2.0 mode with no VAO extensions. The only core feature of Minecraft 1.8 that is completely unavailable in GLES 2.0 mode is mip-mapping for the blocks/items texture atlas due to being unable to limit the max mipmap level.
|
||||
|
||||
### 4. Use preprocessor directives to make portable shaders that can be compiled for both OpenGL ES 2.0 and 3.0 contexts
|
||||
|
||||
Most of the shaders in the base "glsl" directory of the resources EPK file use a file called "gles2_compat.glsl" to polyfill certain GLSL features (such as input/output declarations) via preprocessor directives to allow them to be compiled on both OpenGL ES 3.0 and 2.0 contexts. This is the preferred way to implement backwards compatibility over creating seprate versions of the same shaders, since future developers don't need to waste time maintaining multiple versions of the same code if they don't really care about backwards compatibility in the first place.
|
||||
|
||||
### 5. Target minimum version of the JavaScript syntax is ES5 strict mode
|
||||
|
||||
A shim is included to provide certain ES6 functions, however you should always program with syntax compatible with ES5, so the script doesn't crash immediately due to syntax errors even if the functions that use unsupported syntax aren't actually being called. `build.gradle` currently patches out all the ES5 strict mode incompatible syntax in the output of TeaVM 0.9.2, but this will probably break if you try to update TeaVM. Don't worry though because future WASM versions of EaglercraftX will use the latest versions of TeaVM. **Some common incompatible syntax to avoid includes `const`, `let`, `async`, `( ) => `, and using named functions! You can't do any of these things in your JSBody annotations.**
|
||||
|
||||
### 6. You cannot depend on any deprecated browser features
|
||||
|
||||
The same way we want EaglercraftX to work on browsers from over 10 years ago, we want it to still work in browsers 10 years from today, therefore the client cannot depend on any deprecated browser features in order for all the base Minecraft 1.8 game's features to work properly. However it is okay to use deprecated features as fallback if any modern non-deprecated feature (such as keyboard event handling) that the game needs if the game is running in an old browser.
|
||||
|
||||
### 7. Always use addEventListener to register event handlers
|
||||
|
||||
Always use addEventListener to register event handlers for browser APIs, never through the use of assigning the legacy "on\*" (onclick, onkeydown, onmessage, etc) variables, the TeaVMUtils class has a universal helper function for accessing addEventListener on any JSO objects that don’t already implement the function.
|
||||
|
||||
### 8. JavaScript should be executed in strict mode
|
||||
|
||||
Always make sure your JavaScript files start with `"use strict";`, be careful when adding this to your code retroactively because it will probably break hastily written code unless you haven’t made a single typo that’s not forbidden in strict mode. Be aware that in Chrome 38 this means you can't use stuff such as `const` and `let` or named functions in any of your JSBody annotations!
|
56
CREDITS
56
CREDITS
@ -3,24 +3,26 @@
|
||||
~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
lax1dude:
|
||||
|
||||
|
||||
- Creator of Eaglercraft
|
||||
- Ported the Minecraft 1.8 src to TeaVM
|
||||
- Wrote HW accelerated OpenGL 1.3 emulator
|
||||
- Wrote the default shader pack
|
||||
- Made the integrated PBR resource pack
|
||||
- Added touch and mobile device support
|
||||
- Wrote all desktop emulation code
|
||||
- Wrote EaglercraftXBungee
|
||||
- Wrote EaglercraftXVelocity
|
||||
- Wrote WebRTC relay server
|
||||
- Wrote voice chat server
|
||||
- Wrote the patch and build system
|
||||
|
||||
|
||||
ayunami2000:
|
||||
|
||||
|
||||
- Many bug fixes
|
||||
- WebRTC LAN worlds
|
||||
- WebRTC voice chat
|
||||
- Worked on touch support
|
||||
- Made velocity plugin work
|
||||
- Added resource packs
|
||||
- Added screen recording
|
||||
@ -410,7 +412,7 @@
|
||||
Project Author: The Legion of the Bouncy Castle
|
||||
Project URL: https://www.bouncycastle.org/java.html
|
||||
|
||||
Used For: MD5, SHA-1, SHA-256 implementations
|
||||
Used For: MD5, SHA-1, SHA-256, and AES implementations
|
||||
|
||||
* Copyright (c) 2000-2021 The Legion of the Bouncy Castle Inc. (https://www.bouncycastle.org)
|
||||
*
|
||||
@ -668,23 +670,23 @@
|
||||
Project Author: ymnk, JCraft Inc.
|
||||
Project URL: http://www.jcraft.com/jorbis/
|
||||
|
||||
Used For: Audio in desktop runtime
|
||||
Used For: Audio in desktop runtime and browsers that don't support OGG
|
||||
|
||||
* JOrbis
|
||||
* Copyright (C) 2000 ymnk, JCraft,Inc.
|
||||
*
|
||||
*
|
||||
* Written by: 2000 ymnk<ymnk@jcraft.com>
|
||||
*
|
||||
* Many thanks to
|
||||
* Monty <monty@xiph.org> and
|
||||
* The XIPHOPHORUS Company http://www.xiph.org/ .
|
||||
* JOrbis has been based on their awesome works, Vorbis codec.
|
||||
*
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public License
|
||||
* as published by the Free Software Foundation; either version 2 of
|
||||
* the License, or (at your option) any later version.
|
||||
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
@ -696,6 +698,44 @@
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
Project Name: NanoHTTPD
|
||||
Project Author: NanoHTTPD
|
||||
Project URL: http://nanohttpd.org/
|
||||
|
||||
Used For: HTTP server in the desktop runtime
|
||||
|
||||
* Copyright (c) 2012-2013 by Paul S. Hawke,
|
||||
* 2001,2005-2013 by Jarno Elonen,
|
||||
* 2010 by Konstantinos Togias All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* Neither the name of the NanoHttpd organization nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from this
|
||||
* software without specific prior written permission.
|
||||
*
|
||||
* 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.
|
||||
|
||||
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
Project Name: sqlite-jdbc
|
||||
Project Author: Taro L. Saito (xerial)
|
||||
Project URL: https://github.com/xerial/sqlite-jdbc
|
||||
|
47
README.md
47
README.md
@ -37,11 +37,13 @@
|
||||
5. Type `./CompileLatestClient.sh` and hit enter, a GUI resembling a classic windows installer should open
|
||||
6. Follow the steps shown to you in the new window to finish compiling
|
||||
|
||||
## Browser Compatibility
|
||||
|
||||
EaglercraftX 1.8 is currently known to work on browsers as old as Chrome 38 on Windows XP, the game supports both WebGL 1.0 and WebGL 2.0 however features such as dynamic lighting and PBR shaders require WebGL 2.0. The game also supports mobile browsers that don't have a keyboard or mouse, the game will enter touch screen mode automatically when touch input is detected. The game also includes an embedded OGG codec (JOrbis) for loading audio files on iOS where the browsers don't support loading OGG files in an AudioContext.
|
||||
|
||||
## Singleplayer
|
||||
|
||||
As of January 2024, singleplayer and shared worlds have been added to EaglercraftX 1.8.
|
||||
|
||||
Worlds are saved to your browser's local storage and are available even if your device does not have an internet connection. You can also import and export worlds in EaglercraftX as EPK files to copy them between devices and send them to your friends.
|
||||
EaglercraftX 1.8 fully supports singleplayer mode through an integrated server. Worlds are saved to your browser's local storage and are available even if your device does not have an internet connection. You can also import and export worlds in EaglercraftX as EPK files to copy them between devices and send them to your friends.
|
||||
|
||||
You can also import and export your existing vanilla Minecraft 1.8 worlds into EaglercraftX using ZIP files if you want to try playing all your old 1.8 maps in a modern browser. The glitch that caused some chunks to become corrupt when exporting worlds as vanilla in Eaglercraft 1.5.2 no longer happens in EaglercraftX 1.8, its perfect now. Beware that the inventories of LAN world players are not saved when the world is converted to vanilla, and pets (dogs, cats, horses, etc) might sometimes forget their owners due to the UUID changes.
|
||||
|
||||
@ -57,7 +59,7 @@ If you would like to host your own relay, the JAR file and instructions can be d
|
||||
|
||||
## PBR Shaders
|
||||
|
||||
EaglercraftX 1.8 includes a deferred physically-based renderer modeled after the GTA V rendering engine with many new improvements and a novel raytracing technique for fast realistic reflections. It can be enabled in the "Shaders" menu in the game's options screen. Shader packs in EaglercraftX are just a component of resource packs, so any custom shaders you install will be in the form of a resource pack. EaglercraftX also comes with a very well optimized built-in PBR shader pack and also a built-in PBR material texture pack to give all blocks and items in the game realistic lighting and materials that looks better than most vanilla Minecraft shader packs. The default shader and texture packs were created from scratch by lax1dude, shaders packs made for vanilla Minecraft will not work in EaglercraftX and no shaders in EaglercraftX were taken from vanilla Minecraft shader packs.
|
||||
EaglercraftX 1.8 includes a deferred physically-based renderer modeled after the GTA V rendering engine with many new improvements and a novel raytracing technique for fast realistic reflections. It can be enabled in the "Shaders" menu in the game's options screen. Shader packs in EaglercraftX are just a component of resource packs, so any custom shaders you install will be in the form of a resource pack. EaglercraftX also comes with a very well optimized built-in PBR shader pack and also a built-in PBR material texture pack to give all blocks and items in the game realistic lighting and materials that looks better than most vanilla Minecraft shader packs. The default shader and texture packs were created from scratch by lax1dude, shaders packs made for vanilla Minecraft will not work in EaglercraftX and no shaders in EaglercraftX were taken from vanilla Minecraft shader packs. The shaders are not available in WebGL 1.0 mode or if floating point HDR render targets are not fully supported.
|
||||
|
||||
## Voice Chat
|
||||
|
||||
@ -75,6 +77,12 @@ 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.
|
||||
|
||||
### Detailed READMEs
|
||||
|
||||
- [**EaglerXBungee README**](README_EAGLERXBUNGEE.md)
|
||||
- [**EaglerXVelocity README**](README_EAGLERXVELOCITY.md)
|
||||
- [**EaglerXBukkitAPI README**](README_EAGLERXBUKKITAPI.md)
|
||||
|
||||
### Installation
|
||||
|
||||
Obtain the latest version of the EaglerXBungee JAR file (it can be downloaded in the client from the "Multiplayer" screen) and place it in the "plugins" folder of your BungeeCord server. It's recommended to only join native Minecraft 1.8 servers through an EaglerXBungee server but plugins like ProtocolSupport have allowed some people to join newer servers too.
|
||||
@ -164,10 +172,35 @@ The default eaglercraftXOpts values is this:
|
||||
- `localStorageNamespace:` can be used to change the prefix of the local storage keys (Default: `"_eaglercraftX"`)
|
||||
- `enableMinceraft:` can be used to disable the "Minceraft" title screen
|
||||
- `crashOnUncaughtExceptions:` display crash reports when `window.onerror` is fired
|
||||
- `openDebugConsoleOnLaunch:` open debug console automatically at launch
|
||||
- `fixDebugConsoleUnloadListener:` close debug console beforeunload instead of unload
|
||||
- `forceWebViewSupport:` if the server info webview should be allowed even on browsers without the required safety features
|
||||
- `enableWebViewCSP:` if the `csp` attibute should be set on the server info webview for extra security
|
||||
- `enableServerCookies:` can be used to disable server cookies
|
||||
- `allowServerRedirects:` if servers should be allowed to make the client reconnect to a different address
|
||||
- `autoFixLegacyStyleAttr:` if the viewport meta tag and style attributes on old offline downloads and websites should be automatically patched
|
||||
- `showBootMenuOnLaunch:` if the client should always show the boot menu on every launch
|
||||
- `bootMenuBlocksUnsignedClients:` if the boot menu should only be allowed to launch signed clients
|
||||
- `allowBootMenu:` can be used to disable the boot menu entirely
|
||||
- `forceProfanityFilter:` if the profanity filter should be forced enabled
|
||||
- `forceWebGL1:` if the game should force the browser to only use WebGL 1.0 for the canvas
|
||||
- `forceWebGL2:` if the game should force the browser to only use WebGL 2.0 for the canvas
|
||||
- `allowExperimentalWebGL1:` if the game should be allowed to create an `experimental-webgl` context
|
||||
- `useWebGLExt:` can be used to disable all OpenGL ES extensions to test the game on a pure WebGL 1.0/2.0 context
|
||||
- `useDelayOnSwap:` if the game should `setTimeout(..., 0)` every frame instead of using MessageChannel hacks
|
||||
- `useJOrbisAudioDecoder:` if OGG vorbis files should be decoded using the JOrbis Java OGG decoder instead of using the browser
|
||||
- `useXHRFetch:` if the game should use XMLHttpRequest for downloading resources instead of the fetch API
|
||||
- `useVisualViewport:` if the game should resize some GUIs relative to `window.visualViewport` (needed on mobile browsers when the keyboard is open)
|
||||
- `deobfStackTraces:` can be used to disable the runtime stack-trace deobfuscation, reduces micro stutters if the game is logging errors
|
||||
- `disableBlobURLs:` if the game should use `data:` URLs instead of `blob:` URLs for loading certain resources
|
||||
- `eaglerNoDelay:` can be used to disable "Vigg's Algorithm", an algorithm that delays and combines multiple EaglercraftX packets together if they are sent in the same tick (does not affect regular Minecraft 1.8 packets)
|
||||
- `ramdiskMode:` if worlds and resource packs should be stored in RAM instead of IndexedDB
|
||||
- `singleThreadMode:` if the game should run the client and integrated server in the same context instead of creating a worker object
|
||||
- `hooks:` can be used to define JavaScript callbacks for certain events
|
||||
* `localStorageSaved:` JavaScript callback to save local storage keys
|
||||
* `localStorageLoaded:` JavaScript callback to load local storage keys
|
||||
* `crashReportShow:` JavaScript callback when a crash report is shown
|
||||
* `localStorageSaved:` JavaScript callback to save local storage keys (key, data)
|
||||
* `localStorageLoaded:` JavaScript callback to load local storage keys (key) returns data
|
||||
* `crashReportShow:` JavaScript callback when a crash report is shown (report, customMessageCB)
|
||||
* `screenChanged:` JavaScript callback when the screen changes/resizes (screenName, scaledWidth, scaledHeight, realWidth, realHeight, scaleFactor)
|
||||
|
||||
### Using Hooks
|
||||
|
||||
|
Binary file not shown.
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html style="width:100%;height:100%;background-color:black;">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
|
||||
<meta name="description" content="Play minecraft 1.8 in your browser" />
|
||||
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
|
||||
<title>EaglercraftX 1.8</title>
|
||||
@ -15,8 +15,8 @@
|
||||
<script type="text/javascript" src="classes.js"></script>
|
||||
<script type="text/javascript">
|
||||
"use strict";
|
||||
window.addEventListener("load", () => {
|
||||
if(document.location.href.startsWith("file:")) {
|
||||
window.addEventListener("load", function() {
|
||||
if(window.location.href.indexOf("file:") === 0) {
|
||||
alert("HTTP please, do not open this file locally, run a local HTTP server and load it via HTTP");
|
||||
}else {
|
||||
var opts = window.eaglercraftXOpts;
|
||||
@ -31,10 +31,10 @@
|
||||
|
||||
if(!opts.joinServer) {
|
||||
var q = window.location.search;
|
||||
if(typeof q === "string" && q.startsWith("?")) {
|
||||
q = new URLSearchParams(q);
|
||||
if((typeof q === "string") && q[0] === "?" && (typeof window.URLSearchParams !== "undefined")) {
|
||||
q = new window.URLSearchParams(q);
|
||||
var s = q.get("server");
|
||||
if(s) opts.joinServer = s;
|
||||
if(s) window.eaglercraftXOpts.joinServer = s;
|
||||
}
|
||||
}
|
||||
|
||||
@ -43,6 +43,6 @@
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="margin:0px;width:100vw;height:100vh;overflow:hidden;" id="game_frame">
|
||||
<body style="margin:0px;width:100%;height:100%;overflow:hidden;background-color:black;" id="game_frame">
|
||||
</body>
|
||||
</html>
|
@ -1,8 +1,8 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<html style="width:100%;height:100%;background-color:black;">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0" />
|
||||
<meta name="description" content="Play minecraft 1.8 in your browser" />
|
||||
<meta name="keywords" content="eaglercraft, eaglercraftx, minecraft, 1.8, 1.8.8" />
|
||||
<title>EaglercraftX 1.8</title>
|
||||
@ -15,14 +15,14 @@
|
||||
<script type="text/javascript" src="classes.js"></script>
|
||||
<script type="text/javascript">
|
||||
"use strict";
|
||||
window.addEventListener("load", () => {
|
||||
if(document.location.href.startsWith("file:")) {
|
||||
window.addEventListener("load", function() {
|
||||
if(window.location.href.indexOf("file:") === 0) {
|
||||
alert("HTTP please, do not open this file locally, run a local HTTP server and load it via HTTP");
|
||||
}else {
|
||||
|
||||
// %%%%%%%%% launch options %%%%%%%%%%%%
|
||||
|
||||
const relayId = Math.floor(Math.random() * 3);
|
||||
var relayId = Math.floor(Math.random() * 3);
|
||||
window.eaglercraftXOpts = {
|
||||
demoMode: false,
|
||||
container: "game_frame",
|
||||
@ -42,8 +42,8 @@
|
||||
// %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|
||||
|
||||
var q = window.location.search;
|
||||
if(typeof q === "string" && q.startsWith("?")) {
|
||||
q = new URLSearchParams(q);
|
||||
if((typeof q === "string") && q[0] === "?" && (typeof window.URLSearchParams !== "undefined")) {
|
||||
q = new window.URLSearchParams(q);
|
||||
var s = q.get("server");
|
||||
if(s) window.eaglercraftXOpts.joinServer = s;
|
||||
}
|
||||
@ -54,6 +54,6 @@
|
||||
});
|
||||
</script>
|
||||
</head>
|
||||
<body style="margin:0px;width:100vw;height:100vh;overflow:hidden;" id="game_frame">
|
||||
<body style="margin:0px;width:100%;height:100%;overflow:hidden;background-color:black;" id="game_frame">
|
||||
</body>
|
||||
</html>
|
22
buildtools/src/main/java/net/lax1dude/eaglercraft/v1_8/buildtools/gui/CompileLatestClientGUI.java
22
buildtools/src/main/java/net/lax1dude/eaglercraft/v1_8/buildtools/gui/CompileLatestClientGUI.java
@ -251,7 +251,11 @@ public class CompileLatestClientGUI {
|
||||
try {
|
||||
compileResultCode = JavaC.runJavaC(new File(minecraftSrcTmp, "minecraft_src_javadoc.jar"),
|
||||
compiledResultClasses, temporaryDirectory, TeaVMBinaries.getTeaVMRuntimeClasspath(),
|
||||
new File(repositoryFolder, "sources/main/java"), new File(repositoryFolder, "sources/teavm/java"));
|
||||
new File(repositoryFolder, "sources/main/java"),
|
||||
new File(repositoryFolder, "sources/protocol-game/java"),
|
||||
new File(repositoryFolder, "sources/protocol-relay/java"),
|
||||
new File(repositoryFolder, "sources/teavm/java"),
|
||||
new File(repositoryFolder, "sources/teavm-boot-menu/java"));
|
||||
}catch(IOException ex) {
|
||||
throw new CompileFailureException("failed to run javac compiler! " + ex.toString(), ex);
|
||||
}
|
||||
@ -292,10 +296,12 @@ public class CompileLatestClientGUI {
|
||||
teavmClassPath.addAll(Arrays.asList(TeaVMBinaries.getTeaVMRuntimeClasspath()));
|
||||
teavmArgs.put("classPathEntries", teavmClassPath);
|
||||
|
||||
teavmArgs.put("compileClassPathEntries", Arrays.asList((new File(repositoryFolder, "sources/teavmc-classpath/resources")).getAbsolutePath()));
|
||||
|
||||
teavmArgs.put("entryPointName", "main");
|
||||
teavmArgs.put("mainClass", "net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass");
|
||||
teavmArgs.put("minifying", true);
|
||||
teavmArgs.put("optimizationLevel", "ADVANCED");
|
||||
teavmArgs.put("optimizationLevel", "FULL");
|
||||
teavmArgs.put("targetDirectory", outputDirectory.getAbsolutePath());
|
||||
teavmArgs.put("generateSourceMaps", true);
|
||||
teavmArgs.put("targetFileName", "classes.js");
|
||||
@ -315,6 +321,15 @@ public class CompileLatestClientGUI {
|
||||
frame.finishCompiling(true, "TeaVM reported problems, check the log");
|
||||
return;
|
||||
}
|
||||
|
||||
System.out.println();
|
||||
System.out.println("Patching classes.js with ES6 shim...");
|
||||
|
||||
File classesJS = new File(outputDirectory, "classes.js");
|
||||
|
||||
if(!ES6Compat.patchClassesJS(classesJS, new File(repositoryFolder, "sources/setup/workspace_template/javascript/ES6ShimScript.txt"))) {
|
||||
System.err.println("Error: could not inject shim, continuing anyway because it is not required");
|
||||
}
|
||||
|
||||
File epkCompiler = new File(repositoryFolder, "sources/setup/workspace_template/desktopRuntime/CompileEPK.jar");
|
||||
|
||||
@ -374,8 +389,7 @@ public class CompileLatestClientGUI {
|
||||
File offlineDownloadGenerator = new File(repositoryFolder, "sources/setup/workspace_template/desktopRuntime/MakeOfflineDownload.jar");
|
||||
MakeOfflineDownload.compilerMain(offlineDownloadGenerator, new String[] {
|
||||
(new File(repositoryFolder, "sources/setup/workspace_template/javascript/OfflineDownloadTemplate.txt")).getAbsolutePath(),
|
||||
(new File(outputDirectory, "classes.js")).getAbsolutePath(),
|
||||
(new File(outputDirectory, "assets.epk")).getAbsolutePath(),
|
||||
classesJS.getAbsolutePath(), (new File(outputDirectory, "assets.epk")).getAbsolutePath(),
|
||||
(new File(outputDirectory, "EaglercraftX_1.8_Offline_en_US.html")).getAbsolutePath(),
|
||||
(new File(outputDirectory, "EaglercraftX_1.8_Offline_International.html")).getAbsolutePath(),
|
||||
(new File(outputDirectory, "build/languages.epk")).getAbsolutePath()
|
||||
|
@ -0,0 +1,43 @@
|
||||
package net.lax1dude.eaglercraft.v1_8.buildtools.gui;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
/**
|
||||
* 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 ES6Compat {
|
||||
|
||||
/**
|
||||
* TODO: remove this when we update TeaVM to 0.10+ (ES6 is impossible)
|
||||
*/
|
||||
public static boolean patchClassesJS(File classesJS, File shimJS) {
|
||||
try {
|
||||
String dest = FileUtils.readFileToString(classesJS, StandardCharsets.UTF_8);
|
||||
int i = dest.substring(0, dest.indexOf("=$rt_globals.Symbol('jsoClass');")).lastIndexOf("let ");
|
||||
dest = dest.substring(0, i) + "var" + dest.substring(i + 3);
|
||||
int j = dest.indexOf("function($rt_globals,$rt_exports){");
|
||||
dest = dest.substring(0, j + 34) + "\n" + FileUtils.readFileToString(shimJS, StandardCharsets.UTF_8) + "\n" + dest.substring(j + 34);
|
||||
FileUtils.writeStringToFile(classesJS, dest, StandardCharsets.UTF_8);
|
||||
return true;
|
||||
}catch(Throwable t) {
|
||||
t.printStackTrace();
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@ -214,7 +214,7 @@ public class TeaVMBinaries {
|
||||
teavmClasslib.file.getAbsolutePath(), teavmInterop.file.getAbsolutePath(), teavmJSO.file.getAbsolutePath(),
|
||||
teavmJSOApis.file.getAbsolutePath(), teavmJSOImpl.file.getAbsolutePath(),
|
||||
teavmMetaprogrammingAPI.file.getAbsolutePath(), teavmMetaprogrammingImpl.file.getAbsolutePath(),
|
||||
teavmPlatform.file.getAbsolutePath() };
|
||||
teavmPlatform.file.getAbsolutePath(), teavmCore.file.getAbsolutePath() };
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -25,6 +25,7 @@ import org.json.JSONObject;
|
||||
import net.lax1dude.eaglercraft.v1_8.buildtools.EaglerBuildTools;
|
||||
import net.lax1dude.eaglercraft.v1_8.buildtools.LicensePrompt;
|
||||
import net.lax1dude.eaglercraft.v1_8.buildtools.gui.EPKCompiler;
|
||||
import net.lax1dude.eaglercraft.v1_8.buildtools.gui.ES6Compat;
|
||||
import net.lax1dude.eaglercraft.v1_8.buildtools.gui.JavaC;
|
||||
import net.lax1dude.eaglercraft.v1_8.buildtools.gui.MakeOfflineDownload;
|
||||
import net.lax1dude.eaglercraft.v1_8.buildtools.gui.TeaVMBinaries;
|
||||
@ -60,7 +61,7 @@ public class CompileLatestClientHeadless {
|
||||
|
||||
System.out.println();
|
||||
System.out.println("Launching client compiler...");
|
||||
System.out.println("Copyright (c) 2022-2023 lax1dude");
|
||||
System.out.println("Copyright (c) 2022-2024 lax1dude");
|
||||
System.out.println();
|
||||
|
||||
boolean yes = false;
|
||||
@ -321,7 +322,11 @@ public class CompileLatestClientHeadless {
|
||||
try {
|
||||
compileResultCode = JavaC.runJavaC(new File(minecraftSrcTmp, "minecraft_src_javadoc.jar"),
|
||||
compiledResultClasses, temporaryDirectory, TeaVMBinaries.getTeaVMRuntimeClasspath(),
|
||||
new File(repositoryFolder, "sources/main/java"), new File(repositoryFolder, "sources/teavm/java"));
|
||||
new File(repositoryFolder, "sources/main/java"),
|
||||
new File(repositoryFolder, "sources/protocol-game/java"),
|
||||
new File(repositoryFolder, "sources/protocol-relay/java"),
|
||||
new File(repositoryFolder, "sources/teavm/java"),
|
||||
new File(repositoryFolder, "sources/teavm-boot-menu/java"));
|
||||
}catch(IOException ex) {
|
||||
throw new CompileFailureException("failed to run javac compiler! " + ex.toString(), ex);
|
||||
}
|
||||
@ -362,10 +367,12 @@ public class CompileLatestClientHeadless {
|
||||
teavmClassPath.addAll(Arrays.asList(TeaVMBinaries.getTeaVMRuntimeClasspath()));
|
||||
teavmArgs.put("classPathEntries", teavmClassPath);
|
||||
|
||||
teavmArgs.put("compileClassPathEntries", Arrays.asList((new File(repositoryFolder, "sources/teavmc-classpath/resources")).getAbsolutePath()));
|
||||
|
||||
teavmArgs.put("entryPointName", "main");
|
||||
teavmArgs.put("mainClass", "net.lax1dude.eaglercraft.v1_8.internal.teavm.MainClass");
|
||||
teavmArgs.put("minifying", minifying);
|
||||
teavmArgs.put("optimizationLevel", "ADVANCED");
|
||||
teavmArgs.put("optimizationLevel", "FULL");
|
||||
teavmArgs.put("targetDirectory", outputDirectory.getAbsolutePath());
|
||||
teavmArgs.put("generateSourceMaps", writeSourceMap);
|
||||
teavmArgs.put("targetFileName", "classes.js");
|
||||
@ -388,6 +395,15 @@ public class CompileLatestClientHeadless {
|
||||
return;
|
||||
}
|
||||
|
||||
System.out.println();
|
||||
System.out.println("Patching classes.js with ES6 shim...");
|
||||
|
||||
File classesJS = new File(outputDirectory, "classes.js");
|
||||
|
||||
if(!ES6Compat.patchClassesJS(classesJS, new File(repositoryFolder, "sources/setup/workspace_template/javascript/ES6ShimScript.txt"))) {
|
||||
System.err.println("Error: could not inject shim, continuing anyway because it is not required");
|
||||
}
|
||||
|
||||
File epkCompiler = new File(repositoryFolder, "sources/setup/workspace_template/desktopRuntime/CompileEPK.jar");
|
||||
|
||||
if(!epkCompiler.exists()) {
|
||||
@ -569,8 +585,7 @@ public class CompileLatestClientHeadless {
|
||||
File offlineDownloadGenerator = new File(repositoryFolder, "sources/setup/workspace_template/desktopRuntime/MakeOfflineDownload.jar");
|
||||
MakeOfflineDownload.compilerMain(offlineDownloadGenerator, new String[] {
|
||||
offlineTemplateArg.getAbsolutePath(),
|
||||
(new File(outputDirectory, "classes.js")).getAbsolutePath(),
|
||||
(new File(outputDirectory, "assets.epk")).getAbsolutePath(),
|
||||
classesJS.getAbsolutePath(), (new File(outputDirectory, "assets.epk")).getAbsolutePath(),
|
||||
(new File(outputDirectory, "EaglercraftX_1.8_Offline_en_US.html")).getAbsolutePath(),
|
||||
(new File(outputDirectory, "EaglercraftX_1.8_Offline_International.html")).getAbsolutePath(),
|
||||
(new File(temporaryDirectory, "languages.epk")).getAbsolutePath()
|
||||
|
112
buildtools/src/main/java/net/lax1dude/eaglercraft/v1_8/buildtools/task/diff/PullRequestTask.java
112
buildtools/src/main/java/net/lax1dude/eaglercraft/v1_8/buildtools/task/diff/PullRequestTask.java
@ -10,6 +10,7 @@ import java.nio.ByteBuffer;
|
||||
import java.nio.CharBuffer;
|
||||
import java.nio.charset.CharsetDecoder;
|
||||
import java.nio.charset.StandardCharsets;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@ -65,13 +66,22 @@ public class PullRequestTask {
|
||||
File originalSourceMainJar = new File(EaglerBuildToolsConfig.getTemporaryDirectory(), "MinecraftSrc/minecraft_src_patch.jar");
|
||||
File minecraftJavadocTmp = new File(EaglerBuildToolsConfig.getTemporaryDirectory(), "MinecraftSrc/minecraft_src_javadoc.jar");
|
||||
File originalSourceMain = new File(EaglerBuildTools.repositoryRoot, "sources/main/java");
|
||||
File originalSourceProtoGame = new File(EaglerBuildTools.repositoryRoot, "sources/protocol-game/java");
|
||||
File originalSourceProtoRelay = new File(EaglerBuildTools.repositoryRoot, "sources/protocol-relay/java");
|
||||
File originalSourceTeaVM = new File(EaglerBuildTools.repositoryRoot, "sources/teavm/java");
|
||||
File originalSourceTeaVMC = new File(EaglerBuildTools.repositoryRoot, "sources/teavmc-classpath/resources");
|
||||
File originalSourceBootMenu = new File(EaglerBuildTools.repositoryRoot, "sources/teavm-boot-menu/java");
|
||||
File originalSourceLWJGL = new File(EaglerBuildTools.repositoryRoot, "sources/lwjgl/java");
|
||||
File originalUnpatchedSourceResourcesJar = new File(EaglerBuildToolsConfig.getTemporaryDirectory(), "MinecraftSrc/minecraft_res.jar");
|
||||
File originalSourceResourcesJar = new File(EaglerBuildToolsConfig.getTemporaryDirectory(), "MinecraftSrc/minecraft_res_patch.jar");
|
||||
File originalSourceResources = new File(EaglerBuildTools.repositoryRoot, "sources/resources");
|
||||
File diffFromMain = new File(EaglerBuildToolsConfig.getWorkspaceDirectory(), "src/main/java");
|
||||
File diffFromGame = new File(EaglerBuildToolsConfig.getWorkspaceDirectory(), "src/game/java");
|
||||
File diffFromProtoGame = new File(EaglerBuildToolsConfig.getWorkspaceDirectory(), "src/protocol-game/java");
|
||||
File diffFromProtoRelay = new File(EaglerBuildToolsConfig.getWorkspaceDirectory(), "src/protocol-relay/java");
|
||||
File diffFromTeaVM = new File(EaglerBuildToolsConfig.getWorkspaceDirectory(), "src/teavm/java");
|
||||
File diffFromBootMenu = new File(EaglerBuildToolsConfig.getWorkspaceDirectory(), "src/teavm-boot-menu/java");
|
||||
File diffFromTeaVMC = new File(EaglerBuildToolsConfig.getWorkspaceDirectory(), "src/teavmc-classpath/resources");
|
||||
File diffFromLWJGL = new File(EaglerBuildToolsConfig.getWorkspaceDirectory(), "src/lwjgl/java");
|
||||
File diffFromResources = new File(EaglerBuildToolsConfig.getWorkspaceDirectory(), "desktopRuntime/resources");
|
||||
File pullRequestTo = new File(EaglerBuildTools.repositoryRoot, "pullrequest");
|
||||
@ -111,24 +121,54 @@ public class PullRequestTask {
|
||||
File pullRequestToResources = new File(pullRequestTo, "resources");
|
||||
|
||||
boolean flag = false;
|
||||
int i = copyAllModified(diffFromTeaVM, originalSourceTeaVM);
|
||||
int i = copyAllModified(diffFromMain, originalSourceMain);
|
||||
if(i > 0) {
|
||||
flag = true;
|
||||
}
|
||||
System.out.println("Found " + i + " changed files in /src/main/java/");
|
||||
|
||||
i = copyAllModified(diffFromProtoGame, originalSourceProtoGame);
|
||||
if(i > 0) {
|
||||
flag = true;
|
||||
}
|
||||
System.out.println("Found " + i + " changed files in /src/protocol-game/java/");
|
||||
|
||||
i = copyAllModified(diffFromProtoRelay, originalSourceProtoRelay);
|
||||
if(i > 0) {
|
||||
flag = true;
|
||||
}
|
||||
System.out.println("Found " + i + " changed files in /src/protocol-relay/java/");
|
||||
|
||||
i = copyAllModified(diffFromTeaVM, originalSourceTeaVM);
|
||||
if(i > 0) {
|
||||
flag = true;
|
||||
}
|
||||
System.out.println("Found " + i + " changed files in /src/teavm/java/");
|
||||
|
||||
i = copyAllModified(diffFromBootMenu, originalSourceBootMenu);
|
||||
if(i > 0) {
|
||||
flag = true;
|
||||
}
|
||||
System.out.println("Found " + i + " changed files in /src/teavm-boot-menu/java/");
|
||||
|
||||
i = copyAllModified(diffFromTeaVMC, originalSourceTeaVMC);
|
||||
if(i > 0) {
|
||||
flag = true;
|
||||
}
|
||||
System.out.println("Found " + i + " changed files in /src/teavmc-classpath/resources/");
|
||||
|
||||
i = copyAllModified(diffFromLWJGL, originalSourceLWJGL);
|
||||
if(i > 0) {
|
||||
flag = true;
|
||||
}
|
||||
System.out.println("Found " + i + " changed files in /src/lwjgl/java/");
|
||||
|
||||
i = createDiffFiles(originalSourceMain, minecraftJavadocTmp, originalUnpatchedSourceMainJar,
|
||||
originalSourceMainJar, diffFromMain, pullRequestToMain, true);
|
||||
i = createDiffFiles(null, minecraftJavadocTmp, originalUnpatchedSourceMainJar,
|
||||
originalSourceMainJar, diffFromGame, pullRequestToMain, true);
|
||||
if(i > 0) {
|
||||
flag = true;
|
||||
}
|
||||
System.out.println("Found " + i + " changed files in /src/main/java/");
|
||||
System.out.println("Found " + i + " changed files in /src/game/java/");
|
||||
|
||||
i = createDiffFiles(originalSourceResources, originalSourceResourcesJar, originalUnpatchedSourceResourcesJar,
|
||||
null, diffFromResources, pullRequestToResources, false);
|
||||
@ -197,9 +237,9 @@ public class PullRequestTask {
|
||||
if(newPath.startsWith("/")) {
|
||||
newPath = newPath.substring(1);
|
||||
}
|
||||
File orig = new File(folderOriginal, newPath);
|
||||
File orig = folderOriginal != null ? new File(folderOriginal, newPath) : null;
|
||||
byte[] jarData = null;
|
||||
boolean replacedFileExists = orig.exists();
|
||||
boolean replacedFileExists = orig != null && orig.exists();
|
||||
if(replacedFileExists) {
|
||||
filesReplaced.add(newPath);
|
||||
if(copyFileIfChanged(wf, orig)) {
|
||||
@ -253,9 +293,13 @@ public class PullRequestTask {
|
||||
++cnt;
|
||||
}
|
||||
}else {
|
||||
filesReplaced.add(newPath);
|
||||
FileUtils.copyFile(wf, orig);
|
||||
++cnt;
|
||||
if(folderOriginal == null) {
|
||||
System.err.println("Detected a new file in src/game/java, it will be ignored! Do not created new files! (" + newPath + ")");
|
||||
}else {
|
||||
filesReplaced.add(newPath);
|
||||
FileUtils.copyFile(wf, orig);
|
||||
++cnt;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -278,6 +322,10 @@ public class PullRequestTask {
|
||||
}
|
||||
}
|
||||
|
||||
if(folderOriginal != null) {
|
||||
cnt += removeAllDeleted(folderEdited, folderOriginal);
|
||||
}
|
||||
|
||||
return cnt;
|
||||
}
|
||||
|
||||
@ -344,6 +392,33 @@ public class PullRequestTask {
|
||||
++cnt;
|
||||
}
|
||||
}
|
||||
cnt += removeAllDeleted(inDir, outDir);
|
||||
return cnt;
|
||||
}
|
||||
|
||||
private static int removeAllDeleted(File inDir, File outDir) throws IOException {
|
||||
if(!inDir.isDirectory()) {
|
||||
return 0;
|
||||
}
|
||||
int cnt = 0;
|
||||
Collection<File> existingFiles = FileUtils.listFiles(outDir, null, true);
|
||||
String existingPrefix = outDir.getAbsolutePath();
|
||||
for(File wf : existingFiles) {
|
||||
String editedPath = wf.getAbsolutePath().replace(existingPrefix, "");
|
||||
if(editedPath.indexOf('\\') != -1) {
|
||||
editedPath = editedPath.replace('\\', '/');
|
||||
}
|
||||
if(editedPath.startsWith("/")) {
|
||||
editedPath = editedPath.substring(1);
|
||||
}
|
||||
File edited = new File(inDir, editedPath);
|
||||
if(!edited.isFile()) {
|
||||
if(!wf.delete()) {
|
||||
throw new IOException("Could not delete file: " + wf.getAbsolutePath());
|
||||
}
|
||||
++cnt;
|
||||
}
|
||||
}
|
||||
return cnt;
|
||||
}
|
||||
|
||||
@ -392,15 +467,6 @@ public class PullRequestTask {
|
||||
return hex32(crc.getValue());
|
||||
}
|
||||
|
||||
private static boolean checkCRC32(File in1, File in2) throws IOException {
|
||||
CRC32 crc = new CRC32();
|
||||
crc.update(FileUtils.readFileToByteArray(in1));
|
||||
long v1 = crc.getValue();
|
||||
crc.reset();
|
||||
crc.update(FileUtils.readFileToByteArray(in2));
|
||||
return v1 != crc.getValue();
|
||||
}
|
||||
|
||||
private static boolean copyFileIfChanged(File in1, File in2) throws IOException {
|
||||
if(!in2.exists()) {
|
||||
FileUtils.copyFile(in1, in2);
|
||||
@ -409,20 +475,14 @@ public class PullRequestTask {
|
||||
if(in1.lastModified() == in2.lastModified()) {
|
||||
return false;
|
||||
}
|
||||
CRC32 crc = new CRC32();
|
||||
byte[] f1 = FileUtils.readFileToByteArray(in1);
|
||||
crc.update(f1);
|
||||
long v1 = crc.getValue();
|
||||
crc.reset();
|
||||
byte[] f2 = FileUtils.readFileToByteArray(in2);
|
||||
crc.update(f2);
|
||||
if(v1 != crc.getValue()) {
|
||||
//System.out.println("changed: " + in1.getAbsolutePath());
|
||||
if(!Arrays.equals(f1, f2)) {
|
||||
FileUtils.writeByteArrayToFile(in2, f1);
|
||||
return true;
|
||||
}else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -122,13 +122,22 @@ public class SetupWorkspace {
|
||||
|
||||
File repoSources = new File("./sources");
|
||||
File repoSourcesSetup = new File(repoSources, "setup/workspace_template");
|
||||
File repoSourcesGame = new File(repoSources, "main/java");
|
||||
File repoSourcesMain = new File(repoSources, "main/java");
|
||||
File repoSourcesTeaVM = new File(repoSources, "teavm/java");
|
||||
File repoSourcesLWJGL = new File(repoSources, "lwjgl/java");
|
||||
File repoSourcesProtoGame = new File(repoSources, "protocol-game/java");
|
||||
File repoSourcesProtoRelay = new File(repoSources, "protocol-relay/java");
|
||||
File repoSourcesBootMenu = new File(repoSources, "teavm-boot-menu/java");
|
||||
File repoSourcesTeavmCRes = new File(repoSources, "teavmc-classpath/resources");
|
||||
File repoSourcesResources = new File(repoSources, "resources");
|
||||
File srcMainJava = new File(workspaceDirectory, "src/main/java");
|
||||
File srcGameJava = new File(workspaceDirectory, "src/game/java");
|
||||
File srcLWJGLJava = new File(workspaceDirectory, "src/lwjgl/java");
|
||||
File srcTeaVMJava = new File(workspaceDirectory, "src/teavm/java");
|
||||
File srcProtoGame = new File(workspaceDirectory, "src/protocol-game/java");
|
||||
File srcProtoRelay = new File(workspaceDirectory, "src/protocol-relay/java");
|
||||
File srcBootMenu = new File(workspaceDirectory, "src/teavm-boot-menu/java");
|
||||
File srcTeavmCRes = new File(workspaceDirectory, "src/teavmc-classpath/resources");
|
||||
File resourcesExtractTo = new File(workspaceDirectory, "desktopRuntime/resources");
|
||||
File mcLanguagesZip = new File(mcTmpDirectory, "minecraft_languages.zip");
|
||||
File mcLanguagesExtractTo = new File(workspaceDirectory, "javascript/lang");
|
||||
@ -174,11 +183,55 @@ public class SetupWorkspace {
|
||||
System.out.println("Copying files from \"/sources/main/java/\" to workspace...");
|
||||
|
||||
try {
|
||||
FileUtils.copyDirectory(repoSourcesGame, srcMainJava);
|
||||
FileUtils.copyDirectory(repoSourcesMain, srcMainJava);
|
||||
}catch(IOException ex) {
|
||||
System.err.println("ERROR: could not copy \"/sources/main/java/\" to \"" + srcMainJava.getAbsolutePath() + "\"!");
|
||||
throw ex;
|
||||
}
|
||||
|
||||
if(repoSourcesProtoGame.isDirectory()) {
|
||||
System.out.println("Copying files from \"/sources/protocol-game/java/\" to workspace...");
|
||||
|
||||
try {
|
||||
FileUtils.copyDirectory(repoSourcesProtoGame, srcProtoGame);
|
||||
}catch(IOException ex) {
|
||||
System.err.println("ERROR: could not copy \"/sources/protocol-game/java/\" to \"" + srcProtoGame.getAbsolutePath() + "\"!");
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
if(repoSourcesProtoRelay.isDirectory()) {
|
||||
System.out.println("Copying files from \"/sources/protocol-relay/java/\" to workspace...");
|
||||
|
||||
try {
|
||||
FileUtils.copyDirectory(repoSourcesProtoRelay, srcProtoRelay);
|
||||
}catch(IOException ex) {
|
||||
System.err.println("ERROR: could not copy \"/sources/protocol-relay/java/\" to \"" + srcProtoRelay.getAbsolutePath() + "\"!");
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
if(repoSourcesTeavmCRes.isDirectory()) {
|
||||
System.out.println("Copying files from \"/sources/teavmc-classpath/resources/\" to workspace...");
|
||||
|
||||
try {
|
||||
FileUtils.copyDirectory(repoSourcesTeavmCRes, srcTeavmCRes);
|
||||
}catch(IOException ex) {
|
||||
System.err.println("ERROR: could not copy \"/sources/teavmc-classpath/resources/\" to \"" + srcTeavmCRes.getAbsolutePath() + "\"!");
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
if(repoSourcesBootMenu.isDirectory()) {
|
||||
System.out.println("Copying files from \"/sources/teavm-boot-menu/java/\" to workspace...");
|
||||
|
||||
try {
|
||||
FileUtils.copyDirectory(repoSourcesBootMenu, srcBootMenu);
|
||||
}catch(IOException ex) {
|
||||
System.err.println("ERROR: could not copy \"/sources/teavm-boot-menu/java/\" to \"" + srcBootMenu.getAbsolutePath() + "\"!");
|
||||
throw ex;
|
||||
}
|
||||
}
|
||||
|
||||
if(repoSourcesLWJGL.isDirectory()) {
|
||||
System.out.println("Copying files from \"/sources/lwjgl/java/\" to workspace...");
|
||||
@ -255,18 +308,18 @@ public class SetupWorkspace {
|
||||
minecraftResJar = tmpPatchedPatchResOut;
|
||||
|
||||
}else {
|
||||
System.out.println("Extracting files from \"minecraft_src_javadoc.jar\" to \"/src/main/java/\"...");
|
||||
System.out.println("Extracting files from \"minecraft_src_javadoc.jar\" to \"/src/game/java/\"...");
|
||||
}
|
||||
|
||||
try {
|
||||
if(!srcMainJava.isDirectory() && !srcMainJava.mkdirs()) {
|
||||
if(!srcGameJava.isDirectory() && !srcGameJava.mkdirs()) {
|
||||
System.err.println("ERROR: Could not create destination directory!");
|
||||
return false;
|
||||
}
|
||||
extractJarTo(minecraftJavadocTmp, srcMainJava);
|
||||
extractJarTo(minecraftJavadocTmp, srcGameJava);
|
||||
}catch(IOException ex) {
|
||||
System.err.println("ERROR: could not extract \"" + minecraftJavadocTmp.getName() + ".jar\" to \"" +
|
||||
srcMainJava.getAbsolutePath() + "\"!");
|
||||
srcGameJava.getAbsolutePath() + "\"!");
|
||||
throw ex;
|
||||
}
|
||||
|
||||
@ -364,8 +417,11 @@ public class SetupWorkspace {
|
||||
dotClasspathFile = dotClasspathFile.replace("${LIBRARY_CLASSPATH}", String.join(System.lineSeparator(), classpathEntries));
|
||||
FileUtils.writeStringToFile(new File(desktopRuntimeProjectDir, ".classpath"), dotClasspathFile, "UTF-8");
|
||||
|
||||
dotProjectFile = dotProjectFile.replace("${LWJGL_SRC_FOLDER}", bsToS((new File(workspaceDirectory, "src/lwjgl/java")).getAbsolutePath()));
|
||||
dotProjectFile = dotProjectFile.replace("${MAIN_SRC_FOLDER}", bsToS((new File(workspaceDirectory, "src/main/java")).getAbsolutePath()));
|
||||
dotProjectFile = dotProjectFile.replace("${GAME_SRC_FOLDER}", bsToS((new File(workspaceDirectory, "src/game/java")).getAbsolutePath()));
|
||||
dotProjectFile = dotProjectFile.replace("${PROTO_GAME_SRC_FOLDER}", bsToS((new File(workspaceDirectory, "src/protocol-game/java")).getAbsolutePath()));
|
||||
dotProjectFile = dotProjectFile.replace("${PROTO_RELAY_SRC_FOLDER}", bsToS((new File(workspaceDirectory, "src/protocol-relay/java")).getAbsolutePath()));
|
||||
dotProjectFile = dotProjectFile.replace("${LWJGL_SRC_FOLDER}", bsToS((new File(workspaceDirectory, "src/lwjgl/java")).getAbsolutePath()));
|
||||
FileUtils.writeStringToFile(new File(desktopRuntimeProjectDir, ".project"), dotProjectFile, "UTF-8");
|
||||
|
||||
debugRuntimeLaunchConfig = debugRuntimeLaunchConfig.replace("${MAIN_CLASS_FILE}", mainClassConfFile);
|
||||
|
@ -7,6 +7,9 @@ import java.lang.reflect.Method;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLClassLoader;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import net.lax1dude.eaglercraft.v1_8.buildtools.gui.TeaVMBinaries;
|
||||
@ -33,6 +36,7 @@ public class TeaVMBridge {
|
||||
/**
|
||||
* <h3>List of required options:</h3>
|
||||
* <table>
|
||||
* <tr><td><b>compileClassPathEntries</b></td><td>-> Additional compiler class path entries</td></tr>
|
||||
* <tr><td><b>classPathEntries</b></td><td>-> BuildStrategy.setClassPathEntries(List<String>)</td></tr>
|
||||
* <tr><td><b>entryPointName</b></td><td>-> BuildStrategy.setEntryPointName(String)</td></tr>
|
||||
* <tr><td><b>mainClass</b></td><td>-> BuildStrategy.setMainClass(String)</td></tr>
|
||||
@ -45,14 +49,20 @@ public class TeaVMBridge {
|
||||
* <br>
|
||||
*/
|
||||
public static boolean compileTeaVM(Map<String, Object> options) throws TeaVMClassLoadException, TeaVMRuntimeException {
|
||||
File[] cp = TeaVMBinaries.getTeaVMCompilerClasspath();
|
||||
URL[] urls = new URL[cp.length];
|
||||
List<File> philes = new ArrayList<>();
|
||||
List<String> things = (List<String>)options.get("compileClassPathEntries");
|
||||
for(int i = 0, l = things.size(); i < l; ++i) {
|
||||
philes.add(new File(things.get(i)));
|
||||
}
|
||||
philes.addAll(Arrays.asList(TeaVMBinaries.getTeaVMCompilerClasspath()));
|
||||
|
||||
for(int i = 0; i < cp.length; ++i) {
|
||||
URL[] urls = new URL[philes.size()];
|
||||
|
||||
for(int i = 0; i < urls.length; ++i) {
|
||||
try {
|
||||
urls[i] = cp[i].toURI().toURL();
|
||||
urls[i] = philes.get(i).toURI().toURL();
|
||||
} catch (MalformedURLException e) {
|
||||
throw new TeaVMClassLoadException("Could not resolve URL for: " + cp[i].getAbsolutePath(), e);
|
||||
throw new TeaVMClassLoadException("Could not resolve URL for: " + philes.get(i).getAbsolutePath(), e);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
u36
|
||||
u37
|
@ -1,4 +1,4 @@
|
||||
# 144 files to delete:
|
||||
# 145 files to delete:
|
||||
net/minecraft/client/renderer/VertexBufferUploader.java
|
||||
net/minecraft/realms/DisconnectedRealmsScreen.java
|
||||
net/minecraft/client/stream/Metadata.java
|
||||
@ -45,6 +45,7 @@ net/minecraft/network/NettyEncryptingDecoder.java
|
||||
net/minecraft/server/integrated/IntegratedPlayerList.java
|
||||
net/minecraft/client/renderer/WorldVertexBufferUploader.java
|
||||
net/minecraft/network/PingResponseHandler.java
|
||||
net/minecraft/profiler/Profiler.java
|
||||
net/minecraft/client/stream/NullStream.java
|
||||
net/minecraft/network/NetworkSystem.java
|
||||
net/minecraft/client/shader/Shader.java
|
||||
|
@ -18,15 +18,14 @@
|
||||
|
||||
~ import net.minecraft.client.resources.I18n;
|
||||
|
||||
> DELETE 10 @ 10 : 11
|
||||
> DELETE 9 @ 9 : 11
|
||||
|
||||
> DELETE 4 @ 4 : 6
|
||||
> DELETE 3 @ 3 : 6
|
||||
|
||||
> CHANGE 22 : 25 @ 22 : 32
|
||||
> CHANGE 22 : 24 @ 22 : 32
|
||||
|
||||
~ ScaledResolution scaledresolution = new ScaledResolution(this.mc);
|
||||
~ GlStateManager.ortho(0.0D, scaledresolution.getScaledWidth_double(),
|
||||
~ scaledresolution.getScaledHeight_double(), 0.0D, 100.0D, 300.0D);
|
||||
~ GlStateManager.ortho(0.0D, mc.scaledResolution.getScaledWidth_double(),
|
||||
~ mc.scaledResolution.getScaledHeight_double(), 0.0D, 100.0D, 300.0D);
|
||||
|
||||
> INSERT 19 : 37 @ 19
|
||||
|
||||
@ -49,7 +48,11 @@
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 13 : 14 @ 13 : 20
|
||||
> CHANGE 9 : 10 @ 9 : 10
|
||||
|
||||
~ ScaledResolution scaledresolution = mc.scaledResolution;
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 10
|
||||
|
||||
~ GlStateManager.clear(256);
|
||||
|
||||
@ -58,6 +61,13 @@
|
||||
~ GlStateManager.clear(16640);
|
||||
~ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
|
||||
> DELETE 44 @ 44 : 49
|
||||
> CHANGE 41 : 45 @ 41 : 47
|
||||
|
||||
~ if (this.message != null) {
|
||||
~ this.mc.fontRendererObj.drawStringWithShadow(this.message,
|
||||
~ (float) ((k - this.mc.fontRendererObj.getStringWidth(this.message)) / 2),
|
||||
~ (float) (l / 2 - 4 + 8), 16777215);
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> EOF
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -12,11 +12,7 @@
|
||||
+ import com.google.common.collect.Maps;
|
||||
+
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ MOBS("hostile", 5), ANIMALS("neutral", 6), PLAYERS("player", 7), AMBIENT("ambient", 8), VOICE("voice", 9);
|
||||
|
||||
> INSERT 1 : 3 @ 1
|
||||
> INSERT 4 : 6 @ 4
|
||||
|
||||
+ public static final SoundCategory[] _VALUES = values();
|
||||
+
|
||||
|
@ -13,12 +13,10 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 1 : 13 @ 1 : 11
|
||||
> CHANGE 1 : 11 @ 1 : 11
|
||||
|
||||
~ import java.util.Set;
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.PlatformAudio;
|
||||
~
|
||||
~ import com.google.common.collect.Lists;
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftSoundManager;
|
||||
@ -77,14 +75,7 @@
|
||||
~ } catch (IOException e) {
|
||||
~ throw new RuntimeException("Exception caught reading JSON", e);
|
||||
|
||||
> INSERT 122 : 126 @ 122
|
||||
|
||||
+ if (category == SoundCategory.VOICE) {
|
||||
+ PlatformAudio.setMicVol(volume);
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 13 : 19 @ 13 : 15
|
||||
> CHANGE 135 : 141 @ 135 : 137
|
||||
|
||||
~ SoundCategory cat = soundeventaccessorcomposite.getSoundCategory();
|
||||
~ for (int i = 0; i < categories.length; ++i) {
|
||||
|
@ -5,24 +5,39 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
> CHANGE 2 : 7 @ 2 : 4
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.profanity_filter.ProfanityFilter;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.profile.SkinModel;
|
||||
|
||||
> DELETE 2 @ 2 : 6
|
||||
|
||||
> DELETE 6 @ 6 : 7
|
||||
> INSERT 4 : 5 @ 4
|
||||
|
||||
> INSERT 6 : 14 @ 6
|
||||
+ import net.minecraft.event.ClickEvent;
|
||||
|
||||
+ public long eaglerHighPolyAnimationTick = System.currentTimeMillis();
|
||||
> INSERT 1 : 4 @ 1
|
||||
|
||||
+ import net.minecraft.scoreboard.ScorePlayerTeam;
|
||||
+ import net.minecraft.util.ChatComponentText;
|
||||
+ import net.minecraft.util.IChatComponent;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 6 : 16 @ 6
|
||||
|
||||
+ public long eaglerHighPolyAnimationTick = EagRuntime.steadyTimeMillis();
|
||||
+ public float eaglerHighPolyAnimationFloat1 = 0.0f;
|
||||
+ public float eaglerHighPolyAnimationFloat2 = 0.0f;
|
||||
+ public float eaglerHighPolyAnimationFloat3 = 0.0f;
|
||||
+ public float eaglerHighPolyAnimationFloat4 = 0.0f;
|
||||
+ public float eaglerHighPolyAnimationFloat5 = 0.0f;
|
||||
+ public float eaglerHighPolyAnimationFloat6 = 0.0f;
|
||||
+ public EaglercraftUUID clientBrandUUIDCache = null;
|
||||
+ private String nameProfanityFilter = null;
|
||||
+
|
||||
|
||||
> DELETE 38 @ 38 : 56
|
||||
@ -35,4 +50,29 @@
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 27 : 49 @ 27
|
||||
|
||||
+
|
||||
+ public String getNameProfanityFilter() {
|
||||
+ if (Minecraft.getMinecraft().isEnableProfanityFilter()) {
|
||||
+ if (nameProfanityFilter == null) {
|
||||
+ nameProfanityFilter = ProfanityFilter.getInstance()
|
||||
+ .profanityFilterString(this.getGameProfile().getName());
|
||||
+ }
|
||||
+ return nameProfanityFilter;
|
||||
+ } else {
|
||||
+ return this.getGameProfile().getName();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public IChatComponent getDisplayNameProfanityFilter() {
|
||||
+ ChatComponentText chatcomponenttext = new ChatComponentText(
|
||||
+ ScorePlayerTeam.formatPlayerName(this.getTeam(), this.getNameProfanityFilter()));
|
||||
+ chatcomponenttext.getChatStyle()
|
||||
+ .setChatClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/msg " + this.getName() + " "));
|
||||
+ chatcomponenttext.getChatStyle().setChatHoverEvent(this.getHoverEvent());
|
||||
+ chatcomponenttext.getChatStyle().setInsertion(this.getName());
|
||||
+ return chatcomponenttext;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,8 +5,9 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 4 @ 2
|
||||
> INSERT 2 : 5 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANClientNetworkManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.sp.socket.ClientIntegratedServerNetworkManager;
|
||||
|
||||
@ -22,7 +23,11 @@
|
||||
|
||||
~ public EntityPlayerSP(Minecraft mcIn, World worldIn, NetHandlerPlayClient netHandler, StatFileWriter statWriter) {
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+ this.clientBrandUUIDCache = EaglercraftVersion.clientBrandUUID;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
|
@ -0,0 +1,28 @@
|
||||
|
||||
# Eagler Context Redacted Diff
|
||||
# Copyright (c) 2024 lax1dude. All rights reserved.
|
||||
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 4 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.profanity_filter.ProfanityFilter;
|
||||
+ import net.minecraft.client.Minecraft;
|
||||
|
||||
> INSERT 5 : 6 @ 5
|
||||
|
||||
+ private IChatComponent lineStringProfanityFilter;
|
||||
|
||||
> CHANGE 9 : 17 @ 9 : 10
|
||||
|
||||
~ if (Minecraft.getMinecraft().isEnableProfanityFilter()) {
|
||||
~ if (lineStringProfanityFilter == null) {
|
||||
~ lineStringProfanityFilter = ProfanityFilter.getInstance().profanityFilterChatComponent(lineString);
|
||||
~ }
|
||||
~ return lineStringProfanityFilter;
|
||||
~ } else {
|
||||
~ return lineString;
|
||||
~ }
|
||||
|
||||
> EOF
|
@ -7,12 +7,13 @@
|
||||
|
||||
> DELETE 2 @ 2 : 6
|
||||
|
||||
> CHANGE 4 : 11 @ 4 : 6
|
||||
> CHANGE 4 : 12 @ 4 : 6
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.IOUtils;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.FontMappingHelper;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ImageData;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
@ -50,7 +51,24 @@
|
||||
~ protected boolean underlineStyle;
|
||||
~ protected boolean strikethroughStyle;
|
||||
|
||||
> CHANGE 43 : 44 @ 43 : 44
|
||||
> INSERT 1 : 15 @ 1
|
||||
|
||||
+ protected static char[] codepointLookup = new char[] { 192, 193, 194, 200, 202, 203, 205, 211, 212, 213, 218, 223,
|
||||
+ 227, 245, 287, 304, 305, 338, 339, 350, 351, 372, 373, 382, 519, 0, 0, 0, 0, 0, 0, 0, 32, 33, 34, 35, 36,
|
||||
+ 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
|
||||
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90,
|
||||
+ 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113,
|
||||
+ 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 0, 199, 252, 233, 226, 228, 224, 229, 231,
|
||||
+ 234, 235, 232, 239, 238, 236, 196, 197, 201, 230, 198, 244, 246, 242, 251, 249, 255, 214, 220, 248, 163,
|
||||
+ 216, 215, 402, 225, 237, 243, 250, 241, 209, 170, 186, 191, 174, 172, 189, 188, 161, 171, 187, 9617, 9618,
|
||||
+ 9619, 9474, 9508, 9569, 9570, 9558, 9557, 9571, 9553, 9559, 9565, 9564, 9563, 9488, 9492, 9524, 9516, 9500,
|
||||
+ 9472, 9532, 9566, 9567, 9562, 9556, 9577, 9574, 9568, 9552, 9580, 9575, 9576, 9572, 9573, 9561, 9560, 9554,
|
||||
+ 9555, 9579, 9578, 9496, 9484, 9608, 9604, 9612, 9616, 9600, 945, 946, 915, 960, 931, 963, 956, 964, 934,
|
||||
+ 920, 937, 948, 8734, 8709, 8712, 8745, 8801, 177, 8805, 8804, 8992, 8993, 247, 8776, 176, 8729, 183, 8730,
|
||||
+ 8319, 178, 9632, 0 };
|
||||
+
|
||||
|
||||
> CHANGE 42 : 43 @ 42 : 43
|
||||
|
||||
~ ImageData bufferedimage;
|
||||
|
||||
@ -60,7 +78,11 @@
|
||||
~ int j = bufferedimage.height;
|
||||
~ int[] aint = bufferedimage.pixels;
|
||||
|
||||
> CHANGE 68 : 87 @ 68 : 78
|
||||
> CHANGE 54 : 55 @ 54 : 56
|
||||
|
||||
~ int i = FontMappingHelper.lookupChar(parChar1, false);
|
||||
|
||||
> CHANGE 12 : 31 @ 12 : 22
|
||||
|
||||
~ Tessellator tessellator = Tessellator.getInstance();
|
||||
~ WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
@ -130,7 +152,20 @@
|
||||
|
||||
~ int i1 = "0123456789abcdefklmnor".indexOf(Character.toLowerCase(parString1.charAt(i + 1)));
|
||||
|
||||
> CHANGE 133 : 134 @ 133 : 134
|
||||
> CHANGE 39 : 40 @ 39 : 41
|
||||
|
||||
~ int j = FontMappingHelper.lookupChar(c0, false);
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ char[] chars = FontRenderer.codepointLookup;
|
||||
|
||||
> CHANGE 3 : 5 @ 3 : 8
|
||||
|
||||
~ j = this.fontRandom.nextInt(chars.length);
|
||||
~ c1 = chars[j];
|
||||
|
||||
> CHANGE 82 : 83 @ 82 : 83
|
||||
|
||||
~ private int renderStringAligned(String text, int x, int y, int wrapWidth, int color, boolean parFlag) {
|
||||
|
||||
@ -153,7 +188,11 @@
|
||||
|
||||
+ return (int) this.posX;
|
||||
|
||||
> INSERT 119 : 122 @ 119
|
||||
> CHANGE 42 : 43 @ 42 : 44
|
||||
|
||||
~ int i = FontMappingHelper.lookupChar(character, false);
|
||||
|
||||
> INSERT 75 : 78 @ 75
|
||||
|
||||
+ if ((textColor & -67108864) == 0) {
|
||||
+ textColor |= -16777216;
|
||||
|
@ -46,4 +46,12 @@
|
||||
~ GlStateManager.popMatrix();
|
||||
~ }
|
||||
|
||||
> INSERT 32 : 37 @ 32
|
||||
|
||||
+
|
||||
+ public boolean isSliderTouchEvents() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 2 : 13 @ 2 : 4
|
||||
> CHANGE 2 : 18 @ 2 : 4
|
||||
|
||||
~
|
||||
~ import org.apache.commons.lang3.StringUtils;
|
||||
@ -16,25 +16,50 @@
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVisualViewport;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.notifications.GuiButtonNotifBell;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.notifications.GuiScreenNotifications;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.minecraft.client.resources.I18n;
|
||||
|
||||
> DELETE 6 @ 6 : 11
|
||||
|
||||
> INSERT 12 : 14 @ 12
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ public class GuiChat extends GuiScreenVisualViewport {
|
||||
|
||||
> INSERT 10 : 13 @ 10
|
||||
|
||||
+ private GuiButton exitButton;
|
||||
+ private GuiButtonNotifBell notifBellButton;
|
||||
+
|
||||
|
||||
> INSERT 9 : 12 @ 9
|
||||
> INSERT 9 : 17 @ 9
|
||||
|
||||
+ if (!(this instanceof GuiSleepMP)) {
|
||||
+ this.buttonList.add(exitButton = new GuiButton(69, this.width - 100, 3, 97, 20, I18n.format("chat.exit")));
|
||||
+ if (!this.mc.isIntegratedServerRunning() && this.mc.thePlayer != null
|
||||
+ && this.mc.thePlayer.sendQueue.getEaglerMessageProtocol().ver >= 4) {
|
||||
+ this.buttonList.add(notifBellButton = new GuiButtonNotifBell(70, this.width - 122, 3));
|
||||
+ notifBellButton.setUnread(mc.thePlayer.sendQueue.getNotifManager().getUnread());
|
||||
+ }
|
||||
+ }
|
||||
|
||||
> CHANGE 18 : 20 @ 18 : 27
|
||||
> CHANGE 14 : 15 @ 14 : 15
|
||||
|
||||
~ public void updateScreen0() {
|
||||
|
||||
> INSERT 1 : 4 @ 1
|
||||
|
||||
+ if (notifBellButton != null && mc.thePlayer != null) {
|
||||
+ notifBellButton.setUnread(mc.thePlayer.sendQueue.getNotifManager().getUnread());
|
||||
+ }
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 11
|
||||
|
||||
~ protected void keyTyped(char parChar1, int parInt1) {
|
||||
~ if (parInt1 == 1 && (this.mc.gameSettings.keyBindClose.getKeyCode() == 0 || this.mc.areKeysLocked())) {
|
||||
@ -77,13 +102,30 @@
|
||||
|
||||
> CHANGE 25 : 26 @ 25 : 26
|
||||
|
||||
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||
~ protected void mouseClicked0(int parInt1, int parInt2, int parInt3) {
|
||||
|
||||
> INSERT 11 : 17 @ 11
|
||||
> CHANGE 1 : 3 @ 1 : 2
|
||||
|
||||
~ IChatComponent ichatcomponent = this.mc.ingameGUI.getChatGUI()
|
||||
~ .getChatComponent(PointerInputAbstraction.getVCursorX(), PointerInputAbstraction.getVCursorY());
|
||||
|
||||
> INSERT 3 : 6 @ 3
|
||||
|
||||
+ if (mc.notifRenderer.handleClicked(this, parInt1, parInt2)) {
|
||||
+ return;
|
||||
+ }
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ super.mouseClicked0(parInt1, parInt2, parInt3);
|
||||
|
||||
> INSERT 2 : 10 @ 2
|
||||
|
||||
+ protected void actionPerformed(GuiButton par1GuiButton) {
|
||||
+ if (par1GuiButton.id == 69) {
|
||||
+ this.mc.displayGuiScreen(null);
|
||||
+ } else if (par1GuiButton.id == 70) {
|
||||
+ this.mc.displayGuiScreen(new GuiScreenNotifications(this));
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
@ -101,27 +143,43 @@
|
||||
|
||||
~ stringbuilder.append(this.foundPlayerNames.get(i));
|
||||
|
||||
> INSERT 44 : 45 @ 44
|
||||
> CHANGE 41 : 42 @ 41 : 42
|
||||
|
||||
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
~ public void drawScreen0(int i, int j, float f) {
|
||||
|
||||
> INSERT 5 : 9 @ 5
|
||||
> CHANGE 2 : 5 @ 2 : 3
|
||||
|
||||
+ if (exitButton != null) {
|
||||
+ exitButton.yPosition = 3 + mc.guiAchievement.getHeight();
|
||||
+ }
|
||||
+
|
||||
~ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
~ IChatComponent ichatcomponent = this.mc.ingameGUI.getChatGUI()
|
||||
~ .getChatComponent(PointerInputAbstraction.getVCursorX(), PointerInputAbstraction.getVCursorY());
|
||||
|
||||
> CHANGE 8 : 10 @ 8 : 9
|
||||
> CHANGE 4 : 9 @ 4 : 5
|
||||
|
||||
~ if (exitButton != null) {
|
||||
~ exitButton.yPosition = 3 + mc.guiAchievement.getHeight();
|
||||
~ }
|
||||
~
|
||||
~ super.drawScreen0(i, j, f);
|
||||
|
||||
> CHANGE 7 : 9 @ 7 : 8
|
||||
|
||||
~ for (int i = 0; i < parArrayOfString.length; ++i) {
|
||||
~ String s = parArrayOfString[i];
|
||||
|
||||
> INSERT 24 : 28 @ 24
|
||||
> INSERT 24 : 37 @ 24
|
||||
|
||||
+
|
||||
+ public boolean blockPTTKey() {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ public boolean showCopyPasteButtons() {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ public void fireInputEvent(EnumInputEvent event, String str) {
|
||||
+ inputField.fireInputEvent(event, str);
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -5,12 +5,13 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 6 @ 2 : 7
|
||||
> CHANGE 2 : 7 @ 2 : 7
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
|
||||
> DELETE 5 @ 5 : 8
|
||||
|
||||
@ -26,11 +27,23 @@
|
||||
|
||||
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||
|
||||
> INSERT 46 : 50 @ 46
|
||||
> INSERT 46 : 62 @ 46
|
||||
|
||||
+
|
||||
+ public boolean blockPTTKey() {
|
||||
+ return commandTextField.isFocused();
|
||||
+ return commandTextField.isFocused() || previousOutputTextField.isFocused();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean showCopyPasteButtons() {
|
||||
+ return commandTextField.isFocused() || previousOutputTextField.isFocused();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void fireInputEvent(EnumInputEvent event, String param) {
|
||||
+ commandTextField.fireInputEvent(event, param);
|
||||
+ previousOutputTextField.fireInputEvent(event, param);
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -11,8 +11,18 @@
|
||||
|
||||
> DELETE 1 @ 1 : 6
|
||||
|
||||
> CHANGE 49 : 50 @ 49 : 50
|
||||
> CHANGE 6 : 8 @ 6 : 7
|
||||
|
||||
~ GameSettings.Options.INVERT_MOUSE, GameSettings.Options.SENSITIVITY,
|
||||
~ GameSettings.Options.EAGLER_TOUCH_CONTROL_OPACITY };
|
||||
|
||||
> CHANGE 42 : 48 @ 42 : 43
|
||||
|
||||
~ public void handleTouchInput() throws IOException {
|
||||
~ super.handleTouchInput();
|
||||
~ this.keyBindingList.handleTouchInput();
|
||||
~ }
|
||||
~
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
> CHANGE 3 : 6 @ 3 : 5
|
||||
|
@ -15,8 +15,13 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 61 : 62 @ 61 : 62
|
||||
> CHANGE 61 : 67 @ 61 : 62
|
||||
|
||||
~ public void handleTouchInput() throws IOException {
|
||||
~ super.handleTouchInput();
|
||||
~ this.createFlatWorldListSlotGui.handleTouchInput();
|
||||
~ }
|
||||
~
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
> EOF
|
||||
|
@ -7,10 +7,11 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 1 : 3 @ 1 : 6
|
||||
> CHANGE 1 : 4 @ 1 : 6
|
||||
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
|
||||
> DELETE 7 @ 7 : 8
|
||||
|
||||
@ -42,4 +43,19 @@
|
||||
~ StringUtils.isNotEmpty(field_146335_h.text) ? "createWorld.seedNote" : "selectWorld.seedInfo",
|
||||
~ new Object[0]), this.width / 2 - 100, 85, -6250336);
|
||||
|
||||
> INSERT 47 : 59 @ 47
|
||||
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean showCopyPasteButtons() {
|
||||
+ return field_146333_g.isFocused() || field_146335_h.isFocused();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void fireInputEvent(EnumInputEvent event, String param) {
|
||||
+ field_146333_g.fireInputEvent(event, param);
|
||||
+ field_146335_h.fireInputEvent(event, param);
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -5,16 +5,25 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 6 : 10 @ 6 : 16
|
||||
> CHANGE 6 : 11 @ 6 : 16
|
||||
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> CHANGE 347 : 348 @ 347 : 348
|
||||
> INSERT 89 : 94 @ 89
|
||||
|
||||
+ public void handleTouchInput() throws IOException {
|
||||
+ super.handleTouchInput();
|
||||
+ this.field_175349_r.handleTouchInput();
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 258 : 259 @ 258 : 259
|
||||
|
||||
~ HString.format("%5.3f", new Object[] { Float.valueOf(this.field_175336_F.mainNoiseScaleX) }),
|
||||
|
||||
@ -106,4 +115,18 @@
|
||||
|
||||
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||
|
||||
> INSERT 59 : 70 @ 59
|
||||
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean showCopyPasteButtons() {
|
||||
+ return field_175349_r.isTextFieldFocused();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void fireInputEvent(EnumInputEvent event, String param) {
|
||||
+ field_175349_r.fireInputEvent(event, param);
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -11,11 +11,16 @@
|
||||
|
||||
~ protected void keyTyped(char parChar1, int parInt1) {
|
||||
|
||||
> INSERT 24 : 28 @ 24
|
||||
> INSERT 24 : 33 @ 24
|
||||
|
||||
+
|
||||
+ public boolean shouldHangupIntegratedServer() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ public boolean canCloseGui() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -29,8 +29,9 @@
|
||||
|
||||
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||
|
||||
> CHANGE 25 : 28 @ 25 : 28
|
||||
> CHANGE 24 : 28 @ 24 : 28
|
||||
|
||||
~ ScaledResolution scaledresolution = mc.scaledResolution;
|
||||
~ GlStateManager.viewport((scaledresolution.getScaledWidth() - 290 - 12) / 2 * scaledresolution.getScaleFactor(),
|
||||
~ (scaledresolution.getScaledHeight() - 220 + 10) / 2 * scaledresolution.getScaleFactor(),
|
||||
~ 290 * scaledresolution.getScaleFactor(), 220 * scaledresolution.getScaleFactor());
|
||||
|
@ -5,10 +5,11 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 7 : 11 @ 7
|
||||
> INSERT 7 : 12 @ 7
|
||||
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
|
||||
@ -18,7 +19,15 @@
|
||||
|
||||
> DELETE 9 @ 9 : 10
|
||||
|
||||
> CHANGE 41 : 42 @ 41 : 42
|
||||
> INSERT 37 : 42 @ 37
|
||||
|
||||
+ public void handleTouchInput() throws IOException {
|
||||
+ super.handleTouchInput();
|
||||
+ this.field_146435_s.handleTouchInput();
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||
|
||||
@ -35,4 +44,18 @@
|
||||
~ for (int i = 0, l = parList.size(); i < l; ++i) {
|
||||
~ flatgeneratorinfo.getWorldFeatures().put(parList.get(i), Maps.newHashMap());
|
||||
|
||||
> INSERT 132 : 143 @ 132
|
||||
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean showCopyPasteButtons() {
|
||||
+ return field_146433_u.isFocused();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void fireInputEvent(EnumInputEvent event, String param) {
|
||||
+ field_146433_u.fireInputEvent(event, param);
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -5,22 +5,31 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 7 @ 2
|
||||
> INSERT 2 : 12 @ 2
|
||||
|
||||
+ import java.util.ArrayList;
|
||||
+ import java.util.Collection;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Display;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Touch;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
+
|
||||
|
||||
> CHANGE 3 : 7 @ 3 : 6
|
||||
> CHANGE 3 : 9 @ 3 : 6
|
||||
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.touch_gui.TouchControls;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.touch_gui.TouchOverlayRenderer;
|
||||
|
||||
> DELETE 2 @ 2 : 11
|
||||
> CHANGE 2 : 3 @ 2 : 11
|
||||
|
||||
~ import net.minecraft.client.gui.inventory.GuiInventory;
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
@ -28,7 +37,15 @@
|
||||
|
||||
~ import net.minecraft.client.renderer.entity.RenderManager;
|
||||
|
||||
> CHANGE 32 : 33 @ 32 : 33
|
||||
> INSERT 13 : 14 @ 13
|
||||
|
||||
+ import net.minecraft.network.play.client.C16PacketClientStatus;
|
||||
|
||||
> INSERT 11 : 12 @ 11
|
||||
|
||||
+ import net.minecraft.util.MovingObjectPosition.MovingObjectType;
|
||||
|
||||
> CHANGE 8 : 9 @ 8 : 9
|
||||
|
||||
~ private final EaglercraftRandom rand = new EaglercraftRandom();
|
||||
|
||||
@ -40,34 +57,110 @@
|
||||
|
||||
> DELETE 19 @ 19 : 20
|
||||
|
||||
> CHANGE 16 : 19 @ 16 : 21
|
||||
> CHANGE 11 : 12 @ 11 : 12
|
||||
|
||||
~ ScaledResolution scaledresolution = mc.scaledResolution;
|
||||
|
||||
> CHANGE 4 : 7 @ 4 : 9
|
||||
|
||||
~ GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
~ GlStateManager.enableDepth();
|
||||
~ GlStateManager.disableLighting();
|
||||
|
||||
> DELETE 21 @ 21 : 22
|
||||
> INSERT 15 : 17 @ 15
|
||||
|
||||
+ onBeginHotbarDraw();
|
||||
+
|
||||
|
||||
> DELETE 6 @ 6 : 7
|
||||
|
||||
> DELETE 1 @ 1 : 8
|
||||
|
||||
> CHANGE 44 : 45 @ 44 : 47
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
~ this.overlayDebug.renderDebugInfo(scaledresolution);
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 83 : 87 @ 83
|
||||
> DELETE 4 @ 4 : 22
|
||||
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+ GlStateManager.disableBlend();
|
||||
|
||||
> INSERT 7 : 9 @ 7
|
||||
|
||||
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
+ GlStateManager.disableBlend();
|
||||
|
||||
> CHANGE 6 : 8 @ 6 : 14
|
||||
|
||||
~ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
~ GlStateManager.disableBlend();
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 21 : 22 @ 21
|
||||
|
||||
+ }
|
||||
|
||||
> CHANGE 1 : 20 @ 1 : 2
|
||||
|
||||
~ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
~ drawEaglerInteractButton(scaledresolution);
|
||||
~
|
||||
~ onEndHotbarDraw();
|
||||
~
|
||||
~ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
~ if (this.mc.thePlayer.getSleepTimer() > 0) {
|
||||
~ GlStateManager.disableDepth();
|
||||
~ GlStateManager.disableAlpha();
|
||||
~ int j1 = this.mc.thePlayer.getSleepTimer();
|
||||
~ float f1 = (float) j1 / 100.0F;
|
||||
~ if (f1 > 1.0F) {
|
||||
~ f1 = 1.0F - (float) (j1 - 100) / 10.0F;
|
||||
~ }
|
||||
~
|
||||
~ int k = (int) (220.0F * f1) << 24 | 1052704;
|
||||
~ drawRect(0, 0, i, j, k);
|
||||
~ GlStateManager.enableAlpha();
|
||||
~ GlStateManager.enableDepth();
|
||||
|
||||
> INSERT 2 : 8 @ 2
|
||||
|
||||
+ if (this.mc.isDemo()) {
|
||||
+ this.renderDemo(scaledresolution);
|
||||
+ }
|
||||
+
|
||||
+ this.overlayDebug.renderDebugInfo(scaledresolution);
|
||||
+
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 33 @ 33 : 35
|
||||
|
||||
> INSERT 18 : 22 @ 18
|
||||
|
||||
+ if (this.mc.currentScreen == null) {
|
||||
+ this.mc.voiceOverlay.drawOverlay();
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 4 : 7 @ 4
|
||||
> INSERT 4 : 9 @ 4
|
||||
|
||||
+ if (this.mc.gameSettings.hudWorld && (mc.currentScreen == null || !(mc.currentScreen instanceof GuiChat))) {
|
||||
+ j -= 10;
|
||||
+ }
|
||||
+ j -= (this.mc.displayHeight - (Display.getVisualViewportX() + Display.getVisualViewportH())) * j
|
||||
+ / this.mc.displayHeight;
|
||||
|
||||
> INSERT 19 : 30 @ 19
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 11 : 12 @ 11
|
||||
|
||||
+
|
||||
|
||||
> INSERT 4 : 15 @ 4
|
||||
|
||||
+ public void renderGameOverlayCrosshairs(int scaledResWidth, int scaledResHeight) {
|
||||
+ if (this.showCrosshair()) {
|
||||
@ -81,7 +174,55 @@
|
||||
+ }
|
||||
+
|
||||
|
||||
> DELETE 147 @ 147 : 151
|
||||
> INSERT 9 : 26 @ 9
|
||||
|
||||
+
|
||||
+ if (PointerInputAbstraction.isTouchMode()) {
|
||||
+ this.mc.getTextureManager().bindTexture(TouchOverlayRenderer.spriteSheet);
|
||||
+ this.drawTexturedModalRect(i + 89, sr.getScaledHeight() - 22, 234, 0, 22, 22);
|
||||
+ int areaHAdd = 12;
|
||||
+ hotbarAreaX = (i - 91) * mc.displayWidth / sr.getScaledWidth();
|
||||
+ hotbarAreaY = (sr.getScaledHeight() - 22 - areaHAdd) * mc.displayHeight / sr.getScaledHeight();
|
||||
+ hotbarAreaW = 203 * mc.displayWidth / sr.getScaledWidth();
|
||||
+ hotbarAreaH = (22 + areaHAdd) * mc.displayHeight / sr.getScaledHeight();
|
||||
+ } else {
|
||||
+ hotbarAreaX = -1;
|
||||
+ hotbarAreaY = -1;
|
||||
+ hotbarAreaW = -1;
|
||||
+ hotbarAreaH = -1;
|
||||
+ }
|
||||
+
|
||||
+ this.mc.getTextureManager().bindTexture(widgetsTexPath);
|
||||
|
||||
> INSERT 16 : 17 @ 16
|
||||
|
||||
+
|
||||
|
||||
> DELETE 5 @ 5 : 6
|
||||
|
||||
> DELETE 9 @ 9 : 11
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> DELETE 12 @ 12 : 13
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 10 @ 10 : 11
|
||||
|
||||
> DELETE 5 @ 5 : 6
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ String s = this.highlightingItemStack.getDisplayNameProfanityFilter();
|
||||
|
||||
> DELETE 25 @ 25 : 26
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> DELETE 11 @ 11 : 12
|
||||
|
||||
> DELETE 25 @ 25 : 29
|
||||
|
||||
> CHANGE 17 : 19 @ 17 : 18
|
||||
|
||||
@ -107,7 +248,23 @@
|
||||
+ GlStateManager.enableBlend();
|
||||
+ GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
|
||||
> CHANGE 248 : 249 @ 248 : 249
|
||||
> DELETE 23 @ 23 : 25
|
||||
|
||||
> DELETE 17 @ 17 : 19
|
||||
|
||||
> DELETE 61 @ 61 : 63
|
||||
|
||||
> DELETE 39 @ 39 : 40
|
||||
|
||||
> DELETE 36 @ 36 : 37
|
||||
|
||||
> DELETE 14 @ 14 : 15
|
||||
|
||||
> CHANGE 6 : 7 @ 6 : 9
|
||||
|
||||
~ int i = mc.scaledResolution.getScaledWidth();
|
||||
|
||||
> CHANGE 40 : 41 @ 40 : 41
|
||||
|
||||
~ public void renderVignette(float parFloat1, int scaledWidth, int scaledHeight) {
|
||||
|
||||
@ -179,4 +336,223 @@
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 27 : 243 @ 27
|
||||
|
||||
+
|
||||
+ private int hotbarAreaX = -1;
|
||||
+ private int hotbarAreaY = -1;
|
||||
+ private int hotbarAreaW = -1;
|
||||
+ private int hotbarAreaH = -1;
|
||||
+ private int currentHotbarSlotTouch = -1;
|
||||
+ private long hotbarSlotTouchStart = -1l;
|
||||
+ private boolean hotbarSlotTouchAlreadySelected = false;
|
||||
+ private int interactButtonX = -1;
|
||||
+ private int interactButtonY = -1;
|
||||
+ private int interactButtonW = -1;
|
||||
+ private int interactButtonH = -1;
|
||||
+ private int touchVPosX = -1;
|
||||
+ private int touchVPosY = -1;
|
||||
+ private int touchEventUID = -1;
|
||||
+
|
||||
+ private void drawEaglerInteractButton(ScaledResolution parScaledResolution) {
|
||||
+ if (PointerInputAbstraction.isTouchMode() && mc.objectMouseOver != null
|
||||
+ && mc.objectMouseOver.typeOfHit == MovingObjectType.ENTITY) {
|
||||
+ int scale = parScaledResolution.getScaleFactor();
|
||||
+ interactButtonW = 118 * scale;
|
||||
+ interactButtonH = 20 * scale;
|
||||
+ int xx = (parScaledResolution.getScaledWidth() - 118) / 2;
|
||||
+ int yy = parScaledResolution.getScaledHeight() - 70;
|
||||
+ interactButtonX = xx * scale;
|
||||
+ interactButtonY = yy * scale;
|
||||
+ mc.getTextureManager().bindTexture(TouchOverlayRenderer.spriteSheet);
|
||||
+ boolean hover = touchVPosX >= interactButtonX && touchVPosY >= interactButtonY
|
||||
+ && touchVPosX < interactButtonX + interactButtonW && touchVPosY < interactButtonY + interactButtonH;
|
||||
+ float f = MathHelper.clamp_float(mc.gameSettings.touchControlOpacity, 0.0f, 1.0f);
|
||||
+ if (f > 0.0f) {
|
||||
+ GlStateManager.color(1.0f, 1.0f, 1.0f, f);
|
||||
+ drawTexturedModalRect(xx, yy, 0, hover ? 216 : 236, 118, 20);
|
||||
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
+ drawCenteredString(mc.fontRendererObj, I18n.format("touch.interact.entity"),
|
||||
+ parScaledResolution.getScaledWidth() / 2, yy + 6,
|
||||
+ (hover ? 16777120 : 14737632) | ((int) (f * 255.0f) << 24));
|
||||
+ }
|
||||
+ } else {
|
||||
+ interactButtonX = -1;
|
||||
+ interactButtonY = -1;
|
||||
+ interactButtonW = -1;
|
||||
+ interactButtonH = -1;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private int applyTouchHotbarTransformX(int posX, boolean scaled) {
|
||||
+ if (scaled) {
|
||||
+ return (posX + mc.scaledResolution.getScaledWidth() / 4) * 2 / 3;
|
||||
+ } else {
|
||||
+ return (posX + mc.displayWidth / 4) * 2 / 3;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private int applyTouchHotbarTransformY(int posY, boolean scaled) {
|
||||
+ if (scaled) {
|
||||
+ return (posY + mc.scaledResolution.getScaledHeight() / 2) * 2 / 3;
|
||||
+ } else {
|
||||
+ return (posY + mc.displayHeight / 2) * 2 / 3;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private void onBeginHotbarDraw() {
|
||||
+ if (PointerInputAbstraction.isTouchMode()) {
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ ScaledResolution res = mc.scaledResolution;
|
||||
+ GlStateManager.translate(res.getScaledWidth() / -4, res.getScaledHeight() / -2, field_175199_z);
|
||||
+ GlStateManager.scale(1.5f, 1.5f, 1.5f);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private void onEndHotbarDraw() {
|
||||
+ if (PointerInputAbstraction.isTouchMode()) {
|
||||
+ GlStateManager.popMatrix();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ private int getHotbarSlotTouched(int pointX) {
|
||||
+ int xx = pointX - hotbarAreaX - 2;
|
||||
+ xx /= 20 * mc.scaledResolution.getScaleFactor();
|
||||
+ if (xx < 0)
|
||||
+ xx = 0;
|
||||
+ if (xx > 9)
|
||||
+ xx = 9;
|
||||
+ return xx;
|
||||
+ }
|
||||
+
|
||||
+ public boolean handleTouchBeginEagler(int uid, int pointX, int pointY) {
|
||||
+ if (mc.thePlayer == null) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (touchEventUID == -1) {
|
||||
+ pointX = applyTouchHotbarTransformX(pointX, false);
|
||||
+ pointY = applyTouchHotbarTransformY(pointY, false);
|
||||
+ if (pointX >= hotbarAreaX && pointY >= hotbarAreaY && pointX < hotbarAreaX + hotbarAreaW
|
||||
+ && pointY < hotbarAreaY + hotbarAreaH) {
|
||||
+ touchEventUID = uid;
|
||||
+ currentHotbarSlotTouch = getHotbarSlotTouched(pointX);
|
||||
+ hotbarSlotTouchStart = EagRuntime.steadyTimeMillis();
|
||||
+ if (currentHotbarSlotTouch >= 0 && currentHotbarSlotTouch < 9) {
|
||||
+ if (mc.thePlayer.isSpectator()) {
|
||||
+ hotbarSlotTouchAlreadySelected = false;
|
||||
+ mc.ingameGUI.getSpectatorGui().func_175260_a(currentHotbarSlotTouch);
|
||||
+ } else {
|
||||
+ hotbarSlotTouchAlreadySelected = (mc.thePlayer.inventory.currentItem == currentHotbarSlotTouch);
|
||||
+ mc.thePlayer.inventory.currentItem = currentHotbarSlotTouch;
|
||||
+ }
|
||||
+ } else if (currentHotbarSlotTouch == 9) {
|
||||
+ hotbarSlotTouchAlreadySelected = false;
|
||||
+ currentHotbarSlotTouch = 69;
|
||||
+ if (mc.playerController.isRidingHorse()) {
|
||||
+ mc.thePlayer.sendHorseInventory();
|
||||
+ } else {
|
||||
+ mc.getNetHandler().addToSendQueue(
|
||||
+ new C16PacketClientStatus(C16PacketClientStatus.EnumState.OPEN_INVENTORY_ACHIEVEMENT));
|
||||
+ mc.displayGuiScreen(new GuiInventory(mc.thePlayer));
|
||||
+ }
|
||||
+ }
|
||||
+ return true;
|
||||
+ }
|
||||
+ if (pointX >= interactButtonX && pointY >= interactButtonY && pointX < interactButtonX + interactButtonW
|
||||
+ && pointY < interactButtonY + interactButtonH) {
|
||||
+ touchEventUID = uid;
|
||||
+ mc.rightClickMouse();
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ public boolean handleTouchEndEagler(int uid, int pointX, int pointY) {
|
||||
+ if (uid == touchEventUID) {
|
||||
+ if (hotbarSlotTouchStart != -1l && currentHotbarSlotTouch != 69) {
|
||||
+ if (EagRuntime.steadyTimeMillis() - hotbarSlotTouchStart < 350l) {
|
||||
+ if (hotbarSlotTouchAlreadySelected) {
|
||||
+ if (mc.thePlayer != null) {
|
||||
+ mc.thePlayer.dropOneItem(false);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ touchVPosX = -1;
|
||||
+ touchVPosY = -1;
|
||||
+ touchEventUID = -1;
|
||||
+ currentHotbarSlotTouch = -1;
|
||||
+ hotbarSlotTouchStart = -1l;
|
||||
+ hotbarSlotTouchAlreadySelected = false;
|
||||
+ return true;
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ public void updateTouchEagler(boolean screenTouched) {
|
||||
+ if (screenTouched) {
|
||||
+ int pointCount = Touch.touchPointCount();
|
||||
+ for (int i = 0; i < pointCount; ++i) {
|
||||
+ int uid = Touch.touchPointUID(i);
|
||||
+ if (TouchControls.touchControls.containsKey(uid)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ if (touchEventUID == -1 || touchEventUID == uid) {
|
||||
+ touchVPosX = applyTouchHotbarTransformX(Touch.touchPointX(i), false);
|
||||
+ touchVPosY = applyTouchHotbarTransformY(mc.displayHeight - Touch.touchPointY(i) - 1, false);
|
||||
+ long millis = EagRuntime.steadyTimeMillis();
|
||||
+ if (touchEventUID != -1 && hotbarSlotTouchStart != -1l) {
|
||||
+ if (currentHotbarSlotTouch != 69) {
|
||||
+ int slot = getHotbarSlotTouched(touchVPosX);
|
||||
+ if (slot != currentHotbarSlotTouch) {
|
||||
+ hotbarSlotTouchAlreadySelected = false;
|
||||
+ currentHotbarSlotTouch = slot;
|
||||
+ hotbarSlotTouchStart = millis;
|
||||
+ if (slot >= 0 && slot < 9) {
|
||||
+ if (mc.thePlayer.isSpectator()) {
|
||||
+ mc.ingameGUI.getSpectatorGui().func_175260_a(slot);
|
||||
+ } else {
|
||||
+ mc.thePlayer.inventory.currentItem = slot;
|
||||
+ }
|
||||
+ }
|
||||
+ } else {
|
||||
+ if (millis - hotbarSlotTouchStart > 1200l) {
|
||||
+ if (!mc.thePlayer.isSpectator()) {
|
||||
+ hotbarSlotTouchStart = millis;
|
||||
+ this.mc.thePlayer.dropOneItem(true);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (touchEventUID != -1) {
|
||||
+ handleTouchEndEagler(touchEventUID, touchVPosX, touchVPosY);
|
||||
+ }
|
||||
+ touchVPosX = -1;
|
||||
+ touchVPosY = -1;
|
||||
+ touchEventUID = -1;
|
||||
+ currentHotbarSlotTouch = -1;
|
||||
+ hotbarSlotTouchStart = -1l;
|
||||
+ hotbarSlotTouchAlreadySelected = false;
|
||||
+ }
|
||||
+
|
||||
+ public boolean isTouchOverlapEagler(int uid, int tx, int ty) {
|
||||
+ if (touchEventUID == uid) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ ty = mc.displayHeight - ty - 1;
|
||||
+ tx = applyTouchHotbarTransformX(tx, false);
|
||||
+ ty = applyTouchHotbarTransformY(ty, false);
|
||||
+ return (tx >= hotbarAreaX && ty >= hotbarAreaY && tx < hotbarAreaX + hotbarAreaW
|
||||
+ && ty < hotbarAreaY + hotbarAreaH)
|
||||
+ || (tx >= interactButtonX && ty >= interactButtonY && tx < interactButtonX + interactButtonW
|
||||
+ && ty < interactButtonY + interactButtonH);
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -5,10 +5,14 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 14 @ 2 : 9
|
||||
> CHANGE 2 : 21 @ 2 : 9
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.PauseMenuCustomizeState;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiButtonWithStupidIcons;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.notifications.GuiButtonNotifBell;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.notifications.GuiScreenNotifications;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANInfo;
|
||||
@ -17,6 +21,9 @@
|
||||
~ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.update.GuiUpdateCheckerOverlay;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.voice.GuiVoiceMenu;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.webview.GuiScreenPhishingWaring;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.webview.GuiScreenRecieveServerInfo;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.webview.GuiScreenServerInfo;
|
||||
~ import net.minecraft.client.Minecraft;
|
||||
~ import net.minecraft.client.audio.PositionedSoundRecord;
|
||||
|
||||
@ -28,7 +35,7 @@
|
||||
|
||||
> DELETE 2 @ 2 : 4
|
||||
|
||||
> INSERT 1 : 15 @ 1
|
||||
> INSERT 1 : 16 @ 1
|
||||
|
||||
+ private GuiButton lanButton;
|
||||
+
|
||||
@ -36,6 +43,7 @@
|
||||
+
|
||||
+ private GuiUpdateCheckerOverlay updateCheckerOverlay;
|
||||
+ private GuiVoiceMenu voiceMenu;
|
||||
+ private GuiButtonNotifBell notifBellButton;
|
||||
+
|
||||
+ public GuiIngameMenu() {
|
||||
+ updateCheckerOverlay = new GuiUpdateCheckerOverlay(true, this);
|
||||
@ -51,14 +59,56 @@
|
||||
|
||||
+ this.updateCheckerOverlay.setResolution(mc, width, height);
|
||||
|
||||
> CHANGE 12 : 14 @ 12 : 15
|
||||
> CHANGE 2 : 6 @ 2 : 4
|
||||
|
||||
~ this.buttonList.add(lanButton = new GuiButton(7, this.width / 2 + 2, this.height / 4 + 96 + b0, 98, 20,
|
||||
~ I18n.format(LANServerController.isLANOpen() ? "menu.closeLan" : "menu.openToLan", new Object[0])));
|
||||
~ this.buttonList.add(new GuiButtonWithStupidIcons(1, this.width / 2 - 100, this.height / 4 + 120 + b0,
|
||||
~ I18n.format("menu.returnToMenu", new Object[0]), PauseMenuCustomizeState.icon_disconnect_L,
|
||||
~ PauseMenuCustomizeState.icon_disconnect_L_aspect, PauseMenuCustomizeState.icon_disconnect_R,
|
||||
~ PauseMenuCustomizeState.icon_disconnect_R_aspect));
|
||||
|
||||
> CHANGE 4 : 9 @ 4 : 5
|
||||
> INSERT 2 : 6 @ 2
|
||||
|
||||
+ if (this.mc.thePlayer != null && this.mc.thePlayer.sendQueue.getEaglerMessageProtocol().ver >= 4) {
|
||||
+ this.buttonList.add(notifBellButton = new GuiButtonNotifBell(11, width - 22, height - 22));
|
||||
+ notifBellButton.setUnread(mc.thePlayer.sendQueue.getNotifManager().getUnread());
|
||||
+ }
|
||||
|
||||
> CHANGE 2 : 40 @ 2 : 14
|
||||
|
||||
~ this.buttonList.add(new GuiButtonWithStupidIcons(4, this.width / 2 - 100, this.height / 4 + 24 + b0,
|
||||
~ I18n.format("menu.returnToGame", new Object[0]), PauseMenuCustomizeState.icon_backToGame_L,
|
||||
~ PauseMenuCustomizeState.icon_backToGame_L_aspect, PauseMenuCustomizeState.icon_backToGame_R,
|
||||
~ PauseMenuCustomizeState.icon_backToGame_R_aspect));
|
||||
~ this.buttonList.add(new GuiButtonWithStupidIcons(0, this.width / 2 - 100, this.height / 4 + 96 + b0, 98, 20,
|
||||
~ I18n.format("menu.options", new Object[0]), PauseMenuCustomizeState.icon_options_L,
|
||||
~ PauseMenuCustomizeState.icon_options_L_aspect, PauseMenuCustomizeState.icon_options_R,
|
||||
~ PauseMenuCustomizeState.icon_options_R_aspect));
|
||||
~ this.buttonList
|
||||
~ .add(lanButton = new GuiButtonWithStupidIcons(7, this.width / 2 + 2, this.height / 4 + 96 + b0, 98, 20,
|
||||
~ I18n.format(LANServerController.isLANOpen() ? "menu.closeLan" : "menu.openToLan",
|
||||
~ new Object[0]),
|
||||
~ PauseMenuCustomizeState.icon_discord_L, PauseMenuCustomizeState.icon_discord_L_aspect,
|
||||
~ PauseMenuCustomizeState.icon_discord_R, PauseMenuCustomizeState.icon_discord_R_aspect));
|
||||
~ this.buttonList.add(new GuiButtonWithStupidIcons(5, this.width / 2 - 100, this.height / 4 + 48 + b0, 98, 20,
|
||||
~ I18n.format("gui.achievements", new Object[0]), PauseMenuCustomizeState.icon_achievements_L,
|
||||
~ PauseMenuCustomizeState.icon_achievements_L_aspect, PauseMenuCustomizeState.icon_achievements_R,
|
||||
~ PauseMenuCustomizeState.icon_achievements_R_aspect));
|
||||
~ this.buttonList.add(new GuiButtonWithStupidIcons(6, this.width / 2 + 2, this.height / 4 + 48 + b0, 98, 20,
|
||||
~ I18n.format("gui.stats", new Object[0]), PauseMenuCustomizeState.icon_statistics_L,
|
||||
~ PauseMenuCustomizeState.icon_statistics_L_aspect, PauseMenuCustomizeState.icon_statistics_R,
|
||||
~ PauseMenuCustomizeState.icon_statistics_R_aspect));
|
||||
~ lanButton.enabled = SingleplayerServerController.isWorldRunning();
|
||||
~ if (PauseMenuCustomizeState.discordButtonMode != PauseMenuCustomizeState.DISCORD_MODE_NONE) {
|
||||
~ lanButton.enabled = true;
|
||||
~ lanButton.id = 8;
|
||||
~ lanButton.displayString = "" + PauseMenuCustomizeState.discordButtonText;
|
||||
~ }
|
||||
~ if (PauseMenuCustomizeState.serverInfoMode != PauseMenuCustomizeState.DISCORD_MODE_NONE) {
|
||||
~ this.buttonList.add(new GuiButtonWithStupidIcons(9, this.width / 2 - 100, this.height / 4 + 72 + b0,
|
||||
~ PauseMenuCustomizeState.serverInfoButtonText, PauseMenuCustomizeState.icon_serverInfo_L,
|
||||
~ PauseMenuCustomizeState.icon_serverInfo_L_aspect, PauseMenuCustomizeState.icon_serverInfo_R,
|
||||
~ PauseMenuCustomizeState.icon_serverInfo_R_aspect));
|
||||
~ }
|
||||
~ if (!hasSentAutoSave) {
|
||||
~ hasSentAutoSave = true;
|
||||
~ SingleplayerServerController.autoSave();
|
||||
@ -80,7 +130,7 @@
|
||||
|
||||
~ this.mc.shutdownIntegratedServer(new GuiMultiplayer(new GuiMainMenu()));
|
||||
|
||||
> CHANGE 16 : 30 @ 16 : 17
|
||||
> CHANGE 16 : 69 @ 16 : 17
|
||||
|
||||
~ if (!LANServerController.supported()) {
|
||||
~ mc.displayGuiScreen(new GuiScreenLANNotSupported(this));
|
||||
@ -96,8 +146,47 @@
|
||||
~ new GuiShareToLan(this, this.mc.playerController.getCurrentGameType().getName())));
|
||||
~ }
|
||||
~ break;
|
||||
~ case 8:
|
||||
~ if (PauseMenuCustomizeState.discordButtonMode == PauseMenuCustomizeState.DISCORD_MODE_INVITE_URL
|
||||
~ && PauseMenuCustomizeState.discordInviteURL != null) {
|
||||
~ EagRuntime.openLink(PauseMenuCustomizeState.discordInviteURL);
|
||||
~ }
|
||||
~ break;
|
||||
~ case 9:
|
||||
~ switch (PauseMenuCustomizeState.serverInfoMode) {
|
||||
~ case PauseMenuCustomizeState.SERVER_INFO_MODE_EXTERNAL_URL:
|
||||
~ if (PauseMenuCustomizeState.serverInfoURL != null) {
|
||||
~ EagRuntime.openLink(PauseMenuCustomizeState.serverInfoURL);
|
||||
~ }
|
||||
~ break;
|
||||
~ case PauseMenuCustomizeState.SERVER_INFO_MODE_SHOW_EMBED_OVER_HTTP:
|
||||
~ if (PauseMenuCustomizeState.serverInfoURL != null) {
|
||||
~ GuiScreen screen = GuiScreenServerInfo.createForCurrentState(this,
|
||||
~ PauseMenuCustomizeState.serverInfoURL);
|
||||
~ if (!this.mc.gameSettings.hasHiddenPhishWarning && !GuiScreenPhishingWaring.hasShownMessage) {
|
||||
~ screen = new GuiScreenPhishingWaring(screen);
|
||||
~ }
|
||||
~ this.mc.displayGuiScreen(screen);
|
||||
~ }
|
||||
~ break;
|
||||
~ case PauseMenuCustomizeState.SERVER_INFO_MODE_SHOW_EMBED_OVER_WS:
|
||||
~ if (PauseMenuCustomizeState.serverInfoHash != null) {
|
||||
~ GuiScreen screen = new GuiScreenRecieveServerInfo(this, PauseMenuCustomizeState.serverInfoHash);
|
||||
~ if (!this.mc.gameSettings.hasHiddenPhishWarning && !GuiScreenPhishingWaring.hasShownMessage) {
|
||||
~ screen = new GuiScreenPhishingWaring(screen);
|
||||
~ }
|
||||
~ this.mc.displayGuiScreen(screen);
|
||||
~ }
|
||||
~ break;
|
||||
~ default:
|
||||
~ break;
|
||||
~ }
|
||||
~ break;
|
||||
~ case 11:
|
||||
~ this.mc.displayGuiScreen(new GuiScreenNotifications(this));
|
||||
~ break;
|
||||
|
||||
> CHANGE 6 : 13 @ 6 : 7
|
||||
> CHANGE 6 : 16 @ 6 : 7
|
||||
|
||||
~ if (EagRuntime.getConfiguration().isAllowVoiceClient()
|
||||
~ && (!mc.isSingleplayer() || LANServerController.isHostingLAN())) {
|
||||
@ -106,13 +195,34 @@
|
||||
~ if (Mouse.isActuallyGrabbed()) {
|
||||
~ Mouse.setGrabbed(false);
|
||||
~ }
|
||||
~ if (notifBellButton != null && mc.thePlayer != null) {
|
||||
~ notifBellButton.setUnread(mc.thePlayer.sendQueue.getNotifManager().getUnread());
|
||||
~ }
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ this.drawCenteredString(this.fontRendererObj, I18n.format("menu.game", new Object[0]), this.width / 2, 20,
|
||||
|
||||
> CHANGE 1 : 55 @ 1 : 2
|
||||
> CHANGE 4 : 80 @ 4 : 7
|
||||
|
||||
~ String titleStr = I18n.format("menu.game", new Object[0]);
|
||||
~ int titleStrWidth = fontRendererObj.getStringWidth(titleStr);
|
||||
~ this.drawString(this.fontRendererObj, titleStr, (this.width - titleStrWidth) / 2, 20, 16777215);
|
||||
~ if (PauseMenuCustomizeState.icon_title_L != null) {
|
||||
~ mc.getTextureManager().bindTexture(PauseMenuCustomizeState.icon_title_L);
|
||||
~ GlStateManager.pushMatrix();
|
||||
~ GlStateManager.translate(
|
||||
~ (this.width - titleStrWidth) / 2 - 6 - 16 * PauseMenuCustomizeState.icon_title_L_aspect, 16, 0.0f);
|
||||
~ float f2 = 16.0f / 256.0f;
|
||||
~ GlStateManager.scale(f2 * PauseMenuCustomizeState.icon_title_L_aspect, f2, f2);
|
||||
~ this.drawTexturedModalRect(0, 0, 0, 0, 256, 256);
|
||||
~ GlStateManager.popMatrix();
|
||||
~ }
|
||||
~ if (PauseMenuCustomizeState.icon_title_R != null) {
|
||||
~ mc.getTextureManager().bindTexture(PauseMenuCustomizeState.icon_title_L);
|
||||
~ GlStateManager.pushMatrix();
|
||||
~ GlStateManager.translate((this.width - titleStrWidth) / 2 + titleStrWidth + 6, 16, 0.0f);
|
||||
~ float f2 = 16.0f / 256.0f;
|
||||
~ GlStateManager.scale(f2 * PauseMenuCustomizeState.icon_title_R_aspect, f2, f2);
|
||||
~ this.drawTexturedModalRect(0, 0, 0, 0, 256, 256);
|
||||
~ GlStateManager.popMatrix();
|
||||
~ }
|
||||
~
|
||||
~ this.updateCheckerOverlay.drawScreen(i, j, f);
|
||||
~
|
||||
@ -168,7 +278,7 @@
|
||||
~ } catch (GuiVoiceMenu.AbortedException ex) {
|
||||
~ }
|
||||
|
||||
> INSERT 1 : 80 @ 1
|
||||
> INSERT 1 : 84 @ 1
|
||||
|
||||
+
|
||||
+ protected void keyTyped(char par1, int par2) {
|
||||
@ -249,5 +359,9 @@
|
||||
+ } catch (GuiVoiceMenu.AbortedException ex) {
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected boolean isPartOfPauseMenu() {
|
||||
+ return true;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,16 +5,21 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 3 : 5 @ 3
|
||||
> INSERT 3 : 6 @ 3
|
||||
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.ArrayUtils;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
> DELETE 4 @ 4 : 5
|
||||
|
||||
> CHANGE 17 : 19 @ 17 : 18
|
||||
> CHANGE 8 : 9 @ 8 : 9
|
||||
|
||||
~ super(mcIn, controls.width, controls.height, 66, controls.height - 32, 20);
|
||||
|
||||
> CHANGE 8 : 10 @ 8 : 9
|
||||
|
||||
~ for (int l = 0; l < akeybinding.length; ++l) {
|
||||
~ KeyBinding keybinding = akeybinding[l];
|
||||
@ -25,4 +30,27 @@
|
||||
~ for (int m = 0; m < kb.length; ++m) {
|
||||
~ KeyBinding keybindingx = kb[m];
|
||||
|
||||
> CHANGE 19 : 24 @ 19 : 20
|
||||
|
||||
~ if (var4 != 0 && var4 != 12345)
|
||||
~ return false;
|
||||
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
|
||||
~ if ((!touchMode || (this.btnChangeKeyBinding.isSliderTouchEvents() == (var4 == 12345)))
|
||||
~ && this.btnChangeKeyBinding.mousePressed(GuiKeyBindingList.this.mc, i, j)) {
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 3
|
||||
|
||||
~ } else if ((!touchMode || (this.btnReset.isSliderTouchEvents() == (var4 == 12345)))
|
||||
~ && this.btnReset.mousePressed(GuiKeyBindingList.this.mc, i, j)) {
|
||||
|
||||
> CHANGE 10 : 17 @ 10 : 12
|
||||
|
||||
~ if (var4 != 0 && var4 != 12345)
|
||||
~ return;
|
||||
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
|
||||
~ if (!touchMode || (this.btnChangeKeyBinding.isSliderTouchEvents() == (var4 == 12345)))
|
||||
~ this.btnChangeKeyBinding.mouseReleased(i, j);
|
||||
~ if (!touchMode || (this.btnReset.isSliderTouchEvents() == (var4 == 12345)))
|
||||
~ this.btnReset.mouseReleased(i, j);
|
||||
|
||||
> EOF
|
||||
|
@ -16,11 +16,20 @@
|
||||
|
||||
> DELETE 1 @ 1 : 6
|
||||
|
||||
> CHANGE 34 : 35 @ 34 : 35
|
||||
> CHANGE 34 : 40 @ 34 : 35
|
||||
|
||||
~ public void handleTouchInput() throws IOException {
|
||||
~ super.handleTouchInput();
|
||||
~ this.list.handleTouchInput();
|
||||
~ }
|
||||
~
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
> INSERT 56 : 57 @ 56
|
||||
> CHANGE 12 : 13 @ 12 : 13
|
||||
|
||||
~ ScaledResolution scaledresolution = this.mc.scaledResolution;
|
||||
|
||||
> INSERT 43 : 44 @ 43
|
||||
|
||||
+ this.mc.loadingScreen.eaglerShowRefreshResources();
|
||||
|
||||
|
@ -182,16 +182,15 @@
|
||||
|
||||
~ protected void keyTyped(char parChar1, int parInt1) {
|
||||
|
||||
> CHANGE 3 : 9 @ 3 : 7
|
||||
> CHANGE 3 : 8 @ 3 : 6
|
||||
|
||||
~ if (viewportTexture == null) {
|
||||
~ viewportTexture = new DynamicTexture(256, 256);
|
||||
~ backgroundTexture = this.mc.getTextureManager().getDynamicTextureLocation("background", viewportTexture);
|
||||
~ }
|
||||
~ this.updateCheckerOverlay.setResolution(mc, width, height);
|
||||
~ Calendar calendar = EagRuntime.getLocaleCalendar();
|
||||
|
||||
> DELETE 9 @ 9 : 10
|
||||
> DELETE 10 @ 10 : 11
|
||||
|
||||
> INSERT 1 : 8 @ 1
|
||||
|
||||
|
@ -10,12 +10,14 @@
|
||||
+ import java.io.IOException;
|
||||
+
|
||||
|
||||
> CHANGE 2 : 16 @ 2 : 15
|
||||
> CHANGE 2 : 18 @ 2 : 15
|
||||
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglerXBungeeVersion;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.cookie.ServerCookieDataStore;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
@ -80,7 +82,15 @@
|
||||
+ lanServerList.forceRefresh();
|
||||
+ }
|
||||
|
||||
> CHANGE 32 : 35 @ 32 : 36
|
||||
> INSERT 12 : 17 @ 12
|
||||
|
||||
+ public void handleTouchInput() throws IOException {
|
||||
+ super.handleTouchInput();
|
||||
+ this.serverListSelector.handleTouchInput();
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 20 : 23 @ 20 : 24
|
||||
|
||||
~ this.savedServerList.updateServerPing();
|
||||
~ if (lanServerList.update()) {
|
||||
@ -111,7 +121,7 @@
|
||||
|
||||
> CHANGE 3 : 8 @ 3 : 4
|
||||
|
||||
~ long millis = System.currentTimeMillis();
|
||||
~ long millis = EagRuntime.steadyTimeMillis();
|
||||
~ if (millis - lastRefreshCommit > 700l) {
|
||||
~ lastRefreshCommit = millis;
|
||||
~ this.refreshServerList();
|
||||
@ -123,23 +133,35 @@
|
||||
|
||||
> CHANGE 14 : 19 @ 14 : 16
|
||||
|
||||
~ long millis = System.currentTimeMillis();
|
||||
~ long millis = EagRuntime.steadyTimeMillis();
|
||||
~ if (millis - lastRefreshCommit > 700l) {
|
||||
~ lastRefreshCommit = millis;
|
||||
~ this.refreshServerList();
|
||||
~ }
|
||||
|
||||
> CHANGE 15 : 20 @ 15 : 17
|
||||
> INSERT 10 : 13 @ 10
|
||||
|
||||
~ long millis = System.currentTimeMillis();
|
||||
+ if (!this.selectedServer.enableCookies) {
|
||||
+ ServerCookieDataStore.clearCookie(this.selectedServer.serverIP);
|
||||
+ }
|
||||
|
||||
> CHANGE 5 : 10 @ 5 : 7
|
||||
|
||||
~ long millis = EagRuntime.steadyTimeMillis();
|
||||
~ if (millis - lastRefreshCommit > 700l) {
|
||||
~ lastRefreshCommit = millis;
|
||||
~ this.refreshServerList();
|
||||
~ }
|
||||
|
||||
> CHANGE 10 : 15 @ 10 : 12
|
||||
> INSERT 6 : 9 @ 6
|
||||
|
||||
~ long millis = System.currentTimeMillis();
|
||||
+ if (serverdata.enableCookies && !this.selectedServer.enableCookies) {
|
||||
+ ServerCookieDataStore.clearCookie(this.selectedServer.serverIP);
|
||||
+ }
|
||||
|
||||
> CHANGE 4 : 9 @ 4 : 6
|
||||
|
||||
~ long millis = EagRuntime.steadyTimeMillis();
|
||||
~ if (millis - lastRefreshCommit > 700l) {
|
||||
~ lastRefreshCommit = millis;
|
||||
~ this.refreshServerList();
|
||||
@ -171,7 +193,11 @@
|
||||
+ relaysButton.drawScreen(i, j);
|
||||
+ drawPluginDownloadLink(i, j);
|
||||
|
||||
> INSERT 3 : 4 @ 3
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ GlStateManager.disableLighting();
|
||||
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+ }
|
||||
|
||||
|
@ -28,4 +28,8 @@
|
||||
|
||||
~ this.field_146253_i.add(0, new ChatLine(parInt2, (IChatComponent) list.get(j), parInt1));
|
||||
|
||||
> CHANGE 62 : 63 @ 62 : 63
|
||||
|
||||
~ ScaledResolution scaledresolution = mc.scaledResolution;
|
||||
|
||||
> EOF
|
||||
|
@ -11,4 +11,22 @@
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ public float sliderValue;
|
||||
|
||||
> INSERT 21 : 25 @ 21
|
||||
|
||||
+ public GameSettings.Options getEnumOptions() {
|
||||
+ return options;
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 40 : 44 @ 40
|
||||
|
||||
+
|
||||
+ public boolean isSliderTouchEvents() {
|
||||
+ return true;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,18 +5,26 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 13 @ 2 : 3
|
||||
> CHANGE 2 : 21 @ 2 : 3
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.boot_menu.GuiScreenEnterBootMenu;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.cookie.GuiScreenRevokeSessionToken;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.cookie.ServerCookieDataStore;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFolderResourcePack;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui.GuiShaderConfig;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui.GuiShadersNotSupported;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.profile.GuiScreenImportExportProfile;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.recording.GuiScreenRecordingNote;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.recording.GuiScreenRecordingSettings;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.recording.ScreenRecordingController;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
|
||||
|
||||
> DELETE 1 @ 1 : 21
|
||||
@ -41,11 +49,12 @@
|
||||
|
||||
~ I18n.format("shaders.gui.optionsButton")));
|
||||
|
||||
> CHANGE 2 : 5 @ 2 : 4
|
||||
> CHANGE 2 : 6 @ 2 : 4
|
||||
|
||||
~ boolean support = ScreenRecordingController.isSupported();
|
||||
~ this.buttonList.add(broadcastSettings = new GuiButton(107, this.width / 2 + 5, this.height / 6 + 72 - 6, 150,
|
||||
~ 20, I18n.format(EagRuntime.getRecText(), new Object[0])));
|
||||
~ broadcastSettings.enabled = EagRuntime.recSupported();
|
||||
~ 20, I18n.format(support ? "options.screenRecording.button" : "options.screenRecording.unsupported")));
|
||||
~ broadcastSettings.enabled = support;
|
||||
|
||||
> CHANGE 8 : 10 @ 8 : 9
|
||||
|
||||
@ -87,24 +96,29 @@
|
||||
|
||||
> DELETE 22 @ 22 : 27
|
||||
|
||||
> CHANGE 16 : 18 @ 16 : 23
|
||||
> CHANGE 16 : 22 @ 16 : 22
|
||||
|
||||
~ EagRuntime.toggleRec();
|
||||
~ broadcastSettings.displayString = I18n.format(EagRuntime.getRecText(), new Object[0]);
|
||||
~ if (ScreenRecordingController.isSupported()) {
|
||||
~ GuiScreen screen = new GuiScreenRecordingSettings(this);
|
||||
~ if (!GuiScreenRecordingNote.hasShown) {
|
||||
~ screen = new GuiScreenRecordingNote(screen);
|
||||
~ }
|
||||
~ this.mc.displayGuiScreen(screen);
|
||||
|
||||
> INSERT 2 : 5 @ 2
|
||||
> INSERT 3 : 6 @ 3
|
||||
|
||||
+ if (parGuiButton.id == 104) {
|
||||
+ EagRuntime.showDebugConsole();
|
||||
+ }
|
||||
|
||||
> INSERT 6 : 24 @ 6
|
||||
> INSERT 6 : 49 @ 6
|
||||
|
||||
+
|
||||
+ if (mc.theWorld == null && !EagRuntime.getConfiguration().isDemo()) {
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.scale(0.75f, 0.75f, 0.75f);
|
||||
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
+
|
||||
+ String text = I18n.format("editProfile.importExport");
|
||||
+
|
||||
+ int w = mc.fontRendererObj.getStringWidth(text);
|
||||
@ -118,9 +132,43 @@
|
||||
+ GlStateManager.popMatrix();
|
||||
+ }
|
||||
+
|
||||
+ if (mc.theWorld == null && EagRuntime.getConfiguration().isAllowBootMenu()) {
|
||||
+ drawCenteredString(mc.fontRendererObj, I18n.format("options.pressDeleteText"), width / 2, height / 6 + 22,
|
||||
+ 11184810);
|
||||
+ }
|
||||
+
|
||||
+ if (EagRuntime.getConfiguration().isEnableServerCookies() && mc.thePlayer == null) {
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.scale(0.75f, 0.75f, 0.75f);
|
||||
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
+
|
||||
+ String text = I18n.format("revokeSessionToken.button");
|
||||
+
|
||||
+ int w = mc.fontRendererObj.getStringWidth(text);
|
||||
+ boolean hover = i > width - 5 - (w + 5) * 3 / 4 && j > 1 && i < width - 2 && j < 12;
|
||||
+ if (hover) {
|
||||
+ Mouse.showCursor(EnumCursorType.HAND);
|
||||
+ }
|
||||
+
|
||||
+ drawString(mc.fontRendererObj, EnumChatFormatting.UNDERLINE + text, (width - 1) * 4 / 3 - w - 5, 5,
|
||||
+ hover ? 0xFFEEEE22 : 0xFFCCCCCC);
|
||||
+
|
||||
+ GlStateManager.popMatrix();
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 2 : 14 @ 2
|
||||
> INSERT 2 : 35 @ 2
|
||||
|
||||
+
|
||||
+ @Override
|
||||
+ protected void keyTyped(char parChar1, int parInt1) {
|
||||
+ super.keyTyped(parChar1, parInt1);
|
||||
+ if (parInt1 == KeyboardConstants.KEY_DELETE || parInt1 == KeyboardConstants.KEY_BACK) {
|
||||
+ if (mc.theWorld == null && EagRuntime.getConfiguration().isAllowBootMenu()) {
|
||||
+ mc.displayGuiScreen(new GuiScreenEnterBootMenu(this));
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected void mouseClicked(int mx, int my, int button) {
|
||||
+ super.mouseClicked(mx, my, button);
|
||||
@ -132,6 +180,17 @@
|
||||
+ .playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
+ }
|
||||
+ }
|
||||
+ if (EagRuntime.getConfiguration().isEnableServerCookies() && mc.thePlayer == null) {
|
||||
+ int w = mc.fontRendererObj.getStringWidth(I18n.format("revokeSessionToken.button"));
|
||||
+ if (mx > width - 5 - (w + 5) * 3 / 4 && my > 1 && mx < width - 2 && my < 12) {
|
||||
+ ServerCookieDataStore.flush();
|
||||
+ mc.displayGuiScreen(ServerCookieDataStore.numRevokable() == 0
|
||||
+ ? new GuiScreenGenericErrorMessage("errorNoSessions.title", "errorNoSessions.desc", this)
|
||||
+ : new GuiScreenRevokeSessionToken(this));
|
||||
+ mc.getSoundHandler()
|
||||
+ .playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -7,12 +7,88 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> INSERT 1 : 4 @ 1
|
||||
> INSERT 1 : 5 @ 1
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Lists;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
|
||||
|
||||
> DELETE 1 @ 1 : 5
|
||||
|
||||
> CHANGE 72 : 77 @ 72 : 73
|
||||
|
||||
~ if (var4 != 0 && var4 != 12345)
|
||||
~ return false;
|
||||
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
|
||||
~ if ((!touchMode || (this.field_148323_b.isSliderTouchEvents() == (var4 == 12345)))
|
||||
~ && this.field_148323_b.mousePressed(this.field_148325_a, i, j)) {
|
||||
|
||||
> CHANGE 8 : 11 @ 8 : 9
|
||||
|
||||
~ } else if (this.field_148324_c != null
|
||||
~ && (!touchMode || (this.field_148324_c.isSliderTouchEvents() == (var4 == 12345)))
|
||||
~ && this.field_148324_c.mousePressed(this.field_148325_a, i, j)) {
|
||||
|
||||
> CHANGE 14 : 19 @ 14 : 15
|
||||
|
||||
~ if (var4 != 0 && var4 != 12345)
|
||||
~ return;
|
||||
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
|
||||
~ if (this.field_148323_b != null
|
||||
~ && (!touchMode || (this.field_148323_b.isSliderTouchEvents() == (var4 == 12345)))) {
|
||||
|
||||
> CHANGE 3 : 5 @ 3 : 4
|
||||
|
||||
~ if (this.field_148324_c != null
|
||||
~ && (!touchMode || (this.field_148324_c.isSliderTouchEvents() == (var4 == 12345)))) {
|
||||
|
||||
> INSERT 8 : 53 @ 8
|
||||
|
||||
+
|
||||
+ public GuiOptionButton getButtonFor(GameSettings.Options enumOption) {
|
||||
+ for (Row r : field_148184_k) {
|
||||
+ if (r.field_148323_b != null) {
|
||||
+ if (r.field_148323_b instanceof GuiOptionButton) {
|
||||
+ GuiOptionButton btn = (GuiOptionButton) r.field_148323_b;
|
||||
+ if (btn.returnEnumOptions() == enumOption) {
|
||||
+ return btn;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (r.field_148324_c != null) {
|
||||
+ if (r.field_148324_c instanceof GuiOptionButton) {
|
||||
+ GuiOptionButton btn = (GuiOptionButton) r.field_148324_c;
|
||||
+ if (btn.returnEnumOptions() == enumOption) {
|
||||
+ return btn;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
+ public GuiOptionSlider getSliderFor(GameSettings.Options enumOption) {
|
||||
+ for (Row r : field_148184_k) {
|
||||
+ if (r.field_148323_b != null) {
|
||||
+ if (r.field_148323_b instanceof GuiOptionSlider) {
|
||||
+ GuiOptionSlider btn = (GuiOptionSlider) r.field_148323_b;
|
||||
+ if (btn.getEnumOptions() == enumOption) {
|
||||
+ return btn;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ if (r.field_148324_c != null) {
|
||||
+ if (r.field_148324_c instanceof GuiOptionSlider) {
|
||||
+ GuiOptionSlider btn = (GuiOptionSlider) r.field_148324_c;
|
||||
+ if (btn.getEnumOptions() == enumOption) {
|
||||
+ return btn;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ return null;
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -18,8 +18,11 @@
|
||||
|
||||
+ import java.util.Locale;
|
||||
|
||||
> INSERT 1 : 14 @ 1
|
||||
> INSERT 1 : 17 @ 1
|
||||
|
||||
+
|
||||
+ import org.apache.commons.lang3.StringUtils;
|
||||
+
|
||||
+ import java.util.TimeZone;
|
||||
+
|
||||
+ import com.google.common.base.Strings;
|
||||
@ -52,14 +55,11 @@
|
||||
|
||||
+ public int playerOffset = 0;
|
||||
|
||||
> INSERT 7 : 10 @ 7
|
||||
|
||||
+ playerOffset = 0;
|
||||
+ int ww = scaledResolutionIn.getScaledWidth();
|
||||
+ int hh = scaledResolutionIn.getScaledHeight();
|
||||
|
||||
> CHANGE 1 : 22 @ 1 : 7
|
||||
> CHANGE 7 : 31 @ 7 : 14
|
||||
|
||||
~ playerOffset = 0;
|
||||
~ int ww = scaledResolutionIn.getScaledWidth();
|
||||
~ int hh = scaledResolutionIn.getScaledHeight();
|
||||
~ if (this.mc.gameSettings.showDebugInfo) {
|
||||
~ GlStateManager.pushMatrix();
|
||||
~ this.renderDebugInfoLeft();
|
||||
@ -82,34 +82,33 @@
|
||||
~ }
|
||||
~
|
||||
|
||||
> INSERT 2 : 26 @ 2
|
||||
> CHANGE 2 : 25 @ 2 : 3
|
||||
|
||||
+ if (this.mc.currentScreen == null || !(this.mc.currentScreen instanceof GuiChat)) {
|
||||
+ if (this.mc.gameSettings.hudStats) {
|
||||
+ drawStatsHUD(ww - 2, hh - 2);
|
||||
+ }
|
||||
+
|
||||
+ if (this.mc.gameSettings.hudWorld) {
|
||||
+ drawWorldHUD(2, hh - 2);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (this.mc.gameSettings.hudCoords && this.mc.joinWorldTickCounter < 80) {
|
||||
+ if (this.mc.joinWorldTickCounter > 70) {
|
||||
+ GlStateManager.enableBlend();
|
||||
+ GlStateManager.blendFunc(770, 771);
|
||||
+ }
|
||||
+ int i = this.mc.joinWorldTickCounter - 70;
|
||||
+ if (i < 0)
|
||||
+ i = 0;
|
||||
+ drawHideHUD(ww / 2, hh - 70, (10 - i) * 0xFF / 10);
|
||||
+ if (this.mc.joinWorldTickCounter > 70) {
|
||||
+ GlStateManager.disableBlend();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
~ if (this.mc.currentScreen == null || !(this.mc.currentScreen instanceof GuiChat)) {
|
||||
~ if (this.mc.gameSettings.hudStats) {
|
||||
~ drawStatsHUD(ww - 2, hh - 2);
|
||||
~ }
|
||||
~
|
||||
~ if (this.mc.gameSettings.hudWorld) {
|
||||
~ drawWorldHUD(2, hh - 2);
|
||||
~ }
|
||||
~ }
|
||||
~
|
||||
~ if (this.mc.gameSettings.hudCoords && this.mc.joinWorldTickCounter < 80) {
|
||||
~ if (this.mc.joinWorldTickCounter > 70) {
|
||||
~ GlStateManager.enableBlend();
|
||||
~ GlStateManager.blendFunc(770, 771);
|
||||
~ }
|
||||
~ int i = this.mc.joinWorldTickCounter - 70;
|
||||
~ if (i < 0)
|
||||
~ i = 0;
|
||||
~ drawHideHUD(ww / 2, hh - 70, (10 - i) * 0xFF / 10);
|
||||
~ if (this.mc.joinWorldTickCounter > 70) {
|
||||
~ GlStateManager.disableBlend();
|
||||
~ }
|
||||
~ }
|
||||
|
||||
> INSERT 3 : 142 @ 3
|
||||
> INSERT 2 : 140 @ 2
|
||||
|
||||
+ private void drawFPS(int x, int y) {
|
||||
+ this.fontRenderer.drawStringWithShadow(this.mc.renderGlobal.getDebugInfoShort(), x, y, 0xFFFFFF);
|
||||
@ -205,7 +204,6 @@
|
||||
+ final double dticks = ticks - minutes * ticksPerMinute;
|
||||
+ final long seconds = (long) Math.floor(dticks / ticksPerSecond);
|
||||
+
|
||||
+ // TODO: why does desktop JRE not apply "GMT" correctly?
|
||||
+ final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.ENGLISH);
|
||||
+
|
||||
+ cal.setLenient(true);
|
||||
@ -215,10 +213,10 @@
|
||||
+ cal.add(Calendar.MINUTE, (int) minutes);
|
||||
+ cal.add(Calendar.SECOND, (int) seconds + 1);
|
||||
+
|
||||
+ SimpleDateFormat fmt = this.mc.gameSettings.hud24h ? SDFTwentyFour : SDFTwelve;
|
||||
+ fmt.setCalendar(cal);
|
||||
+ String timeString = EnumChatFormatting.WHITE + "Day " + ((totalTicks + 30000l) / 24000l) + " ("
|
||||
+ + EnumChatFormatting.YELLOW
|
||||
+ + (this.mc.gameSettings.hud24h ? SDFTwentyFour : SDFTwelve).format(cal.getTime())
|
||||
+ + EnumChatFormatting.WHITE + ")";
|
||||
+ + EnumChatFormatting.YELLOW + fmt.format(cal.getTime()) + EnumChatFormatting.WHITE + ")";
|
||||
+
|
||||
+ Entity e = mc.getRenderViewEntity();
|
||||
+ BlockPos blockpos = new BlockPos(e.posX, MathHelper.clamp_double(e.getEntityBoundingBox().minY, 0.0D, 254.0D),
|
||||
@ -251,7 +249,7 @@
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 4 : 37 @ 4
|
||||
> INSERT 4 : 44 @ 4
|
||||
|
||||
+ private int drawSingleplayerStats(ScaledResolution parScaledResolution) {
|
||||
+ if (mc.isDemo()) {
|
||||
@ -263,23 +261,30 @@
|
||||
+ if (tpsAge < 20000l) {
|
||||
+ int color = tpsAge > 2000l ? 0x777777 : 0xFFFFFF;
|
||||
+ List<String> strs = SingleplayerServerController.getTPS();
|
||||
+ if (SingleplayerServerController.isRunningSingleThreadMode()) {
|
||||
+ strs = Lists.newArrayList(strs);
|
||||
+ strs.add("");
|
||||
+ strs.add(I18n.format("singleplayer.tpscounter.singleThreadMode"));
|
||||
+ }
|
||||
+ int l;
|
||||
+ boolean first = true;
|
||||
+ for (int j = 0, m = strs.size(); j < m; ++j) {
|
||||
+ String str = strs.get(j);
|
||||
+ l = (int) (this.fontRenderer.getStringWidth(str) * (!first ? 0.5f : 1.0f));
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.translate(parScaledResolution.getScaledWidth() - 2 - l, i + 2, 0.0f);
|
||||
+ if (!first) {
|
||||
+ GlStateManager.scale(0.5f, 0.5f, 0.5f);
|
||||
+ if (!StringUtils.isAllEmpty(str)) {
|
||||
+ l = (int) (this.fontRenderer.getStringWidth(str) * (!first ? 0.5f : 1.0f));
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.translate(parScaledResolution.getScaledWidth() - 2 - l, i + 2, 0.0f);
|
||||
+ if (!first) {
|
||||
+ GlStateManager.scale(0.5f, 0.5f, 0.5f);
|
||||
+ }
|
||||
+ this.fontRenderer.drawStringWithShadow(str, 0, 0, color);
|
||||
+ GlStateManager.popMatrix();
|
||||
+ if (color == 0xFFFFFF) {
|
||||
+ color = 14737632;
|
||||
+ }
|
||||
+ }
|
||||
+ this.fontRenderer.drawStringWithShadow(str, 0, 0, color);
|
||||
+ GlStateManager.popMatrix();
|
||||
+ i += (int) (this.fontRenderer.FONT_HEIGHT * (!first ? 0.5f : 1.0f));
|
||||
+ first = false;
|
||||
+ if (color == 0xFFFFFF) {
|
||||
+ color = 14737632;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
@ -370,4 +375,8 @@
|
||||
|
||||
> DELETE 8 @ 8 : 12
|
||||
|
||||
> CHANGE 25 : 26 @ 25 : 26
|
||||
|
||||
~ ScaledResolution scaledresolution = this.mc.scaledResolution;
|
||||
|
||||
> EOF
|
||||
|
@ -10,9 +10,11 @@
|
||||
+ import java.util.List;
|
||||
+
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
> CHANGE 4 : 7 @ 4 : 5
|
||||
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
|
||||
> DELETE 1 @ 1 : 9
|
||||
|
||||
@ -46,4 +48,53 @@
|
||||
~ for (int k = 0; k < astring.length; ++k) {
|
||||
~ ((GuiTextField) this.field_178072_w.get(j)).setText(astring[k]);
|
||||
|
||||
> INSERT 31 : 46 @ 31
|
||||
|
||||
+ public boolean isTextFieldFocused() {
|
||||
+ for (GuiTextField txt : field_178072_w) {
|
||||
+ if (txt.isFocused()) {
|
||||
+ return true;
|
||||
+ }
|
||||
+ }
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ public void fireInputEvent(EnumInputEvent event, String param) {
|
||||
+ for (GuiTextField txt : field_178072_w) {
|
||||
+ txt.fireInputEvent(event, param);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 93 : 100 @ 93 : 95
|
||||
|
||||
~ if (k != 0 && k != 12345)
|
||||
~ return false;
|
||||
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
|
||||
~ boolean flag = this.field_178029_b != null && (!touchMode || stupidCheck(this.field_178029_b, k))
|
||||
~ && this.func_178026_a(this.field_178029_b, i, j, k);
|
||||
~ boolean flag1 = this.field_178030_c != null && (!touchMode || stupidCheck(this.field_178030_c, k))
|
||||
~ && this.func_178026_a(this.field_178030_c, i, j, k);
|
||||
|
||||
> INSERT 3 : 11 @ 3
|
||||
|
||||
+ private static boolean stupidCheck(Gui gui, int k) {
|
||||
+ if (gui instanceof GuiButton) {
|
||||
+ return ((GuiButton) gui).isSliderTouchEvents() == (k == 12345);
|
||||
+ } else {
|
||||
+ return k != 12345;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 32 : 39 @ 32 : 34
|
||||
|
||||
~ if (k != 0 && k != 12345)
|
||||
~ return;
|
||||
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
|
||||
~ if (!touchMode || stupidCheck(field_178029_b, k))
|
||||
~ this.func_178016_b(this.field_178029_b, i, j, k);
|
||||
~ if (!touchMode || stupidCheck(field_178030_c, k))
|
||||
~ this.func_178016_b(this.field_178030_c, i, j, k);
|
||||
|
||||
> EOF
|
||||
|
@ -20,7 +20,16 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 46 : 48 @ 46 : 47
|
||||
> CHANGE 27 : 29 @ 27 : 28
|
||||
|
||||
~ IChatComponent dname = networkPlayerInfoIn.getDisplayNameProfanityFilter();
|
||||
~ return dname != null ? dname.getFormattedText()
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ networkPlayerInfoIn.getGameProfileNameProfanityFilter());
|
||||
|
||||
> CHANGE 16 : 18 @ 16 : 17
|
||||
|
||||
~ for (int m = 0, n = list.size(); m < n; ++m) {
|
||||
~ NetworkPlayerInfo networkplayerinfo = (NetworkPlayerInfo) list.get(m);
|
||||
|
@ -5,9 +5,10 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 5 @ 2 : 6
|
||||
> CHANGE 2 : 6 @ 2 : 6
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenIntegratedServerBusy;
|
||||
|
||||
@ -74,4 +75,18 @@
|
||||
~ this.drawCenteredString(this.fontRendererObj,
|
||||
~ I18n.format(duplicate ? "selectWorld.duplicate" : "selectWorld.renameTitle", new Object[0]),
|
||||
|
||||
> INSERT 6 : 17 @ 6
|
||||
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean showCopyPasteButtons() {
|
||||
+ return field_146583_f.isFocused();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void fireInputEvent(EnumInputEvent event, String param) {
|
||||
+ field_146583_f.fireInputEvent(event, param);
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -7,11 +7,12 @@
|
||||
|
||||
> DELETE 2 @ 2 : 4
|
||||
|
||||
> INSERT 1 : 5 @ 1
|
||||
> INSERT 1 : 6 @ 1
|
||||
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
@ -28,11 +29,22 @@
|
||||
|
||||
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||
|
||||
> INSERT 46 : 50 @ 46
|
||||
> INSERT 46 : 61 @ 46
|
||||
|
||||
+
|
||||
+ public boolean blockPTTKey() {
|
||||
+ return nameField.isFocused();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean showCopyPasteButtons() {
|
||||
+ return nameField.isFocused();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void fireInputEvent(EnumInputEvent event, String param) {
|
||||
+ nameField.fireInputEvent(event, param);
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -9,9 +9,18 @@
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> INSERT 4 : 20 @ 4
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ import java.util.HashMap;
|
||||
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+ import java.util.Map;
|
||||
|
||||
> INSERT 1 : 24 @ 1
|
||||
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumTouchEvent;
|
||||
+ import org.apache.commons.lang3.StringUtils;
|
||||
+
|
||||
+ import com.google.common.base.Splitter;
|
||||
@ -22,11 +31,17 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EaglerXBungeeVersion;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.PauseMenuCustomizeState;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Touch;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.touch_gui.TouchControls;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.webview.GuiScreenServerInfo;
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 9
|
||||
|
||||
@ -38,14 +53,27 @@
|
||||
|
||||
+ import net.minecraft.client.resources.I18n;
|
||||
|
||||
> DELETE 13 @ 13 : 19
|
||||
> CHANGE 13 : 14 @ 13 : 19
|
||||
|
||||
> CHANGE 17 : 19 @ 17 : 18
|
||||
~ import net.minecraft.util.ResourceLocation;
|
||||
|
||||
> CHANGE 13 : 14 @ 13 : 14
|
||||
|
||||
~ protected GuiButton selectedButton;
|
||||
|
||||
> CHANGE 3 : 5 @ 3 : 4
|
||||
|
||||
~ private String clickedLinkURI;
|
||||
~ protected long showingCloseKey = 0;
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
> INSERT 1 : 5 @ 1
|
||||
|
||||
+ protected int touchModeCursorPosX = -1;
|
||||
+ protected int touchModeCursorPosY = -1;
|
||||
+ private long lastTouchEvent;
|
||||
+
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ for (int k = 0, l = this.buttonList.size(); k < l; ++k) {
|
||||
|
||||
@ -55,7 +83,7 @@
|
||||
|
||||
> INSERT 3 : 33 @ 3
|
||||
|
||||
+ long millis = System.currentTimeMillis();
|
||||
+ long millis = EagRuntime.steadyTimeMillis();
|
||||
+ long closeKeyTimeout = millis - showingCloseKey;
|
||||
+ if (closeKeyTimeout < 3000l) {
|
||||
+ int alpha1 = 0xC0000000;
|
||||
@ -86,7 +114,7 @@
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 2 : 14 @ 2 : 4
|
||||
> CHANGE 2 : 16 @ 2 : 4
|
||||
|
||||
~ protected int getCloseKey() {
|
||||
~ if (this instanceof GuiContainer) {
|
||||
@ -97,6 +125,8 @@
|
||||
~ }
|
||||
~
|
||||
~ protected void keyTyped(char parChar1, int parInt1) {
|
||||
~ if (!canCloseGui())
|
||||
~ return;
|
||||
~ if (((this.mc.theWorld == null || this.mc.thePlayer.getHealth() <= 0.0F) && parInt1 == 1)
|
||||
~ || parInt1 == this.mc.gameSettings.keyBindClose.getKeyCode()
|
||||
~ || (parInt1 == 1 && (this.mc.gameSettings.keyBindClose.getKeyCode() == 0 || this.mc.areKeysLocked()))) {
|
||||
@ -104,7 +134,7 @@
|
||||
> INSERT 4 : 6 @ 4
|
||||
|
||||
+ } else if (parInt1 == 1) {
|
||||
+ showingCloseKey = System.currentTimeMillis();
|
||||
+ showingCloseKey = EagRuntime.steadyTimeMillis();
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
@ -116,22 +146,72 @@
|
||||
|
||||
~ EagRuntime.setClipboard(copyText);
|
||||
|
||||
> CHANGE 6 : 7 @ 6 : 7
|
||||
> CHANGE 4 : 6 @ 4 : 5
|
||||
|
||||
~ renderToolTip0(itemstack, i, j, false);
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 5 @ 1 : 2
|
||||
|
||||
~ protected void renderToolTip0(ItemStack itemstack, int i, int j, boolean eagler) {
|
||||
~ List list = itemstack.getTooltipProfanityFilter(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
|
||||
~
|
||||
~ for (int k = 0, l = list.size(); k < l; ++k) {
|
||||
|
||||
> CHANGE 22 : 24 @ 22 : 24
|
||||
> CHANGE 7 : 8 @ 7 : 8
|
||||
|
||||
~ this.drawHoveringText0(list, i, j, eagler);
|
||||
|
||||
> INSERT 7 : 11 @ 7
|
||||
|
||||
+ drawHoveringText0(list, i, j, false);
|
||||
+ }
|
||||
+
|
||||
+ protected void drawHoveringText0(List<String> list, int i, int j, boolean eagler) {
|
||||
|
||||
> CHANGE 7 : 9 @ 7 : 9
|
||||
|
||||
~ for (int m = 0, n = list.size(); m < n; ++m) {
|
||||
~ int l = this.fontRendererObj.getStringWidth(list.get(m));
|
||||
|
||||
> CHANGE 37 : 40 @ 37 : 38
|
||||
> CHANGE 5 : 7 @ 5 : 7
|
||||
|
||||
~ int j2 = i;
|
||||
~ int k2 = j;
|
||||
|
||||
> CHANGE 5 : 8 @ 5 : 8
|
||||
|
||||
~ if (!eagler) {
|
||||
~ j2 += 12;
|
||||
~ k2 -= 12;
|
||||
|
||||
> CHANGE 1 : 10 @ 1 : 3
|
||||
|
||||
~ if (j2 + k > this.width) {
|
||||
~ j2 -= 28 + k;
|
||||
~ }
|
||||
~
|
||||
~ if (k2 + i1 + 6 > this.height) {
|
||||
~ k2 = this.height - i1 - 6;
|
||||
~ }
|
||||
~ } else {
|
||||
~ j2 -= (k + 3) >> 1;
|
||||
|
||||
> CHANGE 19 : 22 @ 19 : 20
|
||||
|
||||
~ if (s1.length() > 0) {
|
||||
~ this.fontRendererObj.drawStringWithShadow(s1, (float) j2, (float) k2, -1);
|
||||
~ }
|
||||
|
||||
> INSERT 107 : 108 @ 107
|
||||
> CHANGE 16 : 17 @ 16 : 17
|
||||
|
||||
~ public void handleComponentHover(IChatComponent parIChatComponent, int parInt1, int parInt2) {
|
||||
|
||||
> CHANGE 76 : 77 @ 76 : 77
|
||||
|
||||
~ public boolean handleComponentClick(IChatComponent parIChatComponent) {
|
||||
|
||||
> INSERT 13 : 14 @ 13
|
||||
|
||||
+ String uri = clickevent.getValue();
|
||||
|
||||
@ -165,20 +245,229 @@
|
||||
~ LOGGER.error("Invalid plugin download from EPK was blocked: {}",
|
||||
~ EaglerXBungeeVersion.pluginFileEPK);
|
||||
|
||||
> CHANGE 24 : 25 @ 24 : 25
|
||||
> CHANGE 24 : 49 @ 24 : 26
|
||||
|
||||
~ protected void touchStarted(int parInt1, int parInt2, int parInt3) {
|
||||
~ if (shouldTouchGenerateMouseEvents()) {
|
||||
~ this.mouseClicked(parInt1, parInt2, 12345);
|
||||
~ }
|
||||
~ }
|
||||
~
|
||||
~ protected void touchTapped(int parInt1, int parInt2, int parInt3) {
|
||||
~ if (shouldTouchGenerateMouseEvents()) {
|
||||
~ this.mouseClicked(parInt1, parInt2, 0);
|
||||
~ this.mouseReleased(parInt1, parInt2, 0);
|
||||
~ }
|
||||
~ }
|
||||
~
|
||||
~ protected void touchMoved(int parInt1, int parInt2, int parInt3) {
|
||||
~ }
|
||||
~
|
||||
~ protected void touchEndMove(int parInt1, int parInt2, int parInt3) {
|
||||
~ if (shouldTouchGenerateMouseEvents()) {
|
||||
~ this.mouseReleased(parInt1, parInt2, 12345);
|
||||
~ }
|
||||
~ }
|
||||
~
|
||||
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||
~ boolean touchMode = PointerInputAbstraction.isTouchMode();
|
||||
~ if (parInt3 == 0 || parInt3 == 12345) {
|
||||
|
||||
> CHANGE 24 : 25 @ 24 : 25
|
||||
> INSERT 2 : 4 @ 2
|
||||
|
||||
+ if (touchMode && (parInt3 == 12345) != guibutton.isSliderTouchEvents())
|
||||
+ continue;
|
||||
|
||||
> CHANGE 11 : 13 @ 11 : 12
|
||||
|
||||
~ if (this.selectedButton != null && (k == 0 || k == 12345)
|
||||
~ && (!PointerInputAbstraction.isTouchMode() || (k == 12345) == selectedButton.isSliderTouchEvents())) {
|
||||
|
||||
> CHANGE 9 : 10 @ 9 : 10
|
||||
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
> CHANGE 119 : 121 @ 119 : 128
|
||||
> INSERT 16 : 23 @ 16
|
||||
|
||||
+ boolean noTouch = true;
|
||||
+ while (Touch.next()) {
|
||||
+ noTouch = false;
|
||||
+ this.handleTouchInput();
|
||||
+ TouchControls.handleInput();
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 2 : 5 @ 2 : 3
|
||||
|
||||
~ if (noTouch) {
|
||||
~ this.handleMouseInput();
|
||||
~ }
|
||||
|
||||
> INSERT 11 : 95 @ 11
|
||||
|
||||
+ public final Map<Integer, int[]> touchStarts = new HashMap<>();
|
||||
+
|
||||
+ /**
|
||||
+ * Handles touch input.
|
||||
+ */
|
||||
+ public void handleTouchInput() throws IOException {
|
||||
+ EnumTouchEvent et = Touch.getEventType();
|
||||
+ if (et == EnumTouchEvent.TOUCHSTART) {
|
||||
+ PointerInputAbstraction.enterTouchModeHook();
|
||||
+ }
|
||||
+ float scaleFac = getEaglerScale();
|
||||
+ for (int t = 0, c = Touch.getEventTouchPointCount(); t < c; ++t) {
|
||||
+ int u = Touch.getEventTouchPointUID(t);
|
||||
+ int i = Touch.getEventTouchX(t);
|
||||
+ int j = Touch.getEventTouchY(t);
|
||||
+ if (et == EnumTouchEvent.TOUCHSTART) {
|
||||
+ if (TouchControls.handleTouchBegin(u, i, j)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ } else if (et == EnumTouchEvent.TOUCHEND) {
|
||||
+ if (TouchControls.handleTouchEnd(u, i, j)) {
|
||||
+ continue;
|
||||
+ }
|
||||
+ }
|
||||
+ i = applyEaglerScale(scaleFac, i * this.width / this.mc.displayWidth, this.width);
|
||||
+ j = applyEaglerScale(scaleFac, this.height - j * this.height / this.mc.displayHeight - 1, this.height);
|
||||
+ float si = Touch.getEventTouchRadiusX(t) * this.width / this.mc.displayWidth / scaleFac;
|
||||
+ if (si < 1.0f)
|
||||
+ si = 1.0f;
|
||||
+ float sj = Touch.getEventTouchRadiusY(t) * this.height / this.mc.displayHeight / scaleFac;
|
||||
+ if (sj < 1.0f)
|
||||
+ sj = 1.0f;
|
||||
+ int[] ck = touchStarts.remove(u);
|
||||
+ switch (et) {
|
||||
+ case TOUCHSTART:
|
||||
+ if (t == 0) {
|
||||
+ touchModeCursorPosX = i;
|
||||
+ touchModeCursorPosY = j;
|
||||
+ }
|
||||
+ lastTouchEvent = EagRuntime.steadyTimeMillis();
|
||||
+ touchStarts.put(u, new int[] { i, j, 0 });
|
||||
+ this.touchStarted(i, j, u);
|
||||
+ break;
|
||||
+ case TOUCHMOVE:
|
||||
+ if (t == 0) {
|
||||
+ touchModeCursorPosX = i;
|
||||
+ touchModeCursorPosY = j;
|
||||
+ }
|
||||
+ if (ck != null && Math.abs(ck[0] - i) < si && Math.abs(ck[1] - j) < sj) {
|
||||
+ touchStarts.put(u, ck);
|
||||
+ break;
|
||||
+ }
|
||||
+ touchStarts.put(u, new int[] { i, j, (ck != null && isTouchDraggingStateLocked(u)) ? ck[2] : 1 });
|
||||
+ this.touchMoved(i, j, u);
|
||||
+ if (t == 0 && shouldTouchGenerateMouseEvents()) {
|
||||
+ this.mouseClickMove(i, j, 0, EagRuntime.steadyTimeMillis() - lastTouchEvent);
|
||||
+ }
|
||||
+ break;
|
||||
+ case TOUCHEND:
|
||||
+ if (ck == null)
|
||||
+ break;
|
||||
+ if (t == 0) {
|
||||
+ touchModeCursorPosX = -1;
|
||||
+ touchModeCursorPosY = -1;
|
||||
+ }
|
||||
+ if (ck != null && ck[2] == 1) {
|
||||
+ this.touchEndMove(i, j, u);
|
||||
+ } else {
|
||||
+ if (ck != null) {
|
||||
+ i = ck[0];
|
||||
+ j = ck[1];
|
||||
+ }
|
||||
+ this.touchTapped(i, j, u);
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public boolean isTouchPointDragging(int uid) {
|
||||
+ int[] ret = touchStarts.get(uid);
|
||||
+ return ret != null && ret[2] == 1;
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 1 : 5 @ 1 : 3
|
||||
|
||||
~ float f = getEaglerScale();
|
||||
~ int i = applyEaglerScale(f, Mouse.getEventX() * this.width / this.mc.displayWidth, this.width);
|
||||
~ int j = applyEaglerScale(f, this.height - Mouse.getEventY() * this.height / this.mc.displayHeight - 1,
|
||||
~ this.height);
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ PointerInputAbstraction.enterMouseModeHook();
|
||||
|
||||
> INSERT 39 : 43 @ 39
|
||||
|
||||
+ protected boolean isPartOfPauseMenu() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 2 : 53 @ 2 : 3
|
||||
|
||||
~ boolean ingame = isPartOfPauseMenu();
|
||||
~ ResourceLocation loc = (ingame && PauseMenuCustomizeState.icon_background_pause != null)
|
||||
~ ? PauseMenuCustomizeState.icon_background_pause
|
||||
~ : PauseMenuCustomizeState.icon_background_all;
|
||||
~ float aspect = (ingame && PauseMenuCustomizeState.icon_background_pause != null)
|
||||
~ ? 1.0f / PauseMenuCustomizeState.icon_background_pause_aspect
|
||||
~ : 1.0f / PauseMenuCustomizeState.icon_background_all_aspect;
|
||||
~ if (loc != null) {
|
||||
~ GlStateManager.disableLighting();
|
||||
~ GlStateManager.disableFog();
|
||||
~ GlStateManager.enableBlend();
|
||||
~ GlStateManager.disableAlpha();
|
||||
~ GlStateManager.enableTexture2D();
|
||||
~ GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
|
||||
~ Tessellator tessellator = Tessellator.getInstance();
|
||||
~ WorldRenderer worldrenderer = tessellator.getWorldRenderer();
|
||||
~ this.mc.getTextureManager().bindTexture(loc);
|
||||
~ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
|
||||
~ float f = 64.0F;
|
||||
~ worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR);
|
||||
~ worldrenderer.pos(0.0D, (double) this.height, 0.0D).tex(0.0D, (double) ((float) this.height / f))
|
||||
~ .color(64, 64, 64, 192).endVertex();
|
||||
~ worldrenderer.pos((double) this.width, (double) this.height, 0.0D)
|
||||
~ .tex((double) ((float) this.width / f * aspect), (double) ((float) this.height / f))
|
||||
~ .color(64, 64, 64, 192).endVertex();
|
||||
~ worldrenderer.pos((double) this.width, 0.0D, 0.0D)
|
||||
~ .tex((double) ((float) this.width / f * aspect), (double) 0).color(64, 64, 64, 192).endVertex();
|
||||
~ worldrenderer.pos(0.0D, 0.0D, 0.0D).tex(0.0D, (double) 0).color(64, 64, 64, 192).endVertex();
|
||||
~ tessellator.draw();
|
||||
~ GlStateManager.enableAlpha();
|
||||
~ } else {
|
||||
~ this.drawGradientRect(0, 0, this.width, this.height, -1072689136, -804253680);
|
||||
~ }
|
||||
~ if (!(this instanceof GuiScreenServerInfo)) {
|
||||
~ loc = (ingame && PauseMenuCustomizeState.icon_watermark_pause != null)
|
||||
~ ? PauseMenuCustomizeState.icon_watermark_pause
|
||||
~ : PauseMenuCustomizeState.icon_watermark_all;
|
||||
~ aspect = (ingame && PauseMenuCustomizeState.icon_watermark_pause != null)
|
||||
~ ? PauseMenuCustomizeState.icon_watermark_pause_aspect
|
||||
~ : PauseMenuCustomizeState.icon_watermark_all_aspect;
|
||||
~ if (loc != null) {
|
||||
~ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
~ mc.getTextureManager().bindTexture(loc);
|
||||
~ GlStateManager.pushMatrix();
|
||||
~ GlStateManager.translate(8, height - 72, 0.0f);
|
||||
~ float f2 = 64.0f / 256.0f;
|
||||
~ GlStateManager.scale(f2 * aspect, f2, f2);
|
||||
~ this.drawTexturedModalRect(0, 0, 0, 0, 256, 256);
|
||||
~ GlStateManager.popMatrix();
|
||||
~ }
|
||||
~ }
|
||||
|
||||
> CHANGE 42 : 44 @ 42 : 51
|
||||
|
||||
~ private void openWebLink(String parURI) {
|
||||
~ EagRuntime.openLink(parURI);
|
||||
|
||||
> INSERT 34 : 42 @ 34
|
||||
> INSERT 34 : 75 @ 34
|
||||
|
||||
+
|
||||
+ public boolean shouldHangupIntegratedServer() {
|
||||
@ -188,5 +477,38 @@
|
||||
+ public boolean blockPTTKey() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ public void fireInputEvent(EnumInputEvent event, String param) {
|
||||
+
|
||||
+ }
|
||||
+
|
||||
+ public boolean showCopyPasteButtons() {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ public static int applyEaglerScale(float scaleFac, int coord, int screenDim) {
|
||||
+ return (int) ((coord - (1.0f - scaleFac) * screenDim * 0.5f) / scaleFac);
|
||||
+ }
|
||||
+
|
||||
+ public float getEaglerScale() {
|
||||
+ return PointerInputAbstraction.isTouchMode() ? getTouchModeScale() : 1.0f;
|
||||
+ }
|
||||
+
|
||||
+ protected float getTouchModeScale() {
|
||||
+ return 1.0f;
|
||||
+ }
|
||||
+
|
||||
+ public boolean canCloseGui() {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
+ protected boolean isTouchDraggingStateLocked(int uid) {
|
||||
+ return false;
|
||||
+ }
|
||||
+
|
||||
+ protected boolean shouldTouchGenerateMouseEvents() {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -5,16 +5,18 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 8
|
||||
> CHANGE 2 : 5 @ 2 : 8
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 7 : 8 @ 7 : 26
|
||||
> CHANGE 7 : 9 @ 7 : 26
|
||||
|
||||
~ private GuiButton hideAddress;
|
||||
~ private GuiButton enableCookies;
|
||||
|
||||
> INSERT 13 : 14 @ 13
|
||||
|
||||
@ -40,11 +42,21 @@
|
||||
~ }
|
||||
~ this.buttonList.add(this.serverResourcePacks = new GuiButton(2, this.width / 2 - 100, i + 54,
|
||||
|
||||
> INSERT 2 : 5 @ 2
|
||||
> INSERT 2 : 15 @ 2
|
||||
|
||||
+ this.buttonList.add(this.hideAddress = new GuiButton(3, this.width / 2 - 100, i + 78,
|
||||
+ I18n.format("addServer.hideAddress", new Object[0]) + ": "
|
||||
+ + I18n.format(this.serverData.hideAddress ? "gui.yes" : "gui.no", new Object[0])));
|
||||
+ if (EagRuntime.getConfiguration().isEnableServerCookies()) {
|
||||
+ this.buttonList.add(this.enableCookies = new GuiButton(4, this.width / 2 - 100, i + 78, 99, 20,
|
||||
+ I18n.format("addServer.enableCookies") + ": "
|
||||
+ + I18n.format(this.serverData.enableCookies ? "addServer.enableCookies.enabled"
|
||||
+ : "addServer.enableCookies.disabled")));
|
||||
+ this.buttonList.add(this.hideAddress = new GuiButton(3, this.width / 2 + 1, i + 78, 99, 20,
|
||||
+ I18n.format("addServer.hideAddr", new Object[0]) + ": "
|
||||
+ + I18n.format(this.serverData.hideAddress ? "gui.yes" : "gui.no", new Object[0])));
|
||||
+ } else {
|
||||
+ this.buttonList.add(this.hideAddress = new GuiButton(3, this.width / 2 - 100, i + 78,
|
||||
+ I18n.format("addServer.hideAddress", new Object[0]) + ": "
|
||||
+ + I18n.format(this.serverData.hideAddress ? "gui.yes" : "gui.no", new Object[0])));
|
||||
+ }
|
||||
|
||||
> CHANGE 6 : 7 @ 6 : 9
|
||||
|
||||
@ -54,12 +66,19 @@
|
||||
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
> CHANGE 1 : 6 @ 1 : 2
|
||||
> CHANGE 1 : 13 @ 1 : 2
|
||||
|
||||
~ if (parGuiButton.id == 3) {
|
||||
~ this.serverData.hideAddress = !this.serverData.hideAddress;
|
||||
~ this.hideAddress.displayString = I18n.format("addServer.hideAddress", new Object[0]) + ": "
|
||||
~ + I18n.format(this.serverData.hideAddress ? "gui.yes" : "gui.no", new Object[0]);
|
||||
~ this.hideAddress.displayString = I18n
|
||||
~ .format(EagRuntime.getConfiguration().isEnableServerCookies() ? "addServer.hideAddr"
|
||||
~ : "addServer.hideAddress", new Object[0])
|
||||
~ + ": " + I18n.format(this.serverData.hideAddress ? "gui.yes" : "gui.no", new Object[0]);
|
||||
~ } else if (parGuiButton.id == 4) {
|
||||
~ this.serverData.enableCookies = !this.serverData.enableCookies;
|
||||
~ this.enableCookies.displayString = I18n.format("addServer.enableCookies") + ": "
|
||||
~ + I18n.format(this.serverData.enableCookies ? "addServer.enableCookies.enabled"
|
||||
~ : "addServer.enableCookies.disabled");
|
||||
~ } else if (parGuiButton.id == 2) {
|
||||
|
||||
> CHANGE 1 : 3 @ 1 : 3
|
||||
@ -93,4 +112,19 @@
|
||||
+ 0xccccff);
|
||||
+ }
|
||||
|
||||
> INSERT 4 : 16 @ 4
|
||||
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean showCopyPasteButtons() {
|
||||
+ return serverNameField.isFocused() || serverIPField.isFocused();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void fireInputEvent(EnumInputEvent event, String param) {
|
||||
+ serverNameField.fireInputEvent(event, param);
|
||||
+ serverIPField.fireInputEvent(event, param);
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -7,7 +7,7 @@
|
||||
|
||||
> DELETE 2 @ 2 : 6
|
||||
|
||||
> INSERT 1 : 11 @ 1
|
||||
> INSERT 1 : 12 @ 1
|
||||
|
||||
+
|
||||
+ import org.json.JSONException;
|
||||
@ -18,13 +18,23 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVisualViewport;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
|
||||
> DELETE 1 @ 1 : 5
|
||||
|
||||
> DELETE 16 @ 16 : 19
|
||||
|
||||
> CHANGE 139 : 140 @ 139 : 140
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ public class GuiScreenBook extends GuiScreenVisualViewport {
|
||||
|
||||
> CHANGE 47 : 49 @ 47 : 49
|
||||
|
||||
~ public void updateScreen0() {
|
||||
~ super.updateScreen0();
|
||||
|
||||
> CHANGE 88 : 89 @ 88 : 89
|
||||
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
@ -34,15 +44,31 @@
|
||||
|
||||
> DELETE 6 @ 6 : 7
|
||||
|
||||
> CHANGE 129 : 130 @ 129 : 130
|
||||
> CHANGE 78 : 79 @ 78 : 79
|
||||
|
||||
~ public void drawScreen0(int i, int j, float f) {
|
||||
|
||||
> CHANGE 50 : 51 @ 50 : 51
|
||||
|
||||
~ } catch (JSONException var13) {
|
||||
|
||||
> CHANGE 34 : 35 @ 34 : 35
|
||||
> CHANGE 31 : 32 @ 31 : 32
|
||||
|
||||
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||
~ super.drawScreen0(i, j, f);
|
||||
|
||||
> INSERT 102 : 106 @ 102
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ protected void mouseClicked0(int parInt1, int parInt2, int parInt3) {
|
||||
|
||||
> CHANGE 7 : 8 @ 7 : 8
|
||||
|
||||
~ super.mouseClicked0(parInt1, parInt2, parInt3);
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ public boolean handleComponentClick(IChatComponent ichatcomponent) {
|
||||
|
||||
> INSERT 91 : 95 @ 91
|
||||
|
||||
+
|
||||
+ public boolean blockPTTKey() {
|
||||
|
@ -5,10 +5,11 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 5 : 9 @ 5 : 11
|
||||
> CHANGE 5 : 10 @ 5 : 11
|
||||
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
|
||||
@ -16,7 +17,15 @@
|
||||
|
||||
> DELETE 4 @ 4 : 5
|
||||
|
||||
> CHANGE 41 : 42 @ 41 : 42
|
||||
> INSERT 37 : 42 @ 37
|
||||
|
||||
+ public void handleTouchInput() throws IOException {
|
||||
+ super.handleTouchInput();
|
||||
+ this.field_175311_g.handleTouchInput();
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||
|
||||
@ -28,4 +37,17 @@
|
||||
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
> INSERT 35 : 45 @ 35
|
||||
|
||||
+ @Override
|
||||
+ public boolean showCopyPasteButtons() {
|
||||
+ return field_175317_i.isFocused();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void fireInputEvent(EnumInputEvent event, String param) {
|
||||
+ field_175317_i.fireInputEvent(event, param);
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -21,4 +21,11 @@
|
||||
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
> INSERT 90 : 94 @ 90
|
||||
|
||||
+
|
||||
+ public boolean isSliderTouchEvents() {
|
||||
+ return true;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -40,7 +40,16 @@
|
||||
~ this.selectedResourcePacks
|
||||
~ .add(new ResourcePackListEntryFound(this, (ResourcePackRepository.Entry) arraylist.get(i)));
|
||||
|
||||
> CHANGE 38 : 39 @ 38 : 39
|
||||
> INSERT 21 : 27 @ 21
|
||||
|
||||
+ public void handleTouchInput() throws IOException {
|
||||
+ super.handleTouchInput();
|
||||
+ this.selectedResourcePacksList.handleTouchInput();
|
||||
+ this.availableResourcePacksList.handleTouchInput();
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 17 : 18 @ 17 : 18
|
||||
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
|
@ -5,10 +5,11 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 6
|
||||
> CHANGE 2 : 5 @ 2 : 6
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
@ -59,4 +60,18 @@
|
||||
~ 100, 10526880);
|
||||
~ }
|
||||
|
||||
> INSERT 3 : 14 @ 3
|
||||
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean showCopyPasteButtons() {
|
||||
+ return field_146302_g.isFocused();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void fireInputEvent(EnumInputEvent event, String param) {
|
||||
+ field_146302_g.fireInputEvent(event, param);
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -9,12 +9,13 @@
|
||||
|
||||
+ import java.util.ArrayList;
|
||||
|
||||
> CHANGE 2 : 7 @ 2 : 3
|
||||
> CHANGE 2 : 8 @ 2 : 3
|
||||
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANConnect;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANNotSupported;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacket1CIssueDetected;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController;
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 9
|
||||
@ -44,18 +45,27 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANInfo;
|
||||
+
|
||||
|
||||
> INSERT 17 : 19 @ 17
|
||||
> INSERT 17 : 20 @ 17
|
||||
|
||||
+ private boolean hasRequestedWorlds = false;
|
||||
+ private boolean waitingForWorlds = false;
|
||||
+ private boolean ramdiskMode = false;
|
||||
|
||||
> INSERT 3 : 4 @ 3
|
||||
|
||||
+ this.field_146639_s = new ArrayList();
|
||||
|
||||
> DELETE 4 @ 4 : 13
|
||||
> INSERT 3 : 4 @ 3
|
||||
|
||||
> INSERT 13 : 30 @ 13
|
||||
+ this.ramdiskMode = SingleplayerServerController.isIssueDetected(IPCPacket1CIssueDetected.ISSUE_RAMDISK_MODE);
|
||||
|
||||
> DELETE 1 @ 1 : 10
|
||||
|
||||
> CHANGE 8 : 9 @ 8 : 9
|
||||
|
||||
~ this.field_146638_t = new GuiSelectWorld.List(this.mc, ramdiskMode ? -10 : 0);
|
||||
|
||||
> INSERT 4 : 21 @ 4
|
||||
|
||||
+ public void updateScreen() {
|
||||
+ if (!hasRequestedWorlds && SingleplayerServerController.isReady()) {
|
||||
@ -75,8 +85,13 @@
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
> CHANGE 5 : 11 @ 5 : 6
|
||||
|
||||
~ public void handleTouchInput() throws IOException {
|
||||
~ super.handleTouchInput();
|
||||
~ this.field_146638_t.handleTouchInput();
|
||||
~ }
|
||||
~
|
||||
~ private void func_146627_h() {
|
||||
|
||||
> CHANGE 29 : 30 @ 29 : 30
|
||||
@ -118,8 +133,13 @@
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> INSERT 7 : 22 @ 7
|
||||
> INSERT 7 : 27 @ 7
|
||||
|
||||
+
|
||||
+ if (ramdiskMode) {
|
||||
+ this.drawCenteredString(this.fontRendererObj, I18n.format("selectWorld.ramdiskWarning"), this.width / 2,
|
||||
+ height - 68, 11184810);
|
||||
+ }
|
||||
+
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ GlStateManager.scale(0.75f, 0.75f, 0.75f);
|
||||
@ -155,4 +175,10 @@
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 10 : 13 @ 10 : 12
|
||||
|
||||
~ public List(Minecraft mcIn, int i) {
|
||||
~ super(mcIn, GuiSelectWorld.this.width, GuiSelectWorld.this.height, 32, GuiSelectWorld.this.height - 64 + i,
|
||||
~ 36);
|
||||
|
||||
> EOF
|
||||
|
@ -11,4 +11,11 @@
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
> INSERT 106 : 110 @ 106
|
||||
|
||||
+
|
||||
+ public boolean isSliderTouchEvents() {
|
||||
+ return true;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,10 +5,13 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 8 @ 2
|
||||
> INSERT 2 : 11 @ 2
|
||||
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Touch;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumTouchEvent;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
@ -34,17 +37,44 @@
|
||||
|
||||
~ this.drawSelectionBox(k, l, mouseXIn, mouseYIn, this.getSize());
|
||||
|
||||
> CHANGE 168 : 169 @ 168 : 170
|
||||
> INSERT 74 : 84 @ 74
|
||||
|
||||
+ handleInput(Mouse.getEventButton(), Mouse.getEventButtonState(), Mouse.getDWheel());
|
||||
+ }
|
||||
+
|
||||
+ public void handleTouchInput() {
|
||||
+ mouseX = PointerInputAbstraction.getVCursorX() * width / mc.displayWidth;
|
||||
+ mouseY = height - PointerInputAbstraction.getVCursorY() * height / mc.displayHeight - 1;
|
||||
+ handleInput(0, Touch.getEventType() == EnumTouchEvent.TOUCHSTART, 0);
|
||||
+ }
|
||||
+
|
||||
+ protected void handleInput(int eventButton, boolean eventState, int dWheel) {
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 3
|
||||
|
||||
~ if (eventButton == 0 && eventState && this.mouseY >= this.top && this.mouseY <= this.bottom) {
|
||||
|
||||
> CHANGE 12 : 13 @ 12 : 13
|
||||
|
||||
~ if (PointerInputAbstraction.getVCursorButtonDown(0) && this.getEnabled()) {
|
||||
|
||||
> CHANGE 52 : 57 @ 52 : 58
|
||||
|
||||
~ if (dWheel != 0) {
|
||||
~ if (dWheel > 0) {
|
||||
~ dWheel = -1;
|
||||
~ } else if (dWheel < 0) {
|
||||
~ dWheel = 1;
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ this.amountScrolled += (float) (dWheel * this.slotHeight / 2);
|
||||
|
||||
> CHANGE 17 : 18 @ 17 : 19
|
||||
|
||||
~ protected void drawSelectionBox(int mouseXIn, int mouseYIn, int parInt3, int parInt4, int i) {
|
||||
|
||||
> INSERT 3 : 6 @ 3
|
||||
|
||||
+ int mx = Mouse.getX();
|
||||
+ int my = Mouse.getY();
|
||||
+
|
||||
|
||||
> INSERT 31 : 34 @ 31
|
||||
> INSERT 34 : 37 @ 34
|
||||
|
||||
+ if (parInt3 >= i1 && parInt3 <= j1 && parInt4 >= k - 2 && parInt4 <= k + l + 1) {
|
||||
+ Mouse.showCursor(EnumCursorType.HAND);
|
||||
|
@ -5,9 +5,10 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 4 : 7 @ 4 : 9
|
||||
> CHANGE 4 : 8 @ 4 : 9
|
||||
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
|
||||
@ -44,4 +45,25 @@
|
||||
|
||||
~ GlStateManager.disableBlend();
|
||||
|
||||
> INSERT 104 : 122 @ 104
|
||||
|
||||
+
|
||||
+ public void fireInputEvent(EnumInputEvent clipboardPaste, String param) {
|
||||
+ if (!isFocused)
|
||||
+ return;
|
||||
+ switch (clipboardPaste) {
|
||||
+ case CLIPBOARD_COPY:
|
||||
+ GuiScreen.setClipboardString(this.getSelectedText());
|
||||
+ break;
|
||||
+ case CLIPBOARD_PASTE:
|
||||
+ if (this.isEnabled) {
|
||||
+ this.writeText(param != null ? param : GuiScreen.getClipboardString());
|
||||
+ }
|
||||
+ break;
|
||||
+ default:
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -15,4 +15,11 @@
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 11 : 15 @ 11
|
||||
|
||||
+ /**
|
||||
+ * This function is like the FontRenderer wrap function, except for chat
|
||||
+ * components
|
||||
+ */
|
||||
|
||||
> EOF
|
||||
|
@ -5,12 +5,17 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 9
|
||||
> CHANGE 3 : 8 @ 3 : 9
|
||||
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Display;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.recording.ScreenRecordingController;
|
||||
|
||||
> INSERT 8 : 11 @ 8
|
||||
> INSERT 8 : 12 @ 8
|
||||
|
||||
+ private boolean vsyncLock = false;
|
||||
+ /**
|
||||
+ * + An array of all of GameSettings.Options's video options.
|
||||
+ */
|
||||
@ -26,21 +31,77 @@
|
||||
~ GameSettings.Options.HUD_COORDS, GameSettings.Options.HUD_PLAYER, GameSettings.Options.HUD_STATS,
|
||||
~ GameSettings.Options.HUD_WORLD, GameSettings.Options.HUD_24H, GameSettings.Options.CHUNK_FIX };
|
||||
|
||||
> CHANGE 11 : 13 @ 11 : 31
|
||||
> CHANGE 11 : 18 @ 11 : 22
|
||||
|
||||
~ this.optionsRowList = new GuiOptionsRowList(this.mc, this.width, this.height, 32, this.height - 32, 25,
|
||||
~ videoOptions);
|
||||
~ if (!DynamicLightsStateManager.isSupported()) {
|
||||
~ GuiOptionButton btn = ((GuiOptionsRowList) optionsRowList)
|
||||
~ .getButtonFor(GameSettings.Options.EAGLER_DYNAMIC_LIGHTS);
|
||||
~ if (btn != null) {
|
||||
~ btn.enabled = false;
|
||||
|
||||
> CHANGE 7 : 8 @ 7 : 8
|
||||
> DELETE 1 @ 1 : 7
|
||||
|
||||
> CHANGE 1 : 17 @ 1 : 2
|
||||
|
||||
~ if (EaglercraftGPU.checkOpenGLESVersion() < 300) {
|
||||
~ GuiOptionSlider btn = ((GuiOptionsRowList) optionsRowList).getSliderFor(GameSettings.Options.MIPMAP_LEVELS);
|
||||
~ if (btn != null) {
|
||||
~ btn.displayString = I18n.format(GameSettings.Options.MIPMAP_LEVELS.getEnumString()) + ": N/A";
|
||||
~ btn.sliderValue = 0.0f;
|
||||
~ btn.enabled = false;
|
||||
~ }
|
||||
~ }
|
||||
~ if (!Display.supportsFullscreen()) {
|
||||
~ GuiOptionButton btn = ((GuiOptionsRowList) optionsRowList).getButtonFor(GameSettings.Options.FULLSCREEN);
|
||||
~ if (btn != null) {
|
||||
~ btn.displayString = I18n.format(GameSettings.Options.FULLSCREEN.getEnumString()) + ": "
|
||||
~ + I18n.format("options.off");
|
||||
~ btn.enabled = false;
|
||||
~ }
|
||||
~ }
|
||||
|
||||
> CHANGE 7 : 13 @ 7 : 8
|
||||
|
||||
~ public void handleTouchInput() throws IOException {
|
||||
~ super.handleTouchInput();
|
||||
~ this.optionsRowList.handleTouchInput();
|
||||
~ }
|
||||
~
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
> CHANGE 9 : 10 @ 9 : 10
|
||||
|
||||
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||
|
||||
> INSERT 8 : 9 @ 8
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ ScaledResolution scaledresolution = mc.scaledResolution = new ScaledResolution(mc);
|
||||
|
||||
> INSERT 3 : 5 @ 3
|
||||
|
||||
+ this.mc.voiceOverlay.setResolution(j, k);
|
||||
+ this.mc.notifRenderer.setResolution(this.mc, j, k, scaledresolution.getScaleFactor());
|
||||
|
||||
> CHANGE 9 : 10 @ 9 : 10
|
||||
|
||||
~ ScaledResolution scaledresolution = mc.scaledResolution = new ScaledResolution(mc);
|
||||
|
||||
> INSERT 13 : 26 @ 13
|
||||
|
||||
+
|
||||
+ @Override
|
||||
+ public void updateScreen() {
|
||||
+ boolean vsyncLockEn = ScreenRecordingController.isVSyncLocked();
|
||||
+ if (vsyncLockEn != vsyncLock) {
|
||||
+ vsyncLock = vsyncLockEn;
|
||||
+ GuiOptionButton btn = ((GuiOptionsRowList) optionsRowList).getButtonFor(GameSettings.Options.EAGLER_VSYNC);
|
||||
+ if (btn != null) {
|
||||
+ btn.enabled = !vsyncLockEn;
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -0,0 +1,20 @@
|
||||
|
||||
# Eagler Context Redacted Diff
|
||||
# Copyright (c) 2024 lax1dude. All rights reserved.
|
||||
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 12 : 16 @ 12
|
||||
|
||||
+ /**
|
||||
+ * EAGLER NOTE: This constructor is deprecated! Use
|
||||
+ * Minecraft.getMinecraft().scaledResolution
|
||||
+ */
|
||||
|
||||
> INSERT 10 : 12 @ 10
|
||||
|
||||
+ i = Math.round(i * Math.max(parMinecraft.displayDPI, 0.5f));
|
||||
+
|
||||
|
||||
> EOF
|
@ -5,14 +5,32 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> DELETE 2 @ 2 : 7
|
||||
> CHANGE 2 : 3 @ 2 : 7
|
||||
|
||||
> CHANGE 22 : 24 @ 22 : 23
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
|
||||
~ for (int j = 0; j < field_146399_a.length; ++j) {
|
||||
~ GameSettings.Options gamesettings$options = field_146399_a[j];
|
||||
> INSERT 8 : 14 @ 8
|
||||
|
||||
> CHANGE 16 : 17 @ 16 : 17
|
||||
+ GameSettings.Options.CHAT_WIDTH, GameSettings.Options.REDUCED_DEBUG_INFO,
|
||||
+ GameSettings.Options.EAGLER_PROFANITY_FILTER };
|
||||
+ private static final GameSettings.Options[] no_profanity_filter = new GameSettings.Options[] {
|
||||
+ GameSettings.Options.CHAT_VISIBILITY, GameSettings.Options.CHAT_COLOR, GameSettings.Options.CHAT_LINKS,
|
||||
+ GameSettings.Options.CHAT_OPACITY, GameSettings.Options.CHAT_LINKS_PROMPT, GameSettings.Options.CHAT_SCALE,
|
||||
+ GameSettings.Options.CHAT_HEIGHT_FOCUSED, GameSettings.Options.CHAT_HEIGHT_UNFOCUSED,
|
||||
|
||||
> CHANGE 14 : 18 @ 14 : 15
|
||||
|
||||
~ boolean profanityFilterForce = EagRuntime.getConfiguration().isForceProfanityFilter();
|
||||
~ GameSettings.Options[] opts = profanityFilterForce ? no_profanity_filter : field_146399_a;
|
||||
~ for (int j = 0; j < opts.length; ++j) {
|
||||
~ GameSettings.Options gamesettings$options = opts[j];
|
||||
|
||||
> CHANGE 12 : 14 @ 12 : 14
|
||||
|
||||
~ this.buttonList.add(new GuiButton(200, this.width / 2 - 100,
|
||||
~ this.height / 6 + (profanityFilterForce ? 130 : 154), I18n.format("gui.done", new Object[0])));
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
|
@ -11,7 +11,11 @@
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> INSERT 114 : 146 @ 114
|
||||
> CHANGE 48 : 49 @ 48 : 49
|
||||
|
||||
~ ScaledResolution scaledresolution = mc.scaledResolution;
|
||||
|
||||
> INSERT 65 : 97 @ 65
|
||||
|
||||
+ public int getHeight() {
|
||||
+ if (this.theAchievement != null && this.notificationTime != 0L && Minecraft.getMinecraft().thePlayer != null) {
|
||||
|
@ -5,11 +5,12 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 7 @ 2 : 4
|
||||
> CHANGE 2 : 8 @ 2 : 4
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
|
||||
@ -28,7 +29,11 @@
|
||||
~ protected int getCloseKey() {
|
||||
~ return this.mc.gameSettings.keyBindInventory.getKeyCode();
|
||||
|
||||
> CHANGE 76 : 77 @ 76 : 77
|
||||
> CHANGE 11 : 12 @ 11 : 12
|
||||
|
||||
~ if (PointerInputAbstraction.getVCursorButtonDown(0)) {
|
||||
|
||||
> CHANGE 64 : 65 @ 64 : 65
|
||||
|
||||
~ GlStateManager.disableLighting();
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
+
|
||||
+ import com.google.common.collect.Lists;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
|
||||
@ -22,11 +22,25 @@
|
||||
|
||||
> DELETE 11 @ 11 : 12
|
||||
|
||||
> CHANGE 71 : 72 @ 71 : 72
|
||||
> INSERT 32 : 39 @ 32
|
||||
|
||||
+ public void handleTouchInput() throws IOException {
|
||||
+ super.handleTouchInput();
|
||||
+ if (this.displaySlot != null) {
|
||||
+ this.displaySlot.handleTouchInput();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 39 : 40 @ 39 : 40
|
||||
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
> CHANGE 270 : 272 @ 270 : 271
|
||||
> CHANGE 111 : 112 @ 111 : 112
|
||||
|
||||
~ if (!PointerInputAbstraction.getVCursorButtonDown(0)) {
|
||||
|
||||
> CHANGE 158 : 160 @ 158 : 159
|
||||
|
||||
~ for (int m = 0, l = StatList.objectMineStats.size(); m < l; ++m) {
|
||||
~ StatCrafting statcrafting = StatList.objectMineStats.get(m);
|
||||
|
@ -9,12 +9,14 @@
|
||||
|
||||
~ import java.util.List;
|
||||
|
||||
> INSERT 1 : 8 @ 1
|
||||
> INSERT 1 : 10 @ 1
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Sets;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Touch;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
|
||||
@ -25,11 +27,29 @@
|
||||
|
||||
> DELETE 8 @ 8 : 9
|
||||
|
||||
> INSERT 81 : 82 @ 81
|
||||
> INSERT 39 : 43 @ 39
|
||||
|
||||
+ if (primaryTouchPoint != -1 && Touch.fetchPointIdx(primaryTouchPoint) == -1) {
|
||||
+ primaryTouchPoint = -1;
|
||||
+ mouseReleased(lastTouchX, lastTouchY, 0);
|
||||
+ }
|
||||
|
||||
> CHANGE 30 : 31 @ 30 : 31
|
||||
|
||||
~ if (!this.mc.gameSettings.touchscreen && slot.canBeHovered() && this.isMouseOverSlot(slot, i, j)) {
|
||||
|
||||
> INSERT 11 : 12 @ 11
|
||||
|
||||
+ GlStateManager.enableAlpha();
|
||||
|
||||
> CHANGE 107 : 108 @ 107 : 108
|
||||
> DELETE 21 @ 21 : 22
|
||||
|
||||
> CHANGE 18 : 20 @ 18 : 19
|
||||
|
||||
~ if (!this.mc.gameSettings.touchscreen && inventoryplayer.getItemStack() == null && this.theSlot != null
|
||||
~ && this.theSlot.getHasStack()) {
|
||||
|
||||
> CHANGE 66 : 67 @ 66 : 67
|
||||
|
||||
~ EaglerTextureAtlasSprite textureatlassprite = this.mc.getTextureMapBlocks().getAtlasSprite(s1);
|
||||
|
||||
@ -37,7 +57,14 @@
|
||||
|
||||
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
|
||||
|
||||
> CHANGE 126 : 129 @ 126 : 127
|
||||
> CHANGE 20 : 24 @ 20 : 24
|
||||
|
||||
~ // if (this.mc.gameSettings.touchscreen && flag1 && this.mc.thePlayer.inventory.getItemStack() == null) {
|
||||
~ // this.mc.displayGuiScreen((GuiScreen) null);
|
||||
~ // return;
|
||||
~ // }
|
||||
|
||||
> CHANGE 102 : 105 @ 102 : 103
|
||||
|
||||
~ List<Slot> lst = this.inventorySlots.inventorySlots;
|
||||
~ for (int n = 0, m = lst.size(); n < m; ++n) {
|
||||
@ -58,7 +85,7 @@
|
||||
> INSERT 1 : 12 @ 1
|
||||
|
||||
+ } else if (parInt1 == 1) {
|
||||
+ showingCloseKey = System.currentTimeMillis();
|
||||
+ showingCloseKey = EagRuntime.steadyTimeMillis();
|
||||
+ } else {
|
||||
+ this.checkHotbarKeys(parInt1);
|
||||
+ if (this.theSlot != null && this.theSlot.getHasStack()) {
|
||||
@ -71,4 +98,67 @@
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 29 : 30 @ 29
|
||||
|
||||
+ return;
|
||||
|
||||
> INSERT 1 : 6 @ 1
|
||||
|
||||
+ if (primaryTouchPoint != -1 && Touch.fetchPointIdx(primaryTouchPoint) == -1) {
|
||||
+ primaryTouchPoint = -1;
|
||||
+ mouseReleased(lastTouchX, lastTouchY, 0);
|
||||
+ }
|
||||
+ }
|
||||
|
||||
> INSERT 1 : 3 @ 1
|
||||
|
||||
+ protected float getTouchModeScale() {
|
||||
+ return 1.25f;
|
||||
|
||||
> INSERT 1 : 44 @ 1
|
||||
|
||||
+
|
||||
+ private int primaryTouchPoint = -1;
|
||||
+ private int lastTouchX = -1;
|
||||
+ private int lastTouchY = -1;
|
||||
+
|
||||
+ protected void touchStarted(int touchX, int touchY, int uid) {
|
||||
+ if (primaryTouchPoint == -1) {
|
||||
+ primaryTouchPoint = uid;
|
||||
+ lastTouchX = touchX;
|
||||
+ lastTouchY = touchY;
|
||||
+ mouseClicked(touchX, touchY, 0);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected void touchMoved(int touchX, int touchY, int uid) {
|
||||
+ if (primaryTouchPoint == uid) {
|
||||
+ lastTouchX = touchX;
|
||||
+ lastTouchY = touchY;
|
||||
+ mouseClickMove(touchX, touchY, 0, 0l);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected void touchEndMove(int touchX, int touchY, int uid) {
|
||||
+ if (primaryTouchPoint == uid) {
|
||||
+ primaryTouchPoint = -1;
|
||||
+ lastTouchX = touchX;
|
||||
+ lastTouchY = touchY;
|
||||
+ mouseReleased(touchX, touchY, 0);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected void touchTapped(int touchX, int touchY, int uid) {
|
||||
+ if (primaryTouchPoint == uid) {
|
||||
+ primaryTouchPoint = -1;
|
||||
+ lastTouchX = touchX;
|
||||
+ lastTouchY = touchY;
|
||||
+ mouseReleased(touchX, touchY, 0);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ protected boolean shouldTouchGenerateMouseEvents() {
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -7,14 +7,16 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> INSERT 4 : 11 @ 4
|
||||
> INSERT 4 : 13 @ 4
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Lists;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
|
||||
> DELETE 4 @ 4 : 7
|
||||
@ -64,13 +66,41 @@
|
||||
~ for (int m = 0; m < CreativeTabs.creativeTabArray.length; ++m) {
|
||||
~ CreativeTabs creativetabs = CreativeTabs.creativeTabArray[m];
|
||||
|
||||
> CHANGE 127 : 130 @ 127 : 129
|
||||
> INSERT 10 : 26 @ 10
|
||||
|
||||
+ @Override
|
||||
+ protected void touchTapped(int touchX, int touchY, int uid) {
|
||||
+ int l = touchX - this.guiLeft;
|
||||
+ int i1 = touchY - this.guiTop;
|
||||
+
|
||||
+ for (int m = 0; m < CreativeTabs.creativeTabArray.length; ++m) {
|
||||
+ CreativeTabs creativetabs = CreativeTabs.creativeTabArray[m];
|
||||
+ if (this.func_147049_a(creativetabs, l, i1)) {
|
||||
+ this.setCurrentCreativeTab(creativetabs);
|
||||
+ break;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ super.touchTapped(touchX, touchY, uid);
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 93 : 94 @ 93 : 94
|
||||
|
||||
~ boolean flag = PointerInputAbstraction.getVCursorButtonDown(0);
|
||||
|
||||
> CHANGE 23 : 26 @ 23 : 25
|
||||
|
||||
~ for (int m = 0; m < CreativeTabs.creativeTabArray.length; ++m) {
|
||||
~ if (this.renderCreativeInventoryHoveringText(CreativeTabs.creativeTabArray[m], i, j)) {
|
||||
~ Mouse.showCursor(EnumCursorType.HAND);
|
||||
|
||||
> CHANGE 24 : 26 @ 24 : 25
|
||||
> CHANGE 16 : 18 @ 16 : 17
|
||||
|
||||
~ List list = itemstack.getTooltipProfanityFilter(this.mc.thePlayer,
|
||||
~ this.mc.gameSettings.advancedItemTooltips);
|
||||
|
||||
> CHANGE 7 : 9 @ 7 : 8
|
||||
|
||||
~ for (int m = 0; m < CreativeTabs.creativeTabArray.length; ++m) {
|
||||
~ CreativeTabs creativetabs1 = CreativeTabs.creativeTabArray[m];
|
||||
@ -84,11 +114,22 @@
|
||||
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
> INSERT 139 : 143 @ 139
|
||||
> INSERT 139 : 154 @ 139
|
||||
|
||||
+
|
||||
+ public boolean blockPTTKey() {
|
||||
+ return searchField.isFocused();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public boolean showCopyPasteButtons() {
|
||||
+ return searchField.isFocused();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public void fireInputEvent(EnumInputEvent event, String param) {
|
||||
+ searchField.fireInputEvent(event, param);
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -5,16 +5,31 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 3
|
||||
> CHANGE 2 : 7 @ 2 : 3
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Display;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenVisualViewport;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
|
||||
> DELETE 4 @ 4 : 5
|
||||
|
||||
> DELETE 7 @ 7 : 8
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
> CHANGE 34 : 35 @ 34 : 35
|
||||
+ import net.minecraft.client.renderer.tileentity.TileEntitySignRenderer;
|
||||
|
||||
> DELETE 6 @ 6 : 7
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ public class GuiEditSign extends GuiScreenVisualViewport {
|
||||
|
||||
> CHANGE 28 : 29 @ 28 : 29
|
||||
|
||||
~ public void updateScreen0() {
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
@ -22,11 +37,33 @@
|
||||
|
||||
~ protected void keyTyped(char parChar1, int parInt1) {
|
||||
|
||||
> INSERT 68 : 72 @ 68
|
||||
> CHANGE 25 : 26 @ 25 : 26
|
||||
|
||||
~ public void drawScreen0(int i, int j, float f) {
|
||||
|
||||
> CHANGE 37 : 47 @ 37 : 38
|
||||
|
||||
~ try {
|
||||
~ TileEntitySignRenderer.disableProfanityFilter = true;
|
||||
~ TileEntityRendererDispatcher.instance.renderTileEntityAt(this.tileSign, -0.5D,
|
||||
~ (PointerInputAbstraction.isTouchMode() && (Display.getVisualViewportH() / mc.displayHeight) < 0.75f)
|
||||
~ ? -0.25D
|
||||
~ : -0.75D,
|
||||
~ -0.5D, 0.0F);
|
||||
~ } finally {
|
||||
~ TileEntitySignRenderer.disableProfanityFilter = false;
|
||||
~ }
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ super.drawScreen0(i, j, f);
|
||||
|
||||
> INSERT 1 : 6 @ 1
|
||||
|
||||
+
|
||||
+ public boolean blockPTTKey() {
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -7,19 +7,32 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> INSERT 1 : 6 @ 1
|
||||
> INSERT 1 : 7 @ 1
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Lists;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
|
||||
> DELETE 10 @ 10 : 12
|
||||
|
||||
> CHANGE 50 : 52 @ 50 : 52
|
||||
> CHANGE 48 : 49 @ 48 : 49
|
||||
|
||||
~ long i = EagRuntime.steadyTimeMillis();
|
||||
|
||||
> CHANGE 1 : 3 @ 1 : 3
|
||||
|
||||
~ for (int j = 0, k = this.chunkListing.size(); j < k; ++j) {
|
||||
~ this.chunkListing.get(j).func_150804_b(System.currentTimeMillis() - i > 5L);
|
||||
~ this.chunkListing.get(j).func_150804_b(EagRuntime.steadyTimeMillis() - i > 5L);
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ if (EagRuntime.steadyTimeMillis() - i > 100L) {
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ new Object[] { Long.valueOf(EagRuntime.steadyTimeMillis() - i) });
|
||||
|
||||
> EOF
|
||||
|
@ -5,11 +5,15 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 3 : 13 @ 3 : 6
|
||||
> CHANGE 3 : 21 @ 3 : 6
|
||||
|
||||
~ import java.util.List;
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.cookie.ServerCookieDataStore;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumServerRateLimit;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketClient;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketFrame;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.internal.PlatformNetworking;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
@ -17,23 +21,31 @@
|
||||
~ import net.lax1dude.eaglercraft.v1_8.socket.ConnectionHandshake;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.socket.RateLimitTracker;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.socket.WebSocketNetworkManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageConstants;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.socket.protocol.client.GameProtocolMessageController;
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 8
|
||||
|
||||
~ import net.minecraft.client.network.NetHandlerPlayClient;
|
||||
|
||||
> DELETE 2 @ 2 : 5
|
||||
> CHANGE 2 : 3 @ 2 : 5
|
||||
|
||||
~ import net.minecraft.network.play.client.C17PacketCustomPayload;
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 1 : 5 @ 1 : 2
|
||||
> CHANGE 1 : 7 @ 1 : 2
|
||||
|
||||
~ private IWebSocketClient webSocket;
|
||||
~ private EaglercraftNetworkManager networkManager;
|
||||
~ private String currentAddress;
|
||||
~ private String currentPassword;
|
||||
~ private boolean allowPlaintext;
|
||||
~ private boolean allowCookies;
|
||||
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
@ -63,36 +75,52 @@
|
||||
|
||||
~ String serveraddress = AddressResolver.resolveURI(parServerData);
|
||||
|
||||
> CHANGE 2 : 7 @ 2 : 3
|
||||
> CHANGE 2 : 8 @ 2 : 3
|
||||
|
||||
~ if (RateLimitTracker.isLockedOut(serveraddress)) {
|
||||
~ logger.error("Server locked this client out on a previous connection, will not attempt to reconnect");
|
||||
~ } else {
|
||||
~ this.connect(serveraddress, password, allowPlaintext);
|
||||
~ this.connect(serveraddress, password, allowPlaintext,
|
||||
~ parServerData.enableCookies && EagRuntime.getConfiguration().isEnableServerCookies());
|
||||
~ }
|
||||
|
||||
> INSERT 3 : 16 @ 3
|
||||
> CHANGE 3 : 4 @ 3 : 7
|
||||
|
||||
+ this(parGuiScreen, mcIn, hostName, port, false);
|
||||
+ }
|
||||
+
|
||||
+ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, boolean allowPlaintext) {
|
||||
+ this(parGuiScreen, mcIn, hostName, port, null, allowPlaintext);
|
||||
+ }
|
||||
+
|
||||
+ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, String password) {
|
||||
+ this(parGuiScreen, mcIn, hostName, port, password, false);
|
||||
+ }
|
||||
+
|
||||
+ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, String password,
|
||||
+ boolean allowPlaintext) {
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 4
|
||||
|
||||
~ this.connect(hostName, password, allowPlaintext);
|
||||
~ this(parGuiScreen, mcIn, hostName, port, false, EagRuntime.getConfiguration().isEnableServerCookies());
|
||||
|
||||
> CHANGE 2 : 5 @ 2 : 7
|
||||
|
||||
~ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, boolean allowCookies) {
|
||||
~ this(parGuiScreen, mcIn, hostName, port, false, allowCookies);
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 5 @ 1 : 5
|
||||
|
||||
~ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, boolean allowPlaintext,
|
||||
~ boolean allowCookies) {
|
||||
~ this(parGuiScreen, mcIn, hostName, port, null, allowPlaintext, allowCookies);
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 5 @ 1 : 15
|
||||
|
||||
~ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, String password,
|
||||
~ boolean allowCookies) {
|
||||
~ this(parGuiScreen, mcIn, hostName, port, password, false, allowCookies);
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 9 @ 1 : 9
|
||||
|
||||
~ public GuiConnecting(GuiScreen parGuiScreen, Minecraft mcIn, String hostName, int port, String password,
|
||||
~ boolean allowPlaintext, boolean allowCookies) {
|
||||
~ this.mc = mcIn;
|
||||
~ this.previousGuiScreen = parGuiScreen;
|
||||
~ mcIn.loadWorld((WorldClient) null);
|
||||
~ this.connect(hostName, password, allowPlaintext,
|
||||
~ allowCookies && EagRuntime.getConfiguration().isEnableServerCookies());
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 4 @ 1 : 7
|
||||
|
||||
~ public GuiConnecting(GuiConnecting previous, String password) {
|
||||
~ this(previous, password, false);
|
||||
~ }
|
||||
@ -102,73 +130,87 @@
|
||||
~ public GuiConnecting(GuiConnecting previous, String password, boolean allowPlaintext) {
|
||||
~ this.mc = previous.mc;
|
||||
~ this.previousGuiScreen = previous.previousGuiScreen;
|
||||
~ this.connect(previous.currentAddress, password, allowPlaintext);
|
||||
~ this.connect(previous.currentAddress, password, allowPlaintext, previous.allowCookies);
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 6 @ 1 : 15
|
||||
> CHANGE 1 : 6 @ 1 : 3
|
||||
|
||||
~ private void connect(String ip, String password, boolean allowPlaintext) {
|
||||
~ private void connect(String ip, String password, boolean allowPlaintext, boolean allowCookies) {
|
||||
~ this.currentAddress = ip;
|
||||
~ this.currentPassword = password;
|
||||
~ this.allowPlaintext = allowPlaintext;
|
||||
~ }
|
||||
~ this.allowCookies = allowCookies;
|
||||
|
||||
> CHANGE 1 : 41 @ 1 : 8
|
||||
> CHANGE 3 : 14 @ 3 : 6
|
||||
|
||||
~ public void updateScreen() {
|
||||
~ ++timer;
|
||||
~ if (timer > 1) {
|
||||
~ if (this.currentAddress == null) {
|
||||
~ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
|
||||
~ } else if (this.networkManager == null) {
|
||||
~ } else if (webSocket == null) {
|
||||
~ logger.info("Connecting to: {}", currentAddress);
|
||||
~ this.networkManager = new EaglercraftNetworkManager(currentAddress);
|
||||
~ this.networkManager.connect();
|
||||
~ } else {
|
||||
~ if (this.networkManager.isChannelOpen()) {
|
||||
~ webSocket = PlatformNetworking.openWebSocket(currentAddress);
|
||||
~ if (webSocket == null) {
|
||||
~ mc.displayGuiScreen(new GuiDisconnected(previousGuiScreen, "connect.failed",
|
||||
~ new ChatComponentText("Could not open WebSocket to \"" + currentAddress + "\"!")));
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 79 @ 1 : 2
|
||||
|
||||
~ if (webSocket.getState() == EnumEaglerConnectionState.CONNECTED) {
|
||||
~ if (!hasOpened) {
|
||||
~ hasOpened = true;
|
||||
~ logger.info("Logging in: {}", currentAddress);
|
||||
~ if (ConnectionHandshake.attemptHandshake(this.mc, this, previousGuiScreen, currentPassword,
|
||||
~ allowPlaintext)) {
|
||||
~ byte[] cookieData = null;
|
||||
~ if (allowCookies) {
|
||||
~ ServerCookieDataStore.ServerCookie cookie = ServerCookieDataStore
|
||||
~ .loadCookie(currentAddress);
|
||||
~ if (cookie != null) {
|
||||
~ cookieData = cookie.cookie;
|
||||
~ }
|
||||
~ }
|
||||
~ if (ConnectionHandshake.attemptHandshake(this.mc, webSocket, this, previousGuiScreen,
|
||||
~ currentPassword, allowPlaintext, allowCookies, cookieData)) {
|
||||
~ logger.info("Handshake Success");
|
||||
~ this.networkManager = new WebSocketNetworkManager(webSocket);
|
||||
~ this.networkManager.setPluginInfo(ConnectionHandshake.pluginBrand,
|
||||
~ ConnectionHandshake.pluginVersion);
|
||||
~ mc.bungeeOutdatedMsgTimer = 80;
|
||||
~ mc.clearTitles();
|
||||
~ this.networkManager.setConnectionState(EnumConnectionState.PLAY);
|
||||
~ this.networkManager.setNetHandler(new NetHandlerPlayClient(this.mc, previousGuiScreen,
|
||||
~ this.networkManager, this.mc.getSession().getProfile()));
|
||||
~ NetHandlerPlayClient netHandler = new NetHandlerPlayClient(this.mc, previousGuiScreen,
|
||||
~ this.networkManager, this.mc.getSession().getProfile());
|
||||
~ this.networkManager.setNetHandler(netHandler);
|
||||
~ netHandler.setEaglerMessageController(new GameProtocolMessageController(
|
||||
~ GamePluginMessageProtocol.getByVersion(ConnectionHandshake.protocolVersion),
|
||||
~ GamePluginMessageConstants.CLIENT_TO_SERVER,
|
||||
~ GameProtocolMessageController
|
||||
~ .createClientHandler(ConnectionHandshake.protocolVersion, netHandler),
|
||||
~ (ch, msg) -> netHandler.addToSendQueue(new C17PacketCustomPayload(ch, msg))));
|
||||
~ } else {
|
||||
~ if (mc.currentScreen == this) {
|
||||
~ checkLowLevelRatelimit();
|
||||
~ }
|
||||
~ if (mc.currentScreen == this) {
|
||||
~ checkRatelimit();
|
||||
~ logger.info("Handshake Failure");
|
||||
~ mc.getSession().reset();
|
||||
~ mc.displayGuiScreen(
|
||||
~ new GuiDisconnected(previousGuiScreen, "connect.failed", new ChatComponentText(
|
||||
~ "Handshake Failure\n\nAre you sure this is an eagler 1.8 server?")));
|
||||
~ }
|
||||
~ if (!PlatformNetworking.playConnectionState().isClosed()) {
|
||||
~ PlatformNetworking.playDisconnect();
|
||||
~ }
|
||||
~ webSocket.close();
|
||||
~ return;
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 4 @ 1 : 7
|
||||
|
||||
~ try {
|
||||
~ this.networkManager.processReceivedPackets();
|
||||
~ } catch (IOException ex) {
|
||||
|
||||
> CHANGE 1 : 29 @ 1 : 5
|
||||
|
||||
~ }
|
||||
~ if (this.networkManager != null) {
|
||||
~ try {
|
||||
~ this.networkManager.processReceivedPackets();
|
||||
~ } catch (IOException ex) {
|
||||
~ }
|
||||
~ }
|
||||
~ } else {
|
||||
~ if (PlatformNetworking.playConnectionState() == EnumEaglerConnectionState.FAILED) {
|
||||
~ if (webSocket.getState() == EnumEaglerConnectionState.FAILED) {
|
||||
~ if (!hasOpened) {
|
||||
~ mc.getSession().reset();
|
||||
~ checkLowLevelRatelimit();
|
||||
~ checkRatelimit();
|
||||
~ if (mc.currentScreen == this) {
|
||||
~ if (RateLimitTracker.isProbablyLockedOut(currentAddress)) {
|
||||
~ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
|
||||
@ -179,9 +221,9 @@
|
||||
~ }
|
||||
~ }
|
||||
~ } else {
|
||||
~ if (this.networkManager.checkDisconnected()) {
|
||||
~ if (this.networkManager != null && this.networkManager.checkDisconnected()) {
|
||||
~ this.mc.getSession().reset();
|
||||
~ checkLowLevelRatelimit();
|
||||
~ checkRatelimit();
|
||||
~ if (mc.currentScreen == this) {
|
||||
~ if (RateLimitTracker.isProbablyLockedOut(currentAddress)) {
|
||||
~ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
|
||||
@ -192,12 +234,21 @@
|
||||
~ }
|
||||
~ }
|
||||
~ }
|
||||
~ }
|
||||
|
||||
> INSERT 1 : 8 @ 1
|
||||
|
||||
+ if (timer > 200) {
|
||||
+ if (webSocket != null) {
|
||||
+ webSocket.close();
|
||||
+ }
|
||||
+ mc.displayGuiScreen(new GuiDisconnected(previousGuiScreen, "connect.failed",
|
||||
+ new ChatComponentText("Handshake timed out")));
|
||||
+ }
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 1 @ 1 : 11
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ protected void keyTyped(char parChar1, int parInt1) {
|
||||
|
||||
@ -210,25 +261,41 @@
|
||||
|
||||
~ protected void actionPerformed(GuiButton parGuiButton) {
|
||||
|
||||
> CHANGE 13 : 14 @ 13 : 14
|
||||
> INSERT 4 : 6 @ 4
|
||||
|
||||
+ } else if (this.webSocket != null) {
|
||||
+ this.webSocket.close();
|
||||
|
||||
> CHANGE 9 : 10 @ 9 : 10
|
||||
|
||||
~ if (this.networkManager == null || !this.networkManager.isChannelOpen()) {
|
||||
|
||||
> INSERT 9 : 23 @ 9
|
||||
> INSERT 9 : 34 @ 9
|
||||
|
||||
+
|
||||
+ private void checkLowLevelRatelimit() {
|
||||
+ EnumServerRateLimit rateLimit = PlatformNetworking.getRateLimit();
|
||||
+ if (rateLimit == EnumServerRateLimit.BLOCKED) {
|
||||
+ RateLimitTracker.registerBlock(currentAddress);
|
||||
+ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
|
||||
+ logger.info("Handshake Failure: Too Many Requests!");
|
||||
+ } else if (rateLimit == EnumServerRateLimit.LOCKED_OUT) {
|
||||
+ RateLimitTracker.registerLockOut(currentAddress);
|
||||
+ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
|
||||
+ logger.info("Handshake Failure: Too Many Requests!");
|
||||
+ logger.info("Server has locked this client out");
|
||||
+ private void checkRatelimit() {
|
||||
+ if (this.webSocket != null) {
|
||||
+ List<IWebSocketFrame> strFrames = webSocket.getNextStringFrames();
|
||||
+ if (strFrames != null) {
|
||||
+ for (int i = 0; i < strFrames.size(); ++i) {
|
||||
+ String str = strFrames.get(i).getString();
|
||||
+ if (str.equalsIgnoreCase("BLOCKED")) {
|
||||
+ RateLimitTracker.registerBlock(currentAddress);
|
||||
+ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
|
||||
+ logger.info("Handshake Failure: Too Many Requests!");
|
||||
+ } else if (str.equalsIgnoreCase("LOCKED")) {
|
||||
+ RateLimitTracker.registerLockOut(currentAddress);
|
||||
+ mc.displayGuiScreen(GuiDisconnected.createRateLimitKick(previousGuiScreen));
|
||||
+ logger.info("Handshake Failure: Too Many Requests!");
|
||||
+ logger.info("Server has locked this client out");
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public boolean canCloseGui() {
|
||||
+ return false;
|
||||
+ }
|
||||
|
||||
> EOF
|
||||
|
@ -5,10 +5,11 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 5 @ 2
|
||||
> INSERT 2 : 6 @ 2
|
||||
|
||||
+ import java.io.IOException;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.ClientUUIDLoadingCache;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
|
||||
|
||||
> DELETE 6 @ 6 : 7
|
||||
@ -17,7 +18,7 @@
|
||||
|
||||
+ import net.minecraft.util.ChatComponentText;
|
||||
|
||||
> CHANGE 228 : 240 @ 228 : 229
|
||||
> CHANGE 228 : 242 @ 228 : 229
|
||||
|
||||
~ try {
|
||||
~ this.netClientHandler.getNetworkManager().processReceivedPackets();
|
||||
@ -31,6 +32,8 @@
|
||||
~ }
|
||||
~ this.netClientHandler.getSkinCache().flush();
|
||||
~ this.netClientHandler.getCapeCache().flush();
|
||||
~ this.netClientHandler.getNotifManager().runTick();
|
||||
~ ClientUUIDLoadingCache.update();
|
||||
|
||||
> CHANGE 96 : 98 @ 96 : 98
|
||||
|
||||
|
@ -5,13 +5,14 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 2 : 13 @ 2
|
||||
> INSERT 2 : 14 @ 2
|
||||
|
||||
+ import java.io.IOException;
|
||||
+
|
||||
+ import org.json.JSONArray;
|
||||
+ import org.json.JSONObject;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.IServerQuery;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.QueryResponse;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
@ -33,7 +34,7 @@
|
||||
|
||||
~ public boolean hideAddress = false;
|
||||
|
||||
> INSERT 1 : 9 @ 1
|
||||
> INSERT 1 : 10 @ 1
|
||||
|
||||
+ public IServerQuery currentQuery = null;
|
||||
+ public final ResourceLocation iconResourceLocation;
|
||||
@ -43,6 +44,7 @@
|
||||
+ public boolean hasPing = false;
|
||||
+ public boolean serverIconEnabled = false;
|
||||
+ public boolean isDefault = false;
|
||||
+ public boolean enableCookies;
|
||||
|
||||
> INSERT 1 : 5 @ 1
|
||||
|
||||
@ -51,35 +53,50 @@
|
||||
+ private static int serverTextureId = 0;
|
||||
+
|
||||
|
||||
> INSERT 4 : 5 @ 4
|
||||
> INSERT 4 : 6 @ 4
|
||||
|
||||
+ this.iconResourceLocation = new ResourceLocation("eagler:servers/icons/tex_" + serverTextureId++);
|
||||
+ this.enableCookies = EagRuntime.getConfiguration().isEnableServerCookies();
|
||||
|
||||
> DELETE 6 @ 6 : 9
|
||||
|
||||
> INSERT 7 : 9 @ 7
|
||||
> INSERT 7 : 10 @ 7
|
||||
|
||||
+ nbttagcompound.setBoolean("hideAddress", this.hideAddress);
|
||||
+ nbttagcompound.setBoolean("enableCookies", this.enableCookies);
|
||||
+
|
||||
|
||||
> DELETE 13 @ 13 : 16
|
||||
|
||||
> INSERT 11 : 17 @ 11
|
||||
> CHANGE 11 : 16 @ 11 : 13
|
||||
|
||||
+ if (nbtCompound.hasKey("hideAddress", 1)) {
|
||||
+ serverdata.hideAddress = nbtCompound.getBoolean("hideAddress");
|
||||
+ } else {
|
||||
+ serverdata.hideAddress = false;
|
||||
+ }
|
||||
+
|
||||
~ if (nbtCompound.hasKey("hideAddress", 1)) {
|
||||
~ serverdata.hideAddress = nbtCompound.getBoolean("hideAddress");
|
||||
~ } else {
|
||||
~ serverdata.hideAddress = false;
|
||||
~ }
|
||||
|
||||
> DELETE 3 @ 3 : 11
|
||||
> CHANGE 1 : 6 @ 1 : 4
|
||||
|
||||
> CHANGE 8 : 9 @ 8 : 9
|
||||
~ if (nbtCompound.hasKey("enableCookies", 1)) {
|
||||
~ serverdata.enableCookies = nbtCompound.getBoolean("enableCookies");
|
||||
~ } else {
|
||||
~ serverdata.enableCookies = true;
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 3
|
||||
|
||||
~ return serverdata;
|
||||
|
||||
> CHANGE 10 : 11 @ 10 : 11
|
||||
|
||||
~ this.hideAddress = serverDataIn.hideAddress;
|
||||
|
||||
> INSERT 6 : 8 @ 6
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+ this.enableCookies = serverDataIn.enableCookies;
|
||||
|
||||
> INSERT 5 : 7 @ 5
|
||||
|
||||
+ public static final ServerResourceMode[] _VALUES = values();
|
||||
+
|
||||
|
@ -60,7 +60,7 @@
|
||||
+
|
||||
+ public void loadServerList(byte[] localStorage) {
|
||||
|
||||
> CHANGE 1 : 8 @ 1 : 5
|
||||
> CHANGE 1 : 9 @ 1 : 5
|
||||
|
||||
~ freeServerIcons();
|
||||
~
|
||||
@ -68,6 +68,7 @@
|
||||
~ for (DefaultServer srv : EagRuntime.getConfiguration().getDefaultServerList()) {
|
||||
~ ServerData dat = new ServerData(srv.name, srv.addr, true);
|
||||
~ dat.isDefault = true;
|
||||
~ dat.hideAddress = srv.hideAddress;
|
||||
~ this.allServers.add(dat);
|
||||
|
||||
> CHANGE 2 : 8 @ 2 : 3
|
||||
@ -135,7 +136,7 @@
|
||||
~ data.iconTextureObject = null;
|
||||
~ }
|
||||
|
||||
> INSERT 36 : 144 @ 36
|
||||
> INSERT 36 : 145 @ 36
|
||||
|
||||
+
|
||||
+ public void freeServerIcons() {
|
||||
@ -170,7 +171,7 @@
|
||||
+ for (int i = 0, l = this.servers.size(); i < l; ++i) {
|
||||
+ ServerData dat = this.servers.get(i);
|
||||
+ if (dat.pingSentTime <= 0l) {
|
||||
+ dat.pingSentTime = System.currentTimeMillis();
|
||||
+ dat.pingSentTime = EagRuntime.steadyTimeMillis();
|
||||
+ if (RateLimitTracker.isLockedOut(dat.serverIP)) {
|
||||
+ logger.error(
|
||||
+ "Server {} locked this client out on a previous connection, will not attempt to reconnect",
|
||||
@ -192,6 +193,7 @@
|
||||
+ }
|
||||
+ }
|
||||
+ } else if (dat.currentQuery != null) {
|
||||
+ dat.currentQuery.update();
|
||||
+ if (!dat.hasPing) {
|
||||
+ ++total;
|
||||
+ EnumServerRateLimit rateLimit = dat.currentQuery.getRateLimit();
|
||||
@ -228,7 +230,7 @@
|
||||
+ dat.setIconPacket(r);
|
||||
+ }
|
||||
+ if (!dat.currentQuery.isOpen() && dat.pingSentTime > 0l
|
||||
+ && (System.currentTimeMillis() - dat.pingSentTime) > 2000l && !dat.hasPing) {
|
||||
+ && (EagRuntime.steadyTimeMillis() - dat.pingSentTime) > 2000l && !dat.hasPing) {
|
||||
+ if (RateLimitTracker.isProbablyLockedOut(dat.serverIP)) {
|
||||
+ logger.error("Server {} ratelimited this client out on a previous connection, assuming lockout",
|
||||
+ dat.serverIP);
|
||||
|
@ -17,7 +17,29 @@
|
||||
|
||||
> DELETE 5 @ 5 : 6
|
||||
|
||||
> CHANGE 211 : 212 @ 211 : 212
|
||||
> DELETE 9 @ 9 : 10
|
||||
|
||||
> CHANGE 25 : 26 @ 25 : 26
|
||||
|
||||
~ EnumDifficulty parEnumDifficulty) {
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ WorldProvider.getProviderForDimension(parInt1), true);
|
||||
|
||||
> DELETE 17 @ 17 : 19
|
||||
|
||||
> DELETE 8 @ 8 : 9
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 24 @ 24 : 25
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 113 : 114 @ 113 : 114
|
||||
|
||||
~ EaglercraftRandom random = new EaglercraftRandom();
|
||||
|
||||
|
@ -9,25 +9,27 @@
|
||||
|
||||
> DELETE 4 @ 4 : 6
|
||||
|
||||
> INSERT 1 : 22 @ 1
|
||||
> INSERT 1 : 24 @ 1
|
||||
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.ClientUUIDLoadingCache;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
||||
+
|
||||
+ import com.google.common.collect.Maps;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.profile.CapePackets;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.notifications.ServerNotificationManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.profile.ServerCapeCache;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.profile.ServerSkinCache;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.profile.SkinPackets;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.socket.protocol.client.GameProtocolMessageController;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANClientNetworkManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.sp.socket.ClientIntegratedServerNetworkManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.update.UpdateService;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.voice.VoiceClientController;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.webview.WebViewOverlayController;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFolderResourcePack;
|
||||
@ -67,31 +69,38 @@
|
||||
|
||||
~ private final Map<EaglercraftUUID, NetworkPlayerInfo> playerInfoMap = Maps.newHashMap();
|
||||
|
||||
> CHANGE 2 : 7 @ 2 : 3
|
||||
> CHANGE 2 : 12 @ 2 : 3
|
||||
|
||||
~ private boolean isIntegratedServer = false;
|
||||
~ private final EaglercraftRandom avRandomizer = new EaglercraftRandom();
|
||||
~ private final ServerSkinCache skinCache;
|
||||
~ private final ServerCapeCache capeCache;
|
||||
~ private final ServerNotificationManager notifManager;
|
||||
~ public boolean currentFNAWSkinAllowedState = true;
|
||||
~ public boolean currentFNAWSkinForcedState = true;
|
||||
~ private GameProtocolMessageController eaglerMessageController = null;
|
||||
~ public boolean hasRequestedServerInfo = false;
|
||||
~ public byte[] cachedServerInfoData = null;
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ public NetHandlerPlayClient(Minecraft mcIn, GuiScreen parGuiScreen, EaglercraftNetworkManager parNetworkManager,
|
||||
|
||||
> INSERT 5 : 9 @ 5
|
||||
> INSERT 5 : 10 @ 5
|
||||
|
||||
+ this.skinCache = new ServerSkinCache(parNetworkManager, mcIn.getTextureManager());
|
||||
+ this.capeCache = new ServerCapeCache(parNetworkManager, mcIn.getTextureManager());
|
||||
+ this.skinCache = new ServerSkinCache(this, mcIn.getTextureManager());
|
||||
+ this.capeCache = new ServerCapeCache(this, mcIn.getTextureManager());
|
||||
+ this.notifManager = new ServerNotificationManager();
|
||||
+ this.isIntegratedServer = (parNetworkManager instanceof ClientIntegratedServerNetworkManager)
|
||||
+ || (parNetworkManager instanceof LANClientNetworkManager);
|
||||
|
||||
> INSERT 4 : 6 @ 4
|
||||
> INSERT 4 : 7 @ 4
|
||||
|
||||
+ this.skinCache.destroy();
|
||||
+ this.capeCache.destroy();
|
||||
+ this.notifManager.destroy();
|
||||
|
||||
> INSERT 2 : 10 @ 2
|
||||
> INSERT 2 : 51 @ 2
|
||||
|
||||
+ public ServerSkinCache getSkinCache() {
|
||||
+ return this.skinCache;
|
||||
@ -101,15 +110,61 @@
|
||||
+ return this.capeCache;
|
||||
+ }
|
||||
+
|
||||
+ public ServerNotificationManager getNotifManager() {
|
||||
+ return this.notifManager;
|
||||
+ }
|
||||
+
|
||||
+ public GameProtocolMessageController getEaglerMessageController() {
|
||||
+ return eaglerMessageController;
|
||||
+ }
|
||||
+
|
||||
+ public void setEaglerMessageController(GameProtocolMessageController eaglerMessageController) {
|
||||
+ this.eaglerMessageController = eaglerMessageController;
|
||||
+ }
|
||||
+
|
||||
+ public GamePluginMessageProtocol getEaglerMessageProtocol() {
|
||||
+ return eaglerMessageController != null ? eaglerMessageController.protocol : null;
|
||||
+ }
|
||||
+
|
||||
+ public void sendEaglerMessage(GameMessagePacket packet) {
|
||||
+ try {
|
||||
+ eaglerMessageController.sendPacket(packet);
|
||||
+ } catch (IOException e) {
|
||||
+ logger.error("Failed to send eaglercraft plugin message packet: " + packet);
|
||||
+ logger.error(e);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public boolean webViewSendHandler(GameMessagePacket pkt) {
|
||||
+ if (eaglerMessageController == null) {
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (this.gameController.thePlayer == null || this.gameController.thePlayer.sendQueue != this) {
|
||||
+ logger.error("WebView sent message on a dead handler!");
|
||||
+ return false;
|
||||
+ }
|
||||
+ if (eaglerMessageController.protocol.ver >= 4) {
|
||||
+ sendEaglerMessage(pkt);
|
||||
+ return true;
|
||||
+ } else {
|
||||
+ return false;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 16 : 20 @ 16
|
||||
> CHANGE 1 : 3 @ 1 : 5
|
||||
|
||||
~ this.clientWorldController = new WorldClient(this, new WorldSettings(0L, packetIn.getGameType(), false,
|
||||
~ packetIn.isHardcoreMode(), packetIn.getWorldType()), packetIn.getDimension(), packetIn.getDifficulty());
|
||||
|
||||
> INSERT 11 : 15 @ 11
|
||||
|
||||
+ if (VoiceClientController.isClientSupported()) {
|
||||
+ VoiceClientController.initializeVoiceClient((pkt) -> this.netManager
|
||||
+ .sendPacket(new C17PacketCustomPayload(VoiceClientController.SIGNAL_CHANNEL, pkt)));
|
||||
+ VoiceClientController.initializeVoiceClient(this::sendEaglerMessage, eaglerMessageController.protocol.ver);
|
||||
+ }
|
||||
+ WebViewOverlayController.setPacketSendCallback(this::webViewSendHandler);
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
@ -191,7 +246,11 @@
|
||||
|
||||
> DELETE 5 @ 5 : 6
|
||||
|
||||
> DELETE 17 @ 17 : 18
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
|
||||
~ packetIn.getDimensionID(), packetIn.getDifficulty());
|
||||
|
||||
> DELETE 11 @ 11 : 12
|
||||
|
||||
> DELETE 9 @ 9 : 10
|
||||
|
||||
@ -205,7 +264,11 @@
|
||||
|
||||
> DELETE 11 @ 11 : 12
|
||||
|
||||
> DELETE 22 @ 22 : 23
|
||||
> INSERT 8 : 9 @ 8
|
||||
|
||||
+ tileentitysign.clearProfanityFilterCache();
|
||||
|
||||
> DELETE 14 @ 14 : 15
|
||||
|
||||
> DELETE 16 @ 16 : 17
|
||||
|
||||
@ -262,12 +325,13 @@
|
||||
~ for (int i = 0, l = lst.size(); i < l; ++i) {
|
||||
~ S38PacketPlayerListItem.AddPlayerData s38packetplayerlistitem$addplayerdata = lst.get(i);
|
||||
|
||||
> CHANGE 1 : 5 @ 1 : 2
|
||||
> CHANGE 1 : 6 @ 1 : 2
|
||||
|
||||
~ EaglercraftUUID uuid = s38packetplayerlistitem$addplayerdata.getProfile().getId();
|
||||
~ this.playerInfoMap.remove(uuid);
|
||||
~ this.skinCache.evictSkin(uuid);
|
||||
~ this.capeCache.evictCape(uuid);
|
||||
~ ClientUUIDLoadingCache.evict(uuid);
|
||||
|
||||
> DELETE 34 @ 34 : 35
|
||||
|
||||
@ -357,42 +421,16 @@
|
||||
|
||||
> DELETE 11 @ 11 : 13
|
||||
|
||||
> INSERT 9 : 43 @ 9
|
||||
> INSERT 9 : 17 @ 9
|
||||
|
||||
+ } else if ("EAG|Skins-1.8".equals(packetIn.getChannelName())) {
|
||||
+ } else {
|
||||
+ try {
|
||||
+ SkinPackets.readPluginMessage(packetIn.getBufferData(), skinCache);
|
||||
+ eaglerMessageController.handlePacket(packetIn.getChannelName(), packetIn.getBufferData());
|
||||
+ } catch (IOException e) {
|
||||
+ logger.error("Couldn't read EAG|Skins-1.8 packet!");
|
||||
+ logger.error("Couldn't read \"{}\" packet as an eaglercraft plugin message!",
|
||||
+ packetIn.getChannelName());
|
||||
+ logger.error(e);
|
||||
+ }
|
||||
+ } else if ("EAG|Capes-1.8".equals(packetIn.getChannelName())) {
|
||||
+ try {
|
||||
+ CapePackets.readPluginMessage(packetIn.getBufferData(), capeCache);
|
||||
+ } catch (IOException e) {
|
||||
+ logger.error("Couldn't read EAG|Capes-1.8 packet!");
|
||||
+ logger.error(e);
|
||||
+ }
|
||||
+ } else if ("EAG|UpdateCert-1.8".equals(packetIn.getChannelName())) {
|
||||
+ if (EagRuntime.getConfiguration().allowUpdateSvc()) {
|
||||
+ try {
|
||||
+ PacketBuffer pb = packetIn.getBufferData();
|
||||
+ byte[] c = new byte[pb.readableBytes()];
|
||||
+ pb.readBytes(c);
|
||||
+ UpdateService.addCertificateToSet(c);
|
||||
+ } catch (Throwable e) {
|
||||
+ logger.error("Couldn't process EAG|UpdateCert-1.8 packet!");
|
||||
+ logger.error(e);
|
||||
+ }
|
||||
+ }
|
||||
+ } else if (VoiceClientController.SIGNAL_CHANNEL.equals(packetIn.getChannelName())) {
|
||||
+ if (VoiceClientController.isClientSupported()) {
|
||||
+ VoiceClientController.handleVoiceSignalPacket(packetIn.getBufferData());
|
||||
+ }
|
||||
+ } else if ("EAG|FNAWSEn-1.8".equals(packetIn.getChannelName())) {
|
||||
+ this.currentFNAWSkinAllowedState = packetIn.getBufferData().readBoolean();
|
||||
+ Minecraft.getMinecraft().getRenderManager().setEnableFNAWSkins(
|
||||
+ this.currentFNAWSkinAllowedState && Minecraft.getMinecraft().gameSettings.enableFNAWSkins);
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
|
@ -5,16 +5,29 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 6
|
||||
> CHANGE 2 : 5 @ 2 : 6
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.profanity_filter.ProfanityFilter;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.profile.SkinModel;
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> DELETE 10 @ 10 : 13
|
||||
> INSERT 8 : 9 @ 8
|
||||
|
||||
> CHANGE 40 : 41 @ 40 : 41
|
||||
+ private String gameProfileProfanityFilter;
|
||||
|
||||
> DELETE 2 @ 2 : 5
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ private IChatComponent displayNameProfanityFilter;
|
||||
|
||||
> INSERT 15 : 16 @ 15
|
||||
|
||||
+ this.displayNameProfanityFilter = null;
|
||||
|
||||
> CHANGE 23 : 24 @ 23 : 24
|
||||
|
||||
~ return true;
|
||||
|
||||
@ -41,4 +54,39 @@
|
||||
|
||||
> DELETE 6 @ 6 : 33
|
||||
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ this.displayNameProfanityFilter = null;
|
||||
|
||||
> INSERT 6 : 34 @ 6
|
||||
|
||||
+ public IChatComponent getDisplayNameProfanityFilter() {
|
||||
+ if (Minecraft.getMinecraft().isEnableProfanityFilter()) {
|
||||
+ if (this.displayName != null) {
|
||||
+ if (this.displayNameProfanityFilter == null) {
|
||||
+ this.displayNameProfanityFilter = ProfanityFilter.getInstance()
|
||||
+ .profanityFilterChatComponent(this.displayName);
|
||||
+ }
|
||||
+ return this.displayNameProfanityFilter;
|
||||
+ } else {
|
||||
+ return null;
|
||||
+ }
|
||||
+ } else {
|
||||
+ return this.displayName;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public String getGameProfileNameProfanityFilter() {
|
||||
+ if (Minecraft.getMinecraft().isEnableProfanityFilter()) {
|
||||
+ if (this.gameProfileProfanityFilter == null) {
|
||||
+ this.gameProfileProfanityFilter = ProfanityFilter.getInstance()
|
||||
+ .profanityFilterString(this.gameProfile.getName());
|
||||
+ }
|
||||
+ return this.gameProfileProfanityFilter;
|
||||
+ } else {
|
||||
+ return this.gameProfile.getName();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> EOF
|
||||
|
@ -14,12 +14,13 @@
|
||||
~ import net.lax1dude.eaglercraft.v1_8.minecraft.IAcceleratedParticleEngine;
|
||||
~
|
||||
|
||||
> INSERT 1 : 9 @ 1
|
||||
> INSERT 1 : 10 @ 1
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Lists;
|
||||
+ import com.google.common.collect.Maps;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager;
|
||||
@ -43,10 +44,15 @@
|
||||
> INSERT 2 : 5 @ 2
|
||||
|
||||
+ public static final AcceleratedEffectRenderer vanillaAcceleratedParticleRenderer = new AcceleratedEffectRenderer();
|
||||
+ public IAcceleratedParticleEngine acceleratedParticleRenderer = vanillaAcceleratedParticleRenderer;
|
||||
+ public IAcceleratedParticleEngine acceleratedParticleRenderer = null;
|
||||
+
|
||||
|
||||
> CHANGE 104 : 106 @ 104 : 105
|
||||
> INSERT 13 : 15 @ 13
|
||||
|
||||
+ this.acceleratedParticleRenderer = EaglercraftGPU.checkInstancingCapable() ? vanillaAcceleratedParticleRenderer
|
||||
+ : null;
|
||||
|
||||
> CHANGE 91 : 93 @ 91 : 92
|
||||
|
||||
~ for (int i = 0, l = this.particleEmitters.size(); i < l; ++i) {
|
||||
~ EntityParticleEmitter entityparticleemitter = this.particleEmitters.get(i);
|
||||
@ -117,17 +123,20 @@
|
||||
+ texCoordWidth = 1.0f / blockMap.getWidth();
|
||||
+ texCoordHeight = 1.0f / blockMap.getHeight();
|
||||
|
||||
> INSERT 7 : 11 @ 7
|
||||
> INSERT 7 : 13 @ 7
|
||||
|
||||
+ boolean legacyRenderingHasOccured = false;
|
||||
+
|
||||
+ acceleratedParticleRenderer.begin(partialTicks);
|
||||
+ if (acceleratedParticleRenderer != null) {
|
||||
+ acceleratedParticleRenderer.begin(partialTicks);
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 4 : 9 @ 4 : 5
|
||||
> CHANGE 4 : 10 @ 4 : 5
|
||||
|
||||
~ if (!entityfx.renderAccelerated(acceleratedParticleRenderer, entityIn, partialTicks, f, f4,
|
||||
~ f1, f2, f3)) {
|
||||
~ if (acceleratedParticleRenderer == null
|
||||
~ || !entityfx.renderAccelerated(acceleratedParticleRenderer, entityIn, partialTicks,
|
||||
~ f, f4, f1, f2, f3)) {
|
||||
~ entityfx.renderParticle(worldrenderer, entityIn, partialTicks, f, f4, f1, f2, f3);
|
||||
~ legacyRenderingHasOccured = true;
|
||||
~ }
|
||||
@ -142,7 +151,7 @@
|
||||
~ : (l == 1 ? "TERRAIN_TEXTURE"
|
||||
~ : (l == 3 ? "ENTITY_PARTICLE_TEXTURE" : "Unknown - " + l));
|
||||
|
||||
> CHANGE 6 : 13 @ 6 : 7
|
||||
> CHANGE 6 : 15 @ 6 : 7
|
||||
|
||||
~ if (legacyRenderingHasOccured) {
|
||||
~ tessellator.draw();
|
||||
@ -150,6 +159,8 @@
|
||||
~ worldrenderer.finishDrawing();
|
||||
~ }
|
||||
~
|
||||
~ acceleratedParticleRenderer.draw(texCoordWidth, texCoordHeight);
|
||||
~ if (acceleratedParticleRenderer != null) {
|
||||
~ acceleratedParticleRenderer.draw(texCoordWidth, texCoordHeight);
|
||||
~ }
|
||||
|
||||
> EOF
|
||||
|
@ -11,10 +11,12 @@
|
||||
~
|
||||
~ import java.util.Arrays;
|
||||
|
||||
> CHANGE 1 : 3 @ 1 : 2
|
||||
> CHANGE 1 : 5 @ 1 : 2
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
|
||||
~
|
||||
|
||||
> INSERT 1 : 29 @ 1
|
||||
|
||||
@ -23,7 +25,7 @@
|
||||
+ import com.google.common.base.Predicates;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Display;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
|
||||
@ -47,7 +49,11 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.voice.VoiceTagRenderer;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f;
|
||||
|
||||
> CHANGE 10 : 13 @ 10 : 20
|
||||
> INSERT 6 : 7 @ 6
|
||||
|
||||
+ import net.minecraft.client.gui.GuiScreen;
|
||||
|
||||
> CHANGE 4 : 7 @ 4 : 14
|
||||
|
||||
~ import net.minecraft.client.particle.EntityFX;
|
||||
~ import net.minecraft.client.renderer.RenderGlobal.ChunkCullAdapter;
|
||||
@ -137,7 +143,11 @@
|
||||
|
||||
> DELETE 1 @ 1 : 8
|
||||
|
||||
> CHANGE 111 : 112 @ 111 : 112
|
||||
> DELETE 6 @ 6 : 7
|
||||
|
||||
> DELETE 79 @ 79 : 81
|
||||
|
||||
> CHANGE 23 : 24 @ 23 : 24
|
||||
|
||||
~ public float getFOVModifier(float partialTicks, boolean parFlag) {
|
||||
|
||||
@ -179,7 +189,9 @@
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 117 : 118 @ 117 : 118
|
||||
> DELETE 10 @ 10 : 11
|
||||
|
||||
> CHANGE 106 : 107 @ 106 : 107
|
||||
|
||||
~ this.lightmapColors[i] = short1 << 24 | j | k << 8 | l << 16;
|
||||
|
||||
@ -201,17 +213,45 @@
|
||||
+ GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
|
||||
+
|
||||
|
||||
> DELETE 23 @ 23 : 28
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 4 : 7 @ 4
|
||||
> CHANGE 10 : 11 @ 10 : 11
|
||||
|
||||
~ boolean flag = Display.isActive() || mc.gameSettings.touchscreen;
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
|
||||
~ && (!this.mc.gameSettings.touchscreen || !PointerInputAbstraction.getVCursorButtonDown(1))) {
|
||||
|
||||
> DELETE 7 @ 7 : 14
|
||||
|
||||
> INSERT 3 : 6 @ 3
|
||||
|
||||
+ if (this.mc.gameSettings.keyBindZoomCamera.isKeyDown()) {
|
||||
+ f *= 0.7f;
|
||||
+ }
|
||||
|
||||
> DELETE 39 @ 39 : 52
|
||||
> DELETE 23 @ 23 : 24
|
||||
|
||||
> CHANGE 4 : 45 @ 4 : 5
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ final ScaledResolution scaledresolution = mc.scaledResolution;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ final int j1 = PointerInputAbstraction.getVCursorX() * l / this.mc.displayWidth;
|
||||
~ final int k1 = i1 - PointerInputAbstraction.getVCursorY() * i1 / this.mc.displayHeight - 1;
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> DELETE 5 @ 5 : 18
|
||||
|
||||
> CHANGE 1 : 3 @ 1 : 3
|
||||
|
||||
~ final boolean b = !this.mc.gameSettings.hideGUI || this.mc.currentScreen != null;
|
||||
~ if (b) {
|
||||
|
||||
> CHANGE 1 : 14 @ 1 : 2
|
||||
|
||||
~ long framebufferAge = this.overlayFramebuffer.getAge();
|
||||
~ if (framebufferAge == -1l || framebufferAge > (Minecraft.getDebugFPS() < 25 ? 125l : 75l)) {
|
||||
@ -220,10 +260,16 @@
|
||||
~ GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 0.0f);
|
||||
~ GlStateManager.clear(16640);
|
||||
~ GlStateManager.enableOverlayFramebufferBlending();
|
||||
~ this.mc.ingameGUI.renderGameOverlay(parFloat1);
|
||||
~ if (b) {
|
||||
~ this.mc.ingameGUI.renderGameOverlay(parFloat1);
|
||||
~ }
|
||||
~ GlStateManager.disableOverlayFramebufferBlending();
|
||||
~ this.overlayFramebuffer.endRender();
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 32 @ 1 : 3
|
||||
|
||||
~ if (b) {
|
||||
~ this.setupOverlayRendering();
|
||||
~ GlStateManager.disableLighting();
|
||||
~ GlStateManager.enableBlend();
|
||||
@ -235,7 +281,7 @@
|
||||
~ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
~ GlStateManager.enableBlend();
|
||||
~ GlStateManager.blendFunc(1, 771);
|
||||
~ GlStateManager.disableAlpha();
|
||||
~ GlStateManager.enableAlpha();
|
||||
~ GlStateManager.disableDepth();
|
||||
~ GlStateManager.depthMask(false);
|
||||
~ Tessellator tessellator = Tessellator.getInstance();
|
||||
@ -248,14 +294,45 @@
|
||||
~ tessellator.draw();
|
||||
~ GlStateManager.depthMask(true);
|
||||
~ GlStateManager.enableDepth();
|
||||
~ GlStateManager.enableAlpha();
|
||||
~ GlStateManager.disableBlend();
|
||||
~ if (this.mc.gameSettings.hudPlayer) { // give the player model HUD good fps
|
||||
~ this.mc.ingameGUI.drawEaglerPlayerOverlay(l - 3,
|
||||
~ 3 + this.mc.ingameGUI.overlayDebug.playerOffset, parFloat1);
|
||||
~ }
|
||||
~ }
|
||||
|
||||
> CHANGE 23 : 24 @ 23 : 24
|
||||
> INSERT 10 : 12 @ 10
|
||||
|
||||
+ this.mc.notifRenderer.renderOverlay(j1, k1);
|
||||
+
|
||||
|
||||
> INSERT 2 : 4 @ 2
|
||||
|
||||
+ float f = 1.0f;
|
||||
+ final float[] ff = new float[] { 1.0f };
|
||||
|
||||
> CHANGE 2 : 20 @ 2 : 3
|
||||
|
||||
~ f = mc.currentScreen.getEaglerScale();
|
||||
~ int mx, my;
|
||||
~ if (f == 1.0f) {
|
||||
~ mx = j1;
|
||||
~ my = k1;
|
||||
~ } else {
|
||||
~ mx = GuiScreen.applyEaglerScale(f, j1, l);
|
||||
~ my = GuiScreen.applyEaglerScale(f, k1, i1);
|
||||
~ GlStateManager.pushMatrix();
|
||||
~ float fff = (1.0f - f) * 0.5f;
|
||||
~ GlStateManager.translate(fff * l, fff * i1, 0.0f);
|
||||
~ GlStateManager.scale(f, f, f);
|
||||
~ }
|
||||
~ ff[0] = f;
|
||||
~ this.mc.currentScreen.drawScreen(mx, my, parFloat1);
|
||||
~ if (f != 1.0f) {
|
||||
~ GlStateManager.popMatrix();
|
||||
~ }
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
|
||||
~ return EntityRenderer.this.mc.currentScreen.getClass().getName();
|
||||
|
||||
@ -263,16 +340,31 @@
|
||||
|
||||
~ return HString.format("Scaled: (%d, %d). Absolute: (%d, %d)",
|
||||
|
||||
> CHANGE 6 : 7 @ 6 : 7
|
||||
> CHANGE 1 : 3 @ 1 : 2
|
||||
|
||||
~ Integer.valueOf(PointerInputAbstraction.getVCursorX()),
|
||||
~ Integer.valueOf(PointerInputAbstraction.getVCursorY()) });
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
||||
~ return HString.format("Scaled: (%d, %d). Absolute: (%d, %d). Scale factor of %d",
|
||||
|
||||
> INSERT 9 : 11 @ 9
|
||||
> INSERT 7 : 12 @ 7
|
||||
|
||||
+ crashreportcategory.addCrashSectionCallable("Eagler Scale", new Callable<String>() {
|
||||
+ public String call() throws Exception {
|
||||
+ return "" + ff[0];
|
||||
+ }
|
||||
+ });
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> INSERT 1 : 3 @ 1
|
||||
|
||||
+
|
||||
+ this.mc.voiceOverlay.drawOverlay();
|
||||
+ }
|
||||
|
||||
> DELETE 6 @ 6 : 8
|
||||
> DELETE 4 @ 4 : 6
|
||||
|
||||
> CHANGE 32 : 33 @ 32 : 33
|
||||
|
||||
@ -291,7 +383,7 @@
|
||||
+ VoiceTagRenderer.clearTagsDrawnSet();
|
||||
+
|
||||
|
||||
> CHANGE 4 : 25 @ 4 : 12
|
||||
> CHANGE 3 : 24 @ 3 : 12
|
||||
|
||||
~ boolean dlights = DynamicLightsStateManager.isDynamicLightsRender();
|
||||
~ if (dlights) {
|
||||
@ -315,7 +407,7 @@
|
||||
~ }
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 26 @ 1 : 2
|
||||
> CHANGE 1 : 28 @ 1 : 2
|
||||
|
||||
~ if (this.mc.gameSettings.shaders) {
|
||||
~ try {
|
||||
@ -330,7 +422,9 @@
|
||||
~ }
|
||||
~ mc.effectRenderer.acceleratedParticleRenderer = EffectRenderer.vanillaAcceleratedParticleRenderer;
|
||||
~ } else {
|
||||
~ mc.effectRenderer.acceleratedParticleRenderer = EffectRenderer.vanillaAcceleratedParticleRenderer;
|
||||
~ mc.effectRenderer.acceleratedParticleRenderer = EaglercraftGPU.checkInstancingCapable()
|
||||
~ ? EffectRenderer.vanillaAcceleratedParticleRenderer
|
||||
~ : null;
|
||||
~ if (dlights) {
|
||||
~ GlStateManager.enableExtensionPipeline();
|
||||
~ }
|
||||
@ -343,29 +437,34 @@
|
||||
~ }
|
||||
~ }
|
||||
|
||||
> INSERT 2 : 6 @ 2
|
||||
> CHANGE 2 : 5 @ 2 : 3
|
||||
|
||||
+ if (fxaa) {
|
||||
+ EffectPipelineFXAA.end();
|
||||
+ }
|
||||
+
|
||||
~ if (fxaa) {
|
||||
~ EffectPipelineFXAA.end();
|
||||
~ }
|
||||
|
||||
> INSERT 14 : 18 @ 14
|
||||
> DELETE 7 @ 7 : 8
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> INSERT 1 : 5 @ 1
|
||||
|
||||
+ boolean isDynamicLights = DynamicLightsStateManager.isDynamicLightsRender();
|
||||
+ if (isDynamicLights) {
|
||||
+ DynamicLightsStateManager.setupInverseViewMatrix();
|
||||
+ }
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
> INSERT 6 : 9 @ 6
|
||||
> INSERT 5 : 8 @ 5
|
||||
|
||||
+ TileEntityRendererDispatcher.staticPlayerX = d0; // hack, needed for some eagler stuff
|
||||
+ TileEntityRendererDispatcher.staticPlayerY = d1;
|
||||
+ TileEntityRendererDispatcher.staticPlayerZ = d2;
|
||||
|
||||
> CHANGE 6 : 9 @ 6 : 8
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> CHANGE 2 : 5 @ 2 : 4
|
||||
|
||||
~ float vigg = this.getFOVModifier(partialTicks, true);
|
||||
~ GlStateManager.gluPerspective(vigg, (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F,
|
||||
@ -375,7 +474,15 @@
|
||||
|
||||
~ GlStateManager.gluPerspective(vigg, (float) this.mc.displayWidth / (float) this.mc.displayHeight, 0.05F,
|
||||
|
||||
> INSERT 26 : 27 @ 26
|
||||
> DELETE 10 @ 10 : 11
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> INSERT 3 : 4 @ 3
|
||||
|
||||
+ GlStateManager.disableBlend();
|
||||
|
||||
@ -385,11 +492,13 @@
|
||||
|
||||
+ GlStateManager.shadeModel(7424);
|
||||
|
||||
> INSERT 16 : 19 @ 16
|
||||
> DELETE 5 @ 5 : 6
|
||||
|
||||
+ if (isDynamicLights) {
|
||||
+ GlStateManager.disableExtensionPipeline();
|
||||
+ }
|
||||
> CHANGE 9 : 12 @ 9 : 10
|
||||
|
||||
~ if (isDynamicLights) {
|
||||
~ GlStateManager.disableExtensionPipeline();
|
||||
~ }
|
||||
|
||||
> INSERT 2 : 5 @ 2
|
||||
|
||||
@ -397,19 +506,23 @@
|
||||
+ GlStateManager.enableExtensionPipeline();
|
||||
+ }
|
||||
|
||||
> INSERT 8 : 11 @ 8
|
||||
> CHANGE 8 : 11 @ 8 : 9
|
||||
|
||||
+ if (isDynamicLights) {
|
||||
+ GlStateManager.disableExtensionPipeline();
|
||||
+ }
|
||||
~ if (isDynamicLights) {
|
||||
~ GlStateManager.disableExtensionPipeline();
|
||||
~ }
|
||||
|
||||
> INSERT 3 : 6 @ 3
|
||||
> INSERT 2 : 5 @ 2
|
||||
|
||||
+ if (isDynamicLights) {
|
||||
+ GlStateManager.enableExtensionPipeline();
|
||||
+ }
|
||||
|
||||
> CHANGE 17 : 25 @ 17 : 18
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> DELETE 9 @ 9 : 10
|
||||
|
||||
> CHANGE 3 : 11 @ 3 : 5
|
||||
|
||||
~ if (isDynamicLights) {
|
||||
~ DynamicLightsStateManager.bindAcceleratedEffectRenderer(effectrenderer);
|
||||
@ -420,7 +533,15 @@
|
||||
~ effectrenderer.acceleratedParticleRenderer = null;
|
||||
~ }
|
||||
|
||||
> INSERT 39 : 53 @ 39
|
||||
> DELETE 5 @ 5 : 6
|
||||
|
||||
> DELETE 12 @ 12 : 13
|
||||
|
||||
> DELETE 7 @ 7 : 8
|
||||
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> INSERT 8 : 22 @ 8
|
||||
|
||||
+ private void updateDynamicLightListEagler(float partialTicks) {
|
||||
+ DynamicLightsStateManager.clearRenderList();
|
||||
@ -437,7 +558,9 @@
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 3
|
||||
|
||||
~ GlStateManager.gluPerspective(this.getFOVModifier(partialTicks, true),
|
||||
|
||||
@ -523,7 +646,11 @@
|
||||
~ EaglerDeferredPipeline.instance.setForwardRenderLightFactors(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
~ }
|
||||
|
||||
> CHANGE 153 : 154 @ 153 : 154
|
||||
> CHANGE 6 : 7 @ 6 : 7
|
||||
|
||||
~ ScaledResolution scaledresolution = mc.scaledResolution;
|
||||
|
||||
> CHANGE 146 : 147 @ 146 : 147
|
||||
|
||||
~ GlStateManager.clearColor(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 1.0F);
|
||||
|
||||
@ -539,7 +666,7 @@
|
||||
|
||||
> INSERT 14 : 17 @ 14
|
||||
|
||||
+ } else if (!this.mc.gameSettings.fog) {
|
||||
+ } else if (partialTicks != -1 && !this.mc.gameSettings.fog) {
|
||||
+ GlStateManager.setFog(2048);
|
||||
+ GlStateManager.setFogDensity(0.0F);
|
||||
|
||||
@ -553,7 +680,7 @@
|
||||
|
||||
> DELETE 9 @ 9 : 10
|
||||
|
||||
> INSERT 12 : 988 @ 12
|
||||
> INSERT 12 : 952 @ 12
|
||||
|
||||
+
|
||||
+ private static final Vector4f tmpVec4f_1 = new Vector4f();
|
||||
@ -570,28 +697,23 @@
|
||||
+ EaglerDeferredPipeline.renderSuspended();
|
||||
+ return;
|
||||
+ }
|
||||
+ mc.mcProfiler.endStartSection("eaglercraftShaders");
|
||||
+ EaglerDeferredPipeline.instance.setPartialTicks(partialTicks);
|
||||
+ eagPartialTicks = partialTicks;
|
||||
+ EaglerDeferredConfig conf = mc.gameSettings.deferredShaderConf;
|
||||
+ boolean flag = isDrawBlockOutline();
|
||||
+ GlStateManager.viewport(0, 0, mc.displayWidth, mc.displayHeight);
|
||||
+ mc.mcProfiler.startSection("camera");
|
||||
+ setupCameraTransform(partialTicks, 2);
|
||||
+ EaglerDeferredPipeline.instance.loadViewMatrix();
|
||||
+ ActiveRenderInfo.updateRenderInfo(mc.thePlayer, mc.gameSettings.thirdPersonView == 2);
|
||||
+ mc.mcProfiler.endStartSection("culling");
|
||||
+ Frustum frustum = new Frustum();
|
||||
+ Entity entity = mc.getRenderViewEntity();
|
||||
+ if (entity == null) {
|
||||
+ entity = mc.thePlayer;
|
||||
+ }
|
||||
+ double d0 = EaglerDeferredPipeline.instance.currentRenderX = entity.lastTickPosX
|
||||
+ + (entity.posX - entity.lastTickPosX) * (double) partialTicks;
|
||||
+ double d1 = EaglerDeferredPipeline.instance.currentRenderY = entity.lastTickPosY
|
||||
+ + (entity.posY - entity.lastTickPosY) * (double) partialTicks;
|
||||
+ double d2 = EaglerDeferredPipeline.instance.currentRenderZ = entity.lastTickPosZ
|
||||
+ + (entity.posZ - entity.lastTickPosZ) * (double) partialTicks;
|
||||
+ double d0 = entity.lastTickPosX + (entity.posX - entity.lastTickPosX) * (double) partialTicks;
|
||||
+ double d1 = entity.lastTickPosY + (entity.posY - entity.lastTickPosY) * (double) partialTicks;
|
||||
+ double d2 = entity.lastTickPosZ + (entity.posZ - entity.lastTickPosZ) * (double) partialTicks;
|
||||
+ EaglerDeferredPipeline.instance.setRenderPosGlobal(d0, d1, d2);
|
||||
+ EaglerDeferredPipeline.instance.updateReprojectionCoordinates(d0, d1, d2);
|
||||
+ float eyeHeight = entity.getEyeHeight();
|
||||
+ frustum.setPosition(d0, d1, d2);
|
||||
@ -603,7 +725,7 @@
|
||||
+ // }
|
||||
+ // System.out.println(builder.toString());
|
||||
+
|
||||
+ float waveTimer = (float) ((System.currentTimeMillis() % 600000l) * 0.001);
|
||||
+ float waveTimer = (float) ((EagRuntime.steadyTimeMillis() % 600000l) * 0.001);
|
||||
+ DeferredStateManager.setWaterWindOffset(0.0f, 0.0f, waveTimer, waveTimer);
|
||||
+
|
||||
+ float blockWaveDistX = (float) (d0 - blockWaveOffsetX);
|
||||
@ -628,7 +750,6 @@
|
||||
+
|
||||
+ // if (mc.gameSettings.renderDistanceChunks >= 4) vanilla shows sky not fog
|
||||
+
|
||||
+ mc.mcProfiler.endStartSection("terrain_setup");
|
||||
+ mc.renderGlobal.setupTerrain(entity, (double) partialTicks, frustum, frameCount++, mc.thePlayer.isSpectator());
|
||||
+
|
||||
+ // clear some state:
|
||||
@ -646,11 +767,8 @@
|
||||
+
|
||||
+ EaglerDeferredPipeline.instance.beginDrawMainGBufferTerrain();
|
||||
+
|
||||
+ mc.mcProfiler.endStartSection("updatechunks");
|
||||
+ mc.renderGlobal.updateChunks(finishTimeNano);
|
||||
+
|
||||
+ mc.mcProfiler.endStartSection("terrain");
|
||||
+
|
||||
+ mc.renderGlobal.renderBlockLayer(EnumWorldBlockLayer.SOLID, (double) partialTicks, 2, entity);
|
||||
+ GlStateManager.enableAlpha();
|
||||
+ GlStateManager.alphaFunc(516, 0.5F);
|
||||
@ -679,20 +797,17 @@
|
||||
+ NameTagRenderer.doRenderNameTags = true;
|
||||
+ NameTagRenderer.nameTagsCount = 0;
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ mc.mcProfiler.endStartSection("entities");
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+ DeferredStateManager.startUsingEnvMap();
|
||||
+ mc.renderGlobal.renderEntities(entity, frustum, partialTicks);
|
||||
+ GlStateManager.matrixMode(5888);
|
||||
+ GlStateManager.popMatrix();
|
||||
+ mc.mcProfiler.endStartSection("litParticles");
|
||||
+ EntityFX.interpPosX = d0;
|
||||
+ EntityFX.interpPosY = d1;
|
||||
+ EntityFX.interpPosZ = d2;
|
||||
+ enableLightmap();
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ mc.effectRenderer.renderLitParticles(entity, partialTicks);
|
||||
+ mc.mcProfiler.endStartSection("gbufferParticles");
|
||||
+ GlStateManager.matrixMode(5888);
|
||||
+ GlStateManager.popMatrix();
|
||||
+ GlStateManager.pushMatrix();
|
||||
@ -706,9 +821,7 @@
|
||||
+ DynamicLightManager.setIsRenderingLights(false);
|
||||
+ NameTagRenderer.doRenderNameTags = false;
|
||||
+
|
||||
+ mc.mcProfiler.endStartSection("endDrawMainGBuffer");
|
||||
+ EaglerDeferredPipeline.instance.endDrawMainGBuffer();
|
||||
+ mc.mcProfiler.endStartSection("shadowSetup");
|
||||
+
|
||||
+ // calculate sun matrix and angle:
|
||||
+
|
||||
@ -1113,11 +1226,9 @@
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ mc.mcProfiler.endStartSection("combineGBuffersAndIlluminate");
|
||||
+ EaglerDeferredPipeline.instance.combineGBuffersAndIlluminate();
|
||||
+
|
||||
+ if (conf.is_rendering_useEnvMap) {
|
||||
+ mc.mcProfiler.endStartSection("envMap");
|
||||
+ DeferredStateManager.forwardCallbackHandler = null;
|
||||
+ EaglerDeferredPipeline.instance.beginDrawEnvMap();
|
||||
+ GlStateManager.enableCull();
|
||||
@ -1188,7 +1299,6 @@
|
||||
+ }
|
||||
+
|
||||
+ if (conf.is_rendering_realisticWater) {
|
||||
+ mc.mcProfiler.endStartSection("realisticWaterMask");
|
||||
+ EaglerDeferredPipeline.instance.beginDrawRealisticWaterMask();
|
||||
+ enableLightmap();
|
||||
+ mc.renderGlobal.renderBlockLayer(EnumWorldBlockLayer.REALISTIC_WATER, (double) partialTicks, 2, entity);
|
||||
@ -1196,8 +1306,6 @@
|
||||
+ EaglerDeferredPipeline.instance.endDrawRealisticWaterMask();
|
||||
+ }
|
||||
+
|
||||
+ mc.mcProfiler.endStartSection("setupShaderFog");
|
||||
+
|
||||
+ int dim = mc.theWorld.provider.getDimensionId();
|
||||
+ float ff;
|
||||
+ if (dim == 0) {
|
||||
@ -1262,16 +1370,13 @@
|
||||
+ DeferredStateManager.setDefaultMaterialConstants();
|
||||
+
|
||||
+ if (conf.is_rendering_realisticWater) {
|
||||
+ mc.mcProfiler.endStartSection("realisticWaterSurface");
|
||||
+ EaglerDeferredPipeline.instance.beginDrawRealisticWaterSurface();
|
||||
+ mc.renderGlobal.renderBlockLayer(EnumWorldBlockLayer.REALISTIC_WATER, (double) partialTicks, 2, entity);
|
||||
+ EaglerDeferredPipeline.instance.endDrawRealisticWaterSurface();
|
||||
+ }
|
||||
+
|
||||
+ mc.mcProfiler.endStartSection("gbufferFog");
|
||||
+ EaglerDeferredPipeline.instance.applyGBufferFog();
|
||||
+
|
||||
+ mc.mcProfiler.endStartSection("translucentEntities");
|
||||
+ EaglerDeferredPipeline.instance.beginDrawTranslucentEntities();
|
||||
+
|
||||
+ TileEntityRendererDispatcher.staticPlayerX = d0;
|
||||
@ -1295,14 +1400,11 @@
|
||||
+ DeferredStateManager.forwardCallbackGBuffer.reset();
|
||||
+
|
||||
+ EaglerDeferredPipeline.instance.beginDrawTranslucentBlocks();
|
||||
+ mc.mcProfiler.endStartSection("translucentBlocks");
|
||||
+ mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);
|
||||
+ mc.renderGlobal.renderBlockLayer(EnumWorldBlockLayer.TRANSLUCENT, (double) partialTicks, 2, entity);
|
||||
+
|
||||
+ EaglerDeferredPipeline.instance.beginDrawMainGBufferDestroyProgress();
|
||||
+
|
||||
+ mc.mcProfiler.endStartSection("destroyProgress");
|
||||
+
|
||||
+ GlStateManager.enableBlend();
|
||||
+ GlStateManager.tryBlendFuncSeparate(0, 770, 0, 0);
|
||||
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 0.5f);
|
||||
@ -1314,7 +1416,6 @@
|
||||
+ EaglerDeferredPipeline.instance.endDrawMainGBufferDestroyProgress();
|
||||
+
|
||||
+ if (mc.effectRenderer.hasParticlesInAlphaLayer()) {
|
||||
+ mc.mcProfiler.endStartSection("transparentParticles");
|
||||
+ GlStateManager.pushMatrix();
|
||||
+ mc.effectRenderer.acceleratedParticleRenderer = EaglerDeferredPipeline.instance.forwardEffectRenderer;
|
||||
+ DeferredStateManager.setHDRTranslucentPassBlendFunc();
|
||||
@ -1330,22 +1431,18 @@
|
||||
+ }
|
||||
+
|
||||
+ if (conf.is_rendering_useEnvMap) {
|
||||
+ mc.mcProfiler.endStartSection("glassHighlights");
|
||||
+ EaglerDeferredPipeline.instance.beginDrawGlassHighlights();
|
||||
+ mc.renderGlobal.renderBlockLayer(EnumWorldBlockLayer.GLASS_HIGHLIGHTS, (double) partialTicks, 2, entity);
|
||||
+ EaglerDeferredPipeline.instance.endDrawGlassHighlights();
|
||||
+ }
|
||||
+
|
||||
+ mc.mcProfiler.endStartSection("saveReprojData");
|
||||
+ EaglerDeferredPipeline.instance.saveReprojData();
|
||||
+
|
||||
+ mc.mcProfiler.endStartSection("rainSnow");
|
||||
+ renderRainSnow(partialTicks);
|
||||
+
|
||||
+ GlStateManager.disableBlend();
|
||||
+
|
||||
+ if (renderHand) {
|
||||
+ mc.mcProfiler.endStartSection("renderHandOverlay");
|
||||
+ EaglerDeferredPipeline.instance.beginDrawHandOverlay();
|
||||
+ DeferredStateManager.reportForwardRenderObjectPosition2(0.0f, 0.0f, 0.0f);
|
||||
+ DeferredStateManager.forwardCallbackHandler = DeferredStateManager.forwardCallbackGBuffer;
|
||||
@ -1371,7 +1468,6 @@
|
||||
+ GlStateManager.disableAlpha();
|
||||
+ }
|
||||
+
|
||||
+ mc.mcProfiler.endStartSection("endDrawDeferred");
|
||||
+ EaglerDeferredPipeline.instance.endDrawHDRTranslucent();
|
||||
+
|
||||
+ EaglerDeferredPipeline.instance.endDrawDeferred();
|
||||
@ -1391,11 +1487,9 @@
|
||||
+ if (!DebugFramebufferView.debugViewShown) {
|
||||
+ GlStateManager.disableAlpha();
|
||||
+ if (isDrawBlockOutline()) {
|
||||
+ this.mc.mcProfiler.endStartSection("outline");
|
||||
+ mc.renderGlobal.drawSelectionBox(mc.thePlayer, this.mc.objectMouseOver, 0, partialTicks);
|
||||
+ }
|
||||
+ GlStateManager.enableAlpha();
|
||||
+ this.mc.mcProfiler.endStartSection("nameTags");
|
||||
+ if (NameTagRenderer.nameTagsCount > 0) {
|
||||
+ enableLightmap();
|
||||
+ Arrays.sort(NameTagRenderer.nameTagsThisFrame, 0, NameTagRenderer.nameTagsCount, (n1, n2) -> {
|
||||
@ -1422,11 +1516,8 @@
|
||||
+ }
|
||||
+ disableLightmap();
|
||||
+ GlStateManager.disableLighting();
|
||||
+ this.mc.mcProfiler.endStartSection("worldBorder");
|
||||
+ mc.renderGlobal.renderWorldBorder(entity, partialTicks);
|
||||
+ }
|
||||
+
|
||||
+ mc.mcProfiler.endSection();
|
||||
+ }
|
||||
+
|
||||
+ public boolean renderHeldItemLight(EntityLivingBase entityLiving, float mag) {
|
||||
|
@ -7,8 +7,10 @@
|
||||
|
||||
> DELETE 2 @ 2 : 7
|
||||
|
||||
> CHANGE 6 : 10 @ 6 : 7
|
||||
> CHANGE 6 : 12 @ 6 : 7
|
||||
|
||||
~
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
@ -220,7 +222,11 @@
|
||||
|
||||
+ boolean light = DynamicLightManager.isRenderingLights();
|
||||
|
||||
> CHANGE 27 : 36 @ 27 : 54
|
||||
> DELETE 6 @ 6 : 7
|
||||
|
||||
> DELETE 16 @ 16 : 17
|
||||
|
||||
> CHANGE 3 : 12 @ 3 : 30
|
||||
|
||||
~ if (!DeferredStateManager.isDeferredRenderer()) {
|
||||
~ for (int i = 0; i < this.theWorld.weatherEffects.size(); ++i) {
|
||||
@ -234,7 +240,7 @@
|
||||
|
||||
> DELETE 2 @ 2 : 16
|
||||
|
||||
> CHANGE 4 : 7 @ 4 : 5
|
||||
> CHANGE 2 : 5 @ 2 : 5
|
||||
|
||||
~ label738: for (int ii = 0, ll = this.renderInfos.size(); ii < ll; ++ii) {
|
||||
~ RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation = this.renderInfos
|
||||
@ -246,7 +252,9 @@
|
||||
+ entity2.renderDynamicLightsEagler(partialTicks, flag2);
|
||||
+ }
|
||||
|
||||
> CHANGE 27 : 30 @ 27 : 28
|
||||
> DELETE 24 @ 24 : 25
|
||||
|
||||
> CHANGE 2 : 5 @ 2 : 3
|
||||
|
||||
~ for (int ii = 0, ll = this.renderInfos.size(); ii < ll; ++ii) {
|
||||
~ RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation1 = this.renderInfos
|
||||
@ -258,7 +266,9 @@
|
||||
~ TileEntityRendererDispatcher.instance.renderTileEntity((TileEntity) list1.get(m), partialTicks,
|
||||
~ -1);
|
||||
|
||||
> INSERT 40 : 199 @ 40
|
||||
> DELETE 36 @ 36 : 37
|
||||
|
||||
> INSERT 3 : 154 @ 3
|
||||
|
||||
+ public static interface EntityChunkCullAdapter {
|
||||
+ boolean shouldCull(RenderChunk renderChunk);
|
||||
@ -271,8 +281,6 @@
|
||||
+ public void renderShadowLODEntities(Entity renderViewEntity, float partialTicks,
|
||||
+ EntityChunkCullAdapter entityChunkCull, EntityObjectCullAdapter entityObjectCull) { // TODO
|
||||
+ if (renderEntitiesStartupCounter <= 0) {
|
||||
+ theWorld.theProfiler.startSection("shadow_entity_prepare");
|
||||
+
|
||||
+ TileEntityRendererDispatcher.instance.cacheActiveRenderInfo(theWorld, mc.getTextureManager(),
|
||||
+ mc.fontRendererObj, renderViewEntity, partialTicks);
|
||||
+ renderManager.cacheActiveRenderInfo(theWorld, mc.fontRendererObj, renderViewEntity, mc.pointedEntity,
|
||||
@ -289,7 +297,6 @@
|
||||
+ TileEntityRendererDispatcher.staticPlayerZ = d5;
|
||||
+ renderManager.setRenderPosition(d3, d4, d5);
|
||||
+
|
||||
+ this.theWorld.theProfiler.endStartSection("shadow_entities");
|
||||
+ for (RenderGlobal.ContainerLocalRenderInformation containerlocalrenderinformation : this.renderInfos) {
|
||||
+ RenderChunk currentRenderChunk = containerlocalrenderinformation.renderChunk;
|
||||
+
|
||||
@ -343,14 +350,11 @@
|
||||
+ GlStateManager.depthMask(true);
|
||||
+ }
|
||||
+ }
|
||||
+ theWorld.theProfiler.endSection();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ public void renderParaboloidTileEntities(Entity renderViewEntity, float partialTicks, int up) {
|
||||
+ if (renderEntitiesStartupCounter <= 0) {
|
||||
+ theWorld.theProfiler.startSection("paraboloid_entity_prepare");
|
||||
+
|
||||
+ TileEntityRendererDispatcher.instance.cacheActiveRenderInfo(theWorld, mc.getTextureManager(),
|
||||
+ mc.fontRendererObj, renderViewEntity, partialTicks);
|
||||
+ renderManager.cacheActiveRenderInfo(theWorld, mc.fontRendererObj, renderViewEntity, mc.pointedEntity,
|
||||
@ -391,7 +395,6 @@
|
||||
+ maxY = MathHelper.floor_double(maxY / 16.0) * 16;
|
||||
+ maxZ = MathHelper.floor_double(maxZ / 16.0) * 16;
|
||||
+
|
||||
+ this.theWorld.theProfiler.endStartSection("paraboloid_entities");
|
||||
+ for (int cx = minX; cx <= maxX; cx += 16) {
|
||||
+ for (int cz = minZ; cz <= maxZ; cz += 16) {
|
||||
+ for (int cy = minY; cy <= maxY; cy += 16) {
|
||||
@ -414,7 +417,6 @@
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
+ theWorld.theProfiler.endSection();
|
||||
+ mc.entityRenderer.disableLightmap();
|
||||
+ }
|
||||
+ }
|
||||
@ -430,7 +432,15 @@
|
||||
|
||||
~ return HString.format("C: %d/%d %sD: %d, %s",
|
||||
|
||||
> CHANGE 53 : 55 @ 53 : 54
|
||||
> DELETE 15 @ 15 : 16
|
||||
|
||||
> DELETE 15 @ 15 : 16
|
||||
|
||||
> DELETE 4 @ 4 : 5
|
||||
|
||||
> DELETE 7 @ 7 : 8
|
||||
|
||||
> CHANGE 8 : 10 @ 8 : 9
|
||||
|
||||
~ || (double) viewEntity.rotationYaw != this.lastViewEntityYaw
|
||||
~ || this.mc.entityRenderer.currentProjMatrixFOV != this.lastViewProjMatrixFOV;
|
||||
@ -457,12 +467,16 @@
|
||||
~ RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation2 = this.renderInfos
|
||||
~ .get(ii);
|
||||
|
||||
> CHANGE 3 : 5 @ 3 : 4
|
||||
> CHANGE 3 : 5 @ 3 : 5
|
||||
|
||||
~ if (this.mc.gameSettings.chunkFix ? this.isPositionInRenderChunkHack(blockpos1, renderchunk4)
|
||||
~ : this.isPositionInRenderChunk(blockpos, renderchunk4)) {
|
||||
|
||||
> INSERT 21 : 31 @ 21
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> DELETE 7 @ 7 : 8
|
||||
|
||||
> INSERT 9 : 19 @ 9
|
||||
|
||||
+ /**
|
||||
+ * WARNING: use only in the above "build near" logic
|
||||
@ -479,13 +493,23 @@
|
||||
|
||||
+ ((ClippingHelperImpl) this.debugFixedClippingHelper).destroy();
|
||||
|
||||
> CHANGE 58 : 61 @ 58 : 59
|
||||
> DELETE 48 @ 48 : 49
|
||||
|
||||
> CHANGE 9 : 12 @ 9 : 10
|
||||
|
||||
~ for (int ii = 0, ll = this.renderInfos.size(); ii < ll; ++ii) {
|
||||
~ RenderGlobal.ContainerLocalRenderInformation renderglobal$containerlocalrenderinformation = this.renderInfos
|
||||
~ .get(ii);
|
||||
|
||||
> INSERT 33 : 70 @ 33
|
||||
> DELETE 7 @ 7 : 9
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> DELETE 15 @ 15 : 16
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> INSERT 3 : 39 @ 3
|
||||
|
||||
+ public static interface ChunkCullAdapter {
|
||||
+ boolean shouldCull(RenderChunk chunk);
|
||||
@ -518,7 +542,6 @@
|
||||
+ }
|
||||
+ }
|
||||
+ if (i > 0) {
|
||||
+ this.mc.mcProfiler.endStartSection("render_shadow_" + blockLayerIn);
|
||||
+ this.renderContainer.renderChunkLayer(blockLayerIn);
|
||||
+ }
|
||||
+ return i;
|
||||
@ -579,10 +602,9 @@
|
||||
~ ++i;
|
||||
~ }
|
||||
|
||||
> CHANGE 3 : 10 @ 3 : 5
|
||||
> CHANGE 3 : 9 @ 3 : 5
|
||||
|
||||
~ if (i > 0) {
|
||||
~ this.mc.mcProfiler.endStartSection("render_paraboloid_" + up + "_" + blockLayerIn);
|
||||
~ this.mc.entityRenderer.enableLightmap();
|
||||
~ this.renderContainer.renderChunkLayer(blockLayerIn);
|
||||
~ this.mc.entityRenderer.disableLightmap();
|
||||
@ -609,7 +631,11 @@
|
||||
|
||||
~ this.displayListEntitiesDirty |= this.renderDispatcher.updateChunks(finishTimeNano);
|
||||
|
||||
> DELETE 17 @ 17 : 18
|
||||
> CHANGE 11 : 12 @ 11 : 12
|
||||
|
||||
~ long i = finishTimeNano - EagRuntime.nanoTime();
|
||||
|
||||
> DELETE 5 @ 5 : 6
|
||||
|
||||
> CHANGE 155 : 159 @ 155 : 156
|
||||
|
||||
|
@ -35,7 +35,11 @@
|
||||
+ return true;
|
||||
+ }
|
||||
|
||||
> INSERT 21 : 25 @ 21
|
||||
> CHANGE 17 : 18 @ 17 : 18
|
||||
|
||||
~ this.renderLivingLabel(entity, entity.getDisplayNameProfanityFilter().getFormattedText(), x, y, z, 64);
|
||||
|
||||
> INSERT 3 : 7 @ 3
|
||||
|
||||
+ public static void renderNameAdapter(Render r, Entity e, double x, double y, double z) {
|
||||
+ r.renderName(e, x, y, z);
|
||||
|
@ -62,7 +62,11 @@
|
||||
~ modelplayer_.bipedRightArmwear.showModel = clientPlayer.isWearing(EnumPlayerModelParts.RIGHT_SLEEVE);
|
||||
~ }
|
||||
|
||||
> CHANGE 50 : 60 @ 50 : 58
|
||||
> CHANGE 41 : 42 @ 41 : 42
|
||||
|
||||
~ score.getScorePoints() + " " + scoreobjective.getDisplayNameProfanityFilter(), d0, d1, d2, 64);
|
||||
|
||||
> CHANGE 8 : 18 @ 8 : 16
|
||||
|
||||
~ if (!zombieModel) {
|
||||
~ float f = 1.0F;
|
||||
|
@ -147,7 +147,11 @@
|
||||
~ for (int i = 0, l = this.layerRenderers.size(); i < l; ++i) {
|
||||
~ LayerRenderer layerrenderer = this.layerRenderers.get(i);
|
||||
|
||||
> INSERT 30 : 34 @ 30
|
||||
> CHANGE 26 : 27 @ 26 : 27
|
||||
|
||||
~ String s = entitylivingbase.getDisplayNameProfanityFilter().getFormattedText();
|
||||
|
||||
> INSERT 3 : 7 @ 3
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ NameTagRenderer.renderNameTag(entitylivingbase, null, d0, d1, d2, -69);
|
||||
|
@ -38,7 +38,7 @@
|
||||
|
||||
+ hasAllocated = false;
|
||||
|
||||
> INSERT 12 : 26 @ 12
|
||||
> INSERT 12 : 28 @ 12
|
||||
|
||||
+
|
||||
+ /**
|
||||
@ -49,7 +49,9 @@
|
||||
+ protected void regenerateIfNotAllocated() {
|
||||
+ if (this.glTextureId != -1) {
|
||||
+ if (hasAllocated) {
|
||||
+ EaglercraftGPU.regenerateTexture(glTextureId);
|
||||
+ if (EaglercraftGPU.checkTexStorageCapable()) {
|
||||
+ EaglercraftGPU.regenerateTexture(glTextureId);
|
||||
+ }
|
||||
+ }
|
||||
+ hasAllocated = true;
|
||||
+ }
|
||||
|
@ -43,7 +43,7 @@
|
||||
~ private final Map<String, EaglerTextureAtlasSprite> mapRegisteredSprites;
|
||||
~ private final Map<String, EaglerTextureAtlasSprite> mapUploadedSprites;
|
||||
|
||||
> CHANGE 3 : 10 @ 3 : 4
|
||||
> CHANGE 3 : 11 @ 3 : 4
|
||||
|
||||
~ private final EaglerTextureAtlasSprite missingImage;
|
||||
~ private final EaglerTextureAtlasSpritePBR missingImagePBR;
|
||||
@ -52,6 +52,7 @@
|
||||
~ private boolean isEaglerPBRMode = false;
|
||||
~ public int eaglerPBRMaterialTexture = -1;
|
||||
~ private boolean hasAllocatedEaglerPBRMaterialTexture = false;
|
||||
~ private boolean isGLES2 = false;
|
||||
|
||||
> INSERT 1 : 7 @ 1
|
||||
|
||||
@ -67,7 +68,11 @@
|
||||
~ this.missingImage = new EaglerTextureAtlasSprite("missingno");
|
||||
~ this.missingImagePBR = new EaglerTextureAtlasSpritePBR("missingno");
|
||||
|
||||
> INSERT 11 : 27 @ 11
|
||||
> INSERT 2 : 3 @ 2
|
||||
|
||||
+ this.isGLES2 = EaglercraftGPU.checkOpenGLESVersion() == 200;
|
||||
|
||||
> INSERT 9 : 25 @ 9
|
||||
|
||||
+ this.missingImagePBR.setIconWidth(16);
|
||||
+ this.missingImagePBR.setIconHeight(16);
|
||||
@ -308,8 +313,9 @@
|
||||
|
||||
+ regenerateIfNotAllocated();
|
||||
|
||||
> INSERT 2 : 23 @ 2
|
||||
> INSERT 2 : 24 @ 2
|
||||
|
||||
+
|
||||
+ if (isEaglerPBRMode) {
|
||||
+ if (hasAllocatedEaglerPBRMaterialTexture) {
|
||||
+ EaglercraftGPU.regenerateTexture(eaglerPBRMaterialTexture);
|
||||
@ -423,12 +429,21 @@
|
||||
~ textureatlassprite = EaglerTextureAtlasSprite.makeAtlasSprite(location);
|
||||
~ }
|
||||
|
||||
> CHANGE 15 : 17 @ 15 : 17
|
||||
> CHANGE 12 : 18 @ 12 : 13
|
||||
|
||||
~ if (!isGLES2) {
|
||||
~ this.mipmapLevels = mipmapLevelsIn;
|
||||
~ } else {
|
||||
~ this.mipmapLevels = 0; // Due to limitations in OpenGL ES 2.0 texture completeness, its easier to just
|
||||
~ // make this zero
|
||||
~ }
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ public EaglerTextureAtlasSprite getMissingSprite() {
|
||||
~ return isEaglerPBRMode ? missingImagePBR : missingImage;
|
||||
|
||||
> INSERT 1 : 23 @ 1
|
||||
> INSERT 1 : 27 @ 1
|
||||
|
||||
+
|
||||
+ public int getWidth() {
|
||||
@ -444,12 +459,16 @@
|
||||
+ }
|
||||
+
|
||||
+ public void setBlurMipmapDirect0(boolean parFlag, boolean parFlag2) {
|
||||
+ super.setBlurMipmapDirect0(parFlag, parFlag2);
|
||||
+ if (isEaglerPBRMode && eaglerPBRMaterialTexture != -1) {
|
||||
+ GlStateManager.setActiveTexture(33986);
|
||||
+ GlStateManager.bindTexture(eaglerPBRMaterialTexture);
|
||||
+ if (isGLES2) {
|
||||
+ super.setBlurMipmapDirect0(parFlag, false);
|
||||
+ } else {
|
||||
+ super.setBlurMipmapDirect0(parFlag, parFlag2);
|
||||
+ GlStateManager.setActiveTexture(33984);
|
||||
+ if (isEaglerPBRMode && eaglerPBRMaterialTexture != -1) {
|
||||
+ GlStateManager.setActiveTexture(33986);
|
||||
+ GlStateManager.bindTexture(eaglerPBRMaterialTexture);
|
||||
+ super.setBlurMipmapDirect0(parFlag, parFlag2);
|
||||
+ GlStateManager.setActiveTexture(33984);
|
||||
+ }
|
||||
+ }
|
||||
+ }
|
||||
|
||||
|
@ -29,7 +29,15 @@
|
||||
|
||||
~ public static int uploadTextureImage(int parInt1, ImageData parBufferedImage) {
|
||||
|
||||
> CHANGE 120 : 122 @ 120 : 121
|
||||
> INSERT 112 : 117 @ 112
|
||||
|
||||
+ if (!parFlag2 && !EaglercraftGPU.checkNPOTCapable() && ImageData.isNPOTStatic(parInt2, parInt3)) {
|
||||
+ parFlag2 = true;
|
||||
+ logger.warn(
|
||||
+ "An NPOT (non-power-of-two) texture was allocated with GL_REPEAT wrapping in an OpenGL context where that isn't supported, changing to GL_CLAMP_TO_EDGE to avoid errors");
|
||||
+ }
|
||||
|
||||
> CHANGE 8 : 10 @ 8 : 9
|
||||
|
||||
~ EaglercraftGPU.glTexSubImage2D(GL_TEXTURE_2D, parInt1, parInt4, parInt5 + k, parInt2, l, GL_RGBA,
|
||||
~ GL_UNSIGNED_BYTE, dataBuffer);
|
||||
@ -46,12 +54,14 @@
|
||||
|
||||
~ // deleteTexture(parInt1); //TODO: why
|
||||
|
||||
> CHANGE 2 : 6 @ 2 : 6
|
||||
> CHANGE 2 : 8 @ 2 : 6
|
||||
|
||||
~ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, '\u813d', parInt2);
|
||||
~ EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u813a', 0.0F);
|
||||
~ EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u813b', (float) parInt2);
|
||||
~ // EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u8501', 0.0F);
|
||||
~ if (EaglercraftGPU.checkOpenGLESVersion() >= 300) {
|
||||
~ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, '\u813d', parInt2);
|
||||
~ EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u813a', 0.0F);
|
||||
~ EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u813b', (float) parInt2);
|
||||
~ // EaglercraftGPU.glTexParameterf(GL_TEXTURE_2D, '\u8501', 0.0F);
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 6
|
||||
|
||||
@ -68,7 +78,15 @@
|
||||
~ int i = parBufferedImage.width;
|
||||
~ int j = parBufferedImage.height;
|
||||
|
||||
> CHANGE 11 : 13 @ 11 : 12
|
||||
> INSERT 3 : 8 @ 3
|
||||
|
||||
+ if (!parFlag2 && !EaglercraftGPU.checkNPOTCapable() && parBufferedImage.isNPOT()) {
|
||||
+ parFlag2 = true;
|
||||
+ logger.warn(
|
||||
+ "An NPOT (non-power-of-two) texture was allocated with GL_REPEAT wrapping in an OpenGL context where that isn't supported, changing to GL_CLAMP_TO_EDGE to avoid errors");
|
||||
+ }
|
||||
|
||||
> CHANGE 8 : 10 @ 8 : 9
|
||||
|
||||
~ EaglercraftGPU.glTexSubImage2D(GL_TEXTURE_2D, 0, parInt1, parInt2 + i1, i, j1, GL_RGBA, GL_UNSIGNED_BYTE,
|
||||
~ dataBuffer);
|
||||
|
@ -52,7 +52,11 @@
|
||||
~ if (emissive) {
|
||||
~ DeferredStateManager.setEmissionConstant(0.0f);
|
||||
|
||||
> INSERT 19 : 23 @ 19
|
||||
> CHANGE 17 : 18 @ 17 : 18
|
||||
|
||||
~ String s = entityitemframe.getDisplayedItem().getDisplayNameProfanityFilter();
|
||||
|
||||
> INSERT 1 : 5 @ 1
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ NameTagRenderer.renderNameTag(entityitemframe, null, d0, d1, d2, -69);
|
||||
|
@ -7,22 +7,31 @@
|
||||
|
||||
> DELETE 2 @ 2 : 4
|
||||
|
||||
> INSERT 4 : 9 @ 4
|
||||
> INSERT 4 : 10 @ 4
|
||||
|
||||
+
|
||||
+ import com.google.common.collect.Lists;
|
||||
+ import com.google.common.collect.Maps;
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> CHANGE 95 : 98 @ 95 : 98
|
||||
> CHANGE 72 : 73 @ 72 : 73
|
||||
|
||||
~ long i = EagRuntime.steadyTimeMillis();
|
||||
|
||||
> CHANGE 22 : 25 @ 22 : 25
|
||||
|
||||
~ for (int i = 0, l = list1.size(); i < l; ++i) {
|
||||
~ arraylist.add("textures/entity/banner/"
|
||||
~ + ((TileEntityBanner.EnumBannerPattern) list1.get(i)).getPatternName() + ".png");
|
||||
|
||||
> CHANGE 10 : 11 @ 10 : 11
|
||||
|
||||
~ tileentitybannerrenderer$timedbannertexture.systemTime = EagRuntime.steadyTimeMillis();
|
||||
|
||||
> EOF
|
||||
|
@ -5,19 +5,14 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> INSERT 3 : 6 @ 3
|
||||
> INSERT 3 : 5 @ 3
|
||||
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
|
||||
|
||||
> DELETE 4 @ 4 : 6
|
||||
|
||||
> CHANGE 19 : 20 @ 19 : 20
|
||||
|
||||
~ Calendar calendar = EagRuntime.getLocaleCalendar();
|
||||
|
||||
> DELETE 36 @ 36 : 38
|
||||
> DELETE 56 @ 56 : 58
|
||||
|
||||
> INSERT 2 : 4 @ 2
|
||||
|
||||
|
@ -23,19 +23,39 @@
|
||||
|
||||
> DELETE 4 @ 4 : 5
|
||||
|
||||
> CHANGE 55 : 56 @ 55 : 56
|
||||
> INSERT 5 : 7 @ 5
|
||||
|
||||
+ public static boolean disableProfanityFilter = false;
|
||||
+
|
||||
|
||||
> CHANGE 50 : 51 @ 50 : 51
|
||||
|
||||
~ EaglercraftGPU.glNormal3f(0.0F, 0.0F, -1.0F * f3);
|
||||
|
||||
> INSERT 3 : 8 @ 3
|
||||
> CHANGE 3 : 13 @ 3 : 6
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ _wglDrawBuffers(_GL_COLOR_ATTACHMENT0);
|
||||
+ GlStateManager.colorMask(true, true, true, false);
|
||||
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
+ }
|
||||
~ if (DeferredStateManager.isInDeferredPass()) {
|
||||
~ _wglDrawBuffers(_GL_COLOR_ATTACHMENT0);
|
||||
~ GlStateManager.colorMask(true, true, true, false);
|
||||
~ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
|
||||
~ }
|
||||
~ IChatComponent[] signText = disableProfanityFilter ? tileentitysign.signText
|
||||
~ : tileentitysign.getSignTextProfanityFilter();
|
||||
~ for (int j = 0; j < signText.length; ++j) {
|
||||
~ if (signText[j] != null) {
|
||||
~ IChatComponent ichatcomponent = signText[j];
|
||||
|
||||
> INSERT 15 : 19 @ 15
|
||||
> CHANGE 4 : 6 @ 4 : 6
|
||||
|
||||
~ fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, j * 10 - signText.length * 5,
|
||||
~ b0);
|
||||
|
||||
> CHANGE 1 : 3 @ 1 : 3
|
||||
|
||||
~ fontrenderer.drawString(s, -fontrenderer.getStringWidth(s) / 2, j * 10 - signText.length * 5,
|
||||
~ b0);
|
||||
|
||||
> INSERT 3 : 7 @ 3
|
||||
|
||||
+ if (DeferredStateManager.isInDeferredPass()) {
|
||||
+ _wglDrawBuffers(EaglerDeferredPipeline.instance.gBufferDrawBuffers);
|
||||
|
@ -34,20 +34,22 @@
|
||||
~ return EagRuntime
|
||||
~ .getResourceStream("/assets/" + location.getResourceDomain() + "/" + location.getResourcePath());
|
||||
|
||||
> CHANGE 3 : 4 @ 3 : 5
|
||||
> CHANGE 2 : 5 @ 2 : 5
|
||||
|
||||
~ return this.getResourceStream(resourcelocation) != null;
|
||||
~ public boolean resourceExists(ResourceLocation location) {
|
||||
~ return EagRuntime
|
||||
~ .getResourceExists("/assets/" + location.getResourceDomain() + "/" + location.getResourcePath());
|
||||
|
||||
> CHANGE 9 : 11 @ 9 : 11
|
||||
|
||||
~ return AbstractResourcePack.readMetadata(parIMetadataSerializer,
|
||||
~ EagRuntime.getResourceStream("pack.mcmeta"), parString1);
|
||||
~ EagRuntime.getRequiredResourceStream("pack.mcmeta"), parString1);
|
||||
|
||||
> DELETE 2 @ 2 : 4
|
||||
|
||||
> CHANGE 3 : 5 @ 3 : 6
|
||||
|
||||
~ public ImageData getPackImage() throws IOException {
|
||||
~ return TextureUtil.readBufferedImage(EagRuntime.getResourceStream("pack.png"));
|
||||
~ return TextureUtil.readBufferedImage(EagRuntime.getRequiredResourceStream("pack.png"));
|
||||
|
||||
> EOF
|
||||
|
@ -31,7 +31,7 @@
|
||||
|
||||
> INSERT 7 : 9 @ 7
|
||||
|
||||
+ private static final Set<String> hasShownMissing = new HashSet();
|
||||
+ private static final Set<String> hasShownMissing = new HashSet<>();
|
||||
+
|
||||
|
||||
> CHANGE 4 : 5 @ 4 : 5
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> INSERT 3 : 27 @ 3
|
||||
> INSERT 3 : 31 @ 3
|
||||
|
||||
+
|
||||
+ import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager;
|
||||
@ -34,12 +34,16 @@
|
||||
+ import net.lax1dude.eaglercraft.v1_8.EaglerZLIB;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
+ 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.dynamiclights.DynamicLightsStateManager;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.recording.EnumScreenRecordingCodec;
|
||||
+ import net.lax1dude.eaglercraft.v1_8.recording.ScreenRecordingController;
|
||||
|
||||
> DELETE 5 @ 5 : 7
|
||||
|
||||
@ -91,7 +95,7 @@
|
||||
|
||||
~ public int guiScale = 3;
|
||||
|
||||
> INSERT 3 : 18 @ 3
|
||||
> INSERT 3 : 22 @ 3
|
||||
|
||||
+ public boolean hudFps = true;
|
||||
+ public boolean hudCoords = true;
|
||||
@ -108,14 +112,26 @@
|
||||
+ public boolean enableUpdateSvc = true;
|
||||
+ public boolean enableFNAWSkins = true;
|
||||
+ public boolean enableDynamicLights = false;
|
||||
+ public boolean hasHiddenPhishWarning = false;
|
||||
+ public boolean enableProfanityFilter = false;
|
||||
+ public boolean hasShownProfanityFilter = false;
|
||||
+ public float touchControlOpacity = 1.0f;
|
||||
|
||||
> CHANGE 1 : 7 @ 1 : 2
|
||||
> CHANGE 1 : 15 @ 1 : 2
|
||||
|
||||
~ public int voiceListenRadius = 16;
|
||||
~ public float voiceListenVolume = 0.5f;
|
||||
~ public float voiceSpeakVolume = 0.5f;
|
||||
~ public int voicePTTKey = 47; // V
|
||||
~
|
||||
~ public EnumScreenRecordingCodec screenRecordCodec;
|
||||
~ public int screenRecordFPS = ScreenRecordingController.DEFAULT_FPS;
|
||||
~ public int screenRecordResolution = ScreenRecordingController.DEFAULT_RESOLUTION;
|
||||
~ public int screenRecordAudioBitrate = ScreenRecordingController.DEFAULT_AUDIO_BITRATE;
|
||||
~ public int screenRecordVideoBitrate = ScreenRecordingController.DEFAULT_VIDEO_BITRATE;
|
||||
~ public float screenRecordGameVolume = ScreenRecordingController.DEFAULT_GAME_VOLUME;
|
||||
~ public float screenRecordMicVolume = ScreenRecordingController.DEFAULT_MIC_VOLUME;
|
||||
~
|
||||
~ public GameSettings(Minecraft mcIn) {
|
||||
|
||||
> CHANGE 4 : 6 @ 4 : 7
|
||||
@ -133,13 +149,10 @@
|
||||
~ this.gammaSetting = 1.0F;
|
||||
~ this.language = EagRuntime.getConfiguration().getDefaultLocale();
|
||||
|
||||
> CHANGE 2 : 3 @ 2 : 8
|
||||
|
||||
~ GameSettings.Options.RENDER_DISTANCE.setValueMax(18.0F);
|
||||
|
||||
> CHANGE 1 : 2 @ 1 : 2
|
||||
> CHANGE 2 : 4 @ 2 : 10
|
||||
|
||||
~ this.renderDistanceChunks = 4;
|
||||
~ this.screenRecordCodec = ScreenRecordingController.getDefaultCodec();
|
||||
|
||||
> DELETE 3 @ 3 : 18
|
||||
|
||||
@ -147,55 +160,106 @@
|
||||
|
||||
~ : HString.format("%c", new Object[] { Character.valueOf((char) (parInt1 - 256)) })
|
||||
|
||||
> DELETE 76 @ 76 : 99
|
||||
> CHANGE 5 : 7 @ 5 : 6
|
||||
|
||||
~ : (parKeyBinding.getKeyCode() < 0
|
||||
~ ? PointerInputAbstraction.getVCursorButtonDown(parKeyBinding.getKeyCode() + 100)
|
||||
|
||||
> CHANGE 71 : 73 @ 71 : 73
|
||||
|
||||
~ if (parOptions == GameSettings.Options.EAGLER_TOUCH_CONTROL_OPACITY) {
|
||||
~ this.touchControlOpacity = parFloat1;
|
||||
|
||||
> DELETE 1 @ 1 : 20
|
||||
|
||||
> INSERT 35 : 37 @ 35
|
||||
|
||||
+ this.mc.loadingScreen.eaglerShow(I18n.format("resourcePack.load.refreshing"),
|
||||
+ I18n.format("resourcePack.load.pleaseWait"));
|
||||
|
||||
> DELETE 18 @ 18 : 38
|
||||
> CHANGE 18 : 20 @ 18 : 20
|
||||
|
||||
> DELETE 20 @ 20 : 37
|
||||
~ if (parOptions == GameSettings.Options.CHAT_COLOR) {
|
||||
~ this.chatColours = !this.chatColours;
|
||||
|
||||
> INSERT 13 : 67 @ 13
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (parOptions == GameSettings.Options.CHAT_LINKS) {
|
||||
~ this.chatLinks = !this.chatLinks;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (parOptions == GameSettings.Options.CHAT_LINKS_PROMPT) {
|
||||
~ this.chatLinksPrompt = !this.chatLinksPrompt;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (parOptions == GameSettings.Options.SNOOPER_ENABLED) {
|
||||
~ this.snooperEnabled = !this.snooperEnabled;
|
||||
|
||||
> CHANGE 2 : 5 @ 2 : 4
|
||||
|
||||
~ if (parOptions == GameSettings.Options.BLOCK_ALTERNATIVES) {
|
||||
~ this.allowBlockAlternatives = !this.allowBlockAlternatives;
|
||||
~ this.mc.renderGlobal.loadRenderers();
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (parOptions == GameSettings.Options.REDUCED_DEBUG_INFO) {
|
||||
~ this.reducedDebugInfo = !this.reducedDebugInfo;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (parOptions == GameSettings.Options.ENTITY_SHADOWS) {
|
||||
~ this.field_181151_V = !this.field_181151_V;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (parOptions == GameSettings.Options.HUD_FPS) {
|
||||
~ this.hudFps = !this.hudFps;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (parOptions == GameSettings.Options.HUD_COORDS) {
|
||||
~ this.hudCoords = !this.hudCoords;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (parOptions == GameSettings.Options.HUD_PLAYER) {
|
||||
~ this.hudPlayer = !this.hudPlayer;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 7
|
||||
|
||||
~ if (parOptions == GameSettings.Options.HUD_STATS) {
|
||||
~ this.hudStats = !this.hudStats;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 5
|
||||
|
||||
~ if (parOptions == GameSettings.Options.HUD_WORLD) {
|
||||
~ this.hudWorld = !this.hudWorld;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 5
|
||||
|
||||
~ if (parOptions == GameSettings.Options.HUD_24H) {
|
||||
~ this.hud24h = !this.hud24h;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 5
|
||||
|
||||
~ if (parOptions == GameSettings.Options.CHUNK_FIX) {
|
||||
~ this.chunkFix = !this.chunkFix;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (parOptions == GameSettings.Options.FOG) {
|
||||
~ this.fog = !this.fog;
|
||||
|
||||
> CHANGE 2 : 4 @ 2 : 4
|
||||
|
||||
~ if (parOptions == GameSettings.Options.FXAA) {
|
||||
~ this.fxaa = (this.fxaa + parInt1) % 3;
|
||||
|
||||
> INSERT 2 : 24 @ 2
|
||||
|
||||
+ if (parOptions == GameSettings.Options.HUD_FPS) {
|
||||
+ this.hudFps = !this.hudFps;
|
||||
+ }
|
||||
+
|
||||
+ if (parOptions == GameSettings.Options.HUD_COORDS) {
|
||||
+ this.hudCoords = !this.hudCoords;
|
||||
+ }
|
||||
+
|
||||
+ if (parOptions == GameSettings.Options.HUD_PLAYER) {
|
||||
+ this.hudPlayer = !this.hudPlayer;
|
||||
+ }
|
||||
+
|
||||
+ if (parOptions == GameSettings.Options.HUD_STATS) {
|
||||
+ this.hudStats = !this.hudStats;
|
||||
+ }
|
||||
+
|
||||
+ if (parOptions == GameSettings.Options.HUD_WORLD) {
|
||||
+ this.hudWorld = !this.hudWorld;
|
||||
+ }
|
||||
+
|
||||
+ if (parOptions == GameSettings.Options.HUD_24H) {
|
||||
+ this.hud24h = !this.hud24h;
|
||||
+ }
|
||||
+
|
||||
+ if (parOptions == GameSettings.Options.CHUNK_FIX) {
|
||||
+ this.chunkFix = !this.chunkFix;
|
||||
+ }
|
||||
+
|
||||
+ if (parOptions == GameSettings.Options.FOG) {
|
||||
+ this.fog = !this.fog;
|
||||
+ }
|
||||
+
|
||||
+ if (parOptions == GameSettings.Options.FXAA) {
|
||||
+ this.fxaa = (this.fxaa + parInt1) % 3;
|
||||
+ }
|
||||
+
|
||||
+ if (parOptions == GameSettings.Options.FULLSCREEN) {
|
||||
+ this.mc.toggleFullscreen();
|
||||
+ }
|
||||
@ -214,16 +278,20 @@
|
||||
+ this.mc.renderGlobal.loadRenderers();
|
||||
+ }
|
||||
+
|
||||
+ if (parOptions == GameSettings.Options.EAGLER_PROFANITY_FILTER) {
|
||||
+ this.enableProfanityFilter = !this.enableProfanityFilter;
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 23 : 24 @ 23 : 34
|
||||
> CHANGE 23 : 26 @ 23 : 34
|
||||
|
||||
~ : 0.0F)))))))))));
|
||||
~ : (parOptions == GameSettings.Options.EAGLER_TOUCH_CONTROL_OPACITY
|
||||
~ ? this.touchControlOpacity
|
||||
~ : 0.0F))))))))))));
|
||||
|
||||
> DELETE 20 @ 20 : 26
|
||||
> DELETE 20 @ 20 : 30
|
||||
|
||||
> DELETE 2 @ 2 : 4
|
||||
|
||||
> INSERT 8 : 32 @ 8
|
||||
> INSERT 8 : 34 @ 8
|
||||
|
||||
+ case HUD_COORDS:
|
||||
+ return this.hudCoords;
|
||||
@ -249,6 +317,8 @@
|
||||
+ return this.enableVsync;
|
||||
+ case EAGLER_DYNAMIC_LIGHTS:
|
||||
+ return this.enableDynamicLights;
|
||||
+ case EAGLER_PROFANITY_FILTER:
|
||||
+ return this.enableProfanityFilter;
|
||||
|
||||
> CHANGE 43 : 46 @ 43 : 47
|
||||
|
||||
@ -264,7 +334,7 @@
|
||||
|
||||
~ .calculateChatboxHeight(
|
||||
|
||||
> CHANGE 2 : 21 @ 2 : 36
|
||||
> CHANGE 2 : 25 @ 2 : 36
|
||||
|
||||
~ : (parOptions == GameSettings.Options.CHAT_WIDTH
|
||||
~ ? s + GuiNewChat
|
||||
@ -284,7 +354,11 @@
|
||||
~ : s + (int) (f
|
||||
~ * 100.0F)
|
||||
~ + "%")
|
||||
~ : "yee"))))))))))));
|
||||
~ : (parOptions == GameSettings.Options.EAGLER_TOUCH_CONTROL_OPACITY
|
||||
~ ? (s + (int) (f
|
||||
~ * 100.0F)
|
||||
~ + "%")
|
||||
~ : "yee")))))))))))));
|
||||
|
||||
> DELETE 11 @ 11 : 19
|
||||
|
||||
@ -354,7 +428,9 @@
|
||||
|
||||
> DELETE 3 @ 3 : 7
|
||||
|
||||
> CHANGE 52 : 54 @ 52 : 54
|
||||
> DELETE 12 @ 12 : 16
|
||||
|
||||
> CHANGE 36 : 38 @ 36 : 38
|
||||
|
||||
~ if (astring[0].equals("forceUnicodeFont")) {
|
||||
~ this.forceUnicodeFont = astring[1].equals("true");
|
||||
@ -459,7 +535,7 @@
|
||||
|
||||
~ for (EnumPlayerModelParts enumplayermodelparts : EnumPlayerModelParts._VALUES) {
|
||||
|
||||
> INSERT 4 : 14 @ 4
|
||||
> INSERT 4 : 66 @ 4
|
||||
|
||||
+
|
||||
+ if (astring[0].equals("enableFNAWSkins")) {
|
||||
@ -470,17 +546,79 @@
|
||||
+ this.enableDynamicLights = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("hasHiddenPhishWarning")) {
|
||||
+ this.hasHiddenPhishWarning = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("enableProfanityFilter")) {
|
||||
+ this.enableProfanityFilter = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("hasShownProfanityFilter")) {
|
||||
+ this.hasShownProfanityFilter = astring[1].equals("true");
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("screenRecordCodec")) {
|
||||
+ EnumScreenRecordingCodec codec = EnumScreenRecordingCodec.valueOf(astring[1]);
|
||||
+ if (!ScreenRecordingController.codecs.contains(codec)) {
|
||||
+ throw new IllegalStateException("Selected codec is not supported: " + codec.name);
|
||||
+ }
|
||||
+ screenRecordCodec = codec;
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("screenRecordFPS")) {
|
||||
+ screenRecordFPS = Integer.parseInt(astring[1]);
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("screenRecordFPS")) {
|
||||
+ screenRecordFPS = Integer.parseInt(astring[1]);
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("screenRecordResolution")) {
|
||||
+ screenRecordResolution = Integer.parseInt(astring[1]);
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("screenRecordAudioBitrate")) {
|
||||
+ screenRecordAudioBitrate = Integer.parseInt(astring[1]);
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("screenRecordVideoBitrate")) {
|
||||
+ screenRecordVideoBitrate = Integer.parseInt(astring[1]);
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("screenRecordGameVolume")) {
|
||||
+ screenRecordGameVolume = parseFloat(astring[1]);
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("screenRecordMicVolume")) {
|
||||
+ screenRecordMicVolume = parseFloat(astring[1]);
|
||||
+ }
|
||||
+
|
||||
+ if (astring[0].equals("touchControlOpacity")) {
|
||||
+ touchControlOpacity = parseFloat(astring[1]);
|
||||
+ }
|
||||
+
|
||||
+ deferredShaderConf.readOption(astring[0], astring[1]);
|
||||
|
||||
> CHANGE 6 : 13 @ 6 : 7
|
||||
> CHANGE 6 : 23 @ 6 : 7
|
||||
|
||||
~
|
||||
~ Keyboard.setFunctionKeyModifier(keyBindFunction.getKeyCode());
|
||||
~ VoiceClientController.setVoiceListenVolume(voiceListenVolume);
|
||||
~ VoiceClientController.setVoiceSpeakVolume(voiceSpeakVolume);
|
||||
~ VoiceClientController.setVoiceProximity(voiceListenRadius);
|
||||
~ ScreenRecordingController.setGameVolume(screenRecordGameVolume);
|
||||
~ ScreenRecordingController.setMicrophoneVolume(screenRecordMicVolume);
|
||||
~ if (this.mc.getRenderManager() != null)
|
||||
~ this.mc.getRenderManager().setEnableFNAWSkins(this.enableFNAWSkins);
|
||||
~ if (this.shaders && !EaglerDeferredPipeline.isSupported()) {
|
||||
~ logger.error("Setting shaders to false because they are not supported");
|
||||
~ this.shaders = false;
|
||||
~ }
|
||||
~ if (this.enableDynamicLights && !DynamicLightsStateManager.isSupported()) {
|
||||
~ logger.error("Setting dynamic lights to false because they are not supported");
|
||||
~ this.enableDynamicLights = false;
|
||||
~ }
|
||||
|
||||
> CHANGE 1 : 3 @ 1 : 2
|
||||
|
||||
@ -519,9 +657,11 @@
|
||||
|
||||
~ printwriter.println("enableVsyncEag:" + this.enableVsync);
|
||||
|
||||
> DELETE 13 @ 13 : 24
|
||||
> DELETE 3 @ 3 : 4
|
||||
|
||||
> INSERT 5 : 22 @ 5
|
||||
> DELETE 9 @ 9 : 20
|
||||
|
||||
> INSERT 5 : 35 @ 5
|
||||
|
||||
+ printwriter.println("hudFps:" + this.hudFps);
|
||||
+ printwriter.println("hudWorld:" + this.hudWorld);
|
||||
@ -540,6 +680,19 @@
|
||||
+ printwriter.println("voicePTTKey:" + this.voicePTTKey);
|
||||
+ printwriter.println("enableFNAWSkins:" + this.enableFNAWSkins);
|
||||
+ printwriter.println("enableDynamicLights:" + this.enableDynamicLights);
|
||||
+ printwriter.println("hasHiddenPhishWarning:" + this.hasHiddenPhishWarning);
|
||||
+ printwriter.println("enableProfanityFilter:" + this.enableProfanityFilter);
|
||||
+ printwriter.println("hasShownProfanityFilter:" + this.hasShownProfanityFilter);
|
||||
+ if (screenRecordCodec != null) {
|
||||
+ printwriter.println("screenRecordCodec:" + this.screenRecordCodec);
|
||||
+ }
|
||||
+ printwriter.println("screenRecordFPS:" + this.screenRecordFPS);
|
||||
+ printwriter.println("screenRecordResolution:" + this.screenRecordResolution);
|
||||
+ printwriter.println("screenRecordAudioBitrate:" + this.screenRecordAudioBitrate);
|
||||
+ printwriter.println("screenRecordVideoBitrate:" + this.screenRecordVideoBitrate);
|
||||
+ printwriter.println("screenRecordGameVolume:" + this.screenRecordGameVolume);
|
||||
+ printwriter.println("screenRecordMicVolume:" + this.screenRecordMicVolume);
|
||||
+ printwriter.println("touchControlOpacity:" + this.touchControlOpacity);
|
||||
|
||||
> CHANGE 5 : 8 @ 5 : 6
|
||||
|
||||
@ -568,11 +721,7 @@
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 5 : 6 @ 5 : 6
|
||||
|
||||
~ : (parSoundCategory == SoundCategory.VOICE ? 0.0F : 1.0F);
|
||||
|
||||
> CHANGE 16 : 17 @ 16 : 17
|
||||
> CHANGE 22 : 23 @ 22 : 23
|
||||
|
||||
~ Math.max(this.renderDistanceChunks, 2), this.chatVisibility, this.chatColours, i));
|
||||
|
||||
@ -591,12 +740,9 @@
|
||||
|
||||
~ RENDER_DISTANCE("options.renderDistance", true, false, 1.0F, 18.0F, 1.0F),
|
||||
|
||||
> CHANGE 8 : 10 @ 8 : 12
|
||||
> DELETE 8 @ 8 : 10
|
||||
|
||||
~ TOUCHSCREEN("options.touchscreen", false, true), CHAT_SCALE("options.chat.scale", true, false),
|
||||
~ CHAT_WIDTH("options.chat.width", true, false), CHAT_HEIGHT_FOCUSED("options.chat.height.focused", true, false),
|
||||
|
||||
> CHANGE 14 : 22 @ 14 : 15
|
||||
> CHANGE 16 : 26 @ 16 : 17
|
||||
|
||||
~ ENTITY_SHADOWS("options.entityShadows", false, true), HUD_FPS("options.hud.fps", false, true),
|
||||
~ HUD_COORDS("options.hud.coords", false, true), HUD_STATS("options.hud.stats", false, true),
|
||||
@ -605,6 +751,8 @@
|
||||
~ FOG("options.fog", false, true), FXAA("options.fxaa", false, false),
|
||||
~ FULLSCREEN("options.fullscreen", false, true),
|
||||
~ FNAW_SKINS("options.skinCustomisation.enableFNAWSkins", false, true),
|
||||
~ EAGLER_VSYNC("options.vsync", false, true), EAGLER_DYNAMIC_LIGHTS("options.dynamicLights", false, true);
|
||||
~ EAGLER_VSYNC("options.vsync", false, true), EAGLER_DYNAMIC_LIGHTS("options.dynamicLights", false, true),
|
||||
~ EAGLER_PROFANITY_FILTER("options.profanityFilterButton", false, true),
|
||||
~ EAGLER_TOUCH_CONTROL_OPACITY("options.touchControlOpacity", true, false);
|
||||
|
||||
> EOF
|
||||
|
@ -5,21 +5,23 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> CHANGE 3 : 9 @ 3 : 5
|
||||
> CHANGE 3 : 10 @ 3 : 5
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.HString;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DynamicLightManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.profanity_filter.ProfanityFilter;
|
||||
~
|
||||
|
||||
> INSERT 1 : 2 @ 1
|
||||
|
||||
+
|
||||
|
||||
> INSERT 8 : 9 @ 8
|
||||
> INSERT 8 : 10 @ 8
|
||||
|
||||
+ import net.minecraft.client.Minecraft;
|
||||
+ import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
|
||||
|
||||
> DELETE 6 @ 6 : 9
|
||||
@ -36,7 +38,17 @@
|
||||
|
||||
~ this.rand = new EaglercraftRandom();
|
||||
|
||||
> CHANGE 294 : 296 @ 294 : 295
|
||||
> DELETE 100 @ 100 : 101
|
||||
|
||||
> DELETE 11 @ 11 : 12
|
||||
|
||||
> DELETE 32 @ 32 : 34
|
||||
|
||||
> DELETE 35 @ 35 : 36
|
||||
|
||||
> DELETE 44 @ 44 : 45
|
||||
|
||||
> CHANGE 66 : 68 @ 66 : 67
|
||||
|
||||
~ List<AxisAlignedBB> list1 = this.worldObj.getCollidingBoundingBoxes(this,
|
||||
~ this.getEntityBoundingBox().addCoord(x, y, z));
|
||||
@ -95,7 +107,11 @@
|
||||
~ for (int i = 0, l = list.size(); i < l; ++i) {
|
||||
~ y = list.get(i).calculateYOffset(this.getEntityBoundingBox(), y);
|
||||
|
||||
> CHANGE 347 : 353 @ 347 : 348
|
||||
> DELETE 11 @ 11 : 13
|
||||
|
||||
> DELETE 93 @ 93 : 95
|
||||
|
||||
> CHANGE 239 : 245 @ 239 : 240
|
||||
|
||||
~ int i = 0;
|
||||
~ if (DynamicLightsStateManager.isDynamicLightsRender()) {
|
||||
@ -135,15 +151,74 @@
|
||||
|
||||
~ for (AxisAlignedBB axisalignedbb : (List<AxisAlignedBB>) list) {
|
||||
|
||||
> CHANGE 256 : 257 @ 256 : 257
|
||||
> INSERT 229 : 242 @ 229
|
||||
|
||||
+ public String getNameProfanityFilter() {
|
||||
+ if (this.hasCustomName()) {
|
||||
+ return this.getCustomNameTagProfanityFilter();
|
||||
+ } else {
|
||||
+ String s = EntityList.getEntityString(this);
|
||||
+ if (s == null) {
|
||||
+ s = "generic";
|
||||
+ }
|
||||
+
|
||||
+ return StatCollector.translateToLocal("entity." + s + ".name");
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> CHANGE 27 : 28 @ 27 : 28
|
||||
|
||||
~ return HString.format("%s[\'%s\'/%d, l=\'%s\', x=%.2f, y=%.2f, z=%.2f]",
|
||||
|
||||
> CHANGE 121 : 122 @ 121 : 122
|
||||
> DELETE 26 @ 26 : 27
|
||||
|
||||
> DELETE 12 @ 12 : 13
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 12 @ 12 : 13
|
||||
|
||||
> DELETE 2 @ 2 : 3
|
||||
|
||||
> CHANGE 63 : 64 @ 63 : 64
|
||||
|
||||
~ public EaglercraftUUID getUniqueID() {
|
||||
|
||||
> INSERT 151 : 205 @ 151
|
||||
> INSERT 14 : 21 @ 14
|
||||
|
||||
+ public IChatComponent getDisplayNameProfanityFilter() {
|
||||
+ ChatComponentText chatcomponenttext = new ChatComponentText(this.getNameProfanityFilter());
|
||||
+ chatcomponenttext.getChatStyle().setChatHoverEvent(this.getHoverEvent());
|
||||
+ chatcomponenttext.getChatStyle().setInsertion(this.getUniqueID().toString());
|
||||
+ return chatcomponenttext;
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 8 : 28 @ 8
|
||||
|
||||
+ private String lastNameTagForFilter = null;
|
||||
+ private String lastFilteredNameTagForFilter = null;
|
||||
+
|
||||
+ public String getCustomNameTagProfanityFilter() {
|
||||
+ if (Minecraft.getMinecraft().isEnableProfanityFilter()) {
|
||||
+ String str = getCustomNameTag();
|
||||
+ if (str != null) {
|
||||
+ if (!str.equals(lastNameTagForFilter)) {
|
||||
+ lastNameTagForFilter = str;
|
||||
+ lastFilteredNameTagForFilter = ProfanityFilter.getInstance().profanityFilterString(str);
|
||||
+ }
|
||||
+ return lastFilteredNameTagForFilter;
|
||||
+ } else {
|
||||
+ return null;
|
||||
+ }
|
||||
+ } else {
|
||||
+ return getCustomNameTag();
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
||||
> INSERT 129 : 183 @ 129
|
||||
|
||||
+
|
||||
+ public void renderDynamicLightsEagler(float partialTicks, boolean isInFrustum) {
|
||||
|
@ -13,14 +13,47 @@
|
||||
|
||||
> DELETE 1 @ 1 : 8
|
||||
|
||||
> CHANGE 316 : 320 @ 316 : 318
|
||||
> CHANGE 56 : 58 @ 56 : 59
|
||||
|
||||
~ this.tasks = new EntityAITasks();
|
||||
~ this.targetTasks = new EntityAITasks();
|
||||
|
||||
> DELETE 76 @ 76 : 77
|
||||
|
||||
> DELETE 4 @ 4 : 6
|
||||
|
||||
> DELETE 171 @ 171 : 172
|
||||
|
||||
> CHANGE 2 : 6 @ 2 : 4
|
||||
|
||||
~ List<EntityItem> lst = this.worldObj.getEntitiesWithinAABB(EntityItem.class,
|
||||
~ this.getEntityBoundingBox().expand(1.0D, 0.0D, 1.0D));
|
||||
~ for (int i = 0, l = lst.size(); i < l; ++i) {
|
||||
~ EntityItem entityitem = lst.get(i);
|
||||
|
||||
> CHANGE 497 : 499 @ 497 : 498
|
||||
> DELETE 5 @ 5 : 7
|
||||
|
||||
> DELETE 98 @ 98 : 99
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> DELETE 1 @ 1 : 4
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> CHANGE 365 : 367 @ 365 : 366
|
||||
|
||||
~ EaglercraftUUID uuid = new EaglercraftUUID(this.leashNBTTag.getLong("UUIDMost"),
|
||||
~ this.leashNBTTag.getLong("UUIDLeast"));
|
||||
|
@ -25,7 +25,11 @@
|
||||
~ private static final EaglercraftUUID sprintingSpeedBoostModifierUUID = EaglercraftUUID
|
||||
~ .fromString("662A6B8D-DA3E-4C1C-8813-96EA6097278D");
|
||||
|
||||
> CHANGE 264 : 265 @ 264 : 265
|
||||
> DELETE 120 @ 120 : 121
|
||||
|
||||
> DELETE 88 @ 88 : 89
|
||||
|
||||
> CHANGE 54 : 55 @ 54 : 55
|
||||
|
||||
~ public EaglercraftRandom getRNG() {
|
||||
|
||||
@ -40,7 +44,27 @@
|
||||
~ for (int i = 0; i < inv.length; ++i) {
|
||||
~ ItemStack itemstack1 = inv[i];
|
||||
|
||||
> INSERT 1254 : 1277 @ 1254
|
||||
> DELETE 941 @ 941 : 942
|
||||
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> DELETE 33 @ 33 : 34
|
||||
|
||||
> DELETE 62 @ 62 : 63
|
||||
|
||||
> DELETE 6 @ 6 : 7
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> DELETE 2 @ 2 : 4
|
||||
|
||||
> DELETE 13 @ 13 : 15
|
||||
|
||||
> DELETE 4 @ 4 : 6
|
||||
|
||||
> DELETE 3 @ 3 : 5
|
||||
|
||||
> INSERT 173 : 196 @ 173
|
||||
|
||||
+
|
||||
+ protected void renderDynamicLightsEaglerAt(double entityX, double entityY, double entityZ, double renderX,
|
||||
@ -59,7 +83,7 @@
|
||||
+ if (itm != null && itm.stackSize > 0) {
|
||||
+ Item item = itm.getItem();
|
||||
+ if (item != null) {
|
||||
+ float f2 = item.getHeldItemBrightnessEagler();
|
||||
+ float f2 = item.getHeldItemBrightnessEagler(itm);
|
||||
+ f = Math.min(f + f2 * 0.5f, 1.0f) + f2 * 0.5f;
|
||||
+ }
|
||||
+ }
|
||||
|
@ -5,19 +5,25 @@
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> DELETE 5 @ 5 : 6
|
||||
|
||||
> CHANGE 1 : 3 @ 1 : 3
|
||||
> CHANGE 5 : 7 @ 5 : 9
|
||||
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
|
||||
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
|
||||
|
||||
> CHANGE 84 : 86 @ 84 : 86
|
||||
> DELETE 5 @ 5 : 6
|
||||
|
||||
> DELETE 3 @ 3 : 7
|
||||
|
||||
> DELETE 24 @ 24 : 25
|
||||
|
||||
> CHANGE 43 : 45 @ 43 : 48
|
||||
|
||||
~ for (int i = 0, l = this.executingTaskEntries.size(); i < l; ++i) {
|
||||
~ this.executingTaskEntries.get(i).action.updateTask();
|
||||
|
||||
> CHANGE 11 : 13 @ 11 : 12
|
||||
> DELETE 1 @ 1 : 3
|
||||
|
||||
> CHANGE 8 : 10 @ 8 : 9
|
||||
|
||||
~ for (int i = 0, l = this.taskEntries.size(); i < l; ++i) {
|
||||
~ EntityAITasks.EntityAITaskEntry entityaitasks$entityaitaskentry = this.taskEntries.get(i);
|
||||
|
@ -0,0 +1,12 @@
|
||||
|
||||
# Eagler Context Redacted Diff
|
||||
# Copyright (c) 2024 lax1dude. All rights reserved.
|
||||
|
||||
# Version: 1.0
|
||||
# Author: lax1dude
|
||||
|
||||
> DELETE 27 @ 27 : 28
|
||||
|
||||
> DELETE 1 @ 1 : 2
|
||||
|
||||
> EOF
|
@ -43,7 +43,7 @@
|
||||
+ if (itm != null && itm.stackSize > 0) {
|
||||
+ Item item = itm.getItem();
|
||||
+ if (item != null) {
|
||||
+ float f2 = item.getHeldItemBrightnessEagler() * 0.75f;
|
||||
+ float f2 = item.getHeldItemBrightnessEagler(itm) * 0.75f;
|
||||
+ f = Math.min(f + f2 * 0.5f, 1.0f) + f2 * 0.5f;
|
||||
+ }
|
||||
+ }
|
||||
|
@ -31,7 +31,7 @@
|
||||
+ if (itm != null && itm.stackSize > 0) {
|
||||
+ Item item = itm.getItem();
|
||||
+ if (item != null) {
|
||||
+ float f2 = item.getHeldItemBrightnessEagler() * 0.75f;
|
||||
+ float f2 = item.getHeldItemBrightnessEagler(itm) * 0.75f;
|
||||
+ f = Math.min(f + f2 * 0.5f, 1.0f) + f2 * 0.5f;
|
||||
+ }
|
||||
+ }
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user