diff --git a/CODE_STANDARDS.md b/CODE_STANDARDS.md deleted file mode 100755 index ed30f2a..0000000 --- a/CODE_STANDARDS.md +++ /dev/null @@ -1,306 +0,0 @@ -# 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 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 list1 = Arrays.asList("eagler", "eagler", "deevis"); -List list2 = Lists.newArrayList( - Collections2.transform( - Collections2.filter( - list1, - (e) -> !e.equals("deevis") - ), - (e) -> (e + "!") - ) -); -``` - -**Correct, creates no temporary objects:** - -```java -List list1 = Arrays.asList("eagler", "eagler", "deevis"); -List 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! diff --git a/build.gradle b/build.gradle index acbf07f..bf5b71c 100755 --- a/build.gradle +++ b/build.gradle @@ -42,6 +42,7 @@ def folder = "javascript" def name = "classes.js" teavm.js { + compileJava.options.encoding = "UTF-8" obfuscated = true sourceMap = true targetFileName = "../" + name diff --git a/desktopRuntime/resources/EPKVersionIdentifier.txt b/desktopRuntime/resources/EPKVersionIdentifier.txt index a7b28f6..6a4763a 100755 --- a/desktopRuntime/resources/EPKVersionIdentifier.txt +++ b/desktopRuntime/resources/EPKVersionIdentifier.txt @@ -1 +1 @@ -u49 \ No newline at end of file +u50 \ No newline at end of file diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/accel_particle_forward.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/accel_particle_forward.fsh index 554b324..eba9c2c 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/accel_particle_forward.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/accel_particle_forward.fsh @@ -83,6 +83,7 @@ uniform sampler2D u_metalsLUT; #define LIB_INCLUDE_PBR_LIGHTING_FUNCTION #define LIB_INCLUDE_PBR_LIGHTING_PREFETCH #EAGLER INCLUDE (3) "eagler:glsl/deferred/lib/pbr_lighting.glsl" +#EAGLER INCLUDE (4) "eagler:glsl/deferred/lib/branchless_comparison.glsl" uniform sampler2D u_irradianceMap; @@ -139,14 +140,14 @@ void main() { float skyLight = max(lightmapCoords2f.g * 2.0 - 1.0, 0.0); float shadowSample = 1.0; vec4 shadowWorldPos4f = worldPosition4f; - shadowWorldPos4f.xyz += normalVector3f * 0.05; + shadowWorldPos4f.xyz += normalVector3f * 0.1; vec4 shadowTexPos4f; vec2 tmpVec2; for(;;) { shadowTexPos4f = u_sunShadowMatrixLOD04f * shadowWorldPos4f; if(shadowTexPos4f.xyz == clamp(shadowTexPos4f.xyz, vec3(0.005), vec3(0.995))) { - shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowTexPos4f.xy * vec2(1.0, SUN_SHADOW_MAP_FRAC), shadowTexPos4f.z), 0.0); + shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowTexPos4f.xy * vec2(1.0, SUN_SHADOW_MAP_FRAC), shadowTexPos4f.z + 0.0001), 0.0); break; } @@ -175,7 +176,7 @@ void main() { #ifdef DO_COMPILE_SUN_SHADOWS lightColor3f *= shadowSample * skyLight; #endif - vec3 normalWrap3f = normalVector3f * (dot(-worldDirection4f.xyz, normalVector3f) < 0.0 ? -1.0 : 1.0); + vec3 normalWrap3f = normalVector3f * COMPARE_LT_C_C(dot(-worldDirection4f.xyz, normalVector3f), 0.0, -1.0, 1.0); lightColor3f = eaglercraftLighting(diffuseColor4f.rgb, lightColor3f, -worldDirection4f.xyz, u_sunDirection4f.xyz, normalWrap3f, materialData3f, metalN, metalK) * u_blockSkySunDynamicLightFac4f.z; } @@ -194,8 +195,8 @@ void main() { vec4 sample2 = textureLod(u_irradianceMap, irradianceMapSamplePos2f.xz * vec2(0.5, -0.25) + vec2(0.5, 0.75), 0.0); skyLight += mix(sample1.rgb, sample2.rgb, smoothstep(0.0, 1.0, irradianceMapSamplePos2f.y * -12.5 + 0.5)).rgb; }else { - irradianceMapSamplePos2f.xz *= vec2(0.5, irradianceMapSamplePos2f.y > 0.0 ? 0.25 : -0.25); - irradianceMapSamplePos2f.xz += vec2(0.5, irradianceMapSamplePos2f.y > 0.0 ? 0.25 : 0.75); + irradianceMapSamplePos2f.xz *= vec2(0.5, COMPARE_GT_C_C(irradianceMapSamplePos2f.y, 0.0, 0.25, -0.25)); + irradianceMapSamplePos2f.xz += vec2(0.5, COMPARE_GT_C_C(irradianceMapSamplePos2f.y, 0.0, 0.25, 0.75)); skyLight += textureLod(u_irradianceMap, irradianceMapSamplePos2f.xz, 0.0).rgb; } skyLight *= lightmapCoords2f.g * u_sunColor3f_sky1f.w; @@ -210,7 +211,7 @@ void main() { for(int i = 0; i < safeLightCount; ++i) { dlightDist3f = worldPosition4f.xyz - u_dynamicLightArray[i].u_lightPosition4f.xyz; dlightDir3f = normalize(dlightDist3f); - dlightDir3f = dlightDir3f * (dot(dlightDir3f, normalVector3f) < 0.0 ? 1.0 : -1.0); + dlightDir3f = dlightDir3f * COMPARE_LT_C_C(dot(dlightDir3f, normalVector3f), 0.0, 1.0, -1.0); dlightDir3f = materialData3f.b == 1.0 ? normalVector3f : -dlightDir3f; if(dot(dlightDir3f, normalVector3f) <= 0.0) { continue; diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/accel_particle_gbuffer.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/accel_particle_gbuffer.fsh index 317d460..0a6c529 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/accel_particle_gbuffer.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/accel_particle_gbuffer.fsh @@ -40,5 +40,6 @@ void main() { } gbufferColor4f = vec4(diffuseRGBA.rgb, v_lightmap2f.r); gbufferNormal4f = vec4(0.5, 0.5, 1.0, v_lightmap2f.g); - gbufferMaterial4f = vec4(texture(u_samplerNormalMaterial, vec2(v_texCoord2f.x, v_texCoord2f.y * u_textureYScale2f.x + u_textureYScale2f.y)).rgb, 1.0); + gbufferMaterial4f = texture(u_samplerNormalMaterial, vec2(v_texCoord2f.x, v_texCoord2f.y * u_textureYScale2f.x + u_textureYScale2f.y)); + gbufferMaterial4f.a = 0.502 - gbufferMaterial4f.a * 0.502; } diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/12_s.ebp b/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/12_s.ebp new file mode 100755 index 0000000..a9479a5 Binary files /dev/null and b/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/12_s.ebp differ diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/13_s.ebp b/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/13_s.ebp new file mode 100755 index 0000000..bc9483a Binary files /dev/null and b/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/13_s.ebp differ diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/14_s.ebp b/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/14_s.ebp new file mode 100755 index 0000000..af2403e Binary files /dev/null and b/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/14_s.ebp differ diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/15_s.ebp b/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/15_s.ebp new file mode 100755 index 0000000..3258298 Binary files /dev/null and b/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/15_s.ebp differ diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/66_s.ebp b/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/66_s.ebp new file mode 100755 index 0000000..1f4e68e Binary files /dev/null and b/desktopRuntime/resources/assets/eagler/glsl/deferred/assets_pbr/mcpatcher/ctm/default/66_s.ebp differ diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_combine.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_combine.fsh index 1e7e1ba..b48fcc6 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_combine.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_combine.fsh @@ -60,6 +60,7 @@ uniform float u_skyLightFactor1f; #endif #EAGLER INCLUDE (3) "eagler:glsl/deferred/lib/pbr_env_map.glsl" +#EAGLER INCLUDE (4) "eagler:glsl/deferred/lib/branchless_comparison.glsl" void main() { vec3 diffuseColor3f; @@ -86,7 +87,7 @@ void main() { #ifdef COMPILE_GLOBAL_AMBIENT_OCCLUSION vec4 ao = textureLod(u_ssaoTexture, min(v_position2f * u_halfResolutionPixelAlignment2f, 1.0), 0.0); - ao.g = ao.b > 0.0 ? ao.g : 1.0; + ao.g = mix(COMPARE_GT_0_1(0.0, ao.b), 1.0, ao.g); shadow = mix(shadow, shadow * ao.g, 0.9); #endif @@ -102,8 +103,8 @@ void main() { vec4 sample2 = textureLod(u_irradianceMap, irradianceMapSamplePos2f.xz * vec2(0.5, -0.25) + vec2(0.5, 0.75), 0.0); skyLight += mix(sample1.rgb, sample2.rgb, smoothstep(0.0, 1.0, irradianceMapSamplePos2f.y * -12.5 + 0.5)).rgb; }else { - irradianceMapSamplePos2f.xz *= vec2(0.5, irradianceMapSamplePos2f.y > 0.0 ? 0.25 : -0.25); - irradianceMapSamplePos2f.xz += vec2(0.5, irradianceMapSamplePos2f.y > 0.0 ? 0.25 : 0.75); + irradianceMapSamplePos2f.xz *= vec2(0.5, COMPARE_GT_C_C(irradianceMapSamplePos2f.y, 0.0, 0.25, -0.25)); + irradianceMapSamplePos2f.xz += vec2(0.5, COMPARE_GT_C_C(irradianceMapSamplePos2f.y, 0.0, 0.25, 0.75)); skyLight += textureLod(u_irradianceMap, irradianceMapSamplePos2f.xz, 0.0).rgb; } @@ -114,8 +115,8 @@ void main() { vec3 specular = vec3(0.0); #ifdef COMPILE_ENV_MAP_REFLECTIONS - float f = materialData4f.g < 0.06 ? 1.0 : 0.0; - f += materialData4f.r < 0.5 ? 1.0 : 0.0; + float f = COMPARE_LT_0_ANY(materialData4f.g, 0.06); + f += COMPARE_LT_0_ANY(materialData4f.r, 0.5); while((materialData4f.a >= 0.5 ? f : -1.0) == 0.0) { vec4 worldPosition4f = vec4(v_position2f, depth, 1.0) * 2.0 - 1.0; worldPosition4f = u_inverseProjMatrix4f * worldPosition4f; @@ -137,8 +138,8 @@ void main() { vec4 sample2 = textureLod(u_environmentMap, reflectDir.xz * vec2(0.5, -0.25) + vec2(0.5, 0.75), 0.0); envMapSample4f = vec4(mix(sample1.rgb, sample2.rgb, smoothstep(0.0, 1.0, reflectDir.y * -12.5 + 0.5)).rgb, min(sample1.a, sample2.a)); }else { - reflectDir.xz = reflectDir.xz * vec2(0.5, reflectDir.y > 0.0 ? 0.25 : -0.25); - reflectDir.xz += vec2(0.5, reflectDir.y > 0.0 ? 0.25 : 0.75); + reflectDir.xz = reflectDir.xz * vec2(0.5, COMPARE_GT_C_C(reflectDir.y, 0.0, 0.25, -0.25)); + reflectDir.xz += vec2(0.5, COMPARE_GT_C_C(reflectDir.y, 0.0, 0.25, 0.75)); envMapSample4f = textureLod(u_environmentMap, reflectDir.xz, 0.0); } envMapSample4f.a += min(lightmapCoords2f.g * 2.0, 1.0) * (1.0 - envMapSample4f.a); @@ -152,8 +153,8 @@ void main() { #ifdef COMPILE_SCREEN_SPACE_REFLECTIONS #ifndef COMPILE_ENV_MAP_REFLECTIONS - float f = materialData4f.g < 0.06 ? 1.0 : 0.0; - f += materialData4f.r < 0.5 ? 1.0 : 0.0; + float f = COMPARE_LT_0_ANY(materialData4f.g, 0.06); + f += COMPARE_LT_0_ANY(materialData4f.r, 0.5); if(f == 0.0) { #else if((materialData4f.a < 0.5 ? f : -1.0) == 0.0) { diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_core_gbuffer.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_core_gbuffer.fsh index 3e14fe3..84c57a3 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_core_gbuffer.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_core_gbuffer.fsh @@ -73,8 +73,12 @@ in vec3 v_viewdir3f; uniform vec2 u_textureCoords01; #endif #else +#ifdef COMPILE_SUBSURFACE_SCATTERING +uniform vec4 u_materialConstants4f; +#else uniform vec3 u_materialConstants3f; #endif +#endif #ifdef COMPILE_NORMAL_MATERIAL_TEXTURE mat3 cotangent_frame(in vec3 N, in vec3 p, in vec2 uv) { @@ -155,14 +159,21 @@ void main() { normal = cf * vec3(normal2, sqrt(1.0 - dot(normal2, normal2))); } uv2.y += 0.5; - vec3 material = texture(u_samplerNormalMaterial, uv2).rgb; + vec4 material = texture(u_samplerNormalMaterial, uv2); #else - vec3 material = u_materialConstants3f; +#ifdef COMPILE_SUBSURFACE_SCATTERING + vec4 material = u_materialConstants4f; +#else + vec4 material = vec4(u_materialConstants3f, 1.0); #endif +#endif + + material.a = 1.0 - material.a + u_useEnvMap1f; + material.a *= 0.502; gbufferColor4f.rgb = color.rgb; gbufferColor4f.a = lightmap.r; gbufferNormal4f.rgb = normal * 0.5 + 0.5; gbufferNormal4f.a = lightmap.g; - gbufferMaterial4f = vec4(material.rgb, u_useEnvMap1f); + gbufferMaterial4f = material; } diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_fog.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_fog.fsh index 19de1c0..bdb1cab 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_fog.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/deferred_fog.fsh @@ -24,7 +24,6 @@ layout(location = 0) out vec4 output4f; in vec2 v_position2f; -uniform sampler2D u_gbufferDepthTexture; uniform sampler2D u_gbufferNormalTexture; uniform sampler2D u_fogDepthTexture; @@ -34,6 +33,7 @@ uniform sampler2D u_lightShaftsTexture; #ifdef COMPILE_FOG_ATMOSPHERE uniform sampler2D u_environmentMap; +uniform sampler2D u_skyTexture; uniform vec3 u_sunColorAdd3f; #endif @@ -57,11 +57,6 @@ void main() { } #endif - float solidDepth = textureLod(u_gbufferDepthTexture, v_position2f, 0.0).r; - if(solidDepth != fragPos4f.z) { - discard; - } - fragPos4f.xyz *= 2.0; fragPos4f.xyz -= 1.0; @@ -85,18 +80,26 @@ void main() { fragPos4f.xz *= 0.75; vec3 envMapSample3f; + vec3 skyboxSample3f; fragPos4f.xz *= vec2(-0.5, -0.25); fragPos4f.xz += vec2(0.5, 0.25); envMapSample3f = textureLod(u_environmentMap, fragPos4f.xz, 0.0).rgb + u_sunColorAdd3f; + skyboxSample3f = textureLod(u_skyTexture, v_position2f, 0.0).rgb; + #ifdef COMPILE_FOG_LIGHT_SHAFTS - f2 = textureLod(u_lightShaftsTexture, v_position2f, 0.0).r; - envMapSample3f *= pow(f2, 2.25); - f = (f * 0.85 + 0.2) * f2 + f * (1.0 - f2); + f2 = textureLod(u_lightShaftsTexture, v_position2f, 0.0).r * 0.95 + 0.05; + envMapSample3f *= (f2 * 0.8 + 0.2); + skyboxSample3f *= f2 * f2 * f2; + f = min(f + 0.15, 1.0); + f2 = 0.5 + f * 0.5; +#else + f = max(f * 1.0375 - 0.0375, 0.0); + f2 = 0.3 + f * 0.7; #endif - output4f = vec4(envMapSample3f * fogColor4f.rgb, f); + output4f = vec4(mix(envMapSample3f, skyboxSample3f, f2) * fogColor4f.rgb, f); #else output4f = vec4(fogColor4f.rgb, f); #endif diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/forward_core.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/forward_core.fsh index c51313c..93030e4 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/forward_core.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/forward_core.fsh @@ -129,8 +129,12 @@ layout(std140) uniform u_worldLightingData { #ifdef COMPILE_NORMAL_MATERIAL_TEXTURE uniform sampler2D u_samplerNormalMaterial; #else +#ifdef COMPILE_SUBSURFACE_SCATTERING +uniform vec4 u_materialConstants4f; +#else uniform vec3 u_materialConstants3f; #endif +#endif uniform sampler2D u_metalsLUT; @@ -158,6 +162,7 @@ uniform sampler2D u_lightShaftsTexture; #endif #EAGLER INCLUDE (4) "eagler:glsl/deferred/lib/pbr_env_map.glsl" +#EAGLER INCLUDE (4) "eagler:glsl/deferred/lib/branchless_comparison.glsl" #ifdef DO_COMPILE_SUN_SHADOWS uniform sampler2DShadow u_sunShadowDepthTexture; @@ -167,14 +172,14 @@ vec2(-0.077, 0.995), vec2(0.998, 0.015), vec2(-0.116, -0.987), vec2(-0.916, 0.359), vec2(-0.697, -0.511), vec2(0.740, -0.612), vec2(0.675, 0.682)); -#define SMOOTH_SHADOW_SAMPLES 1.0 / 8.0 -#define SMOOTH_SHADOW_RADIUS 0.00075 +#define SMOOTH_SHADOW_SAMPLES (1.0 / 8.0) +#define SMOOTH_SHADOW_RADIUS 0.000488 #define SMOOTH_SHADOW_POISSON_SAMPLE(idx, tex, lod, vec3Pos, accum, tmpVec2)\ tmpVec2 = vec3Pos.xy + POISSON_DISK[idx] * SMOOTH_SHADOW_RADIUS;\ tmpVec2 = clamp(tmpVec2, vec2(0.001), vec2(0.999));\ tmpVec2.y += lod;\ tmpVec2.y *= SUN_SHADOW_MAP_FRAC;\ - accum += textureLod(tex, vec3(tmpVec2, vec3Pos.z), 0.0) * SMOOTH_SHADOW_SAMPLES; + accum += textureLod(tex, vec3(tmpVec2, vec3Pos.z + 0.0001), 0.0); #endif #endif @@ -184,7 +189,7 @@ void main() { vec4 diffuseColor4f; vec3 normalVector3f; vec2 lightmapCoords2f; - vec3 materialData3f; + vec4 materialData4f; float block1f; // =========== RESOLVE CONSTANTS ============ // @@ -270,13 +275,17 @@ void main() { #ifdef COMPILE_NORMAL_MATERIAL_TEXTURE vec2 uv2 = vec2(1.0, 0.5) * texCoords2f; uv2.y += 0.5; - materialData3f = texture(u_samplerNormalMaterial, uv2).rgb; + materialData4f = texture(u_samplerNormalMaterial, uv2); #else - materialData3f = u_materialConstants3f; +#ifdef COMPILE_SUBSURFACE_SCATTERING + materialData4f = u_materialConstants4f; +#else + materialData4f = vec4(u_materialConstants3f, 1.0); +#endif #endif vec3 metalN, metalK; - PREFETCH_METALS(diffuseColor4f.rgb, materialData3f.g, metalN, metalK) + PREFETCH_METALS(diffuseColor4f.rgb, materialData4f.g, metalN, metalK) // ============ SUN LIGHTING ============== // @@ -292,7 +301,7 @@ void main() { float skyLight = max(lightmapCoords2f.g * 2.0 - 1.0, 0.0); float shadowSample = 1.0; vec4 shadowWorldPos4f = worldPosition4f; - shadowWorldPos4f.xyz += normalVector3f * 0.05; + shadowWorldPos4f.xyz += normalVector3f * 0.1; vec4 shadowTexPos4f; vec2 tmpVec2; @@ -301,7 +310,6 @@ void main() { if(shadowTexPos4f.xyz == clamp(shadowTexPos4f.xyz, vec3(0.005), vec3(0.995))) { shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowTexPos4f.xy * vec2(1.0, SUN_SHADOW_MAP_FRAC), shadowTexPos4f.z), 0.0); #ifdef COMPILE_SUN_SHADOW_SMOOTH - shadowSample *= SMOOTH_SHADOW_SAMPLES; SMOOTH_SHADOW_POISSON_SAMPLE(0, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(1, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(2, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) @@ -309,7 +317,7 @@ void main() { SMOOTH_SHADOW_POISSON_SAMPLE(4, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(5, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(6, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) - shadowSample = max(shadowSample * 2.0 - 1.0, 0.0); + shadowSample *= SMOOTH_SHADOW_SAMPLES; #endif break; } @@ -339,16 +347,16 @@ void main() { #ifdef DO_COMPILE_SUN_SHADOWS lightColor3f *= shadowSample * skyLight; #endif - lightColor3f = eaglercraftLighting(diffuseColor4f.rgb, lightColor3f, -worldDirection4f.xyz, u_sunDirection4f.xyz, normalVector3f, materialData3f, metalN, metalK) * u_blockSkySunDynamicLightFac4f.z; + lightColor3f = eaglercraftLighting(diffuseColor4f.rgb, lightColor3f, -worldDirection4f.xyz, u_sunDirection4f.xyz, normalVector3f, materialData4f.rgb, metalN, metalK) * u_blockSkySunDynamicLightFac4f.z; } float f; -#ifdef COMPILE_PARABOLOID_ENV_MAP +#if defined(COMPILE_PARABOLOID_ENV_MAP) && !defined(COMPILE_ENABLE_TEX_GEN) // =========== ENVIRONMENT MAP =========== // - f = materialData3f.g < 0.06 ? 1.0 : 0.0; - f += materialData3f.r < 0.5 ? 1.0 : 0.0; + f = COMPARE_LT_0_ANY(materialData4f.g, 0.06); + f += COMPARE_LT_0_ANY(materialData4f.r, 0.5); while(f == 0.0) { float dst2 = dot(worldPosition4f.xyz, worldPosition4f.xyz); if(dst2 > 25.0) { @@ -365,13 +373,13 @@ void main() { vec4 sample2 = textureLod(u_environmentMap, reflectDir.xz * vec2(0.5, -0.25) + vec2(0.5, 0.75), 0.0); envMapSample4f = vec4(mix(sample1.rgb, sample2.rgb, smoothstep(0.0, 1.0, reflectDir.y * -12.5 + 0.5)).rgb, min(sample1.a, sample2.a)); }else { - reflectDir.xz = reflectDir.xz * vec2(0.5, reflectDir.y > 0.0 ? 0.25 : -0.25); - reflectDir.xz += vec2(0.5, reflectDir.y > 0.0 ? 0.25 : 0.75); + reflectDir.xz = reflectDir.xz * vec2(0.5, COMPARE_GT_C_C(reflectDir.y, 0.0, 0.25, -0.25)); + reflectDir.xz += vec2(0.5, COMPARE_GT_C_C(reflectDir.y, 0.0, 0.25, 0.75)); envMapSample4f = textureLod(u_environmentMap, reflectDir.xz, 0.0); } envMapSample4f.a += min(lightmapCoords2f.g * 2.0, 1.0) * (1.0 - envMapSample4f.a); if(envMapSample4f.a == 1.0) { - lightColor3f += eaglercraftIBL_Specular(diffuseColor4f.rgb, envMapSample4f.rgb * envMapSample4f.a, worldDirection4f.xyz, normalVector3f, materialData3f, metalN, metalK) * (1.0 - sqrt(dst2) * 0.2); + lightColor3f += eaglercraftIBL_Specular(diffuseColor4f.rgb, envMapSample4f.rgb * envMapSample4f.a, worldDirection4f.xyz, normalVector3f, materialData4f.rgb, metalN, metalK) * (1.0 - sqrt(dst2) * 0.2); } break; } @@ -393,8 +401,8 @@ void main() { vec4 sample2 = textureLod(u_irradianceMap, irradianceMapSamplePos2f.xz * vec2(0.5, -0.25) + vec2(0.5, 0.75), 0.0); skyLight += mix(sample1.rgb, sample2.rgb, smoothstep(0.0, 1.0, irradianceMapSamplePos2f.y * -12.5 + 0.5)).rgb; }else { - irradianceMapSamplePos2f.xz *= vec2(0.5, irradianceMapSamplePos2f.y > 0.0 ? 0.25 : -0.25); - irradianceMapSamplePos2f.xz += vec2(0.5, irradianceMapSamplePos2f.y > 0.0 ? 0.25 : 0.75); + irradianceMapSamplePos2f.xz *= vec2(0.5, COMPARE_GT_C_C(irradianceMapSamplePos2f.y, 0.0, 0.25, -0.25)); + irradianceMapSamplePos2f.xz += vec2(0.5, COMPARE_GT_C_C(irradianceMapSamplePos2f.y, 0.0, 0.25, 0.75)); skyLight += textureLod(u_irradianceMap, irradianceMapSamplePos2f.xz, 0.0).rgb; } skyLight *= lightmapCoords2f.g * u_sunColor3f_sky1f.w; @@ -409,7 +417,7 @@ void main() { for(int i = 0; i < safeLightCount; ++i) { dlightDist3f = worldPosition4f.xyz - u_dynamicLightArray[i].u_lightPosition4f.xyz; dlightDir3f = normalize(dlightDist3f); - dlightDir3f = materialData3f.b == 1.0 ? normalVector3f : -dlightDir3f; + dlightDir3f = materialData4f.b == 1.0 ? normalVector3f : -dlightDir3f; if(dot(dlightDir3f, normalVector3f) <= 0.0) { continue; } @@ -419,7 +427,7 @@ void main() { continue; } dlightColor3f *= ((cm - 0.025) / cm); - lightColor3f += eaglercraftLighting(diffuseColor4f.rgb, dlightColor3f, -worldDirection4f.xyz, dlightDir3f, normalVector3f, materialData3f, metalN, metalK) * u_blockSkySunDynamicLightFac4f.w; + lightColor3f += eaglercraftLighting(diffuseColor4f.rgb, dlightColor3f, -worldDirection4f.xyz, dlightDir3f, normalVector3f, materialData4f.rgb, metalN, metalK) * u_blockSkySunDynamicLightFac4f.w; } #endif @@ -429,7 +437,7 @@ void main() { vec4 fogBlend4f = vec4(0.0); #ifndef COMPILE_ENABLE_TEX_GEN while(u_fogParameters4f.x > 0.0) { - float atmos = u_fogParameters4f.x >= 4.0 ? 4.0 : 0.0; + float atmos = COMPARE_LT_C_C(u_fogParameters4f.x, 4.0, 0.0, 4.0); float type = u_fogParameters4f.x - atmos; fogBlend4f = mix(u_fogColorLight4f, u_fogColorDark4f, lightmapCoords2f.g); @@ -454,8 +462,10 @@ void main() { fogBlend4f.rgb *= textureLod(u_irradianceMap, atmosSamplePos.xz, 0.0).rgb; #ifdef COMPILE_FOG_LIGHT_SHAFTS - fogBlend4f.rgb *= pow(textureLod(u_lightShaftsTexture, (v_positionClip3f.xy / v_positionClip3f.z) * 0.5 + 0.5, 0.0).r * 0.9 + 0.1, 2.25); - fogBlend4f.a = fogBlend4f.a * 0.85 + 0.2; + fogBlend4f.rgb *= textureLod(u_lightShaftsTexture, (v_positionClip3f.xy / v_positionClip3f.z) * 0.5 + 0.5, 0.0).r * 0.76 + 0.24; + fogBlend4f.a = min(fogBlend4f.a * 0.8 + 0.35, 1.0); +#else + fogBlend4f.a = max(fogBlend4f.a * 0.83 + 0.17, 0.0); #endif break; } @@ -465,7 +475,7 @@ void main() { vec3 blockLight = lightmapCoords2f.r * vec3(1.0, 0.5809, 0.2433) * 2.0 * u_blockSkySunDynamicLightFac4f.x; skyLight *= u_blockSkySunDynamicLightFac4f.y; - float emissive = materialData3f.b == 1.0 ? 0.0 : materialData3f.b; + float emissive = materialData4f.b == 1.0 ? 0.0 : materialData4f.b; diffuseColor4f.rgb *= max(skyLight + blockLight, vec3(emissive * emissive * 20.0 + 0.075)) * 0.075; diffuseColor4f.rgb += lightColor3f; diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/forward_glass_highlights.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/forward_glass_highlights.fsh index e13d262..8ea7293 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/forward_glass_highlights.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/forward_glass_highlights.fsh @@ -85,6 +85,8 @@ layout(std140) uniform u_worldLightingData { uniform sampler2D u_environmentMap; uniform sampler2D u_brdfLUT; +#EAGLER INCLUDE (4) "eagler:glsl/deferred/lib/branchless_comparison.glsl" + #define GLASS_ROUGHNESS 0.15 #define GLASS_F0 0.4 @@ -126,14 +128,14 @@ vec2(-0.077, 0.995), vec2(0.998, 0.015), vec2(-0.116, -0.987), vec2(-0.916, 0.359), vec2(-0.697, -0.511), vec2(0.740, -0.612), vec2(0.675, 0.682)); -#define SMOOTH_SHADOW_SAMPLES 1.0 / 8.0 -#define SMOOTH_SHADOW_RADIUS 0.00075 +#define SMOOTH_SHADOW_SAMPLES (1.0 / 8.0) +#define SMOOTH_SHADOW_RADIUS 0.000488 #define SMOOTH_SHADOW_POISSON_SAMPLE(idx, tex, lod, vec3Pos, accum, tmpVec2)\ tmpVec2 = vec3Pos.xy + POISSON_DISK[idx] * SMOOTH_SHADOW_RADIUS;\ tmpVec2 = clamp(tmpVec2, vec2(0.001), vec2(0.999));\ tmpVec2.y += lod;\ tmpVec2.y *= SUN_SHADOW_MAP_FRAC;\ - accum += textureLod(tex, vec3(tmpVec2, vec3Pos.z), 0.0) * SMOOTH_SHADOW_SAMPLES; + accum += textureLod(tex, vec3(tmpVec2, vec3Pos.z + 0.0001), 0.0); #endif #endif @@ -184,16 +186,15 @@ void main() { float skyLight = max(lightmapCoords2f.g * 2.0 - 1.0, 0.0); float shadowSample = 1.0; vec4 shadowWorldPos4f = worldPosition4f; - shadowWorldPos4f.xyz += normalVector3f * 0.05; + shadowWorldPos4f.xyz += normalVector3f * 0.1; vec4 shadowTexPos4f; vec2 tmpVec2; for(;;) { shadowTexPos4f = u_sunShadowMatrixLOD04f * shadowWorldPos4f; if(shadowTexPos4f.xyz == clamp(shadowTexPos4f.xyz, vec3(0.005), vec3(0.995))) { - shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowTexPos4f.xy * vec2(1.0, SUN_SHADOW_MAP_FRAC), shadowTexPos4f.z), 0.0); + shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowTexPos4f.xy * vec2(1.0, SUN_SHADOW_MAP_FRAC), shadowTexPos4f.z + 0.0001), 0.0); #ifdef COMPILE_SUN_SHADOW_SMOOTH - shadowSample *= SMOOTH_SHADOW_SAMPLES; SMOOTH_SHADOW_POISSON_SAMPLE(0, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(1, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(2, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) @@ -201,7 +202,7 @@ void main() { SMOOTH_SHADOW_POISSON_SAMPLE(4, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(5, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(6, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) - shadowSample = max(shadowSample * 2.0 - 1.0, 0.0); + shadowSample *= SMOOTH_SHADOW_SAMPLES; #endif break; } @@ -252,8 +253,8 @@ void main() { vec4 sample2 = textureLod(u_environmentMap, reflectDir.xz * vec2(0.5, -0.25) + vec2(0.5, 0.75), 0.0); envMapSample4f = vec4(mix(sample1.rgb, sample2.rgb, smoothstep(0.0, 1.0, reflectDir.y * -12.5 + 0.5)).rgb, min(sample1.a, sample2.a)); }else { - reflectDir.xz = reflectDir.xz * vec2(0.5, reflectDir.y > 0.0 ? 0.25 : -0.25); - reflectDir.xz += vec2(0.5, reflectDir.y > 0.0 ? 0.25 : 0.75); + reflectDir.xz = reflectDir.xz * vec2(0.5, COMPARE_GT_C_C(reflectDir.y, 0.0, 0.25, -0.25)); + reflectDir.xz += vec2(0.5, COMPARE_GT_C_C(reflectDir.y, 0.0 , 0.25, 0.75)); envMapSample4f = textureLod(u_environmentMap, reflectDir.xz, 0.0); } envMapSample4f.a += min(lightmapCoords2f.g * 2.0, 1.0) * (1.0 - envMapSample4f.a); @@ -291,7 +292,7 @@ void main() { float fogFade = 0.0; if(u_fogParameters4f.x > 0.0) { - float atmos = u_fogParameters4f.x >= 4.0 ? 4.0 : 0.0; + float atmos = COMPARE_LT_C_C(u_fogParameters4f.x, 4.0, 0.0, 4.0); float type = u_fogParameters4f.x - atmos; fogFade = mix(u_fogColorDark4f.a, u_fogColorLight4f.a, lightmapCoords2f.g); diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/gbuffer_debug_view.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/gbuffer_debug_view.fsh index 754b224..05db4c5 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/gbuffer_debug_view.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/gbuffer_debug_view.fsh @@ -53,7 +53,7 @@ void main() { #endif #ifdef DEBUG_VIEW_3 vec4 color4f = textureLod(u_texture0, v_position2f, 0.0); - output4f = vec4(color4f.b > 0.99 ? 1.0 : 0.0, color4f.a, 0.0, 1.0); + output4f = vec4((color4f.a - (color4f.a > 0.5 ? 0.5 : 0.0)) * 2.0, color4f.a > 0.5 ? 1.0 : 0.0, color4f.b > 0.99 ? 1.0 : 0.0, 1.0); #endif #ifdef DEBUG_VIEW_4 output4f = vec4(vec3(clamp((textureLod(u_texture0, v_position2f, 0.0).r - u_depthSliceStartEnd2f.x) * u_depthSliceStartEnd2f.y, 0.0, 1.0)), 1.0); diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/lib/branchless_comparison.glsl b/desktopRuntime/resources/assets/eagler/glsl/deferred/lib/branchless_comparison.glsl new file mode 100755 index 0000000..4a33945 --- /dev/null +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/lib/branchless_comparison.glsl @@ -0,0 +1,35 @@ +/* + * Copyright (c) 2025 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. + * + */ + +// Assuming modern GPUs probably implement clamp, max, and ciel without branches + +// value1 > value2 ? 1.0 : 0.0 +#define COMPARE_GT_0_1(value1, value2) clamp(ceil(value1 - value2), 0.0, 1.0) + +// value1 > value2 ? N : 0.0 +#define COMPARE_GT_0_ANY(value1, value2) max(ceil(value1 - value2), 0.0) + +// value1 < value2 ? 1.0 : 0.0 +#define COMPARE_LT_0_1(value1, value2) clamp(ceil(value2 - value1), 0.0, 1.0) + +// value1 < value2 ? N : 0.0 +#define COMPARE_LT_0_ANY(value1, value2) max(ceil(value2 - value1), 0.0) + +// value1 > value2 ? ifGT : ifLT +#define COMPARE_GT_C_C(value1, value2, ifGT, ifLT) (COMPARE_GT_0_1(value1, value2) * (ifGT - ifLT) + ifLT) + +// value1 < value2 ? ifLT : ifGT +#define COMPARE_LT_C_C(value1, value2, ifLT, ifGT) (COMPARE_LT_0_1(value1, value2) * (ifLT - ifGT) + ifGT) diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/lighting_sun.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/lighting_sun.fsh index cc1e120..d7a14be 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/lighting_sun.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/lighting_sun.fsh @@ -37,6 +37,9 @@ uniform mat4 u_inverseProjectionMatrix4f; #ifdef COMPILE_SUN_SHADOW uniform sampler2D u_sunShadowTexture; #endif +#ifdef COMPILE_SUBSURFACE_SCATTERING +uniform sampler2D u_subsurfaceScatteringTexture; +#endif uniform vec3 u_sunDirection3f; uniform vec3 u_sunColor3f; @@ -49,30 +52,64 @@ void main() { vec3 normalVector3f; vec2 lightmapCoords2f; vec3 materialData3f; + vec4 sampleVar4f; + +#ifdef COMPILE_SUBSURFACE_SCATTERING + float depth = textureLod(u_gbufferDepthTexture, v_position2f, 0.0).r; + if(depth == 0.0) { + discard; + } + sampleVar4f = textureLod(u_gbufferColorTexture, v_position2f, 0.0); + diffuseColor3f.rgb = sampleVar4f.rgb; + diffuseColor3f *= diffuseColor3f; + lightmapCoords2f.x = sampleVar4f.a; +#endif + +#ifdef COMPILE_SUBSURFACE_SCATTERING + float subsurfValue = textureLod(u_subsurfaceScatteringTexture, v_position2f, 0.0).r; + subsurfValue *= subsurfValue; + output4f = vec4(subsurfValue * u_sunColor3f * diffuseColor3f * 0.125, 0.0); +#endif #ifdef COMPILE_SUN_SHADOW #ifdef COMPILE_COLORED_SHADOW vec4 shadow = textureLod(u_sunShadowTexture, v_position2f, 0.0); if(shadow.a < 0.05) { +#ifndef COMPILE_SUBSURFACE_SCATTERING discard; +#else + return; +#endif } #else vec3 shadow = vec3(textureLod(u_sunShadowTexture, v_position2f, 0.0).r); +#ifndef COMPILE_SUBSURFACE_SCATTERING if(shadow.r < 0.05) { +#ifndef COMPILE_SUBSURFACE_SCATTERING discard; +#else + return; +#endif } #endif #endif +#endif +#ifndef COMPILE_SUBSURFACE_SCATTERING float depth = textureLod(u_gbufferDepthTexture, v_position2f, 0.0).r; +#endif #ifndef COMPILE_SUN_SHADOW if(depth == 0.0) { +#ifndef COMPILE_SUBSURFACE_SCATTERING discard; +#else + return; +#endif } #endif - vec4 sampleVar4f = textureLod(u_gbufferNormalTexture, v_position2f, 0.0); + sampleVar4f = textureLod(u_gbufferNormalTexture, v_position2f, 0.0); #ifndef COMPILE_SUN_SHADOW vec3 shadow = vec3(sampleVar4f.a, 0.0, 0.0); @@ -85,9 +122,12 @@ void main() { normalVector3f.xyz = sampleVar4f.rgb * 2.0 - 1.0; lightmapCoords2f.y = sampleVar4f.a; +#ifndef COMPILE_SUBSURFACE_SCATTERING sampleVar4f = textureLod(u_gbufferColorTexture, v_position2f, 0.0); diffuseColor3f.rgb = sampleVar4f.rgb; + diffuseColor3f *= diffuseColor3f; lightmapCoords2f.x = sampleVar4f.a; +#endif materialData3f = textureLod(u_gbufferMaterialTexture, v_position2f, 0.0).rgb; vec3 worldSpaceNormal = normalize(mat3(u_inverseViewMatrix4f) * normalVector3f); @@ -97,6 +137,15 @@ void main() { worldSpacePosition = u_inverseProjectionMatrix4f * worldSpacePosition; worldSpacePosition = u_inverseViewMatrix4f * vec4(worldSpacePosition.xyz / worldSpacePosition.w, 0.0); - diffuseColor3f *= diffuseColor3f; - output4f = vec4(eaglercraftLighting(diffuseColor3f, u_sunColor3f * shadow.rgb, normalize(-worldSpacePosition.xyz), u_sunDirection3f, worldSpaceNormal, materialData3f), 0.0); -} +#ifdef COMPILE_SUBSURFACE_SCATTERING + output4f.rgb += +#else + output4f = vec4( +#endif + eaglercraftLighting(diffuseColor3f, u_sunColor3f * shadow.rgb, normalize(-worldSpacePosition.xyz), u_sunDirection3f, worldSpaceNormal, materialData3f) +#ifdef COMPILE_SUBSURFACE_SCATTERING + * (1.0 - subsurfValue * 0.0625); +#else + , 0.0); +#endif +} \ No newline at end of file diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/material_block_constants.csv b/desktopRuntime/resources/assets/eagler/glsl/deferred/material_block_constants.csv index 22a7866..3b0c0e4 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/material_block_constants.csv +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/material_block_constants.csv @@ -1,583 +1,583 @@ -textureId,smoothness,reflectance,emission -blocks/anvil_base,158,230,0 -blocks/anvil_top_damaged_0,150,230,0 -blocks/anvil_top_damaged_1,143,230,0 -blocks/anvil_top_damaged_2,158,230,0 -blocks/beacon,158,16,200 -blocks/bed_feet_end,31,10,0 -blocks/bed_feet_side,28,9,0 -blocks/bed_feet_top,61,13,0 -blocks/bed_head_end,31,10,0 -blocks/bed_head_side,31,9,0 -blocks/bed_head_top,80,13,0 -blocks/bedrock,46,5,0 -blocks/bookshelf,64,13,0 -blocks/brewing_stand,130,47,0 -blocks/brewing_stand_base,149,10,0 -blocks/brick,37,8,0 -blocks/cactus_bottom,60,7,0 -blocks/cactus_side,71,7,0 -blocks/cactus_top,71,7,0 -blocks/cake_bottom,64,4,0 -blocks/cake_inner,29,3,0 -blocks/cake_side,43,3,0 -blocks/cake_top,127,10,0 -blocks/carrots_stage_0,71,7,0 -blocks/carrots_stage_1,71,7,0 -blocks/carrots_stage_2,71,7,0 -blocks/carrots_stage_3,71,7,0 -blocks/cauldron_bottom,38,230,0 -blocks/cauldron_inner,122,230,0 -blocks/cauldron_side,110,230,0 -blocks/cauldron_top,76,230,0 -blocks/clay,133,13,0 -blocks/coal_block,155,20,0 -blocks/coal_ore,84,10,0 -blocks/coarse_dirt,50,4,0 -blocks/cobblestone,83,10,0 -blocks/cobblestone_mossy,117,8,0 -blocks/cocoa_stage_0,133,8,0 -blocks/cocoa_stage_1,146,8,0 -blocks/cocoa_stage_2,156,8,0 -blocks/command_block,136,99,8 -blocks/comparator_off,115,5,0 -blocks/comparator_on,115,5,14 -blocks/crafting_table_front,113,29,0 -blocks/crafting_table_side,104,20,0 -blocks/crafting_table_top,97,14,0 -blocks/daylight_detector_inverted_top,95,6,0 -blocks/daylight_detector_side,70,5,0 -blocks/daylight_detector_top,95,6,0 -blocks/deadbush,18,10,0 -blocks/diamond_block,235,150,0 -blocks/diamond_ore,90,25,0 -blocks/dirt,50,4,0 -blocks/dirt_podzol_side,27,1,0 -blocks/dirt_podzol_top,47,15,0 -blocks/dispenser_front_horizontal,138,9,0 -blocks/dispenser_front_vertical,114,9,0 -blocks/door_acacia_lower,92,2,0 -blocks/door_acacia_upper,91,5,0 -blocks/door_birch_lower,79,14,0 -blocks/door_birch_upper,110,14,0 -blocks/door_dark_oak_lower,88,3,0 -blocks/door_dark_oak_upper,87,4,0 -blocks/door_iron_lower,214,230,0 -blocks/door_iron_upper,214,230,0 -blocks/door_jungle_lower,56,2,0 -blocks/door_jungle_upper,58,5,0 -blocks/door_spruce_lower,57,16,0 -blocks/door_spruce_upper,58,17,0 -blocks/door_wood_lower,70,2,0 -blocks/door_wood_upper,74,6,0 -blocks/double_plant_fern_bottom,71,7,0 -blocks/double_plant_fern_top,71,7,0 -blocks/double_plant_grass_bottom,71,7,0 -blocks/double_plant_grass_top,71,7,0 -blocks/double_plant_paeonia_bottom,71,7,0 -blocks/double_plant_paeonia_top,71,7,0 -blocks/double_plant_rose_bottom,71,7,0 -blocks/double_plant_rose_top,71,7,0 -blocks/double_plant_sunflower_back,71,7,0 -blocks/double_plant_sunflower_bottom,71,7,0 -blocks/double_plant_sunflower_front,71,7,0 -blocks/double_plant_sunflower_top,71,7,0 -blocks/double_plant_syringa_bottom,71,7,0 -blocks/double_plant_syringa_top,71,7,0 -blocks/dragon_egg,45,15,16 -blocks/dropper_front_horizontal,138,9,0 -blocks/dropper_front_vertical,112,9,0 -blocks/emerald_block,228,130,0 -blocks/emerald_ore,93,26,0 -blocks/enchanting_table_bottom,210,120,0 -blocks/enchanting_table_side,199,8,0 -blocks/enchanting_table_top,118,16,0 -blocks/end_stone,107,15,0 -blocks/endframe_eye,144,37,46 -blocks/endframe_side,141,19,0 -blocks/endframe_top,144,13,0 -blocks/farmland_dry,60,5,0 -blocks/farmland_wet,41,40,0 -blocks/fern,71,7,0 -blocks/fire_layer_0,30,5,162 -blocks/fire_layer_1,30,5,159 -blocks/flower_allium,71,7,0 -blocks/flower_blue_orchid,71,7,0 -blocks/flower_dandelion,71,7,0 -blocks/flower_houstonia,71,7,0 -blocks/flower_oxeye_daisy,71,7,0 -blocks/flower_pot,59,5,0 -blocks/flower_rose,71,7,0 -blocks/flower_tulip_orange,71,7,0 -blocks/flower_tulip_pink,71,7,0 -blocks/flower_tulip_red,71,7,0 -blocks/flower_tulip_white,71,7,0 -blocks/furnace_front_off,102,6,0 -blocks/furnace_front_on,102,7,25 -blocks/furnace_side,140,10,0 -blocks/furnace_top,114,10,0 -blocks/glass,210,100,0 -blocks/glass_black,230,100,0 -blocks/glass_blue,230,100,0 -blocks/glass_brown,230,100,0 -blocks/glass_cyan,230,100,0 -blocks/glass_gray,230,100,0 -blocks/glass_green,230,100,0 -blocks/glass_light_blue,230,100,0 -blocks/glass_lime,230,100,0 -blocks/glass_magenta,230,100,0 -blocks/glass_orange,230,100,0 -blocks/glass_pane_top,230,100,0 -blocks/glass_pane_top_black,230,100,0 -blocks/glass_pane_top_blue,230,100,0 -blocks/glass_pane_top_brown,230,100,0 -blocks/glass_pane_top_cyan,230,100,0 -blocks/glass_pane_top_gray,230,100,0 -blocks/glass_pane_top_green,230,100,0 -blocks/glass_pane_top_light_blue,230,100,0 -blocks/glass_pane_top_lime,230,100,0 -blocks/glass_pane_top_magenta,230,100,0 -blocks/glass_pane_top_orange,230,100,0 -blocks/glass_pane_top_pink,230,100,0 -blocks/glass_pane_top_purple,230,100,0 -blocks/glass_pane_top_red,230,100,0 -blocks/glass_pane_top_silver,230,100,0 -blocks/glass_pane_top_white,230,100,0 -blocks/glass_pane_top_yellow,230,100,0 -blocks/glass_pink,230,100,0 -blocks/glass_purple,230,100,0 -blocks/glass_red,230,100,0 -blocks/glass_silver,230,100,0 -blocks/glass_white,230,100,0 -blocks/glass_yellow,230,100,0 -blocks/glowstone,194,60,150 -blocks/gold_block,218,231,0 -blocks/gold_ore,96,37,0 -blocks/grass_side,50,4,0 -blocks/grass_side_overlay,12,5,0 -blocks/grass_side_snowed,146,15,0 -blocks/grass_top,12,5,0 -blocks/gravel,68,5,0 -blocks/hardened_clay,59,5,0 -blocks/hardened_clay_stained_black,59,5,0 -blocks/hardened_clay_stained_blue,59,5,0 -blocks/hardened_clay_stained_brown,59,5,0 -blocks/hardened_clay_stained_cyan,59,5,0 -blocks/hardened_clay_stained_gray,59,5,0 -blocks/hardened_clay_stained_green,59,5,0 -blocks/hardened_clay_stained_light_blue,59,5,0 -blocks/hardened_clay_stained_lime,59,5,0 -blocks/hardened_clay_stained_magenta,59,5,0 -blocks/hardened_clay_stained_orange,59,5,0 -blocks/hardened_clay_stained_pink,59,5,0 -blocks/hardened_clay_stained_purple,59,5,0 -blocks/hardened_clay_stained_red,59,5,0 -blocks/hardened_clay_stained_silver,59,5,0 -blocks/hardened_clay_stained_white,59,5,0 -blocks/hardened_clay_stained_yellow,59,5,0 -blocks/hay_block_side,112,12,0 -blocks/hay_block_top,114,13,0 -blocks/hopper_inside,71,230,0 -blocks/hopper_outside,173,230,0 -blocks/hopper_top,105,230,0 -blocks/ice,180,70,0 -blocks/ice_packed,168,40,0 -blocks/iron_bars,64,230,0 -blocks/iron_block,232,230,0 -blocks/iron_ore,95,15,0 -blocks/iron_trapdoor,214,230,0 -blocks/itemframe_background,0,0,0 -blocks/jukebox_side,89,13,0 -blocks/jukebox_top,83,13,0 -blocks/ladder,30,6,0 -blocks/lapis_block,222,20,0 -blocks/lapis_ore,96,10,0 -blocks/lava_flow,30,15,200 -blocks/lava_still,30,15,200 -blocks/leaves_acacia,60,10,0 -blocks/leaves_big_oak,105,4,0 -blocks/leaves_birch,73,5,0 -blocks/leaves_jungle,71,7,0 -blocks/leaves_oak,77,6,0 -blocks/leaves_spruce,59,6,0 -blocks/lever,97,10,0 -blocks/log_acacia,15,10,0 -blocks/log_acacia_top,9,10,0 -blocks/log_big_oak,26,10,0 -blocks/log_big_oak_top,20,10,0 -blocks/log_birch,24,5,0 -blocks/log_birch_top,20,10,0 -blocks/log_jungle,14,10,0 -blocks/log_jungle_top,20,10,0 -blocks/log_oak,18,10,0 -blocks/log_oak_top,20,10,0 -blocks/log_spruce,23,10,0 -blocks/log_spruce_top,21,10,0 -blocks/melon_side,156,14,0 -blocks/melon_stem_connected,18,10,0 -blocks/melon_stem_disconnected,18,10,0 -blocks/melon_top,153,14,0 -blocks/mob_spawner,71,230,0 -blocks/mushroom_block_inside,151,10,0 -blocks/mushroom_block_skin_brown,96,10,0 -blocks/mushroom_block_skin_red,148,10,0 -blocks/mushroom_block_skin_stem,142,10,0 -blocks/mushroom_brown,96,10,0 -blocks/mushroom_red,148,10,0 -blocks/mycelium_side,63,15,0 -blocks/mycelium_top,70,15,0 -blocks/nether_brick,37,15,0 -blocks/nether_wart_stage_0,11,5,0 -blocks/nether_wart_stage_1,30,5,0 -blocks/nether_wart_stage_2,39,5,0 -blocks/netherrack,20,10,0 -blocks/noteblock,89,13,0 -blocks/obsidian,210,120,0 -blocks/piston_bottom,80,4,0 -blocks/piston_inner,87,4,0 -blocks/piston_side,104,22,0 -blocks/piston_top_normal,109,25,0 -blocks/piston_top_sticky,116,28,0 -blocks/planks_acacia,92,11,0 -blocks/planks_big_oak,92,11,0 -blocks/planks_birch,92,11,0 -blocks/planks_jungle,92,11,0 -blocks/planks_oak,92,11,0 -blocks/planks_spruce,92,11,0 -blocks/portal,71,7,120 -blocks/potatoes_stage_0,71,7,0 -blocks/potatoes_stage_1,71,7,0 -blocks/potatoes_stage_2,71,7,0 -blocks/potatoes_stage_3,71,7,0 -blocks/prismarine_bricks,230,20,0 -blocks/prismarine_dark,194,26,0 -blocks/prismarine_rough,115,33,0 -blocks/pumpkin_face_off,56,15,0 -blocks/pumpkin_face_on,56,15,74 -blocks/pumpkin_side,52,15,0 -blocks/pumpkin_stem_connected,18,10,0 -blocks/pumpkin_stem_disconnected,18,10,0 -blocks/pumpkin_top,130,15,0 -blocks/quartz_block_bottom,220,60,0 -blocks/quartz_block_chiseled,220,60,0 -blocks/quartz_block_chiseled_top,220,60,0 -blocks/quartz_block_lines,220,60,0 -blocks/quartz_block_lines_top,220,60,0 -blocks/quartz_block_side,220,60,0 -blocks/quartz_block_top,220,60,0 -blocks/quartz_ore,45,10,0 -blocks/rail_activator,84,50,0 -blocks/rail_activator_powered,84,50,32 -blocks/rail_detector,102,62,0 -blocks/rail_detector_powered,102,62,32 -blocks/rail_golden,112,75,0 -blocks/rail_golden_powered,112,75,48 -blocks/rail_normal,85,50,0 -blocks/rail_normal_turned,85,50,0 -blocks/red_sand,32,2,0 -blocks/red_sandstone_bottom,52,10,0 -blocks/red_sandstone_carved,90,10,0 -blocks/red_sandstone_normal,43,10,0 -blocks/red_sandstone_smooth,90,10,0 -blocks/red_sandstone_top,128,15,0 -blocks/redstone_block,184,15,0 -blocks/redstone_dust_cross,100,5,0 -blocks/redstone_dust_cross_overlay,100,5,0 -blocks/redstone_dust_line,100,5,0 -blocks/redstone_dust_line_overlay,100,5,0 -blocks/redstone_lamp_off,191,20,0 -blocks/redstone_lamp_on,191,20,132 -blocks/redstone_ore,88,10,0 -blocks/redstone_torch_off,135,9,0 -blocks/redstone_torch_on,135,9,64 -blocks/reeds,71,7,0 -blocks/repeater_off,151,5,0 -blocks/repeater_on,151,5,32 -blocks/sand,46,8,0 -blocks/sandstone_bottom,52,8,0 -blocks/sandstone_carved,113,10,0 -blocks/sandstone_normal,43,10,0 -blocks/sandstone_smooth,90,10,0 -blocks/sandstone_top,128,15,0 -blocks/sapling_acacia,71,7,0 -blocks/sapling_birch,71,7,0 -blocks/sapling_jungle,71,7,0 -blocks/sapling_oak,71,7,0 -blocks/sapling_roofed_oak,71,7,0 -blocks/sapling_spruce,71,7,0 -blocks/sea_lantern,194,60,80 -blocks/slime,209,0,0 -blocks/snow,146,15,0 -blocks/soul_sand,35,15,0 -blocks/sponge,38,11,0 -blocks/sponge_wet,240,16,0 -blocks/stone,77,10,0 -blocks/stone_andesite,50,9,0 -blocks/stone_andesite_smooth,230,20,0 -blocks/stone_diorite,54,9,0 -blocks/stone_diorite_smooth,230,20,0 -blocks/stone_granite,38,9,0 -blocks/stone_granite_smooth,230,20,0 -blocks/stone_slab_side,120,20,0 -blocks/stone_slab_top,120,20,0 -blocks/stonebrick,70,10,0 -blocks/stonebrick_carved,58,10,0 -blocks/stonebrick_cracked,37,10,0 -blocks/stonebrick_mossy,53,9,0 -blocks/tallgrass,71,7,0 -blocks/tnt_bottom,78,5,0 -blocks/tnt_side,94,15,0 -blocks/tnt_top,61,5,0 -blocks/torch_on,135,9,128 -blocks/trapdoor,43,5,0 -blocks/trip_wire,230,20,0 -blocks/trip_wire_source,132,142,0 -blocks/vine,116,13,0 -blocks/water_flow,220,40,0 -blocks/water_still,220,40,0 -blocks/waterlily,78,15,0 -blocks/web,230,20,0 -blocks/wheat_stage_0,71,7,0 -blocks/wheat_stage_1,71,7,0 -blocks/wheat_stage_2,71,7,0 -blocks/wheat_stage_3,71,7,0 -blocks/wheat_stage_4,71,7,0 -blocks/wheat_stage_5,71,7,0 -blocks/wheat_stage_6,71,7,0 -blocks/wheat_stage_7,71,7,0 -blocks/wool_colored_black,50,10,0 -blocks/wool_colored_blue,50,10,0 -blocks/wool_colored_brown,50,10,0 -blocks/wool_colored_cyan,50,10,0 -blocks/wool_colored_gray,50,10,0 -blocks/wool_colored_green,50,10,0 -blocks/wool_colored_light_blue,50,10,0 -blocks/wool_colored_lime,50,10,0 -blocks/wool_colored_magenta,50,10,0 -blocks/wool_colored_orange,50,10,0 -blocks/wool_colored_pink,50,10,0 -blocks/wool_colored_purple,50,10,0 -blocks/wool_colored_red,50,10,0 -blocks/wool_colored_silver,50,10,0 -blocks/wool_colored_white,50,10,0 -blocks/wool_colored_yellow,50,10,0 -default,64,2,0 -items/apple,90,25,0 -items/apple_golden,150,231,0 -items/arrow,64,2,0 -items/barrier,64,2,0 -items/bed,80,15,0 -items/beef_cooked,70,10,0 -items/beef_raw,50,20,0 -items/blaze_powder,64,15,30 -items/blaze_rod,75,20,30 -items/boat,90,11,0 -items/bone,110,40,0 -items/book_enchanted,64,10,0 -items/book_normal,64,10,0 -items/book_writable,64,10,0 -items/book_written,64,10,0 -items/bow_pulling_0,80,15,0 -items/bow_pulling_1,80,15,0 -items/bow_pulling_2,80,15,0 -items/bow_standby,80,15,0 -items/bowl,90,10,0 -items/bread,75,5,0 -items/brewing_stand,64,10,0 -items/brick,40,8,0 -items/bucket_empty,110,230,0 -items/bucket_lava,110,230,0 -items/bucket_milk,110,230,0 -items/bucket_water,110,230,32 -items/cake,70,10,0 -items/carrot,64,5,0 -items/carrot_golden,90,231,0 -items/carrot_on_a_stick,80,10,0 -items/cauldron,75,230,0 -items/chainmail_boots,100,230,0 -items/chainmail_chestplate,100,230,0 -items/chainmail_helmet,100,230,0 -items/chainmail_leggings,100,230,0 -items/charcoal,130,20,0 -items/chicken_cooked,64,20,0 -items/chicken_raw,50,20,0 -items/clay_ball,120,13,0 -items/clock,90,230,0 -items/coal,130,20,0 -items/comparator,115,5,0 -items/compass,80,230,0 -items/cookie,64,5,0 -items/diamond,200,120,0 -items/diamond_axe,80,10,0 -items/diamond_boots,200,120,0 -items/diamond_chestplate,200,120,0 -items/diamond_helmet,200,120,0 -items/diamond_hoe,80,10,0 -items/diamond_horse_armor,200,120,0 -items/diamond_leggings,200,120,0 -items/diamond_pickaxe,80,10,0 -items/diamond_shovel,80,10,0 -items/diamond_sword,80,10,0 -items/door_acacia,66,25,0 -items/door_birch,66,25,0 -items/door_dark_oak,66,25,0 -items/door_iron,200,230,0 -items/door_jungle,66,25,0 -items/door_spruce,66,25,0 -items/door_wood,66,25,0 -items/dye_powder_black,64,5,0 -items/dye_powder_blue,64,5,0 -items/dye_powder_brown,64,5,0 -items/dye_powder_cyan,64,5,0 -items/dye_powder_gray,64,5,0 -items/dye_powder_green,64,5,0 -items/dye_powder_light_blue,64,5,0 -items/dye_powder_lime,64,5,0 -items/dye_powder_magenta,64,5,0 -items/dye_powder_orange,64,5,0 -items/dye_powder_pink,64,5,0 -items/dye_powder_purple,64,5,0 -items/dye_powder_red,64,5,0 -items/dye_powder_silver,64,5,0 -items/dye_powder_white,64,5,0 -items/dye_powder_yellow,64,5,0 -items/egg,75,15,0 -items/emerald,228,130,0 -items/ender_eye,80,10,40 -items/ender_pearl,80,10,0 -items/experience_bottle,210,100,0 -items/feather,64,10,0 -items/fireball,64,5,40 -items/fireworks,80,20,0 -items/fireworks_charge,70,15,0 -items/fireworks_charge_overlay,70,15,0 -items/fish_clownfish_raw,90,25,0 -items/fish_cod_cooked,70,10,0 -items/fish_cod_raw,90,25,0 -items/fish_pufferfish_raw,90,25,0 -items/fish_salmon_cooked,70,10,0 -items/fish_salmon_raw,90,25,0 -items/fishing_rod_cast,80,10,0 -items/fishing_rod_uncast,80,10,0 -items/flint,110,30,0 -items/flint_and_steel,90,230,0 -items/flower_pot,80,5,0 -items/ghast_tear,120,50,0 -items/glowstone_dust,120,20,70 -items/gold_axe,80,10,0 -items/gold_boots,200,231,0 -items/gold_chestplate,200,231,0 -items/gold_helmet,200,231,0 -items/gold_hoe,80,10,0 -items/gold_horse_armor,200,231,0 -items/gold_ingot,200,231,0 -items/gold_leggings,200,231,0 -items/gold_nugget,200,231,0 -items/gold_pickaxe,80,10,0 -items/gold_shovel,80,10,0 -items/gold_sword,80,10,0 -items/gunpowder,64,15,0 -items/hopper,90,230,0 -items/iron_axe,80,10,0 -items/iron_boots,200,230,0 -items/iron_chestplate,200,230,0 -items/iron_helmet,200,230,0 -items/iron_hoe,80,10,0 -items/iron_horse_armor,200,230,0 -items/iron_ingot,200,230,0 -items/iron_leggings,200,230,0 -items/iron_pickaxe,80,10,0 -items/iron_shovel,80,10,0 -items/iron_sword,80,10,0 -items/item_frame,70,20,0 -items/lead,64,5,0 -items/leather,70,15,0 -items/leather_boots,70,15,0 -items/leather_boots_overlay,70,15,0 -items/leather_chestplate,70,15,0 -items/leather_chestplate_overlay,70,15,0 -items/leather_helmet,70,15,0 -items/leather_helmet_overlay,70,15,0 -items/leather_leggings,70,15,0 -items/leather_leggings_overlay,70,15,0 -items/magma_cream,90,20,32 -items/map_empty,64,10,0 -items/map_filled,64,10,0 -items/melon,90,15,0 -items/melon_speckled,90,25,20 -items/minecart_chest,110,230,0 -items/minecart_command_block,110,230,0 -items/minecart_furnace,110,230,0 -items/minecart_hopper,110,230,0 -items/minecart_normal,110,230,0 -items/minecart_tnt,110,230,0 -items/mushroom_stew,90,10,0 -items/mutton_cooked,70,10,0 -items/mutton_raw,50,20,0 -items/name_tag,64,5,0 -items/nether_star,90,20,50 -items/nether_wart,45,20,0 -items/netherbrick,37,15,0 -items/painting,70,20,0 -items/paper,64,10,0 -items/porkchop_cooked,70,10,0 -items/porkchop_raw,50,20,0 -items/potato,60,10,0 -items/potato_baked,60,10,0 -items/potato_poisonous,60,5,0 -items/potion_bottle_drinkable,210,100,0 -items/potion_bottle_empty,210,100,0 -items/potion_bottle_splash,210,100,0 -items/potion_overlay,210,100,0 -items/prismarine_crystals,230,90,0 -items/prismarine_shard,230,20,0 -items/pumpkin_pie,90,25,0 -items/quartz,220,60,0 -items/rabbit_cooked,70,10,0 -items/rabbit_foot,64,5,0 -items/rabbit_hide,70,15,0 -items/rabbit_raw,50,20,0 -items/rabbit_stew,90,10,0 -items/record_11,135,40,0 -items/record_13,135,40,0 -items/record_blocks,135,40,0 -items/record_cat,135,40,0 -items/record_chirp,135,40,0 -items/record_far,135,40,0 -items/record_mall,135,40,0 -items/record_mellohi,135,40,0 -items/record_stal,135,40,0 -items/record_strad,135,40,0 -items/record_wait,135,40,0 -items/record_ward,135,40,0 -items/redstone_dust,70,10,0 -items/reeds,70,7,0 -items/repeater,115,5,0 -items/rotten_flesh,70,15,0 -items/saddle,70,15,0 -items/seeds_melon,64,5,0 -items/seeds_pumpkin,64,5,0 -items/seeds_wheat,64,5,0 -items/shears,90,230,0 -items/sign,90,15,0 -items/slimeball,150,50,0 -items/snowball,130,20,0 -items/spawn_egg,75,15,0 -items/spawn_egg_overlay,75,15,0 -items/spider_eye,100,30,0 -items/spider_eye_fermented,100,40,0 -items/stick,80,10,0 -items/stone_axe,80,10,0 -items/stone_hoe,80,10,0 -items/stone_pickaxe,80,10,0 -items/stone_shovel,80,10,0 -items/stone_sword,80,10,0 -items/string,80,25,0 -items/sugar,100,30,0 -items/wheat,110,15,0 -items/wood_axe,80,10,0 -items/wood_hoe,80,10,0 -items/wood_pickaxe,80,10,0 -items/wood_shovel,80,10,0 -items/wood_sword,80,10,0 -items/wooden_armorstand,80,10,0 +textureId,smoothness,reflectance,emission,subsurf_scattering +blocks/anvil_base,158,230,0,0 +blocks/anvil_top_damaged_0,150,230,0,0 +blocks/anvil_top_damaged_1,143,230,0,0 +blocks/anvil_top_damaged_2,158,230,0,0 +blocks/beacon,158,16,200,0 +blocks/bed_feet_end,31,10,0,0 +blocks/bed_feet_side,28,9,0,0 +blocks/bed_feet_top,61,13,0,0 +blocks/bed_head_end,31,10,0,0 +blocks/bed_head_side,31,9,0,0 +blocks/bed_head_top,80,13,0,0 +blocks/bedrock,46,5,0,0 +blocks/bookshelf,64,13,0,0 +blocks/brewing_stand,130,47,0,0 +blocks/brewing_stand_base,149,10,0,0 +blocks/brick,37,8,0,0 +blocks/cactus_bottom,60,7,0,100 +blocks/cactus_side,71,7,0,100 +blocks/cactus_top,71,7,0,100 +blocks/cake_bottom,64,4,0,0 +blocks/cake_inner,29,3,0,0 +blocks/cake_side,43,3,0,0 +blocks/cake_top,127,10,0,0 +blocks/carrots_stage_0,71,7,0,150 +blocks/carrots_stage_1,71,7,0,150 +blocks/carrots_stage_2,71,7,0,150 +blocks/carrots_stage_3,71,7,0,150 +blocks/cauldron_bottom,38,230,0,0 +blocks/cauldron_inner,122,230,0,0 +blocks/cauldron_side,110,230,0,0 +blocks/cauldron_top,76,230,0,0 +blocks/clay,133,13,0,0 +blocks/coal_block,155,20,0,0 +blocks/coal_ore,84,10,0,0 +blocks/coarse_dirt,50,4,0,0 +blocks/cobblestone,83,10,0,0 +blocks/cobblestone_mossy,117,8,0,0 +blocks/cocoa_stage_0,133,8,0,0 +blocks/cocoa_stage_1,146,8,0,0 +blocks/cocoa_stage_2,156,8,0,0 +blocks/command_block,136,99,8,0 +blocks/comparator_off,115,5,0,0 +blocks/comparator_on,115,5,14,0 +blocks/crafting_table_front,113,29,0,0 +blocks/crafting_table_side,104,20,0,0 +blocks/crafting_table_top,97,14,0,0 +blocks/daylight_detector_inverted_top,95,6,0,0 +blocks/daylight_detector_side,70,5,0,0 +blocks/daylight_detector_top,95,6,0,0 +blocks/deadbush,18,10,0,100 +blocks/diamond_block,235,150,0,0 +blocks/diamond_ore,90,25,0,0 +blocks/dirt,50,4,0,0 +blocks/dirt_podzol_side,27,1,0,0 +blocks/dirt_podzol_top,47,15,0,0 +blocks/dispenser_front_horizontal,138,9,0,0 +blocks/dispenser_front_vertical,114,9,0,0 +blocks/door_acacia_lower,92,2,0,0 +blocks/door_acacia_upper,91,5,0,0 +blocks/door_birch_lower,79,14,0,0 +blocks/door_birch_upper,110,14,0,0 +blocks/door_dark_oak_lower,88,3,0,0 +blocks/door_dark_oak_upper,87,4,0,0 +blocks/door_iron_lower,214,230,0,0 +blocks/door_iron_upper,214,230,0,0 +blocks/door_jungle_lower,56,2,0,0 +blocks/door_jungle_upper,58,5,0,0 +blocks/door_spruce_lower,57,16,0,0 +blocks/door_spruce_upper,58,17,0,0 +blocks/door_wood_lower,70,2,0,0 +blocks/door_wood_upper,74,6,0,0 +blocks/double_plant_fern_bottom,71,7,0,150 +blocks/double_plant_fern_top,71,7,0,150 +blocks/double_plant_grass_bottom,71,7,0,150 +blocks/double_plant_grass_top,71,7,0,150 +blocks/double_plant_paeonia_bottom,71,7,0,150 +blocks/double_plant_paeonia_top,71,7,0,150 +blocks/double_plant_rose_bottom,71,7,0,150 +blocks/double_plant_rose_top,71,7,0,150 +blocks/double_plant_sunflower_back,71,7,0,150 +blocks/double_plant_sunflower_bottom,71,7,0,150 +blocks/double_plant_sunflower_front,71,7,0,150 +blocks/double_plant_sunflower_top,71,7,0,150 +blocks/double_plant_syringa_bottom,71,7,0,150 +blocks/double_plant_syringa_top,71,7,0,150 +blocks/dragon_egg,45,15,16,0 +blocks/dropper_front_horizontal,138,9,0,0 +blocks/dropper_front_vertical,112,9,0,0 +blocks/emerald_block,228,130,0,0 +blocks/emerald_ore,93,26,0,0 +blocks/enchanting_table_bottom,210,120,0,0 +blocks/enchanting_table_side,199,8,0,0 +blocks/enchanting_table_top,118,16,0,0 +blocks/end_stone,107,15,0,0 +blocks/endframe_eye,144,37,46,0 +blocks/endframe_side,141,19,0,0 +blocks/endframe_top,144,13,0,0 +blocks/farmland_dry,60,5,0,0 +blocks/farmland_wet,41,40,0,0 +blocks/fern,71,7,0,150 +blocks/fire_layer_0,30,5,162,0 +blocks/fire_layer_1,30,5,159,0 +blocks/flower_allium,71,7,0,150 +blocks/flower_blue_orchid,71,7,0,150 +blocks/flower_dandelion,71,7,0,150 +blocks/flower_houstonia,71,7,0,150 +blocks/flower_oxeye_daisy,71,7,0,150 +blocks/flower_pot,59,5,0,150 +blocks/flower_rose,71,7,0,150 +blocks/flower_tulip_orange,71,7,0,150 +blocks/flower_tulip_pink,71,7,0,150 +blocks/flower_tulip_red,71,7,0,150 +blocks/flower_tulip_white,71,7,0,150 +blocks/furnace_front_off,102,6,0,0 +blocks/furnace_front_on,102,7,25,0 +blocks/furnace_side,140,10,0,0 +blocks/furnace_top,114,10,0,0 +blocks/glass,210,100,0,0 +blocks/glass_black,230,100,0,0 +blocks/glass_blue,230,100,0,0 +blocks/glass_brown,230,100,0,0 +blocks/glass_cyan,230,100,0,0 +blocks/glass_gray,230,100,0,0 +blocks/glass_green,230,100,0,0 +blocks/glass_light_blue,230,100,0,0 +blocks/glass_lime,230,100,0,0 +blocks/glass_magenta,230,100,0,0 +blocks/glass_orange,230,100,0,0 +blocks/glass_pane_top,230,100,0,0 +blocks/glass_pane_top_black,230,100,0,0 +blocks/glass_pane_top_blue,230,100,0,0 +blocks/glass_pane_top_brown,230,100,0,0 +blocks/glass_pane_top_cyan,230,100,0,0 +blocks/glass_pane_top_gray,230,100,0,0 +blocks/glass_pane_top_green,230,100,0,0 +blocks/glass_pane_top_light_blue,230,100,0,0 +blocks/glass_pane_top_lime,230,100,0,0 +blocks/glass_pane_top_magenta,230,100,0,0 +blocks/glass_pane_top_orange,230,100,0,0 +blocks/glass_pane_top_pink,230,100,0,0 +blocks/glass_pane_top_purple,230,100,0,0 +blocks/glass_pane_top_red,230,100,0,0 +blocks/glass_pane_top_silver,230,100,0,0 +blocks/glass_pane_top_white,230,100,0,0 +blocks/glass_pane_top_yellow,230,100,0,0 +blocks/glass_pink,230,100,0,0 +blocks/glass_purple,230,100,0,0 +blocks/glass_red,230,100,0,0 +blocks/glass_silver,230,100,0,0 +blocks/glass_white,230,100,0,0 +blocks/glass_yellow,230,100,0,0 +blocks/glowstone,194,60,150,0 +blocks/gold_block,218,231,0,0 +blocks/gold_ore,96,37,0,0 +blocks/grass_side,50,4,0,0 +blocks/grass_side_overlay,12,5,0,0 +blocks/grass_side_snowed,146,15,0,0 +blocks/grass_top,12,5,0,0 +blocks/gravel,68,5,0,0 +blocks/hardened_clay,59,5,0,0 +blocks/hardened_clay_stained_black,59,5,0,0 +blocks/hardened_clay_stained_blue,59,5,0,0 +blocks/hardened_clay_stained_brown,59,5,0,0 +blocks/hardened_clay_stained_cyan,59,5,0,0 +blocks/hardened_clay_stained_gray,59,5,0,0 +blocks/hardened_clay_stained_green,59,5,0,0 +blocks/hardened_clay_stained_light_blue,59,5,0,0 +blocks/hardened_clay_stained_lime,59,5,0,0 +blocks/hardened_clay_stained_magenta,59,5,0,0 +blocks/hardened_clay_stained_orange,59,5,0,0 +blocks/hardened_clay_stained_pink,59,5,0,0 +blocks/hardened_clay_stained_purple,59,5,0,0 +blocks/hardened_clay_stained_red,59,5,0,0 +blocks/hardened_clay_stained_silver,59,5,0,0 +blocks/hardened_clay_stained_white,59,5,0,0 +blocks/hardened_clay_stained_yellow,59,5,0,0 +blocks/hay_block_side,112,12,0,50 +blocks/hay_block_top,114,13,0,50 +blocks/hopper_inside,71,230,0,0 +blocks/hopper_outside,173,230,0,0 +blocks/hopper_top,105,230,0,0 +blocks/ice,180,70,0,0 +blocks/ice_packed,168,40,0,150 +blocks/iron_bars,64,230,0,0 +blocks/iron_block,232,230,0,0 +blocks/iron_ore,95,15,0,0 +blocks/iron_trapdoor,214,230,0,0 +blocks/itemframe_background,0,0,0,0 +blocks/jukebox_side,89,13,0,0 +blocks/jukebox_top,83,13,0,0 +blocks/ladder,30,6,0,0 +blocks/lapis_block,222,20,0,0 +blocks/lapis_ore,96,10,0,0 +blocks/lava_flow,30,15,200,0 +blocks/lava_still,30,15,200,0 +blocks/leaves_acacia,60,10,0,200 +blocks/leaves_big_oak,105,4,0,170 +blocks/leaves_birch,73,5,0,200 +blocks/leaves_jungle,71,7,0,200 +blocks/leaves_oak,77,6,0,200 +blocks/leaves_spruce,59,6,0,170 +blocks/lever,97,10,0,0 +blocks/log_acacia,15,10,0,0 +blocks/log_acacia_top,9,10,0,0 +blocks/log_big_oak,26,10,0,0 +blocks/log_big_oak_top,20,10,0,0 +blocks/log_birch,24,5,0,0 +blocks/log_birch_top,20,10,0,0 +blocks/log_jungle,14,10,0,0 +blocks/log_jungle_top,20,10,0,0 +blocks/log_oak,18,10,0,0 +blocks/log_oak_top,20,10,0,0 +blocks/log_spruce,23,10,0,0 +blocks/log_spruce_top,21,10,0,0 +blocks/melon_side,156,14,0,0 +blocks/melon_stem_connected,18,10,0,0 +blocks/melon_stem_disconnected,18,10,0,0 +blocks/melon_top,153,14,0,0 +blocks/mob_spawner,71,230,0,0 +blocks/mushroom_block_inside,151,10,0,0 +blocks/mushroom_block_skin_brown,96,10,0,0 +blocks/mushroom_block_skin_red,148,10,0,0 +blocks/mushroom_block_skin_stem,142,10,0,0 +blocks/mushroom_brown,96,10,0,100 +blocks/mushroom_red,148,10,0,100 +blocks/mycelium_side,63,15,0,0 +blocks/mycelium_top,70,15,0,0 +blocks/nether_brick,37,15,0,0 +blocks/nether_wart_stage_0,11,5,0,100 +blocks/nether_wart_stage_1,30,5,0,100 +blocks/nether_wart_stage_2,39,5,0,100 +blocks/netherrack,20,10,0,0 +blocks/noteblock,89,13,0,0 +blocks/obsidian,210,120,0,0 +blocks/piston_bottom,80,4,0,0 +blocks/piston_inner,87,4,0,0 +blocks/piston_side,104,22,0,0 +blocks/piston_top_normal,109,25,0,0 +blocks/piston_top_sticky,116,28,0,0 +blocks/planks_acacia,92,11,0,0 +blocks/planks_big_oak,92,11,0,0 +blocks/planks_birch,92,11,0,0 +blocks/planks_jungle,92,11,0,0 +blocks/planks_oak,92,11,0,0 +blocks/planks_spruce,92,11,0,0 +blocks/portal,71,7,120,0 +blocks/potatoes_stage_0,71,7,0,150 +blocks/potatoes_stage_1,71,7,0,150 +blocks/potatoes_stage_2,71,7,0,150 +blocks/potatoes_stage_3,71,7,0,150 +blocks/prismarine_bricks,230,20,0,0 +blocks/prismarine_dark,194,26,0,0 +blocks/prismarine_rough,115,33,0,0 +blocks/pumpkin_face_off,56,15,0,0 +blocks/pumpkin_face_on,56,15,74,0 +blocks/pumpkin_side,52,15,0,0 +blocks/pumpkin_stem_connected,18,10,0,100 +blocks/pumpkin_stem_disconnected,18,10,0,100 +blocks/pumpkin_top,130,15,0,0 +blocks/quartz_block_bottom,220,60,0,100 +blocks/quartz_block_chiseled,220,60,0,100 +blocks/quartz_block_chiseled_top,220,60,0,100 +blocks/quartz_block_lines,220,60,0,100 +blocks/quartz_block_lines_top,220,60,0,100 +blocks/quartz_block_side,220,60,0,100 +blocks/quartz_block_top,220,60,0,100 +blocks/quartz_ore,45,10,0,0 +blocks/rail_activator,84,50,0,0 +blocks/rail_activator_powered,84,50,32,0 +blocks/rail_detector,102,62,0,0 +blocks/rail_detector_powered,102,62,32,0 +blocks/rail_golden,112,75,0,0 +blocks/rail_golden_powered,112,75,48,0 +blocks/rail_normal,85,50,0,0 +blocks/rail_normal_turned,85,50,0,0 +blocks/red_sand,32,2,0,0 +blocks/red_sandstone_bottom,52,10,0,0 +blocks/red_sandstone_carved,90,10,0,0 +blocks/red_sandstone_normal,43,10,0,0 +blocks/red_sandstone_smooth,90,10,0,0 +blocks/red_sandstone_top,128,15,0,0 +blocks/redstone_block,184,15,0,0 +blocks/redstone_dust_cross,100,5,0,0 +blocks/redstone_dust_cross_overlay,100,5,0,0 +blocks/redstone_dust_line,100,5,0,0 +blocks/redstone_dust_line_overlay,100,5,0,0 +blocks/redstone_lamp_off,191,20,0,0 +blocks/redstone_lamp_on,191,20,132,0 +blocks/redstone_ore,88,10,0,0 +blocks/redstone_torch_off,135,9,0,0 +blocks/redstone_torch_on,135,9,64,0 +blocks/reeds,71,7,0,150 +blocks/repeater_off,151,5,0,0 +blocks/repeater_on,151,5,32,0 +blocks/sand,46,8,0,0 +blocks/sandstone_bottom,52,8,0,0 +blocks/sandstone_carved,113,10,0,0 +blocks/sandstone_normal,43,10,0,0 +blocks/sandstone_smooth,90,10,0,0 +blocks/sandstone_top,128,15,0,0 +blocks/sapling_acacia,71,7,0,150 +blocks/sapling_birch,71,7,0,150 +blocks/sapling_jungle,71,7,0,150 +blocks/sapling_oak,71,7,0,150 +blocks/sapling_roofed_oak,71,7,0,150 +blocks/sapling_spruce,71,7,0,150 +blocks/sea_lantern,194,60,80,0 +blocks/slime,209,0,0,200 +blocks/snow,146,15,0,100 +blocks/soul_sand,35,15,0,0 +blocks/sponge,38,11,0,100 +blocks/sponge_wet,240,16,0,80 +blocks/stone,77,10,0,0 +blocks/stone_andesite,50,9,0,0 +blocks/stone_andesite_smooth,230,20,0,0 +blocks/stone_diorite,54,9,0,0 +blocks/stone_diorite_smooth,230,20,0,0 +blocks/stone_granite,38,9,0,0 +blocks/stone_granite_smooth,230,20,0,0 +blocks/stone_slab_side,120,20,0,0 +blocks/stone_slab_top,120,20,0,0 +blocks/stonebrick,70,10,0,0 +blocks/stonebrick_carved,58,10,0,0 +blocks/stonebrick_cracked,37,10,0,0 +blocks/stonebrick_mossy,53,9,0,0 +blocks/tallgrass,71,7,0,150 +blocks/tnt_bottom,78,5,0,0 +blocks/tnt_side,94,15,0,0 +blocks/tnt_top,61,5,0,0 +blocks/torch_on,135,9,128,0 +blocks/trapdoor,43,5,0,0 +blocks/trip_wire,230,20,0,0 +blocks/trip_wire_source,132,142,0,0 +blocks/vine,116,13,0,150 +blocks/water_flow,220,40,0,0 +blocks/water_still,220,40,0,0 +blocks/waterlily,78,15,0,150 +blocks/web,230,20,0,200 +blocks/wheat_stage_0,71,7,0,150 +blocks/wheat_stage_1,71,7,0,150 +blocks/wheat_stage_2,71,7,0,150 +blocks/wheat_stage_3,71,7,0,150 +blocks/wheat_stage_4,71,7,0,150 +blocks/wheat_stage_5,71,7,0,150 +blocks/wheat_stage_6,71,7,0,150 +blocks/wheat_stage_7,71,7,0,150 +blocks/wool_colored_black,50,10,0,0 +blocks/wool_colored_blue,50,10,0,0 +blocks/wool_colored_brown,50,10,0,0 +blocks/wool_colored_cyan,50,10,0,0 +blocks/wool_colored_gray,50,10,0,0 +blocks/wool_colored_green,50,10,0,0 +blocks/wool_colored_light_blue,50,10,0,0 +blocks/wool_colored_lime,50,10,0,0 +blocks/wool_colored_magenta,50,10,0,0 +blocks/wool_colored_orange,50,10,0,0 +blocks/wool_colored_pink,50,10,0,0 +blocks/wool_colored_purple,50,10,0,0 +blocks/wool_colored_red,50,10,0,0 +blocks/wool_colored_silver,50,10,0,0 +blocks/wool_colored_white,50,10,0,0 +blocks/wool_colored_yellow,50,10,0,0 +default,64,2,0,0 +items/apple,90,25,0,0 +items/apple_golden,150,231,0,0 +items/arrow,64,2,0,0 +items/barrier,64,2,0,0 +items/bed,80,15,0,0 +items/beef_cooked,70,10,0,0 +items/beef_raw,50,20,0,0 +items/blaze_powder,64,15,30,0 +items/blaze_rod,75,20,30,0 +items/boat,90,11,0,0 +items/bone,110,40,0,0 +items/book_enchanted,64,10,0,0 +items/book_normal,64,10,0,0 +items/book_writable,64,10,0,0 +items/book_written,64,10,0,0 +items/bow_pulling_0,80,15,0,0 +items/bow_pulling_1,80,15,0,0 +items/bow_pulling_2,80,15,0,0 +items/bow_standby,80,15,0,0 +items/bowl,90,10,0,0 +items/bread,75,5,0,0 +items/brewing_stand,64,10,0,0 +items/brick,40,8,0,0 +items/bucket_empty,110,230,0,0 +items/bucket_lava,110,230,0,0 +items/bucket_milk,110,230,0,0 +items/bucket_water,110,230,32,0 +items/cake,70,10,0,0 +items/carrot,64,5,0,0 +items/carrot_golden,90,231,0,0 +items/carrot_on_a_stick,80,10,0,0 +items/cauldron,75,230,0,0 +items/chainmail_boots,100,230,0,0 +items/chainmail_chestplate,100,230,0,0 +items/chainmail_helmet,100,230,0,0 +items/chainmail_leggings,100,230,0,0 +items/charcoal,130,20,0,0 +items/chicken_cooked,64,20,0,0 +items/chicken_raw,50,20,0,0 +items/clay_ball,120,13,0,0 +items/clock,90,230,0,0 +items/coal,130,20,0,0 +items/comparator,115,5,0,0 +items/compass,80,230,0,0 +items/cookie,64,5,0,0 +items/diamond,200,120,0,0 +items/diamond_axe,80,10,0,0 +items/diamond_boots,200,120,0,0 +items/diamond_chestplate,200,120,0,0 +items/diamond_helmet,200,120,0,0 +items/diamond_hoe,80,10,0,0 +items/diamond_horse_armor,200,120,0,0 +items/diamond_leggings,200,120,0,0 +items/diamond_pickaxe,80,10,0,0 +items/diamond_shovel,80,10,0,0 +items/diamond_sword,80,10,0,0 +items/door_acacia,66,25,0,0 +items/door_birch,66,25,0,0 +items/door_dark_oak,66,25,0,0 +items/door_iron,200,230,0,0 +items/door_jungle,66,25,0,0 +items/door_spruce,66,25,0,0 +items/door_wood,66,25,0,0 +items/dye_powder_black,64,5,0,0 +items/dye_powder_blue,64,5,0,0 +items/dye_powder_brown,64,5,0,0 +items/dye_powder_cyan,64,5,0,0 +items/dye_powder_gray,64,5,0,0 +items/dye_powder_green,64,5,0,0 +items/dye_powder_light_blue,64,5,0,0 +items/dye_powder_lime,64,5,0,0 +items/dye_powder_magenta,64,5,0,0 +items/dye_powder_orange,64,5,0,0 +items/dye_powder_pink,64,5,0,0 +items/dye_powder_purple,64,5,0,0 +items/dye_powder_red,64,5,0,0 +items/dye_powder_silver,64,5,0,0 +items/dye_powder_white,64,5,0,0 +items/dye_powder_yellow,64,5,0,0 +items/egg,75,15,0,0 +items/emerald,228,130,0,0 +items/ender_eye,80,10,40,0 +items/ender_pearl,80,10,0,0 +items/experience_bottle,210,100,0,0 +items/feather,64,10,0,0 +items/fireball,64,5,40,0 +items/fireworks,80,20,0,0 +items/fireworks_charge,70,15,0,0 +items/fireworks_charge_overlay,70,15,0,0 +items/fish_clownfish_raw,90,25,0,0 +items/fish_cod_cooked,70,10,0,0 +items/fish_cod_raw,90,25,0,0 +items/fish_pufferfish_raw,90,25,0,0 +items/fish_salmon_cooked,70,10,0,0 +items/fish_salmon_raw,90,25,0,0 +items/fishing_rod_cast,80,10,0,0 +items/fishing_rod_uncast,80,10,0,0 +items/flint,110,30,0,0 +items/flint_and_steel,90,230,0,0 +items/flower_pot,80,5,0,0 +items/ghast_tear,120,50,0,0 +items/glowstone_dust,120,20,70,0 +items/gold_axe,80,10,0,0 +items/gold_boots,200,231,0,0 +items/gold_chestplate,200,231,0,0 +items/gold_helmet,200,231,0,0 +items/gold_hoe,80,10,0,0 +items/gold_horse_armor,200,231,0,0 +items/gold_ingot,200,231,0,0 +items/gold_leggings,200,231,0,0 +items/gold_nugget,200,231,0,0 +items/gold_pickaxe,80,10,0,0 +items/gold_shovel,80,10,0,0 +items/gold_sword,80,10,0,0 +items/gunpowder,64,15,0,0 +items/hopper,90,230,0,0 +items/iron_axe,80,10,0,0 +items/iron_boots,200,230,0,0 +items/iron_chestplate,200,230,0,0 +items/iron_helmet,200,230,0,0 +items/iron_hoe,80,10,0,0 +items/iron_horse_armor,200,230,0,0 +items/iron_ingot,200,230,0,0 +items/iron_leggings,200,230,0,0 +items/iron_pickaxe,80,10,0,0 +items/iron_shovel,80,10,0,0 +items/iron_sword,80,10,0,0 +items/item_frame,70,20,0,0 +items/lead,64,5,0,0 +items/leather,70,15,0,0 +items/leather_boots,70,15,0,0 +items/leather_boots_overlay,70,15,0,0 +items/leather_chestplate,70,15,0,0 +items/leather_chestplate_overlay,70,15,0,0 +items/leather_helmet,70,15,0,0 +items/leather_helmet_overlay,70,15,0,0 +items/leather_leggings,70,15,0,0 +items/leather_leggings_overlay,70,15,0,0 +items/magma_cream,90,20,32,0 +items/map_empty,64,10,0,0 +items/map_filled,64,10,0,0 +items/melon,90,15,0,0 +items/melon_speckled,90,25,20,0 +items/minecart_chest,110,230,0,0 +items/minecart_command_block,110,230,0,0 +items/minecart_furnace,110,230,0,0 +items/minecart_hopper,110,230,0,0 +items/minecart_normal,110,230,0,0 +items/minecart_tnt,110,230,0,0 +items/mushroom_stew,90,10,0,0 +items/mutton_cooked,70,10,0,0 +items/mutton_raw,50,20,0,0 +items/name_tag,64,5,0,0 +items/nether_star,90,20,50,0 +items/nether_wart,45,20,0,0 +items/netherbrick,37,15,0,0 +items/painting,70,20,0,0 +items/paper,64,10,0,0 +items/porkchop_cooked,70,10,0,0 +items/porkchop_raw,50,20,0,0 +items/potato,60,10,0,0 +items/potato_baked,60,10,0,0 +items/potato_poisonous,60,5,0,0 +items/potion_bottle_drinkable,210,100,0,0 +items/potion_bottle_empty,210,100,0,0 +items/potion_bottle_splash,210,100,0,0 +items/potion_overlay,210,100,0,0 +items/prismarine_crystals,230,90,0,0 +items/prismarine_shard,230,20,0,0 +items/pumpkin_pie,90,25,0,0 +items/quartz,220,60,0,0 +items/rabbit_cooked,70,10,0,0 +items/rabbit_foot,64,5,0,0 +items/rabbit_hide,70,15,0,0 +items/rabbit_raw,50,20,0,0 +items/rabbit_stew,90,10,0,0 +items/record_11,135,40,0,0 +items/record_13,135,40,0,0 +items/record_blocks,135,40,0,0 +items/record_cat,135,40,0,0 +items/record_chirp,135,40,0,0 +items/record_far,135,40,0,0 +items/record_mall,135,40,0,0 +items/record_mellohi,135,40,0,0 +items/record_stal,135,40,0,0 +items/record_strad,135,40,0,0 +items/record_wait,135,40,0,0 +items/record_ward,135,40,0,0 +items/redstone_dust,70,10,0,0 +items/reeds,70,7,0,0 +items/repeater,115,5,0,0 +items/rotten_flesh,70,15,0,0 +items/saddle,70,15,0,0 +items/seeds_melon,64,5,0,0 +items/seeds_pumpkin,64,5,0,0 +items/seeds_wheat,64,5,0,0 +items/shears,90,230,0,0 +items/sign,90,15,0,0 +items/slimeball,150,50,0,0 +items/snowball,130,20,0,0 +items/spawn_egg,75,15,0,0 +items/spawn_egg_overlay,75,15,0,0 +items/spider_eye,100,30,0,0 +items/spider_eye_fermented,100,40,0,0 +items/stick,80,10,0,0 +items/stone_axe,80,10,0,0 +items/stone_hoe,80,10,0,0 +items/stone_pickaxe,80,10,0,0 +items/stone_shovel,80,10,0,0 +items/stone_sword,80,10,0,0 +items/string,80,25,0,0 +items/sugar,100,30,0,0 +items/wheat,110,15,0,0 +items/wood_axe,80,10,0,0 +items/wood_hoe,80,10,0,0 +items/wood_pickaxe,80,10,0,0 +items/wood_shovel,80,10,0,0 +items/wood_sword,80,10,0,0 +items/wooden_armorstand,80,10,0,0 diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/moon_render.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/moon_render.fsh index 501da6c..4615c21 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/moon_render.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/moon_render.fsh @@ -1,7 +1,7 @@ #line 2 /* - * Copyright (c) 2023 lax1dude. All Rights Reserved. + * Copyright (c) 2023-2025 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 @@ -31,21 +31,40 @@ uniform vec3 u_lightDir3f; uniform sampler2D u_moonTextures; uniform sampler2D u_cloudsTexture; +#define MOON_SURFACE 0.9 +#define MOON_MARGIN 0.0125 + void main() { gl_FragDepth = 0.0; - vec4 color4f = texture(u_moonTextures, v_position2f); - if(color4f.a < 0.99) { - discard; + vec2 coord2f = v_position2f * 2.0 - 1.0; + + vec2 texUV = (coord2f * (1.0 / (MOON_SURFACE + MOON_MARGIN))) * 0.5 + 0.5; + vec4 color4f = vec4(0.0); + if(texUV == clamp(texUV, vec2(0.0), vec2(1.0))) { + color4f = texture(u_moonTextures, texUV); } + vec3 moonNormal3f; moonNormal3f.xy = color4f.rg * 2.0 - 1.0; moonNormal3f.z = sqrt(1.0 - dot(moonNormal3f.xy, moonNormal3f.xy)); - float NdotV = dot(moonNormal3f, u_lightDir3f); - output4f = vec4(u_moonColor3f * (color4f.b * color4f.b * mix(max(NdotV, 0.0), max(NdotV + 0.45, 0.0) * 0.5f, max(u_lightDir3f.z * u_lightDir3f.z * -u_lightDir3f.z, 0.0))), 0.0); + float NdotV = max(dot(moonNormal3f, u_lightDir3f), 0.0); vec3 viewDir = normalize(v_position3f); + + vec2 surfaceCoord2f = coord2f * (1.0 / MOON_SURFACE); + vec3 moonAtmosNormalInner3f = vec3(surfaceCoord2f, sqrt(1.0 - dot(surfaceCoord2f, surfaceCoord2f))); + vec3 moonAtmosNormalOuter3f = vec3(surfaceCoord2f, sqrt(-1.0 + dot(surfaceCoord2f, surfaceCoord2f))); + float NdotVInner = max(dot(moonAtmosNormalInner3f, u_lightDir3f), 0.0); + float NdotVOuter = max(dot(moonAtmosNormalOuter3f, u_lightDir3f) + 0.65, 0.0); + + float atmosInner = max((MOON_SURFACE * 0.2) / moonAtmosNormalInner3f.z - 0.2, 0.0); + float atmosOuter = max((MOON_SURFACE * 0.2) / moonAtmosNormalOuter3f.z - 0.4, 0.0); + + output4f = vec4(u_moonColor3f * (color4f.b * color4f.b * NdotV + (NdotVInner * atmosInner + NdotVOuter * atmosOuter * vec3(0.8, 0.825, 0.9)) * (0.5 - max(u_lightDir3f.z, 0.0) * 0.25)), 0.0); + if(viewDir.y < 0.01) { return; } + vec2 cloudSampleCoord2f = (viewDir.xz / (viewDir.y + 1.0)) * 0.975 * 0.5 + 0.5; vec4 cloudSample = textureLod(u_cloudsTexture, cloudSampleCoord2f, 0.0); output4f.rgb = mix(output4f.rgb, output4f.rgb * max(cloudSample.a * 1.25 - 0.25, 0.0), smoothstep(0.0, 1.0, min(viewDir.y * 8.0, 1.0))); diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/realistic_water_render.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/realistic_water_render.fsh index d8feb44..88838f8 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/realistic_water_render.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/realistic_water_render.fsh @@ -19,7 +19,6 @@ precision highp sampler2DShadow; in vec4 v_position4f; -in vec3 v_positionClip3f; #ifdef COMPILE_TEXTURE_ATTRIB in vec2 v_texture2f; @@ -102,14 +101,14 @@ vec2(-0.077, 0.995), vec2(0.998, 0.015), vec2(-0.116, -0.987), vec2(-0.916, 0.359), vec2(-0.697, -0.511), vec2(0.740, -0.612), vec2(0.675, 0.682)); -#define SMOOTH_SHADOW_SAMPLES 1.0 / 8.0 -#define SMOOTH_SHADOW_RADIUS 0.00075 +#define SMOOTH_SHADOW_SAMPLES (1.0 / 8.0) +#define SMOOTH_SHADOW_RADIUS 0.000488 #define SMOOTH_SHADOW_POISSON_SAMPLE(idx, tex, lod, vec3Pos, accum, tmpVec2)\ tmpVec2 = vec3Pos.xy + POISSON_DISK[idx] * SMOOTH_SHADOW_RADIUS;\ tmpVec2 = clamp(tmpVec2, vec2(0.001), vec2(0.999));\ tmpVec2.y += lod;\ tmpVec2.y *= SUN_SHADOW_MAP_FRAC;\ - accum += textureLod(tex, vec3(tmpVec2, vec3Pos.z), 0.0) * SMOOTH_SHADOW_SAMPLES; + accum += textureLod(tex, vec3(tmpVec2, vec3Pos.z + 0.0001), 0.0); #endif #endif @@ -120,13 +119,11 @@ uniform sampler2D u_refractionMap; uniform sampler2D u_brdfLUT; uniform sampler2D u_normalMap; -#ifdef COMPILE_FOG_LIGHT_SHAFTS -uniform sampler2D u_lightShaftsTexture; -#endif - uniform vec4 u_waterWindOffset4f; uniform vec3 u_wavingBlockOffset3f; +#EAGLER INCLUDE (4) "eagler:glsl/deferred/lib/branchless_comparison.glsl" + #define WATER_ROUGHNESS 0.05 #define WATER_F0 0.5 @@ -301,16 +298,15 @@ void main() { float skyLight = max(lightmapCoords2f.g * 2.0 - 1.0, 0.0); float shadowSample = 1.0; vec4 shadowWorldPos4f = worldPosition4f; - shadowWorldPos4f.xyz += normalVector3f * 0.05; + shadowWorldPos4f.xyz += normalVector3f * 0.1; vec4 shadowTexPos4f; vec2 tmpVec2; for(;;) { shadowTexPos4f = u_sunShadowMatrixLOD04f * shadowWorldPos4f; if(shadowTexPos4f.xyz == clamp(shadowTexPos4f.xyz, vec3(0.005), vec3(0.995))) { - shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowTexPos4f.xy * vec2(1.0, SUN_SHADOW_MAP_FRAC), shadowTexPos4f.z), 0.0); + shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowTexPos4f.xy * vec2(1.0, SUN_SHADOW_MAP_FRAC), shadowTexPos4f.z + 0.0001), 0.0); #ifdef COMPILE_SUN_SHADOW_SMOOTH - shadowSample *= SMOOTH_SHADOW_SAMPLES; SMOOTH_SHADOW_POISSON_SAMPLE(0, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(1, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(2, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) @@ -318,7 +314,7 @@ void main() { SMOOTH_SHADOW_POISSON_SAMPLE(4, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(5, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(6, u_sunShadowDepthTexture, 0.0, shadowTexPos4f.xyz, shadowSample, tmpVec2) - shadowSample = max(shadowSample * 2.0 - 1.0, 0.0); + shadowSample *= SMOOTH_SHADOW_SAMPLES; #endif break; } @@ -356,8 +352,8 @@ void main() { lightmapCoords2f *= lightmapCoords2f; float e = 0.0; - e += envMapSample4f.g <= 0.0 ? 0.0 : 1.0; - e += lightmapCoords2f.y > 0.5 ? 0.0 : 1.0; + e += COMPARE_GT_0_ANY(envMapSample4f.g, 0.0); + e += COMPARE_LT_0_ANY(lightmapCoords2f.y, 0.5); //e += abs(normalVector3f.y) > 0.1 ? 0.0 : 1.0; if(e == 0.0) { vec3 reflectDir = reflect(worldDirection4f.xyz, normalVector3f); @@ -370,8 +366,8 @@ void main() { vec4 sample2 = textureLod(u_environmentMap, reflectDir.xz * vec2(0.5, -0.25) + vec2(0.5, 0.75), 0.0); envMapSample4f = vec4(mix(sample1.rgb, sample2.rgb, smoothstep(0.0, 1.0, reflectDir.y * -12.5 + 0.5)).rgb, min(sample1.a, sample2.a)); }else { - reflectDir.xz *= vec2(0.5, reflectDir.y > 0.0 ? 0.25 : -0.25); - reflectDir.xz += vec2(0.5, reflectDir.y > 0.0 ? 0.25 : 0.75); + reflectDir.xz *= vec2(0.5, COMPARE_GT_C_C(reflectDir.y, 0.0, 0.25, -0.25)); + reflectDir.xz += vec2(0.5, COMPARE_GT_C_C(reflectDir.y, 0.0, 0.25, 0.75)); envMapSample4f = textureLod(u_environmentMap, reflectDir.xz, 0.0); } envMapSample4f.rgb *= (lightmapCoords2f.y * 2.0 - 1.0); @@ -405,47 +401,11 @@ void main() { #endif - // ============ CACLULATE FOG ============= // - - vec4 fogBlend4f = vec4(0.0); - while(u_fogParameters4f.x > 0.0) { - float atmos = u_fogParameters4f.x >= 4.0 ? 4.0 : 0.0; - float type = u_fogParameters4f.x - atmos; - fogBlend4f = mix(u_fogColorLight4f, u_fogColorDark4f, lightmapCoords2f.g); - - float f, l = length(v_position4f.xyz); - if(type == 1.0) { - f = (l - u_fogParameters4f.z) / (u_fogParameters4f.w - u_fogParameters4f.z); - }else { - f = 1.0 - exp(-u_fogParameters4f.y * l); - } - - fogBlend4f.a *= clamp(f, 0.0, 1.0); - - if(atmos == 0.0) { - break; - } - - vec3 atmosSamplePos = v_position4f.xyz / -l; - atmosSamplePos.xz /= abs(atmosSamplePos.y) + 1.0; - atmosSamplePos.xz *= vec2(-0.5, -0.25) * 0.75; - atmosSamplePos.xz += vec2(0.5, 0.25); - - fogBlend4f.rgb *= textureLod(u_irradianceMap, atmosSamplePos.xz, 0.0).rgb + u_fogColorAddSun4f.rgb; - -#ifdef COMPILE_FOG_LIGHT_SHAFTS - fogBlend4f.rgb *= pow(textureLod(u_lightShaftsTexture, (v_positionClip3f.xy / v_positionClip3f.z) * 0.5 + 0.5, 0.0).r * 0.9 + 0.1, 2.25); - fogBlend4f.a = fogBlend4f.a * 0.85 + 0.2; -#endif - break; - } - // ============ OUTPUT COLOR ============== // vec3 blockLight = lightmapCoords2f.r * vec3(1.0, 0.5809, 0.2433) * 2.0 * u_blockSkySunDynamicLightFac4f.x; vec3 skyLight = (lightmapCoords2f.g + 0.05) * vec3(0.9102, 0.9, 1.0) * u_blockSkySunDynamicLightFac4f.y; diffuseColor4f.rgb *= (skyLight + blockLight) * 0.075; - diffuseColor4f.rgb += lightColor3f; - diffuseColor4f.rgb = mix(diffuseColor4f.rgb + refractionSample.rgb, fogBlend4f.rgb, fogBlend4f.a); + diffuseColor4f.rgb += lightColor3f + refractionSample.rgb; output4f = vec4(diffuseColor4f.rgb, 1.0); } diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/realistic_water_render.vsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/realistic_water_render.vsh index 9b33809..1b46e1f 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/realistic_water_render.vsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/realistic_water_render.vsh @@ -20,10 +20,6 @@ in vec3 a_position3f; out vec4 v_position4f; -#ifdef COMPILE_FOG_LIGHT_SHAFTS -out vec3 v_positionClip3f; -#endif - #ifdef COMPILE_TEXTURE_ATTRIB in vec2 a_texture2f; out vec2 v_texture2f; @@ -75,8 +71,4 @@ void main() { #endif gl_Position = u_projectionMat4f * v_position4f; - -#ifdef COMPILE_FOG_LIGHT_SHAFTS - v_positionClip3f = gl_Position.xyw; -#endif } diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/reproject_control.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/reproject_control.fsh index 70e8a4c..3fbcd87 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/reproject_control.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/reproject_control.fsh @@ -84,6 +84,8 @@ uniform vec4 u_nearFarPlane4f; uniform vec4 u_pixelAlignment4f; +#EAGLER INCLUDE (4) "eagler:glsl/deferred/lib/branchless_comparison.glsl" + #define reprojDepthLimit 0.25 #define GET_LINEAR_DEPTH_FROM_VALUE(depthSample) (u_nearFarPlane4f.z / (u_nearFarPlane4f.y + u_nearFarPlane4f.x + (depthSample * 2.0 - 1.0) * u_nearFarPlane4f.w)) @@ -135,9 +137,9 @@ void main() { #ifdef COMPILE_REPROJECT_SSR vec4 materials = textureLod(u_gbufferMaterialTexture, v_position2f2, 0.0); - float f = materials.g < 0.06 ? 1.0 : 0.0; - f += materials.r < 0.5 ? 1.0 : 0.0; - f += materials.a > 0.5 ? 1.0 : 0.0; + float f = COMPARE_LT_0_ANY(materials.g, 0.06); + f += COMPARE_LT_0_ANY(materials.r, 0.5); + f += COMPARE_GT_0_ANY(materials.a, 0.5); if(f > 0.0) { return; } diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/shader_pack_info.json b/desktopRuntime/resources/assets/eagler/glsl/deferred/shader_pack_info.json index 5b3a349..29f5ad1 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/shader_pack_info.json +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/shader_pack_info.json @@ -1,7 +1,7 @@ { "name": "§eHigh Performance PBR", "desc": "Pack made from scratch specifically for this client, designed to give what I call the best balance between quality and performance possible in a browser but obviously that's just my opinion", - "vers": "1.3.1", + "vers": "1.4.0", "author": "lax1dude", "api_vers": 1, "features": [ @@ -19,6 +19,7 @@ "POST_LENS_DISTORION", "POST_LENS_FLARES", "POST_BLOOM", - "POST_FXAA" + "POST_FXAA", + "SUBSURFACE_SCATTERING" ] } \ No newline at end of file diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/shadows_sun.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/shadows_sun.fsh index 834fdba..cbd804b 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/shadows_sun.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/shadows_sun.fsh @@ -60,14 +60,14 @@ vec2(-0.077, 0.995), vec2(0.998, 0.015), vec2(-0.116, -0.987), vec2(-0.916, 0.359), vec2(-0.697, -0.511), vec2(0.740, -0.612), vec2(0.675, 0.682)); -#define SMOOTH_SHADOW_SAMPLES 1.0 / 8.0 -#define SMOOTH_SHADOW_RADIUS 0.00075 +#define SMOOTH_SHADOW_SAMPLES (1.0 / 8.0) +#define SMOOTH_SHADOW_RADIUS 0.000488 #define SMOOTH_SHADOW_POISSON_SAMPLE(idx, tex, lod, vec3Pos, accum, tmpVec2)\ tmpVec2 = vec3Pos.xy + POISSON_DISK[idx] * SMOOTH_SHADOW_RADIUS;\ tmpVec2 = clamp(tmpVec2, vec2(0.001), vec2(0.999));\ tmpVec2.y += lod;\ tmpVec2.y *= SUN_SHADOW_MAP_FRAC;\ - accum += textureLod(tex, vec3(tmpVec2, vec3Pos.z), 0.0) * SMOOTH_SHADOW_SAMPLES; + accum += textureLod(tex, vec3(tmpVec2, vec3Pos.z + 0.0001), 0.0); #endif uniform vec3 u_sunDirection3f; @@ -97,7 +97,7 @@ void main() { worldSpacePosition.xyz -= 1.0; worldSpacePosition = u_inverseViewProjMatrix4f * worldSpacePosition; worldSpacePosition.xyz /= worldSpacePosition.w; - worldSpacePosition.xyz += worldSpaceNormal * 0.05; + worldSpacePosition.xyz += worldSpaceNormal * 0.1; worldSpacePosition.w = 1.0; float skyLight = max(normalVector4f.a * 2.0 - 1.0, 0.0); float shadowSample; @@ -106,9 +106,8 @@ void main() { for(;;) { shadowSpacePosition = u_sunShadowMatrixLOD04f * worldSpacePosition; if(shadowSpacePosition.xyz == clamp(shadowSpacePosition.xyz, vec3(0.005), vec3(0.995))) { - shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowSpacePosition.xy * vec2(1.0, SUN_SHADOW_MAP_FRAC), shadowSpacePosition.z), 0.0); + shadowSample = textureLod(u_sunShadowDepthTexture, vec3(shadowSpacePosition.xy * vec2(1.0, SUN_SHADOW_MAP_FRAC), shadowSpacePosition.z + 0.0001), 0.0); #ifdef COMPILE_SUN_SHADOW_SMOOTH - shadowSample *= SMOOTH_SHADOW_SAMPLES; SMOOTH_SHADOW_POISSON_SAMPLE(0, u_sunShadowDepthTexture, 0.0, shadowSpacePosition.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(1, u_sunShadowDepthTexture, 0.0, shadowSpacePosition.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(2, u_sunShadowDepthTexture, 0.0, shadowSpacePosition.xyz, shadowSample, tmpVec2) @@ -116,7 +115,7 @@ void main() { SMOOTH_SHADOW_POISSON_SAMPLE(4, u_sunShadowDepthTexture, 0.0, shadowSpacePosition.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(5, u_sunShadowDepthTexture, 0.0, shadowSpacePosition.xyz, shadowSample, tmpVec2) SMOOTH_SHADOW_POISSON_SAMPLE(6, u_sunShadowDepthTexture, 0.0, shadowSpacePosition.xyz, shadowSample, tmpVec2) - shadowSample = max(shadowSample * 2.0 - 1.0, 0.0); + shadowSample *= SMOOTH_SHADOW_SAMPLES; #endif #ifdef COMPILE_COLORED_SHADOW shadowSpacePosition.y *= SUN_SHADOW_MAP_FRAC; diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/skybox_render.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/skybox_render.fsh index 3284f5f..bd393d1 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/skybox_render.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/skybox_render.fsh @@ -23,6 +23,10 @@ precision highp sampler2D; in vec3 v_position3f; in vec3 v_color3f; +#ifndef COMPILE_PARABOLOID_SKY +in vec3 v_positionClip3f; +#endif + layout(location = 0) out vec4 output4f; uniform vec3 u_sunDirection3f; @@ -33,10 +37,15 @@ uniform vec4 u_lightningColor4f; uniform sampler2D u_cloudsTexture; #endif +#ifndef COMPILE_PARABOLOID_SKY uniform sampler2D u_sunOcclusion; +uniform sampler2D u_gbufferDepthTexture; +#endif #define SKY_BRIGHTNESS 5.0 +#EAGLER INCLUDE (4) "eagler:glsl/deferred/lib/branchless_comparison.glsl" + void main() { gl_FragDepth = 0.0; vec3 viewDir = normalize(v_position3f); @@ -46,6 +55,7 @@ void main() { float f = max(dot(viewDir, u_sunDirection3f) - 0.995, 0.0) * 100.0; float intensity = min(f * 2.0, 1.0); intensity *= intensity * intensity * intensity * textureLod(u_sunOcclusion, vec2(0.5, 0.5), 0.0).r * 2.0; + intensity *= 1.0 - COMPARE_GT_0_1(textureLod(u_gbufferDepthTexture, (v_positionClip3f.xy / v_positionClip3f.z) * 0.5 + 0.5, 0.0).r, 0.0); output4f = vec4(v_color3f * SKY_BRIGHTNESS + intensity * u_sunColor3f, 0.0); #endif #ifdef COMPILE_CLOUDS diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/skybox_render.vsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/skybox_render.vsh index b4069a5..bbaf488 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/skybox_render.vsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/skybox_render.vsh @@ -26,6 +26,10 @@ layout(location = 1) in vec2 a_colorIndex2f; out vec3 v_position3f; out vec3 v_color3f; +#ifndef COMPILE_PARABOLOID_SKY +out vec3 v_positionClip3f; +#endif + uniform mat4 u_viewMatrix4f; #ifdef COMPILE_PARABOLOID_SKY uniform float u_farPlane1f; @@ -47,5 +51,6 @@ void main() { gl_Position = vec4(pos.xyz, 1.0); #else gl_Position = u_projMatrix4f * vec4(pos.xyz, 1.0); + v_positionClip3f = gl_Position.xyw; #endif } diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/ssao_generate.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/ssao_generate.fsh index 92a97bd..4140ea7 100755 --- a/desktopRuntime/resources/assets/eagler/glsl/deferred/ssao_generate.fsh +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/ssao_generate.fsh @@ -33,6 +33,8 @@ uniform mat4 u_inverseProjectionMatrix4f; uniform mat2 u_randomizerDataMatrix2f; +#EAGLER INCLUDE (4) "eagler:glsl/deferred/lib/branchless_comparison.glsl" + const vec3 ssaoKernel[8] = vec3[]( vec3(0.599,0.721,0.350),vec3(0.114,0.791,0.601), vec3(0.067,0.995,0.069),vec3(0.511,-0.510,0.692), @@ -48,8 +50,8 @@ vec3(0.716,-0.439,0.543),vec3(-0.400,0.733,0.550)); tmpVec4_2.zw = matProjInv2f * vec4(tmpVec4_2.xy, textureLod(u_gbufferDepthTexture, tmpVec4_2.xy * 0.5 + 0.5, 0.0).r * 2.0 - 1.0, 1.0);\ tmpVec4_2.z /= tmpVec4_2.w;\ tmpVec4_2.x = smoothstep(0.0, 1.0, radius * 0.5 / abs(pos.z - tmpVec4_2.z));\ - divisor += tmpVec4_2.x > 0.0 ? 1.0 : 0.0;\ - occlusion += (tmpVec4_2.z >= tmpVec4_1.z ? 1.0 : 0.0) * tmpVec4_2.x; + divisor += COMPARE_GT_0_1(tmpVec4_2.x, 0.0);\ + occlusion += COMPARE_GT_0_1(tmpVec4_2.z, tmpVec4_1.z) * tmpVec4_2.x; void main() { vec3 originalClipSpacePos = vec3(v_position2f, textureLod(u_gbufferDepthTexture, v_position2f, 0.0).r); diff --git a/desktopRuntime/resources/assets/eagler/glsl/deferred/subsurface_scattering.fsh b/desktopRuntime/resources/assets/eagler/glsl/deferred/subsurface_scattering.fsh new file mode 100755 index 0000000..baf95ca --- /dev/null +++ b/desktopRuntime/resources/assets/eagler/glsl/deferred/subsurface_scattering.fsh @@ -0,0 +1,158 @@ +#line 2 + +/* + * Copyright (c) 2025 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. + * + */ + +precision lowp int; +precision highp float; +precision highp sampler2D; + +in vec2 v_position2f; + +layout(location = 0) out float output1f; + +uniform mat4 u_inverseViewMatrix4f; +uniform mat4 u_inverseViewProjMatrix4f; + +uniform sampler2D u_gbufferNormalTexture; +uniform sampler2D u_gbufferDepthTexture; +uniform sampler2D u_gbufferMaterialTexture; +uniform sampler2D u_sunShadowDepthTexture; + +#ifdef COMPILE_SUN_SHADOW_LOD0 +uniform mat4 u_sunShadowMatrixLOD04f; +#define SUN_SHADOW_MAP_FRAC 1.0 +#endif +#ifdef COMPILE_SUN_SHADOW_LOD1 +uniform mat4 u_sunShadowMatrixLOD04f; +uniform mat4 u_sunShadowMatrixLOD14f; +#define SUN_SHADOW_MAP_FRAC 0.5 +#endif +#ifdef COMPILE_SUN_SHADOW_LOD2 +uniform mat4 u_sunShadowMatrixLOD04f; +uniform mat4 u_sunShadowMatrixLOD14f; +uniform mat4 u_sunShadowMatrixLOD24f; +#define SUN_SHADOW_MAP_FRAC 0.3333333 +#endif + +#EAGLER INCLUDE (4) "eagler:glsl/deferred/lib/branchless_comparison.glsl" + +const vec2 POISSON_DISK[4] = vec2[]( +vec2(0.998, -0.0438), +vec2(-0.345, -0.933), +vec2(-0.996, 0.046), +vec2(0.230, 0.960)); +#define SMOOTH_SHADOW_SAMPLES (1.0 / 5.0) +#define SMOOTH_SHADOW_RADIUS 0.000488 +#define SCATTER_POISSON_SAMPLE(idx, tex, lod, vec3Pos, accum, tmpVec2)\ + tmpVec2 = vec3Pos.xy + POISSON_DISK[idx] * SMOOTH_SHADOW_RADIUS;\ + tmpVec2 = clamp(tmpVec2, vec2(0.001), vec2(0.999));\ + tmpVec2.y += lod;\ + tmpVec2.y *= SUN_SHADOW_MAP_FRAC;\ + accum += scatterSampleInterpolated(tex, vec3(tmpVec2, vec3Pos.z)); + +#define SUN_SHADOW_DEPTH_SIZE_2F vec2(SUN_SHADOW_DEPTH_SIZE_2F_X, SUN_SHADOW_DEPTH_SIZE_2F_Y) +#define SUN_SHADOW_DEPTH_SIZE_2F_INV vec2((1.0 / SUN_SHADOW_DEPTH_SIZE_2F_X), (1.0 / SUN_SHADOW_DEPTH_SIZE_2F_Y)) + +uniform vec3 u_sunDirection3f; + +#define SCATTER_SAMPLE(tex, vec2Pos, comp) max(textureLod(tex, (vec2Pos), 0.0).r - comp, 0.0) + +float scatterSampleInterpolated(in sampler2D texIn, in vec3 vec3Pos) { + vec2 icoord2f = vec3Pos.xy * SUN_SHADOW_DEPTH_SIZE_2F; + vec2 floor2fTmp = floor(icoord2f); + vec2 ceil2fTmp = ceil(icoord2f); + vec2 ret1 = vec2( // top two samples + SCATTER_SAMPLE(texIn, (floor2fTmp + 0.5) * SUN_SHADOW_DEPTH_SIZE_2F_INV, vec3Pos.z), + SCATTER_SAMPLE(texIn, (vec2(ceil2fTmp.x, floor2fTmp.y) + 0.5) * SUN_SHADOW_DEPTH_SIZE_2F_INV, vec3Pos.z) + ); + vec2 ret2 = vec2( // bottom two samples + SCATTER_SAMPLE(texIn, (vec2(floor2fTmp.x, ceil2fTmp.y) + 0.5) * SUN_SHADOW_DEPTH_SIZE_2F_INV, vec3Pos.z), + SCATTER_SAMPLE(texIn, (ceil2fTmp + 0.5) * SUN_SHADOW_DEPTH_SIZE_2F_INV, vec3Pos.z) + ); + vec2 factors = icoord2f - floor2fTmp; + vec2 cunt = vec2(1.0 - factors.x, factors.x); + ret1 = ret1 * cunt * (1.0 - factors.y) + ret2 * cunt * factors.y; + return (ret1.x + ret1.y) * 0.25; +} + +void main() { + output1f = 0.0; + float depth = textureLod(u_gbufferDepthTexture, v_position2f, 0.0).r; + if(depth == 0.0) { + return; + } + float material1f = textureLod(u_gbufferMaterialTexture, v_position2f, 0.0).a; + material1f = 2.0 * material1f - COMPARE_GT_0_1(material1f, 0.5); + if(material1f < 0.05) { + return; + } + vec4 normalVector4f = textureLod(u_gbufferNormalTexture, v_position2f, 0.0); + if(normalVector4f.a < 0.5) { + return; + } + normalVector4f.xyz *= 2.0; + normalVector4f.xyz -= 1.0; + vec3 worldSpaceNormal = normalize(mat3(u_inverseViewMatrix4f) * normalVector4f.xyz); + vec4 worldSpacePosition = vec4(v_position2f, depth, 1.0); + worldSpacePosition.xyz *= 2.0; + worldSpacePosition.xyz -= 1.0; + worldSpacePosition = u_inverseViewProjMatrix4f * worldSpacePosition; + worldSpacePosition.xyz /= worldSpacePosition.w; + worldSpacePosition.xyz += worldSpaceNormal * 0.05; + worldSpacePosition.w = 1.0; + float shadowSample; + vec2 tmpVec2; + vec4 shadowSpacePosition; + for(;;) { + shadowSpacePosition = u_sunShadowMatrixLOD04f * worldSpacePosition; + if(shadowSpacePosition.xyz == clamp(shadowSpacePosition.xyz, vec3(0.005), vec3(0.995))) { + shadowSample = scatterSampleInterpolated(u_sunShadowDepthTexture, vec3(shadowSpacePosition.xy * vec2(1.0, SUN_SHADOW_MAP_FRAC), shadowSpacePosition.z)); + SCATTER_POISSON_SAMPLE(0, u_sunShadowDepthTexture, 0.0, shadowSpacePosition.xyz, shadowSample, tmpVec2) + SCATTER_POISSON_SAMPLE(1, u_sunShadowDepthTexture, 0.0, shadowSpacePosition.xyz, shadowSample, tmpVec2) + SCATTER_POISSON_SAMPLE(2, u_sunShadowDepthTexture, 0.0, shadowSpacePosition.xyz, shadowSample, tmpVec2) + SCATTER_POISSON_SAMPLE(3, u_sunShadowDepthTexture, 0.0, shadowSpacePosition.xyz, shadowSample, tmpVec2) + shadowSample *= SMOOTH_SHADOW_SAMPLES; + break; + } + +#if defined(COMPILE_SUN_SHADOW_LOD1) || defined(COMPILE_SUN_SHADOW_LOD2) + shadowSpacePosition = u_sunShadowMatrixLOD14f * worldSpacePosition; + if(shadowSpacePosition.xyz == clamp(shadowSpacePosition.xyz, vec3(0.005), vec3(0.995))) { + shadowSpacePosition.y += 1.0; + shadowSpacePosition.y *= SUN_SHADOW_MAP_FRAC; + shadowSample = scatterSampleInterpolated(u_sunShadowDepthTexture, vec3(shadowSpacePosition.xy, shadowSpacePosition.z + 0.00015)); + break; + } +#endif + +#ifdef COMPILE_SUN_SHADOW_LOD2 + shadowSpacePosition = u_sunShadowMatrixLOD24f * worldSpacePosition; + if(shadowSpacePosition.xyz == clamp(shadowSpacePosition.xyz, vec3(0.005), vec3(0.995))) { + shadowSpacePosition.y += 2.0; + shadowSpacePosition.y *= SUN_SHADOW_MAP_FRAC; + shadowSample = scatterSampleInterpolated(u_sunShadowDepthTexture, vec3(shadowSpacePosition.xy, shadowSpacePosition.z + 0.00015)); + break; + } +#endif + + output1f = normalVector4f.a * min(material1f, 0.5); + return; + } + + material1f = (1.0 - material1f) * 512.0; + output1f = max(1.0 - shadowSample * material1f, 0.0); +} diff --git a/desktopRuntime/resources/assets/minecraft/lang/en_US.lang b/desktopRuntime/resources/assets/minecraft/lang/en_US.lang index e4f7748..86cf088 100755 --- a/desktopRuntime/resources/assets/minecraft/lang/en_US.lang +++ b/desktopRuntime/resources/assets/minecraft/lang/en_US.lang @@ -247,6 +247,13 @@ eaglercraft.shaders.gui.option.POST_FXAA.desc.2=This is the preferred antialiasi eaglercraft.shaders.gui.option.POST_FXAA.desc.4=ON: enable fxaa (slower) eaglercraft.shaders.gui.option.POST_FXAA.desc.5=OFF: disable fxaa (faster) +eaglercraft.shaders.gui.option.SUBSURFACE_SCATTERING.label=S.S. Scattering + +eaglercraft.shaders.gui.option.SUBSURFACE_SCATTERING.desc.0=Applies subsurface scattering to sunlight calculations, requires shadows to be enabled! +eaglercraft.shaders.gui.option.SUBSURFACE_SCATTERING.desc.2=This effect is mainly used on grass and leaf blocks to make them look more realistic in sunlight, however it is not a perfect model of reality +eaglercraft.shaders.gui.option.SUBSURFACE_SCATTERING.desc.4=ON: enable subsurf scattering (slower) +eaglercraft.shaders.gui.option.SUBSURFACE_SCATTERING.desc.5=OFF: disable subsurf scattering (faster) + eaglercraft.shaders.gui.unsupported.title=Shaders are unavailable on this device! eaglercraft.shaders.gui.unsupported.reason.hdrFramebuffer=Reason: No HDR render target support eaglercraft.shaders.gui.unsupported.reason.oldOpenGLVersion=Reason: OpenGL ES 3.0 (WebGL 2.0) is not supported! diff --git a/src/game/java/net/minecraft/client/Minecraft.java b/src/game/java/net/minecraft/client/Minecraft.java index f0aa2b2..f201d44 100755 --- a/src/game/java/net/minecraft/client/Minecraft.java +++ b/src/game/java/net/minecraft/client/Minecraft.java @@ -1845,9 +1845,6 @@ public class Minecraft implements IThreadListener { public void launchIntegratedServer(String folderName, String worldName, WorldSettings worldSettingsIn) { this.loadWorld((WorldClient) null); renderManager.setEnableFNAWSkins(this.gameSettings.enableFNAWSkins); - session.reset(); - EaglerProfile.clearServerSkinOverride(); - PauseMenuCustomizeState.reset(); SingleplayerServerController.launchEaglercraftServer(folderName, gameSettings.difficulty.getDifficultyId(), Math.max(gameSettings.renderDistanceChunks, 2), worldSettingsIn); EagRuntime.setMCServerWindowGlobal("singleplayer"); @@ -1880,6 +1877,7 @@ public class Minecraft implements IThreadListener { EaglerProfile.clearServerSkinOverride(); PauseMenuCustomizeState.reset(); ClientUUIDLoadingCache.flushRequestCache(); + ClientUUIDLoadingCache.resetFlags(); WebViewOverlayController.setPacketSendCallback(null); this.guiAchievement.clearAchievements(); diff --git a/src/game/java/net/minecraft/client/gui/GuiMainMenu.java b/src/game/java/net/minecraft/client/gui/GuiMainMenu.java index 0c0bfaf..c4e5292 100755 --- a/src/game/java/net/minecraft/client/gui/GuiMainMenu.java +++ b/src/game/java/net/minecraft/client/gui/GuiMainMenu.java @@ -2,6 +2,8 @@ package net.minecraft.client.gui; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; + import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; @@ -25,6 +27,7 @@ import net.lax1dude.eaglercraft.v1_8.crypto.SHA1Digest; import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.minecraft.MainMenuSkyboxTexture; import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer; @@ -40,7 +43,6 @@ import net.lax1dude.eaglercraft.v1_8.update.UpdateService; import net.minecraft.client.Minecraft; import net.minecraft.client.audio.PositionedSoundRecord; import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.texture.DynamicTexture; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.client.resources.I18n; import net.minecraft.util.MathHelper; @@ -82,7 +84,8 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback { * Texture allocated for the current viewport of the main menu's * panorama background. */ - private static DynamicTexture viewportTexture = null; + private static MainMenuSkyboxTexture viewportTexture = null; + private static MainMenuSkyboxTexture viewportTexture2 = null; private boolean field_175375_v = true; private String openGLWarning1; private String openGLWarning2; @@ -109,6 +112,7 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback { private int field_92020_v; private int field_92019_w; private static ResourceLocation backgroundTexture = null; + private static ResourceLocation backgroundTexture2 = null; private GuiUpdateCheckerOverlay updateCheckerOverlay; private GuiButton downloadOfflineButton; private boolean enableBlur = true; @@ -252,8 +256,10 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback { */ public void initGui() { if (viewportTexture == null) { - viewportTexture = new DynamicTexture(256, 256); + viewportTexture = new MainMenuSkyboxTexture(256, 256); backgroundTexture = this.mc.getTextureManager().getDynamicTextureLocation("background", viewportTexture); + viewportTexture2 = new MainMenuSkyboxTexture(256, 256); + backgroundTexture2 = this.mc.getTextureManager().getDynamicTextureLocation("background", viewportTexture2); } this.updateCheckerOverlay.setResolution(mc, width, height); Calendar calendar = Calendar.getInstance(); @@ -429,7 +435,7 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback { GlStateManager.disableCull(); GlStateManager.depthMask(false); GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, 1, 0); - byte b0 = enableBlur ? (byte) 8 : (byte) 1; + byte b0 = enableBlur ? (byte) 4 : (byte) 1; for (int i = 0; i < b0 * b0; ++i) { GlStateManager.pushMatrix(); @@ -494,10 +500,9 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback { * Rotate and blurs the skybox view in the main menu */ private void rotateAndBlurSkybox(float parFloat1) { - this.mc.getTextureManager().bindTexture(backgroundTexture); EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - EaglercraftGPU.glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256); + // EaglercraftGPU.glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256); GlStateManager.enableBlend(); GlStateManager.tryBlendFuncSeparate(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA, 1, 0); GlStateManager.colorMask(true, true, true, false); @@ -531,15 +536,42 @@ public class GuiMainMenu extends GuiScreen implements GuiYesNoCallback { * Renders the skybox in the main menu */ private void renderSkybox(int parInt1, int parInt2, float parFloat1) { + viewportTexture.bindFramebuffer(); GlStateManager.viewport(0, 0, 256, 256); + GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 1.0f); + GlStateManager.clear(GL_COLOR_BUFFER_BIT); this.drawPanorama(parInt1, parInt2, parFloat1); + viewportTexture2.bindFramebuffer(); + GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 1.0f); + GlStateManager.clear(GL_COLOR_BUFFER_BIT); + this.mc.getTextureManager().bindTexture(backgroundTexture); this.rotateAndBlurSkybox(parFloat1); + viewportTexture.bindFramebuffer(); + this.mc.getTextureManager().bindTexture(backgroundTexture2); this.rotateAndBlurSkybox(parFloat1); + viewportTexture2.bindFramebuffer(); + this.mc.getTextureManager().bindTexture(backgroundTexture); this.rotateAndBlurSkybox(parFloat1); + viewportTexture.bindFramebuffer(); + this.mc.getTextureManager().bindTexture(backgroundTexture2); this.rotateAndBlurSkybox(parFloat1); + viewportTexture2.bindFramebuffer(); + this.mc.getTextureManager().bindTexture(backgroundTexture); this.rotateAndBlurSkybox(parFloat1); + viewportTexture.bindFramebuffer(); + this.mc.getTextureManager().bindTexture(backgroundTexture2); this.rotateAndBlurSkybox(parFloat1); - this.rotateAndBlurSkybox(parFloat1); + + // Notch fucked up, the last iteration is not necessary, in the vanilla renderer + // it is unintentionally discarded and the previous iteration is used + + // viewportTexture2.bindFramebuffer(); + // this.mc.getTextureManager().bindTexture(backgroundTexture); + // this.rotateAndBlurSkybox(parFloat1); + + _wglBindFramebuffer(0x8D40, null); + + this.mc.getTextureManager().bindTexture(backgroundTexture); GlStateManager.viewport(0, 0, this.mc.displayWidth, this.mc.displayHeight); float f = this.width > this.height ? 120.0F / (float) this.width : 120.0F / (float) this.height; float f1 = (float) this.height * f / 256.0F; diff --git a/src/game/java/net/minecraft/client/gui/GuiMultiplayer.java b/src/game/java/net/minecraft/client/gui/GuiMultiplayer.java index 08de930..0ab5283 100755 --- a/src/game/java/net/minecraft/client/gui/GuiMultiplayer.java +++ b/src/game/java/net/minecraft/client/gui/GuiMultiplayer.java @@ -459,7 +459,7 @@ public class GuiMultiplayer extends GuiScreen implements GuiYesNoCallback { } public boolean func_175394_b(ServerListEntryNormal parServerListEntryNormal, int parInt1) { - return parInt1 < this.savedServerList.countServers(); + return parInt1 < this.savedServerList.countServers() - 1; } public void func_175391_a(ServerListEntryNormal parServerListEntryNormal, int parInt1, boolean parFlag) { diff --git a/src/game/java/net/minecraft/client/model/ModelDragon.java b/src/game/java/net/minecraft/client/model/ModelDragon.java index 186f893..c228553 100755 --- a/src/game/java/net/minecraft/client/model/ModelDragon.java +++ b/src/game/java/net/minecraft/client/model/ModelDragon.java @@ -3,7 +3,6 @@ package net.minecraft.client.model; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager; import net.minecraft.entity.Entity; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.boss.EntityDragon; @@ -187,7 +186,7 @@ public class ModelDragon extends ModelBase { this.body.rotateAngleZ = 0.0F; this.body.render(f); - boolean flag = DeferredStateManager.isEnableShadowRender(); + // boolean flag = DeferredStateManager.isEnableShadowRender(); for (int j = 0; j < 2; ++j) { GlStateManager.enableCull(); float f12 = f1 * 3.1415927F * 2.0F; @@ -206,12 +205,14 @@ public class ModelDragon extends ModelBase { this.rearLeg.render(f); GlStateManager.scale(-1.0F, 1.0F, 1.0F); if (j == 0) { - GlStateManager.cullFace(flag ? GL_BACK : GL_FRONT); + // GlStateManager.cullFace(flag ? GL_BACK : GL_FRONT); + GlStateManager.cullFace(GL_FRONT); } } GlStateManager.popMatrix(); - GlStateManager.cullFace(flag ? GL_FRONT : GL_BACK); + // GlStateManager.cullFace(flag ? GL_FRONT : GL_BACK); + GlStateManager.cullFace(GL_BACK); GlStateManager.disableCull(); float f11 = -((float) Math.sin((double) (f1 * 3.1415927F * 2.0F))) * 0.0F; f9 = f1 * 3.1415927F * 2.0F; diff --git a/src/game/java/net/minecraft/client/multiplayer/GuiConnecting.java b/src/game/java/net/minecraft/client/multiplayer/GuiConnecting.java index 53a0150..5de9d33 100755 --- a/src/game/java/net/minecraft/client/multiplayer/GuiConnecting.java +++ b/src/game/java/net/minecraft/client/multiplayer/GuiConnecting.java @@ -164,6 +164,8 @@ public class GuiConnecting extends GuiScreen { if (ConnectionHandshake.attemptHandshake(this.mc, webSocket, this, previousGuiScreen, currentPassword, allowPlaintext, allowCookies, cookieData)) { logger.info("Handshake Success"); + webSocket.setEnableStringFrames(false); + webSocket.clearStringFrames(); this.networkManager = new WebSocketNetworkManager(webSocket); this.networkManager.setPluginInfo(ConnectionHandshake.pluginBrand, ConnectionHandshake.pluginVersion); diff --git a/src/game/java/net/minecraft/client/renderer/EntityRenderer.java b/src/game/java/net/minecraft/client/renderer/EntityRenderer.java index 6fa3a74..e022950 100755 --- a/src/game/java/net/minecraft/client/renderer/EntityRenderer.java +++ b/src/game/java/net/minecraft/client/renderer/EntityRenderer.java @@ -1835,7 +1835,7 @@ public class EntityRenderer implements IResourceManagerReloadListener { GlStateManager.setFogStart(f1 * 0.25F); GlStateManager.setFogEnd(f1); } - EaglercraftGPU.glFogi('\u855a', '\u855b'); + // EaglercraftGPU.glFogi('\u855a', '\u855b'); } else if (this.cloudFog) { GlStateManager.setFog(GL_EXP); GlStateManager.setFogDensity(0.1F); @@ -1865,8 +1865,6 @@ public class EntityRenderer implements IResourceManagerReloadListener { GlStateManager.setFogEnd(f); } - EaglercraftGPU.glFogi('\u855a', '\u855b'); - if (this.mc.theWorld.provider.doesXZShowFog((int) entity.posX, (int) entity.posZ)) { GlStateManager.setFogStart(f * 0.05F); GlStateManager.setFogEnd(Math.min(f, 192.0F) * 0.5F); diff --git a/src/game/java/net/minecraft/client/renderer/RenderGlobal.java b/src/game/java/net/minecraft/client/renderer/RenderGlobal.java index 0b6ea20..47e178b 100755 --- a/src/game/java/net/minecraft/client/renderer/RenderGlobal.java +++ b/src/game/java/net/minecraft/client/renderer/RenderGlobal.java @@ -140,6 +140,10 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene private List renderInfos = Lists.newArrayListWithCapacity(69696); private final Set field_181024_n = Sets.newHashSet(); private ViewFrustum viewFrustum; + private int glSunList = -1; + private int moonPhase = -1; + private int glMoonList = -1; + private int glHorizonList = -1; /**+ * The star GL Call list */ @@ -204,6 +208,8 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene this.renderContainer = new RenderList(); this.renderChunkFactory = new ListChunkFactory(); this.cloudRenderer = new EaglerCloudRenderer(mcIn); + this.generateSun(); + this.generateHorizon(); this.generateStars(); this.generateSky(); this.generateSky2(); @@ -238,6 +244,92 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene return false; } + private void generateSun() { + Tessellator tessellator = Tessellator.getInstance(); + WorldRenderer worldrenderer = tessellator.getWorldRenderer(); + + if (this.glSunList >= 0) { + GLAllocation.deleteDisplayLists(this.glSunList); + this.glSunList = -1; + } + + this.glSunList = GLAllocation.generateDisplayLists(); + EaglercraftGPU.glNewList(this.glSunList, GL_COMPILE); + float f17 = 30.0F; + worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); + worldrenderer.pos((double) (-f17), 100.0D, (double) (-f17)).tex(0.0D, 0.0D).endVertex(); + worldrenderer.pos((double) f17, 100.0D, (double) (-f17)).tex(1.0D, 0.0D).endVertex(); + worldrenderer.pos((double) f17, 100.0D, (double) f17).tex(1.0D, 1.0D).endVertex(); + worldrenderer.pos((double) (-f17), 100.0D, (double) f17).tex(0.0D, 1.0D).endVertex(); + tessellator.draw(); + EaglercraftGPU.glEndList(); + } + + private int getMoonList(int phase) { + if (phase != moonPhase) { + Tessellator tessellator = Tessellator.getInstance(); + WorldRenderer worldrenderer = tessellator.getWorldRenderer(); + + if (glMoonList == -1) { + glMoonList = GLAllocation.generateDisplayLists(); + } + + EaglercraftGPU.glNewList(this.glMoonList, GL_COMPILE); + float f17 = 20.0F; + int j = phase % 4; + int l = phase / 4 % 2; + float f22 = (float) (j + 0) / 4.0F; + float f23 = (float) (l + 0) / 2.0F; + float f24 = (float) (j + 1) / 4.0F; + float f14 = (float) (l + 1) / 2.0F; + worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); + worldrenderer.pos((double) (-f17), -100.0D, (double) f17).tex((double) f24, (double) f14).endVertex(); + worldrenderer.pos((double) f17, -100.0D, (double) f17).tex((double) f22, (double) f14).endVertex(); + worldrenderer.pos((double) f17, -100.0D, (double) (-f17)).tex((double) f22, (double) f23).endVertex(); + worldrenderer.pos((double) (-f17), -100.0D, (double) (-f17)).tex((double) f24, (double) f23).endVertex(); + tessellator.draw(); + EaglercraftGPU.glEndList(); + moonPhase = phase; + } + return glMoonList; + } + + private void generateHorizon() { + Tessellator tessellator = Tessellator.getInstance(); + WorldRenderer worldrenderer = tessellator.getWorldRenderer(); + + if (this.glHorizonList >= 0) { + GLAllocation.deleteDisplayLists(this.glHorizonList); + this.glHorizonList = -1; + } + + this.glHorizonList = GLAllocation.generateDisplayLists(); + EaglercraftGPU.glNewList(this.glHorizonList, GL_COMPILE); + worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR); + worldrenderer.pos(-1.0D, 0.0D, 1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(1.0D, 0.0D, 1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(-1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(-1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(1.0D, 0.0D, -1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(-1.0D, 0.0D, -1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(1.0D, 0.0D, 1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(1.0D, 0.0D, -1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(-1.0D, 0.0D, -1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(-1.0D, 0.0D, 1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(-1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(-1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(-1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(-1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex(); + worldrenderer.pos(1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex(); + tessellator.draw(); + EaglercraftGPU.glEndList(); + } + private void generateSky2() { Tessellator tessellator = Tessellator.getInstance(); WorldRenderer worldrenderer = tessellator.getWorldRenderer(); @@ -411,6 +503,7 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene if (theWorld.provider.getHasNoSky()) { dfc.is_rendering_shadowsSun_clamped = 0; dfc.is_rendering_lightShafts = false; + dfc.is_rendering_subsurfaceScattering = false; } else { int maxDist = renderDistanceChunks << 4; int ss = dfc.is_rendering_shadowsSun; @@ -418,7 +511,9 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene --ss; } dfc.is_rendering_shadowsSun_clamped = ss; - dfc.is_rendering_lightShafts = dfc.lightShafts; + dfc.is_rendering_lightShafts = ss > 0 && dfc.lightShafts && dfc.shaderPackInfo.LIGHT_SHAFTS; + dfc.is_rendering_subsurfaceScattering = ss > 0 && dfc.subsurfaceScattering + && dfc.shaderPackInfo.SUBSURFACE_SCATTERING; } boolean flag = false; if (EaglerDeferredPipeline.instance == null) { @@ -1334,29 +1429,10 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene GlStateManager.rotate(-90.0F, 0.0F, 1.0F, 0.0F); CustomSky.renderSky(this.theWorld, this.renderEngine, partialTicks); GlStateManager.rotate(this.theWorld.getCelestialAngle(partialTicks) * 360.0F, 1.0F, 0.0F, 0.0F); - float f17 = 30.0F; this.renderEngine.bindTexture(locationSunPng); - worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); - worldrenderer.pos((double) (-f17), 100.0D, (double) (-f17)).tex(0.0D, 0.0D).endVertex(); - worldrenderer.pos((double) f17, 100.0D, (double) (-f17)).tex(1.0D, 0.0D).endVertex(); - worldrenderer.pos((double) f17, 100.0D, (double) f17).tex(1.0D, 1.0D).endVertex(); - worldrenderer.pos((double) (-f17), 100.0D, (double) f17).tex(0.0D, 1.0D).endVertex(); - tessellator.draw(); - f17 = 20.0F; + GlStateManager.callList(glSunList); this.renderEngine.bindTexture(locationMoonPhasesPng); - int i = this.theWorld.getMoonPhase(); - int j = i % 4; - int l = i / 4 % 2; - float f22 = (float) (j + 0) / 4.0F; - float f23 = (float) (l + 0) / 2.0F; - float f24 = (float) (j + 1) / 4.0F; - float f14 = (float) (l + 1) / 2.0F; - worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); - worldrenderer.pos((double) (-f17), -100.0D, (double) f17).tex((double) f24, (double) f14).endVertex(); - worldrenderer.pos((double) f17, -100.0D, (double) f17).tex((double) f22, (double) f14).endVertex(); - worldrenderer.pos((double) f17, -100.0D, (double) (-f17)).tex((double) f22, (double) f23).endVertex(); - worldrenderer.pos((double) (-f17), -100.0D, (double) (-f17)).tex((double) f24, (double) f23).endVertex(); - tessellator.draw(); + GlStateManager.callList(getMoonList(this.theWorld.getMoonPhase())); GlStateManager.disableTexture2D(); float f15 = this.theWorld.getStarBrightness(partialTicks) * f16; boolean b = !CustomSky.hasSkyLayers(this.theWorld); @@ -1379,31 +1455,13 @@ public class RenderGlobal implements IWorldAccess, IResourceManagerReloadListene GlStateManager.callList(this.glSkyList2); GlStateManager.popMatrix(); - float f18 = 1.0F; float f19 = -((float) (d0 + 65.0D)); - float f20 = -1.0F; - worldrenderer.begin(7, DefaultVertexFormats.POSITION_COLOR); - worldrenderer.pos(-1.0D, (double) f19, 1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(1.0D, (double) f19, 1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(-1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(-1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(1.0D, (double) f19, -1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(-1.0D, (double) f19, -1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(1.0D, (double) f19, 1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(1.0D, (double) f19, -1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(-1.0D, (double) f19, -1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(-1.0D, (double) f19, 1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(-1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(-1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(-1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(-1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(1.0D, -1.0D, 1.0D).color(0, 0, 0, 255).endVertex(); - worldrenderer.pos(1.0D, -1.0D, -1.0D).color(0, 0, 0, 255).endVertex(); - tessellator.draw(); + + GlStateManager.pushMatrix(); + GlStateManager.translate(0.0F, f19, 0.0F); + GlStateManager.scale(1.0f, 1.0f - f19, 1.0f); + GlStateManager.callList(this.glHorizonList); + GlStateManager.popMatrix(); } if (this.theWorld.provider.isSkyColored()) { diff --git a/src/game/java/net/minecraft/client/renderer/Tessellator.java b/src/game/java/net/minecraft/client/renderer/Tessellator.java index 5926b71..c5746ab 100755 --- a/src/game/java/net/minecraft/client/renderer/Tessellator.java +++ b/src/game/java/net/minecraft/client/renderer/Tessellator.java @@ -57,6 +57,11 @@ public class Tessellator { WorldVertexBufferUploader.func_181679_a(this.worldRenderer); } + public void uploadDisplayList(int displayList) { + this.worldRenderer.finishDrawing(); + WorldVertexBufferUploader.uploadDisplayList(displayList, this.worldRenderer); + } + public WorldRenderer getWorldRenderer() { return this.worldRenderer; } diff --git a/src/game/java/net/minecraft/client/renderer/entity/RenderItem.java b/src/game/java/net/minecraft/client/renderer/entity/RenderItem.java index 88af45e..2d73d9e 100755 --- a/src/game/java/net/minecraft/client/renderer/entity/RenderItem.java +++ b/src/game/java/net/minecraft/client/renderer/entity/RenderItem.java @@ -386,13 +386,15 @@ public class RenderItem implements IResourceManagerReloadListener { GlStateManager.pushMatrix(); ItemCameraTransforms itemcameratransforms = model.getItemCameraTransforms(); itemcameratransforms.applyTransform(cameraTransformType); - boolean flag = DeferredStateManager.isEnableShadowRender(); + // boolean flag = DeferredStateManager.isEnableShadowRender(); if (this.func_183005_a(itemcameratransforms.getTransform(cameraTransformType))) { - GlStateManager.cullFace(flag ? GL_BACK : GL_FRONT); + // GlStateManager.cullFace(flag ? GL_BACK : GL_FRONT); + GlStateManager.cullFace(GL_FRONT); } this.renderItem(stack, model); - GlStateManager.cullFace(flag ? GL_FRONT : GL_BACK); + // GlStateManager.cullFace(flag ? GL_FRONT : GL_BACK); + GlStateManager.cullFace(GL_BACK); GlStateManager.popMatrix(); GlStateManager.disableRescaleNormal(); GlStateManager.disableBlend(); diff --git a/src/game/java/net/minecraft/client/renderer/entity/layers/LayerMooshroomMushroom.java b/src/game/java/net/minecraft/client/renderer/entity/layers/LayerMooshroomMushroom.java index d980f7b..ba9bffa 100755 --- a/src/game/java/net/minecraft/client/renderer/entity/layers/LayerMooshroomMushroom.java +++ b/src/game/java/net/minecraft/client/renderer/entity/layers/LayerMooshroomMushroom.java @@ -3,7 +3,6 @@ package net.minecraft.client.renderer.entity.layers; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DeferredStateManager; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelQuadruped; import net.minecraft.client.renderer.BlockRendererDispatcher; @@ -45,8 +44,9 @@ public class LayerMooshroomMushroom implements LayerRenderer { BlockRendererDispatcher blockrendererdispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher(); this.mooshroomRenderer.bindTexture(TextureMap.locationBlocksTexture); GlStateManager.enableCull(); - boolean flag = DeferredStateManager.isEnableShadowRender(); - GlStateManager.cullFace(flag ? GL_BACK : GL_FRONT); + // boolean flag = DeferredStateManager.isEnableShadowRender(); + // GlStateManager.cullFace(flag ? GL_BACK : GL_FRONT); + GlStateManager.cullFace(GL_FRONT); GlStateManager.pushMatrix(); GlStateManager.scale(1.0F, -1.0F, 1.0F); GlStateManager.translate(0.2F, 0.35F, 0.5F); @@ -70,7 +70,8 @@ public class LayerMooshroomMushroom implements LayerRenderer { GlStateManager.translate(-0.5F, -0.5F, 0.5F); blockrendererdispatcher.renderBlockBrightness(Blocks.red_mushroom.getDefaultState(), 1.0F); GlStateManager.popMatrix(); - GlStateManager.cullFace(flag ? GL_FRONT : GL_BACK); + // GlStateManager.cullFace(flag ? GL_FRONT : GL_BACK); + GlStateManager.cullFace(GL_BACK); GlStateManager.disableCull(); } } diff --git a/src/game/java/net/minecraft/client/renderer/texture/TextureManager.java b/src/game/java/net/minecraft/client/renderer/texture/TextureManager.java index 91ef08a..d9b0e18 100755 --- a/src/game/java/net/minecraft/client/renderer/texture/TextureManager.java +++ b/src/game/java/net/minecraft/client/renderer/texture/TextureManager.java @@ -132,7 +132,7 @@ public class TextureManager implements ITickable, IResourceManagerReloadListener } } - public ResourceLocation getDynamicTextureLocation(String name, DynamicTexture texture) { + public ResourceLocation getDynamicTextureLocation(String name, ITextureObject texture) { int integer = this.mapTextureCounters.getOrDefault(name, 0) + 1; this.mapTextureCounters.put(name, integer); ResourceLocation resourcelocation = new ResourceLocation( diff --git a/src/game/java/net/minecraft/client/settings/GameSettings.java b/src/game/java/net/minecraft/client/settings/GameSettings.java index 9b17154..4a4d775 100755 --- a/src/game/java/net/minecraft/client/settings/GameSettings.java +++ b/src/game/java/net/minecraft/client/settings/GameSettings.java @@ -1364,7 +1364,7 @@ public class GameSettings { } this.mc.thePlayer.sendQueue.addToSendQueue(new C15PacketClientSettings(this.language, - Math.max(this.renderDistanceChunks, 2), this.chatVisibility, this.chatColours, i)); + Math.max(this.renderDistanceChunks, 3), this.chatVisibility, this.chatColours, i)); } } diff --git a/src/game/java/net/minecraft/entity/Entity.java b/src/game/java/net/minecraft/entity/Entity.java index bf3ddbe..aee1d38 100755 --- a/src/game/java/net/minecraft/entity/Entity.java +++ b/src/game/java/net/minecraft/entity/Entity.java @@ -77,7 +77,7 @@ import net.minecraft.world.WorldServer; */ public abstract class Entity implements ICommandSender { private static final AxisAlignedBB ZERO_AABB = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 0.0D, 0.0D, 0.0D); - private static int nextEntityID; + private static int nextEntityID = 1; private int entityId; public double renderDistanceWeight; public boolean preventEntitySpawning; @@ -2151,12 +2151,12 @@ public abstract class Entity implements ICommandSender { return Entity.this.getName(); } }); - category.addCrashSection("Entity\'s Exact location", String.format("%.2f, %.2f, %.2f", + category.addCrashSection("Entity\'s Exact location", HString.format("%.2f, %.2f, %.2f", new Object[] { Double.valueOf(this.posX), Double.valueOf(this.posY), Double.valueOf(this.posZ) })); category.addCrashSection("Entity\'s Block location", CrashReportCategory.getCoordinateInfo((double) MathHelper.floor_double(this.posX), (double) MathHelper.floor_double(this.posY), (double) MathHelper.floor_double(this.posZ))); - category.addCrashSection("Entity\'s Momentum", String.format("%.2f, %.2f, %.2f", new Object[] { + category.addCrashSection("Entity\'s Momentum", HString.format("%.2f, %.2f, %.2f", new Object[] { Double.valueOf(this.motionX), Double.valueOf(this.motionY), Double.valueOf(this.motionZ) })); category.addCrashSectionCallable("Entity\'s Rider", new Callable() { public String call() throws Exception { diff --git a/src/game/java/net/minecraft/entity/player/EntityPlayer.java b/src/game/java/net/minecraft/entity/player/EntityPlayer.java index 4db1a4c..8a05067 100755 --- a/src/game/java/net/minecraft/entity/player/EntityPlayer.java +++ b/src/game/java/net/minecraft/entity/player/EntityPlayer.java @@ -1636,7 +1636,7 @@ public abstract class EntityPlayer extends EntityLivingBase implements ICommandS } EntityList.EntityEggInfo entitylist$entityegginfo = (EntityList.EntityEggInfo) EntityList.entityEggs - .get(Integer.valueOf(EntityList.getEntityID(entitylivingbase))); + .get(EntityList.getEntityID(entitylivingbase)); if (entitylist$entityegginfo != null) { this.triggerAchievement(entitylist$entityegginfo.field_151512_d); } diff --git a/src/game/java/net/minecraft/entity/player/EntityPlayerMP.java b/src/game/java/net/minecraft/entity/player/EntityPlayerMP.java index dca4d0a..c4a5ac1 100755 --- a/src/game/java/net/minecraft/entity/player/EntityPlayerMP.java +++ b/src/game/java/net/minecraft/entity/player/EntityPlayerMP.java @@ -482,7 +482,7 @@ public class EntityPlayerMP extends EntityPlayer implements ICrafting { EntityLivingBase entitylivingbase = this.func_94060_bK(); if (entitylivingbase != null) { EntityList.EntityEggInfo entitylist$entityegginfo = (EntityList.EntityEggInfo) EntityList.entityEggs - .get(Integer.valueOf(EntityList.getEntityID(entitylivingbase))); + .get(EntityList.getEntityID(entitylivingbase)); if (entitylist$entityegginfo != null) { this.triggerAchievement(entitylist$entityegginfo.field_151513_e); } diff --git a/src/game/java/net/minecraft/item/ItemMonsterPlacer.java b/src/game/java/net/minecraft/item/ItemMonsterPlacer.java index dfb5059..5f49b56 100755 --- a/src/game/java/net/minecraft/item/ItemMonsterPlacer.java +++ b/src/game/java/net/minecraft/item/ItemMonsterPlacer.java @@ -2,6 +2,8 @@ package net.minecraft.item; import java.util.List; +import com.carrotsearch.hppc.IntObjectHashMap; +import com.carrotsearch.hppc.SortedIterationIntObjectHashMap; import com.carrotsearch.hppc.cursors.ObjectCursor; import net.minecraft.block.BlockFence; @@ -64,7 +66,7 @@ public class ItemMonsterPlacer extends Item { public int getColorFromItemStack(ItemStack itemstack, int i) { EntityList.EntityEggInfo entitylist$entityegginfo = (EntityList.EntityEggInfo) EntityList.entityEggs - .get(Integer.valueOf(itemstack.getMetadata())); + .get(itemstack.getMetadata()); return entitylist$entityegginfo != null ? (i == 0 ? entitylist$entityegginfo.primaryColor : entitylist$entityegginfo.secondaryColor) : 16777215; @@ -169,7 +171,7 @@ public class ItemMonsterPlacer extends Item { * world, entityID, x, y, z. */ public static Entity spawnCreature(World worldIn, int entityID, double x, double y, double z) { - if (!EntityList.entityEggs.containsKey(Integer.valueOf(entityID))) { + if (!EntityList.entityEggs.containsKey(entityID)) { return null; } else { Entity entity = null; @@ -198,7 +200,8 @@ public class ItemMonsterPlacer extends Item { * (eg: dye returns 16 items) */ public void getSubItems(Item item, CreativeTabs var2, List list) { - for (ObjectCursor entitylist$entityegginfo : EntityList.entityEggs.values()) { + for (ObjectCursor entitylist$entityegginfo : new SortedIterationIntObjectHashMap<>( + (IntObjectHashMap) EntityList.entityEggs, (a, b) -> a - b).values()) { list.add(new ItemStack(item, 1, entitylist$entityegginfo.value.spawnedID)); } diff --git a/src/game/java/net/minecraft/item/ItemPotion.java b/src/game/java/net/minecraft/item/ItemPotion.java index e6e134e..5b84069 100755 --- a/src/game/java/net/minecraft/item/ItemPotion.java +++ b/src/game/java/net/minecraft/item/ItemPotion.java @@ -1,6 +1,8 @@ package net.minecraft.item; import java.util.ArrayList; +import java.util.HashMap; +import java.util.Iterator; import java.util.List; import java.util.Map; import java.util.Map.Entry; @@ -8,9 +10,6 @@ import java.util.Set; import com.carrotsearch.hppc.IntObjectHashMap; import com.carrotsearch.hppc.IntObjectMap; -import com.carrotsearch.hppc.ObjectIntHashMap; -import com.carrotsearch.hppc.ObjectIntMap; -import com.carrotsearch.hppc.cursors.IntCursor; import com.google.common.collect.HashMultimap; import com.google.common.collect.Lists; @@ -57,7 +56,7 @@ public class ItemPotion extends Item { * recalculating it). */ private IntObjectMap> effectCache = new IntObjectHashMap<>(); - private static final ObjectIntMap> SUB_ITEMS_CACHE = new ObjectIntHashMap<>(); + private static final Map, Integer> SUB_ITEMS_CACHE = new HashMap<>(); public ItemPotion() { this.setMaxStackSize(1); @@ -340,15 +339,18 @@ public class ItemPotion extends Item { List list = PotionHelper.getPotionEffects(i1, false); if (list != null && !list.isEmpty()) { - SUB_ITEMS_CACHE.put(list, i1); + SUB_ITEMS_CACHE.put(list, Integer.valueOf(i1)); } } } } } - for (IntCursor cur : SUB_ITEMS_CACHE.values()) { - subItems.add(new ItemStack(itemIn, 1, cur.value)); + Iterator iterator = SUB_ITEMS_CACHE.values().iterator(); + + while (iterator.hasNext()) { + int j1 = ((Integer) iterator.next()).intValue(); + subItems.add(new ItemStack(itemIn, 1, j1)); } } diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/OpenGLObjects.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/OpenGLObjects.java index ed1211b..5490046 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/OpenGLObjects.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/OpenGLObjects.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + class OpenGLObjects { static class BufferGL implements IBufferGL { @@ -36,11 +37,11 @@ class OpenGLObjects { } - static class BufferArrayGL implements IBufferArrayGL { + static class VertexArrayGL implements IVertexArrayGL { final int ptr; - BufferArrayGL(int ptr) { + VertexArrayGL(int ptr) { this.ptr = ptr; } @@ -205,4 +206,4 @@ class OpenGLObjects { } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformApplication.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformApplication.java index 5ec41c1..286e6c1 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformApplication.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformApplication.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import static org.lwjgl.glfw.GLFW.*; @@ -33,21 +49,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums; -/** - * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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 PlatformApplication { private static long win = 0l; @@ -331,4 +332,4 @@ public class PlatformApplication { } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAssets.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAssets.java index 085de7e..22dcff5 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAssets.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAssets.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.awt.image.BufferedImage; @@ -13,21 +29,6 @@ import javax.imageio.ImageIO; import net.lax1dude.eaglercraft.v1_8.EaglerInputStream; import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; -/** - * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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 PlatformAssets { static URL getDesktopResourceURL(String path) { @@ -98,4 +99,4 @@ public class PlatformAssets { return loadImageFile(new EaglerInputStream(data), mime); } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAudio.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAudio.java index 51326a9..695131e 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAudio.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAudio.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import java.net.URL; - -import net.lax1dude.eaglercraft.v1_8.internal.paulscode.lwjgl3.LibraryLWJGLOpenAL; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.minecraft.util.MathHelper; -import paulscode.sound.SoundSystem; -import paulscode.sound.SoundSystemConfig; -import paulscode.sound.SoundSystemLogger; -import paulscode.sound.codecs.CodecJOrbis; -import paulscode.sound.codecs.CodecWav; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import paulscode.sound.codecs.CodecWav; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import java.net.URL; + +import net.lax1dude.eaglercraft.v1_8.internal.paulscode.lwjgl3.LibraryLWJGLOpenAL; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.minecraft.util.MathHelper; +import paulscode.sound.SoundSystem; +import paulscode.sound.SoundSystemConfig; +import paulscode.sound.SoundSystemLogger; +import paulscode.sound.codecs.CodecJOrbis; +import paulscode.sound.codecs.CodecWav; + public class PlatformAudio { protected static class PaulscodeAudioResource implements IAudioResource { @@ -238,4 +239,4 @@ public class PlatformAudio { // nope } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformFilesystem.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformFilesystem.java index f613ac8..3c726a8 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformFilesystem.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformFilesystem.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import java.io.File; - -import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.DebugFilesystem; -import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.JDBCFilesystem; -import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.JDBCFilesystemConverter; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import java.io.File; + +import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.DebugFilesystem; +import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.JDBCFilesystem; +import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.JDBCFilesystemConverter; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class PlatformFilesystem { public static final Logger logger = LogManager.getLogger("PlatformFilesystem"); @@ -73,4 +74,4 @@ public class PlatformFilesystem { } } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformInput.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformInput.java index ad26371..ee57042 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformInput.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformInput.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import static org.lwjgl.glfw.GLFW.*; @@ -14,21 +30,6 @@ import org.lwjgl.glfw.GLFWGamepadState; import org.lwjgl.glfw.GLFWVidMode; import org.lwjgl.system.MemoryStack; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 PlatformInput { private static long win = 0l; @@ -896,4 +897,4 @@ public class PlatformInput { return ret; } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformNetworking.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformNetworking.java index 389f46d..b5c72c0 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformNetworking.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformNetworking.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import java.net.URI; -import java.net.URISyntaxException; - -import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.DesktopWebSocketClient; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import java.net.URI; +import java.net.URISyntaxException; + +import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.DesktopWebSocketClient; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class PlatformNetworking { private static final Logger logger = LogManager.getLogger("PlatformNetworking"); @@ -42,4 +43,4 @@ public class PlatformNetworking { return new DesktopWebSocketClient(uri); } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformOpenGL.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformOpenGL.java index 88bbc4d..4f7bfbf 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformOpenGL.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformOpenGL.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import net.lax1dude.eaglercraft.v1_8.internal.buffer.EaglerLWJGLAllocator; @@ -16,21 +32,6 @@ import java.util.List; import org.lwjgl.opengles.GLESCapabilities; -/** - * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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 PlatformOpenGL { private static int glesVers = -1; @@ -113,7 +114,7 @@ public class PlatformOpenGL { } } - public static final List dumpActiveExtensions() { + public static List dumpActiveExtensions() { List exts = new ArrayList<>(); if(hasANGLEInstancedArrays) exts.add("ANGLE_instanced_arrays"); if(hasEXTColorBufferFloat) exts.add("EXT_color_buffer_float"); @@ -132,63 +133,63 @@ public class PlatformOpenGL { return exts; } - public static final void _wglEnable(int glEnum) { + public static void _wglEnable(int glEnum) { glEnable(glEnum); } - public static final void _wglDisable(int glEnum) { + public static void _wglDisable(int glEnum) { glDisable(glEnum); } - public static final void _wglClearColor(float r, float g, float b, float a) { + public static void _wglClearColor(float r, float g, float b, float a) { glClearColor(r, g, b, a); } - public static final void _wglClearDepth(float f) { + public static void _wglClearDepth(float f) { glClearDepthf(f); } - public static final void _wglClear(int bits) { + public static void _wglClear(int bits) { glClear(bits); } - public static final void _wglDepthFunc(int glEnum) { + public static void _wglDepthFunc(int glEnum) { glDepthFunc(glEnum); } - public static final void _wglDepthMask(boolean mask) { + public static void _wglDepthMask(boolean mask) { glDepthMask(mask); } - public static final void _wglCullFace(int glEnum) { + public static void _wglCullFace(int glEnum) { glCullFace(glEnum); } - public static final void _wglViewport(int x, int y, int w, int h) { + public static void _wglViewport(int x, int y, int w, int h) { glViewport(x, y, w, h); } - public static final void _wglBlendFunc(int src, int dst) { + public static void _wglBlendFunc(int src, int dst) { glBlendFunc(src, dst); } - public static final void _wglBlendFuncSeparate(int srcColor, int dstColor, int srcAlpha, int dstAlpha) { + public static void _wglBlendFuncSeparate(int srcColor, int dstColor, int srcAlpha, int dstAlpha) { glBlendFuncSeparate(srcColor, dstColor, srcAlpha, dstAlpha); } - public static final void _wglBlendEquation(int glEnum) { + public static void _wglBlendEquation(int glEnum) { glBlendEquation(glEnum); } - public static final void _wglBlendColor(float r, float g, float b, float a) { + public static void _wglBlendColor(float r, float g, float b, float a) { glBlendColor(r, g, b, a); } - public static final void _wglColorMask(boolean r, boolean g, boolean b, boolean a) { + public static void _wglColorMask(boolean r, boolean g, boolean b, boolean a) { glColorMask(r, g, b, a); } - public static final void _wglDrawBuffers(int buffer) { + public static void _wglDrawBuffers(int buffer) { if(glesVers == 200) { if(buffer != 0x8CE0) { // GL_COLOR_ATTACHMENT0 throw new UnsupportedOperationException(); @@ -198,7 +199,7 @@ public class PlatformOpenGL { } } - public static final void _wglDrawBuffers(int[] buffers) { + public static void _wglDrawBuffers(int[] buffers) { if(glesVers == 200) { if(buffers.length != 1 || buffers[0] != 0x8CE0) { // GL_COLOR_ATTACHMENT0 throw new UnsupportedOperationException(); @@ -208,83 +209,83 @@ public class PlatformOpenGL { } } - public static final void _wglReadBuffer(int buffer) { + public static void _wglReadBuffer(int buffer) { glReadBuffer(buffer); } - public static final void _wglReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer data) { + public static void _wglReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer data) { nglReadPixels(x, y, width, height, format, type, EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglReadPixels_u16(int x, int y, int width, int height, int format, int type, ByteBuffer data) { + public static void _wglReadPixels_u16(int x, int y, int width, int height, int format, int type, ByteBuffer data) { nglReadPixels(x, y, width, height, format, type, EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglReadPixels(int x, int y, int width, int height, int format, int type, IntBuffer data) { + public static void _wglReadPixels(int x, int y, int width, int height, int format, int type, IntBuffer data) { nglReadPixels(x, y, width, height, format, type, EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglReadPixels(int x, int y, int width, int height, int format, int type, FloatBuffer data) { + public static void _wglReadPixels(int x, int y, int width, int height, int format, int type, FloatBuffer data) { nglReadPixels(x, y, width, height, format, type, EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglPolygonOffset(float f1, float f2) { + public static void _wglPolygonOffset(float f1, float f2) { glPolygonOffset(f1, f2); } - public static final void _wglLineWidth(float width) { + public static void _wglLineWidth(float width) { glLineWidth(width); } - public static final IBufferGL _wglGenBuffers() { + public static IBufferGL _wglGenBuffers() { return new OpenGLObjects.BufferGL(glGenBuffers()); } - public static final ITextureGL _wglGenTextures() { + public static ITextureGL _wglGenTextures() { return new OpenGLObjects.TextureGL(glGenTextures()); } - public static final IBufferArrayGL _wglGenVertexArrays() { + public static IVertexArrayGL _wglGenVertexArrays() { switch(vertexArrayImpl) { case VAO_IMPL_CORE: - return new OpenGLObjects.BufferArrayGL(glGenVertexArrays()); + return new OpenGLObjects.VertexArrayGL(glGenVertexArrays()); case VAO_IMPL_OES: - return new OpenGLObjects.BufferArrayGL(glGenVertexArraysOES()); + return new OpenGLObjects.VertexArrayGL(glGenVertexArraysOES()); default: throw new UnsupportedOperationException(); } } - public static final IProgramGL _wglCreateProgram() { + public static IProgramGL _wglCreateProgram() { return new OpenGLObjects.ProgramGL(glCreateProgram()); } - public static final IShaderGL _wglCreateShader(int type) { + public static IShaderGL _wglCreateShader(int type) { return new OpenGLObjects.ShaderGL(glCreateShader(type)); } - public static final IFramebufferGL _wglCreateFramebuffer() { + public static IFramebufferGL _wglCreateFramebuffer() { return new OpenGLObjects.FramebufferGL(glGenFramebuffers()); } - public static final IRenderbufferGL _wglCreateRenderbuffer() { + public static IRenderbufferGL _wglCreateRenderbuffer() { return new OpenGLObjects.RenderbufferGL(glGenRenderbuffers()); } - public static final IQueryGL _wglGenQueries() { + public static IQueryGL _wglGenQueries() { return new OpenGLObjects.QueryGL(glGenQueries()); } - public static final void _wglDeleteBuffers(IBufferGL obj) { + public static void _wglDeleteBuffers(IBufferGL obj) { glDeleteBuffers(((OpenGLObjects.BufferGL) obj).ptr); } - public static final void _wglDeleteTextures(ITextureGL obj) { + public static void _wglDeleteTextures(ITextureGL obj) { glDeleteTextures(((OpenGLObjects.TextureGL) obj).ptr); } - public static final void _wglDeleteVertexArrays(IBufferArrayGL obj) { - int ptr = ((OpenGLObjects.BufferArrayGL) obj).ptr; + public static void _wglDeleteVertexArrays(IVertexArrayGL obj) { + int ptr = ((OpenGLObjects.VertexArrayGL) obj).ptr; switch(vertexArrayImpl) { case VAO_IMPL_CORE: glDeleteVertexArrays(ptr); @@ -297,66 +298,66 @@ public class PlatformOpenGL { } } - public static final void _wglDeleteProgram(IProgramGL obj) { + public static void _wglDeleteProgram(IProgramGL obj) { glDeleteProgram(((OpenGLObjects.ProgramGL) obj).ptr); } - public static final void _wglDeleteShader(IShaderGL obj) { + public static void _wglDeleteShader(IShaderGL obj) { glDeleteShader(((OpenGLObjects.ShaderGL) obj).ptr); } - public static final void _wglDeleteFramebuffer(IFramebufferGL obj) { + public static void _wglDeleteFramebuffer(IFramebufferGL obj) { glDeleteFramebuffers(((OpenGLObjects.FramebufferGL) obj).ptr); } - public static final void _wglDeleteRenderbuffer(IRenderbufferGL obj) { + public static void _wglDeleteRenderbuffer(IRenderbufferGL obj) { glDeleteRenderbuffers(((OpenGLObjects.RenderbufferGL) obj).ptr); } - public static final void _wglDeleteQueries(IQueryGL obj) { + public static void _wglDeleteQueries(IQueryGL obj) { glDeleteQueries(((OpenGLObjects.QueryGL) obj).ptr); } - public static final void _wglBindBuffer(int target, IBufferGL obj) { + public static void _wglBindBuffer(int target, IBufferGL obj) { glBindBuffer(target, obj == null ? 0 : ((OpenGLObjects.BufferGL) obj).ptr); } - public static final void _wglBufferData(int target, ByteBuffer data, int usage) { + public static void _wglBufferData(int target, ByteBuffer data, int usage) { nglBufferData(target, data == null ? 0 : data.remaining(), data == null ? 0l : EaglerLWJGLAllocator.getAddress(data), usage); } - public static final void _wglBufferData(int target, IntBuffer data, int usage) { + public static void _wglBufferData(int target, IntBuffer data, int usage) { nglBufferData(target, data == null ? 0 : (data.remaining() << 2), data == null ? 0l : EaglerLWJGLAllocator.getAddress(data), usage); } - public static final void _wglBufferData(int target, FloatBuffer data, int usage) { + public static void _wglBufferData(int target, FloatBuffer data, int usage) { nglBufferData(target, data == null ? 0 : (data.remaining() << 2), data == null ? 0l : EaglerLWJGLAllocator.getAddress(data), usage); } - public static final void _wglBufferData(int target, int size, int usage) { + public static void _wglBufferData(int target, int size, int usage) { glBufferData(target, size, usage); } - public static final void _wglBufferSubData(int target, int offset, ByteBuffer data) { + public static void _wglBufferSubData(int target, int offset, ByteBuffer data) { nglBufferSubData(target, offset, data == null ? 0 : data.remaining(), data == null ? 0l : EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglBufferSubData(int target, int offset, IntBuffer data) { + public static void _wglBufferSubData(int target, int offset, IntBuffer data) { nglBufferSubData(target, offset, data == null ? 0 : (data.remaining() << 2), data == null ? 0l : EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglBufferSubData(int target, int offset, FloatBuffer data) { + public static void _wglBufferSubData(int target, int offset, FloatBuffer data) { nglBufferSubData(target, offset, data == null ? 0 : (data.remaining() << 2), data == null ? 0l : EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglBindVertexArray(IBufferArrayGL obj) { - int ptr = obj == null ? 0 : ((OpenGLObjects.BufferArrayGL) obj).ptr; + public static void _wglBindVertexArray(IVertexArrayGL obj) { + int ptr = obj == null ? 0 : ((OpenGLObjects.VertexArrayGL) obj).ptr; switch(vertexArrayImpl) { case VAO_IMPL_CORE: glBindVertexArray(ptr); @@ -369,20 +370,20 @@ public class PlatformOpenGL { } } - public static final void _wglEnableVertexAttribArray(int index) { + public static void _wglEnableVertexAttribArray(int index) { glEnableVertexAttribArray(index); } - public static final void _wglDisableVertexAttribArray(int index) { + public static void _wglDisableVertexAttribArray(int index) { glDisableVertexAttribArray(index); } - public static final void _wglVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, + public static void _wglVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, int offset) { glVertexAttribPointer(index, size, type, normalized, stride, offset); } - public static final void _wglVertexAttribDivisor(int index, int divisor) { + public static void _wglVertexAttribDivisor(int index, int divisor) { switch(instancingImpl) { case INSTANCE_IMPL_CORE: glVertexAttribDivisor(index, divisor); @@ -398,88 +399,88 @@ public class PlatformOpenGL { } } - public static final void _wglActiveTexture(int texture) { + public static void _wglActiveTexture(int texture) { glActiveTexture(texture); } - public static final void _wglBindTexture(int target, ITextureGL obj) { + public static void _wglBindTexture(int target, ITextureGL obj) { glBindTexture(target, obj == null ? 0 : ((OpenGLObjects.TextureGL) obj).ptr); } - public static final void _wglTexParameterf(int target, int param, float value) { + public static void _wglTexParameterf(int target, int param, float value) { glTexParameterf(target, param, value); } - public static final void _wglTexParameteri(int target, int param, int value) { + public static void _wglTexParameteri(int target, int param, int value) { glTexParameteri(target, param, value); } - public static final void _wglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, + public static void _wglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ByteBuffer data) { nglTexImage3D(target, level, internalFormat, width, height, depth, border, format, type, data == null ? 0l : EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglTexImage2D(int target, int level, int internalFormat, int width, int height, + public static void _wglTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ByteBuffer data) { nglTexImage2D(target, level, internalFormat, width, height, border, format, type, data == null ? 0l : EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglTexImage2D(int target, int level, int internalFormat, int width, int height, + public static void _wglTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, IntBuffer data) { nglTexImage2D(target, level, internalFormat, width, height, border, format, type, data == null ? 0l : EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglTexImage2Df32(int target, int level, int internalFormat, int width, int height, + public static void _wglTexImage2Df32(int target, int level, int internalFormat, int width, int height, int border, int format, int type, FloatBuffer data) { nglTexImage2D(target, level, internalFormat, width, height, border, format, type, data == null ? 0l : EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglTexImage2Du16(int target, int level, int internalFormat, int width, int height, + public static void _wglTexImage2Du16(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ByteBuffer data) { nglTexImage2D(target, level, internalFormat, width, height, border, format, type, data == null ? 0l : EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglTexImage2Df32(int target, int level, int internalFormat, int width, int height, + public static void _wglTexImage2Df32(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ByteBuffer data) { nglTexImage2D(target, level, internalFormat, width, height, border, format, type, data == null ? 0l : EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, + public static void _wglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer data) { nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data == null ? 0l : EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, + public static void _wglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer data) { nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data == null ? 0l : EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglTexSubImage2Df32(int target, int level, int xoffset, int yoffset, int width, int height, + public static void _wglTexSubImage2Df32(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, FloatBuffer data) { nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data == null ? 0l : EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglTexSubImage2Du16(int target, int level, int xoffset, int yoffset, int width, int height, + public static void _wglTexSubImage2Du16(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer data) { nglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data == null ? 0l : EaglerLWJGLAllocator.getAddress(data)); } - public static final void _wglCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, + public static void _wglCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) { glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); } - public static final void _wglTexStorage2D(int target, int levels, int internalFormat, int w, int h) { + public static void _wglTexStorage2D(int target, int levels, int internalFormat, int w, int h) { switch(texStorageImpl) { case TEX_STORAGE_IMPL_CORE: glTexStorage2D(target, levels, internalFormat, w, h); @@ -492,67 +493,67 @@ public class PlatformOpenGL { } } - public static final void _wglPixelStorei(int pname, int value) { + public static void _wglPixelStorei(int pname, int value) { glPixelStorei(pname, value); } - public static final void _wglGenerateMipmap(int target) { + public static void _wglGenerateMipmap(int target) { glGenerateMipmap(target); } - public static final void _wglShaderSource(IShaderGL obj, String source) { + public static void _wglShaderSource(IShaderGL obj, String source) { glShaderSource(((OpenGLObjects.ShaderGL) obj).ptr, source); } - public static final void _wglCompileShader(IShaderGL obj) { + public static void _wglCompileShader(IShaderGL obj) { glCompileShader(((OpenGLObjects.ShaderGL) obj).ptr); } - public static final int _wglGetShaderi(IShaderGL obj, int param) { + public static int _wglGetShaderi(IShaderGL obj, int param) { return glGetShaderi(((OpenGLObjects.ShaderGL) obj).ptr, param); } - public static final String _wglGetShaderInfoLog(IShaderGL obj) { + public static String _wglGetShaderInfoLog(IShaderGL obj) { return glGetShaderInfoLog(((OpenGLObjects.ShaderGL) obj).ptr); } - public static final void _wglUseProgram(IProgramGL obj) { + public static void _wglUseProgram(IProgramGL obj) { glUseProgram(obj == null ? 0 : ((OpenGLObjects.ProgramGL) obj).ptr); } - public static final void _wglAttachShader(IProgramGL obj, IShaderGL shader) { + public static void _wglAttachShader(IProgramGL obj, IShaderGL shader) { glAttachShader(((OpenGLObjects.ProgramGL) obj).ptr, ((OpenGLObjects.ShaderGL) shader).ptr); } - public static final void _wglDetachShader(IProgramGL obj, IShaderGL shader) { + public static void _wglDetachShader(IProgramGL obj, IShaderGL shader) { glDetachShader(((OpenGLObjects.ProgramGL) obj).ptr, ((OpenGLObjects.ShaderGL) shader).ptr); } - public static final void _wglLinkProgram(IProgramGL obj) { + public static void _wglLinkProgram(IProgramGL obj) { glLinkProgram(((OpenGLObjects.ProgramGL) obj).ptr); } - public static final int _wglGetProgrami(IProgramGL obj, int param) { + public static int _wglGetProgrami(IProgramGL obj, int param) { return glGetProgrami(((OpenGLObjects.ProgramGL) obj).ptr, param); } - public static final String _wglGetProgramInfoLog(IProgramGL obj) { + public static String _wglGetProgramInfoLog(IProgramGL obj) { return glGetProgramInfoLog(((OpenGLObjects.ProgramGL) obj).ptr); } - public static final void _wglBindAttribLocation(IProgramGL obj, int index, String name) { + public static void _wglBindAttribLocation(IProgramGL obj, int index, String name) { glBindAttribLocation(((OpenGLObjects.ProgramGL) obj).ptr, index, name); } - public static final int _wglGetAttribLocation(IProgramGL obj, String name) { + public static int _wglGetAttribLocation(IProgramGL obj, String name) { return glGetAttribLocation(((OpenGLObjects.ProgramGL) obj).ptr, name); } - public static final void _wglDrawArrays(int mode, int first, int count) { + public static void _wglDrawArrays(int mode, int first, int count) { glDrawArrays(mode, first, count); } - public static final void _wglDrawArraysInstanced(int mode, int first, int count, int instanced) { + public static void _wglDrawArraysInstanced(int mode, int first, int count, int instanced) { switch(instancingImpl) { case INSTANCE_IMPL_CORE: glDrawArraysInstanced(mode, first, count, instanced); @@ -568,11 +569,11 @@ public class PlatformOpenGL { } } - public static final void _wglDrawElements(int mode, int count, int type, int offset) { + public static void _wglDrawElements(int mode, int count, int type, int offset) { glDrawElements(mode, count, type, offset); } - public static final void _wglDrawElementsInstanced(int mode, int count, int type, int offset, int instanced) { + public static void _wglDrawElementsInstanced(int mode, int count, int type, int offset, int instanced) { switch(instancingImpl) { case INSTANCE_IMPL_CORE: glDrawElementsInstanced(mode, count, type, offset, instanced); @@ -588,49 +589,49 @@ public class PlatformOpenGL { } } - public static final IUniformGL _wglGetUniformLocation(IProgramGL obj, String name) { + public static IUniformGL _wglGetUniformLocation(IProgramGL obj, String name) { int loc = glGetUniformLocation(((OpenGLObjects.ProgramGL) obj).ptr, name); return loc < 0 ? null : new OpenGLObjects.UniformGL(loc); } - public static final int _wglGetUniformBlockIndex(IProgramGL obj, String name) { + public static int _wglGetUniformBlockIndex(IProgramGL obj, String name) { return glGetUniformBlockIndex(((OpenGLObjects.ProgramGL) obj).ptr, name); } - public static final void _wglBindBufferRange(int target, int index, IBufferGL buffer, int offset, int size) { + public static void _wglBindBufferRange(int target, int index, IBufferGL buffer, int offset, int size) { glBindBufferRange(target, index, ((OpenGLObjects.BufferGL) buffer).ptr, offset, size); } - public static final void _wglUniformBlockBinding(IProgramGL obj, int blockIndex, int bufferIndex) { + public static void _wglUniformBlockBinding(IProgramGL obj, int blockIndex, int bufferIndex) { glUniformBlockBinding(((OpenGLObjects.ProgramGL) obj).ptr, blockIndex, bufferIndex); } - public static final void _wglUniform1f(IUniformGL obj, float x) { + public static void _wglUniform1f(IUniformGL obj, float x) { if (obj != null) glUniform1f(((OpenGLObjects.UniformGL) obj).ptr, x); } - public static final void _wglUniform2f(IUniformGL obj, float x, float y) { + public static void _wglUniform2f(IUniformGL obj, float x, float y) { if (obj != null) glUniform2f(((OpenGLObjects.UniformGL) obj).ptr, x, y); } - public static final void _wglUniform3f(IUniformGL obj, float x, float y, float z) { + public static void _wglUniform3f(IUniformGL obj, float x, float y, float z) { if (obj != null) glUniform3f(((OpenGLObjects.UniformGL) obj).ptr, x, y, z); } - public static final void _wglUniform4f(IUniformGL obj, float x, float y, float z, float w) { + public static void _wglUniform4f(IUniformGL obj, float x, float y, float z, float w) { if (obj != null) glUniform4f(((OpenGLObjects.UniformGL) obj).ptr, x, y, z, w); } - public static final void _wglUniform1i(IUniformGL obj, int x) { + public static void _wglUniform1i(IUniformGL obj, int x) { if (obj != null) glUniform1i(((OpenGLObjects.UniformGL) obj).ptr, x); } - public static final void _wglUniform2i(IUniformGL obj, int x, int y) { + public static void _wglUniform2i(IUniformGL obj, int x, int y) { if (obj != null) glUniform2i(((OpenGLObjects.UniformGL) obj).ptr, x, y); } @@ -640,48 +641,48 @@ public class PlatformOpenGL { glUniform3i(((OpenGLObjects.UniformGL) obj).ptr, x, y, z); } - public static final void _wglUniform4i(IUniformGL obj, int x, int y, int z, int w) { + public static void _wglUniform4i(IUniformGL obj, int x, int y, int z, int w) { if (obj != null) glUniform4i(((OpenGLObjects.UniformGL) obj).ptr, x, y, z, w); } - public static final void _wglUniformMatrix2fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { + public static void _wglUniformMatrix2fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { if (obj != null) nglUniformMatrix2fv(((OpenGLObjects.UniformGL) obj).ptr, mat.remaining() >> 2, transpose, EaglerLWJGLAllocator.getAddress(mat)); } - public static final void _wglUniformMatrix3fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { + public static void _wglUniformMatrix3fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { if (obj != null) nglUniformMatrix3fv(((OpenGLObjects.UniformGL) obj).ptr, mat.remaining() / 9, transpose, EaglerLWJGLAllocator.getAddress(mat)); } - public static final void _wglUniformMatrix3x2fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { + public static void _wglUniformMatrix3x2fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { if (obj != null) nglUniformMatrix3x2fv(((OpenGLObjects.UniformGL) obj).ptr, mat.remaining() / 6, transpose, EaglerLWJGLAllocator.getAddress(mat)); } - public static final void _wglUniformMatrix4fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { + public static void _wglUniformMatrix4fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { if (obj != null) nglUniformMatrix4fv(((OpenGLObjects.UniformGL) obj).ptr, mat.remaining() >> 4, transpose, EaglerLWJGLAllocator.getAddress(mat)); } - public static final void _wglUniformMatrix4x2fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { + public static void _wglUniformMatrix4x2fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { if (obj != null) nglUniformMatrix4x2fv(((OpenGLObjects.UniformGL) obj).ptr, mat.remaining() >> 3, transpose, EaglerLWJGLAllocator.getAddress(mat)); } - public static final void _wglUniformMatrix4x3fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { + public static void _wglUniformMatrix4x3fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { if (obj != null) nglUniformMatrix4x3fv(((OpenGLObjects.UniformGL) obj).ptr, mat.remaining() / 12, transpose, EaglerLWJGLAllocator.getAddress(mat)); } - public static final void _wglBindFramebuffer(int target, IFramebufferGL framebuffer) { + public static void _wglBindFramebuffer(int target, IFramebufferGL framebuffer) { if(framebuffer == null) { glBindFramebuffer(target, 0); }else { @@ -689,87 +690,87 @@ public class PlatformOpenGL { } } - public static final int _wglCheckFramebufferStatus(int target) { + public static int _wglCheckFramebufferStatus(int target) { return glCheckFramebufferStatus(target); } - public static final void _wglFramebufferTexture2D(int target, int attachment, int texTarget, ITextureGL texture, + public static void _wglFramebufferTexture2D(int target, int attachment, int texTarget, ITextureGL texture, int level) { glFramebufferTexture2D(target, attachment, texTarget, ((OpenGLObjects.TextureGL) texture).ptr, level); } - public static final void _wglFramebufferTextureLayer(int target, int attachment, ITextureGL texture, int level, int layer) { + public static void _wglFramebufferTextureLayer(int target, int attachment, ITextureGL texture, int level, int layer) { glFramebufferTextureLayer(target, attachment, ((OpenGLObjects.TextureGL) texture).ptr, level, layer); } - public static final void _wglBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, + public static void _wglBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int bits, int filter) { glBlitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, bits, filter); } - public static final void _wglBindRenderbuffer(int target, IRenderbufferGL renderbuffer) { + public static void _wglBindRenderbuffer(int target, IRenderbufferGL renderbuffer) { glBindRenderbuffer(target, renderbuffer == null ? 0 : ((OpenGLObjects.RenderbufferGL) renderbuffer).ptr); } - public static final void _wglRenderbufferStorage(int target, int internalformat, int width, int height) { + public static void _wglRenderbufferStorage(int target, int internalformat, int width, int height) { glRenderbufferStorage(target, internalformat, width, height); } - public static final void _wglFramebufferRenderbuffer(int target, int attachment, int renderbufferTarget, + public static void _wglFramebufferRenderbuffer(int target, int attachment, int renderbufferTarget, IRenderbufferGL renderbuffer) { glFramebufferRenderbuffer(target, attachment, renderbufferTarget, ((OpenGLObjects.RenderbufferGL) renderbuffer).ptr); } - public static final String _wglGetString(int param) { + public static String _wglGetString(int param) { return glGetString(param); } - public static final int _wglGetInteger(int param) { + public static int _wglGetInteger(int param) { return glGetInteger(param); } - public static final int _wglGetError() { + public static int _wglGetError() { return glGetError(); } - public static final int checkOpenGLESVersion() { + public static int checkOpenGLESVersion() { return glesVers; } - public static final boolean checkEXTGPUShader5Capable() { + public static boolean checkEXTGPUShader5Capable() { return hasEXTGPUShader5; } - public static final boolean checkOESGPUShader5Capable() { + public static boolean checkOESGPUShader5Capable() { return hasOESGPUShader5; } - public static final boolean checkFBORenderMipmapCapable() { + public static boolean checkFBORenderMipmapCapable() { return hasOESFBORenderMipmap; } - public static final boolean checkVAOCapable() { + public static boolean checkVAOCapable() { return vertexArrayImpl != VAO_IMPL_NONE; } - public static final boolean checkInstancingCapable() { + public static boolean checkInstancingCapable() { return instancingImpl != INSTANCE_IMPL_NONE; } - public static final boolean checkTexStorageCapable() { + public static boolean checkTexStorageCapable() { return texStorageImpl != TEX_STORAGE_IMPL_NONE; } - public static final boolean checkTextureLODCapable() { + public static boolean checkTextureLODCapable() { return glesVers >= 300 || hasEXTShaderTextureLOD; } - public static final boolean checkNPOTCapable() { + public static boolean checkNPOTCapable() { return glesVers >= 300; } - public static final boolean checkHDRFramebufferSupport(int bits) { + public static boolean checkHDRFramebufferSupport(int bits) { switch(bits) { case 16: return hasFBO16FSupport; @@ -780,7 +781,7 @@ public class PlatformOpenGL { } } - public static final boolean checkLinearHDRFilteringSupport(int bits) { + public static boolean checkLinearHDRFilteringSupport(int bits) { switch(bits) { case 16: return hasLinearHDR16FSupport; @@ -792,20 +793,20 @@ public class PlatformOpenGL { } // legacy - public static final boolean checkLinearHDR32FSupport() { + public static boolean checkLinearHDR32FSupport() { return hasLinearHDR32FSupport; } - public static final boolean checkAnisotropicFilteringSupport() { + public static boolean checkAnisotropicFilteringSupport() { return hasEXTTextureFilterAnisotropic; } - public static final String[] getAllExtensions() { + public static String[] getAllExtensions() { return glGetString(GL_EXTENSIONS).split(" "); } - public static final void enterVAOEmulationHook() { + public static void enterVAOEmulationHook() { } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java index cf07482..3990407 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import static org.lwjgl.egl.EGL10.*; @@ -55,21 +71,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFolderResourcePack; import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplayer; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 PlatformRuntime { static final Logger logger = LogManager.getLogger("RuntimeLWJGL3"); @@ -679,4 +680,4 @@ public class PlatformRuntime { return false; } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformScreenRecord.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformScreenRecord.java index eb1f80c..04b55a1 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformScreenRecord.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformScreenRecord.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import net.lax1dude.eaglercraft.v1_8.recording.EnumScreenRecordingCodec; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.recording.EnumScreenRecordingCodec; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import net.lax1dude.eaglercraft.v1_8.recording.EnumScreenRecordingCodec; + public class PlatformScreenRecord { public static boolean isSupported() { @@ -56,4 +57,4 @@ public class PlatformScreenRecord { } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformUpdateSvc.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformUpdateSvc.java index c82caaf..3669bcd 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformUpdateSvc.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformUpdateSvc.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import net.lax1dude.eaglercraft.v1_8.update.UpdateCertificate; -import net.lax1dude.eaglercraft.v1_8.update.UpdateProgressStruct; -import net.lax1dude.eaglercraft.v1_8.update.UpdateResultObj; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.update.UpdateResultObj; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import net.lax1dude.eaglercraft.v1_8.update.UpdateCertificate; +import net.lax1dude.eaglercraft.v1_8.update.UpdateProgressStruct; +import net.lax1dude.eaglercraft.v1_8.update.UpdateResultObj; + public class PlatformUpdateSvc { private static final UpdateProgressStruct dummyStruct = new UpdateProgressStruct(); @@ -63,4 +64,4 @@ public class PlatformUpdateSvc { public static void quine(UpdateCertificate clientUpdate, byte[] data) { } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformVoiceClient.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformVoiceClient.java index bb3da1a..6823d88 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformVoiceClient.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformVoiceClient.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.voice.EnumVoiceChannelReadyState; - -/** +/* * Copyright (c) 2022-2024 ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.lax1dude.eaglercraft.v1_8.voice.EnumVoiceChannelReadyState; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.voice.EnumVoiceChannelReadyState; + public class PlatformVoiceClient { public static void initialize() { @@ -92,4 +93,4 @@ public class PlatformVoiceClient { return EnumVoiceChannelReadyState.NONE; } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebRTC.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebRTC.java index 664ea3f..e72adc1 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebRTC.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebRTC.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import dev.onvoid.webrtc.*; @@ -21,21 +37,6 @@ import java.nio.ByteBuffer; import java.nio.file.Paths; import java.util.*; -/** - * Copyright (c) 2022-2024 ayunami2000. 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 PlatformWebRTC { private static final Logger logger = LogManager.getLogger("PlatformWebRTC"); diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebView.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebView.java index d08cea8..1e3fee7 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebView.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebView.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.FallbackWebViewServer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketWebViewMessageV4EAG; -import net.lax1dude.eaglercraft.v1_8.webview.WebViewOverlayController.IPacketSendCallback; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.webview.WebViewOverlayController.IPacketSen * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.FallbackWebViewServer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketWebViewMessageV4EAG; +import net.lax1dude.eaglercraft.v1_8.webview.WebViewOverlayController.IPacketSendCallback; + public class PlatformWebView { private static FallbackWebViewServer fallbackServer = null; @@ -90,4 +91,4 @@ public class PlatformWebView { } } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLAllocator.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLAllocator.java index 7952d25..07da7aa 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLAllocator.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLAllocator.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.lwjgl.system.jemalloc.JEmalloc; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import org.lwjgl.system.jemalloc.JEmalloc; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.lwjgl.system.jemalloc.JEmalloc; + public class EaglerLWJGLAllocator { public static class WrongBufferClassType extends RuntimeException { @@ -209,4 +210,4 @@ public class EaglerLWJGLAllocator { return new WrongBufferClassType("Tried to pass a " + clazz.getClass().getSimpleName() + " which is not a native eagler buffer"); } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLByteBuffer.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLByteBuffer.java index ff1cf32..f7e7206 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLByteBuffer.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLByteBuffer.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import net.lax1dude.unsafememcpy.UnsafeMemcpy; -import net.lax1dude.unsafememcpy.UnsafeUtils; - -/** +/* * Copyright (c) 2022-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.lax1dude.unsafememcpy.UnsafeUtils; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import net.lax1dude.unsafememcpy.UnsafeMemcpy; +import net.lax1dude.unsafememcpy.UnsafeUtils; + public class EaglerLWJGLByteBuffer extends ByteBuffer { final long address; @@ -375,4 +376,4 @@ public class EaglerLWJGLByteBuffer extends ByteBuffer { return this; } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLFloatBuffer.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLFloatBuffer.java index f839dbf..869b6a8 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLFloatBuffer.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLFloatBuffer.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import net.lax1dude.unsafememcpy.UnsafeMemcpy; -import net.lax1dude.unsafememcpy.UnsafeUtils; - -/** +/* * Copyright (c) 2022-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.lax1dude.unsafememcpy.UnsafeUtils; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import net.lax1dude.unsafememcpy.UnsafeMemcpy; +import net.lax1dude.unsafememcpy.UnsafeUtils; + public class EaglerLWJGLFloatBuffer extends FloatBuffer { final long address; @@ -229,4 +230,4 @@ public class EaglerLWJGLFloatBuffer extends FloatBuffer { return this; } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLIntBuffer.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLIntBuffer.java index 392f7a1..5199aa3 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLIntBuffer.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLIntBuffer.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import net.lax1dude.unsafememcpy.UnsafeMemcpy; -import net.lax1dude.unsafememcpy.UnsafeUtils; - -/** +/* * Copyright (c) 2022-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.lax1dude.unsafememcpy.UnsafeUtils; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import net.lax1dude.unsafememcpy.UnsafeMemcpy; +import net.lax1dude.unsafememcpy.UnsafeUtils; + public class EaglerLWJGLIntBuffer extends IntBuffer { final long address; @@ -229,4 +230,4 @@ public class EaglerLWJGLIntBuffer extends IntBuffer { return this; } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLShortBuffer.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLShortBuffer.java index c77a0ce..6a1344d 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLShortBuffer.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerLWJGLShortBuffer.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import net.lax1dude.unsafememcpy.UnsafeMemcpy; -import net.lax1dude.unsafememcpy.UnsafeUtils; - -/** +/* * Copyright (c) 2022-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.lax1dude.unsafememcpy.UnsafeUtils; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import net.lax1dude.unsafememcpy.UnsafeMemcpy; +import net.lax1dude.unsafememcpy.UnsafeUtils; + public class EaglerLWJGLShortBuffer extends ShortBuffer { final long address; @@ -229,4 +230,4 @@ public class EaglerLWJGLShortBuffer extends ShortBuffer { return this; } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DebugFilesystem.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DebugFilesystem.java index e8203eb..e452eba 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DebugFilesystem.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DebugFilesystem.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; import java.io.File; @@ -13,21 +29,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; import net.lax1dude.eaglercraft.v1_8.internal.vfs2.EaglerFileSystemException; import net.lax1dude.eaglercraft.v1_8.internal.vfs2.VFSIterator2.BreakLoop; -/** - * 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 DebugFilesystem implements IEaglerFilesystem { public static DebugFilesystem initialize(String fsName, File filesystemRoot) { @@ -245,4 +246,4 @@ public class DebugFilesystem implements IEaglerFilesystem { } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopClientConfigAdapter.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopClientConfigAdapter.java index 2c8ad82..8513507 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopClientConfigAdapter.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopClientConfigAdapter.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; - -import java.util.ArrayList; -import java.util.List; -import java.util.function.Consumer; - -import org.json.JSONObject; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; -import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; -import net.lax1dude.eaglercraft.v1_8.internal.IClientConfigAdapter; -import net.lax1dude.eaglercraft.v1_8.internal.IClientConfigAdapterHooks; -import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayEntry; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayEntry; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; + +import java.util.ArrayList; +import java.util.List; +import java.util.function.Consumer; + +import org.json.JSONObject; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; +import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; +import net.lax1dude.eaglercraft.v1_8.internal.IClientConfigAdapter; +import net.lax1dude.eaglercraft.v1_8.internal.IClientConfigAdapterHooks; +import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayEntry; + public class DesktopClientConfigAdapter implements IClientConfigAdapter { public static final IClientConfigAdapter instance = new DesktopClientConfigAdapter(); @@ -233,4 +234,4 @@ public class DesktopClientConfigAdapter implements IClientConfigAdapter { } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopWebSocketClient.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopWebSocketClient.java index fb64504..fc546a7 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopWebSocketClient.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopWebSocketClient.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; - -import java.net.URI; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; -import net.lax1dude.eaglercraft.v1_8.internal.AbstractWebSocketClient; -import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; + +import java.net.URI; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; +import net.lax1dude.eaglercraft.v1_8.internal.AbstractWebSocketClient; +import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class DesktopWebSocketClient extends AbstractWebSocketClient { static final Logger logger = LogManager.getLogger("DesktopWebSocketClient"); @@ -106,4 +107,4 @@ public class DesktopWebSocketClient extends AbstractWebSocketClient { addRecievedFrame(new DesktopWebSocketFrameBinary(array)); } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopWebSocketFrameBinary.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopWebSocketFrameBinary.java index 951cbb1..ed774ea 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopWebSocketFrameBinary.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopWebSocketFrameBinary.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; - -import java.io.InputStream; - -import net.lax1dude.eaglercraft.v1_8.EaglerInputStream; -import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketFrame; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; + +import java.io.InputStream; + +import net.lax1dude.eaglercraft.v1_8.EaglerInputStream; +import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketFrame; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; + public class DesktopWebSocketFrameBinary implements IWebSocketFrame { private final byte[] byteArray; @@ -61,4 +62,4 @@ public class DesktopWebSocketFrameBinary implements IWebSocketFrame { return timestamp; } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopWebSocketFrameString.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopWebSocketFrameString.java index 12e1b11..614a15e 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopWebSocketFrameString.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/DesktopWebSocketFrameString.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; - -import java.io.InputStream; - -import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketFrame; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; + +import java.io.InputStream; + +import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketFrame; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; + public class DesktopWebSocketFrameString implements IWebSocketFrame { private final String string; @@ -60,4 +61,4 @@ public class DesktopWebSocketFrameString implements IWebSocketFrame { return timestamp; } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewHTTPD.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewHTTPD.java index 0875d24..d607031 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewHTTPD.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewHTTPD.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; - -import fi.iki.elonen.NanoHTTPD; -import fi.iki.elonen.NanoHTTPD.Response.Status; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; + +import fi.iki.elonen.NanoHTTPD; +import fi.iki.elonen.NanoHTTPD.Response.Status; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + class FallbackWebViewHTTPD extends NanoHTTPD { static final Logger logger = FallbackWebViewServer.logger; @@ -38,4 +39,4 @@ class FallbackWebViewHTTPD extends NanoHTTPD { return newFixedLengthResponse(Status.NOT_FOUND, MIME_HTML, "Eaglercraft Desktop Runtime

404 Not Found

"); } } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewProtocol.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewProtocol.java index 6d55b84..c5d924f 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewProtocol.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewProtocol.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; - -import java.nio.charset.StandardCharsets; -import java.util.HashMap; -import java.util.Map; - -import org.json.JSONException; -import org.json.JSONObject; - -import net.lax1dude.eaglercraft.v1_8.internal.WebViewOptions; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.lax1dude.eaglercraft.v1_8.webview.PermissionsCache; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.lax1dude.eaglercraft.v1_8.webview.PermissionsCache; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; + +import java.nio.charset.StandardCharsets; +import java.util.HashMap; +import java.util.Map; + +import org.json.JSONException; +import org.json.JSONObject; + +import net.lax1dude.eaglercraft.v1_8.internal.WebViewOptions; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.webview.PermissionsCache; + class FallbackWebViewProtocol { static final Logger logger = FallbackWebViewServer.logger; @@ -296,4 +297,4 @@ class FallbackWebViewProtocol { } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewServer.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewServer.java index 9bbce4f..db70b24 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewServer.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewServer.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; import java.io.BufferedReader; @@ -19,21 +35,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketWebViewMessageV4EAG; import net.lax1dude.eaglercraft.v1_8.webview.WebViewOverlayController.IPacketSendCallback; -/** - * 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 FallbackWebViewServer { static final Logger logger = LogManager.getLogger("FallbackWebViewServer"); @@ -187,4 +188,4 @@ public class FallbackWebViewServer { } } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewWSD.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewWSD.java index 3d8b343..5321878 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewWSD.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FallbackWebViewWSD.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; import java.net.InetSocketAddress; @@ -19,21 +35,6 @@ import net.lax1dude.eaglercraft.v1_8.webview.WebViewOverlayController.IPacketSen import static net.lax1dude.eaglercraft.v1_8.internal.lwjgl.FallbackWebViewProtocol.*; -/** - * 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. - * - */ class FallbackWebViewWSD extends WebSocketServer { static final Logger logger = FallbackWebViewServer.logger; @@ -270,4 +271,4 @@ class FallbackWebViewWSD extends WebSocketServer { this.callback = callback; } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FilesystemConvertingDialog.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FilesystemConvertingDialog.java index 935745e..7caae08 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FilesystemConvertingDialog.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/FilesystemConvertingDialog.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; import javax.swing.JFrame; @@ -13,21 +29,6 @@ import javax.swing.JLabel; import javax.swing.SwingConstants; import javax.swing.UIManager; -/** - * 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 FilesystemConvertingDialog extends JFrame { private static final long serialVersionUID = 1L; @@ -75,4 +76,4 @@ public class FilesystemConvertingDialog extends JFrame { progressBar.setValue(val); } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/JDBCFilesystem.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/JDBCFilesystem.java index 92e199c13..f283535 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/JDBCFilesystem.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/JDBCFilesystem.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; import java.sql.Connection; @@ -23,21 +39,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.vfs2.VFSIterator2; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 JDBCFilesystem implements IEaglerFilesystem { public static final Logger logger = LogManager.getLogger("JDBCFilesystem"); @@ -456,4 +457,4 @@ public class JDBCFilesystem implements IEaglerFilesystem { return false; } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/JDBCFilesystemConverter.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/JDBCFilesystemConverter.java index bf97a3b..f56014f 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/JDBCFilesystemConverter.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/JDBCFilesystemConverter.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; import java.io.File; @@ -14,21 +30,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.vfs2.EaglerFileSystemException; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 JDBCFilesystemConverter { private static final Logger logger = LogManager.getLogger("JDBCFilesystemConverter"); @@ -127,4 +128,4 @@ public class JDBCFilesystemConverter { } file.delete(); } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/LWJGLEntryPoint.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/LWJGLEntryPoint.java index af21ddd..d6fc330 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/LWJGLEntryPoint.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/LWJGLEntryPoint.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; - -import javax.swing.UIManager; -import javax.swing.UnsupportedLookAndFeelException; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.EagUtils; -import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformANGLE; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; -import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderSource; -import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager; -import net.minecraft.client.main.Main; - -/** +/* * Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.minecraft.client.main.Main; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; + +import javax.swing.UIManager; +import javax.swing.UnsupportedLookAndFeelException; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.EagUtils; +import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformANGLE; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; +import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderSource; +import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager; +import net.minecraft.client.main.Main; + public class LWJGLEntryPoint { public static Thread mainThread = null; @@ -98,4 +99,4 @@ public class LWJGLEntryPoint { } } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/LaunchRenderDocDialog.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/LaunchRenderDocDialog.java index d5de17a..85242c0 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/LaunchRenderDocDialog.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/LaunchRenderDocDialog.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; @@ -21,21 +37,6 @@ import java.awt.Dimension; import javax.swing.JSeparator; -/** - * Copyright (c) 2022 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 LaunchRenderDocDialog extends JDialog { private static final long serialVersionUID = 8312760039213612790L; @@ -110,4 +111,4 @@ public class LaunchRenderDocDialog extends JDialog { JSeparator separator = new JSeparator(); getContentPane().add(separator, BorderLayout.NORTH); } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/MainMenuCreditsDialog.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/MainMenuCreditsDialog.java index cac3db2..2e295d3 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/MainMenuCreditsDialog.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/MainMenuCreditsDialog.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; - -import javax.swing.JFrame; -import javax.swing.JPanel; -import java.awt.BorderLayout; -import javax.swing.JScrollPane; -import javax.swing.JTextArea; -import java.awt.Font; -import java.awt.GraphicsEnvironment; -import java.awt.Toolkit; -import javax.swing.ScrollPaneConstants; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import javax.swing.ScrollPaneConstants; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; +import java.awt.Font; +import java.awt.GraphicsEnvironment; +import java.awt.Toolkit; +import javax.swing.ScrollPaneConstants; + public class MainMenuCreditsDialog extends JFrame { private static final long serialVersionUID = 696969696L; @@ -72,4 +73,4 @@ public class MainMenuCreditsDialog extends JFrame { public void setCreditsText(String str) { textArea.setText(str); } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/WebSocketClientImpl.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/WebSocketClientImpl.java index 08b92e5..41d483d 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/WebSocketClientImpl.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/internal/lwjgl/WebSocketClientImpl.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; - -import java.net.URI; -import java.nio.ByteBuffer; - -import org.java_websocket.client.WebSocketClient; -import org.java_websocket.drafts.Draft; -import org.java_websocket.drafts.Draft_6455; -import org.java_websocket.extensions.permessage_deflate.PerMessageDeflateExtension; -import org.java_websocket.handshake.ServerHandshake; - -import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.lwjgl; + +import java.net.URI; +import java.nio.ByteBuffer; + +import org.java_websocket.client.WebSocketClient; +import org.java_websocket.drafts.Draft; +import org.java_websocket.drafts.Draft_6455; +import org.java_websocket.extensions.permessage_deflate.PerMessageDeflateExtension; +import org.java_websocket.handshake.ServerHandshake; + +import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState; + class WebSocketClientImpl extends WebSocketClient { private static final Draft perMessageDeflateDraft = new Draft_6455(new PerMessageDeflateExtension()); @@ -76,4 +77,4 @@ class WebSocketClientImpl extends WebSocketClient { clientObj.handleBytes(arg0.array()); } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/internal/ClientPlatformSingleplayer.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/internal/ClientPlatformSingleplayer.java index 7a4610e..b7fd8b6 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/internal/ClientPlatformSingleplayer.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/internal/ClientPlatformSingleplayer.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.internal; - -import java.util.ArrayList; -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.internal.IPCPacketData; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; -import net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl.CrashScreenPopup; -import net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl.DesktopIntegratedServer; -import net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl.MemoryConnection; - -/** +/* * Copyright (c) 2023-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl.MemoryConnection; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.internal; + +import java.util.ArrayList; +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.internal.IPCPacketData; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; +import net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl.CrashScreenPopup; +import net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl.DesktopIntegratedServer; +import net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl.MemoryConnection; + public class ClientPlatformSingleplayer { private static CrashScreenPopup crashOverlay = null; @@ -96,4 +97,4 @@ public class ClientPlatformSingleplayer { crashOverlay.setVisible(false); } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/ServerPlatformSingleplayer.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/ServerPlatformSingleplayer.java index 09beda5..6d3d97a 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/ServerPlatformSingleplayer.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/ServerPlatformSingleplayer.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server.internal; import java.util.ArrayList; @@ -13,21 +29,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.lwjgl.DesktopClientConfigAdapter; import net.lax1dude.eaglercraft.v1_8.sp.server.IWASMCrashCallback; import net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl.MemoryConnection; -/** - * Copyright (c) 2023-2024 lax1dude, ayunami2000. 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 ServerPlatformSingleplayer { private static IEaglerFilesystem filesystem = null; @@ -100,4 +101,4 @@ public class ServerPlatformSingleplayer { return false; } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/lwjgl/CrashScreenPopup.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/lwjgl/CrashScreenPopup.java index 74f4307..1abf1dc 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/lwjgl/CrashScreenPopup.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/lwjgl/CrashScreenPopup.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl; - -import javax.swing.JFrame; -import javax.swing.JPanel; -import java.awt.BorderLayout; -import javax.swing.JScrollPane; -import javax.swing.JTextArea; -import javax.swing.ScrollPaneConstants; -import java.awt.Font; -import java.awt.Toolkit; -import java.awt.Color; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import java.awt.Color; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl; + +import javax.swing.JFrame; +import javax.swing.JPanel; +import java.awt.BorderLayout; +import javax.swing.JScrollPane; +import javax.swing.JTextArea; +import javax.swing.ScrollPaneConstants; +import java.awt.Font; +import java.awt.Toolkit; +import java.awt.Color; + public class CrashScreenPopup extends JFrame { private static final long serialVersionUID = 1L; @@ -68,4 +69,4 @@ public class CrashScreenPopup extends JFrame { public void setCrashText(String txt) { txtrTest.setText(txt); } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/lwjgl/DesktopIntegratedServer.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/lwjgl/DesktopIntegratedServer.java index d9acdff..cfdf22d 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/lwjgl/DesktopIntegratedServer.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/lwjgl/DesktopIntegratedServer.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl; - -import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerIntegratedServerWorker; -import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplayer; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplay * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl; + +import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerIntegratedServerWorker; +import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplayer; + public class DesktopIntegratedServer implements Runnable { public static Thread serverThread = null; @@ -40,4 +41,4 @@ public class DesktopIntegratedServer implements Runnable { } } -} +} \ No newline at end of file diff --git a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/lwjgl/MemoryConnection.java b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/lwjgl/MemoryConnection.java index 5960af3..cccf3a3 100755 --- a/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/lwjgl/MemoryConnection.java +++ b/src/lwjgl/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/lwjgl/MemoryConnection.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl; - -import java.util.LinkedList; -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.internal.IPCPacketData; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,9 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.internal.IPCPacketData; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.internal.lwjgl; + +import java.util.LinkedList; +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.internal.IPCPacketData; + public class MemoryConnection { public static final List clientToServerQueue = new LinkedList<>(); public static final List serverToClientQueue = new LinkedList<>(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/ArrayUtils.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/ArrayUtils.java index be9e6e1..467bf1b 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/ArrayUtils.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/ArrayUtils.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import java.util.List; - -import net.minecraft.client.settings.KeyBinding; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.client.settings.KeyBinding; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import java.util.List; + +import net.minecraft.client.settings.KeyBinding; + public class ArrayUtils { public static KeyBinding[] clone(KeyBinding[] keyBinding) { @@ -77,4 +78,4 @@ public class ArrayUtils { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/ClientUUIDLoadingCache.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/ClientUUIDLoadingCache.java index 0cc95af..b3649e1 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/ClientUUIDLoadingCache.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/ClientUUIDLoadingCache.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client.CPacketGetOtherClientUUIDV4EAG; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.AbstractClientPlayer; -import net.minecraft.entity.player.EntityPlayer; -import net.minecraft.entity.player.EntityPlayerMP; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.minecraft.entity.player.EntityPlayerMP; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client.CPacketGetOtherClientUUIDV4EAG; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.AbstractClientPlayer; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.entity.player.EntityPlayerMP; + public class ClientUUIDLoadingCache { private static final Logger logger = LogManager.getLogger("ClientUUIDLoadingCache"); @@ -52,16 +53,20 @@ public class ClientUUIDLoadingCache { if(ret == null) { Minecraft mc = Minecraft.getMinecraft(); if(mc != null && mc.thePlayer != null && mc.thePlayer.sendQueue.getEaglerMessageProtocol().ver >= 4) { - ret = PENDING_UUID; - EaglercraftUUID playerUUID = player.getUniqueID(); - if(!waitingUUIDs.containsKey(playerUUID) && !evictedUUIDs.containsKey(playerUUID)) { - int reqID = ++requestId & 0x3FFF; - WaitingLookup newLookup = new WaitingLookup(reqID, playerUUID, EagRuntime.steadyTimeMillis(), - (AbstractClientPlayer) player); - waitingIDs.put(reqID, newLookup); - waitingUUIDs.put(playerUUID, newLookup); - mc.thePlayer.sendQueue.sendEaglerMessage( - new CPacketGetOtherClientUUIDV4EAG(reqID, newLookup.uuid.msb, newLookup.uuid.lsb)); + if(ignoreNonEaglerPlayers && !player.getGameProfile().getTextures().eaglerPlayer) { + ret = VANILLA_UUID; + }else { + ret = PENDING_UUID; + EaglercraftUUID playerUUID = player.getUniqueID(); + if(!waitingUUIDs.containsKey(playerUUID) && !evictedUUIDs.containsKey(playerUUID)) { + int reqID = ++requestId & 0x3FFF; + WaitingLookup newLookup = new WaitingLookup(reqID, playerUUID, EagRuntime.steadyTimeMillis(), + (AbstractClientPlayer) player); + waitingIDs.put(reqID, newLookup); + waitingUUIDs.put(playerUUID, newLookup); + mc.thePlayer.sendQueue.sendEaglerMessage( + new CPacketGetOtherClientUUIDV4EAG(reqID, newLookup.uuid.msb, newLookup.uuid.lsb)); + } } } } @@ -81,6 +86,7 @@ public class ClientUUIDLoadingCache { private static int requestId = 0; private static long lastFlushReq = EagRuntime.steadyTimeMillis(); private static long lastFlushEvict = EagRuntime.steadyTimeMillis(); + private static boolean ignoreNonEaglerPlayers = false; public static void update() { long timestamp = EagRuntime.steadyTimeMillis(); @@ -116,13 +122,19 @@ public class ClientUUIDLoadingCache { evictedUUIDs.clear(); } + private static final EaglercraftUUID MAGIC_DISABLE_NON_EAGLER_PLAYERS = new EaglercraftUUID(0xEEEEA64771094C4EL, 0x86E55B81D17E67EBL); + public static void handleResponse(int requestId, EaglercraftUUID clientId) { WaitingLookup lookup = waitingIDs.remove(requestId); if(lookup != null) { lookup.player.clientBrandUUIDCache = clientId; waitingUUIDs.remove(lookup.uuid); }else { - logger.warn("Unsolicited client brand UUID lookup response #{} recieved! (Brand UUID: {})", requestId, clientId); + if(requestId == -1 && MAGIC_DISABLE_NON_EAGLER_PLAYERS.equals(clientId)) { + ignoreNonEaglerPlayers = true; + }else { + logger.warn("Unsolicited client brand UUID lookup response #{} recieved! (Brand UUID: {})", requestId, clientId); + } } } @@ -134,6 +146,10 @@ public class ClientUUIDLoadingCache { } } + public static void resetFlags() { + ignoreNonEaglerPlayers = false; + } + private static class WaitingLookup { private final int reqID; @@ -149,4 +165,4 @@ public class ClientUUIDLoadingCache { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/DecoderException.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/DecoderException.java index ac71a9c..8e34505 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/DecoderException.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/DecoderException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + public class DecoderException extends RuntimeException { public DecoderException() { @@ -33,4 +34,4 @@ public class DecoderException extends RuntimeException { super(cause); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/Display.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/Display.java index b5b85d0..a345e58 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/Display.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/Display.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; + public class Display { private static long lastDPIUpdate = -250l; @@ -111,4 +112,4 @@ public class Display { return cacheDPI; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/EagRuntime.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/EagRuntime.java index c272160..b4ff91b 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/EagRuntime.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/EagRuntime.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8; import java.io.BufferedReader; @@ -28,21 +44,6 @@ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; import net.lax1dude.eaglercraft.v1_8.recording.ScreenRecordingController; import net.lax1dude.eaglercraft.v1_8.update.UpdateService; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 EagRuntime { private static final Logger logger = LogManager.getLogger("EagRuntime"); @@ -379,4 +380,4 @@ public class EagRuntime { return PlatformRuntime.immediateContinueSupported(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/EagUtils.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/EagUtils.java index a2923a6..bc0ecbe 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/EagUtils.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/EagUtils.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import java.nio.charset.StandardCharsets; -import java.util.Arrays; -import java.util.List; -import java.util.regex.Pattern; - -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; +import java.util.List; +import java.util.regex.Pattern; + +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; + public class EagUtils { private static final String hex = "0123456789ABCDEF"; @@ -104,4 +105,4 @@ public class EagUtils { PlatformRuntime.sleep(500); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerBidiReorder.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerBidiReorder.java index 4a48007..1cea837 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerBidiReorder.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerBidiReorder.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import jdk_internal.bidi.Bidi; - -/** +/* * Copyright (c) 2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import jdk_internal.bidi.Bidi; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import jdk_internal.bidi.Bidi; + public class EaglerBidiReorder { /** @@ -84,4 +85,4 @@ public class EaglerBidiReorder { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerInputStream.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerInputStream.java index 2ef6a0b..27b0726 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerInputStream.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerInputStream.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import java.io.ByteArrayInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.Arrays; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import java.util.Arrays; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.Arrays; + public class EaglerInputStream extends InputStream { protected byte buf[]; @@ -178,4 +179,4 @@ public class EaglerInputStream extends InputStream { return count; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerOutputStream.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerOutputStream.java index 64dab6d..0cc4b2d 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerOutputStream.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerOutputStream.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import java.io.IOException; -import java.io.OutputStream; -import java.util.Arrays; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.util.Arrays; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.Arrays; + public class EaglerOutputStream extends OutputStream { protected byte buf[]; @@ -81,4 +82,4 @@ public class EaglerOutputStream extends OutputStream { public void close() throws IOException { } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerXBungeeVersion.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerXBungeeVersion.java index 1f6f08d..b8df18a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerXBungeeVersion.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerXBungeeVersion.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import org.json.JSONObject; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import org.json.JSONObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import org.json.JSONObject; + public class EaglerXBungeeVersion { public static final String pluginFileEPK = "plugin_download.zip"; @@ -87,4 +88,4 @@ public class EaglerXBungeeVersion { long verz = getVersionAsLong(vers); return verz != -1l && verz < pluginVersionLong; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerZLIB.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerZLIB.java index 94100a5..e146bd3 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerZLIB.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglerZLIB.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; + public class EaglerZLIB { public static OutputStream newDeflaterOutputStream(OutputStream os) throws IOException { @@ -57,4 +58,4 @@ public class EaglerZLIB { return PlatformRuntime.newGZIPInputStream(is); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftRandom.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftRandom.java index e52039b..fec9e65 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftRandom.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftRandom.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; + public class EaglercraftRandom { private static final long multiplier = 0x5DEECE66DL; @@ -131,4 +132,4 @@ public class EaglercraftRandom { return v1 * multiplier; } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftSoundManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftSoundManager.java index 6fdb4ee..220bd96 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftSoundManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftSoundManager.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8; import java.util.Iterator; @@ -24,21 +40,6 @@ import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; -/** - * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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 EaglercraftSoundManager { protected class ActiveSoundEvent { @@ -373,4 +374,4 @@ public class EaglercraftSoundManager { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftUUID.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftUUID.java index 2130625..55f79e9 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftUUID.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftUUID.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import net.lax1dude.eaglercraft.v1_8.crypto.MD5Digest; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.crypto.MD5Digest; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import net.lax1dude.eaglercraft.v1_8.crypto.MD5Digest; + public class EaglercraftUUID implements Comparable { public final long msb; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java index e05d393..f2e5adf 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/EaglercraftVersion.java @@ -10,7 +10,7 @@ public class EaglercraftVersion { /// Customize these to fit your fork: public static final String projectForkName = "EaglercraftX"; - public static final String projectForkVersion = "u49"; + public static final String projectForkVersion = "u50"; public static final String projectForkVendor = "lax1dude"; public static final String projectForkURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; @@ -20,20 +20,20 @@ public class EaglercraftVersion { public static final String projectOriginName = "EaglercraftX"; public static final String projectOriginAuthor = "lax1dude"; public static final String projectOriginRevision = "1.8"; - public static final String projectOriginVersion = "u49"; + public static final String projectOriginVersion = "u50"; public static final String projectOriginURL = "https://gitlab.com/lax1dude/eaglercraftx-1.8"; // rest in peace // EPK Version Identifier - public static final String EPKVersionIdentifier = "u49"; // Set to null to disable EPK version check + public static final String EPKVersionIdentifier = "u50"; // Set to null to disable EPK version check // Updating configuration public static final boolean enableUpdateService = true; public static final String updateBundlePackageName = "net.lax1dude.eaglercraft.v1_8.client"; - public static final int updateBundlePackageVersionInt = 49; + public static final int updateBundlePackageVersionInt = 50; public static final String updateLatestLocalStorageKey = "latestUpdate_" + updateBundlePackageName; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/EncoderException.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/EncoderException.java index caa1f21..1b9dc4d 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/EncoderException.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/EncoderException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + public class EncoderException extends RuntimeException { public EncoderException() { @@ -33,4 +34,4 @@ public class EncoderException extends RuntimeException { super(cause); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/ExceptionUtils.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/ExceptionUtils.java index 703d7c1..ae9a63a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/ExceptionUtils.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/ExceptionUtils.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + public class ExceptionUtils { public static Throwable getRootCause(Throwable exception) { @@ -25,4 +26,4 @@ public class ExceptionUtils { return exception; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/Filesystem.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/Filesystem.java index 6918699..2c87aad 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/Filesystem.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/Filesystem.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import java.util.HashMap; -import java.util.Map; - -import net.lax1dude.eaglercraft.v1_8.internal.IEaglerFilesystem; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformFilesystem; -import net.lax1dude.eaglercraft.v1_8.internal.RamdiskFilesystemImpl; -import net.lax1dude.eaglercraft.v1_8.internal.VFSFilenameIterator; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import java.util.HashMap; +import java.util.Map; + +import net.lax1dude.eaglercraft.v1_8.internal.IEaglerFilesystem; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformFilesystem; +import net.lax1dude.eaglercraft.v1_8.internal.RamdiskFilesystemImpl; +import net.lax1dude.eaglercraft.v1_8.internal.VFSFilenameIterator; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class Filesystem { private static final Logger logger = LogManager.getLogger("PlatformFilesystem"); @@ -155,4 +156,4 @@ public class Filesystem { } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/Gamepad.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/Gamepad.java index 68cc6f2..5420d52 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/Gamepad.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/Gamepad.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import java.util.LinkedList; -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.internal.GamepadConstants; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import java.util.LinkedList; +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.internal.GamepadConstants; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; + public class Gamepad { private static final boolean[] buttonsLastState = new boolean[24]; @@ -112,4 +113,4 @@ public class Gamepad { buttonEvents.clear(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/HString.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/HString.java index ad26657..5a609ae 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/HString.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/HString.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,10 +13,13 @@ package net.lax1dude.eaglercraft.v1_8; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + public class HString { public static String format(String format, Object... args) { return new HFormatter().format(format, args).toString(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/HashKey.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/HashKey.java index fdb56fb..e54c891 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/HashKey.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/HashKey.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import java.util.Arrays; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import java.util.Arrays; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import java.util.Arrays; + public class HashKey { public final byte[] key; @@ -51,4 +52,4 @@ public class HashKey { return hash == other.hash && Arrays.equals(key, other.key); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/IOUtils.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/IOUtils.java index c7a0ac0..5371f39 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/IOUtils.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/IOUtils.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import java.io.BufferedReader; -import java.io.Closeable; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.nio.charset.Charset; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import java.util.List; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import java.io.BufferedReader; +import java.io.Closeable; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.nio.charset.Charset; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + public class IOUtils { public static List readLines(InputStream parInputStream, Charset charset) { @@ -92,4 +93,4 @@ public class IOUtils { } return i; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/JDKBackports.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/JDKBackports.java index 804c580..27f6a2d 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/JDKBackports.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/JDKBackports.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import java.util.function.Supplier; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import java.util.function.Supplier; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import java.util.function.Supplier; + public class JDKBackports { public static long parseLong(CharSequence s, int beginIndex, int endIndex, int radix) throws NumberFormatException { @@ -87,4 +88,4 @@ public class JDKBackports { return obj; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/Keyboard.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/Keyboard.java index ce28b34..d863695 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/Keyboard.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/Keyboard.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import net.lax1dude.eaglercraft.v1_8.internal.EnumFireKeyboardEvent; -import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import net.lax1dude.eaglercraft.v1_8.internal.EnumFireKeyboardEvent; +import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; + public class Keyboard { public static void enableRepeatEvents(boolean b) { @@ -69,4 +70,4 @@ public class Keyboard { return PlatformInput.keyboardAreKeysLocked(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/Mouse.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/Mouse.java index 427caba..7b736e0 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/Mouse.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/Mouse.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType; -import net.lax1dude.eaglercraft.v1_8.internal.EnumFireMouseEvent; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType; +import net.lax1dude.eaglercraft.v1_8.internal.EnumFireMouseEvent; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; + public class Mouse { public static int getEventDWheel() { @@ -134,4 +135,4 @@ public class Mouse { } } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/PauseMenuCustomizeState.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/PauseMenuCustomizeState.java index e0c67d3..a03ba12 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/PauseMenuCustomizeState.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/PauseMenuCustomizeState.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8; import java.util.ArrayList; @@ -16,21 +32,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.ResourceLocation; -/** - * 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 PauseMenuCustomizeState { private static final Logger logger = LogManager.getLogger("PauseMenuCustomizeState"); @@ -254,4 +255,4 @@ public class PauseMenuCustomizeState { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/PointerInputAbstraction.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/PointerInputAbstraction.java index 5f82346..2ac25c4 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/PointerInputAbstraction.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/PointerInputAbstraction.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import net.lax1dude.eaglercraft.v1_8.touch_gui.TouchControls; -import net.minecraft.client.Minecraft; - -/** +/* * Copyright (c) 2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.minecraft.client.Minecraft; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import net.lax1dude.eaglercraft.v1_8.touch_gui.TouchControls; +import net.minecraft.client.Minecraft; + public class PointerInputAbstraction { protected static Minecraft mc; @@ -224,4 +225,4 @@ public class PointerInputAbstraction { return (touchingScreenNotButton && bt == 0) || Mouse.isButtonDown(bt); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/ThreadLocalRandom.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/ThreadLocalRandom.java index 2d816fa..3a2f0ff 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/ThreadLocalRandom.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/ThreadLocalRandom.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + public class ThreadLocalRandom { private static final EaglercraftRandom rand = new EaglercraftRandom(); @@ -23,4 +24,4 @@ public class ThreadLocalRandom { return rand; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/Touch.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/Touch.java index fcb6e98..613bcbe 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/Touch.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/Touch.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8; - -import net.lax1dude.eaglercraft.v1_8.internal.EnumTouchEvent; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8; + +import net.lax1dude.eaglercraft.v1_8.internal.EnumTouchEvent; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; + public class Touch { public static boolean next() { @@ -115,4 +116,4 @@ public class Touch { } return -1; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/boot_menu/GuiScreenEnterBootMenu.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/boot_menu/GuiScreenEnterBootMenu.java index eefb309..36640cd 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/boot_menu/GuiScreenEnterBootMenu.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/boot_menu/GuiScreenEnterBootMenu.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenEnterBootMenu extends GuiScreen { private final GuiScreen parent; @@ -51,4 +52,4 @@ public class GuiScreenEnterBootMenu extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/cache/EaglerCacheProvider.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/cache/EaglerCacheProvider.java index 760cfa9..74e33f6 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/cache/EaglerCacheProvider.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/cache/EaglerCacheProvider.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.cache; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,8 +13,11 @@ package net.lax1dude.eaglercraft.v1_8.cache; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.cache; + public interface EaglerCacheProvider { V create(K key); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/cache/EaglerLoadingCache.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/cache/EaglerLoadingCache.java index 2358ce8..7a6b012 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/cache/EaglerLoadingCache.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/cache/EaglerLoadingCache.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.cache; - -import java.util.HashMap; -import java.util.Map; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import java.util.Map; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.cache; + +import java.util.HashMap; +import java.util.Map; + public class EaglerLoadingCache { private final EaglerCacheProvider provider; @@ -37,4 +38,4 @@ public class EaglerLoadingCache { return etr; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/GuiScreenInspectSessionToken.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/GuiScreenInspectSessionToken.java index 7606777..40fe07a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/GuiScreenInspectSessionToken.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/GuiScreenInspectSessionToken.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.cookie; - -import java.text.SimpleDateFormat; -import java.util.Date; - -import net.lax1dude.eaglercraft.v1_8.cookie.ServerCookieDataStore.ServerCookie; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.cookie; + +import java.text.SimpleDateFormat; +import java.util.Date; + +import net.lax1dude.eaglercraft.v1_8.cookie.ServerCookieDataStore.ServerCookie; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenInspectSessionToken extends GuiScreen { private final GuiScreen parent; @@ -81,4 +82,4 @@ public class GuiScreenInspectSessionToken extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/GuiScreenRevokeSessionToken.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/GuiScreenRevokeSessionToken.java index ae4c099..26acd11 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/GuiScreenRevokeSessionToken.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/GuiScreenRevokeSessionToken.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.cookie; - -import java.io.IOException; -import java.util.Collections; - -import com.google.common.collect.Lists; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.gui.GuiSlot; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.cookie; + +import java.io.IOException; +import java.util.Collections; + +import com.google.common.collect.Lists; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.GuiSlot; +import net.minecraft.client.resources.I18n; + public class GuiScreenRevokeSessionToken extends GuiScreen { protected GuiScreen parentScreen; private GuiScreenRevokeSessionToken.List list; @@ -143,4 +144,4 @@ public class GuiScreenRevokeSessionToken extends GuiScreen { this.cookieNames.get(i), this.width / 2, j + 1, 16777215); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/GuiScreenSendRevokeRequest.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/GuiScreenSendRevokeRequest.java index 3c6dfdb..dcf2b71 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/GuiScreenSendRevokeRequest.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/GuiScreenSendRevokeRequest.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.cookie; import org.json.JSONObject; @@ -13,21 +29,6 @@ import net.minecraft.client.gui.GuiButton; import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.resources.I18n; -/** - * 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 GuiScreenSendRevokeRequest extends GuiScreen { private static final Logger logger = LogManager.getLogger("SessionRevokeRequest"); @@ -174,4 +175,4 @@ public class GuiScreenSendRevokeRequest extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/HardwareFingerprint.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/HardwareFingerprint.java index fffbac9..173e630 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/HardwareFingerprint.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/HardwareFingerprint.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.cookie; import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL; @@ -32,21 +48,6 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom; import net.lax1dude.eaglercraft.v1_8.crypto.GeneralDigest; import net.lax1dude.eaglercraft.v1_8.crypto.SHA256Digest; -/** - * 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 HardwareFingerprint { // This is used for generating encryption keys for storing cookies, @@ -291,4 +292,4 @@ public class HardwareFingerprint { tmpBuffer[15] = (byte)(i4 & 0xFF); digest.update(tmpBuffer, 0, 16); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/ServerCookieDataStore.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/ServerCookieDataStore.java index eff0d63..c79463e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/ServerCookieDataStore.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/cookie/ServerCookieDataStore.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.cookie; import java.io.DataInputStream; @@ -22,21 +38,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformApplication; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 ServerCookieDataStore { private static final Logger logger = LogManager.getLogger("ServerCookieDataStore"); @@ -393,4 +394,4 @@ public class ServerCookieDataStore { } } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/CancellationException.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/CancellationException.java index 3daf634..2770989 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/CancellationException.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/CancellationException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.futures; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.futures; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.futures; + public class CancellationException extends IllegalStateException { public CancellationException() { @@ -33,4 +34,4 @@ public class CancellationException extends IllegalStateException { super(cause); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/ExecutionException.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/ExecutionException.java index 971731d..f861830 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/ExecutionException.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/ExecutionException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.futures; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.futures; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.futures; + public class ExecutionException extends RuntimeException { public ExecutionException() { @@ -32,4 +33,4 @@ public class ExecutionException extends RuntimeException { super(cause); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/Executors.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/Executors.java index 02da484..94e3256 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/Executors.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/Executors.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.futures; - -import java.util.concurrent.Callable; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import java.util.concurrent.Callable; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.futures; + +import java.util.concurrent.Callable; + public class Executors { public static Callable callable(Runnable task, T result) { @@ -46,4 +47,4 @@ public class Executors { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/Future.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/Future.java index aeb5342..cd56335 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/Future.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/Future.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.futures; - -import java.util.concurrent.TimeUnit; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import java.util.concurrent.TimeUnit; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.futures; + +import java.util.concurrent.TimeUnit; + public interface Future { boolean cancel(boolean mayInterruptIfRunning); @@ -28,4 +29,4 @@ public interface Future { V get() throws InterruptedException, ExecutionException; V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/FutureTask.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/FutureTask.java index 06ec3a2..45cee89 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/FutureTask.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/FutureTask.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.futures; - -import java.util.concurrent.Callable; -import java.util.concurrent.TimeUnit; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import java.util.concurrent.TimeUnit; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.futures; + +import java.util.concurrent.Callable; +import java.util.concurrent.TimeUnit; + public class FutureTask implements RunnableFuture { private boolean cancelled; @@ -86,4 +87,4 @@ public class FutureTask implements RunnableFuture { protected void done() { } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/Futures.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/Futures.java index ea69e32..690c30e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/Futures.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/Futures.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.futures; - -import static com.google.common.base.Preconditions.checkNotNull; - -import java.util.concurrent.Executor; -import java.util.concurrent.TimeUnit; - -import javax.annotation.Nullable; - -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.futures; + +import static com.google.common.base.Preconditions.checkNotNull; + +import java.util.concurrent.Executor; +import java.util.concurrent.TimeUnit; + +import javax.annotation.Nullable; + +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class Futures { private abstract static class ImmediateFuture implements ListenableFuture { @@ -128,4 +129,4 @@ public class Futures { return new ImmediateCancelledFuture(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/ListenableFuture.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/ListenableFuture.java index 827a523..96619a8 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/ListenableFuture.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/ListenableFuture.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.futures; - -import java.util.concurrent.Executor; - -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,10 +13,18 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.futures; + +import java.util.concurrent.Executor; + +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public interface ListenableFuture extends Future { static final Logger futureExceptionLogger = LogManager.getLogger("ListenableFuture"); void addListener(Runnable listener, Executor executor); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/ListenableFutureTask.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/ListenableFutureTask.java index f25a72b..f4c7a29 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/ListenableFutureTask.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/ListenableFutureTask.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.futures; - -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.Callable; -import java.util.concurrent.Executor; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import java.util.concurrent.Executor; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.futures; + +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.Callable; +import java.util.concurrent.Executor; + public class ListenableFutureTask extends FutureTask implements ListenableFuture { private final List listeners = new ArrayList<>(); @@ -57,4 +58,4 @@ public class ListenableFutureTask extends FutureTask implements Listenable return new ListenableFutureTask<>(callableToSchedule); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/RunnableFuture.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/RunnableFuture.java index 181f871..03c3c02 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/RunnableFuture.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/futures/RunnableFuture.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.futures; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.futures; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.futures; + public interface RunnableFuture extends Runnable, Future { void run(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/AbstractWebSocketClient.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/AbstractWebSocketClient.java index 7508d8c..2c9849d 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/AbstractWebSocketClient.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/AbstractWebSocketClient.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,12 +13,22 @@ import java.util.List; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import java.util.ArrayList; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; + public abstract class AbstractWebSocketClient implements IWebSocketClient { protected volatile int availableStringFrames = 0; protected volatile int availableBinaryFrames = 0; protected final List recievedPacketBuffer = new LinkedList<>(); protected String currentURI; + private boolean strEnable = true; + private boolean binEnable = true; protected AbstractWebSocketClient(String currentURI) { this.currentURI = currentURI; @@ -33,6 +36,13 @@ public abstract class AbstractWebSocketClient implements IWebSocketClient { protected void addRecievedFrame(IWebSocketFrame frame) { boolean str = frame.isString(); + if(str) { + if(!strEnable) + return; + }else { + if(!binEnable) + return; + } synchronized(recievedPacketBuffer) { recievedPacketBuffer.add(frame); if(str) { @@ -224,4 +234,14 @@ public abstract class AbstractWebSocketClient implements IWebSocketClient { return currentURI; } -} + @Override + public void setEnableStringFrames(boolean enable) { + strEnable = enable; + } + + @Override + public void setEnableBinaryFrames(boolean enable) { + binEnable = enable; + } + +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EaglerMissingResourceException.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EaglerMissingResourceException.java index 8e99e2b..e58f1c0 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EaglerMissingResourceException.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EaglerMissingResourceException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public class EaglerMissingResourceException extends RuntimeException { public EaglerMissingResourceException() { @@ -32,4 +33,4 @@ public class EaglerMissingResourceException extends RuntimeException { super(cause); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumCursorType.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumCursorType.java index 5772605..9e5c15e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumCursorType.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumCursorType.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public enum EnumCursorType { DEFAULT, HAND, TEXT; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumEaglerConnectionState.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumEaglerConnectionState.java index 0dc6111..055f3b7 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumEaglerConnectionState.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumEaglerConnectionState.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public enum EnumEaglerConnectionState { CLOSED(true, false), CONNECTING(false, false), CONNECTED(false, true), FAILED(true, false); @@ -34,4 +35,4 @@ public enum EnumEaglerConnectionState { return typeOpen; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumFireKeyboardEvent.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumFireKeyboardEvent.java index d583d91..415da6f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumFireKeyboardEvent.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumFireKeyboardEvent.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public enum EnumFireKeyboardEvent { KEY_DOWN, KEY_UP, KEY_REPEAT; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumFireMouseEvent.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumFireMouseEvent.java index 78ffde7..78041f9 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumFireMouseEvent.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumFireMouseEvent.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public enum EnumFireMouseEvent { MOUSE_DOWN, MOUSE_UP, MOUSE_MOVE, MOUSE_WHEEL; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformANGLE.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformANGLE.java index 84e127d..5022f56 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformANGLE.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformANGLE.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public enum EnumPlatformANGLE { DEFAULT(225281 /* GLFW_ANGLE_PLATFORM_TYPE_NONE */, "default", "Default"), @@ -76,4 +77,4 @@ public enum EnumPlatformANGLE { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformAgent.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformAgent.java index 3590346..608f3ca 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformAgent.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformAgent.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public enum EnumPlatformAgent { DESKTOP("LWJGL3"), CHROME("Chrome"), EDGE("Edge"), IE("IE"), FIREFOX("Firefox"), SAFARI("Safari"), OPERA("Opera"), WEBKIT("WebKit"), @@ -62,4 +63,4 @@ public enum EnumPlatformAgent { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformOS.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformOS.java index 6818396..7bf3d78 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformOS.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformOS.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import net.minecraft.util.Util; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.minecraft.util.Util; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import net.minecraft.util.Util; + public enum EnumPlatformOS { WINDOWS("Windows", Util.EnumOS.WINDOWS), MACOS("MacOS", Util.EnumOS.OSX), LINUX("Linux", Util.EnumOS.LINUX), CHROMEBOOK_LINUX("ChromeOS", Util.EnumOS.LINUX), OTHER("Unknown", Util.EnumOS.UNKNOWN); @@ -77,4 +78,4 @@ public enum EnumPlatformOS { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformType.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformType.java index a67fe52..396fa20 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformType.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumPlatformType.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public enum EnumPlatformType { DESKTOP("Desktop"), JAVASCRIPT("JS"), WASM_GC("WASM-GC"); @@ -32,4 +33,4 @@ public enum EnumPlatformType { return name; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumServerRateLimit.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumServerRateLimit.java index 1e3153c..261cb07 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumServerRateLimit.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumServerRateLimit.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public enum EnumServerRateLimit { OK, BLOCKED, LOCKED_OUT -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumTouchEvent.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumTouchEvent.java index 0f49fb2..beb5afe 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumTouchEvent.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumTouchEvent.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public enum EnumTouchEvent { TOUCHSTART(0), TOUCHMOVE(1), TOUCHEND(2); @@ -40,4 +41,4 @@ public enum EnumTouchEvent { lookup[v[i].id] = v[i]; } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumWebViewContentMode.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumWebViewContentMode.java index e6a9030..36d3105 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumWebViewContentMode.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/EnumWebViewContentMode.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public enum EnumWebViewContentMode { URL_BASED, BLOB_BASED; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/FileChooserResult.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/FileChooserResult.java index 1ceaf16..e0c9ef1 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/FileChooserResult.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/FileChooserResult.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public class FileChooserResult { public final String fileName; @@ -25,4 +26,4 @@ public class FileChooserResult { this.fileData = fileData; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/GLObjectMap.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/GLObjectMap.java index f11ddeb..f3776ce 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/GLObjectMap.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/GLObjectMap.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public class GLObjectMap { private Object[] values; private int size; @@ -78,4 +79,4 @@ public class GLObjectMap { insertIndex = 0; allocatedObjects = 0; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/GamepadConstants.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/GamepadConstants.java index d9a9411..a712937 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/GamepadConstants.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/GamepadConstants.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public class GamepadConstants { private static final String[] buttonNames = new String[24]; @@ -131,4 +132,4 @@ public class GamepadConstants { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IAudioCacheLoader.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IAudioCacheLoader.java index 62657a6..0b1a90e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IAudioCacheLoader.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IAudioCacheLoader.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,8 +13,11 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public interface IAudioCacheLoader { byte[] loadFile(String filename); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IAudioHandle.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IAudioHandle.java index ff399c2..2dcca5f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IAudioHandle.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IAudioHandle.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public interface IAudioHandle { void pause(boolean setPaused); @@ -33,4 +34,4 @@ public interface IAudioHandle { boolean shouldFree(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IAudioResource.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IAudioResource.java index 889fc4b..80452d5 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IAudioResource.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IAudioResource.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public interface IAudioResource { -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IBufferGL.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IBufferGL.java index 34761be..7a1813c 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IBufferGL.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IBufferGL.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public interface IBufferGL extends IObjectGL { -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IClientConfigAdapter.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IClientConfigAdapter.java index c69dd20..a04312f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IClientConfigAdapter.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IClientConfigAdapter.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayEntry; -import org.json.JSONObject; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import org.json.JSONObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayEntry; +import org.json.JSONObject; + public interface IClientConfigAdapter { public static class DefaultServer { @@ -102,4 +103,4 @@ public interface IClientConfigAdapter { IClientConfigAdapterHooks getHooks(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IClientConfigAdapterHooks.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IClientConfigAdapterHooks.java index 44fb70b..85c608d 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IClientConfigAdapterHooks.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IClientConfigAdapterHooks.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import java.util.function.Consumer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import java.util.function.Consumer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import java.util.function.Consumer; + public interface IClientConfigAdapterHooks { void callLocalStorageSavedHook(String key, String base64); @@ -27,4 +28,4 @@ public interface IClientConfigAdapterHooks { void callScreenChangedHook(String screenName, int scaledWidth, int scaledHeight, int realWidth, int realHeight, int scaleFactor); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IEaglerFilesystem.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IEaglerFilesystem.java index 3c5f11c..527627e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IEaglerFilesystem.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IEaglerFilesystem.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; + public interface IEaglerFilesystem { String getFilesystemName(); @@ -43,4 +44,4 @@ public interface IEaglerFilesystem { void closeHandle(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IFramebufferGL.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IFramebufferGL.java index b6639b1..9d72a7e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IFramebufferGL.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IFramebufferGL.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public interface IFramebufferGL extends IObjectGL { -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IObjectGL.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IObjectGL.java index 76ac22a..ce6aa31 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IObjectGL.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IObjectGL.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,8 +13,11 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public interface IObjectGL { void free(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IPCPacketData.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IPCPacketData.java index c23a985..90ab594 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IPCPacketData.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IPCPacketData.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public class IPCPacketData { public final String channel; @@ -25,4 +26,4 @@ public class IPCPacketData { this.contents = contents; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IProgramGL.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IProgramGL.java index 4601bd1..9730315 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IProgramGL.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IProgramGL.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public interface IProgramGL extends IObjectGL { -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IQueryGL.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IQueryGL.java index 5345943..ae7fc1e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IQueryGL.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IQueryGL.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public interface IQueryGL extends IObjectGL { -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IRenderbufferGL.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IRenderbufferGL.java index e1f78ec..8fc62b9 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IRenderbufferGL.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IRenderbufferGL.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public interface IRenderbufferGL extends IObjectGL { -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IResourceHandle.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IResourceHandle.java index e5ec499..3700484 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IResourceHandle.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IResourceHandle.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import java.io.InputStream; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import java.io.InputStream; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import java.io.InputStream; + public interface IResourceHandle { String getPath(); @@ -25,4 +26,4 @@ public interface IResourceHandle { byte[] toByteArray(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IServerQuery.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IServerQuery.java index 6165474..806546b 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IServerQuery.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IServerQuery.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import org.json.JSONObject; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.EagUtils; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.EagUtils; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import org.json.JSONObject; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.EagUtils; + public interface IServerQuery { public static final long defaultTimeout = 10000l; @@ -117,4 +118,4 @@ public interface IServerQuery { return awaitResponseBinaryAvailable() ? getBinaryResponse() : null; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IShaderGL.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IShaderGL.java index 18d7ae1..941d69f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IShaderGL.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IShaderGL.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public interface IShaderGL extends IObjectGL { -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/ITextureGL.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/ITextureGL.java index 602b236..9cbdc35 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/ITextureGL.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/ITextureGL.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public interface ITextureGL extends IObjectGL { void setCacheSize(int w, int h); @@ -23,4 +24,4 @@ public interface ITextureGL extends IObjectGL { int getHeight(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IUniformGL.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IUniformGL.java index d5823f1..63e7920 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IUniformGL.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IUniformGL.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public interface IUniformGL extends IObjectGL { -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IBufferArrayGL.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IVertexArrayGL.java similarity index 92% rename from src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IBufferArrayGL.java rename to src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IVertexArrayGL.java index 3701cdb..9f569c0 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IBufferArrayGL.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IVertexArrayGL.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ -public interface IBufferArrayGL extends IObjectGL { -} +package net.lax1dude.eaglercraft.v1_8.internal; + +public interface IVertexArrayGL extends IObjectGL { + +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IWebSocketClient.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IWebSocketClient.java index 7646561..e1ac3b7 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IWebSocketClient.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IWebSocketClient.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import java.util.List; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import java.util.List; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import java.util.List; + public interface IWebSocketClient { EnumEaglerConnectionState getState(); @@ -59,4 +60,8 @@ public interface IWebSocketClient { String getCurrentURI(); -} + void setEnableStringFrames(boolean enable); + + void setEnableBinaryFrames(boolean enable); + +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IWebSocketFrame.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IWebSocketFrame.java index 3378c01..9b459b8 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IWebSocketFrame.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/IWebSocketFrame.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import java.io.InputStream; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import java.io.InputStream; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import java.io.InputStream; + public interface IWebSocketFrame { boolean isString(); @@ -31,4 +32,4 @@ public interface IWebSocketFrame { long getTimestamp(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/KeyboardConstants.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/KeyboardConstants.java index fd77638..e6ddaa9 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/KeyboardConstants.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/KeyboardConstants.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public class KeyboardConstants { private static final String[] keyboardNames = new String[256]; @@ -397,4 +398,4 @@ public class KeyboardConstants { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformIncompatibleException.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformIncompatibleException.java index 94910ed..23c1364 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformIncompatibleException.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformIncompatibleException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,10 +13,13 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public class PlatformIncompatibleException extends RuntimeException { public PlatformIncompatibleException(String s) { super(s); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/QueryResponse.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/QueryResponse.java index 4f63acc..5cd4698 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/QueryResponse.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/QueryResponse.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import org.json.JSONObject; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.EagRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import org.json.JSONObject; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; + public class QueryResponse { public final String responseType; @@ -59,4 +60,4 @@ public class QueryResponse { return (JSONObject)responseData; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/RamdiskFilesystemImpl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/RamdiskFilesystemImpl.java index 8f7f7e6..f92f86b 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/RamdiskFilesystemImpl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/RamdiskFilesystemImpl.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import java.util.Map; -import java.util.TreeMap; - -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import java.util.Map; +import java.util.TreeMap; + +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; + public class RamdiskFilesystemImpl implements IEaglerFilesystem { protected final String filesystemName; @@ -128,4 +129,4 @@ public class RamdiskFilesystemImpl implements IEaglerFilesystem { filesystemMap.clear(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/RuntimeInitializationFailureException.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/RuntimeInitializationFailureException.java index 6d8af98..fb77770 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/RuntimeInitializationFailureException.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/RuntimeInitializationFailureException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public class RuntimeInitializationFailureException extends RuntimeException { public RuntimeInitializationFailureException(String message, Throwable cause) { @@ -25,4 +26,4 @@ public class RuntimeInitializationFailureException extends RuntimeException { super(s); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/ScreenRecordParameters.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/ScreenRecordParameters.java index 8ff90dc..9307651 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/ScreenRecordParameters.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/ScreenRecordParameters.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import net.lax1dude.eaglercraft.v1_8.recording.EnumScreenRecordingCodec; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.recording.EnumScreenRecordingCodec; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import net.lax1dude.eaglercraft.v1_8.recording.EnumScreenRecordingCodec; + public class ScreenRecordParameters { public final EnumScreenRecordingCodec codec; @@ -34,4 +35,4 @@ public class ScreenRecordParameters { this.captureFrameRate = captureFrameRate; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/VFSFilenameIterator.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/VFSFilenameIterator.java index 4305536..4f934c8 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/VFSFilenameIterator.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/VFSFilenameIterator.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import net.lax1dude.eaglercraft.v1_8.internal.vfs2.VFSIterator2.BreakLoop; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.internal.vfs2.VFSIterator2.BreakLoop; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import net.lax1dude.eaglercraft.v1_8.internal.vfs2.VFSIterator2.BreakLoop; + public interface VFSFilenameIterator { public default void end() { @@ -25,4 +26,4 @@ public interface VFSFilenameIterator { public void next(String entry); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/VFSFilenameIteratorNonRecursive.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/VFSFilenameIteratorNonRecursive.java index 612bec8..c60b356 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/VFSFilenameIteratorNonRecursive.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/VFSFilenameIteratorNonRecursive.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + public class VFSFilenameIteratorNonRecursive implements VFSFilenameIterator { private final VFSFilenameIterator child; @@ -44,4 +45,4 @@ public class VFSFilenameIteratorNonRecursive implements VFSFilenameIterator { return j; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/WebViewOptions.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/WebViewOptions.java index 878c82c..cde7c57 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/WebViewOptions.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/WebViewOptions.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import java.net.URI; -import java.nio.charset.StandardCharsets; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import java.net.URI; +import java.nio.charset.StandardCharsets; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; + public class WebViewOptions { public EnumWebViewContentMode contentMode = EnumWebViewContentMode.BLOB_BASED; @@ -64,4 +65,4 @@ public class WebViewOptions { return EaglercraftUUID.nameUUIDFromBytes(eagler); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/Buffer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/Buffer.java index 34f376a..8adcd7e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/Buffer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/Buffer.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal.buffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + public interface Buffer { int capacity(); @@ -51,4 +52,4 @@ public interface Buffer { return new IndexOutOfBoundsException("Index out of range: " + idx); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/ByteBuffer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/ByteBuffer.java index bf00ed9..4c3b5d3 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/ByteBuffer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/ByteBuffer.java @@ -1,7 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - - -/** +/* * Copyright (c) 2022-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -16,6 +13,10 @@ package net.lax1dude.eaglercraft.v1_8.internal.buffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + + public abstract class ByteBuffer implements Buffer { public abstract ByteBuffer duplicate(); @@ -112,4 +113,4 @@ public abstract class ByteBuffer implements Buffer { public abstract byte[] array(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerBufferInputStream.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerBufferInputStream.java index 29b74cd..4fcbfac 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerBufferInputStream.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerBufferInputStream.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import java.io.IOException; -import java.io.InputStream; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import java.io.InputStream; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import java.io.IOException; +import java.io.InputStream; + public class EaglerBufferInputStream extends InputStream { private final ByteBuffer buffer; @@ -67,4 +68,4 @@ public class EaglerBufferInputStream extends InputStream { return buffer.remaining(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/FloatBuffer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/FloatBuffer.java index e34484e..01c1419 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/FloatBuffer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/FloatBuffer.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -/** +/* * Copyright (c) 2022-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal.buffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + public abstract class FloatBuffer implements Buffer { public abstract FloatBuffer duplicate(); @@ -71,5 +72,4 @@ public abstract class FloatBuffer implements Buffer { public abstract float[] array(); -} - +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/IntBuffer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/IntBuffer.java index 8414e4e..1f56141 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/IntBuffer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/IntBuffer.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal.buffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + public abstract class IntBuffer implements Buffer { public abstract IntBuffer duplicate(); @@ -71,5 +72,4 @@ public abstract class IntBuffer implements Buffer { public abstract int[] array(); -} - +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/ShortBuffer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/ShortBuffer.java index b9649f6..e0696e8 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/ShortBuffer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/ShortBuffer.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -/** +/* * Copyright (c) 2022-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal.buffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + public abstract class ShortBuffer implements Buffer { public abstract ShortBuffer duplicate(); @@ -71,4 +72,4 @@ public abstract class ShortBuffer implements Buffer { public abstract short[] array(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/EaglerFileSystemException.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/EaglerFileSystemException.java index cae7742..0bae669 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/EaglerFileSystemException.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/EaglerFileSystemException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.vfs2; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal.vfs2; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.vfs2; + public class EaglerFileSystemException extends RuntimeException { public EaglerFileSystemException() { @@ -31,4 +32,4 @@ public class EaglerFileSystemException extends RuntimeException { public EaglerFileSystemException(Throwable cause) { super(cause); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSFilenameIteratorImpl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSFilenameIteratorImpl.java index f2c14a0..fb68937 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSFilenameIteratorImpl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSFilenameIteratorImpl.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.vfs2; - -import net.lax1dude.eaglercraft.v1_8.internal.IEaglerFilesystem; -import net.lax1dude.eaglercraft.v1_8.internal.VFSFilenameIterator; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.lax1dude.eaglercraft.v1_8.internal.VFSFilenameIterator; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.vfs2; + +import net.lax1dude.eaglercraft.v1_8.internal.IEaglerFilesystem; +import net.lax1dude.eaglercraft.v1_8.internal.VFSFilenameIterator; + class VFSFilenameIteratorImpl implements VFSFilenameIterator { protected IEaglerFilesystem fs; @@ -33,4 +34,4 @@ class VFSFilenameIteratorImpl implements VFSFilenameIterator { itr.next(VFile2.create(fs, entry)); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSIterator2.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSIterator2.java index 8112aaa..cb3417f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSIterator2.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSIterator2.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.vfs2; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal.vfs2; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.vfs2; + public interface VFSIterator2 { public static class BreakLoop extends RuntimeException { @@ -29,4 +30,4 @@ public interface VFSIterator2 { public void next(VFile2 entry); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSListFilenamesIteratorImpl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSListFilenamesIteratorImpl.java index 02428dd..bb24bd7 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSListFilenamesIteratorImpl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSListFilenamesIteratorImpl.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.vfs2; - -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.internal.VFSFilenameIterator; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.internal.VFSFilenameIterator; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.vfs2; + +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.internal.VFSFilenameIterator; + class VFSListFilenamesIteratorImpl implements VFSFilenameIterator { protected List list; @@ -32,4 +33,4 @@ class VFSListFilenamesIteratorImpl implements VFSFilenameIterator { list.add(entry); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSListFilesIteratorImpl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSListFilesIteratorImpl.java index 6a75b13..7ce2c6f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSListFilesIteratorImpl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFSListFilesIteratorImpl.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.vfs2; - -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.internal.IEaglerFilesystem; -import net.lax1dude.eaglercraft.v1_8.internal.VFSFilenameIterator; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.internal.VFSFilenameIterator; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.vfs2; + +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.internal.IEaglerFilesystem; +import net.lax1dude.eaglercraft.v1_8.internal.VFSFilenameIterator; + class VFSListFilesIteratorImpl implements VFSFilenameIterator { protected IEaglerFilesystem fs; @@ -35,4 +36,4 @@ class VFSListFilesIteratorImpl implements VFSFilenameIterator { list.add(VFile2.create(fs, entry)); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFile2.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFile2.java index ecf6891..476a692 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFile2.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFile2.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.vfs2; - -import java.io.InputStream; -import java.io.OutputStream; -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.List; -import java.util.function.Supplier; - -import net.lax1dude.eaglercraft.v1_8.EagUtils; -import net.lax1dude.eaglercraft.v1_8.internal.IEaglerFilesystem; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.vfs2; + +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Supplier; + +import net.lax1dude.eaglercraft.v1_8.EagUtils; +import net.lax1dude.eaglercraft.v1_8.internal.IEaglerFilesystem; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; + public class VFile2 { public static final String pathSeperator = "/"; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFileInputStream.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFileInputStream.java index 19de2ae..ac05eae 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFileInputStream.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFileInputStream.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.vfs2; - -import java.io.IOException; -import java.io.InputStream; - -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.vfs2; + +import java.io.IOException; +import java.io.InputStream; + +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; + class VFileInputStream extends InputStream { private ByteBuffer fileBuffer; @@ -86,4 +87,4 @@ class VFileInputStream extends InputStream { fileBuffer = null; } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFileOutputStream.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFileOutputStream.java index 86bd535..937f578 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFileOutputStream.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/internal/vfs2/VFileOutputStream.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.vfs2; - -import java.io.IOException; -import java.io.OutputStream; - -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; - -/** +/* * Copyright (c) 2023-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.vfs2; + +import java.io.IOException; +import java.io.OutputStream; + +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; + class VFileOutputStream extends OutputStream { private final VFile2 vfsFile; @@ -77,4 +78,4 @@ class VFileOutputStream extends OutputStream { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONDataParserImpl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONDataParserImpl.java index e159f2e..78cf319 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONDataParserImpl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONDataParserImpl.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.json; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,10 +13,13 @@ package net.lax1dude.eaglercraft.v1_8.json; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.json; + public interface JSONDataParserImpl { boolean accepts(Object type); Object parse(Object data); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeCodec.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeCodec.java index 4bb99c3..ed464bf 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeCodec.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeCodec.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.json; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.json; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.json; + public interface JSONTypeCodec extends JSONTypeSerializer, JSONTypeDeserializer { -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeDeserializer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeDeserializer.java index f88b6e6..3b88643 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeDeserializer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeDeserializer.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.json; - -import org.json.JSONException; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import org.json.JSONException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.json; + +import org.json.JSONException; + public interface JSONTypeDeserializer { default O deserializeFromJson(J json) throws JSONException { @@ -31,4 +32,4 @@ public interface JSONTypeDeserializer { O deserialize(J json) throws JSONException; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeProvider.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeProvider.java index 10261b1..4410105 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeProvider.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeProvider.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.json; import java.util.ArrayList; @@ -37,21 +53,6 @@ import net.minecraft.util.ChatStyle; import net.minecraft.util.IChatComponent; import net.minecraft.world.gen.ChunkProviderSettings; -/** - * Copyright (c) 2022 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 JSONTypeProvider { private static final Map,JSONTypeSerializer> serializers = new HashMap<>(); @@ -158,4 +159,4 @@ public class JSONTypeProvider { } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeSerializer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeSerializer.java index 937b44c..1ff4ab7 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeSerializer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/JSONTypeSerializer.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.json; - -import org.json.JSONException; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import org.json.JSONException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.json; + +import org.json.JSONException; + public interface JSONTypeSerializer { default J serializeToJson(O object) throws JSONException { @@ -31,4 +32,4 @@ public interface JSONTypeSerializer { J serialize(O object) throws JSONException; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/JSONDataParserReader.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/JSONDataParserReader.java index 03f6d9f..09a3e0d 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/JSONDataParserReader.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/JSONDataParserReader.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.json.impl; - -import java.io.IOException; -import java.io.Reader; - -import org.json.JSONException; - -import net.lax1dude.eaglercraft.v1_8.json.JSONDataParserImpl; -import net.lax1dude.eaglercraft.v1_8.json.JSONTypeProvider; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.json.JSONTypeProvider; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.json.impl; + +import java.io.IOException; +import java.io.Reader; + +import org.json.JSONException; + +import net.lax1dude.eaglercraft.v1_8.json.JSONDataParserImpl; +import net.lax1dude.eaglercraft.v1_8.json.JSONTypeProvider; + public class JSONDataParserReader implements JSONDataParserImpl { public boolean accepts(Object type) { @@ -49,4 +50,4 @@ public class JSONDataParserReader implements JSONDataParserImpl { return JSONTypeProvider.parse(builder.toString()); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/JSONDataParserStream.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/JSONDataParserStream.java index a9ca66b..0b3fd20 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/JSONDataParserStream.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/JSONDataParserStream.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.json.impl; - -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; - -import org.json.JSONException; - -import net.lax1dude.eaglercraft.v1_8.IOUtils; -import net.lax1dude.eaglercraft.v1_8.json.JSONDataParserImpl; -import net.lax1dude.eaglercraft.v1_8.json.JSONTypeProvider; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.lax1dude.eaglercraft.v1_8.json.JSONTypeProvider; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.json.impl; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; + +import org.json.JSONException; + +import net.lax1dude.eaglercraft.v1_8.IOUtils; +import net.lax1dude.eaglercraft.v1_8.json.JSONDataParserImpl; +import net.lax1dude.eaglercraft.v1_8.json.JSONTypeProvider; + public class JSONDataParserStream implements JSONDataParserImpl { public boolean accepts(Object type) { @@ -45,4 +46,4 @@ public class JSONDataParserStream implements JSONDataParserImpl { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/JSONDataParserString.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/JSONDataParserString.java index bdb101f..dea7342 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/JSONDataParserString.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/JSONDataParserString.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.json.impl; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -import net.lax1dude.eaglercraft.v1_8.json.JSONDataParserImpl; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.json.JSONDataParserImpl; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.json.impl; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + +import net.lax1dude.eaglercraft.v1_8.json.JSONDataParserImpl; + public class JSONDataParserString implements JSONDataParserImpl { public boolean accepts(Object type) { @@ -46,4 +47,4 @@ public class JSONDataParserString implements JSONDataParserImpl { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/SoundMapDeserializer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/SoundMapDeserializer.java index 8ac5126..bde0dc0 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/SoundMapDeserializer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/json/impl/SoundMapDeserializer.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.json.impl; - -import java.util.HashMap; -import java.util.Map; - -import org.json.JSONException; -import org.json.JSONObject; - -import net.lax1dude.eaglercraft.v1_8.json.JSONTypeDeserializer; -import net.lax1dude.eaglercraft.v1_8.json.JSONTypeProvider; -import net.minecraft.client.audio.SoundHandler.SoundMap; -import net.minecraft.client.audio.SoundList; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.minecraft.client.audio.SoundList; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.json.impl; + +import java.util.HashMap; +import java.util.Map; + +import org.json.JSONException; +import org.json.JSONObject; + +import net.lax1dude.eaglercraft.v1_8.json.JSONTypeDeserializer; +import net.lax1dude.eaglercraft.v1_8.json.JSONTypeProvider; +import net.minecraft.client.audio.SoundHandler.SoundMap; +import net.minecraft.client.audio.SoundList; + public class SoundMapDeserializer implements JSONTypeDeserializer { @Override @@ -37,4 +38,4 @@ public class SoundMapDeserializer implements JSONTypeDeserializer loggerInstances = new HashMap<>(); @@ -45,4 +46,4 @@ public class LogManager { logLevel = lv; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/log4j/Logger.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/log4j/Logger.java index e526e4b..462e621 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/log4j/Logger.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/log4j/Logger.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.log4j; - -import java.text.SimpleDateFormat; -import java.util.Date; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.log4j; + +import java.text.SimpleDateFormat; +import java.util.Date; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; + public class Logger { public final String loggerName; @@ -176,4 +177,4 @@ public class Logger { return LogManager.logLevel.levelInt <= Level.DEBUG.levelInt; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/AcceleratedEffectRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/AcceleratedEffectRenderer.java index df073d3..1e1c98f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/AcceleratedEffectRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/AcceleratedEffectRenderer.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.minecraft; - -import net.lax1dude.eaglercraft.v1_8.opengl.InstancedParticleRenderer; -import net.minecraft.client.Minecraft; -import net.minecraft.client.particle.EntityFX; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.minecraft.util.MathHelper; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + +import net.lax1dude.eaglercraft.v1_8.opengl.InstancedParticleRenderer; +import net.minecraft.client.Minecraft; +import net.minecraft.client.particle.EntityFX; +import net.minecraft.entity.Entity; +import net.minecraft.util.MathHelper; + public class AcceleratedEffectRenderer implements IAcceleratedParticleEngine { private float partialTicks; @@ -82,4 +83,4 @@ public class AcceleratedEffectRenderer implements IAcceleratedParticleEngine { (lightMapData >>> 16) & 0xFF, (int)(particleSize * 16.0f), texSize, rgba); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/ChunkUpdateManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/ChunkUpdateManager.java index ba1465e..db39a5b 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/ChunkUpdateManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/ChunkUpdateManager.java @@ -1,14 +1,11 @@ package net.lax1dude.eaglercraft.v1_8.minecraft; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - import java.util.LinkedList; import java.util.List; 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; import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer; import net.lax1dude.eaglercraft.v1_8.opengl.WorldVertexBufferUploader; import net.minecraft.client.Minecraft; @@ -198,9 +195,7 @@ public class ChunkUpdateManager { } private void uploadDisplayList(WorldRenderer chunkRenderer, int parInt1, RenderChunk parRenderChunk) { - EaglercraftGPU.glNewList(parInt1, GL_COMPILE); - WorldVertexBufferUploader.func_181679_a(chunkRenderer); - EaglercraftGPU.glEndList(); + WorldVertexBufferUploader.uploadDisplayList(parInt1, chunkRenderer); } public boolean isAlreadyQueued(RenderChunk update) { diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerCloudRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerCloudRenderer.java index 446fc29..6107b76 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerCloudRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerCloudRenderer.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2025 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.minecraft; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; @@ -17,21 +33,6 @@ import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; import net.minecraft.util.Vec3; -/** - * Copyright (c) 2025 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 EaglerCloudRenderer { private static final ResourceLocation locationCloudsPNG = new ResourceLocation("textures/environment/clouds.png"); @@ -111,7 +112,7 @@ public class EaglerCloudRenderer { } if(newState != RENDER_STATE_FAST) { - GlStateManager.disableCull(); + GlStateManager.enableCull(); double d0 = this.mc.renderGlobal.getCloudCounter(partialTicks); double d1 = (rve.prevPosX + (rve.posX - rve.prevPosX) * (double) partialTicks + d0 * 0.029999999329447746D) / 12.0D; double d2 = (rve.prevPosZ + (rve.posZ - rve.prevPosZ) * (double) partialTicks) / 12.0D + 0.33000001311302185D; @@ -192,7 +193,7 @@ public class EaglerCloudRenderer { yy = 1; } - EaglercraftGPU.glCallList(renderListFancy[(yy + 1) * 3 + xx + 1]); + GlStateManager.callList(renderListFancy[(yy + 1) * 3 + xx + 1]); GlStateManager.popMatrix(); GlStateManager.matrixMode(GL_MODELVIEW); @@ -219,15 +220,15 @@ public class EaglerCloudRenderer { GlStateManager.matrixMode(GL_TEXTURE); GlStateManager.pushMatrix(); GlStateManager.translate(f8, f9, 0.0f); - EaglercraftGPU.glCallList(renderList); + GlStateManager.callList(renderList); GlStateManager.popMatrix(); GlStateManager.matrixMode(GL_MODELVIEW); GlStateManager.popMatrix(); + GlStateManager.enableCull(); } GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); GlStateManager.disableBlend(); - GlStateManager.enableCull(); } private void rebuild(int newState) { @@ -242,11 +243,9 @@ public class EaglerCloudRenderer { if(renderListFancy[i] == -1) { renderListFancy[i] = EaglercraftGPU.glGenLists(); } - EaglercraftGPU.glNewList(renderListFancy[i], GL_COMPILE); worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX_COLOR); generateFancyClouds(worldrenderer, i, newState != RENDER_STATE_FANCY_BELOW, newState != RENDER_STATE_FANCY_ABOVE); - tessellator.draw(); - EaglercraftGPU.glEndList(); + tessellator.uploadDisplayList(renderListFancy[i]); } }else { if(renderList == -1) { @@ -258,24 +257,32 @@ public class EaglerCloudRenderer { renderListFancy[i] = -1; } } - EaglercraftGPU.glNewList(renderList, GL_COMPILE); worldrenderer.begin(7, DefaultVertexFormats.POSITION_TEX); final double d = 4.8828125E-4; worldrenderer.pos(-256.0f, 0.0f, 256.0f).tex(-256.0f * d, 256.0f * d).endVertex(); worldrenderer.pos(256.0f, 0.0f, 256.0f).tex(256.0f * d, 256.0f * d).endVertex(); worldrenderer.pos(256.0f, 0.0f, -256.0f).tex(256.0f * d, -256.0f * d).endVertex(); worldrenderer.pos(-256.0f, 0.0f, -256.0f).tex(-256.0f * d, -256.0f * d).endVertex(); - tessellator.draw(); - EaglercraftGPU.glEndList(); + tessellator.uploadDisplayList(renderList); } } private static void generateFancyClouds(WorldRenderer worldrenderer, int mesh, boolean renderAbove, boolean renderBelow) { + int xx = (mesh % 3) - 1; + int yy = (mesh / 3) - 1; + boolean center = xx == 0 && yy == 0 && renderAbove && renderBelow; + if (renderAbove) { worldrenderer.pos(0.0f, 0.0f, 8.0f).tex(0.0f, 8.0f * 0.00390625F).color(0.7f, 0.7f, 0.7f, 1.0f).endVertex(); - worldrenderer.pos(8.0f, 0.0f, 8.0f).tex(8.0f * 0.00390625f, 8.0f * 0.00390625f).color(0.7f, 0.7f, 0.7f, 1.0f).endVertex(); - worldrenderer.pos(8.0f, 0.0f, 0.0f).tex(8.0f * 0.00390625f, 0.0f).color(0.7f, 0.7f, 0.7f, 1.0f).endVertex(); worldrenderer.pos(0.0f, 0.0f, 0.0f).tex(0.0f, 0.0f).color(0.7f, 0.7f, 0.7f, 1.0f).endVertex(); + worldrenderer.pos(8.0f, 0.0f, 0.0f).tex(8.0f * 0.00390625f, 0.0f).color(0.7f, 0.7f, 0.7f, 1.0f).endVertex(); + worldrenderer.pos(8.0f, 0.0f, 8.0f).tex(8.0f * 0.00390625f, 8.0f * 0.00390625f).color(0.7f, 0.7f, 0.7f, 1.0f).endVertex(); + if(center) { + worldrenderer.pos(0.0f, 0.0f, 8.0f).tex(0.0f, 8.0f * 0.00390625F).color(0.7f, 0.7f, 0.7f, 1.0f).endVertex(); + worldrenderer.pos(8.0f, 0.0f, 8.0f).tex(8.0f * 0.00390625f, 8.0f * 0.00390625f).color(0.7f, 0.7f, 0.7f, 1.0f).endVertex(); + worldrenderer.pos(8.0f, 0.0f, 0.0f).tex(8.0f * 0.00390625f, 0.0f).color(0.7f, 0.7f, 0.7f, 1.0f).endVertex(); + worldrenderer.pos(0.0f, 0.0f, 0.0f).tex(0.0f, 0.0f).color(0.7f, 0.7f, 0.7f, 1.0f).endVertex(); + } } if (renderBelow) { @@ -283,11 +290,14 @@ public class EaglerCloudRenderer { worldrenderer.pos(8.0f, 4.0f - 9.765625E-4f, 8.0f).tex(8.0f * 0.00390625F, 8.0f * 0.00390625f).color(1.0f, 1.0f, 1.0f, 1.0f).endVertex(); worldrenderer.pos(8.0f, 4.0f - 9.765625E-4f, 0.0f).tex(8.0f * 0.00390625f, 0.0f).color(1.0f, 1.0f, 1.0f, 1.0f).endVertex(); worldrenderer.pos(0.0f, 4.0f - 9.765625E-4f, 0.0f).tex(0.0f, 0.0f).color(1.0f, 1.0f, 1.0f, 1.0f).endVertex(); + if(center) { + worldrenderer.pos(0.0f, 4.0f - 9.765625E-4f, 8.0f).tex(0.0f, 8.0f * 0.00390625f).color(1.0f, 1.0f, 1.0f, 1.0f).endVertex(); + worldrenderer.pos(0.0f, 4.0f - 9.765625E-4f, 0.0f).tex(0.0f, 0.0f).color(1.0f, 1.0f, 1.0f, 1.0f).endVertex(); + worldrenderer.pos(8.0f, 4.0f - 9.765625E-4f, 0.0f).tex(8.0f * 0.00390625f, 0.0f).color(1.0f, 1.0f, 1.0f, 1.0f).endVertex(); + worldrenderer.pos(8.0f, 4.0f - 9.765625E-4f, 8.0f).tex(8.0f * 0.00390625F, 8.0f * 0.00390625f).color(1.0f, 1.0f, 1.0f, 1.0f).endVertex(); + } } - int xx = (mesh % 3) - 1; - int yy = (mesh / 3) - 1; - if (xx != -1) { for (int j1 = 0; j1 < 8; ++j1) { worldrenderer.pos(j1, 0.0f, 8.0f).tex((j1 + 0.5f) * 0.00390625f, 8.0f * 0.00390625f) @@ -298,6 +308,16 @@ public class EaglerCloudRenderer { .endVertex(); worldrenderer.pos(j1, 0.0f, 0.0f).tex((j1 + 0.5f) * 0.00390625f, 0.0f).color(0.9f, 0.9f, 0.9f, 1.0f) .endVertex(); + if(center) { + worldrenderer.pos(j1, 0.0f, 8.0f).tex((j1 + 0.5f) * 0.00390625f, 8.0f * 0.00390625f) + .color(0.9f, 0.9f, 0.9f, 1.0f).endVertex(); + worldrenderer.pos(j1, 0.0f, 0.0f).tex((j1 + 0.5f) * 0.00390625f, 0.0f).color(0.9f, 0.9f, 0.9f, 1.0f) + .endVertex(); + worldrenderer.pos(j1, 4.0f, 0.0f).tex((j1 + 0.5f) * 0.00390625f, 0.0f).color(0.9f, 0.9f, 0.9f, 1.0f) + .endVertex(); + worldrenderer.pos(j1, 4.0f, 8.0f).tex((j1 + 0.5f) * 0.00390625f, 8.0f * 0.00390625f) + .color(0.9f, 0.9f, 0.9f, 1.0f).endVertex(); + } } } @@ -305,12 +325,22 @@ public class EaglerCloudRenderer { for (int k1 = 0; k1 < 8; ++k1) { worldrenderer.pos(k1 + 1.0f - 9.765625E-4f, 0.0f, 8.0f) .tex((k1 + 0.5f) * 0.00390625f, 8.0f * 0.00390625f).color(0.9f, 0.9f, 0.9f, 1.0f).endVertex(); - worldrenderer.pos(k1 + 1.0f - 9.765625E-4f, 4.0f, 8.0f) - .tex((k1 + 0.5f) * 0.00390625f, 8.0f * 0.00390625f).color(0.9f, 0.9f, 0.9f, 1.0f).endVertex(); - worldrenderer.pos(k1 + 1.0f - 9.765625E-4f, 4.0f, 0.0f).tex((k1 + 0.5f) * 0.00390625f, 0.0f) - .color(0.9f, 0.9f, 0.9f, 1.0f).endVertex(); worldrenderer.pos(k1 + 1.0f - 9.765625E-4f, 0.0f, 0.0f).tex((k1 + 0.5f) * 0.00390625f, 0.0f) .color(0.9f, 0.9f, 0.9f, 1.0f).endVertex(); + worldrenderer.pos(k1 + 1.0f - 9.765625E-4f, 4.0f, 0.0f).tex((k1 + 0.5f) * 0.00390625f, 0.0f) + .color(0.9f, 0.9f, 0.9f, 1.0f).endVertex(); + worldrenderer.pos(k1 + 1.0f - 9.765625E-4f, 4.0f, 8.0f) + .tex((k1 + 0.5f) * 0.00390625f, 8.0f * 0.00390625f).color(0.9f, 0.9f, 0.9f, 1.0f).endVertex(); + if(center) { + worldrenderer.pos(k1 + 1.0f - 9.765625E-4f, 0.0f, 8.0f) + .tex((k1 + 0.5f) * 0.00390625f, 8.0f * 0.00390625f).color(0.9f, 0.9f, 0.9f, 1.0f).endVertex(); + worldrenderer.pos(k1 + 1.0f - 9.765625E-4f, 4.0f, 8.0f) + .tex((k1 + 0.5f) * 0.00390625f, 8.0f * 0.00390625f).color(0.9f, 0.9f, 0.9f, 1.0f).endVertex(); + worldrenderer.pos(k1 + 1.0f - 9.765625E-4f, 4.0f, 0.0f).tex((k1 + 0.5f) * 0.00390625f, 0.0f) + .color(0.9f, 0.9f, 0.9f, 1.0f).endVertex(); + worldrenderer.pos(k1 + 1.0f - 9.765625E-4f, 0.0f, 0.0f).tex((k1 + 0.5f) * 0.00390625f, 0.0f) + .color(0.9f, 0.9f, 0.9f, 1.0f).endVertex(); + } } } @@ -324,6 +354,16 @@ public class EaglerCloudRenderer { .color(0.8f, 0.8f, 0.8f, 1.0f).endVertex(); worldrenderer.pos(0.0f, 0.0f, l1).tex(0.0f, (l1 + 0.5f) * 0.00390625f).color(0.8f, 0.8f, 0.8f, 1.0f) .endVertex(); + if(center) { + worldrenderer.pos(0.0f, 4.0f, l1).tex(0.0f, (l1 + 0.5f) * 0.00390625f).color(0.8f, 0.8f, 0.8f, 1.0f) + .endVertex(); + worldrenderer.pos(0.0f, 0.0f, l1).tex(0.0f, (l1 + 0.5f) * 0.00390625f).color(0.8f, 0.8f, 0.8f, 1.0f) + .endVertex(); + worldrenderer.pos(8.0f, 0.0f, l1).tex(8.0f * 0.00390625f, (l1 + 0.5f) * 0.00390625f) + .color(0.8f, 0.8f, 0.8f, 1.0f).endVertex(); + worldrenderer.pos(8.0f, 4.0f, l1).tex(8.0f * 0.00390625f, (l1 + 0.5f) * 0.00390625f) + .color(0.8f, 0.8f, 0.8f, 1.0f).endVertex(); + } } } @@ -331,14 +371,24 @@ public class EaglerCloudRenderer { for (int i2 = 0; i2 < 8; ++i2) { worldrenderer.pos(0.0f, 4.0f, i2 + 1.0f - 9.765625E-4f).tex(0.0f, (i2 + 0.5f) * 0.00390625f) .color(0.8f, 0.8f, 0.8f, 1.0f).endVertex(); - worldrenderer.pos(8.0f, 4.0f, i2 + 1.0f - 9.765625E-4f) - .tex(8.0f * 0.00390625f, (i2 + 0.5f) * 0.00390625f).color(0.8f, 0.8f, 0.8f, 1.0f).endVertex(); - worldrenderer.pos(8.0f, 0.0f, i2 + 1.0f - 9.765625E-4f) - .tex(8.0f * 0.00390625f, (i2 + 0.5f) * 0.00390625f).color(0.8f, 0.8f, 0.8f, 1.0f).endVertex(); worldrenderer.pos(0.0f, 0.0f, i2 + 1.0f - 9.765625E-4f).tex(0.0f, (i2 + 0.5f) * 0.00390625f) .color(0.8f, 0.8f, 0.8f, 1.0f).endVertex(); + worldrenderer.pos(8.0f, 0.0f, i2 + 1.0f - 9.765625E-4f) + .tex(8.0f * 0.00390625f, (i2 + 0.5f) * 0.00390625f).color(0.8f, 0.8f, 0.8f, 1.0f).endVertex(); + worldrenderer.pos(8.0f, 4.0f, i2 + 1.0f - 9.765625E-4f) + .tex(8.0f * 0.00390625f, (i2 + 0.5f) * 0.00390625f).color(0.8f, 0.8f, 0.8f, 1.0f).endVertex(); + if(center) { + worldrenderer.pos(0.0f, 4.0f, i2 + 1.0f - 9.765625E-4f).tex(0.0f, (i2 + 0.5f) * 0.00390625f) + .color(0.8f, 0.8f, 0.8f, 1.0f).endVertex(); + worldrenderer.pos(8.0f, 4.0f, i2 + 1.0f - 9.765625E-4f) + .tex(8.0f * 0.00390625f, (i2 + 0.5f) * 0.00390625f).color(0.8f, 0.8f, 0.8f, 1.0f).endVertex(); + worldrenderer.pos(8.0f, 0.0f, i2 + 1.0f - 9.765625E-4f) + .tex(8.0f * 0.00390625f, (i2 + 0.5f) * 0.00390625f).color(0.8f, 0.8f, 0.8f, 1.0f).endVertex(); + worldrenderer.pos(0.0f, 0.0f, i2 + 1.0f - 9.765625E-4f).tex(0.0f, (i2 + 0.5f) * 0.00390625f) + .color(0.8f, 0.8f, 0.8f, 1.0f).endVertex(); + } } } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerFolderResourcePack.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerFolderResourcePack.java index 3cad05f..ab71c55 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerFolderResourcePack.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerFolderResourcePack.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2024-2025 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.minecraft; import java.io.IOException; @@ -29,21 +45,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.minecraft.client.resources.AbstractResourcePack; -/** - * Copyright (c) 2024-2025 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 EaglerFolderResourcePack extends AbstractResourcePack { public static final Logger logger = LogManager.getLogger("EaglerFolderResourcePack"); @@ -495,4 +496,4 @@ public class EaglerFolderResourcePack extends AbstractResourcePack { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerFontRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerFontRenderer.java index ba1efbd..37b4413 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerFontRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerFontRenderer.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.minecraft; - -import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.lax1dude.eaglercraft.v1_8.opengl.InstancedFontRenderer; -import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.renderer.Tessellator; -import net.minecraft.client.renderer.texture.TextureManager; -import net.minecraft.client.renderer.vertex.DefaultVertexFormats; -import net.minecraft.client.settings.GameSettings; -import net.minecraft.util.ResourceLocation; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.minecraft.util.ResourceLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + +import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.lax1dude.eaglercraft.v1_8.opengl.InstancedFontRenderer; +import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.renderer.Tessellator; +import net.minecraft.client.renderer.texture.TextureManager; +import net.minecraft.client.renderer.vertex.DefaultVertexFormats; +import net.minecraft.client.settings.GameSettings; +import net.minecraft.util.ResourceLocation; + public class EaglerFontRenderer extends FontRenderer { private final int[] temporaryCodepointArray = new int[6553]; @@ -245,4 +246,4 @@ public class EaglerFontRenderer extends FontRenderer { } return true; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerTextureAtlasSprite.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerTextureAtlasSprite.java index d9d4f2b..4a889fb 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerTextureAtlasSprite.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EaglerTextureAtlasSprite.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2025 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.minecraft; import java.io.IOException; @@ -23,21 +39,6 @@ import net.minecraft.util.ReportedException; import net.minecraft.util.ResourceLocation; import net.optifine.util.CounterInt; -/** - * Copyright (c) 2022-2025 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 EaglerTextureAtlasSprite { private static final Logger logger = LogManager.getLogger("EaglerTextureAtlasSprite"); diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EntityConstructor.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EntityConstructor.java index 672dd48..4514595 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EntityConstructor.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EntityConstructor.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.minecraft; - -import net.minecraft.world.World; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,8 +13,13 @@ import net.minecraft.world.World; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + +import net.minecraft.world.World; + public interface EntityConstructor { T createEntity(World world); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EnumInputEvent.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EnumInputEvent.java index 03bbbf4..3b8bbda 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EnumInputEvent.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/EnumInputEvent.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.minecraft; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.minecraft; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + public enum EnumInputEvent { CLIPBOARD_COPY, CLIPBOARD_PASTE; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/FontMappingHelper.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/FontMappingHelper.java index d19c652..6fffe93 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/FontMappingHelper.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/FontMappingHelper.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.minecraft; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.minecraft; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + public class FontMappingHelper { public static int lookupChar(char c, boolean incSel) { @@ -524,4 +525,4 @@ public class FontMappingHelper { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiButtonWithStupidIcons.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiButtonWithStupidIcons.java index 8135c66..eef39bb 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiButtonWithStupidIcons.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiButtonWithStupidIcons.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.minecraft; - -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import net.lax1dude.eaglercraft.v1_8.Mouse; -import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType; -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.util.ResourceLocation; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.minecraft.util.ResourceLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import net.lax1dude.eaglercraft.v1_8.Mouse; +import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.util.ResourceLocation; + public class GuiButtonWithStupidIcons extends GuiButton { protected ResourceLocation leftIcon; @@ -129,4 +130,4 @@ public class GuiButtonWithStupidIcons extends GuiButton { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenGenericErrorMessage.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenGenericErrorMessage.java index 351c274..f22f22e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenGenericErrorMessage.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenGenericErrorMessage.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.minecraft; - -import org.apache.commons.lang3.StringUtils; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + +import org.apache.commons.lang3.StringUtils; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenGenericErrorMessage extends GuiScreen { private String str1; @@ -51,4 +52,4 @@ public class GuiScreenGenericErrorMessage extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenVSyncReEnabled.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenVSyncReEnabled.java index 7b11eac..33fc116 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenVSyncReEnabled.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenVSyncReEnabled.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.minecraft; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenVSyncReEnabled extends GuiScreen { private GuiScreen cont; @@ -48,4 +49,4 @@ public class GuiScreenVSyncReEnabled extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenVideoSettingsWarning.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenVideoSettingsWarning.java index 28b3a67..bd12049 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenVideoSettingsWarning.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenVideoSettingsWarning.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.minecraft; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; -import net.minecraft.util.EnumChatFormatting; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.minecraft.util.EnumChatFormatting; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; +import net.minecraft.util.EnumChatFormatting; + public class GuiScreenVideoSettingsWarning extends GuiScreen { private final GuiScreen cont; @@ -111,4 +112,4 @@ public class GuiScreenVideoSettingsWarning extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenVisualViewport.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenVisualViewport.java index f24625c..70f903b 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenVisualViewport.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/GuiScreenVisualViewport.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.minecraft; - -import net.lax1dude.eaglercraft.v1_8.Display; -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiScreen; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.minecraft.client.gui.GuiScreen; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + +import net.lax1dude.eaglercraft.v1_8.Display; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiScreen; + public class GuiScreenVisualViewport extends GuiScreen { protected int offsetX; @@ -141,4 +142,4 @@ public class GuiScreenVisualViewport extends GuiScreen { super.touchTapped(parInt1, parInt2, parInt3); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/IAcceleratedParticleEngine.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/IAcceleratedParticleEngine.java index 45d88d9..5134895 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/IAcceleratedParticleEngine.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/IAcceleratedParticleEngine.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.minecraft; - -import net.minecraft.entity.Entity; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.minecraft.entity.Entity; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + +import net.minecraft.entity.Entity; + public interface IAcceleratedParticleEngine { void begin(float partialTicks); @@ -35,4 +36,4 @@ public interface IAcceleratedParticleEngine { void drawParticle(float posX, float posY, float posZ, int particleIndexX, int particleIndexY, int lightMapData, int texSize, float particleSize, int rgba); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/MainMenuSkyboxTexture.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/MainMenuSkyboxTexture.java new file mode 100755 index 0000000..014c97e --- /dev/null +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/MainMenuSkyboxTexture.java @@ -0,0 +1,72 @@ +/* + * Copyright (c) 2025 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. + * + */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL; +import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.minecraft.client.renderer.texture.AbstractTexture; +import net.minecraft.client.renderer.texture.TextureUtil; +import net.minecraft.client.resources.IResourceManager; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +public class MainMenuSkyboxTexture extends AbstractTexture { + + public static final int _GL_FRAMEBUFFER = 0x8D40; + public static final int _GL_COLOR_ATTACHMENT0 = 0x8CE0; + + private IFramebufferGL framebuffer = null; + + public MainMenuSkyboxTexture(int width, int height) { + TextureUtil.allocateTexture(this.getGlTextureId(), width, height); + EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); + EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); + EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); + EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); + } + + @Override + public void loadTexture(IResourceManager var1) throws IOException { + } + + public void bindFramebuffer() { + if(framebuffer == null) { + framebuffer = _wglCreateFramebuffer(); + _wglBindFramebuffer(_GL_FRAMEBUFFER, framebuffer); + int tex = getGlTextureId(); + GlStateManager.bindTexture(tex); + _wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, + EaglercraftGPU.getNativeTexture(tex), 0); + }else { + _wglBindFramebuffer(_GL_FRAMEBUFFER, framebuffer); + } + _wglDrawBuffers(new int[] { _GL_COLOR_ATTACHMENT0 }); + } + + public void deleteGlTexture() { + super.deleteGlTexture(); + if(framebuffer != null) { + _wglDeleteFramebuffer(framebuffer); + framebuffer = null; + } + } + +} diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/ResourceIndex.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/ResourceIndex.java index e9b9ab2..6db0554 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/ResourceIndex.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/ResourceIndex.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.minecraft; - -import java.util.Collection; - -/** +/* * Copyright (c) 2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import java.util.Collection; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + +import java.util.Collection; + public abstract class ResourceIndex { protected Collection propertiesCache = null; @@ -40,4 +41,4 @@ public abstract class ResourceIndex { protected abstract Collection getCITPotionsFiles0(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/TextureAnimationCache.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/TextureAnimationCache.java index 647e0be..90bd2a5 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/TextureAnimationCache.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/minecraft/TextureAnimationCache.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.minecraft; - -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.IntBuffer; -import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.lax1dude.eaglercraft.v1_8.opengl.SpriteLevelMixer; -import net.lax1dude.eaglercraft.v1_8.opengl.TextureCopyUtil; -import net.minecraft.client.renderer.GLAllocation; - -/** +/* * Copyright (c) 2022-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.minecraft.client.renderer.GLAllocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.minecraft; + +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.IntBuffer; +import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.lax1dude.eaglercraft.v1_8.opengl.SpriteLevelMixer; +import net.lax1dude.eaglercraft.v1_8.opengl.TextureCopyUtil; +import net.minecraft.client.renderer.GLAllocation; + public class TextureAnimationCache { public final int width; @@ -143,4 +144,4 @@ public class TextureAnimationCache { return frameCount; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/GameProfile.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/GameProfile.java index 63c9975..f20303c 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/GameProfile.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/GameProfile.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.mojang.authlib; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; - -import org.apache.commons.lang3.StringUtils; -import org.apache.commons.lang3.builder.ToStringBuilder; - -import com.google.common.collect.Multimap; -import com.google.common.collect.MultimapBuilder; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import com.google.common.collect.MultimapBuilder; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.mojang.authlib; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; + +import org.apache.commons.lang3.StringUtils; +import org.apache.commons.lang3.builder.ToStringBuilder; + +import com.google.common.collect.Multimap; +import com.google.common.collect.MultimapBuilder; + public class GameProfile { private final EaglercraftUUID id; @@ -95,4 +96,4 @@ public class GameProfile { } return textures; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/Property.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/Property.java index 433a0cf..c67be43 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/Property.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/Property.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.mojang.authlib; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.mojang.authlib; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.mojang.authlib; + public class Property { private final String name; private final String value; @@ -45,4 +46,4 @@ public class Property { public boolean hasSignature() { return this.signature != null; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/TexturesProperty.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/TexturesProperty.java index c8699ab..9a9fc2d 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/TexturesProperty.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/TexturesProperty.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.mojang.authlib; - -import java.util.Collection; - -import org.json.JSONObject; - -import net.lax1dude.eaglercraft.v1_8.ArrayUtils; -import net.lax1dude.eaglercraft.v1_8.Base64; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.Base64; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.mojang.authlib; + +import java.util.Collection; + +import org.json.JSONObject; + +import net.lax1dude.eaglercraft.v1_8.ArrayUtils; +import net.lax1dude.eaglercraft.v1_8.Base64; + public class TexturesProperty { public final String skin; @@ -86,4 +87,4 @@ public class TexturesProperty { return new TexturesProperty(skin, model, cape, isEagler); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/UUIDTypeAdapter.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/UUIDTypeAdapter.java index 0e6f1ad..94bd24f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/UUIDTypeAdapter.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/mojang/authlib/UUIDTypeAdapter.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.mojang.authlib; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.mojang.authlib; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; + public class UUIDTypeAdapter { public static String fromUUID(EaglercraftUUID value) { return value.toString().replace("-", ""); @@ -25,4 +26,4 @@ public class UUIDTypeAdapter { public static EaglercraftUUID fromString(String input) { return EaglercraftUUID.fromString(input.replaceFirst("(\\w{8})(\\w{4})(\\w{4})(\\w{4})(\\w{12})", "$1-$2-$3-$4-$5")); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/netty/ByteBufEaglercraftImpl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/netty/ByteBufEaglercraftImpl.java index 342f92e..77c429f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/netty/ByteBufEaglercraftImpl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/netty/ByteBufEaglercraftImpl.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.netty; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.nio.ByteBuffer; -import java.nio.ByteOrder; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import java.nio.ByteOrder; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.netty; + +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + public class ByteBufEaglercraftImpl extends AbstractByteBuf { private ByteBuffer internal; @@ -251,4 +252,4 @@ public class ByteBufEaglercraftImpl extends AbstractByteBuf { return new ByteBufEaglercraftImpl(internal.duplicate(), maxCapacity()); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/netty/Unpooled.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/netty/Unpooled.java index f16500a..787b213 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/netty/Unpooled.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/netty/Unpooled.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.netty; - -import java.nio.ByteBuffer; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import java.nio.ByteBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.netty; + +import java.nio.ByteBuffer; + public class Unpooled { public static final ByteBuf EMPTY_BUFFER = ByteBuf.allocate(0, 0); @@ -44,4 +45,4 @@ public class Unpooled { public static ByteBuf wrappedBuffer(ByteBuf buf) { return buf.duplicate(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/CachedNotifBadgeTexture.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/CachedNotifBadgeTexture.java index 06e107e..1668283 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/CachedNotifBadgeTexture.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/CachedNotifBadgeTexture.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.notifications; - -import java.util.List; - -import net.minecraft.util.IChatComponent; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.util.IChatComponent; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.notifications; + +import java.util.List; + +import net.minecraft.util.IChatComponent; + public class CachedNotifBadgeTexture { public final int glTexture; @@ -43,4 +44,4 @@ public class CachedNotifBadgeTexture { this.hasHoverEvents = hasHoverEvents; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/ClickEventZone.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/ClickEventZone.java index e7f7552..a337890 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/ClickEventZone.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/ClickEventZone.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.notifications; - -import net.minecraft.util.IChatComponent; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.minecraft.util.IChatComponent; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.notifications; + +import net.minecraft.util.IChatComponent; + public class ClickEventZone { public final int posX; @@ -38,4 +39,4 @@ public class ClickEventZone { this.hasClickEvent = hasClickEvent; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/GuiButtonNotifBell.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/GuiButtonNotifBell.java index db1acf5..22dd804 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/GuiButtonNotifBell.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/GuiButtonNotifBell.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.notifications; - -import net.lax1dude.eaglercraft.v1_8.Mouse; -import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType; -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.util.ResourceLocation; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.minecraft.util.ResourceLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.notifications; + +import net.lax1dude.eaglercraft.v1_8.Mouse; +import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.util.ResourceLocation; + public class GuiButtonNotifBell extends GuiButton { private static final ResourceLocation eaglerTextures = new ResourceLocation("eagler:gui/eagler_gui.png"); @@ -66,4 +67,4 @@ public class GuiButtonNotifBell extends GuiButton { } } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/GuiScreenNotifications.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/GuiScreenNotifications.java index ac2a6b0..92f4ff7 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/GuiScreenNotifications.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/GuiScreenNotifications.java @@ -1,19 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.notifications; - -import java.io.IOException; -import java.util.List; - -import com.google.common.base.Predicate; -import com.google.common.collect.Collections2; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketNotifBadgeShowV4EAG.EnumBadgePriority; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -28,6 +13,19 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.notifications; + +import java.io.IOException; +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketNotifBadgeShowV4EAG.EnumBadgePriority; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenNotifications extends GuiScreen { private static final String[] priorityLangKeys = new String[] { @@ -87,12 +85,8 @@ public class GuiScreenNotifications extends GuiScreen { selectedUUID = lst.get(oldSelectedId).badge.badgeUUID; } lst.clear(); - lst.addAll(Collections2.transform(Collections2.filter(mgr.getNotifLongHistory(), new Predicate() { - @Override - public boolean apply(NotificationBadge input) { - return input.priority.priority >= priorityOrder[showPriority]; - } - }), GuiSlotNotifications.NotifBadgeSlot::new)); + mgr.getNotifLongHistory().stream().filter((input) -> input.priority.priority >= priorityOrder[showPriority]) + .map(GuiSlotNotifications.NotifBadgeSlot::new).forEach(lst::add); selected = -1; if(selectedUUID != null) { for(int i = 0, l = lst.size(); i < l; ++i) { @@ -169,4 +163,4 @@ public class GuiScreenNotifications extends GuiScreen { mc.thePlayer.sendQueue.getNotifManager().commitUnreadFlag(); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/GuiSlotNotifications.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/GuiSlotNotifications.java index b05fcef..9e2b0ee 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/GuiSlotNotifications.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/GuiSlotNotifications.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.notifications; import java.text.SimpleDateFormat; @@ -18,21 +34,6 @@ import net.minecraft.util.IChatComponent; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; -/** - * 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 GuiSlotNotifications extends GuiSlot { private static final ResourceLocation eaglerGui = new ResourceLocation("eagler:gui/eagler_gui.png"); @@ -335,4 +336,4 @@ public class GuiSlotNotifications extends GuiSlot { } super.drawScreen(mouseXIn, mouseYIn, parFloat1); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/NotificationBadge.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/NotificationBadge.java index 02598a8..f5c67f3 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/NotificationBadge.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/NotificationBadge.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.notifications; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.lax1dude.eaglercraft.v1_8.profanity_filter.ProfanityFilter; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketNotifBadgeShowV4EAG.EnumBadgePriority; -import net.minecraft.client.Minecraft; -import net.minecraft.util.IChatComponent; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.minecraft.util.IChatComponent; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.notifications; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.lax1dude.eaglercraft.v1_8.profanity_filter.ProfanityFilter; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketNotifBadgeShowV4EAG.EnumBadgePriority; +import net.minecraft.client.Minecraft; +import net.minecraft.util.IChatComponent; + public class NotificationBadge { public final ServerNotificationManager mgr; @@ -168,4 +169,4 @@ public class NotificationBadge { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/NotificationIcon.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/NotificationIcon.java index 772e186..5541fd2 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/NotificationIcon.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/NotificationIcon.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.notifications; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.profile.EaglerSkinTexture; -import net.minecraft.util.ResourceLocation; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.util.ResourceLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.notifications; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.profile.EaglerSkinTexture; +import net.minecraft.util.ResourceLocation; + public class NotificationIcon { private static int notifIconTmpId = 0; @@ -48,4 +49,4 @@ public class NotificationIcon { return serverRegistered || refCount > 0; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/ServerNotificationManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/ServerNotificationManager.java index eb7adc4..78c2994 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/ServerNotificationManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/ServerNotificationManager.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.notifications; import java.util.ArrayList; @@ -27,21 +43,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.IChatComponent; -/** - * 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 ServerNotificationManager { private static final Logger logger = LogManager.getLogger("ServerNotificationManager"); @@ -274,4 +275,4 @@ public class ServerNotificationManager { sortedDisplayNotifList = null; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/ServerNotificationRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/ServerNotificationRenderer.java index cdf13cd..35df220 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/ServerNotificationRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/notifications/ServerNotificationRenderer.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.notifications; import java.util.ArrayList; @@ -29,21 +45,6 @@ import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; import static net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ExtGLEnums.*; -/** - * 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 ServerNotificationRenderer { protected static final Logger logger = LogManager.getLogger("ServerNotificationRenderer"); @@ -536,4 +537,4 @@ public class ServerNotificationRenderer { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/DisplayList.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/DisplayList.java index f9cfcae..750fbac 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/DisplayList.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/DisplayList.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,9 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; + class DisplayList { - IBufferArrayGL vertexArray = null; + IVertexArrayGL vertexArray = null; IBufferGL vertexBuffer = null; int attribs = -1; int mode = -1; @@ -28,4 +29,4 @@ class DisplayList { boolean bindQuad16 = false; boolean bindQuad32 = false; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/DrawUtils.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/DrawUtils.java index 5fcd73f..2ad8821 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/DrawUtils.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/DrawUtils.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,13 +13,27 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; + public class DrawUtils { public static final String vertexShaderPath = "/assets/eagler/glsl/local.vsh"; public static final String vertexShaderPrecision = "precision highp float;\n"; - public static IBufferArrayGL standardQuad2DVAO = null; - public static IBufferArrayGL standardQuad3DVAO = null; + public static IVertexArrayGL standardQuad2DVAO = null; + public static IVertexArrayGL standardQuad3DVAO = null; public static IBufferGL standardQuadVBO = null; public static IShaderGL vshLocal = null; @@ -40,8 +41,8 @@ public class DrawUtils { static void init() { if(standardQuad2DVAO == null) { - standardQuad2DVAO = EaglercraftGPU.createGLBufferArray(); - standardQuad3DVAO = EaglercraftGPU.createGLBufferArray(); + standardQuad2DVAO = EaglercraftGPU.createGLVertexArray(); + standardQuad3DVAO = EaglercraftGPU.createGLVertexArray(); standardQuadVBO = _wglGenBuffers(); FloatBuffer verts = EagRuntime.allocateFloatBuffer(18); @@ -55,12 +56,12 @@ public class DrawUtils { _wglBufferData(GL_ARRAY_BUFFER, verts, GL_STATIC_DRAW); EagRuntime.freeFloatBuffer(verts); - EaglercraftGPU.bindGLBufferArray(standardQuad2DVAO); + EaglercraftGPU.bindGLVertexArray(standardQuad2DVAO); EaglercraftGPU.enableVertexAttribArray(0); EaglercraftGPU.vertexAttribPointer(0, 2, GL_FLOAT, false, 12, 0); - EaglercraftGPU.bindGLBufferArray(standardQuad3DVAO); + EaglercraftGPU.bindGLVertexArray(standardQuad3DVAO); EaglercraftGPU.enableVertexAttribArray(0); EaglercraftGPU.vertexAttribPointer(0, 3, GL_FLOAT, false, 12, 0); @@ -91,22 +92,22 @@ public class DrawUtils { } public static void drawStandardQuad2D() { - EaglercraftGPU.bindGLBufferArray(standardQuad2DVAO); - EaglercraftGPU.doDrawArrays(GL_TRIANGLES, 0, 6); + EaglercraftGPU.bindGLVertexArray(standardQuad2DVAO); + EaglercraftGPU.drawArrays(GL_TRIANGLES, 0, 6); } public static void drawStandardQuad3D() { - EaglercraftGPU.bindGLBufferArray(standardQuad3DVAO); - EaglercraftGPU.doDrawArrays(GL_TRIANGLES, 0, 6); + EaglercraftGPU.bindGLVertexArray(standardQuad3DVAO); + EaglercraftGPU.drawArrays(GL_TRIANGLES, 0, 6); } public static void destroy() { if(standardQuad2DVAO != null) { - EaglercraftGPU.destroyGLBufferArray(standardQuad2DVAO); + EaglercraftGPU.destroyGLVertexArray(standardQuad2DVAO); standardQuad2DVAO = null; } if(standardQuad3DVAO != null) { - EaglercraftGPU.destroyGLBufferArray(standardQuad3DVAO); + EaglercraftGPU.destroyGLVertexArray(standardQuad3DVAO); standardQuad3DVAO = null; } if(standardQuadVBO != null) { @@ -120,4 +121,4 @@ public class DrawUtils { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/EaglerMeshLoader.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/EaglerMeshLoader.java index 3a243e7..8849aa6 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/EaglerMeshLoader.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/EaglerMeshLoader.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl; import java.io.DataInputStream; @@ -20,21 +36,6 @@ import net.minecraft.util.ResourceLocation; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -/** - * 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 EaglerMeshLoader implements IResourceManagerReloadListener { private static final Logger logger = LogManager.getLogger("EaglerMeshLoader"); @@ -105,13 +106,13 @@ public class EaglerMeshLoader implements IResourceManagerReloadListener { } if(meshStruct.vertexArray == null) { - meshStruct.vertexArray = EaglercraftGPU.createGLBufferArray(); + meshStruct.vertexArray = EaglercraftGPU.createGLVertexArray(); } if(meshStruct.vertexBuffer == null) { - meshStruct.vertexBuffer = _wglGenBuffers(); + meshStruct.vertexBuffer = EaglercraftGPU.createGLArrayBuffer(); } if(meshStruct.indexBuffer == null) { - meshStruct.indexBuffer = _wglGenBuffers(); + meshStruct.indexBuffer = EaglercraftGPU.createGLElementArrayBuffer(); } up1.position(0).limit(intsOfVertex); @@ -119,7 +120,7 @@ public class EaglerMeshLoader implements IResourceManagerReloadListener { EaglercraftGPU.bindVAOGLArrayBufferNow(meshStruct.vertexBuffer); _wglBufferData(GL_ARRAY_BUFFER, up1, GL_STATIC_DRAW); - EaglercraftGPU.bindGLBufferArray(meshStruct.vertexArray); + EaglercraftGPU.bindGLVertexArray(meshStruct.vertexArray); up1.position(intsOfVertex).limit(intsTotal); @@ -138,15 +139,15 @@ public class EaglerMeshLoader implements IResourceManagerReloadListener { EaglercraftGPU.vertexAttribPointer(meshStruct.hasTexture ? 2 : 1, 4, GL_BYTE, true, stride, 12); }catch(Throwable ex) { if(meshStruct.vertexArray != null) { - EaglercraftGPU.destroyGLBufferArray(meshStruct.vertexArray); + EaglercraftGPU.destroyGLVertexArray(meshStruct.vertexArray); meshStruct.vertexArray = null; } if(meshStruct.vertexBuffer != null) { - _wglDeleteBuffers(meshStruct.vertexBuffer); + EaglercraftGPU.destroyGLArrayBuffer(meshStruct.vertexBuffer); meshStruct.vertexBuffer = null; } if(meshStruct.indexBuffer != null) { - _wglDeleteBuffers(meshStruct.indexBuffer); + EaglercraftGPU.destroyGLElementArrayBuffer(meshStruct.indexBuffer); meshStruct.indexBuffer = null; } @@ -170,4 +171,4 @@ public class EaglerMeshLoader implements IResourceManagerReloadListener { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/EaglercraftGPU.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/EaglercraftGPU.java index e8688fe..064d5e8 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/EaglercraftGPU.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/EaglercraftGPU.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2025 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl; import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; @@ -12,7 +28,7 @@ import com.carrotsearch.hppc.IntObjectMap; import net.lax1dude.eaglercraft.v1_8.EagRuntime; import net.lax1dude.eaglercraft.v1_8.internal.GLObjectMap; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; import net.lax1dude.eaglercraft.v1_8.internal.IQueryGL; @@ -22,23 +38,50 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -/** - * Copyright (c) 2022-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 EaglercraftGPU { + static final GLObjectRecycler arrayBufferRecycler = new GLObjectRecycler(32) { + + @Override + protected IBufferGL create() { + return _wglGenBuffers(); + } + + @Override + protected void destroy(IBufferGL object) { + _wglDeleteBuffers(object); + } + + }; + + static final GLObjectRecycler elementArrayBufferRecycler = new GLObjectRecycler(32) { + + @Override + protected IBufferGL create() { + return _wglGenBuffers(); + } + + @Override + protected void destroy(IBufferGL object) { + _wglDeleteBuffers(object); + } + + }; + + static final GLObjectRecycler VAORecycler = new GLObjectRecycler(128) { + + @Override + protected IVertexArrayGL create() { + return _wglGenVertexArrays(); + } + + @Override + protected void destroy(IVertexArrayGL object) { + _wglDeleteVertexArrays(object); + } + + }; + static final GLObjectMap mapTexturesGL = new GLObjectMap<>(8192); static final GLObjectMap mapQueriesGL = new GLObjectMap<>(8192); static final GLObjectMap mapDisplayListsGL = new GLObjectMap<>(8192); @@ -46,9 +89,9 @@ public class EaglercraftGPU { static final Logger logger = LogManager.getLogger("EaglercraftGPU"); static boolean emulatedVAOs = false; - static SoftGLBufferState emulatedVAOState = new SoftGLBufferState(); + static SoftGLVertexState emulatedVAOState = new SoftGLVertexState(); - public static final String gluErrorString(int i) { + public static String gluErrorString(int i) { switch(i) { case GL_INVALID_ENUM: return "GL_INVALID_ENUM"; case GL_INVALID_VALUE: return "GL_INVALID_VALUE"; @@ -60,22 +103,22 @@ public class EaglercraftGPU { } } - public static final void glTexParameteri(int target, int param, int value) { + public static void glTexParameteri(int target, int param, int value) { _wglTexParameteri(target, param, value); } - public static final void glTexParameterf(int target, int param, float value) { + public static void glTexParameterf(int target, int param, float value) { _wglTexParameterf(target, param, value); } - public static final void glCopyTexSubImage2D(int target, int level, int sx, int sy, int dx, int dy, int w, int h) { + public static void glCopyTexSubImage2D(int target, int level, int sx, int sy, int dx, int dy, int w, int h) { _wglCopyTexSubImage2D(target, level, sx, sy, dx, dy, w, h); } private static DisplayList currentList = null; private static ByteBuffer displayListBuffer = EagRuntime.allocateByteBuffer(0x100000); - public static final void glNewList(int target, int op) { + public static void glNewList(int target, int op) { if(currentList != null) { throw new IllegalStateException("A display list is already being compiled you eagler!"); } @@ -87,18 +130,18 @@ public class EaglercraftGPU { throw new IllegalArgumentException("Unknown display list: " + target); } if(dp.vertexArray != null && dp.attribs > 0) { - EaglercraftGPU.bindGLBufferArray(dp.vertexArray); + EaglercraftGPU.bindGLVertexArray(dp.vertexArray); int c = 0; - if((dp.attribs & ATTRIB_TEXTURE) == ATTRIB_TEXTURE) { + if((dp.attribs & ATTRIB_TEXTURE) != 0) { EaglercraftGPU.disableVertexAttribArray(++c); } - if((dp.attribs & ATTRIB_COLOR) == ATTRIB_COLOR) { + if((dp.attribs & ATTRIB_COLOR) != 0) { EaglercraftGPU.disableVertexAttribArray(++c); } - if((dp.attribs & ATTRIB_NORMAL) == ATTRIB_NORMAL) { + if((dp.attribs & ATTRIB_NORMAL) != 0) { EaglercraftGPU.disableVertexAttribArray(++c); } - if((dp.attribs & ATTRIB_LIGHTMAP) == ATTRIB_LIGHTMAP) { + if((dp.attribs & ATTRIB_LIGHTMAP) != 0) { EaglercraftGPU.disableVertexAttribArray(++c); } } @@ -107,7 +150,7 @@ public class EaglercraftGPU { dp.count = 0; } - private static final void growDisplayListBuffer(int len) { + private static void growDisplayListBuffer(int len) { int wantSize = displayListBuffer.position() + len; if(displayListBuffer.capacity() < wantSize) { int newSize = (wantSize & 0xFFFE0000) + 0x40000; @@ -118,7 +161,7 @@ public class EaglercraftGPU { } } - public static final void glEndList() { + public static void glEndList() { DisplayList dp = currentList; if(dp == null) { throw new IllegalStateException("No list is currently being compiled!"); @@ -126,11 +169,11 @@ public class EaglercraftGPU { if(dp.attribs == -1) { if(dp.vertexArray != null) { - EaglercraftGPU.destroyGLBufferArray(dp.vertexArray); + destroyGLVertexArray(dp.vertexArray); dp.vertexArray = null; } if(dp.vertexBuffer != null) { - _wglDeleteBuffers(dp.vertexBuffer); + destroyGLArrayBuffer(dp.vertexBuffer); dp.vertexBuffer = null; } currentList = null; @@ -138,7 +181,7 @@ public class EaglercraftGPU { } if(dp.vertexArray == null) { - dp.vertexArray = createGLBufferArray(); + dp.vertexArray = createGLVertexArray(); dp.bindQuad16 = false; dp.bindQuad32 = false; } @@ -155,14 +198,56 @@ public class EaglercraftGPU { currentList = null; } - public static final void glCallList(int displayList) { + public static void uploadListDirect(int target, ByteBuffer buffer, int attrib, int mode, int count) { + DisplayList dp = mapDisplayListsGL.get(target); + if(dp == null) { + throw new IllegalArgumentException("Unknown display list: " + target); + } + + if(dp.vertexArray != null && dp.attribs > 0) { + EaglercraftGPU.bindGLVertexArray(dp.vertexArray); + int c = 0; + if((dp.attribs & ATTRIB_TEXTURE) != 0) { + EaglercraftGPU.disableVertexAttribArray(++c); + } + if((dp.attribs & ATTRIB_COLOR) != 0) { + EaglercraftGPU.disableVertexAttribArray(++c); + } + if((dp.attribs & ATTRIB_NORMAL) != 0) { + EaglercraftGPU.disableVertexAttribArray(++c); + } + if((dp.attribs & ATTRIB_LIGHTMAP) != 0) { + EaglercraftGPU.disableVertexAttribArray(++c); + } + } + + if(dp.vertexArray == null) { + dp.vertexArray = createGLVertexArray(); + dp.bindQuad16 = false; + dp.bindQuad32 = false; + } + if(dp.vertexBuffer == null) { + dp.vertexBuffer = createGLArrayBuffer(); + } + + bindVAOGLArrayBufferNow(dp.vertexBuffer); + _wglBufferData(GL_ARRAY_BUFFER, buffer, GL_STATIC_DRAW); + + dp.attribs = attrib; + FixedFunctionPipeline.setupDisplayList(dp); + + dp.mode = mode; + dp.count = count; + } + + public static void glCallList(int displayList) { DisplayList dp = mapDisplayListsGL.get(displayList); if(dp == null) { throw new NullPointerException("Tried to call a display list that does not exist: " + displayList); } if(dp.attribs != -1) { FixedFunctionPipeline p = FixedFunctionPipeline.setupRenderDisplayList(dp.attribs).update(); - bindGLBufferArray(dp.vertexArray); + bindGLVertexArray(dp.vertexArray); if(dp.mode == GL_QUADS) { int cnt = dp.count; if(cnt > 0xFFFF) { @@ -190,23 +275,23 @@ public class EaglercraftGPU { } } - public static final void flushDisplayList(int displayList) { + public static void flushDisplayList(int displayList) { DisplayList dp = mapDisplayListsGL.get(displayList); if(dp == null) { throw new NullPointerException("Tried to flush a display list that does not exist: " + displayList); } dp.attribs = -1; if(dp.vertexArray != null) { - EaglercraftGPU.destroyGLBufferArray(dp.vertexArray); + EaglercraftGPU.destroyGLVertexArray(dp.vertexArray); dp.vertexArray = null; } if(dp.vertexBuffer != null) { - _wglDeleteBuffers(dp.vertexBuffer); + EaglercraftGPU.destroyGLArrayBuffer(dp.vertexBuffer); dp.vertexBuffer = null; } } - public static final void glNormal3f(float x, float y, float z) { + public static void glNormal3f(float x, float y, float z) { GlStateManager.stateNormalX = x; GlStateManager.stateNormalY = y; GlStateManager.stateNormalZ = z; @@ -215,7 +300,7 @@ public class EaglercraftGPU { private static final IntObjectMap stringCache = new IntObjectHashMap<>(); - public static final String glGetString(int param) { + public static String glGetString(int param) { String str = stringCache.get(param); if(str == null) { str = _wglGetString(param); @@ -227,7 +312,7 @@ public class EaglercraftGPU { return str.length() == 0 ? null : str; } - public static final void glGetInteger(int param, int[] values) { + public static void glGetInteger(int param, int[] values) { switch(param) { case GL_VIEWPORT: values[0] = GlStateManager.viewportX; @@ -240,11 +325,11 @@ public class EaglercraftGPU { } } - public static final int glGetInteger(int param) { + public static int glGetInteger(int param) { return _wglGetInteger(param); } - public static final void glTexImage2D(int target, int level, int internalFormat, int w, int h, int unused, + public static void glTexImage2D(int target, int level, int internalFormat, int w, int h, int unused, int format, int type, ByteBuffer pixels) { GlStateManager.setTextureCachedSize(target, w, h); if(glesVers >= 300) { @@ -255,7 +340,7 @@ public class EaglercraftGPU { } } - public static final void glTexImage2D(int target, int level, int internalFormat, int w, int h, int unused, + public static void glTexImage2D(int target, int level, int internalFormat, int w, int h, int unused, int format, int type, IntBuffer pixels) { GlStateManager.setTextureCachedSize(target, w, h); if(glesVers >= 300) { @@ -266,12 +351,12 @@ public class EaglercraftGPU { } } - public static final void glTexSubImage2D(int target, int level, int x, int y, int w, int h, int format, + public static void glTexSubImage2D(int target, int level, int x, int y, int w, int h, int format, int type, IntBuffer pixels) { _wglTexSubImage2D(target, level, x, y, w, h, format, type, pixels); } - public static final void glTexStorage2D(int target, int levels, int internalFormat, int w, int h) { + public static void glTexStorage2D(int target, int levels, int internalFormat, int w, int h) { GlStateManager.setTextureCachedSize(target, w, h); if(texStorageCapable && (glesVers >= 300 || levels == 1 || (MathHelper.calculateLogBaseTwo(Math.max(w, h)) + 1) == levels)) { _wglTexStorage2D(target, levels, internalFormat, w, h); @@ -284,7 +369,7 @@ public class EaglercraftGPU { } } - public static final void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer buffer) { + public static void glReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer buffer) { switch(type) { case GL_FLOAT: _wglReadPixels(x, y, width, height, format, GL_FLOAT, buffer.asFloatBuffer()); @@ -299,11 +384,11 @@ public class EaglercraftGPU { } } - public static final void glLineWidth(float f) { + public static void glLineWidth(float f) { _wglLineWidth(f); } - public static final void glFog(int param, FloatBuffer valueBuffer) { + public static void glFog(int param, FloatBuffer valueBuffer) { int pos = valueBuffer.position(); switch(param) { case GL_FOG_COLOR: @@ -319,82 +404,94 @@ public class EaglercraftGPU { valueBuffer.position(pos); } - public static final void glFogi(int param, int value) { - // I'm not sure what this is for currently - } - - public static final int glGenLists() { + public static int glGenLists() { return mapDisplayListsGL.register(new DisplayList()); } - public static final void glDeleteLists(int id) { + public static void glDeleteLists(int id) { DisplayList d = mapDisplayListsGL.free(id); if(d != null) { if(d.vertexArray != null) { - EaglercraftGPU.destroyGLBufferArray(d.vertexArray); + destroyGLVertexArray(d.vertexArray); } if(d.vertexBuffer != null) { - _wglDeleteBuffers(d.vertexBuffer); + destroyGLArrayBuffer(d.vertexBuffer); } } } - public static final int glGetError() { + public static int glGetError() { return _wglGetError(); } - public static final void glBlendEquation(int equation) { + public static void glBlendEquation(int equation) { if(equation != GlStateManager.stateBlendEquation) { _wglBlendEquation(equation); GlStateManager.stateBlendEquation = equation; } } - public static final boolean areVAOsEmulated() { + public static IBufferGL createGLArrayBuffer() { + return arrayBufferRecycler.create(); + } + + public static void destroyGLArrayBuffer(IBufferGL buffer) { + arrayBufferRecycler.destroy(buffer); + } + + public static IBufferGL createGLElementArrayBuffer() { + return elementArrayBufferRecycler.create(); + } + + public static void destroyGLElementArrayBuffer(IBufferGL buffer) { + elementArrayBufferRecycler.destroy(buffer); + } + + public static boolean areVAOsEmulated() { return emulatedVAOs; } - public static final IBufferArrayGL createGLBufferArray() { + public static IVertexArrayGL createGLVertexArray() { if(emulatedVAOs) { - return new SoftGLBufferArray(); + return new SoftGLVertexArray(); }else { - return _wglGenVertexArrays(); + return VAORecycler.create(); } } - public static final void destroyGLBufferArray(IBufferArrayGL buffer) { + public static void destroyGLVertexArray(IVertexArrayGL buffer) { if(!emulatedVAOs) { - _wglDeleteVertexArrays(buffer); + VAORecycler.destroy(buffer); } } - public static final void enableVertexAttribArray(int index) { + public static void enableVertexAttribArray(int index) { if(emulatedVAOs) { - if(currentBufferArray == null) { + if(currentVertexArray == null) { logger.warn("Skipping enable attrib with emulated VAO because no known VAO is bound!"); return; } - ((SoftGLBufferArray)currentBufferArray).enableAttrib(index, true); + ((SoftGLVertexArray)currentVertexArray).enableAttrib(index, true); }else { _wglEnableVertexAttribArray(index); } } - public static final void disableVertexAttribArray(int index) { + public static void disableVertexAttribArray(int index) { if(emulatedVAOs) { - if(currentBufferArray == null) { + if(currentVertexArray == null) { logger.warn("Skipping disable attrib with emulated VAO because no known VAO is bound!"); return; } - ((SoftGLBufferArray)currentBufferArray).enableAttrib(index, false); + ((SoftGLVertexArray)currentVertexArray).enableAttrib(index, false); }else { _wglDisableVertexAttribArray(index); } } - public static final void vertexAttribPointer(int index, int size, int format, boolean normalized, int stride, int offset) { + public static void vertexAttribPointer(int index, int size, int format, boolean normalized, int stride, int offset) { if(emulatedVAOs) { - if(currentBufferArray == null) { + if(currentVertexArray == null) { logger.warn("Skipping vertexAttribPointer with emulated VAO because no known VAO is bound!"); return; } @@ -402,77 +499,77 @@ public class EaglercraftGPU { logger.warn("Skipping vertexAttribPointer with emulated VAO because no VAO array buffer is bound!"); return; } - ((SoftGLBufferArray)currentBufferArray).setAttrib(currentVAOArrayBuffer, index, size, format, normalized, stride, offset); + ((SoftGLVertexArray)currentVertexArray).setAttrib(currentVAOArrayBuffer, index, size, format, normalized, stride, offset); }else { _wglVertexAttribPointer(index, size, format, normalized, stride, offset); } } - public static final void vertexAttribDivisor(int index, int divisor) { + public static void vertexAttribDivisor(int index, int divisor) { if(emulatedVAOs) { - if(currentBufferArray == null) { + if(currentVertexArray == null) { logger.warn("Skipping vertexAttribPointer with emulated VAO because no known VAO is bound!"); return; } - ((SoftGLBufferArray)currentBufferArray).setAttribDivisor(index, divisor); + ((SoftGLVertexArray)currentVertexArray).setAttribDivisor(index, divisor); }else { _wglVertexAttribDivisor(index, divisor); } } - public static final void doDrawArrays(int mode, int first, int count) { + public static void drawArrays(int mode, int first, int count) { if(emulatedVAOs) { - if(currentBufferArray == null) { + if(currentVertexArray == null) { logger.warn("Skipping draw call with emulated VAO because no known VAO is bound!"); return; } - ((SoftGLBufferArray)currentBufferArray).transitionToState(emulatedVAOState, false); + ((SoftGLVertexArray)currentVertexArray).transitionToState(emulatedVAOState, false); } _wglDrawArrays(mode, first, count); } - public static final void doDrawElements(int mode, int count, int type, int offset) { + public static void drawElements(int mode, int count, int type, int offset) { if(emulatedVAOs) { - if(currentBufferArray == null) { + if(currentVertexArray == null) { logger.warn("Skipping draw call with emulated VAO because no known VAO is bound!"); return; } - ((SoftGLBufferArray)currentBufferArray).transitionToState(emulatedVAOState, true); + ((SoftGLVertexArray)currentVertexArray).transitionToState(emulatedVAOState, true); } _wglDrawElements(mode, count, type, offset); } - public static final void doDrawArraysInstanced(int mode, int first, int count, int instances) { + public static void drawArraysInstanced(int mode, int first, int count, int instances) { if(emulatedVAOs) { - if(currentBufferArray == null) { + if(currentVertexArray == null) { logger.warn("Skipping instanced draw call with emulated VAO because no known VAO is bound!"); return; } - ((SoftGLBufferArray)currentBufferArray).transitionToState(emulatedVAOState, false); + ((SoftGLVertexArray)currentVertexArray).transitionToState(emulatedVAOState, false); } _wglDrawArraysInstanced(mode, first, count, instances); } - public static final void doDrawElementsInstanced(int mode, int count, int type, int offset, int instances) { + public static void drawElementsInstanced(int mode, int count, int type, int offset, int instances) { if(emulatedVAOs) { - if(currentBufferArray == null) { + if(currentVertexArray == null) { logger.warn("Skipping instanced draw call with emulated VAO because no known VAO is bound!"); return; } - ((SoftGLBufferArray)currentBufferArray).transitionToState(emulatedVAOState, true); + ((SoftGLVertexArray)currentVertexArray).transitionToState(emulatedVAOState, true); } _wglDrawElementsInstanced(mode, count, type, offset, instances); } - static IBufferArrayGL currentBufferArray = null; + static IVertexArrayGL currentVertexArray = null; - public static final void bindGLBufferArray(IBufferArrayGL buffer) { + public static void bindGLVertexArray(IVertexArrayGL buffer) { if(emulatedVAOs) { - currentBufferArray = buffer; + currentVertexArray = buffer; }else { - if(currentBufferArray != buffer) { + if(currentVertexArray != buffer) { _wglBindVertexArray(buffer); - currentBufferArray = buffer; + currentVertexArray = buffer; } } } @@ -482,7 +579,10 @@ public class EaglercraftGPU { // only used when VAOs are emulated static IBufferGL currentVAOArrayBuffer = null; - public static final void bindVAOGLArrayBuffer(IBufferGL buffer) { + /** + * Binds a buffer to use only for calls to vertexAttribPointer + */ + public static void bindVAOGLArrayBuffer(IBufferGL buffer) { if(emulatedVAOs) { currentVAOArrayBuffer = buffer; }else { @@ -493,7 +593,10 @@ public class EaglercraftGPU { } } - public static final void bindVAOGLArrayBufferNow(IBufferGL buffer) { + /** + * Binds a buffer to use for calls to vertexAttribPointer and the GL_ARRAY_BUFFER target + */ + public static void bindVAOGLArrayBufferNow(IBufferGL buffer) { if(emulatedVAOs) { currentVAOArrayBuffer = buffer; } @@ -503,25 +606,28 @@ public class EaglercraftGPU { } } - public static final void bindVAOGLElementArrayBuffer(IBufferGL buffer) { + /** + * Binds an index buffer to the current vertex array + */ + public static void bindVAOGLElementArrayBuffer(IBufferGL buffer) { if(emulatedVAOs) { - if(currentBufferArray == null) { + if(currentVertexArray == null) { logger.warn("Skipping set element array buffer with emulated VAO because no known VAO is bound!"); return; } - ((SoftGLBufferArray)currentBufferArray).setIndexBuffer(buffer); + ((SoftGLVertexArray)currentVertexArray).setIndexBuffer(buffer); }else { _wglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffer); } } - static final void bindVAOGLElementArrayBufferNow(IBufferGL buffer) { + static void bindVAOGLElementArrayBufferNow(IBufferGL buffer) { if(emulatedVAOs) { - if(currentBufferArray == null) { + if(currentVertexArray == null) { logger.warn("Skipping set element array buffer with emulated VAO because no known VAO is bound!"); return; } - ((SoftGLBufferArray)currentBufferArray).setIndexBuffer(buffer); + ((SoftGLVertexArray)currentVertexArray).setIndexBuffer(buffer); if(currentEmulatedVAOIndexBuffer != buffer) { _wglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffer); currentEmulatedVAOIndexBuffer = buffer; @@ -533,14 +639,17 @@ public class EaglercraftGPU { static IBufferGL currentEmulatedVAOIndexBuffer = null; - static final void bindEmulatedVAOIndexBuffer(IBufferGL buffer) { + static void bindEmulatedVAOIndexBuffer(IBufferGL buffer) { if(currentEmulatedVAOIndexBuffer != buffer) { _wglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, buffer); currentEmulatedVAOIndexBuffer = buffer; } } - public static final void bindGLArrayBuffer(IBufferGL buffer) { + /** + * Binds a buffer to the GL_ARRAY_BUFFER target for use not related to vertexAttribPointer + */ + public static void bindGLArrayBuffer(IBufferGL buffer) { if(currentArrayBuffer != buffer) { _wglBindBuffer(GL_ARRAY_BUFFER, buffer); currentArrayBuffer = buffer; @@ -548,8 +657,11 @@ public class EaglercraftGPU { } static IBufferGL currentUniformBuffer = null; - - public static final void bindGLUniformBuffer(IBufferGL buffer) { + + /** + * Binds a buffer to the GL_UNIFORM_BUFFER target + */ + public static void bindGLUniformBuffer(IBufferGL buffer) { if(currentUniformBuffer != buffer) { _wglBindBuffer(0x8A11, buffer); currentUniformBuffer = buffer; @@ -558,7 +670,7 @@ public class EaglercraftGPU { static IProgramGL currentShaderProgram = null; - public static final void bindGLShaderProgram(IProgramGL prog) { + public static void bindGLShaderProgram(IProgramGL prog) { if(currentShaderProgram != prog) { _wglUseProgram(prog); currentShaderProgram = prog; @@ -569,7 +681,7 @@ public class EaglercraftGPU { private static final int[] currentUniformBlockBindingOffset = new int[16]; private static final int[] currentUniformBlockBindingSize = new int[16]; - public static final void bindUniformBufferRange(int index, IBufferGL buffer, int offset, int size) { + public static void bindUniformBufferRange(int index, IBufferGL buffer, int offset, int size) { if(currentUniformBlockBindings[index] != buffer || currentUniformBlockBindingOffset[index] != offset || currentUniformBlockBindingSize[index] != size) { _wglBindBufferRange(0x8A11, index, buffer, offset, size); @@ -586,7 +698,7 @@ public class EaglercraftGPU { public static final int CLEAR_BINDING_ARRAY_BUFFER = 16; public static final int CLEAR_BINDING_SHADER_PROGRAM = 32; - public static final void clearCurrentBinding(int mask) { + public static void clearCurrentBinding(int mask) { if((mask & CLEAR_BINDING_TEXTURE) != 0) { int[] i = GlStateManager.boundTexture; for(int j = 0; j < i.length; ++j) { @@ -601,7 +713,7 @@ public class EaglercraftGPU { _wglActiveTexture(GL_TEXTURE0); } if((mask & CLEAR_BINDING_BUFFER_ARRAY) != 0) { - currentBufferArray = null; + currentVertexArray = null; } if((mask & CLEAR_BINDING_ARRAY_BUFFER) != 0) { currentArrayBuffer = currentVAOArrayBuffer = null; @@ -616,7 +728,7 @@ public class EaglercraftGPU { public static final int ATTRIB_NORMAL = 4; public static final int ATTRIB_LIGHTMAP = 8; - public static final void renderBuffer(ByteBuffer buffer, int attrib, int mode, int count) { + public static void renderBuffer(ByteBuffer buffer, int attrib, int mode, int count) { if(currentList != null) { if(currentList.attribs == -1) { currentList.attribs = attrib; @@ -642,19 +754,27 @@ public class EaglercraftGPU { } } - public static final void optimize() { + private static long lastRecyclerFlush = 0l; + + public static void optimize() { FixedFunctionPipeline.optimize(); + long millis = EagRuntime.steadyTimeMillis(); + if(millis - lastRecyclerFlush > 120000l) { + lastRecyclerFlush = millis; + arrayBufferRecycler.compact(); + VAORecycler.compact(); + } } private static FixedFunctionPipeline lastRender = null; private static int lastMode = 0; private static int lastCount = 0; - public static final void renderAgain() { + public static void renderAgain() { if(lastRender == null) { throw new UnsupportedOperationException("Cannot render the same verticies twice while generating display list"); } - EaglercraftGPU.bindGLBufferArray(lastRender.getDirectModeBufferArray()); + EaglercraftGPU.bindGLVertexArray(lastRender.getDirectModeVertexArray()); lastRender.update().drawDirectArrays(lastMode, 0, lastCount); } @@ -664,7 +784,7 @@ public class EaglercraftGPU { private static IBufferGL quad32EmulationBuffer = null; private static int quad32EmulationBufferSize = 0; - public static final void attachQuad16EmulationBuffer(int vertexCount, boolean bind) { + public static void attachQuad16EmulationBuffer(int vertexCount, boolean bind) { IBufferGL buf = quad16EmulationBuffer; if(buf == null) { quad16EmulationBuffer = buf = _wglGenBuffers(); @@ -689,7 +809,7 @@ public class EaglercraftGPU { } } - public static final void attachQuad32EmulationBuffer(int vertexCount, boolean bind) { + public static void attachQuad32EmulationBuffer(int vertexCount, boolean bind) { IBufferGL buf = quad32EmulationBuffer; if(buf == null) { quad32EmulationBuffer = buf = _wglGenBuffers(); @@ -708,7 +828,7 @@ public class EaglercraftGPU { } } - private static final void resizeQuad16EmulationBuffer(int quadCount) { + private static void resizeQuad16EmulationBuffer(int quadCount) { IntBuffer buf = EagRuntime.allocateIntBuffer(quadCount * 3); int v1, v2, v3, v4; for(int i = 0; i < quadCount; ++i) { @@ -725,7 +845,7 @@ public class EaglercraftGPU { EagRuntime.freeIntBuffer(buf); } - private static final void resizeQuad32EmulationBuffer(int quadCount) { + private static void resizeQuad32EmulationBuffer(int quadCount) { IntBuffer buf = EagRuntime.allocateIntBuffer(quadCount * 6); int v1, v2, v3, v4; for(int i = 0; i < quadCount; ++i) { @@ -742,11 +862,11 @@ public class EaglercraftGPU { EagRuntime.freeIntBuffer(buf); } - public static final ITextureGL getNativeTexture(int tex) { + public static ITextureGL getNativeTexture(int tex) { return mapTexturesGL.get(tex); } - public static final void regenerateTexture(int tex) { + public static void regenerateTexture(int tex) { ITextureGL webglTex = mapTexturesGL.get(tex); if(webglTex != null) { GlStateManager.unbindTextureIfCached(tex); @@ -757,12 +877,12 @@ public class EaglercraftGPU { } } - public static final void drawHighPoly(HighPolyMesh mesh) { + public static void drawHighPoly(HighPolyMesh mesh) { if(mesh.vertexCount == 0 || mesh.indexCount == 0 || mesh.vertexArray == null) { return; } FixedFunctionPipeline p = FixedFunctionPipeline.setupRenderDisplayList(mesh.getAttribBits()).update(); - EaglercraftGPU.bindGLBufferArray(mesh.vertexArray); + EaglercraftGPU.bindGLVertexArray(mesh.vertexArray); p.drawElements(GL_TRIANGLES, mesh.indexCount, GL_UNSIGNED_SHORT, 0); } @@ -780,15 +900,15 @@ public class EaglercraftGPU { static boolean npotCapable = false; static int uniformBufferOffsetAlignment = -1; - public static final void createFramebufferHDR16FTexture(int target, int level, int w, int h, int format, boolean allow32bitFallback) { + public static void createFramebufferHDR16FTexture(int target, int level, int w, int h, int format, boolean allow32bitFallback) { createFramebufferHDR16FTexture(target, level, w, h, format, allow32bitFallback, null); } - public static final void createFramebufferHDR16FTexture(int target, int level, int w, int h, int format, ByteBuffer pixelData) { + public static void createFramebufferHDR16FTexture(int target, int level, int w, int h, int format, ByteBuffer pixelData) { createFramebufferHDR16FTexture(target, level, w, h, format, false, pixelData); } - private static final void createFramebufferHDR16FTexture(int target, int level, int w, int h, int format, boolean allow32bitFallback, ByteBuffer pixelData) { + private static void createFramebufferHDR16FTexture(int target, int level, int w, int h, int format, boolean allow32bitFallback, ByteBuffer pixelData) { if(hasFramebufferHDR16FSupport) { int internalFormat; switch(format) { @@ -824,15 +944,15 @@ public class EaglercraftGPU { } } - public static final void createFramebufferHDR32FTexture(int target, int level, int w, int h, int format, boolean allow16bitFallback) { + public static void createFramebufferHDR32FTexture(int target, int level, int w, int h, int format, boolean allow16bitFallback) { createFramebufferHDR32FTexture(target, level, w, h, format, allow16bitFallback, null); } - public static final void createFramebufferHDR32FTexture(int target, int level, int w, int h, int format, ByteBuffer pixelData) { + public static void createFramebufferHDR32FTexture(int target, int level, int w, int h, int format, ByteBuffer pixelData) { createFramebufferHDR32FTexture(target, level, w, h, format, false, pixelData); } - private static final void createFramebufferHDR32FTexture(int target, int level, int w, int h, int format, boolean allow16bitFallback, ByteBuffer pixelData) { + private static void createFramebufferHDR32FTexture(int target, int level, int w, int h, int format, boolean allow16bitFallback, ByteBuffer pixelData) { if(hasFramebufferHDR32FSupport) { int internalFormat; switch(format) { @@ -863,7 +983,7 @@ public class EaglercraftGPU { } } - public static final void warmUpCache() { + public static void warmUpCache() { EaglercraftGPU.glGetString(7936); EaglercraftGPU.glGetString(7937); EaglercraftGPU.glGetString(7938); @@ -913,7 +1033,7 @@ public class EaglercraftGPU { if(!instancingCapable) { logger.info("Note: Could not unlock instancing via OpenGL extensions, using slow vanilla font and particle rendering"); } - emulatedVAOState = emulatedVAOs ? new SoftGLBufferState() : null; + emulatedVAOState = emulatedVAOs ? new SoftGLVertexState() : null; PlatformOpenGL.enterVAOEmulationHook(); GLSLHeader.init(); DrawUtils.init(); @@ -927,7 +1047,7 @@ public class EaglercraftGPU { DrawUtils.vshLocal = null; } - public static final void destroyCache() { + public static void destroyCache() { GLSLHeader.destroy(); DrawUtils.destroy(); InstancedFontRenderer.destroy(); @@ -951,43 +1071,43 @@ public class EaglercraftGPU { mapDisplayListsGL.clear(); } - public static final int checkOpenGLESVersion() { + public static int checkOpenGLESVersion() { return glesVers; } - public static final boolean checkFBORenderMipmapCapable() { + public static boolean checkFBORenderMipmapCapable() { return fboRenderMipmapCapable; } - public static final boolean checkVAOCapable() { + public static boolean checkVAOCapable() { return vertexArrayCapable; } - public static final boolean checkInstancingCapable() { + public static boolean checkInstancingCapable() { return instancingCapable; } - public static final boolean checkTexStorageCapable() { + public static boolean checkTexStorageCapable() { return texStorageCapable; } - public static final boolean checkTextureLODCapable() { + public static boolean checkTextureLODCapable() { return textureLODCapable; } - public static final boolean checkShader5Capable() { + public static boolean checkShader5Capable() { return shader5Capable; } - public static final boolean checkNPOTCapable() { + public static boolean checkNPOTCapable() { return npotCapable; } - public static final int getUniformBufferOffsetAlignment() { + public static int getUniformBufferOffsetAlignment() { return uniformBufferOffsetAlignment; } - public static final boolean checkHDRFramebufferSupport(int bits) { + public static boolean checkHDRFramebufferSupport(int bits) { switch(bits) { case 16: return hasFramebufferHDR16FSupport; @@ -998,7 +1118,7 @@ public class EaglercraftGPU { } } - public static final boolean checkLinearHDRFilteringSupport(int bits) { + public static boolean checkLinearHDRFilteringSupport(int bits) { switch(bits) { case 16: return hasLinearHDR16FSupport; @@ -1009,17 +1129,17 @@ public class EaglercraftGPU { } } - public static final boolean checkHasHDRFramebufferSupport() { + public static boolean checkHasHDRFramebufferSupport() { return hasFramebufferHDR16FSupport || hasFramebufferHDR32FSupport; } - public static final boolean checkHasHDRFramebufferSupportWithFilter() { + public static boolean checkHasHDRFramebufferSupportWithFilter() { return (hasFramebufferHDR16FSupport && hasLinearHDR16FSupport) || (hasFramebufferHDR32FSupport && hasLinearHDR32FSupport); } //legacy - public static final boolean checkLinearHDR32FSupport() { + public static boolean checkLinearHDR32FSupport() { return hasLinearHDR32FSupport; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/EffectPipelineFXAA.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/EffectPipelineFXAA.java index 879de3c..06753e6 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/EffectPipelineFXAA.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/EffectPipelineFXAA.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl; import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL; @@ -14,21 +30,6 @@ import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; import net.lax1dude.eaglercraft.v1_8.EagRuntime; -/** - * Copyright (c) 2022-2023 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 EffectPipelineFXAA { private static final Logger logger = LogManager.getLogger("EffectPipelineFXAA"); @@ -177,4 +178,4 @@ public class EffectPipelineFXAA { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/FixedFunctionPipeline.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/FixedFunctionPipeline.java index c23631b..40885ee 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/FixedFunctionPipeline.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/FixedFunctionPipeline.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl; import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; @@ -10,7 +26,7 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; @@ -27,26 +43,11 @@ import net.minecraft.util.MathHelper; import static net.lax1dude.eaglercraft.v1_8.opengl.FixedFunctionShader.FixedFunctionState.*; import static net.lax1dude.eaglercraft.v1_8.opengl.FixedFunctionShader.FixedFunctionConstants.*; -/** - * Copyright (c) 2022-2023 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 FixedFunctionPipeline { private static final Logger LOGGER = LogManager.getLogger("FixedFunctionPipeline"); - static final int getFragmentState() { + static int getFragmentState() { return (GlStateManager.stateTexture[0] ? STATE_ENABLE_TEXTURE2D : 0) | (GlStateManager.stateTexture[1] ? STATE_ENABLE_LIGHTMAP : 0) | (GlStateManager.stateAlphaTest ? STATE_ENABLE_ALPHA_TEST : 0) | @@ -76,7 +77,7 @@ public class FixedFunctionPipeline { StreamBufferInstance sb = self.streamBuffer.getBuffer(buffer.remaining()); self.currentVertexArray = sb; - EaglercraftGPU.bindGLBufferArray(sb.getVertexArray()); + EaglercraftGPU.bindGLVertexArray(sb.getVertexArray()); EaglercraftGPU.bindGLArrayBuffer(sb.getVertexBuffer()); _wglBufferSubData(GL_ARRAY_BUFFER, 0, buffer); @@ -97,7 +98,7 @@ public class FixedFunctionPipeline { self = getPipelineInstanceCore(baseState); } - EaglercraftGPU.bindGLBufferArray(list.vertexArray); + EaglercraftGPU.bindGLVertexArray(list.vertexArray); EaglercraftGPU.bindVAOGLArrayBuffer(list.vertexBuffer); EaglercraftGPU.enableVertexAttribArray(0); @@ -145,7 +146,7 @@ public class FixedFunctionPipeline { void drawArrays(int mode, int offset, int count) { EaglercraftGPU.bindGLShaderProgram(shaderProgram); - EaglercraftGPU.doDrawArrays(mode, offset, count); + EaglercraftGPU.drawArrays(mode, offset, count); } void drawDirectArrays(int mode, int offset, int count) { @@ -160,7 +161,7 @@ public class FixedFunctionPipeline { }else { EaglercraftGPU.attachQuad32EmulationBuffer(count, false); } - EaglercraftGPU.doDrawElements(GL_TRIANGLES, count + (count >> 1), + EaglercraftGPU.drawElements(GL_TRIANGLES, count + (count >> 1), GL_UNSIGNED_INT, 0); }else { if(!sb.bindQuad16) { @@ -170,17 +171,17 @@ public class FixedFunctionPipeline { }else { EaglercraftGPU.attachQuad16EmulationBuffer(count, false); } - EaglercraftGPU.doDrawElements(GL_TRIANGLES, count + (count >> 1), + EaglercraftGPU.drawElements(GL_TRIANGLES, count + (count >> 1), GL_UNSIGNED_SHORT, 0); } }else { - EaglercraftGPU.doDrawArrays(mode, offset, count); + EaglercraftGPU.drawArrays(mode, offset, count); } } void drawElements(int mode, int count, int type, int offset) { EaglercraftGPU.bindGLShaderProgram(shaderProgram); - EaglercraftGPU.doDrawElements(mode, count, type, offset); + EaglercraftGPU.drawElements(mode, count, type, offset); } private static IExtPipelineCompiler extensionProvider; @@ -575,7 +576,7 @@ public class FixedFunctionPipeline { streamBuffer = new StreamBuffer(FixedFunctionShader.initialSize, FixedFunctionShader.initialCount, FixedFunctionShader.maxCount, (vertexArray, vertexBuffer) -> { - EaglercraftGPU.bindGLBufferArray(vertexArray); + EaglercraftGPU.bindGLVertexArray(vertexArray); EaglercraftGPU.bindVAOGLArrayBuffer(vertexBuffer); EaglercraftGPU.enableVertexAttribArray(0); @@ -1102,7 +1103,7 @@ public class FixedFunctionPipeline { streamBuffer.destroy(); } - public IBufferArrayGL getDirectModeBufferArray() { + public IVertexArrayGL getDirectModeVertexArray() { return currentVertexArray.vertexArray; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/FixedFunctionShader.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/FixedFunctionShader.java index 60980ac..61e55e4 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/FixedFunctionShader.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/FixedFunctionShader.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.opengl; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + public class FixedFunctionShader { public static final int initialSize = 0x8000; @@ -102,4 +103,4 @@ public class FixedFunctionShader { } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GLObjectRecycler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GLObjectRecycler.java new file mode 100755 index 0000000..214a65d --- /dev/null +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GLObjectRecycler.java @@ -0,0 +1,56 @@ +/* + * Copyright (c) 2025 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. + * + */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import java.util.ArrayDeque; +import java.util.Deque; + +public abstract class GLObjectRecycler { + + private Deque deletedObjects; + + private final int reserveSize; + + public GLObjectRecycler(int reserveSize) { + this.reserveSize = reserveSize; + this.deletedObjects = new ArrayDeque<>(reserveSize << 1); + } + + public T createObject() { + T ret = deletedObjects.pollLast(); + if(ret != null) { + return ret; + }else { + return create(); + } + } + + public void destroyObject(T obj) { + deletedObjects.addLast(obj); + } + + public void compact() { + while(deletedObjects.size() > reserveSize) { + destroy(deletedObjects.removeFirst()); + } + } + + protected abstract T create(); + + protected abstract void destroy(T object); + +} diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GLSLHeader.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GLSLHeader.java index e31a076..10d497a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GLSLHeader.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GLSLHeader.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL; + public class GLSLHeader { public static final String GLES2_COMPAT_FILE_NAME = "/assets/eagler/glsl/gles2_compat.glsl"; @@ -96,4 +97,4 @@ public class GLSLHeader { return header + "#define EAGLER_IS_FRAGMENT_SHADER\n"+ (precisions == null ? "" : precisions + "\n") + gles2CompatFile + "\n" + shaderSrc; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GameOverlayFramebuffer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GameOverlayFramebuffer.java index cdfb7da..ab3080e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GameOverlayFramebuffer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GameOverlayFramebuffer.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.IRenderbufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; - -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.IRenderbufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; + +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; + public class GameOverlayFramebuffer { private static final int _GL_FRAMEBUFFER = 0x8D40; @@ -115,4 +116,4 @@ public class GameOverlayFramebuffer { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GlStateManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GlStateManager.java index 759f566..5d3acad 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GlStateManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/GlStateManager.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import net.lax1dude.eaglercraft.v1_8.internal.ITextureGL; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; -import net.lax1dude.eaglercraft.v1_8.vector.Vector3f; -import net.lax1dude.eaglercraft.v1_8.vector.Vector4f; -import net.minecraft.util.MathHelper; - -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import net.lax1dude.eaglercraft.v1_8.internal.ITextureGL; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; +import net.lax1dude.eaglercraft.v1_8.vector.Vector3f; +import net.lax1dude.eaglercraft.v1_8.vector.Vector4f; +import net.minecraft.util.MathHelper; + +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; + public class GlStateManager { static final Logger logger = LogManager.getLogger("GlStateManager"); @@ -120,10 +121,10 @@ public class GlStateManager { static int colorMaskBits = 15; - static float clearColorR = 0.0f; - static float clearColorG = 0.0f; - static float clearColorB = 0.0f; - static float clearColorA = 1.0f; + static float clearColorR = -999.0f; + static float clearColorG = -999.0f; + static float clearColorB = -999.0f; + static float clearColorA = -999.0f; static float clearDepth = -999.0f; @@ -195,7 +196,7 @@ public class GlStateManager { } } - public static final void pushLightCoords() { + public static void pushLightCoords() { int push = stateLightsStackPointer + 1; if(push < stateLightsStack.length) { Vector4f[] copyFrom = stateLightsStack[stateLightsStackPointer]; @@ -219,7 +220,7 @@ public class GlStateManager { } } - public static final void popLightCoords() { + public static void popLightCoords() { if(stateLightsStackPointer > 0) { --stateLightsStackPointer; }else { @@ -229,15 +230,15 @@ public class GlStateManager { } } - public static final void disableAlpha() { + public static void disableAlpha() { stateAlphaTest = false; } - public static final void enableAlpha() { + public static void enableAlpha() { stateAlphaTest = true; } - public static final void alphaFunc(int func, float ref) { + public static void alphaFunc(int func, float ref) { if(func != GL_GREATER) { throw new UnsupportedOperationException("Only GL_GREATER alphaFunc is supported"); }else { @@ -245,28 +246,28 @@ public class GlStateManager { } } - public static final void enableLighting() { + public static void enableLighting() { stateLighting = true; } - public static final void disableLighting() { + public static void disableLighting() { stateLighting = false; } - public static final void enableExtensionPipeline() { + public static void enableExtensionPipeline() { stateUseExtensionPipeline = true; } - public static final void disableExtensionPipeline() { + public static void disableExtensionPipeline() { stateUseExtensionPipeline = false; } - public static final boolean isExtensionPipeline() { + public static boolean isExtensionPipeline() { return stateUseExtensionPipeline; } private static final Vector4f paramVector4 = new Vector4f(); - public static final void enableMCLight(int light, float diffuse, double dirX, + public static void enableMCLight(int light, float diffuse, double dirX, double dirY, double dirZ, double dirW) { if(dirW != 0.0) throw new IllegalArgumentException("dirW must be 0.0!"); paramVector4.x = (float)dirX; @@ -286,47 +287,47 @@ public class GlStateManager { ++stateLightingSerial[stateLightsStackPointer]; } - public static final void disableMCLight(int light) { + public static void disableMCLight(int light) { stateLightsEnabled[stateLightsStackPointer][light] = false; ++stateLightingSerial[stateLightsStackPointer]; } - public static final void setMCLightAmbient(float r, float g, float b) { + public static void setMCLightAmbient(float r, float g, float b) { stateLightingAmbientR = r; stateLightingAmbientG = g; stateLightingAmbientB = b; ++stateLightingAmbientSerial; } - public static final void enableColorMaterial() { + public static void enableColorMaterial() { stateMaterial = true; } - public static final void disableColorMaterial() { + public static void disableColorMaterial() { stateMaterial = false; } - public static final void disableDepth() { + public static void disableDepth() { if(stateDepthTest) { _wglDisable(GL_DEPTH_TEST); stateDepthTest = false; } } - public static final void enableDepth() { + public static void enableDepth() { if(!stateDepthTest) { _wglEnable(GL_DEPTH_TEST); stateDepthTest = true; } } - public static final void eagPushStateForGLES2BlitHack() { + public static void eagPushStateForGLES2BlitHack() { stateDepthTestStash = stateDepthTest; stateCullStash = stateCull; stateBlendStash = stateBlend; } - public static final void eagPopStateForGLES2BlitHack() { + public static void eagPopStateForGLES2BlitHack() { if(stateDepthTestStash) { enableDepth(); }else { @@ -344,7 +345,7 @@ public class GlStateManager { } } - public static final void depthFunc(int depthFunc) { + public static void depthFunc(int depthFunc) { int rev = depthFunc; switch(depthFunc) { case GL_GREATER: @@ -369,42 +370,42 @@ public class GlStateManager { } } - public static final void depthMask(boolean flagIn) { + public static void depthMask(boolean flagIn) { if(flagIn != stateDepthMask) { _wglDepthMask(flagIn); stateDepthMask = flagIn; } } - public static final void disableBlend() { + public static void disableBlend() { if(stateBlend) { if(stateGlobalBlend) _wglDisable(GL_BLEND); stateBlend = false; } } - public static final void enableBlend() { + public static void enableBlend() { if(!stateBlend) { if(stateGlobalBlend) _wglEnable(GL_BLEND); stateBlend = true; } } - public static final void globalDisableBlend() { + public static void globalDisableBlend() { if(stateBlend) { _wglDisable(GL_BLEND); } stateGlobalBlend = false; } - public static final void globalEnableBlend() { + public static void globalEnableBlend() { if(stateBlend) { _wglEnable(GL_BLEND); } stateGlobalBlend = true; } - public static final void blendFunc(int srcFactor, int dstFactor) { + public static void blendFunc(int srcFactor, int dstFactor) { if(stateEnableOverlayFramebufferBlending) { tryBlendFuncSeparate(srcFactor, dstFactor, 0, 1); return; @@ -418,7 +419,7 @@ public class GlStateManager { } } - public static final void tryBlendFuncSeparate(int srcFactor, int dstFactor, int srcFactorAlpha, int dstFactorAlpha) { + public static void tryBlendFuncSeparate(int srcFactor, int dstFactor, int srcFactorAlpha, int dstFactorAlpha) { if(stateEnableOverlayFramebufferBlending) { // game overlay framebuffer in EntityRenderer.java srcFactorAlpha = GL_ONE; dstFactorAlpha = GL_ONE_MINUS_SRC_ALPHA; @@ -432,15 +433,15 @@ public class GlStateManager { } } - public static final void enableOverlayFramebufferBlending() { + public static void enableOverlayFramebufferBlending() { stateEnableOverlayFramebufferBlending = true; } - public static final void disableOverlayFramebufferBlending() { + public static void disableOverlayFramebufferBlending() { stateEnableOverlayFramebufferBlending = false; } - public static final void setShaderBlendSrc(float r, float g, float b, float a) { + public static void setShaderBlendSrc(float r, float g, float b, float a) { stateShaderBlendSrcColorR = r; stateShaderBlendSrcColorG = g; stateShaderBlendSrcColorB = b; @@ -448,7 +449,7 @@ public class GlStateManager { ++stateShaderBlendColorSerial; } - public static final void setShaderBlendAdd(float r, float g, float b, float a) { + public static void setShaderBlendAdd(float r, float g, float b, float a) { stateShaderBlendAddColorR = r; stateShaderBlendAddColorG = g; stateShaderBlendAddColorB = b; @@ -456,15 +457,15 @@ public class GlStateManager { ++stateShaderBlendColorSerial; } - public static final void enableShaderBlendAdd() { + public static void enableShaderBlendAdd() { stateEnableShaderBlendColor = true; } - public static final void disableShaderBlendAdd() { + public static void disableShaderBlendAdd() { stateEnableShaderBlendColor = false; } - public static final void setBlendConstants(float r, float g, float b, float a) { + public static void setBlendConstants(float r, float g, float b, float a) { if(r != blendConstantR || g != blendConstantG || b != blendConstantB || a != blendConstantA) { _wglBlendColor(r, g, b, a); blendConstantR = r; @@ -474,70 +475,70 @@ public class GlStateManager { } } - public static final void enableFog() { + public static void enableFog() { stateFog = true; } - public static final void disableFog() { + public static void disableFog() { stateFog = false; } - public static final void setFog(int param) { + public static void setFog(int param) { stateFogEXP = param == GL_EXP; ++stateFogSerial; } - public static final void setFogDensity(float param) { + public static void setFogDensity(float param) { stateFogDensity = param; ++stateFogSerial; } - public static final void setFogStart(float param) { + public static void setFogStart(float param) { stateFogStart = param; ++stateFogSerial; } - public static final void setFogEnd(float param) { + public static void setFogEnd(float param) { stateFogEnd = param; ++stateFogSerial; } - public static final void enableCull() { + public static void enableCull() { if(!stateCull) { _wglEnable(GL_CULL_FACE); stateCull = true; } } - public static final void disableCull() { + public static void disableCull() { if(stateCull) { _wglDisable(GL_CULL_FACE); stateCull = false; } } - public static final void cullFace(int mode) { + public static void cullFace(int mode) { if(stateCullFace != mode) { _wglCullFace(mode); stateCullFace = mode; } } - public static final void enablePolygonOffset() { + public static void enablePolygonOffset() { if(!statePolygonOffset) { _wglEnable(GL_POLYGON_OFFSET_FILL); statePolygonOffset = true; } } - public static final void disablePolygonOffset() { + public static void disablePolygonOffset() { if(statePolygonOffset) { _wglDisable(GL_POLYGON_OFFSET_FILL); statePolygonOffset = false; } } - public static final void doPolygonOffset(float factor, float units) { + public static void doPolygonOffset(float factor, float units) { if(factor != statePolygonOffsetFactor || units != statePolygonOffsetUnits) { _wglPolygonOffset(-factor, units); statePolygonOffsetFactor = factor; @@ -545,32 +546,32 @@ public class GlStateManager { } } - public static final void enableColorLogic() { + public static void enableColorLogic() { throw new UnsupportedOperationException("Color logic op is not supported in OpenGL ES!"); } - public static final void disableColorLogic() { + public static void disableColorLogic() { } - public static final void colorLogicOp(int opcode) { + public static void colorLogicOp(int opcode) { } - public static final void enableTexGen() { + public static void enableTexGen() { stateTexGen = true; } - public static final void disableTexGen() { + public static void disableTexGen() { stateTexGen = false; } - public static final void texGen(GlStateManager.TexGen coord, int source) { + public static void texGen(GlStateManager.TexGen coord, int source) { coord.source = source; ++stateTexGenSerial; } - public static final void func_179105_a(GlStateManager.TexGen coord, int plane, FloatBuffer vector) { + public static void func_179105_a(GlStateManager.TexGen coord, int plane, FloatBuffer vector) { coord.plane = plane; coord.vector.load(vector); if(plane == GL_EYE_PLANE) { @@ -580,7 +581,7 @@ public class GlStateManager { ++stateTexGenSerial; } - public static final void setActiveTexture(int texture) { + public static void setActiveTexture(int texture) { int textureIdx = texture - GL_TEXTURE0; if(textureIdx != activeTexture) { _wglActiveTexture(texture); @@ -588,44 +589,44 @@ public class GlStateManager { } } - public static final void enableTexture2D() { + public static void enableTexture2D() { stateTexture[activeTexture] = true; } - public static final void disableTexture2D() { + public static void disableTexture2D() { stateTexture[activeTexture] = false; } - public static final void texCoords2D(float x, float y) { + public static void texCoords2D(float x, float y) { textureCoordsX[activeTexture] = x; textureCoordsY[activeTexture] = y; ++textureCoordsAccessSerial[activeTexture]; } - public static final void texCoords2DDirect(int tex, float x, float y) { + public static void texCoords2DDirect(int tex, float x, float y) { textureCoordsX[tex] = x; textureCoordsY[tex] = y; ++textureCoordsAccessSerial[tex]; } - public static final float getTexCoordX(int tex) { + public static float getTexCoordX(int tex) { return textureCoordsX[tex]; } - public static final float getTexCoordY(int tex) { + public static float getTexCoordY(int tex) { return textureCoordsY[tex]; } - public static final int generateTexture() { + public static int generateTexture() { return EaglercraftGPU.mapTexturesGL.register(_wglGenTextures()); } - public static final void deleteTexture(int texture) { + public static void deleteTexture(int texture) { unbindTextureIfCached(texture); _wglDeleteTextures(EaglercraftGPU.mapTexturesGL.free(texture)); } - static final void unbindTextureIfCached(int texture) { + static void unbindTextureIfCached(int texture) { boolean f1, f2 = false; for(int i = 0; i < boundTexture.length; ++i) { if(boundTexture[i] == texture) { @@ -646,21 +647,21 @@ public class GlStateManager { } } - public static final void bindTexture(int texture) { + public static void bindTexture(int texture) { if(texture != boundTexture[activeTexture]) { _wglBindTexture(GL_TEXTURE_2D, EaglercraftGPU.mapTexturesGL.get(texture)); boundTexture[activeTexture] = texture; } } - public static final void bindTexture3D(int texture) { + public static void bindTexture3D(int texture) { if(texture != boundTexture[activeTexture]) { _wglBindTexture(GL_TEXTURE_3D, EaglercraftGPU.mapTexturesGL.get(texture)); boundTexture[activeTexture] = texture; } } - public static final void quickBindTexture(int unit, int texture) { + public static void quickBindTexture(int unit, int texture) { int unitBase = unit - GL_TEXTURE0; if(texture != boundTexture[unitBase]) { if(unitBase != activeTexture) { @@ -674,19 +675,19 @@ public class GlStateManager { } } - public static final void shadeModel(int mode) { + public static void shadeModel(int mode) { } - public static final void enableRescaleNormal() { + public static void enableRescaleNormal() { // still not sure what this is for } - public static final void disableRescaleNormal() { + public static void disableRescaleNormal() { } - public static final void viewport(int x, int y, int w, int h) { + public static void viewport(int x, int y, int w, int h) { if(viewportX != x || viewportY != y || viewportW != w || viewportH != h) { _wglViewport(x, y, w, h); viewportX = x; @@ -696,7 +697,7 @@ public class GlStateManager { } } - public static final void colorMask(boolean red, boolean green, boolean blue, boolean alpha) { + public static void colorMask(boolean red, boolean green, boolean blue, boolean alpha) { int bits = (red ? 1 : 0) | (green ? 2 : 0) | (blue ? 4 : 0) | (alpha ? 8 : 0); if(bits != colorMaskBits) { _wglColorMask(red, green, blue, alpha); @@ -704,7 +705,7 @@ public class GlStateManager { } } - public static final void clearDepth(float depth) { + public static void clearDepth(float depth) { depth = 1.0f - depth; if(depth != clearDepth) { _wglClearDepth(depth); @@ -712,7 +713,7 @@ public class GlStateManager { } } - public static final void clearColor(float red, float green, float blue, float alpha) { + public static void clearColor(float red, float green, float blue, float alpha) { if(red != clearColorR || green != clearColorG || blue != clearColorB || alpha != clearColorA) { _wglClearColor(red, green, blue, alpha); clearColorR = red; @@ -722,15 +723,15 @@ public class GlStateManager { } } - public static final void clear(int mask) { + public static void clear(int mask) { _wglClear(mask); } - public static final void matrixMode(int mode) { + public static void matrixMode(int mode) { stateMatrixMode = mode; } - public static final void loadIdentity() { + public static void loadIdentity() { switch(stateMatrixMode) { case GL_MODELVIEW: default: @@ -749,7 +750,7 @@ public class GlStateManager { } } - public static final void pushMatrix() { + public static void pushMatrix() { int push; switch(stateMatrixMode) { case GL_MODELVIEW: @@ -793,7 +794,7 @@ public class GlStateManager { } } - public static final void popMatrix() { + public static void popMatrix() { switch(stateMatrixMode) { case GL_MODELVIEW: default: @@ -852,7 +853,7 @@ public class GlStateManager { return mat; } - public static final void getFloat(int pname, float[] params) { + public static void getFloat(int pname, float[] params) { switch(pname) { case GL_MODELVIEW_MATRIX: modelMatrixStack[modelMatrixStackPointer].store(params); @@ -868,7 +869,7 @@ public class GlStateManager { } } - public static final void getFloat(int pname, FloatBuffer params) { + public static void getFloat(int pname, FloatBuffer params) { switch(pname) { case GL_MODELVIEW_MATRIX: modelMatrixStack[modelMatrixStackPointer].store(params); @@ -884,7 +885,7 @@ public class GlStateManager { } } - public static final void ortho(double left, double right, double bottom, double top, double zNear, double zFar) { + public static void ortho(double left, double right, double bottom, double top, double zNear, double zFar) { Matrix4f matrix = getMatrixIncr(); paramMatrix.m00 = 2.0f / (float)(right - left); paramMatrix.m01 = 0.0f; @@ -907,7 +908,7 @@ public class GlStateManager { private static final Vector3f paramVector = new Vector3f(); private static final float toRad = 0.0174532925f; - public static final void rotate(float angle, float x, float y, float z) { + public static void rotate(float angle, float x, float y, float z) { Matrix4f matrix = getMatrixIncr(); if(x == 0.0f) { if(y == 0.0f) { @@ -926,28 +927,28 @@ public class GlStateManager { _glRotatef(matrix, toRad * angle, x, y, z); } - public static final void rotateXYZ(float x, float y, float z) { + public static void rotateXYZ(float x, float y, float z) { Matrix4f matrix = getMatrixIncr(); if(x != 0.0f) _glRotatefX(matrix, toRad * x); if(y != 0.0f) _glRotatefY(matrix, toRad * y); if(z != 0.0f) _glRotatefZ(matrix, toRad * z); } - public static final void rotateZYX(float x, float y, float z) { + public static void rotateZYX(float x, float y, float z) { Matrix4f matrix = getMatrixIncr(); if(z != 0.0f) _glRotatefZ(matrix, toRad * z); if(y != 0.0f) _glRotatefY(matrix, toRad * y); if(x != 0.0f) _glRotatefX(matrix, toRad * x); } - public static final void rotateXYZRad(float x, float y, float z) { + public static void rotateXYZRad(float x, float y, float z) { Matrix4f matrix = getMatrixIncr(); if(x != 0.0f) _glRotatefX(matrix, x); if(y != 0.0f) _glRotatefY(matrix, y); if(z != 0.0f) _glRotatefZ(matrix, z); } - public static final void rotateZYXRad(float x, float y, float z) { + public static void rotateZYXRad(float x, float y, float z) { Matrix4f matrix = getMatrixIncr(); if(z != 0.0f) _glRotatefZ(matrix, z); if(y != 0.0f) _glRotatefY(matrix, y); @@ -1041,7 +1042,7 @@ public class GlStateManager { mat.m13 = nm13; } - public static final void scale(float x, float y, float z) { + public static void scale(float x, float y, float z) { Matrix4f matrix = getMatrixIncr(); matrix.m00 *= x; matrix.m01 *= x; @@ -1057,7 +1058,7 @@ public class GlStateManager { matrix.m23 *= z; } - public static final void scale(double x, double y, double z) { + public static void scale(double x, double y, double z) { Matrix4f matrix = getMatrixIncr(); matrix.m00 *= x; matrix.m01 *= x; @@ -1073,7 +1074,7 @@ public class GlStateManager { matrix.m23 *= z; } - public static final void translate(float x, float y, float z) { + public static void translate(float x, float y, float z) { Matrix4f matrix = getMatrixIncr(); matrix.m30 = matrix.m00 * x + matrix.m10 * y + matrix.m20 * z + matrix.m30; matrix.m31 = matrix.m01 * x + matrix.m11 * y + matrix.m21 * z + matrix.m31; @@ -1081,7 +1082,7 @@ public class GlStateManager { matrix.m33 = matrix.m03 * x + matrix.m13 * y + matrix.m23 * z + matrix.m33; } - public static final void translate(double x, double y, double z) { + public static void translate(double x, double y, double z) { float _x = (float)x; float _y = (float)y; float _z = (float)z; @@ -1093,18 +1094,18 @@ public class GlStateManager { } private static final Matrix4f paramMatrix = new Matrix4f(); - public static final void multMatrix(float[] matrix) { + public static void multMatrix(float[] matrix) { paramMatrix.load(matrix); Matrix4f mat = getMatrixIncr(); Matrix4f.mul(mat, paramMatrix, mat); } - public static final void multMatrix(Matrix4f matrix) { + public static void multMatrix(Matrix4f matrix) { Matrix4f mat = getMatrixIncr(); Matrix4f.mul(mat, matrix, mat); } - public static final void color(float colorRed, float colorGreen, float colorBlue, float colorAlpha) { + public static void color(float colorRed, float colorGreen, float colorBlue, float colorAlpha) { stateColorR = colorRed; stateColorG = colorGreen; stateColorB = colorBlue; @@ -1112,7 +1113,7 @@ public class GlStateManager { ++stateColorSerial; } - public static final void color(float colorRed, float colorGreen, float colorBlue) { + public static void color(float colorRed, float colorGreen, float colorBlue) { stateColorR = colorRed; stateColorG = colorGreen; stateColorB = colorBlue; @@ -1120,7 +1121,7 @@ public class GlStateManager { ++stateColorSerial; } - public static final void resetColor() { + public static void resetColor() { stateColorR = 1.0f; stateColorG = 1.0f; stateColorB = 1.0f; @@ -1128,11 +1129,11 @@ public class GlStateManager { ++stateColorSerial; } - public static final void callList(int list) { + public static void callList(int list) { EaglercraftGPU.glCallList(list); } - public static final void gluPerspective(float fovy, float aspect, float zNear, float zFar) { + public static void gluPerspective(float fovy, float aspect, float zNear, float zFar) { Matrix4f matrix = getMatrixIncr(); float cotangent = (float) Math.cos(fovy * toRad * 0.5f) / (float) Math.sin(fovy * toRad * 0.5f); paramMatrix.m00 = cotangent / aspect; @@ -1154,7 +1155,7 @@ public class GlStateManager { Matrix4f.mul(matrix, paramMatrix, matrix); } - public static final void gluLookAt(Vector3f eye, Vector3f center, Vector3f up) { + public static void gluLookAt(Vector3f eye, Vector3f center, Vector3f up) { Matrix4f matrix = getMatrixIncr(); float x = center.x - eye.x; float y = center.y - eye.y; @@ -1195,7 +1196,7 @@ public class GlStateManager { Matrix4f.mul(matrix, paramMatrix, matrix); } - public static final void transform(Vector4f vecIn, Vector4f vecOut) { + public static void transform(Vector4f vecIn, Vector4f vecOut) { Matrix4f matrix; switch(stateMatrixMode) { case GL_MODELVIEW: @@ -1215,7 +1216,7 @@ public class GlStateManager { private static final Matrix4f unprojA = new Matrix4f(); private static final Matrix4f unprojB = new Matrix4f(); private static final Vector4f unprojC = new Vector4f(); - public static final void gluUnProject(float p1, float p2, float p3, float[] modelview, float[] projection, + public static void gluUnProject(float p1, float p2, float p3, float[] modelview, float[] projection, int[] viewport, float[] objectcoords) { unprojA.load(modelview); unprojB.load(projection); @@ -1229,7 +1230,7 @@ public class GlStateManager { objectcoords[2] = unprojC.z / unprojC.w; } - public static final void getMatrix(Matrix4f mat) { + public static void getMatrix(Matrix4f mat) { switch(stateMatrixMode) { case GL_MODELVIEW: mat.load(modelMatrixStack[modelMatrixStackPointer]); @@ -1244,7 +1245,7 @@ public class GlStateManager { } } - public static final void loadMatrix(Matrix4f mat) { + public static void loadMatrix(Matrix4f mat) { switch(stateMatrixMode) { case GL_MODELVIEW: modelMatrixStack[modelMatrixStackPointer].load(mat); @@ -1262,15 +1263,15 @@ public class GlStateManager { } } - public static final int getModelViewSerial() { + public static int getModelViewSerial() { return modelMatrixStackAccessSerial[modelMatrixStackPointer]; } - public static final Matrix4f getModelViewReference() { + public static Matrix4f getModelViewReference() { return modelMatrixStack[modelMatrixStackPointer]; } - public static final Matrix4f getProjectionReference() { + public static Matrix4f getProjectionReference() { return projectionMatrixStack[projectionMatrixStackPointer]; } diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/HighPolyMesh.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/HighPolyMesh.java index 34946d3..a1fe8c9 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/HighPolyMesh.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/HighPolyMesh.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; -import net.lax1dude.eaglercraft.v1_8.opengl.FixedFunctionShader.FixedFunctionState; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,9 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.opengl.FixedFunctionShader.FixedFunctionSta * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; +import net.lax1dude.eaglercraft.v1_8.opengl.FixedFunctionShader.FixedFunctionState; + public class HighPolyMesh { - IBufferArrayGL vertexArray; + IVertexArrayGL vertexArray; IBufferGL vertexBuffer; IBufferGL indexBuffer; @@ -30,7 +31,7 @@ public class HighPolyMesh { boolean hasTexture; - public HighPolyMesh(IBufferArrayGL vertexArray, IBufferGL vertexBuffer, IBufferGL indexBuffer, int vertexCount, + public HighPolyMesh(IVertexArrayGL vertexArray, IBufferGL vertexBuffer, IBufferGL indexBuffer, int vertexCount, int indexCount, boolean hasTexture) { this.vertexArray = vertexArray; this.vertexBuffer = vertexBuffer; @@ -63,4 +64,4 @@ public class HighPolyMesh { public int getAttribBits() { return hasTexture ? (FixedFunctionState.STATE_HAS_ATTRIB_TEXTURE | FixedFunctionState.STATE_HAS_ATTRIB_NORMAL) : FixedFunctionState.STATE_HAS_ATTRIB_NORMAL; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/IExtPipelineCompiler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/IExtPipelineCompiler.java index dee3bd6..535c9a6 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/IExtPipelineCompiler.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/IExtPipelineCompiler.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; + public interface IExtPipelineCompiler { /** @@ -36,4 +37,4 @@ public interface IExtPipelineCompiler { void destroyPipeline(IProgramGL shaderProgram, int stateCoreBits, int stateExtBits, Object[] userPointer); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ImageData.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ImageData.java index 28d0cb3..c13c94f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ImageData.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ImageData.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import java.io.InputStream; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformAssets; - -/** +/* * Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformAssets; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import java.io.InputStream; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformAssets; + public class ImageData { public final int width; @@ -198,4 +199,4 @@ public class ImageData { return (w & (w - 1)) != 0 || (h & (h - 1)) != 0; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/InstancedFontRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/InstancedFontRenderer.java index 256098d..dd830d5 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/InstancedFontRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/InstancedFontRenderer.java @@ -1,23 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; -import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; -import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; -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.DeferredStateManager; -import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; -import net.lax1dude.eaglercraft.v1_8.vector.Vector4f; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -32,6 +13,26 @@ import net.lax1dude.eaglercraft.v1_8.vector.Vector4f; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; +import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; +import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; +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.DeferredStateManager; +import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; +import net.lax1dude.eaglercraft.v1_8.vector.Vector4f; + public class InstancedFontRenderer { private static final Logger logger = LogManager.getLogger("InstancedFontRenderer"); @@ -53,7 +54,7 @@ public class InstancedFontRenderer { private static IUniformGL u_color4f = null; private static IUniformGL u_colorBias4f = null; - private static IBufferArrayGL vertexArray = null; + private static IVertexArrayGL vertexArray = null; private static IBufferGL vertexBuffer = null; private static IBufferGL instancesBuffer = null; @@ -159,7 +160,7 @@ public class InstancedFontRenderer { _wglUniform1i(_wglGetUniformLocation(shaderProgram, "u_inputTexture"), 0); - vertexArray = EaglercraftGPU.createGLBufferArray(); + vertexArray = EaglercraftGPU.createGLVertexArray(); vertexBuffer = _wglGenBuffers(); instancesBuffer = _wglGenBuffers(); @@ -190,7 +191,7 @@ public class InstancedFontRenderer { }); verts.flip(); - EaglercraftGPU.bindGLBufferArray(vertexArray); + EaglercraftGPU.bindGLVertexArray(vertexArray); EaglercraftGPU.bindVAOGLArrayBufferNow(vertexBuffer); _wglBufferData(GL_ARRAY_BUFFER, verts, GL_STATIC_DRAW); @@ -369,7 +370,7 @@ public class InstancedFontRenderer { } EaglercraftGPU.bindGLArrayBuffer(instancesBuffer); - EaglercraftGPU.bindGLBufferArray(vertexArray); + EaglercraftGPU.bindGLVertexArray(vertexArray); if(charactersDrawn > 0) { int p = fontDataBuffer.position(); @@ -381,7 +382,7 @@ public class InstancedFontRenderer { fontDataBuffer.position(p); fontDataBuffer.limit(l); - EaglercraftGPU.doDrawArraysInstanced(GL_TRIANGLES, shadow ? 0 : 6, shadow ? 12 : 6, charactersDrawn); + EaglercraftGPU.drawArraysInstanced(GL_TRIANGLES, shadow ? 0 : 6, shadow ? 12 : 6, charactersDrawn); } if(boldCharactersDrawn > 0) { @@ -394,7 +395,7 @@ public class InstancedFontRenderer { fontBoldDataBuffer.position(p); fontBoldDataBuffer.limit(l); - EaglercraftGPU.doDrawArraysInstanced(GL_TRIANGLES, shadow ? 12 : 24, shadow ? 24 : 12, boldCharactersDrawn); + EaglercraftGPU.drawArraysInstanced(GL_TRIANGLES, shadow ? 12 : 24, shadow ? 24 : 12, boldCharactersDrawn); } } @@ -448,7 +449,7 @@ public class InstancedFontRenderer { } } - private static final void updateBounds(int x, int y) { + private static void updateBounds(int x, int y) { if(x < widthCalcLeast || widthCalcLeast == Integer.MAX_VALUE) widthCalcLeast = x; if(x > widthCalcMost || widthCalcMost == Integer.MAX_VALUE) widthCalcMost = x; if(y < heightCalcLeast || heightCalcLeast == Integer.MAX_VALUE) heightCalcLeast = y; @@ -478,7 +479,7 @@ public class InstancedFontRenderer { u_color4f = null; u_colorBias4f = null; if(vertexArray != null) { - EaglercraftGPU.destroyGLBufferArray(vertexArray); + EaglercraftGPU.destroyGLVertexArray(vertexArray); vertexArray = null; } if(vertexBuffer != null) { @@ -491,4 +492,4 @@ public class InstancedFontRenderer { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/InstancedParticleRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/InstancedParticleRenderer.java index 242f8a3..48720f9 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/InstancedParticleRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/InstancedParticleRenderer.java @@ -1,21 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; -import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; -import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -30,6 +13,24 @@ import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; +import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; +import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; + public class InstancedParticleRenderer { private static final Logger logger = LogManager.getLogger("InstancedParticleRenderer"); @@ -55,7 +56,7 @@ public class InstancedParticleRenderer { private static IUniformGL u_transformParam_3_4_f = null; private static IUniformGL u_color4f = null; - private static IBufferArrayGL vertexArray = null; + private static IVertexArrayGL vertexArray = null; private static IBufferGL vertexBuffer = null; private static IBufferGL instancesBuffer = null; @@ -160,7 +161,7 @@ public class InstancedParticleRenderer { _wglUniform1i(_wglGetUniformLocation(shaderProgram, "u_inputTexture"), 0); _wglUniform1i(_wglGetUniformLocation(shaderProgram, "u_lightmapTexture"), 1); - vertexArray = EaglercraftGPU.createGLBufferArray(); + vertexArray = EaglercraftGPU.createGLVertexArray(); vertexBuffer = _wglGenBuffers(); instancesBuffer = _wglGenBuffers(); @@ -171,7 +172,7 @@ public class InstancedParticleRenderer { }); verts.flip(); - EaglercraftGPU.bindGLBufferArray(vertexArray); + EaglercraftGPU.bindGLVertexArray(vertexArray); EaglercraftGPU.bindVAOGLArrayBufferNow(vertexBuffer); _wglBufferData(GL_ARRAY_BUFFER, verts, GL_STATIC_DRAW); @@ -304,7 +305,7 @@ public class InstancedParticleRenderer { } EaglercraftGPU.bindGLArrayBuffer(instancesBuffer); - EaglercraftGPU.bindGLBufferArray(vertexArray); + EaglercraftGPU.bindGLVertexArray(vertexArray); int p = particleBuffer.position(); int l = particleBuffer.limit(); @@ -315,7 +316,7 @@ public class InstancedParticleRenderer { particleBuffer.position(p); particleBuffer.limit(l); - EaglercraftGPU.doDrawArraysInstanced(GL_TRIANGLES, 0, 6, particleCount); + EaglercraftGPU.drawArraysInstanced(GL_TRIANGLES, 0, 6, particleCount); } public static void stupidColorSetHack(IUniformGL color4f) { @@ -341,7 +342,7 @@ public class InstancedParticleRenderer { u_transformParam_3_4_f = null; u_color4f = null; if(vertexArray != null) { - EaglercraftGPU.destroyGLBufferArray(vertexArray); + EaglercraftGPU.destroyGLVertexArray(vertexArray); vertexArray = null; } if(vertexBuffer != null) { @@ -354,4 +355,4 @@ public class InstancedParticleRenderer { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/OpenGlHelper.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/OpenGlHelper.java index f05b662..29f7b35 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/OpenGlHelper.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/OpenGlHelper.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.opengl; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + public class OpenGlHelper { public static final int defaultTexUnit = RealOpenGLEnums.GL_TEXTURE0; @@ -28,4 +29,4 @@ public class OpenGlHelper { } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/RealOpenGLEnums.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/RealOpenGLEnums.java index 94347aa..e7eee07 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/RealOpenGLEnums.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/RealOpenGLEnums.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -/** +/* * Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.opengl; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + public class RealOpenGLEnums { public static final int GL_ACCUM = 256; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SoftGLBufferArray.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SoftGLVertexArray.java similarity index 93% rename from src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SoftGLBufferArray.java rename to src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SoftGLVertexArray.java index 4006214..203384f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SoftGLBufferArray.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SoftGLVertexArray.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,7 +13,15 @@ import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; * POSSIBILITY OF SUCH DAMAGE. * */ -class SoftGLBufferArray implements IBufferArrayGL { + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; + +class SoftGLVertexArray implements IVertexArrayGL { Attrib[] attribs = new Attrib[4]; int[] attribDivisors = null; @@ -29,7 +30,7 @@ class SoftGLBufferArray implements IBufferArrayGL { int enabledCnt = -1; IBufferGL indexBuffer = null; - SoftGLBufferArray() { + SoftGLVertexArray() { } void setAttrib(IBufferGL buffer, int index, int size, int format, boolean normalized, int stride, int offset) { @@ -86,7 +87,7 @@ class SoftGLBufferArray implements IBufferArrayGL { indexBuffer = buffer; } - void transitionToState(SoftGLBufferState previousState, boolean elements) { + void transitionToState(SoftGLVertexState previousState, boolean elements) { int oldEnabled = previousState.oldEnabled; int oldEnabledCnt = previousState.oldEnabledCnt; int[] oldAttribDivisors = previousState.attribDivisors; @@ -222,4 +223,4 @@ class SoftGLBufferArray implements IBufferArrayGL { } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SoftGLBufferState.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SoftGLVertexState.java similarity index 87% rename from src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SoftGLBufferState.java rename to src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SoftGLVertexState.java index 615a411..1ff3f0c 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SoftGLBufferState.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SoftGLVertexState.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import net.lax1dude.eaglercraft.v1_8.opengl.SoftGLBufferArray.Attrib; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,7 +13,12 @@ import net.lax1dude.eaglercraft.v1_8.opengl.SoftGLBufferArray.Attrib; * POSSIBILITY OF SUCH DAMAGE. * */ -class SoftGLBufferState { + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import net.lax1dude.eaglercraft.v1_8.opengl.SoftGLVertexArray.Attrib; + +class SoftGLVertexState { final Attrib[] attribs = new Attrib[24]; int[] attribDivisors = new int[24]; @@ -25,7 +26,7 @@ class SoftGLBufferState { int oldEnabled = 0; int oldEnabledCnt = -1; - SoftGLBufferState() { + SoftGLVertexState() { } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SpriteLevelMixer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SpriteLevelMixer.java index 5240aee..c8bac92 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SpriteLevelMixer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/SpriteLevelMixer.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2025 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; @@ -16,21 +32,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.opengl.VSHInputLayoutParser.ShaderInput; import net.lax1dude.eaglercraft.v1_8.vector.Matrix3f; -/** - * Copyright (c) 2022-2025 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 SpriteLevelMixer { private static final Logger LOGGER = LogManager.getLogger("SpriteLevelMixer"); @@ -212,4 +213,4 @@ public class SpriteLevelMixer { u_dstCoords4f = null; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/StreamBuffer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/StreamBuffer.java index 3f926dd..2f1a207 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/StreamBuffer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/StreamBuffer.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; - -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; + +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; + public class StreamBuffer { public static final int poolSize = 16; @@ -75,12 +76,12 @@ public class StreamBuffer { public static class StreamBufferInstance { protected PoolInstance poolInstance = null; - protected IBufferArrayGL vertexArray = null; + protected IVertexArrayGL vertexArray = null; public boolean bindQuad16 = false; public boolean bindQuad32 = false; - public IBufferArrayGL getVertexArray() { + public IVertexArrayGL getVertexArray() { return vertexArray; } @@ -91,7 +92,7 @@ public class StreamBuffer { } public static interface IStreamBufferInitializer { - void initialize(IBufferArrayGL vertexArray, IBufferGL vertexBuffer); + void initialize(IVertexArrayGL vertexArray, IBufferGL vertexBuffer); } public StreamBuffer(int initialSize, int initialCount, int maxCount, IStreamBufferInitializer initializer) { @@ -114,7 +115,7 @@ public class StreamBuffer { StreamBufferInstance next = buffers[(currentBufferId++) % buffers.length]; resizeInstance(next.poolInstance, requiredMemory); if(next.vertexArray == null) { - next.vertexArray = EaglercraftGPU.createGLBufferArray(); + next.vertexArray = EaglercraftGPU.createGLVertexArray(); initializer.initialize(next.vertexArray, next.poolInstance.vertexBuffer); } return next; @@ -134,7 +135,7 @@ public class StreamBuffer { newArray[i] = buffers[i]; }else { if(buffers[i].vertexArray != null) { - EaglercraftGPU.destroyGLBufferArray(buffers[i].vertexArray); + EaglercraftGPU.destroyGLVertexArray(buffers[i].vertexArray); } } } @@ -185,7 +186,7 @@ public class StreamBuffer { for(int i = 0; i < buffers.length; ++i) { StreamBufferInstance next = buffers[i]; if(next.vertexArray != null) { - EaglercraftGPU.destroyGLBufferArray(next.vertexArray); + EaglercraftGPU.destroyGLVertexArray(next.vertexArray); } } buffers = new StreamBufferInstance[initialCount]; @@ -205,4 +206,4 @@ public class StreamBuffer { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/TextureCopyUtil.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/TextureCopyUtil.java index 4321c16..3de955a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/TextureCopyUtil.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/TextureCopyUtil.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; -import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; -import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; +import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; +import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class TextureCopyUtil { private static final Logger LOGGER = LogManager.getLogger("TextureCopyUtil"); @@ -443,4 +444,4 @@ public class TextureCopyUtil { } SpriteLevelMixer.destroy(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/TextureFormatHelper.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/TextureFormatHelper.java index c8bb39b..07d4494 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/TextureFormatHelper.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/TextureFormatHelper.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ExtGLEnums.*; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ExtGLEnums.*; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ExtGLEnums.*; + public class TextureFormatHelper { public static int getFormatFromInternal(int internalFormat) { @@ -78,4 +79,4 @@ public class TextureFormatHelper { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/VSHInputLayoutParser.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/VSHInputLayoutParser.java index 72fbabd..77a43ed 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/VSHInputLayoutParser.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/VSHInputLayoutParser.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import java.util.ArrayList; -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.EagUtils; -import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import java.util.ArrayList; +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.EagUtils; +import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; + public class VSHInputLayoutParser { public static class ShaderInput { @@ -88,4 +89,4 @@ public class VSHInputLayoutParser { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/VertexFormat.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/VertexFormat.java index f0ba202..a8bcd37 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/VertexFormat.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/VertexFormat.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -/** +/* * Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + public enum VertexFormat { BLOCK(true, true, false, true), @@ -194,4 +195,4 @@ public enum VertexFormat { } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/WorldRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/WorldRenderer.java index 04fb6a7..c12bb18 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/WorldRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/WorldRenderer.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl; import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; @@ -19,21 +35,6 @@ import net.minecraft.util.EnumWorldBlockLayer; import net.minecraft.util.MathHelper; import net.optifine.render.RenderEnv; -/** - * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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 WorldRenderer { private static final Logger logger = LogManager.getLogger("WorldRenderer"); diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/WorldVertexBufferUploader.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/WorldVertexBufferUploader.java index 45f6de7..119f9f7 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/WorldVertexBufferUploader.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/WorldVertexBufferUploader.java @@ -1,9 +1,5 @@ -package net.lax1dude.eaglercraft.v1_8.opengl; - -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; - -/** - * Copyright (c) 2022 lax1dude. All Rights Reserved. +/* + * Copyright (c) 2022-2025 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 @@ -17,7 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl; + +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; + public class WorldVertexBufferUploader { + public static void func_181679_a(WorldRenderer parWorldRenderer) { int cunt = parWorldRenderer.getVertexCount(); if (cunt > 0) { @@ -29,4 +31,18 @@ public class WorldVertexBufferUploader { parWorldRenderer.reset(); } } + + public static void uploadDisplayList(int displayList, WorldRenderer worldRenderer) { + int cunt = worldRenderer.getVertexCount(); + if (cunt > 0) { + VertexFormat fmt = worldRenderer.getVertexFormat(); + ByteBuffer buf = worldRenderer.getByteBuffer(); + buf.position(0).limit(cunt * fmt.attribStride); + EaglercraftGPU.uploadListDirect(displayList, buf, fmt.eaglercraftAttribBits, worldRenderer.getDrawMode(), cunt); + worldRenderer.reset(); + }else { + EaglercraftGPU.flushDisplayList(displayList); + } + } + } \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/AbstractAcceleratedEffectRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/AbstractAcceleratedEffectRenderer.java index 9e68d26..7b914e6 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/AbstractAcceleratedEffectRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/AbstractAcceleratedEffectRenderer.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import net.lax1dude.eaglercraft.v1_8.minecraft.IAcceleratedParticleEngine; -import net.minecraft.client.particle.EntityFX; -import net.minecraft.entity.Entity; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.entity.Entity; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import net.lax1dude.eaglercraft.v1_8.minecraft.IAcceleratedParticleEngine; +import net.minecraft.client.particle.EntityFX; +import net.minecraft.entity.Entity; + public abstract class AbstractAcceleratedEffectRenderer implements IAcceleratedParticleEngine { public float partialTicks; @@ -48,4 +49,4 @@ public abstract class AbstractAcceleratedEffectRenderer implements IAcceleratedP drawParticle(posX, posY, posZ, particleIndexX, particleIndexY, lightMapData, texSize, particleSize, color); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ArrayListSerial.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ArrayListSerial.java index 44bd138..3c2ccd5 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ArrayListSerial.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ArrayListSerial.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import java.util.ArrayList; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import java.util.ArrayList; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import java.util.ArrayList; + public class ArrayListSerial extends ArrayList implements ListSerial { protected int modCountEagler = 0; @@ -51,4 +52,4 @@ public class ArrayListSerial extends ArrayList implements ListSerial { return mark != getEaglerSerial(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/BlockVertexIDs.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/BlockVertexIDs.java index 7f8c155..fc94d90 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/BlockVertexIDs.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/BlockVertexIDs.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; import java.io.BufferedReader; @@ -13,21 +29,6 @@ import net.minecraft.client.resources.IResourceManager; import net.minecraft.client.resources.IResourceManagerReloadListener; import net.minecraft.util.ResourceLocation; -/** - * Copyright (c) 2023 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 BlockVertexIDs implements IResourceManagerReloadListener { private static final Logger logger = LogManager.getLogger("BlockVertexIDsCSV"); @@ -86,4 +87,4 @@ public class BlockVertexIDs implements IResourceManagerReloadListener { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/CloudRenderWorker.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/CloudRenderWorker.java index 8b11644..8de6d79 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/CloudRenderWorker.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/CloudRenderWorker.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; @@ -24,21 +40,6 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.WorldClient; import net.minecraft.util.MathHelper; -/** - * Copyright (c) 2023 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 CloudRenderWorker { static PipelineShaderCloudsNoise3D shader_clouds_noise3d = null; @@ -606,4 +607,4 @@ public class CloudRenderWorker { return false; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DebugFramebufferView.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DebugFramebufferView.java index 28327d8..62cab6c 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DebugFramebufferView.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DebugFramebufferView.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; import java.util.Arrays; @@ -15,21 +31,6 @@ import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; import static net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ExtGLEnums.*; -/** - * Copyright (c) 2023 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 DebugFramebufferView { public static boolean debugViewShown = false; @@ -82,7 +83,7 @@ public class DebugFramebufferView { (new DebugFramebufferView("Sun Shadow Depth: LOD 1", (pipeline) -> { if(pipeline.config.is_rendering_shadowsSun_clamped < 1) throw new NoDataException(); PipelineShaderGBufferDebugView dbv = pipeline.useDebugViewShader(5); - _wglUniform2f(dbv.uniforms.u_depthSliceStartEnd2f, 1.0f / pipeline.config.is_rendering_shadowsSun_clamped, 0.0f); + _wglUniform2f(dbv.uniforms.u_depthSliceStartEnd2f, 1.0f / Math.min(pipeline.config.is_rendering_shadowsSun_clamped, 3), 0.0f); GlStateManager.setActiveTexture(GL_TEXTURE0); GlStateManager.bindTexture(pipeline.sunShadowDepthBuffer); _wglTexParameteri(GL_TEXTURE_2D, _GL_TEXTURE_COMPARE_MODE, GL_NONE); @@ -92,7 +93,7 @@ public class DebugFramebufferView { (new DebugFramebufferView("Sun Shadow Color: LOD 1", (pipeline) -> { if(pipeline.config.is_rendering_shadowsSun_clamped < 1 || !pipeline.config.is_rendering_shadowsColored) throw new NoDataException(); PipelineShaderGBufferDebugView dbv = pipeline.useDebugViewShader(10); - _wglUniform2f(dbv.uniforms.u_depthSliceStartEnd2f, 1.0f / pipeline.config.is_rendering_shadowsSun_clamped, 0.0f); + _wglUniform2f(dbv.uniforms.u_depthSliceStartEnd2f, 1.0f / Math.min(pipeline.config.is_rendering_shadowsSun_clamped, 3), 0.0f); GlStateManager.setActiveTexture(GL_TEXTURE1); GlStateManager.bindTexture(pipeline.sunShadowColorBuffer); GlStateManager.setActiveTexture(GL_TEXTURE0); @@ -104,7 +105,7 @@ public class DebugFramebufferView { (new DebugFramebufferView("Sun Shadow Depth: LOD 2", (pipeline) -> { if(pipeline.config.is_rendering_shadowsSun_clamped < 2) throw new NoDataException(); PipelineShaderGBufferDebugView dbv = pipeline.useDebugViewShader(5); - _wglUniform2f(dbv.uniforms.u_depthSliceStartEnd2f, 1.0f / pipeline.config.is_rendering_shadowsSun_clamped, 1.0f); + _wglUniform2f(dbv.uniforms.u_depthSliceStartEnd2f, 1.0f / Math.min(pipeline.config.is_rendering_shadowsSun_clamped, 3), 1.0f); GlStateManager.setActiveTexture(GL_TEXTURE0); GlStateManager.bindTexture(pipeline.sunShadowDepthBuffer); _wglTexParameteri(GL_TEXTURE_2D, _GL_TEXTURE_COMPARE_MODE, GL_NONE); @@ -114,7 +115,7 @@ public class DebugFramebufferView { (new DebugFramebufferView("Sun Shadow Color: LOD 2", (pipeline) -> { if(pipeline.config.is_rendering_shadowsSun_clamped < 2 || !pipeline.config.is_rendering_shadowsColored) throw new NoDataException(); PipelineShaderGBufferDebugView dbv = pipeline.useDebugViewShader(10); - _wglUniform2f(dbv.uniforms.u_depthSliceStartEnd2f, 1.0f / pipeline.config.is_rendering_shadowsSun_clamped, 1.0f); + _wglUniform2f(dbv.uniforms.u_depthSliceStartEnd2f, 1.0f / Math.min(pipeline.config.is_rendering_shadowsSun_clamped, 3), 1.0f); GlStateManager.setActiveTexture(GL_TEXTURE1); GlStateManager.bindTexture(pipeline.sunShadowColorBuffer); GlStateManager.setActiveTexture(GL_TEXTURE0); @@ -126,7 +127,7 @@ public class DebugFramebufferView { (new DebugFramebufferView("Sun Shadow Depth: LOD 3", (pipeline) -> { if(pipeline.config.is_rendering_shadowsSun_clamped < 3) throw new NoDataException(); PipelineShaderGBufferDebugView dbv = pipeline.useDebugViewShader(5); - _wglUniform2f(dbv.uniforms.u_depthSliceStartEnd2f, 1.0f / pipeline.config.is_rendering_shadowsSun_clamped, 2.0f); + _wglUniform2f(dbv.uniforms.u_depthSliceStartEnd2f, 1.0f / Math.min(pipeline.config.is_rendering_shadowsSun_clamped, 3), 2.0f); GlStateManager.setActiveTexture(GL_TEXTURE0); GlStateManager.bindTexture(pipeline.sunShadowDepthBuffer); _wglTexParameteri(GL_TEXTURE_2D, _GL_TEXTURE_COMPARE_MODE, GL_NONE); @@ -144,6 +145,13 @@ public class DebugFramebufferView { GlStateManager.bindTexture(pipeline.sunLightingShadowTexture); DrawUtils.drawStandardQuad2D(); })), + (new DebugFramebufferView("GBuffer Subsurface Scattering", (pipeline) -> { + if(!pipeline.config.is_rendering_subsurfaceScattering || Minecraft.getMinecraft().theWorld.provider.getDimensionId() != 0) throw new NoDataException(); + pipeline.useDebugViewShader(6); + GlStateManager.setActiveTexture(GL_TEXTURE0); + GlStateManager.bindTexture(pipeline.subsurfaceScatteringTexture); + DrawUtils.drawStandardQuad2D(); + })), (new DebugFramebufferView("Light Shafts Buffer", (pipeline) -> { if(!pipeline.config.is_rendering_lightShafts) throw new NoDataException(); pipeline.useDebugViewShader(6); @@ -534,4 +542,4 @@ public class DebugFramebufferView { this.renderHandler = renderHandler; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DeferredStateManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DeferredStateManager.java index c0fca89..77349ea 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DeferredStateManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DeferredStateManager.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; -import net.lax1dude.eaglercraft.v1_8.vector.Vector3f; -import net.lax1dude.eaglercraft.v1_8.vector.Vector4f; -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.util.AxisAlignedBB; -import net.minecraft.util.MathHelper; - -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; - -/** +/* * Copyright (c) 2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; +import net.lax1dude.eaglercraft.v1_8.vector.Vector3f; +import net.lax1dude.eaglercraft.v1_8.vector.Vector4f; +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.util.AxisAlignedBB; +import net.minecraft.util.MathHelper; + +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; + public class DeferredStateManager { public static float sunAngle = 45.0f; // realistic: 23.5f @@ -45,6 +46,7 @@ public class DeferredStateManager { static float materialConstantsRoughness = 0.5f; static float materialConstantsMetalness = 0.02f; static float materialConstantsEmission = 0.0f; + static float materialConstantsSubsurfScatting = 0.0f; static boolean materialConstantsUseEnvMap = false; static int wavingBlockOffsetSerial = 0; @@ -102,46 +104,47 @@ public class DeferredStateManager { public static boolean doCheckErrors = false; - public static final boolean isDeferredRenderer() { + public static boolean isDeferredRenderer() { return EaglerDeferredPipeline.instance != null; } - public static final boolean isInDeferredPass() { + public static boolean isInDeferredPass() { return EaglerDeferredPipeline.instance != null && GlStateManager.isExtensionPipeline(); } - public static final boolean isInForwardPass() { + public static boolean isInForwardPass() { return enableForwardRender && !enableShadowRender; } - public static final boolean isInParaboloidPass() { + public static boolean isInParaboloidPass() { return enableParaboloidRender; } - public static final boolean isRenderingRealisticWater() { + public static boolean isRenderingRealisticWater() { return EaglerDeferredPipeline.instance != null && EaglerDeferredPipeline.instance.config.is_rendering_realisticWater; } - public static final boolean isRenderingGlassHighlights() { + public static boolean isRenderingGlassHighlights() { return EaglerDeferredPipeline.instance != null && EaglerDeferredPipeline.instance.config.is_rendering_useEnvMap; } - public static final void setDefaultMaterialConstants() { + public static void setDefaultMaterialConstants() { materialConstantsRoughness = 0.5f; materialConstantsMetalness = 0.02f; materialConstantsEmission = 0.0f; + materialConstantsSubsurfScatting = 0.0f; ++materialConstantsSerial; } - public static final void startUsingEnvMap() { + public static void startUsingEnvMap() { materialConstantsUseEnvMap = true; } - public static final void endUsingEnvMap() { + public static void endUsingEnvMap() { materialConstantsUseEnvMap = false; } - public static final void reportForwardRenderObjectPosition(int centerX, int centerY, int centerZ) { + public static void reportForwardRenderObjectPosition(int centerX, int centerY, int centerZ) { EaglerDeferredPipeline instance = EaglerDeferredPipeline.instance; if(instance != null && enableForwardRender) { EaglerDeferredConfig cfg = instance.config; @@ -152,7 +155,7 @@ public class DeferredStateManager { } } - public static final void reportForwardRenderObjectPosition2(float x, float y, float z) { + public static void reportForwardRenderObjectPosition2(float x, float y, float z) { EaglerDeferredPipeline instance = EaglerDeferredPipeline.instance; if(instance != null && enableForwardRender) { EaglerDeferredConfig cfg = instance.config; @@ -166,114 +169,114 @@ public class DeferredStateManager { } } - public static final void setHDRTranslucentPassBlendFunc() { + public static void setHDRTranslucentPassBlendFunc() { GlStateManager.tryBlendFuncSeparate(GL_ONE, GL_ONE_MINUS_SRC_ALPHA, GL_ZERO, GL_ZERO); } - public static final void enableMaterialTexture() { + public static void enableMaterialTexture() { enableMaterialMapTexture = true; } - public static final void disableMaterialTexture() { + public static void disableMaterialTexture() { enableMaterialMapTexture = false; } - public static final void enableForwardRender() { + public static void enableForwardRender() { enableForwardRender = true; } - public static final void disableForwardRender() { + public static void disableForwardRender() { enableForwardRender = false; } - public static final void enableParaboloidRender() { + public static void enableParaboloidRender() { enableParaboloidRender = true; } - public static final void disableParaboloidRender() { + public static void disableParaboloidRender() { enableParaboloidRender = false; } - public static final void enableShadowRender() { + public static void enableShadowRender() { enableShadowRender = true; } - public static final void disableShadowRender() { + public static void disableShadowRender() { enableShadowRender = false; } - public static final boolean isEnableShadowRender() { + public static boolean isEnableShadowRender() { return enableShadowRender; } - public static final void enableClipPlane() { + public static void enableClipPlane() { enableClipPlane = true; } - public static final void disableClipPlane() { + public static void disableClipPlane() { enableClipPlane = false; } - public static final void setClipPlaneY(float yValue) { + public static void setClipPlaneY(float yValue) { clipPlaneY = yValue; } - public static final void enableDrawWavingBlocks() { + public static void enableDrawWavingBlocks() { enableDrawWavingBlocks = true; } - public static final void disableDrawWavingBlocks() { + public static void disableDrawWavingBlocks() { enableDrawWavingBlocks = false; } - public static final boolean isEnableDrawWavingBlocks() { + public static boolean isEnableDrawWavingBlocks() { return enableDrawWavingBlocks; } - public static final void enableDrawRealisticWaterMask() { + public static void enableDrawRealisticWaterMask() { enableDrawRealisticWaterMask = true; } - public static final void disableDrawRealisticWaterMask() { + public static void disableDrawRealisticWaterMask() { enableDrawRealisticWaterMask = false; } - public static final boolean isDrawRealisticWaterMask() { + public static boolean isDrawRealisticWaterMask() { return enableDrawRealisticWaterMask; } - public static final void enableDrawRealisticWaterRender() { + public static void enableDrawRealisticWaterRender() { enableDrawRealisticWaterRender = true; } - public static final void disableDrawRealisticWaterRender() { + public static void disableDrawRealisticWaterRender() { enableDrawRealisticWaterRender = false; } - public static final boolean isDrawRealisticWaterRender() { + public static boolean isDrawRealisticWaterRender() { return enableDrawRealisticWaterRender; } - public static final void enableDrawGlassHighlightsRender() { + public static void enableDrawGlassHighlightsRender() { enableDrawGlassHighlightsRender = true; } - public static final void disableDrawGlassHighlightsRender() { + public static void disableDrawGlassHighlightsRender() { enableDrawGlassHighlightsRender = false; } - public static final boolean isDrawGlassHighlightsRender() { + public static boolean isDrawGlassHighlightsRender() { return enableDrawGlassHighlightsRender; } - public static final void setWavingBlockOffset(float x, float y, float z) { + public static void setWavingBlockOffset(float x, float y, float z) { wavingBlockOffsetX = x; wavingBlockOffsetY = y; wavingBlockOffsetZ = z; ++wavingBlockOffsetSerial; } - public static final void setWavingBlockParams(float x, float y, float z, float w) { + public static void setWavingBlockParams(float x, float y, float z, float w) { wavingBlockParamX = x; wavingBlockParamY = y; wavingBlockParamZ = z; @@ -281,34 +284,39 @@ public class DeferredStateManager { ++wavingBlockParamSerial; } - public static final void setRoughnessConstant(float roughness) { + public static void setRoughnessConstant(float roughness) { materialConstantsRoughness = roughness; ++materialConstantsSerial; } - public static final void setMetalnessConstant(float metalness) { + public static void setMetalnessConstant(float metalness) { materialConstantsMetalness = metalness; ++materialConstantsSerial; } - public static final void setEmissionConstant(float emission) { + public static void setEmissionConstant(float emission) { materialConstantsEmission = emission; ++materialConstantsSerial; } - public static final void setBlockConstant(int blockId) { + public static void setSubsurfScatteringConstant(float sss) { + materialConstantsSubsurfScatting = sss; + ++materialConstantsSerial; + } + + public static void setBlockConstant(int blockId) { constantBlock = blockId; } - public static final AxisAlignedBB getShadowMapBounds() { + public static AxisAlignedBB getShadowMapBounds() { return shadowMapBounds; } - public static final void setShadowMapBounds(AxisAlignedBB newShadowMapBounds) { + public static void setShadowMapBounds(AxisAlignedBB newShadowMapBounds) { shadowMapBounds = newShadowMapBounds; } - public static final void loadGBufferViewMatrix() { + public static void loadGBufferViewMatrix() { loadPassViewMatrix(); viewMatrix.load(passViewMatrix); inverseViewMatrix.load(passInverseViewMatrix); @@ -322,7 +330,7 @@ public class DeferredStateManager { projMatrixSerial = passProjMatrixSerial; } - public static final void loadPassViewMatrix() { + public static void loadPassViewMatrix() { GlStateManager.getFloat(GL_MODELVIEW_MATRIX, matrixCopyBuffer); passViewMatrix.load(matrixCopyBuffer); Matrix4f.invert(passViewMatrix, passInverseViewMatrix); @@ -337,7 +345,7 @@ public class DeferredStateManager { ++passProjMatrixSerial; } - public static final void loadShadowPassViewMatrix() { + public static void loadShadowPassViewMatrix() { GlStateManager.getFloat(GL_PROJECTION_MATRIX, matrixCopyBuffer); passViewMatrix.load(matrixCopyBuffer); Matrix4f.invert(passViewMatrix, passInverseViewMatrix); @@ -346,7 +354,7 @@ public class DeferredStateManager { isShadowPassMatrixLoaded = true; } - public static final void setPassMatrixToGBuffer() { + public static void setPassMatrixToGBuffer() { passViewMatrix.load(viewMatrix); passInverseViewMatrix.load(inverseViewMatrix); passProjMatrix.load(projMatrix); @@ -377,39 +385,39 @@ public class DeferredStateManager { } } - public static final void loadSunShadowMatrixLOD0() { + public static void loadSunShadowMatrixLOD0() { GlStateManager.getFloat(GL_PROJECTION_MATRIX, matrixCopyBuffer); sunShadowMatrix0.load(matrixCopyBuffer); } - public static final void loadSunShadowMatrixLOD1() { + public static void loadSunShadowMatrixLOD1() { GlStateManager.getFloat(GL_PROJECTION_MATRIX, matrixCopyBuffer); sunShadowMatrix1.load(matrixCopyBuffer); } - public static final void loadSunShadowMatrixLOD2() { + public static void loadSunShadowMatrixLOD2() { GlStateManager.getFloat(GL_PROJECTION_MATRIX, matrixCopyBuffer); sunShadowMatrix2.load(matrixCopyBuffer); } - public static final Matrix4f getSunShadowMatrixLOD0() { + public static Matrix4f getSunShadowMatrixLOD0() { return sunShadowMatrix0; } - public static final Matrix4f getSunShadowMatrixLOD1() { + public static Matrix4f getSunShadowMatrixLOD1() { return sunShadowMatrix1; } - public static final Matrix4f getSunShadowMatrixLOD2() { + public static Matrix4f getSunShadowMatrixLOD2() { return sunShadowMatrix2; } - public static final void setGBufferNearFarPlanes(float zNear, float zFar) { + public static void setGBufferNearFarPlanes(float zNear, float zFar) { gbufferNearPlane = zNear; gbufferFarPlane = zFar; } - public static final void setWaterWindOffset(float sx, float sy, float fx, float fy) { + public static void setWaterWindOffset(float sx, float sy, float fx, float fy) { ++waterWindOffsetSerial; u_waterWindOffset4f.x = sx; u_waterWindOffset4f.y = sy; @@ -434,7 +442,7 @@ public class DeferredStateManager { static float fogColorDarkB = 1.0f; static float fogColorDarkA = 1.0f; - public static final void enableFogLinear(float near, float far, boolean atmosphere, float colorLightR, + public static void enableFogLinear(float near, float far, boolean atmosphere, float colorLightR, float colorLightG, float colorLightB, float colorLightA, float colorDarkR, float colorDarkG, float colorDarkB, float colorDarkA) { fogLinearExp = atmosphere ? 5 : 1; @@ -450,7 +458,7 @@ public class DeferredStateManager { fogColorDarkA = colorDarkA; } - public static final void enableFogExp(float density, boolean atmosphere, float colorLightR, float colorLightG, + public static void enableFogExp(float density, boolean atmosphere, float colorLightR, float colorLightG, float colorLightB, float colorLightA, float colorDarkR, float colorDarkG, float colorDarkB, float colorDarkA) { fogLinearExp = atmosphere ? 6 : 2; @@ -465,11 +473,11 @@ public class DeferredStateManager { fogColorDarkA = colorDarkA; } - public static final void disableFog() { + public static void disableFog() { fogLinearExp = 0; } - public static final void disableAll() { + public static void disableAll() { enableMaterialMapTexture = false; materialConstantsUseEnvMap = false; enableForwardRender = false; @@ -502,4 +510,4 @@ public class DeferredStateManager { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DynamicLightInstance.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DynamicLightInstance.java index f270868..e2d93b1 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DynamicLightInstance.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DynamicLightInstance.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.EagRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; + class DynamicLightInstance { public final String lightName; @@ -55,4 +56,4 @@ class DynamicLightInstance { return radius; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DynamicLightManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DynamicLightManager.java index bfccf16..c8ea14e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DynamicLightManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/DynamicLightManager.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.EagRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; + public class DynamicLightManager { static final Map lightRenderers = new HashMap<>(); @@ -75,4 +76,4 @@ public class DynamicLightManager { lightRenderers.clear(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/EaglerDeferredConfig.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/EaglerDeferredConfig.java index 8629218..2bf9e0a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/EaglerDeferredConfig.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/EaglerDeferredConfig.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; import java.io.IOException; @@ -13,21 +29,6 @@ import net.minecraft.client.resources.IResource; import net.minecraft.client.resources.IResourceManager; import net.minecraft.util.ResourceLocation; -/** - * Copyright (c) 2023 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 EaglerDeferredConfig { public static final ResourceLocation shaderPackInfoFile = new ResourceLocation("eagler:glsl/deferred/shader_pack_info.json"); @@ -48,6 +49,7 @@ public class EaglerDeferredConfig { public boolean lensFlares = true; public boolean bloom = false; public boolean fxaa = true; + public boolean subsurfaceScattering = true; public boolean is_rendering_wavingBlocks = true; public boolean is_rendering_dynamicLights = true; @@ -64,6 +66,7 @@ public class EaglerDeferredConfig { public boolean is_rendering_lensFlares = true; public boolean is_rendering_bloom = false; public boolean is_rendering_fxaa = true; + public boolean is_rendering_subsurfaceScattering = true; public void readOption(String key, String value) { switch(key) { @@ -109,6 +112,9 @@ public class EaglerDeferredConfig { case "shaders_deferred_fxaa": fxaa = value.equals("true"); break; + case "shaders_deferred_subsurfaceScattering": + subsurfaceScattering = value.equals("true"); + break; default: break; } @@ -129,6 +135,7 @@ public class EaglerDeferredConfig { output.println("shaders_deferred_lensFlares:" + lensFlares); output.println("shaders_deferred_bloom:" + bloom); output.println("shaders_deferred_fxaa:" + fxaa); + output.println("shaders_deferred_subsurfaceScattering:" + subsurfaceScattering); } public void reloadShaderPackInfo(IResourceManager mgr) throws IOException { @@ -158,6 +165,7 @@ public class EaglerDeferredConfig { is_rendering_lensFlares = lensFlares && shaderPackInfo.POST_LENS_FLARES; is_rendering_bloom = bloom && shaderPackInfo.POST_BLOOM; is_rendering_fxaa = fxaa && shaderPackInfo.POST_FXAA; + is_rendering_subsurfaceScattering = subsurfaceScattering && is_rendering_shadowsSun_clamped > 0 && shaderPackInfo.SUBSURFACE_SCATTERING; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/EaglerDeferredPipeline.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/EaglerDeferredPipeline.java index 659d9c8..b9d053d 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/EaglerDeferredPipeline.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/EaglerDeferredPipeline.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; import net.lax1dude.eaglercraft.v1_8.EagRuntime; @@ -43,6 +59,7 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderS import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderSkyboxIrradiance; import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderSkyboxRender; import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderSkyboxRenderEnd; +import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderSubsurfaceScattering; import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderTonemap; import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderMissingException; import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.MetalsLUT; @@ -72,21 +89,6 @@ import java.util.Comparator; import java.util.Iterator; import java.util.List; -/** - * Copyright (c) 2023-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 EaglerDeferredPipeline { public static final Logger logger = LogManager.getLogger("EaglerDeferredPipeline"); @@ -149,6 +151,9 @@ public class EaglerDeferredPipeline { public IFramebufferGL sunLightingShadowFramebuffer = null; public int sunLightingShadowTexture = -1; + public IFramebufferGL subsurfaceScatteringFramebuffer = null; + public int subsurfaceScatteringTexture = -1; + public IFramebufferGL ssaoGenerateFramebuffer = null; public int ssaoGenerateTexture = -1; @@ -156,6 +161,9 @@ public class EaglerDeferredPipeline { public int ssaoNoiseTexture = -1; + public IFramebufferGL skyFramebuffer = null; + public int skyTexture = -1; + public IFramebufferGL lightingHDRFramebuffer = null; public int lightingHDRFramebufferColorTexture = -1; public int lightingHDRFramebufferDepthTexture = -1; @@ -296,6 +304,7 @@ public class EaglerDeferredPipeline { public PipelineShaderRealisticWaterNormalsMix shader_realistic_water_normals_mix = null; public PipelineShaderHandDepthMask shader_hand_depth_mask = null; public PipelineShaderFXAA shader_post_fxaa = null; + public PipelineShaderSubsurfaceScattering shader_subsurface_scattering = null; public SkyboxRenderer skybox = null; public LightSourceMesh pointLightMesh = null; public final GBufferAcceleratedEffectRenderer gbufferEffectRenderer = new GBufferAcceleratedEffectRenderer(); @@ -455,6 +464,16 @@ public class EaglerDeferredPipeline { GlStateManager.bindTexture(sunLightingShadowTexture); setNearest(); _wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, EaglercraftGPU.getNativeTexture(sunLightingShadowTexture), 0); + if(config.is_rendering_subsurfaceScattering) { + shader_subsurface_scattering = PipelineShaderSubsurfaceScattering.compile(lods, sunShadowDepthBufferRes, sunShadowDepthBufferRes * lods); + shader_subsurface_scattering.loadUniforms(); + subsurfaceScatteringFramebuffer = _wglCreateFramebuffer(); + _wglBindFramebuffer(_GL_FRAMEBUFFER, subsurfaceScatteringFramebuffer); + subsurfaceScatteringTexture = GlStateManager.generateTexture(); + GlStateManager.bindTexture(subsurfaceScatteringTexture); + setNearest(); + _wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, EaglercraftGPU.getNativeTexture(subsurfaceScatteringTexture), 0); + } if(config.is_rendering_shadowsColored) { sunShadowColorFramebuffer = _wglCreateFramebuffer(); _wglBindFramebuffer(_GL_FRAMEBUFFER, sunShadowColorFramebuffer); @@ -593,6 +612,13 @@ public class EaglerDeferredPipeline { setNearest(); _wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, EaglercraftGPU.getNativeTexture(lightingHDRFramebufferDepthTexture), 0); + skyFramebuffer = _wglCreateFramebuffer(); + _wglBindFramebuffer(_GL_FRAMEBUFFER, skyFramebuffer); + skyTexture = GlStateManager.generateTexture(); + GlStateManager.bindTexture(skyTexture); + setLinear(); + _wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, EaglercraftGPU.getNativeTexture(skyTexture), 0); + handRenderFramebuffer = _wglCreateFramebuffer(); _wglBindFramebuffer(_GL_FRAMEBUFFER, handRenderFramebuffer); GlStateManager.bindTexture(lightingHDRFramebufferColorTexture); @@ -640,7 +666,7 @@ public class EaglerDeferredPipeline { DeferredStateManager.checkGLError("Post: rebuild pipeline: dither8x8Texture"); shader_lighting_sun = PipelineShaderLightingSun.compile(shadowsSun ? config.is_rendering_shadowsSun_clamped : 0, - config.is_rendering_shadowsColored); + config.is_rendering_shadowsColored, config.is_rendering_subsurfaceScattering); shader_lighting_sun.loadUniforms(); if(shadowsSun) { shader_shadows_sun = PipelineShaderShadowsSun.compile(config.is_rendering_shadowsSun_clamped, @@ -1232,12 +1258,21 @@ public class EaglerDeferredPipeline { DeferredStateManager.checkGLError("Post: resize pipeline: lightShafts"); } + if(config.is_rendering_subsurfaceScattering) { + GlStateManager.bindTexture(subsurfaceScatteringTexture); + _wglTexImage2D(GL_TEXTURE_2D, 0, _GL_R8, reprojectionTexWidth, reprojectionTexHeight, 0, GL_RED, GL_UNSIGNED_BYTE, (ByteBuffer)null); + DeferredStateManager.checkGLError("Post: resize pipeline: subsurfaceScattering"); + } + GlStateManager.bindTexture(lightingHDRFramebufferColorTexture); EaglercraftGPU.createFramebufferHDR16FTexture(GL_TEXTURE_2D, 0, w, h, GL_RGBA, true); // USE RGBA! WebGL won't render to RGB16F GlStateManager.bindTexture(lightingHDRFramebufferDepthTexture); _wglTexImage2D(GL_TEXTURE_2D, 0, _GL_DEPTH_COMPONENT32F, w, h, 0, _GL_DEPTH_COMPONENT, GL_FLOAT, (ByteBuffer)null); + GlStateManager.bindTexture(skyTexture); + EaglercraftGPU.createFramebufferHDR16FTexture(GL_TEXTURE_2D, 0, reprojectionTexWidth, reprojectionTexHeight, GL_RGBA, true); + GlStateManager.bindTexture(handRenderFramebufferDepthTexture); _wglTexImage2D(GL_TEXTURE_2D, 0, _GL_DEPTH_COMPONENT32F, w, h, 0, _GL_DEPTH_COMPONENT, GL_FLOAT, (ByteBuffer)null); @@ -1366,8 +1401,8 @@ public class EaglerDeferredPipeline { resize(mc.displayWidth, mc.displayHeight); _wglBindFramebuffer(_GL_FRAMEBUFFER, gBufferFramebuffer); _wglDrawBuffers(gBufferDrawBuffers); - _wglClearColor(0.0f, 0.0f, 0.0f, 0.0f); - _wglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 0.0f); + GlStateManager.clear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f); GlStateManager.viewport(0, 0, currentWidth, currentHeight); GlStateManager.colorMask(true, true, true, true); @@ -1421,7 +1456,7 @@ public class EaglerDeferredPipeline { GlStateManager.clear(GL_DEPTH_BUFFER_BIT); } GlStateManager.enableCull(); - GlStateManager.cullFace(GL_FRONT); + //GlStateManager.cullFace(GL_FRONT); DeferredStateManager.enableShadowRender(); GlStateManager.colorMask(false, false, false, false); DeferredStateManager.checkGLError("Post: beginDrawMainShadowMap()"); @@ -1430,7 +1465,7 @@ public class EaglerDeferredPipeline { public void endDrawMainShadowMap() { DeferredStateManager.checkGLError("Pre: endDrawMainShadowMap()"); GlStateManager.viewport(0, 0, currentWidth, currentHeight); - GlStateManager.cullFace(GL_BACK); + //GlStateManager.cullFace(GL_BACK); DeferredStateManager.disableShadowRender(); GlStateManager.colorMask(true, true, true, true); DeferredStateManager.checkGLError("Post: endDrawMainShadowMap()"); @@ -1652,7 +1687,7 @@ public class EaglerDeferredPipeline { // =============== NETHER SKY REFLECTION MAP ================ // _wglBindFramebuffer(_GL_FRAMEBUFFER, envMapSkyFramebuffer); - GlStateManager.clearColor(0.55f, 0.25f, 0.05f, 1.0f); + GlStateManager.clearColor(0.055f, 0.025f, 0.005f, 1.0f); GlStateManager.clear(GL_COLOR_BUFFER_BIT); DeferredStateManager.checkGLError("combineGBuffersAndIlluminate(): NETHER SKY REFLECTION MAP"); @@ -1907,6 +1942,17 @@ public class EaglerDeferredPipeline { uniformMatrixHelper(shader_shadows_sun.uniforms.u_inverseViewMatrix4f, DeferredStateManager.inverseViewMatrix); uniformMatrixHelper(shader_shadows_sun.uniforms.u_inverseViewProjMatrix4f, tmpMatrixInverseViewProj); + Matrix4f.mul(tmpClipToTexSpaceMatLeft, DeferredStateManager.sunShadowMatrix0, tmpShadowLOD0MatrixTexSpace); + uniformMatrixHelper(shader_shadows_sun.uniforms.u_sunShadowMatrixLOD04f, tmpShadowLOD0MatrixTexSpace); + if(config.is_rendering_shadowsSun_clamped > 1) { + Matrix4f.mul(tmpClipToTexSpaceMatLeft, DeferredStateManager.sunShadowMatrix1, tmpShadowLOD1MatrixTexSpace); + uniformMatrixHelper(shader_shadows_sun.uniforms.u_sunShadowMatrixLOD14f, tmpShadowLOD1MatrixTexSpace); + if(config.is_rendering_shadowsSun_clamped > 2) { + Matrix4f.mul(tmpClipToTexSpaceMatLeft, DeferredStateManager.sunShadowMatrix2, tmpShadowLOD2MatrixTexSpace); + uniformMatrixHelper(shader_shadows_sun.uniforms.u_sunShadowMatrixLOD24f, tmpShadowLOD2MatrixTexSpace); + } + } + if(config.is_rendering_shadowsColored) { GlStateManager.setActiveTexture(GL_TEXTURE3); GlStateManager.bindTexture(sunShadowColorBuffer); @@ -1920,16 +1966,6 @@ public class EaglerDeferredPipeline { GlStateManager.bindTexture(gBufferDepthTexture); GlStateManager.setActiveTexture(GL_TEXTURE0); GlStateManager.bindTexture(gBufferNormalsTexture); - Matrix4f.mul(tmpClipToTexSpaceMatLeft, DeferredStateManager.sunShadowMatrix0, tmpShadowLOD0MatrixTexSpace); - uniformMatrixHelper(shader_shadows_sun.uniforms.u_sunShadowMatrixLOD04f, tmpShadowLOD0MatrixTexSpace); - if(config.is_rendering_shadowsSun_clamped > 1) { - Matrix4f.mul(tmpClipToTexSpaceMatLeft, DeferredStateManager.sunShadowMatrix1, tmpShadowLOD1MatrixTexSpace); - uniformMatrixHelper(shader_shadows_sun.uniforms.u_sunShadowMatrixLOD14f, tmpShadowLOD1MatrixTexSpace); - if(config.is_rendering_shadowsSun_clamped > 2) { - Matrix4f.mul(tmpClipToTexSpaceMatLeft, DeferredStateManager.sunShadowMatrix2, tmpShadowLOD2MatrixTexSpace); - uniformMatrixHelper(shader_shadows_sun.uniforms.u_sunShadowMatrixLOD24f, tmpShadowLOD2MatrixTexSpace); - } - } Vector3f currentSunShadowAngle = DeferredStateManager.currentSunLightAngle; _wglUniform3f(shader_shadows_sun.uniforms.u_sunDirection3f, -currentSunShadowAngle.x, -currentSunShadowAngle.y, -currentSunShadowAngle.z); @@ -1942,28 +1978,175 @@ public class EaglerDeferredPipeline { } DeferredStateManager.checkGLError("combineGBuffersAndIlluminate(): RENDER SUNLIGHT SHADOWS"); + + if(config.is_rendering_subsurfaceScattering && dim == 0) { + + // ==================== RENDER SUBSURFACE SCATTERING ===================== // + + _wglBindFramebuffer(_GL_FRAMEBUFFER, subsurfaceScatteringFramebuffer); + GlStateManager.viewport(0, 0, reprojectionTexWidth, reprojectionTexHeight); + + shader_subsurface_scattering.useProgram(); + uniformMatrixHelper(shader_subsurface_scattering.uniforms.u_inverseViewMatrix4f, DeferredStateManager.inverseViewMatrix); + uniformMatrixHelper(shader_subsurface_scattering.uniforms.u_inverseViewProjMatrix4f, tmpMatrixInverseViewProj); + + uniformMatrixHelper(shader_subsurface_scattering.uniforms.u_sunShadowMatrixLOD04f, tmpShadowLOD0MatrixTexSpace); + if(config.is_rendering_shadowsSun_clamped > 1) { + uniformMatrixHelper(shader_subsurface_scattering.uniforms.u_sunShadowMatrixLOD14f, tmpShadowLOD1MatrixTexSpace); + if(config.is_rendering_shadowsSun_clamped > 2) { + uniformMatrixHelper(shader_subsurface_scattering.uniforms.u_sunShadowMatrixLOD24f, tmpShadowLOD2MatrixTexSpace); + } + } + + _wglUniform3f(shader_subsurface_scattering.uniforms.u_sunDirection3f, -currentSunShadowAngle.x, -currentSunShadowAngle.y, -currentSunShadowAngle.z); + + GlStateManager.setActiveTexture(GL_TEXTURE3); + GlStateManager.bindTexture(sunShadowDepthBuffer); + _wglTexParameteri(GL_TEXTURE_2D, _GL_TEXTURE_COMPARE_MODE, GL_NONE); + GlStateManager.setActiveTexture(GL_TEXTURE2); + GlStateManager.bindTexture(gBufferMaterialTexture); + GlStateManager.setActiveTexture(GL_TEXTURE1); + GlStateManager.bindTexture(gBufferDepthTexture); + GlStateManager.setActiveTexture(GL_TEXTURE0); + GlStateManager.bindTexture(gBufferNormalsTexture); + + DrawUtils.drawStandardQuad2D(); + + GlStateManager.setActiveTexture(GL_TEXTURE3); + _wglTexParameteri(GL_TEXTURE_2D, _GL_TEXTURE_COMPARE_MODE, _GL_COMPARE_REF_TO_TEXTURE); + + DeferredStateManager.checkGLError("combineGBuffersAndIlluminate(): RENDER SUBSURFACE SCATTERING"); + } } - // ================ INITIALIZE HDR FRAMEBUFFER ================== // + // =================== RENDER SKYBOX MESH =================== // + + _wglBindFramebuffer(_GL_FRAMEBUFFER, skyFramebuffer); + GlStateManager.viewport(0, 0, reprojectionTexWidth, reprojectionTexHeight); + + if(dim == 0) { + GlStateManager.disableDepth(); + GlStateManager.setActiveTexture(GL_TEXTURE3); + GlStateManager.bindTexture(gBufferDepthTexture); + GlStateManager.setActiveTexture(GL_TEXTURE2); + GlStateManager.bindTexture(CloudRenderWorker.cloudOcclusionTexture); + GlStateManager.setActiveTexture(GL_TEXTURE1); + CloudRenderWorker.bindParaboloid(); + GlStateManager.setActiveTexture(GL_TEXTURE0); + GlStateManager.bindTexture(atmosphereHDRFramebufferColorTexture); + shader_skybox_render.useProgram(); + uniformMatrixHelper(shader_skybox_render.uniforms.u_viewMatrix4f, DeferredStateManager.viewMatrix); + uniformMatrixHelper(shader_skybox_render.uniforms.u_projMatrix4f, DeferredStateManager.projMatrix); + _wglUniform3f(shader_skybox_render.uniforms.u_sunDirection3f, -currentSunAngle.x, -currentSunAngle.y, -currentSunAngle.z); + float mag = 25.0f; + float[] sunRGB2 = TemperaturesLUT.getColorTemperature((int)sunKelvin - 1000); + _wglUniform3f(shader_skybox_render.uniforms.u_sunColor3f, sunRGB2[0] * mag, sunRGB2[1] * mag, sunRGB2[2] * mag); + if (mc.theWorld.getLastLightningBolt() > 0) { + float f = 0.3f + fff; + _wglUniform4f(shader_skybox_render.uniforms.u_lightningColor4f, 0.02f * f, 0.02f * f, 0.02f * f, 1.0f - f * 0.25f); + }else { + _wglUniform4f(shader_skybox_render.uniforms.u_lightningColor4f, 0.0f, 0.0f, 0.0f, 1.0f); + } + skybox.drawFull(); + + DeferredStateManager.checkGLError("combineGBuffersAndIlluminate(): RENDER SKYBOX MESH"); + }else if(dim == 1) { + GlStateManager.disableDepth(); + + GlStateManager.setActiveTexture(GL_TEXTURE0); + mc.getTextureManager().bindTexture(locationEndSkyPng); + + if(shader_skybox_render_end == null) { + shader_skybox_render_end = PipelineShaderSkyboxRenderEnd.compile(); + shader_skybox_render_end.loadUniforms(); + } + + shader_skybox_render_end.useProgram(); + uniformMatrixHelper(shader_skybox_render_end.uniforms.u_viewMatrix4f, DeferredStateManager.viewMatrix); + uniformMatrixHelper(shader_skybox_render_end.uniforms.u_projMatrix4f, DeferredStateManager.projMatrix); + _wglUniform2f(shader_skybox_render_end.uniforms.u_skyTextureScale2f, 4.0f, 4.0f); + + skybox.drawFull(); + + DeferredStateManager.checkGLError("combineGBuffersAndIlluminate(): RENDER SKYBOX MESH"); + }else if(dim == -1) { + GlStateManager.clearColor(0.055f, 0.025f, 0.005f, 1.0f); + GlStateManager.clear(GL_COLOR_BUFFER_BIT); + } + + // ================ INITIALIZE DEPTH BUFFER ================== // - GlStateManager.viewport(0, 0, currentWidth, currentHeight); _wglBindFramebuffer(_GL_READ_FRAMEBUFFER, gBufferFramebuffer); _wglBindFramebuffer(_GL_DRAW_FRAMEBUFFER, lightingHDRFramebuffer); _wglBlitFramebuffer(0, 0, currentWidth, currentHeight, 0, 0, currentWidth, currentHeight, GL_DEPTH_BUFFER_BIT, GL_NEAREST); _wglBindFramebuffer(_GL_FRAMEBUFFER, lightingHDRFramebuffer); - if(dim == -1) { - float f = 0.13f; - GlStateManager.clearColor(0.57f * 0.57f * f, 0.38f * 0.38f * f, 0.20f * 0.20f * f, 0.0f); - }else { - GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 0.0f); - } - GlStateManager.clear(GL_COLOR_BUFFER_BIT); + DeferredStateManager.checkGLError("combineGBuffersAndIlluminate(): INITIALIZE DEPTH BUFFER"); - DeferredStateManager.checkGLError("combineGBuffersAndIlluminate(): INITIALIZE HDR FRAMEBUFFER"); + // ===================== COPY SKY TEXTURE ====================== // + + _wglBindFramebuffer(_GL_FRAMEBUFFER, lightingHDRFramebuffer); + GlStateManager.viewport(0, 0, currentWidth, currentHeight); + + GlStateManager.setActiveTexture(GL_TEXTURE0); + GlStateManager.bindTexture(skyTexture); + TextureCopyUtil.blitTexture(); + + if(dim == 0 && fff < 1.0f) { + + // ===================== RENDER MOON ====================== // + + GlStateManager.enableDepth(); + Matrix4f moonMatrix = tmpMatrix2; + moonMatrix.setIdentity(); + tmpVector3.set(-1.0f, -1.0f, 1.0f); + Matrix4f.scale(tmpVector3, moonMatrix, moonMatrix); + tmpVector3.set(0.0f, 0.0f, 1.0f); + Matrix4f.rotate(2.7f, tmpVector3, moonMatrix, moonMatrix); + tmpVector3.set(-1.0f, 0.0f, 0.0f); + tmpVector4.set(currentSunAngle); + tmpVector4.scale(-1.0f); + Vector3f.cross(tmpVector3, tmpVector4, tmpVector1); + Vector3f.cross(tmpVector4, tmpVector1, tmpVector3); + moonMatrix = tmpMatrix1; + moonMatrix.setIdentity(); + moonMatrix.m00 = tmpVector1.x; + moonMatrix.m01 = tmpVector1.y; + moonMatrix.m02 = tmpVector1.z; + moonMatrix.m10 = tmpVector3.x; + moonMatrix.m11 = tmpVector3.y; + moonMatrix.m12 = tmpVector3.z; + moonMatrix.m20 = tmpVector4.x; + moonMatrix.m21 = tmpVector4.y; + moonMatrix.m22 = tmpVector4.z; + Matrix4f.mul(moonMatrix, tmpMatrix2, moonMatrix); + + GlStateManager.bindTexture(moonTextures); + shader_moon_render.useProgram(); + + uniformMatrixHelper(shader_moon_render.uniforms.u_modelMatrix4f, moonMatrix); + uniformMatrixHelper(shader_moon_render.uniforms.u_viewMatrix4f, DeferredStateManager.viewMatrix); + uniformMatrixHelper(shader_moon_render.uniforms.u_projMatrix4f, DeferredStateManager.projMatrix); + float fffff = 0.1f + MathHelper.clamp_float((-currentSunAngle.y + 0.1f) * 6.0f, 0.0f, 0.375f); + _wglUniform3f(shader_moon_render.uniforms.u_moonColor3f, 1.4f * fffff, 1.2f * fffff, 1.0f * fffff); + + float f = (float)(Minecraft.getMinecraft().theWorld.getWorldTime() - 18000f) / 24000f / 4f * 3.14159f; + _wglUniform3f(shader_moon_render.uniforms.u_lightDir3f, MathHelper.sin(f), 0.0f, MathHelper.cos(f)); + + GlStateManager.enableBlend(); + GlStateManager.tryBlendFuncSeparate(GL_ONE, GL_ONE, GL_ZERO, GL_ZERO); + + DrawUtils.drawStandardQuad2D(); + + GlStateManager.disableDepth(); + + DeferredStateManager.checkGLError("combineGBuffersAndIlluminate(): RENDER MOON"); + } // ================= RENDER AMBIENT LIGHTING ==================== // + GlStateManager.disableBlend(); + GlStateManager.setActiveTexture(GL_TEXTURE9); GlStateManager.bindTexture(MetalsLUT.getGLTexture()); GlStateManager.setActiveTexture(GL_TEXTURE8); @@ -2019,6 +2202,11 @@ public class EaglerDeferredPipeline { shader_lighting_sun.useProgram(); uniformMatrixHelper(shader_lighting_sun.uniforms.u_inverseViewMatrix4f, DeferredStateManager.inverseViewMatrix); uniformMatrixHelper(shader_lighting_sun.uniforms.u_inverseProjectionMatrix4f, DeferredStateManager.inverseProjMatrix); + if(config.is_rendering_subsurfaceScattering) { + GlStateManager.setActiveTexture(GL_TEXTURE6); + GlStateManager.bindTexture(subsurfaceScatteringTexture); + } + _wglTexParameteri(GL_TEXTURE_2D, _GL_TEXTURE_COMPARE_MODE, GL_NONE); GlStateManager.setActiveTexture(GL_TEXTURE5); GlStateManager.bindTexture(MetalsLUT.getGLTexture()); GlStateManager.setActiveTexture(GL_TEXTURE4); @@ -2028,7 +2216,7 @@ public class EaglerDeferredPipeline { GlStateManager.bindTexture(-1); } GlStateManager.setActiveTexture(GL_TEXTURE0); - + float ffff = getSkyBrightnessParam(); float[] sunRGB; if(currentSunAngle.y < 0.05f) { @@ -2046,11 +2234,11 @@ public class EaglerDeferredPipeline { currentSunLightColor3f.z = sunRGB[2] * 0.3f * (0.2f + ffff * 0.8f); _wglUniform3f(shader_lighting_sun.uniforms.u_sunColor3f, sunRGB[0] * 0.1f * (0.5f + ffff * 0.5f), sunRGB[1] * 0.1f * (0.5f + ffff * 0.5f), sunRGB[2] * 0.1f * (0.5f + ffff * 0.5f)); } - + _wglUniform3f(shader_lighting_sun.uniforms.u_sunDirection3f, -DeferredStateManager.currentSunLightAngle.x, -DeferredStateManager.currentSunLightAngle.y, -DeferredStateManager.currentSunLightAngle.z); - + DrawUtils.drawStandardQuad2D(); - + DeferredStateManager.checkGLError("combineGBuffersAndIlluminate(): RENDER SUNLIGHT"); }else { DeferredStateManager.currentSunLightColor.set(0.0f, 0.0f, 0.0f); @@ -2123,101 +2311,6 @@ public class EaglerDeferredPipeline { _wglBindFramebuffer(_GL_FRAMEBUFFER, lightingHDRFramebuffer); - // =================== RENDER SKYBOX MESH =================== // - - if(dim == 0) { - GlStateManager.enableDepth(); - GlStateManager.setActiveTexture(GL_TEXTURE2); - GlStateManager.bindTexture(CloudRenderWorker.cloudOcclusionTexture); - GlStateManager.setActiveTexture(GL_TEXTURE1); - CloudRenderWorker.bindParaboloid(); - GlStateManager.setActiveTexture(GL_TEXTURE0); - GlStateManager.bindTexture(atmosphereHDRFramebufferColorTexture); - shader_skybox_render.useProgram(); - uniformMatrixHelper(shader_skybox_render.uniforms.u_viewMatrix4f, DeferredStateManager.viewMatrix); - uniformMatrixHelper(shader_skybox_render.uniforms.u_projMatrix4f, DeferredStateManager.projMatrix); - _wglUniform3f(shader_skybox_render.uniforms.u_sunDirection3f, -currentSunAngle.x, -currentSunAngle.y, -currentSunAngle.z); - float mag = 25.0f; - float[] sunRGB2 = TemperaturesLUT.getColorTemperature((int)sunKelvin - 1000); - _wglUniform3f(shader_skybox_render.uniforms.u_sunColor3f, sunRGB2[0] * mag, sunRGB2[1] * mag, sunRGB2[2] * mag); - if (mc.theWorld.getLastLightningBolt() > 0) { - float f = 0.3f + fff; - _wglUniform4f(shader_skybox_render.uniforms.u_lightningColor4f, 0.02f * f, 0.02f * f, 0.02f * f, 1.0f - f * 0.25f); - }else { - _wglUniform4f(shader_skybox_render.uniforms.u_lightningColor4f, 0.0f, 0.0f, 0.0f, 1.0f); - } - skybox.drawFull(); - - DeferredStateManager.checkGLError("combineGBuffersAndIlluminate(): RENDER SKYBOX MESH"); - }else if(dim == 1) { - GlStateManager.enableDepth(); - - GlStateManager.setActiveTexture(GL_TEXTURE0); - mc.getTextureManager().bindTexture(locationEndSkyPng); - - if(shader_skybox_render_end == null) { - shader_skybox_render_end = PipelineShaderSkyboxRenderEnd.compile(); - shader_skybox_render_end.loadUniforms(); - } - - shader_skybox_render_end.useProgram(); - uniformMatrixHelper(shader_skybox_render_end.uniforms.u_viewMatrix4f, DeferredStateManager.viewMatrix); - uniformMatrixHelper(shader_skybox_render_end.uniforms.u_projMatrix4f, DeferredStateManager.projMatrix); - _wglUniform2f(shader_skybox_render_end.uniforms.u_skyTextureScale2f, 4.0f, 4.0f); - - skybox.drawFull(); - - DeferredStateManager.checkGLError("combineGBuffersAndIlluminate(): RENDER SKYBOX MESH"); - } - - if(dim == 0 && fff < 1.0f) { - - // ===================== RENDER MOON ====================== // - - Matrix4f moonMatrix = tmpMatrix2; - moonMatrix.setIdentity(); - tmpVector3.set(-1.0f, -1.0f, 1.0f); - Matrix4f.scale(tmpVector3, moonMatrix, moonMatrix); - tmpVector3.set(0.0f, 0.0f, 1.0f); - Matrix4f.rotate(2.7f, tmpVector3, moonMatrix, moonMatrix); - tmpVector3.set(-1.0f, 0.0f, 0.0f); - tmpVector4.set(currentSunAngle); - tmpVector4.scale(-1.0f); - Vector3f.cross(tmpVector3, tmpVector4, tmpVector1); - Vector3f.cross(tmpVector4, tmpVector1, tmpVector3); - moonMatrix = tmpMatrix1; - moonMatrix.setIdentity(); - moonMatrix.m00 = tmpVector1.x; - moonMatrix.m01 = tmpVector1.y; - moonMatrix.m02 = tmpVector1.z; - moonMatrix.m10 = tmpVector3.x; - moonMatrix.m11 = tmpVector3.y; - moonMatrix.m12 = tmpVector3.z; - moonMatrix.m20 = tmpVector4.x; - moonMatrix.m21 = tmpVector4.y; - moonMatrix.m22 = tmpVector4.z; - Matrix4f.mul(moonMatrix, tmpMatrix2, moonMatrix); - - GlStateManager.bindTexture(moonTextures); - shader_moon_render.useProgram(); - - uniformMatrixHelper(shader_moon_render.uniforms.u_modelMatrix4f, moonMatrix); - uniformMatrixHelper(shader_moon_render.uniforms.u_viewMatrix4f, DeferredStateManager.viewMatrix); - uniformMatrixHelper(shader_moon_render.uniforms.u_projMatrix4f, DeferredStateManager.projMatrix); - float fffff = 0.1f + MathHelper.clamp_float((-currentSunAngle.y + 0.1f) * 8.0f, 0.0f, 0.5f); - _wglUniform3f(shader_moon_render.uniforms.u_moonColor3f, 1.4f * fffff, 1.2f * fffff, 1.0f * fffff); - - float f = (float)(Minecraft.getMinecraft().theWorld.getWorldTime() - 18000f) / 24000f / 4f * 3.14159f; - _wglUniform3f(shader_moon_render.uniforms.u_lightDir3f, MathHelper.sin(f), 0.0f, MathHelper.cos(f)); - - GlStateManager.enableBlend(); - GlStateManager.tryBlendFuncSeparate(GL_ONE, GL_ONE, GL_ZERO, GL_ZERO); - - DrawUtils.drawStandardQuad2D(); - - DeferredStateManager.checkGLError("combineGBuffersAndIlluminate(): RENDER MOON"); - } - GlStateManager.disableDepth(); GlStateManager.depthMask(true); GlStateManager.disableBlend(); @@ -2882,6 +2975,8 @@ public class EaglerDeferredPipeline { _wglBindFramebuffer(_GL_DRAW_FRAMEBUFFER, fogDepthCopyBuffer); _wglBlitFramebuffer(0, 0, currentWidth, currentHeight, 0, 0, currentWidth, currentHeight, GL_DEPTH_BUFFER_BIT, GL_NEAREST); _wglBindFramebuffer(_GL_FRAMEBUFFER, lightingHDRFramebuffer); + GlStateManager.setActiveTexture(GL_TEXTURE5); + GlStateManager.bindTexture(skyTexture); if(config.is_rendering_lightShafts) { GlStateManager.setActiveTexture(GL_TEXTURE4); GlStateManager.bindTexture(lightShaftsTexture); @@ -3037,6 +3132,10 @@ public class EaglerDeferredPipeline { public void beginDrawTranslucentEntities() { DeferredStateManager.checkGLError("Pre: beginDrawTranslucentEntities()"); + if(config.is_rendering_useEnvMap) { + GlStateManager.setActiveTexture(GL_TEXTURE5); + GlStateManager.bindTexture(envMapColorTexture); + } GlStateManager.setActiveTexture(GL_TEXTURE4); if(config.is_rendering_shadowsSun_clamped > 0) { GlStateManager.bindTexture(sunShadowDepthBuffer); @@ -3558,6 +3657,14 @@ public class EaglerDeferredPipeline { GlStateManager.deleteTexture(sunLightingShadowTexture); sunLightingShadowTexture = -1; } + if(subsurfaceScatteringFramebuffer != null) { + _wglDeleteFramebuffer(subsurfaceScatteringFramebuffer); + subsurfaceScatteringFramebuffer = null; + } + if(subsurfaceScatteringTexture != -1) { + GlStateManager.deleteTexture(subsurfaceScatteringTexture); + subsurfaceScatteringTexture = -1; + } if(ssaoGenerateFramebuffer != null) { _wglDeleteFramebuffer(ssaoGenerateFramebuffer); ssaoGenerateFramebuffer = null; @@ -3626,6 +3733,14 @@ public class EaglerDeferredPipeline { GlStateManager.deleteTexture(lastFrameGBufferDepthTexture); lastFrameGBufferDepthTexture = -1; } + if(skyFramebuffer != null) { + _wglDeleteFramebuffer(skyFramebuffer); + skyFramebuffer = null; + } + if(skyTexture != -1) { + GlStateManager.deleteTexture(skyTexture); + skyTexture = -1; + } if(lightingHDRFramebuffer != null) { _wglDeleteFramebuffer(lightingHDRFramebuffer); lightingHDRFramebuffer = null; @@ -3886,6 +4001,10 @@ public class EaglerDeferredPipeline { shader_post_fxaa.destroy(); shader_post_fxaa = null; } + if(shader_subsurface_scattering != null) { + shader_subsurface_scattering.destroy(); + shader_subsurface_scattering = null; + } if(shader_skybox_render_paraboloid != null) { shader_skybox_render_paraboloid.destroy(); shader_skybox_render_paraboloid = null; @@ -4068,11 +4187,11 @@ public class EaglerDeferredPipeline { } } - public static final boolean isSupported() { + public static boolean isSupported() { return EaglercraftGPU.checkOpenGLESVersion() >= 300 && EaglercraftGPU.checkHasHDRFramebufferSupportWithFilter(); } - public static final String getReasonUnsupported() { + public static String getReasonUnsupported() { if(EaglercraftGPU.checkOpenGLESVersion() < 300) { return I18n.format("shaders.gui.unsupported.reason.oldOpenGLVersion"); }else if(!EaglercraftGPU.checkHasHDRFramebufferSupportWithFilter()) { @@ -4082,7 +4201,7 @@ public class EaglerDeferredPipeline { } } - public static final void renderSuspended() { + public static void renderSuspended() { _wglBindFramebuffer(_GL_FRAMEBUFFER, null); GlStateManager.globalEnableBlend(); Minecraft mc = Minecraft.getMinecraft(); @@ -4115,4 +4234,4 @@ public class EaglerDeferredPipeline { GlStateManager.popMatrix(); EagUtils.sleep(10); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ExtGLEnums.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ExtGLEnums.java index 393f164..461b2d2 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ExtGLEnums.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ExtGLEnums.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + public class ExtGLEnums { public static final int _GL_FRAMEBUFFER = 0x8D40; @@ -39,4 +40,4 @@ public class ExtGLEnums { public static final int _GL_TEXTURE_COMPARE_FUNC = 0x884D; public static final int _GL_COMPARE_REF_TO_TEXTURE = 0x884E; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ForwardAcceleratedEffectRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ForwardAcceleratedEffectRenderer.java index aad8490..963abb8 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ForwardAcceleratedEffectRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ForwardAcceleratedEffectRenderer.java @@ -1,23 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; -import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderAccelParticleForward; -import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -32,6 +13,26 @@ import net.minecraft.util.MathHelper; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; +import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderAccelParticleForward; +import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.util.MathHelper; + public class ForwardAcceleratedEffectRenderer extends AbstractAcceleratedEffectRenderer { private static final Logger logger = LogManager.getLogger("ForwardAcceleratedEffectRenderer"); @@ -45,7 +46,7 @@ public class ForwardAcceleratedEffectRenderer extends AbstractAcceleratedEffectR private PipelineShaderAccelParticleForward shaderProgram = null; - private IBufferArrayGL vertexArray = null; + private IVertexArrayGL vertexArray = null; private IBufferGL vertexBuffer = null; private IBufferGL instancesBuffer = null; @@ -79,7 +80,7 @@ public class ForwardAcceleratedEffectRenderer extends AbstractAcceleratedEffectR }); verts.flip(); - EaglercraftGPU.bindGLBufferArray(vertexArray); + EaglercraftGPU.bindGLVertexArray(vertexArray); EaglercraftGPU.bindGLArrayBuffer(vertexBuffer); _wglBufferData(GL_ARRAY_BUFFER, verts, GL_STATIC_DRAW); @@ -142,7 +143,7 @@ public class ForwardAcceleratedEffectRenderer extends AbstractAcceleratedEffectR EaglerDeferredPipeline.uniformMatrixHelper(shaderProgram.uniforms.u_inverseViewMatrix4f, DeferredStateManager.passInverseViewMatrix); EaglercraftGPU.bindGLArrayBuffer(instancesBuffer); - EaglercraftGPU.bindGLBufferArray(vertexArray); + EaglercraftGPU.bindGLVertexArray(vertexArray); int p = particleBuffer.position(); int l = particleBuffer.limit(); @@ -221,4 +222,4 @@ public class ForwardAcceleratedEffectRenderer extends AbstractAcceleratedEffectR instancesBuffer = null; } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ForwardRenderCallbackHandler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ForwardRenderCallbackHandler.java index c15531b..163fb88 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ForwardRenderCallbackHandler.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ForwardRenderCallbackHandler.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.List; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import java.util.List; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + public class ForwardRenderCallbackHandler { public final List renderPassList = new ArrayList<>(1024); @@ -51,4 +52,4 @@ public class ForwardRenderCallbackHandler { } }); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/GBufferAcceleratedEffectRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/GBufferAcceleratedEffectRenderer.java index c3cc059..ca56dfb 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/GBufferAcceleratedEffectRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/GBufferAcceleratedEffectRenderer.java @@ -1,23 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; -import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderAccelParticleGBuffer; -import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; -import net.minecraft.client.Minecraft; -import net.minecraft.entity.Entity; -import net.minecraft.util.MathHelper; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -32,6 +13,26 @@ import net.minecraft.util.MathHelper; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; +import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderAccelParticleGBuffer; +import net.lax1dude.eaglercraft.v1_8.vector.Matrix4f; +import net.minecraft.client.Minecraft; +import net.minecraft.entity.Entity; +import net.minecraft.util.MathHelper; + public class GBufferAcceleratedEffectRenderer extends AbstractAcceleratedEffectRenderer { private static final Logger logger = LogManager.getLogger("GBufferAcceleratedEffectRenderer"); @@ -45,7 +46,7 @@ public class GBufferAcceleratedEffectRenderer extends AbstractAcceleratedEffectR private PipelineShaderAccelParticleGBuffer shaderProgram = null; - private IBufferArrayGL vertexArray = null; + private IVertexArrayGL vertexArray = null; private IBufferGL vertexBuffer = null; private IBufferGL instancesBuffer = null; @@ -79,7 +80,7 @@ public class GBufferAcceleratedEffectRenderer extends AbstractAcceleratedEffectR }); verts.flip(); - EaglercraftGPU.bindGLBufferArray(vertexArray); + EaglercraftGPU.bindGLVertexArray(vertexArray); EaglercraftGPU.bindGLArrayBuffer(vertexBuffer); _wglBufferData(GL_ARRAY_BUFFER, verts, GL_STATIC_DRAW); @@ -141,7 +142,7 @@ public class GBufferAcceleratedEffectRenderer extends AbstractAcceleratedEffectR EaglerDeferredPipeline.uniformMatrixHelper(shaderProgram.uniforms.u_matrixTransform, tmpMatrix); EaglercraftGPU.bindGLArrayBuffer(instancesBuffer); - EaglercraftGPU.bindGLBufferArray(vertexArray); + EaglercraftGPU.bindGLVertexArray(vertexArray); int p = particleBuffer.position(); int l = particleBuffer.limit(); @@ -220,4 +221,4 @@ public class GBufferAcceleratedEffectRenderer extends AbstractAcceleratedEffectR instancesBuffer = null; } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/GBufferPipelineCompiler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/GBufferPipelineCompiler.java index d30bf75..4cacd89 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/GBufferPipelineCompiler.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/GBufferPipelineCompiler.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; @@ -18,21 +34,6 @@ import net.lax1dude.eaglercraft.v1_8.vector.Vector4f; import net.minecraft.client.Minecraft; import net.minecraft.client.renderer.GLAllocation; -/** - * Copyright (c) 2023 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 GBufferPipelineCompiler implements IExtPipelineCompiler { private static final Logger logger = LogManager.getLogger("DeferredGBufferPipelineCompiler"); @@ -127,6 +128,9 @@ public class GBufferPipelineCompiler implements IExtPipelineCompiler { if(conf.is_rendering_useEnvMap) { macros.append("#define COMPILE_PARABOLOID_ENV_MAP\n"); } + if(conf.is_rendering_subsurfaceScattering) { + macros.append("#define COMPILE_SUBSURFACE_SCATTERING\n"); + } } if(conf.is_rendering_dynamicLights) { macros.append("#define COMPILE_DYNAMIC_LIGHTS\n"); @@ -165,6 +169,9 @@ public class GBufferPipelineCompiler implements IExtPipelineCompiler { if((stateExtBits & STATE_WAVING_BLOCKS) != 0) { macros.append("#define COMPILE_STATE_WAVING_BLOCKS\n"); } + if(conf.is_rendering_subsurfaceScattering) { + macros.append("#define COMPILE_SUBSURFACE_SCATTERING\n"); + } logger.info("Compiling program for core state: {}, ext state: {}", visualizeBits(stateCoreBits), visualizeBits(stateExtBits)); logger.info(" - {}", ShaderSource.deferred_core_vsh); @@ -231,12 +238,24 @@ public class GBufferPipelineCompiler implements IExtPipelineCompiler { float roughness = 1.0f - DeferredStateManager.materialConstantsRoughness; float metalness = DeferredStateManager.materialConstantsMetalness; float emission = DeferredStateManager.materialConstantsEmission; - if(uniforms.materialConstantsRoughness != roughness || uniforms.materialConstantsMetalness != metalness - || uniforms.materialConstantsEmission != emission) { - uniforms.materialConstantsRoughness = roughness; - uniforms.materialConstantsMetalness = metalness; - uniforms.materialConstantsEmission = emission; - _wglUniform3f(uniforms.u_materialConstants3f, roughness, metalness, emission); + if(uniforms.u_materialConstants4f != null) { + float subsurfScattering = 1.0f - DeferredStateManager.materialConstantsSubsurfScatting; + if(uniforms.materialConstantsRoughness != roughness || uniforms.materialConstantsMetalness != metalness + || uniforms.materialConstantsEmission != emission || uniforms.materialConstantsSubsurfScattering != subsurfScattering) { + uniforms.materialConstantsRoughness = roughness; + uniforms.materialConstantsMetalness = metalness; + uniforms.materialConstantsEmission = emission; + uniforms.materialConstantsSubsurfScattering = subsurfScattering; + _wglUniform4f(uniforms.u_materialConstants4f, roughness, metalness, emission, subsurfScattering); + } + }else { + if(uniforms.materialConstantsRoughness != roughness || uniforms.materialConstantsMetalness != metalness + || uniforms.materialConstantsEmission != emission) { + uniforms.materialConstantsRoughness = roughness; + uniforms.materialConstantsMetalness = metalness; + uniforms.materialConstantsEmission = emission; + _wglUniform3f(uniforms.u_materialConstants3f, roughness, metalness, emission); + } } } } @@ -388,4 +407,4 @@ public class GBufferPipelineCompiler implements IExtPipelineCompiler { private static String visualizeBits(int bits) { return FixedFunctionPipeline.visualizeBits(bits); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/GBufferPipelineProgramInstance.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/GBufferPipelineProgramInstance.java index 0ede5e2..0a2d140 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/GBufferPipelineProgramInstance.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/GBufferPipelineProgramInstance.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.GBufferExtPipelineShader; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.GBufferExtPipel * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.GBufferExtPipelineShader; + public class GBufferPipelineProgramInstance { public final int coreState; @@ -29,4 +30,4 @@ public class GBufferPipelineProgramInstance { this.extState = extState; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/LensFlareMeshRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/LensFlareMeshRenderer.java index e1cc7b1..738b5f9 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/LensFlareMeshRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/LensFlareMeshRenderer.java @@ -1,27 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ExtGLEnums.*; - -import java.io.DataInputStream; -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; -import net.lax1dude.eaglercraft.v1_8.opengl.DrawUtils; -import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderLensFlares; -import net.lax1dude.eaglercraft.v1_8.vector.Matrix3f; -import net.lax1dude.eaglercraft.v1_8.vector.Vector3f; -import net.minecraft.client.Minecraft; -import net.minecraft.util.MathHelper; -import net.minecraft.util.ResourceLocation; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -36,16 +13,40 @@ import net.minecraft.util.ResourceLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ExtGLEnums.*; + +import java.io.DataInputStream; +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; +import net.lax1dude.eaglercraft.v1_8.opengl.DrawUtils; +import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.PipelineShaderLensFlares; +import net.lax1dude.eaglercraft.v1_8.vector.Matrix3f; +import net.lax1dude.eaglercraft.v1_8.vector.Vector3f; +import net.minecraft.client.Minecraft; +import net.minecraft.util.MathHelper; +import net.minecraft.util.ResourceLocation; + public class LensFlareMeshRenderer { public static final ResourceLocation streaksTextureLocation = new ResourceLocation("eagler:glsl/deferred/lens_streaks.bmp"); public static final ResourceLocation ghostsTextureLocation = new ResourceLocation("eagler:glsl/deferred/lens_ghosts.bmp"); public static final int ghostsSpriteCount = 4; - static IBufferArrayGL streaksVertexArray = null; + static IVertexArrayGL streaksVertexArray = null; static IBufferGL streaksVertexBuffer = null; - static IBufferArrayGL ghostsVertexArray = null; + static IVertexArrayGL ghostsVertexArray = null; static IBufferGL ghostsVertexBuffer = null; static PipelineShaderLensFlares streaksProgram = null; @@ -87,7 +88,7 @@ public class LensFlareMeshRenderer { _wglBufferData(GL_ARRAY_BUFFER, copyBuffer, GL_STATIC_DRAW); streaksVertexArray = _wglGenVertexArrays(); - EaglercraftGPU.bindGLBufferArray(streaksVertexArray); + EaglercraftGPU.bindGLVertexArray(streaksVertexArray); EaglercraftGPU.attachQuad16EmulationBuffer(16, true); _wglEnableVertexAttribArray(0); @@ -132,7 +133,7 @@ public class LensFlareMeshRenderer { copyBuffer.flip(); ghostsVertexArray = _wglGenVertexArrays(); - EaglercraftGPU.bindGLBufferArray(ghostsVertexArray); + EaglercraftGPU.bindGLVertexArray(ghostsVertexArray); EaglercraftGPU.bindGLArrayBuffer(DrawUtils.standardQuadVBO); _wglEnableVertexAttribArray(0); @@ -314,7 +315,7 @@ public class LensFlareMeshRenderer { mag = 0.003f * (1.0f + mag * mag * mag * 4.0f); _wglUniform3f(streaksProgram.uniforms.u_flareColor3f, v.x * mag * 0.5f, v.y * mag * 0.5f, v.z * mag * 0.5f); - EaglercraftGPU.bindGLBufferArray(streaksVertexArray); + EaglercraftGPU.bindGLVertexArray(streaksVertexArray); _wglDrawElements(GL_TRIANGLES, streaksVertexCount + (streaksVertexCount >> 1), GL_UNSIGNED_SHORT, 0); ghostsProgram.useProgram(); @@ -327,7 +328,7 @@ public class LensFlareMeshRenderer { _wglUniform2f(ghostsProgram.uniforms.u_sunPosition2f, sunScreenX, sunScreenY); _wglUniform1f(ghostsProgram.uniforms.u_baseScale1f, fov); - EaglercraftGPU.bindGLBufferArray(ghostsVertexArray); + EaglercraftGPU.bindGLVertexArray(ghostsVertexArray); _wglDrawArraysInstanced(GL_TRIANGLES, 0, 6, ghostsInstanceCount); GlStateManager.disableBlend(); @@ -367,4 +368,4 @@ public class LensFlareMeshRenderer { ghostsProgram = null; } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/LightSourceMesh.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/LightSourceMesh.java index 5b65ba6..fad7b8f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/LightSourceMesh.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/LightSourceMesh.java @@ -1,23 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ExtGLEnums.*; - -import java.io.DataInputStream; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.Arrays; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; -import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; -import net.minecraft.client.Minecraft; -import net.minecraft.util.ResourceLocation; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -32,6 +13,26 @@ import net.minecraft.util.ResourceLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ExtGLEnums.*; + +import java.io.DataInputStream; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; +import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; +import net.minecraft.client.Minecraft; +import net.minecraft.util.ResourceLocation; + public class LightSourceMesh { public final ResourceLocation meshLocation; @@ -39,7 +40,7 @@ public class LightSourceMesh { private IBufferGL meshVBO = null; private IBufferGL meshIBO = null; - private IBufferArrayGL meshVAO = null; + private IVertexArrayGL meshVAO = null; private int meshIndexType = -1; private int meshIndexCount = -1; @@ -101,7 +102,7 @@ public class LightSourceMesh { buf.flip(); meshVAO = _wglGenVertexArrays(); - EaglercraftGPU.bindGLBufferArray(meshVAO); + EaglercraftGPU.bindGLVertexArray(meshVAO); meshIBO = _wglGenBuffers(); _wglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, meshIBO); @@ -116,7 +117,7 @@ public class LightSourceMesh { } public void drawMeshVAO() { - EaglercraftGPU.bindGLBufferArray(meshVAO); + EaglercraftGPU.bindGLVertexArray(meshVAO); _wglDrawElements(GL_TRIANGLES, meshIndexCount, meshIndexType, 0); } @@ -134,4 +135,4 @@ public class LightSourceMesh { meshVAO = null; } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ListSerial.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ListSerial.java index fca9253..aed7362 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ListSerial.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ListSerial.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import java.util.List; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import java.util.List; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import java.util.List; + public interface ListSerial extends List { int getEaglerSerial(); @@ -27,4 +28,4 @@ public interface ListSerial extends List { boolean eaglerCheck(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/NameTagRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/NameTagRenderer.java index d5b7a41..73c8c36 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/NameTagRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/NameTagRenderer.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import net.minecraft.entity.Entity; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.minecraft.entity.Entity; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import net.minecraft.entity.Entity; + public class NameTagRenderer { public static boolean doRenderNameTags = false; @@ -51,4 +52,4 @@ public class NameTagRenderer { n.maxDistance = maxDistance; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ShaderPackInfo.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ShaderPackInfo.java index c781bec..2bb7bd0 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ShaderPackInfo.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ShaderPackInfo.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import java.util.HashSet; -import java.util.Set; - -import org.json.JSONArray; -import org.json.JSONException; -import org.json.JSONObject; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import org.json.JSONObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import java.util.HashSet; +import java.util.Set; + +import org.json.JSONArray; +import org.json.JSONException; +import org.json.JSONObject; + public class ShaderPackInfo { public final String name; @@ -45,6 +46,7 @@ public class ShaderPackInfo { public final boolean POST_LENS_FLARES; public final boolean POST_BLOOM; public final boolean POST_FXAA; + public final boolean SUBSURFACE_SCATTERING; public ShaderPackInfo(JSONObject json) { name = json.optString("name", "Untitled"); @@ -74,6 +76,7 @@ public class ShaderPackInfo { POST_LENS_FLARES = supportedFeatures.contains("POST_LENS_FLARES"); POST_BLOOM = supportedFeatures.contains("POST_BLOOM"); POST_FXAA = supportedFeatures.contains("POST_FXAA"); + SUBSURFACE_SCATTERING = supportedFeatures.contains("SUBSURFACE_SCATTERING"); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ShaderPackInfoReloadListener.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ShaderPackInfoReloadListener.java index 35f4ef4..a507d6f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ShaderPackInfoReloadListener.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ShaderPackInfoReloadListener.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.minecraft.client.Minecraft; -import net.minecraft.client.renderer.texture.TextureMap; -import net.minecraft.client.resources.IResourceManager; -import net.minecraft.client.resources.IResourceManagerReloadListener; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import net.minecraft.client.resources.IResourceManagerReloadListener; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.minecraft.client.Minecraft; +import net.minecraft.client.renderer.texture.TextureMap; +import net.minecraft.client.resources.IResourceManager; +import net.minecraft.client.resources.IResourceManagerReloadListener; + public class ShaderPackInfoReloadListener implements IResourceManagerReloadListener { private static final Logger logger = LogManager.getLogger(); @@ -45,4 +46,4 @@ public class ShaderPackInfoReloadListener implements IResourceManagerReloadListe } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ShadersRenderPassFuture.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ShadersRenderPassFuture.java index 253d7ca..0ac8485 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ShadersRenderPassFuture.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/ShadersRenderPassFuture.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; -import net.minecraft.entity.Entity; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.minecraft.entity.Entity; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; +import net.minecraft.entity.Entity; + public abstract class ShadersRenderPassFuture { public static enum PassType { @@ -65,4 +66,4 @@ public abstract class ShadersRenderPassFuture { public float[] tmpValue() { return tmp; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/SkyboxRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/SkyboxRenderer.java index 1afe0db..8acc0b7 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/SkyboxRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/SkyboxRenderer.java @@ -1,24 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ExtGLEnums.*; - -import java.io.DataInputStream; -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.util.Arrays; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; -import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.minecraft.client.Minecraft; -import net.minecraft.util.ResourceLocation; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -33,13 +13,34 @@ import net.minecraft.util.ResourceLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ExtGLEnums.*; + +import java.io.DataInputStream; +import java.io.IOException; +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; +import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.minecraft.client.Minecraft; +import net.minecraft.util.ResourceLocation; + public class SkyboxRenderer { public final ResourceLocation skyboxLocation; private IBufferGL skyboxVBO = null; private IBufferGL skyboxIBO = null; - private IBufferArrayGL skyboxVAO = null; + private IVertexArrayGL skyboxVAO = null; private int normalsLUT = -1; private int atmosphereLUTWidth = -1; private int atmosphereLUTHeight = -1; @@ -135,7 +136,7 @@ public class SkyboxRenderer { buf.flip(); skyboxVAO = _wglGenVertexArrays(); - EaglercraftGPU.bindGLBufferArray(skyboxVAO); + EaglercraftGPU.bindGLVertexArray(skyboxVAO); skyboxIBO = _wglGenBuffers(); _wglBindBuffer(GL_ELEMENT_ARRAY_BUFFER, skyboxIBO); @@ -165,17 +166,17 @@ public class SkyboxRenderer { } public void drawTop() { - EaglercraftGPU.bindGLBufferArray(skyboxVAO); + EaglercraftGPU.bindGLVertexArray(skyboxVAO); _wglDrawElements(GL_TRIANGLES, skyboxTopIndexCount, skyboxIndexType, skyboxTopIndexOffset * skyboxIndexStride); } public void drawBottom() { - EaglercraftGPU.bindGLBufferArray(skyboxVAO); + EaglercraftGPU.bindGLVertexArray(skyboxVAO); _wglDrawElements(GL_TRIANGLES, skyboxBottomIndexCount, skyboxIndexType, skyboxBottomIndexOffset * skyboxIndexStride); } public void drawFull() { - EaglercraftGPU.bindGLBufferArray(skyboxVAO); + EaglercraftGPU.bindGLVertexArray(skyboxVAO); _wglDrawElements(GL_TRIANGLES, skyboxIndexCount, skyboxIndexType, 0); } @@ -198,4 +199,4 @@ public class SkyboxRenderer { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/VertexMarkerState.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/VertexMarkerState.java index ed2e7fe..a4c0bc1 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/VertexMarkerState.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/VertexMarkerState.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred; + public class VertexMarkerState { public static float localCoordDeriveHackX = 1.0f; @@ -22,4 +23,4 @@ public class VertexMarkerState { public static float localCoordDeriveHackZ = 1.0f; public static int markId = 0; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/gui/GuiShaderConfig.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/gui/GuiShaderConfig.java index 4d8b481..dddc143 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/gui/GuiShaderConfig.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/gui/GuiShaderConfig.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui; - -import java.io.IOException; -import java.util.List; - -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.program.ShaderSource; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.FontRenderer; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui; + +import java.io.IOException; +import java.util.List; + +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.program.ShaderSource; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.FontRenderer; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiShaderConfig extends GuiScreen { private static final Logger logger = LogManager.getLogger(); @@ -137,4 +138,4 @@ public class GuiShaderConfig extends GuiScreen { Minecraft getMinecraft() { return mc; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/gui/GuiShaderConfigList.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/gui/GuiShaderConfigList.java index 72f167f..0f7da0a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/gui/GuiShaderConfigList.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/gui/GuiShaderConfigList.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui; import java.util.ArrayList; @@ -14,21 +30,6 @@ import net.minecraft.client.resources.I18n; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.ResourceLocation; -/** - * Copyright (c) 2023 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 GuiShaderConfigList extends GuiListExtended { public static final ResourceLocation shaderPackIcon = new ResourceLocation("eagler:glsl/deferred/shader_pack_icon.png"); @@ -216,6 +217,23 @@ public class GuiShaderConfigList extends GuiListExtended { } }); } + if(conf.shaderPackInfo.SUBSURFACE_SCATTERING) { + opts.add(new ShaderOption(loadShaderLbl("SUBSURFACE_SCATTERING"), loadShaderDesc("SUBSURFACE_SCATTERING")) { + private final boolean originalValue = conf.subsurfaceScattering; + @Override + protected String getDisplayValue() { + return getColoredOnOff(conf.subsurfaceScattering, EnumChatFormatting.GREEN, EnumChatFormatting.RED); + } + @Override + protected void toggleOption(GuiButton button, int dir) { + conf.subsurfaceScattering = !conf.subsurfaceScattering; + } + @Override + protected boolean getDirty() { + return conf.subsurfaceScattering != originalValue; + } + }); + } if(conf.shaderPackInfo.POST_LENS_FLARES) { opts.add(new ShaderOption(loadShaderLbl("POST_LENS_FLARES"), loadShaderDesc("POST_LENS_FLARES")) { private final boolean originalValue = conf.lensFlares; @@ -657,4 +675,4 @@ public class GuiShaderConfigList extends GuiListExtended { bottom = screen.height - 40; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/gui/GuiShadersNotSupported.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/gui/GuiShadersNotSupported.java index d0676eb..d82672e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/gui/GuiShadersNotSupported.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/gui/GuiShadersNotSupported.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiShadersNotSupported extends GuiScreen { private GuiScreen parent; @@ -47,4 +48,4 @@ public class GuiShadersNotSupported extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/GBufferExtPipelineShader.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/GBufferExtPipelineShader.java index 2174647..4c7963a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/GBufferExtPipelineShader.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/GBufferExtPipelineShader.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; - -import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; -import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; + +import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; +import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; + public class GBufferExtPipelineShader extends ShaderProgram { public final int coreState; @@ -38,9 +39,11 @@ public class GBufferExtPipelineShader extends ShaderProgram { public static PipelineShaderAccelParticleForward compile(boolean dynamicLights, int sunShadows) { @@ -113,4 +114,4 @@ public class PipelineShaderAccelParticleForward extends ShaderProgram { public static PipelineShaderAccelParticleGBuffer compile() { @@ -75,4 +76,4 @@ public class PipelineShaderAccelParticleGBuffer extends ShaderProgram { public static PipelineShaderBloomBlurPass compile() { @@ -58,4 +59,4 @@ public class PipelineShaderBloomBlurPass extends ShaderProgram { public static PipelineShaderBloomBrightPass compile() throws ShaderException { @@ -59,4 +60,4 @@ public class PipelineShaderBloomBrightPass extends ShaderProgram { public static PipelineShaderCloudsNoise3D compile() { @@ -62,4 +63,4 @@ public class PipelineShaderCloudsNoise3D extends ShaderProgram { public static PipelineShaderCloudsSample compile() { @@ -69,4 +70,4 @@ public class PipelineShaderCloudsSample extends ShaderProgram { public static PipelineShaderCloudsShapes compile() { @@ -68,4 +69,4 @@ public class PipelineShaderCloudsShapes extends ShaderProgram { public static PipelineShaderCloudsSunOcclusion compile() { @@ -55,4 +56,4 @@ public class PipelineShaderCloudsSunOcclusion extends ShaderProgram { public static PipelineShaderFXAA compile() throws ShaderException { @@ -56,4 +57,4 @@ public class PipelineShaderFXAA extends ShaderProgram { public static PipelineShaderGBufferCombine compile(boolean ssao, boolean env, boolean ssr) throws ShaderException { @@ -95,4 +96,4 @@ public class PipelineShaderGBufferCombine extends ShaderProgram { public static PipelineShaderGBufferDebugView compile(int view) throws ShaderException { @@ -63,4 +64,4 @@ public class PipelineShaderGBufferDebugView extends ShaderProgram { public static PipelineShaderGBufferFog compile(boolean linear, boolean atmosphere, boolean lightShafts) { @@ -79,8 +80,9 @@ public class PipelineShaderGBufferFog extends ShaderProgram { public static PipelineShaderHandDepthMask compile() { @@ -52,4 +53,4 @@ public class PipelineShaderHandDepthMask extends ShaderProgram { public static PipelineShaderLensDistortion compile() throws ShaderException { @@ -52,4 +53,4 @@ public class PipelineShaderLensDistortion extends ShaderProgram { public static PipelineShaderLensFlares compileStreaks() { @@ -88,4 +89,4 @@ public class PipelineShaderLensFlares extends ShaderProgram { public static PipelineShaderLensSunOcclusion compile() throws ShaderException { @@ -54,4 +55,4 @@ public class PipelineShaderLensSunOcclusion extends ShaderProgram { public static PipelineShaderLightShaftsSample compile(int shadowsSun) { @@ -79,4 +80,4 @@ public class PipelineShaderLightShaftsSample extends ShaderProgram { public static PipelineShaderLightingPoint compile(boolean shadows) @@ -81,4 +82,4 @@ public class PipelineShaderLightingPoint extends ShaderProgram { - public static PipelineShaderLightingSun compile(int shadowsSun, boolean coloredShadows) throws ShaderException { + public static PipelineShaderLightingSun compile(int shadowsSun, boolean coloredShadows, boolean subsurfaceScattering) throws ShaderException { IShaderGL sunShader = null; List compileFlags = new ArrayList<>(1); if(shadowsSun > 0) { compileFlags.add("COMPILE_SUN_SHADOW"); } + int lods = shadowsSun - 1; + if(lods > 2) { + lods = 2; + } + compileFlags.add("COMPILE_SUN_SHADOW_LOD" + lods); if(coloredShadows) { compileFlags.add("COMPILE_COLORED_SHADOW"); } + if(subsurfaceScattering) { + compileFlags.add("COMPILE_SUBSURFACE_SCATTERING"); + } sunShader = ShaderCompiler.compileShader("lighting_sun", GL_FRAGMENT_SHADER, ShaderSource.lighting_sun_fsh, compileFlags); try { IProgramGL prog = ShaderCompiler.linkProgram("lighting_sun", SharedPipelineShaders.deferred_local, sunShader); - return new PipelineShaderLightingSun(prog, shadowsSun); + return new PipelineShaderLightingSun(prog, shadowsSun, subsurfaceScattering); }finally { if(sunShader != null) { sunShader.free(); @@ -48,20 +57,23 @@ public class PipelineShaderLightingSun extends ShaderProgram { public static PipelineShaderMoonRender compile() { @@ -71,4 +72,4 @@ public class PipelineShaderMoonRender extends ShaderProgram { public static PipelineShaderPostExposureAvg compile(boolean luma) throws ShaderException { @@ -63,4 +64,4 @@ public class PipelineShaderPostExposureAvg extends ShaderProgram { public static PipelineShaderPostExposureFinal compile() throws ShaderException { @@ -58,4 +59,4 @@ public class PipelineShaderPostExposureFinal extends ShaderProgram { public static PipelineShaderRealisticWaterControl compile() throws ShaderException { @@ -81,4 +82,4 @@ public class PipelineShaderRealisticWaterControl extends ShaderProgram { public static PipelineShaderRealisticWaterNoise compile() throws ShaderException { @@ -53,4 +54,4 @@ public class PipelineShaderRealisticWaterNoise extends ShaderProgram { public static PipelineShaderRealisticWaterNormalMap compile() throws ShaderException { @@ -53,4 +54,4 @@ public class PipelineShaderRealisticWaterNormalMap extends ShaderProgram { public static PipelineShaderRealisticWaterNormalsMix compile() throws ShaderException { @@ -54,4 +55,4 @@ public class PipelineShaderRealisticWaterNormalsMix extends ShaderProgram { public static PipelineShaderReprojControl compile(boolean ssao, boolean ssr) throws ShaderException { @@ -87,4 +88,4 @@ public class PipelineShaderReprojControl extends ShaderProgram { public static PipelineShaderReprojSSR compile() throws ShaderException { @@ -68,4 +69,4 @@ public class PipelineShaderReprojSSR extends ShaderProgram { public static PipelineShaderSSAOGenerate compile() throws ShaderException { @@ -59,4 +60,4 @@ public class PipelineShaderSSAOGenerate extends ShaderProgram { public static PipelineShaderShadowsSun compile(int shadowsSun, boolean shadowsSunSmooth, boolean coloredShadows) @@ -94,4 +95,4 @@ public class PipelineShaderShadowsSun extends ShaderProgram { public static PipelineShaderSkyboxAtmosphere compile() throws ShaderException { @@ -56,4 +57,4 @@ public class PipelineShaderSkyboxAtmosphere extends ShaderProgram { public static PipelineShaderSkyboxIrradiance compile(int phase) throws ShaderException { @@ -54,4 +55,4 @@ public class PipelineShaderSkyboxIrradiance extends ShaderProgram { public static PipelineShaderSkyboxRender compile(boolean paraboloid, boolean clouds) throws ShaderException { @@ -83,8 +84,9 @@ public class PipelineShaderSkyboxRender extends ShaderProgram { public static PipelineShaderSkyboxRenderEnd compile() throws ShaderException { @@ -66,4 +67,4 @@ public class PipelineShaderSkyboxRenderEnd extends ShaderProgram { + + public static PipelineShaderSubsurfaceScattering compile(int shadowsSun, float texW, float texH) throws ShaderException { + IShaderGL shadowShader = null; + List compileFlags = new ArrayList<>(3); + if(shadowsSun == 0) { + throw new IllegalStateException("Enable shadows to compile this shader"); + } + int lods = shadowsSun - 1; + if(lods > 2) { + lods = 2; + } + compileFlags.add("COMPILE_SUN_SHADOW_LOD" + lods); + compileFlags.add("SUN_SHADOW_DEPTH_SIZE_2F_X " + texW); + compileFlags.add("SUN_SHADOW_DEPTH_SIZE_2F_Y " + texH); + shadowShader = ShaderCompiler.compileShader("subsurface_scattering", GL_FRAGMENT_SHADER, + ShaderSource.subsurface_scattering_fsh, compileFlags); + try { + IProgramGL prog = ShaderCompiler.linkProgram("subsurface_scattering", SharedPipelineShaders.deferred_local, shadowShader); + return new PipelineShaderSubsurfaceScattering(prog, shadowsSun, texW, texH); + }finally { + if(shadowShader != null) { + shadowShader.free(); + } + } + } + + private PipelineShaderSubsurfaceScattering(IProgramGL program, int shadowsSun, float texW, float texH) { + super(program, new Uniforms(shadowsSun, texW, texH)); + } + + public static class Uniforms implements IProgramUniforms { + + public final int shadowsSun; + public final float texW; + public final float texH; + public IUniformGL u_inverseViewMatrix4f; + public IUniformGL u_inverseViewProjMatrix4f; + public IUniformGL u_sunShadowMatrixLOD04f; + public IUniformGL u_sunShadowMatrixLOD14f; + public IUniformGL u_sunShadowMatrixLOD24f; + public IUniformGL u_sunDirection3f; + + private Uniforms(int shadowsSun, float texW, float texH) { + this.shadowsSun = shadowsSun; + this.texW = texW; + this.texH = texH; + } + + @Override + public void loadUniforms(IProgramGL prog) { + _wglUniform1i(_wglGetUniformLocation(prog, "u_gbufferNormalTexture"), 0); + _wglUniform1i(_wglGetUniformLocation(prog, "u_gbufferDepthTexture"), 1); + _wglUniform1i(_wglGetUniformLocation(prog, "u_gbufferMaterialTexture"), 2); + _wglUniform1i(_wglGetUniformLocation(prog, "u_sunShadowDepthTexture"), 3); + u_inverseViewMatrix4f = _wglGetUniformLocation(prog, "u_inverseViewMatrix4f"); + u_inverseViewProjMatrix4f = _wglGetUniformLocation(prog, "u_inverseViewProjMatrix4f"); + u_sunShadowMatrixLOD04f = _wglGetUniformLocation(prog, "u_sunShadowMatrixLOD04f"); + u_sunShadowMatrixLOD14f = _wglGetUniformLocation(prog, "u_sunShadowMatrixLOD14f"); + u_sunShadowMatrixLOD24f = _wglGetUniformLocation(prog, "u_sunShadowMatrixLOD24f"); + u_sunDirection3f = _wglGetUniformLocation(prog, "u_sunDirection3f"); + } + + } + +} diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/PipelineShaderTonemap.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/PipelineShaderTonemap.java index 83d7201..ff8fe2f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/PipelineShaderTonemap.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/PipelineShaderTonemap.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program; - -import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; -import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; -import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program; + +import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; +import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; +import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + public class PipelineShaderTonemap extends ShaderProgram { public static PipelineShaderTonemap compile() throws ShaderException { @@ -57,4 +58,4 @@ public class PipelineShaderTonemap extends ShaderProgram { public final IProgramGL program; @@ -44,4 +45,4 @@ public class ShaderProgram { program.free(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/ShaderSource.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/ShaderSource.java index b89d9bd..73ff092 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/ShaderSource.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/ShaderSource.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program; import java.io.BufferedReader; @@ -15,21 +31,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.minecraft.client.Minecraft; import net.minecraft.util.ResourceLocation; -/** - * Copyright (c) 2023 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 ShaderSource { private static final Logger logger = LogManager.getLogger("ShaderSource"); @@ -92,6 +93,7 @@ public class ShaderSource { public static final ResourceLocation reproject_ssr_fsh = new ResourceLocation("eagler:glsl/deferred/reproject_ssr.fsh"); public static final ResourceLocation post_fxaa_fsh = new ResourceLocation("eagler:glsl/deferred/post_fxaa.fsh"); public static final ResourceLocation hand_depth_mask_fsh = new ResourceLocation("eagler:glsl/deferred/hand_depth_mask.fsh"); + public static final ResourceLocation subsurface_scattering_fsh = new ResourceLocation("eagler:glsl/deferred/subsurface_scattering.fsh"); public static final ResourceLocation core_dynamiclights_vsh = new ResourceLocation("eagler:glsl/dynamiclights/core_dynamiclights.vsh"); public static final ResourceLocation core_dynamiclights_fsh = new ResourceLocation("eagler:glsl/dynamiclights/core_dynamiclights.fsh"); @@ -191,4 +193,4 @@ public class ShaderSource { isHighP = b; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/SharedPipelineShaders.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/SharedPipelineShaders.java index df382b2..0fcc898 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/SharedPipelineShaders.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/program/SharedPipelineShaders.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program; - -import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; - -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program; + +import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; + +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + public class SharedPipelineShaders { public static IShaderGL deferred_local = null; @@ -41,4 +42,4 @@ public class SharedPipelineShaders { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/EaglerBitwisePackedTexture.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/EaglerBitwisePackedTexture.java index 1845f86..13657c4 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/EaglerBitwisePackedTexture.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/EaglerBitwisePackedTexture.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; - -import java.io.IOException; -import java.io.InputStream; - -import net.lax1dude.eaglercraft.v1_8.IOUtils; -import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; + +import java.io.IOException; +import java.io.InputStream; + +import net.lax1dude.eaglercraft.v1_8.IOUtils; +import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; + public class EaglerBitwisePackedTexture { private static int getFromBits(int idxx, int bits, byte[] bytes) { @@ -87,4 +88,4 @@ public class EaglerBitwisePackedTexture { return bufferedimage; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/EaglerTextureAtlasSpritePBR.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/EaglerTextureAtlasSpritePBR.java index 9a19d4f..0c1217e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/EaglerTextureAtlasSpritePBR.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/EaglerTextureAtlasSpritePBR.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; import java.io.IOException; @@ -21,21 +37,6 @@ import net.minecraft.crash.CrashReportCategory; import net.minecraft.util.ReportedException; import net.minecraft.util.ResourceLocation; -/** - * Copyright (c) 2023 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 EaglerTextureAtlasSpritePBR extends EaglerTextureAtlasSprite { private static final Logger logger = LogManager.getLogger("EaglerTextureAtlasSpritePBR"); @@ -371,4 +372,4 @@ public class EaglerTextureAtlasSpritePBR extends EaglerTextureAtlasSprite { + this.minV + ", v1=" + this.maxV + '}'; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/EmissiveItems.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/EmissiveItems.java index d07cef4..cb19a1e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/EmissiveItems.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/EmissiveItems.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; import java.io.BufferedReader; @@ -15,21 +31,6 @@ import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.ResourceLocation; -/** - * Copyright (c) 2023 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 EmissiveItems implements IResourceManagerReloadListener { private static final Logger logger = LogManager.getLogger("EmissiveItemsCSV"); @@ -85,4 +86,4 @@ public class EmissiveItems implements IResourceManagerReloadListener { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/MetalsLUT.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/MetalsLUT.java index 72b9c7a..cbe3c9f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/MetalsLUT.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/MetalsLUT.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; import java.io.BufferedReader; @@ -20,21 +36,6 @@ import net.minecraft.util.ResourceLocation; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -/** - * Copyright (c) 2023 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 MetalsLUT implements IResourceManagerReloadListener { private static final Logger logger = LogManager.getLogger("MetalsLUT"); @@ -148,4 +149,4 @@ public class MetalsLUT implements IResourceManagerReloadListener { _wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); _wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/PBRMaterialConstants.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/PBRMaterialConstants.java index 8096586..e713898 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/PBRMaterialConstants.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/PBRMaterialConstants.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; import java.io.BufferedReader; @@ -14,21 +30,6 @@ import net.minecraft.client.resources.IResourceManager; import net.minecraft.client.resources.IResourceManagerReloadListener; import net.minecraft.util.ResourceLocation; -/** - * Copyright (c) 2023 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 PBRMaterialConstants implements IResourceManagerReloadListener { public static final Logger logger = LogManager.getLogger("PBRMaterialConstants"); @@ -36,7 +37,7 @@ public class PBRMaterialConstants implements IResourceManagerReloadListener { public final ResourceLocation resourceLocation; public final Map spriteNameToMaterialConstants = new HashMap<>(); - public int defaultMaterial = 0x00000A77; + public int defaultMaterial = 0xFF000A77; public PBRMaterialConstants(ResourceLocation resourceLocation) { this.resourceLocation = resourceLocation; @@ -58,9 +59,14 @@ public class PBRMaterialConstants implements IResourceManagerReloadListener { continue; } String[] cols = line.split(","); - if(cols.length == 4) { + if(cols.length == 4 || cols.length == 5) { try { int value = Integer.parseInt(cols[1]) | (Integer.parseInt(cols[2]) << 8) | (Integer.parseInt(cols[3]) << 16); + if(cols.length == 5) { + value |= ((255 - Integer.parseInt(cols[4])) << 24); + }else { + value |= 0xFF000000; + } if(cols[0].equals("default")) { defaultMaterial = value; }else { @@ -83,4 +89,4 @@ public class PBRMaterialConstants implements IResourceManagerReloadListener { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/PBRTextureMapUtils.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/PBRTextureMapUtils.java index 115205b..077ad26 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/PBRTextureMapUtils.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/PBRTextureMapUtils.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; - -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; -import net.minecraft.client.renderer.texture.TextureUtil; -import net.minecraft.client.resources.IResource; -import net.minecraft.client.resources.IResourceManager; -import net.minecraft.util.ResourceLocation; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.minecraft.util.ResourceLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; + +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; +import net.minecraft.client.renderer.texture.TextureUtil; +import net.minecraft.client.resources.IResource; +import net.minecraft.client.resources.IResourceManager; +import net.minecraft.util.ResourceLocation; + public class PBRTextureMapUtils { public static final ImageData defaultNormalsTexture = new ImageData(1, 1, new int[] { 0xFFFF7F7F }, true); @@ -172,4 +173,4 @@ public class PBRTextureMapUtils { return ret; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/TemperaturesLUT.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/TemperaturesLUT.java index 07afb1d..6c13cda 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/TemperaturesLUT.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/TemperaturesLUT.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; - -import java.io.IOException; -import java.io.InputStream; - -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.minecraft.client.resources.IResource; -import net.minecraft.client.resources.IResourceManager; -import net.minecraft.client.resources.IResourceManagerReloadListener; -import net.minecraft.util.ResourceLocation; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.minecraft.util.ResourceLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; + +import java.io.IOException; +import java.io.InputStream; + +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.minecraft.client.resources.IResource; +import net.minecraft.client.resources.IResourceManager; +import net.minecraft.client.resources.IResourceManagerReloadListener; +import net.minecraft.util.ResourceLocation; + public class TemperaturesLUT implements IResourceManagerReloadListener { private static final Logger logger = LogManager.getLogger("TemperaturesLUT"); @@ -67,4 +68,4 @@ public class TemperaturesLUT implements IResourceManagerReloadListener { ret[2] = colorTemperatureLUT[k][2]; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/TextureClockPBRImpl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/TextureClockPBRImpl.java index db844ad..0600df5 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/TextureClockPBRImpl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/TextureClockPBRImpl.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; - -import net.minecraft.client.Minecraft; -import net.minecraft.util.MathHelper; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.minecraft.util.MathHelper; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; + +import net.minecraft.client.Minecraft; +import net.minecraft.util.MathHelper; + public class TextureClockPBRImpl extends EaglerTextureAtlasSpritePBR { private double smoothParam1; private double smoothParam2; @@ -87,4 +88,4 @@ public class TextureClockPBRImpl extends EaglerTextureAtlasSpritePBR { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/TextureCompassPBRImpl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/TextureCompassPBRImpl.java index d00b74b..6d53b01 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/TextureCompassPBRImpl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/deferred/texture/TextureCompassPBRImpl.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; - -import net.minecraft.client.Minecraft; -import net.minecraft.util.BlockPos; -import net.minecraft.util.MathHelper; -import net.minecraft.world.World; - -/** +/* * Copyright (c) 2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.minecraft.world.World; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture; + +import net.minecraft.client.Minecraft; +import net.minecraft.util.BlockPos; +import net.minecraft.util.MathHelper; +import net.minecraft.world.World; + public class TextureCompassPBRImpl extends EaglerTextureAtlasSpritePBR { public double currentAngle; public double angleDelta; @@ -104,4 +105,4 @@ public class TextureCompassPBRImpl extends EaglerTextureAtlasSpritePBR { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightBucketLoader.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightBucketLoader.java index 2ebc802..d21cb26 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightBucketLoader.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightBucketLoader.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights; import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; @@ -16,21 +32,6 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline; import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ListSerial; import net.minecraft.util.MathHelper; -/** - * Copyright (c) 2023-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 DynamicLightBucketLoader { public IBufferGL buffer_chunkLightingData; @@ -288,4 +289,4 @@ public class DynamicLightBucketLoader { currentLightSourceBucket = null; currentLightSourceBucketId = -1; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightInstance.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightInstance.java index 6efd297..5b4f2ce 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightInstance.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightInstance.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights; + class DynamicLightInstance { double posX; @@ -36,4 +37,4 @@ class DynamicLightInstance { return radius; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightsAcceleratedEffectRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightsAcceleratedEffectRenderer.java index 5396ce8..e66c88c 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightsAcceleratedEffectRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightsAcceleratedEffectRenderer.java @@ -1,10 +1,26 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights; import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; @@ -20,21 +36,6 @@ import net.minecraft.client.renderer.GLAllocation; import net.minecraft.entity.Entity; import net.minecraft.util.MathHelper; -/** - * 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 DynamicLightsAcceleratedEffectRenderer extends AbstractAcceleratedEffectRenderer { private static final Logger logger = LogManager.getLogger("DynamicLightsAcceleratedEffectRenderer"); @@ -48,7 +49,7 @@ public class DynamicLightsAcceleratedEffectRenderer extends AbstractAcceleratedE private DynamicLightsAccelParticleShader shaderProgram = null; - private IBufferArrayGL vertexArray = null; + private IVertexArrayGL vertexArray = null; private IBufferGL vertexBuffer = null; private IBufferGL instancesBuffer = null; @@ -84,7 +85,7 @@ public class DynamicLightsAcceleratedEffectRenderer extends AbstractAcceleratedE }); verts.flip(); - EaglercraftGPU.bindGLBufferArray(vertexArray); + EaglercraftGPU.bindGLVertexArray(vertexArray); EaglercraftGPU.bindGLArrayBuffer(vertexBuffer); _wglBufferData(GL_ARRAY_BUFFER, verts, GL_STATIC_DRAW); @@ -148,7 +149,7 @@ public class DynamicLightsAcceleratedEffectRenderer extends AbstractAcceleratedE _wglUniformMatrix4fv(shaderProgram.uniforms.u_inverseViewMatrix4f, false, buf); EaglercraftGPU.bindGLArrayBuffer(instancesBuffer); - EaglercraftGPU.bindGLBufferArray(vertexArray); + EaglercraftGPU.bindGLVertexArray(vertexArray); int p = particleBuffer.position(); int l = particleBuffer.limit(); @@ -227,4 +228,4 @@ public class DynamicLightsAcceleratedEffectRenderer extends AbstractAcceleratedE instancesBuffer = null; } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightsPipelineCompiler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightsPipelineCompiler.java index 0952828..d26afb0 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightsPipelineCompiler.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightsPipelineCompiler.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; - -import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; -import net.lax1dude.eaglercraft.v1_8.opengl.FixedFunctionShader.FixedFunctionState; -import net.lax1dude.eaglercraft.v1_8.opengl.IExtPipelineCompiler; -import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderSource; -import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.program.DynamicLightsExtPipelineShader; -import net.minecraft.client.renderer.GLAllocation; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.minecraft.client.renderer.GLAllocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; + +import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; +import net.lax1dude.eaglercraft.v1_8.opengl.FixedFunctionShader.FixedFunctionState; +import net.lax1dude.eaglercraft.v1_8.opengl.IExtPipelineCompiler; +import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderSource; +import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.program.DynamicLightsExtPipelineShader; +import net.minecraft.client.renderer.GLAllocation; + public class DynamicLightsPipelineCompiler implements IExtPipelineCompiler { static FloatBuffer matrixCopyBuffer = null; @@ -101,4 +102,4 @@ public class DynamicLightsPipelineCompiler implements IExtPipelineCompiler { } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightsStateManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightsStateManager.java index aee2f0f..8013494 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightsStateManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/DynamicLightsStateManager.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights; import java.util.ArrayList; @@ -14,21 +30,6 @@ import net.minecraft.client.particle.EffectRenderer; import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher; import net.minecraft.util.MathHelper; -/** - * 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 DynamicLightsStateManager { static final DynamicLightsPipelineCompiler deferredExtPipeline = new DynamicLightsPipelineCompiler(); @@ -43,7 +44,7 @@ public class DynamicLightsStateManager { static int lastTotal = 0; private static long lastTick = 0l; - public static final void enableDynamicLightsRender() { + public static void enableDynamicLightsRender() { if(bucketLoader == null) { bucketLoader = new DynamicLightBucketLoader(); bucketLoader.initialize(); @@ -59,11 +60,11 @@ public class DynamicLightsStateManager { maxListLengthTracker = 0; } - public static final void bindAcceleratedEffectRenderer(EffectRenderer renderer) { + public static void bindAcceleratedEffectRenderer(EffectRenderer renderer) { renderer.acceleratedParticleRenderer = accelParticleRenderer; } - public static final void disableDynamicLightsRender(boolean unloadPipeline) { + public static void disableDynamicLightsRender(boolean unloadPipeline) { if(bucketLoader != null) { bucketLoader.destroy(); bucketLoader = null; @@ -81,21 +82,21 @@ public class DynamicLightsStateManager { maxListLengthTracker = 0; } - public static final boolean isDynamicLightsRender() { + public static boolean isDynamicLightsRender() { return bucketLoader != null; } - public static final boolean isInDynamicLightsPass() { + public static boolean isInDynamicLightsPass() { return GlStateManager.isExtensionPipeline() && bucketLoader != null; } - public static final void reportForwardRenderObjectPosition(int centerX, int centerY, int centerZ) { + public static void reportForwardRenderObjectPosition(int centerX, int centerY, int centerZ) { if(bucketLoader != null) { bucketLoader.bindLightSourceBucket(centerX, centerY, centerZ, 0); } } - public static final void reportForwardRenderObjectPosition2(float x, float y, float z) { + public static void reportForwardRenderObjectPosition2(float x, float y, float z) { if(bucketLoader != null) { float posX = (float)((x + TileEntityRendererDispatcher.staticPlayerX) - (MathHelper.floor_double(TileEntityRendererDispatcher.staticPlayerX / 16.0) << 4)); float posY = (float)((y + TileEntityRendererDispatcher.staticPlayerY) - (MathHelper.floor_double(TileEntityRendererDispatcher.staticPlayerY / 16.0) << 4)); @@ -104,7 +105,7 @@ public class DynamicLightsStateManager { } } - public static final void renderDynamicLight(String lightName, double posX, double posY, double posZ, float radius) { + public static void renderDynamicLight(String lightName, double posX, double posY, double posZ, float radius) { if(bucketLoader != null) { DynamicLightInstance dl; if(instancePoolIndex < lightInstancePool.size()) { @@ -118,7 +119,7 @@ public class DynamicLightsStateManager { } } - public static final void clearRenderList() { + public static void clearRenderList() { if(instancePoolIndex > maxListLengthTracker) { maxListLengthTracker = instancePoolIndex; } @@ -126,7 +127,7 @@ public class DynamicLightsStateManager { instancePoolIndex = 0; } - public static final void commitLightSourceBuckets(double renderPosX, double renderPosY, double renderPosZ) { + public static void commitLightSourceBuckets(double renderPosX, double renderPosY, double renderPosZ) { lastTotal = lightRenderList.size(); if(bucketLoader != null) { bucketLoader.clearBuckets(); @@ -148,12 +149,12 @@ public class DynamicLightsStateManager { clearRenderList(); } - public static final void setupInverseViewMatrix() { + public static void setupInverseViewMatrix() { Matrix4f.invert(GlStateManager.getModelViewReference(), inverseViewMatrix); inverseViewMatrixSerial = GlStateManager.getModelViewSerial(); } - private static final void updateTimers() { + private static void updateTimers() { long millis = EagRuntime.steadyTimeMillis(); if(millis - lastTick > 5000l) { lastTick = millis; @@ -168,7 +169,7 @@ public class DynamicLightsStateManager { } } - public static final void destroyAll() { + public static void destroyAll() { lightInstancePool = new ArrayList<>(); } @@ -180,4 +181,4 @@ public class DynamicLightsStateManager { return EaglercraftGPU.checkOpenGLESVersion() >= 300; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/program/DynamicLightsAccelParticleShader.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/program/DynamicLightsAccelParticleShader.java index 746ccf3..081e798 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/program/DynamicLightsAccelParticleShader.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/opengl/ext/dynamiclights/program/DynamicLightsAccelParticleShader.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.program; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; -import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; -import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; -import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.IProgramUniforms; -import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderCompiler; -import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderProgram; -import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderSource; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderSource; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.program; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; +import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; +import net.lax1dude.eaglercraft.v1_8.internal.IUniformGL; +import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.IProgramUniforms; +import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderCompiler; +import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderProgram; +import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderSource; + public class DynamicLightsAccelParticleShader extends ShaderProgram { public static DynamicLightsAccelParticleShader compile() { @@ -88,4 +89,4 @@ public class DynamicLightsAccelParticleShader extends ShaderProgram { public final int coreState; @@ -55,4 +56,4 @@ public class DynamicLightsExtPipelineShader extends ShaderProgram'); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/ProfileImporter.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/ProfileImporter.java index 026338d..c0dd503 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/ProfileImporter.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/ProfileImporter.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.profile; import java.io.Closeable; @@ -15,21 +31,6 @@ import net.lax1dude.eaglercraft.v1_8.update.UpdateService; import net.minecraft.client.Minecraft; import net.minecraft.client.multiplayer.ServerList; -/** - * 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 ProfileImporter implements Closeable { private static final Logger logger = LogManager.getLogger("ProfileImporter"); @@ -154,4 +155,4 @@ public class ProfileImporter implements Closeable { public void close() throws IOException { epkDecompiler.close(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/RenderHighPoly.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/RenderHighPoly.java index 5203bf3..c11507a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/RenderHighPoly.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/RenderHighPoly.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.profile; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; @@ -25,21 +41,6 @@ import net.minecraft.item.ItemBlock; import net.minecraft.item.ItemStack; import net.minecraft.util.MathHelper; -/** - * Copyright (c) 2022-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 RenderHighPoly extends RenderPlayer { private static final Logger logger = LogManager.getLogger("RenderHighPoly"); @@ -478,4 +479,4 @@ public class RenderHighPoly extends RenderPlayer { super.renderLivingAt(abstractclientplayer, d0, d1, d2); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/ServerCapeCache.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/ServerCapeCache.java index 788e398..ed9b3b0 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/ServerCapeCache.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/ServerCapeCache.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.profile; import java.util.HashMap; @@ -13,21 +29,6 @@ import net.minecraft.client.network.NetHandlerPlayClient; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.ResourceLocation; -/** - * Copyright (c) 2022-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 ServerCapeCache { private static final Logger logger = LogManager.getLogger("ServerCapeCache"); @@ -246,4 +247,4 @@ public class ServerCapeCache { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/ServerSkinCache.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/ServerSkinCache.java index f996858..3dc2735 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/ServerSkinCache.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/ServerSkinCache.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.profile; import java.util.HashMap; @@ -16,21 +32,6 @@ import net.minecraft.client.network.NetHandlerPlayClient; import net.minecraft.client.renderer.texture.TextureManager; import net.minecraft.util.ResourceLocation; -/** - * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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 ServerSkinCache { private static final Logger logger = LogManager.getLogger("ServerSkinCache"); @@ -332,4 +333,4 @@ public class ServerSkinCache { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinConverter.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinConverter.java index f737d28..cd3bd1d 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinConverter.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinConverter.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.profile; - -import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.profile; + +import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; + public class SkinConverter { public static void convert64x32to64x64(ImageData skinIn, ImageData skinOut) { @@ -110,4 +111,4 @@ public class SkinConverter { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinModel.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinModel.java index 7dbd147..25b3a0e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinModel.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinModel.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.profile; - -import java.util.HashMap; -import java.util.Map; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import java.util.Map; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.profile; + +import java.util.HashMap; +import java.util.Map; + public enum SkinModel { STEVE(0, 64, 64, "default", false), ALEX(1, 64, 64, "slim", false), ZOMBIE(2, 64, 64, "zombie", true), LONG_ARMS(3, HighPolySkin.LONG_ARMS), WEIRD_CLIMBER_DUDE(4, HighPolySkin.WEIRD_CLIMBER_DUDE), diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinPackets.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinPackets.java index fb4233d..f0da915 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinPackets.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinPackets.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.profile; - -import net.lax1dude.eaglercraft.v1_8.ArrayUtils; -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.crypto.MD5Digest; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.crypto.MD5Digest; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.profile; + +import net.lax1dude.eaglercraft.v1_8.ArrayUtils; +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.crypto.MD5Digest; + public class SkinPackets { public static final int PACKET_MY_SKIN_PRESET = 0x01; @@ -65,4 +66,4 @@ public class SkinPackets { return new EaglercraftUUID(md5Bytes); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinPreviewRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinPreviewRenderer.java index 90a39d5..4c7106e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinPreviewRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/profile/SkinPreviewRenderer.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.profile; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.opengl.EaglerMeshLoader; -import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.minecraft.client.Minecraft; -import net.minecraft.client.model.ModelBiped; -import net.minecraft.client.model.ModelPlayer; -import net.minecraft.client.model.ModelZombie; -import net.minecraft.client.renderer.RenderHelper; -import net.minecraft.util.ResourceLocation; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.minecraft.util.ResourceLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.profile; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.opengl.EaglerMeshLoader; +import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.minecraft.client.Minecraft; +import net.minecraft.client.model.ModelBiped; +import net.minecraft.client.model.ModelPlayer; +import net.minecraft.client.model.ModelZombie; +import net.minecraft.client.renderer.RenderHelper; +import net.minecraft.util.ResourceLocation; + public class SkinPreviewRenderer { private static ModelPlayer playerModelSteve = null; @@ -178,4 +179,4 @@ public class SkinPreviewRenderer { GlStateManager.disableLighting(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/EnumScreenRecordingCodec.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/EnumScreenRecordingCodec.java index bcb9e3e..68f8dca 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/EnumScreenRecordingCodec.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/EnumScreenRecordingCodec.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.recording; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.recording; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.recording; + public enum EnumScreenRecordingCodec { CODEC_MP4_H264_GENERIC_AAC("MP4 (video: H.264 Default, audio: AAC LC)", "mp4", "video/mp4", "avc1", "mp4a.40.2", false), @@ -149,4 +150,4 @@ public enum EnumScreenRecordingCodec { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiScreenRecordingNote.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiScreenRecordingNote.java index ab37074..85d547a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiScreenRecordingNote.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiScreenRecordingNote.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.recording; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.recording; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenRecordingNote extends GuiScreen { private GuiScreen cont; @@ -49,4 +50,4 @@ public class GuiScreenRecordingNote extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiScreenRecordingSettings.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiScreenRecordingSettings.java index 2f810af..5e3fd99 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiScreenRecordingSettings.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiScreenRecordingSettings.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.recording; - -import net.lax1dude.eaglercraft.v1_8.HString; -import net.lax1dude.eaglercraft.v1_8.internal.ScreenRecordParameters; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage; -import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiSlider2; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.MathHelper; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.minecraft.util.MathHelper; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.recording; + +import net.lax1dude.eaglercraft.v1_8.HString; +import net.lax1dude.eaglercraft.v1_8.internal.ScreenRecordParameters; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage; +import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiSlider2; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.MathHelper; + public class GuiScreenRecordingSettings extends GuiScreen { private static final Logger logger = LogManager.getLogger("GuiScreenRecordingSettings"); @@ -198,4 +199,4 @@ public class GuiScreenRecordingSettings extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiScreenSelectCodec.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiScreenSelectCodec.java index 32d67de..4495d05 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiScreenSelectCodec.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiScreenSelectCodec.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.recording; - -import java.io.IOException; -import java.util.List; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.recording; + +import java.io.IOException; +import java.util.List; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenSelectCodec extends GuiScreen { protected final GuiScreenRecordingSettings parent; @@ -89,4 +90,4 @@ public class GuiScreenSelectCodec extends GuiScreen { return screen.mc; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiSlotSelectCodec.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiSlotSelectCodec.java index 3e2575b..040f832 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiSlotSelectCodec.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/GuiSlotSelectCodec.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.recording; - -import net.minecraft.client.gui.GuiSlot; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.minecraft.client.gui.GuiSlot; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.recording; + +import net.minecraft.client.gui.GuiSlot; + public class GuiSlotSelectCodec extends GuiSlot { protected final GuiScreenSelectCodec screen; @@ -55,4 +56,4 @@ public class GuiSlotSelectCodec extends GuiSlot { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/ScreenRecordingController.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/ScreenRecordingController.java index cf805c6..3d48a1f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/ScreenRecordingController.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/recording/ScreenRecordingController.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.recording; - -import java.util.ArrayList; -import java.util.HashSet; -import java.util.List; -import java.util.Set; - -import net.lax1dude.eaglercraft.v1_8.internal.PlatformScreenRecord; -import net.lax1dude.eaglercraft.v1_8.internal.ScreenRecordParameters; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.internal.ScreenRecordParameters; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.recording; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import net.lax1dude.eaglercraft.v1_8.internal.PlatformScreenRecord; +import net.lax1dude.eaglercraft.v1_8.internal.ScreenRecordParameters; + public class ScreenRecordingController { public static final int DEFAULT_FPS = 30; @@ -96,4 +97,4 @@ public class ScreenRecordingController { return simpleCodecsOrdered.isEmpty() ? (advancedCodecsOrdered.isEmpty() ? null : advancedCodecsOrdered.get(0)) : simpleCodecsOrdered.get(0); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/AddressResolver.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/AddressResolver.java index a5a9886..852f8f5 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/AddressResolver.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/AddressResolver.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.minecraft.client.multiplayer.ServerAddress; -import net.minecraft.client.multiplayer.ServerData; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.client.multiplayer.ServerData; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.minecraft.client.multiplayer.ServerAddress; +import net.minecraft.client.multiplayer.ServerData; + public class AddressResolver { public static String resolveURI(ServerData input) { @@ -60,4 +61,4 @@ public class AddressResolver { return new ServerAddress(uri, port); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/CompressionNotSupportedException.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/CompressionNotSupportedException.java index ea878cf..998e155 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/CompressionNotSupportedException.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/CompressionNotSupportedException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.socket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket; + public class CompressionNotSupportedException extends UnsupportedOperationException { public CompressionNotSupportedException() { @@ -23,4 +24,4 @@ public class CompressionNotSupportedException extends UnsupportedOperationExcept "allow Eaglercraft connections to this server"); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/ConnectionHandshake.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/ConnectionHandshake.java index 9b23c87..7a4e77c 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/ConnectionHandshake.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/ConnectionHandshake.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.socket; import java.io.DataInputStream; @@ -11,6 +27,7 @@ import java.util.Map; import java.util.Map.Entry; import net.lax1dude.eaglercraft.v1_8.ArrayUtils; +import net.lax1dude.eaglercraft.v1_8.ClientUUIDLoadingCache; import net.lax1dude.eaglercraft.v1_8.EagRuntime; import net.lax1dude.eaglercraft.v1_8.EagUtils; import net.lax1dude.eaglercraft.v1_8.EaglerInputStream; @@ -34,21 +51,6 @@ import net.minecraft.util.ChatComponentText; import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.IChatComponent; -/** - * Copyright (c) 2022-2023 lax1dude, ayunami2000. 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 ConnectionHandshake { private static final long baseTimeout = 10000l; @@ -82,6 +84,7 @@ public class ConnectionHandshake { try { EaglerProfile.clearServerSkinOverride(); PauseMenuCustomizeState.reset(); + ClientUUIDLoadingCache.resetFlags(); pluginVersion = null; pluginBrand = null; protocolVersion = -1; @@ -501,4 +504,4 @@ public class ConnectionHandshake { (byte) '0', (byte) '1', (byte) '2', (byte) '3', (byte) '4', (byte) '5', (byte) '6', (byte) '7', (byte) '8', (byte) '9', (byte) 'a', (byte) 'b', (byte) 'c', (byte) 'd', (byte) 'e', (byte) 'f' }; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/EaglercraftNetworkManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/EaglercraftNetworkManager.java index 6d7a2a4..9d348ed 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/EaglercraftNetworkManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/EaglercraftNetworkManager.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.lax1dude.eaglercraft.v1_8.netty.Unpooled; -import net.minecraft.network.EnumConnectionState; -import net.minecraft.network.INetHandler; -import net.minecraft.network.Packet; -import net.minecraft.network.PacketBuffer; -import net.minecraft.util.IChatComponent; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.minecraft.util.IChatComponent; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.netty.Unpooled; +import net.minecraft.network.EnumConnectionState; +import net.minecraft.network.INetHandler; +import net.minecraft.network.Packet; +import net.minecraft.network.PacketBuffer; +import net.minecraft.util.IChatComponent; + public abstract class EaglercraftNetworkManager { protected final String address; @@ -109,4 +110,4 @@ public abstract class EaglercraftNetworkManager { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/EncryptionNotSupportedException.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/EncryptionNotSupportedException.java index 9ca1084..da48b57 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/EncryptionNotSupportedException.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/EncryptionNotSupportedException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.socket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket; + public class EncryptionNotSupportedException extends UnsupportedOperationException { public EncryptionNotSupportedException() { @@ -23,4 +24,4 @@ public class EncryptionNotSupportedException extends UnsupportedOperationExcepti "allow Eaglercraft connections to this server"); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/GuiHandshakeApprove.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/GuiHandshakeApprove.java index 350340e..5dcb8cb 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/GuiHandshakeApprove.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/GuiHandshakeApprove.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket; - -import java.util.ArrayList; -import java.util.List; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket; + +import java.util.ArrayList; +import java.util.List; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiHandshakeApprove extends GuiScreen { protected String message; @@ -103,4 +104,4 @@ public class GuiHandshakeApprove extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/HandshakePacketTypes.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/HandshakePacketTypes.java index 5da5df2..da69a94 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/HandshakePacketTypes.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/HandshakePacketTypes.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.socket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket; + public class HandshakePacketTypes { public static final String AUTHENTICATION_REQUIRED = "Authentication Required:"; @@ -62,4 +63,4 @@ public class HandshakePacketTypes { (byte) 27, (byte) 232, (byte) 55, (byte) 144, (byte) 83, (byte) 21, (byte) 36, (byte) 55, (byte) 170, (byte) 118 }; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/RateLimitTracker.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/RateLimitTracker.java index 5388092..8f90a83 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/RateLimitTracker.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/RateLimitTracker.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket; - -import java.util.HashMap; -import java.util.Iterator; -import java.util.Map; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.EagRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket; + +import java.util.HashMap; +import java.util.Iterator; +import java.util.Map; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; + public class RateLimitTracker { private static long lastTickUpdate = 0l; @@ -66,4 +67,4 @@ public class RateLimitTracker { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/ServerQueryDispatch.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/ServerQueryDispatch.java index 9b57fb2..7da7f32 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/ServerQueryDispatch.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/ServerQueryDispatch.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket; - -import net.lax1dude.eaglercraft.v1_8.internal.IServerQuery; -import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketClient; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformNetworking; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2022-2023 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket; + +import net.lax1dude.eaglercraft.v1_8.internal.IServerQuery; +import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketClient; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformNetworking; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class ServerQueryDispatch { private static final Logger logger = LogManager.getLogger("QueryDispatch"); @@ -31,4 +32,4 @@ public class ServerQueryDispatch { return sockClient != null ? new ServerQueryImpl(sockClient, accept) : null; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/ServerQueryImpl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/ServerQueryImpl.java index 6b22ba1..c1a7072 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/ServerQueryImpl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/ServerQueryImpl.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.socket; import java.util.LinkedList; @@ -14,21 +30,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.QueryResponse; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * Copyright (c) 2022-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. - * - */ class ServerQueryImpl implements IServerQuery { public static final Logger logger = LogManager.getLogger("WebSocketQuery"); @@ -175,4 +176,4 @@ class ServerQueryImpl implements IServerQuery { return rateLimit; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/WebSocketNetworkManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/WebSocketNetworkManager.java index 8458de6..3b26c19 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/WebSocketNetworkManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/WebSocketNetworkManager.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.socket; import java.io.IOException; @@ -14,21 +30,6 @@ import net.minecraft.network.PacketBuffer; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.IChatComponent; -/** - * Copyright (c) 2022-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 WebSocketNetworkManager extends EaglercraftNetworkManager { protected final IWebSocketClient webSocketClient; @@ -149,4 +150,4 @@ public class WebSocketNetworkManager extends EaglercraftNetworkManager { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/ClientV3MessageHandler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/ClientV3MessageHandler.java index 1db2153..b0b5f94 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/ClientV3MessageHandler.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/ClientV3MessageHandler.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.client; - -import java.nio.charset.StandardCharsets; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.profile.SkinModel; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.*; -import net.lax1dude.eaglercraft.v1_8.update.UpdateService; -import net.lax1dude.eaglercraft.v1_8.voice.VoiceClientController; -import net.minecraft.client.Minecraft; -import net.minecraft.client.network.NetHandlerPlayClient; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.minecraft.client.network.NetHandlerPlayClient; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.client; + +import java.nio.charset.StandardCharsets; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.profile.SkinModel; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.*; +import net.lax1dude.eaglercraft.v1_8.update.UpdateService; +import net.lax1dude.eaglercraft.v1_8.voice.VoiceClientController; +import net.minecraft.client.Minecraft; +import net.minecraft.client.network.NetHandlerPlayClient; + public class ClientV3MessageHandler implements GameMessageHandler { private final NetHandlerPlayClient netHandler; @@ -127,4 +128,4 @@ public class ClientV3MessageHandler implements GameMessageHandler { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/ClientV4MessageHandler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/ClientV4MessageHandler.java index efee75d..8202b6e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/ClientV4MessageHandler.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/ClientV4MessageHandler.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.socket.protocol.client; import java.nio.charset.StandardCharsets; @@ -19,21 +35,6 @@ import net.lax1dude.eaglercraft.v1_8.webview.WebViewOverlayController; import net.minecraft.client.Minecraft; import net.minecraft.client.network.NetHandlerPlayClient; -/** - * 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 ClientV4MessageHandler implements GameMessageHandler { private final NetHandlerPlayClient netHandler; @@ -219,4 +220,4 @@ public class ClientV4MessageHandler implements GameMessageHandler { netHandler.getNotifManager().processPacketHideBadge(packet); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/GameProtocolMessageController.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/GameProtocolMessageController.java index a360b28..ba147f1 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/GameProtocolMessageController.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/GameProtocolMessageController.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.socket.protocol.client; import java.io.IOException; @@ -20,21 +36,6 @@ import net.minecraft.client.network.NetHandlerPlayClient; import net.minecraft.network.NetHandlerPlayServer; import net.minecraft.network.PacketBuffer; -/** - * 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 GameProtocolMessageController { private static final Logger logger = LogManager.getLogger("GameProtocolMessageController"); @@ -203,4 +204,4 @@ public class GameProtocolMessageController { throw new IllegalArgumentException("Unknown protocol verison: " + protocolVersion); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/IPluginMessageSendFunction.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/IPluginMessageSendFunction.java index 1065cf9..6e89dc3 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/IPluginMessageSendFunction.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/IPluginMessageSendFunction.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.client; - -import net.minecraft.network.PacketBuffer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,8 +13,13 @@ import net.minecraft.network.PacketBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.client; + +import net.minecraft.network.PacketBuffer; + public interface IPluginMessageSendFunction { void sendPluginMessage(String channel, PacketBuffer contents); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/PacketBufferInputWrapper.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/PacketBufferInputWrapper.java index b8dda71..c69335b 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/PacketBufferInputWrapper.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/PacketBufferInputWrapper.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.client; - -import java.io.DataInputStream; -import java.io.EOFException; -import java.io.IOException; -import java.io.InputStream; - -import net.lax1dude.eaglercraft.v1_8.DecoderException; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.minecraft.network.PacketBuffer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import net.minecraft.network.PacketBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.client; + +import java.io.DataInputStream; +import java.io.EOFException; +import java.io.IOException; +import java.io.InputStream; + +import net.lax1dude.eaglercraft.v1_8.DecoderException; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.minecraft.network.PacketBuffer; + public class PacketBufferInputWrapper implements GamePacketInputBuffer { protected PacketBuffer buffer; @@ -300,4 +301,4 @@ public class PacketBufferInputWrapper implements GamePacketInputBuffer { return ret; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/PacketBufferOutputWrapper.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/PacketBufferOutputWrapper.java index c228f7f..05dab4c 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/PacketBufferOutputWrapper.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/client/PacketBufferOutputWrapper.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.client; - -import java.io.IOException; -import java.io.OutputStream; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.minecraft.network.PacketBuffer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.minecraft.network.PacketBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.client; + +import java.io.IOException; +import java.io.OutputStream; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.minecraft.network.PacketBuffer; + public class PacketBufferOutputWrapper implements GamePacketOutputBuffer { protected PacketBuffer buffer; @@ -313,4 +314,4 @@ public class PacketBufferOutputWrapper implements GamePacketOutputBuffer { }; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/IntegratedServerState.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/IntegratedServerState.java index 63a4594..42d6a4e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/IntegratedServerState.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/IntegratedServerState.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp; - -import net.lax1dude.eaglercraft.v1_8.sp.ipc.*; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.sp.ipc.*; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp; + +import net.lax1dude.eaglercraft.v1_8.sp.ipc.*; + public class IntegratedServerState { public static final int WORLD_WORKER_NOT_RUNNING = -2; @@ -95,4 +96,4 @@ public class IntegratedServerState { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/SingleplayerSaveHandler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/SingleplayerSaveHandler.java index 5075ecb..9679173 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/SingleplayerSaveHandler.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/SingleplayerSaveHandler.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp; - -import net.minecraft.world.storage.SaveHandlerMP; -import net.minecraft.world.storage.WorldInfo; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.minecraft.world.storage.WorldInfo; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp; + +import net.minecraft.world.storage.SaveHandlerMP; +import net.minecraft.world.storage.WorldInfo; + public class SingleplayerSaveHandler extends SaveHandlerMP { private final WorldInfo worldInfo; @@ -29,4 +30,4 @@ public class SingleplayerSaveHandler extends SaveHandlerMP { public WorldInfo loadWorldInfo() { return worldInfo; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/SingleplayerServerController.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/SingleplayerServerController.java index ae15610..974a3b1 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/SingleplayerServerController.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/SingleplayerServerController.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp; import java.io.IOException; @@ -35,21 +51,6 @@ import net.minecraft.world.storage.ISaveHandler; import net.minecraft.world.storage.SaveFormatComparator; import net.minecraft.world.storage.WorldInfo; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 SingleplayerServerController implements ISaveFormat { public static final String IPC_CHANNEL = "~!IPC"; @@ -634,4 +635,4 @@ public class SingleplayerServerController implements ISaveFormat { Minecraft mc = Minecraft.getMinecraft(); return mc != null && mc.thePlayer != null && mc.thePlayer.sendQueue.isClientInEaglerSingleplayerOrLAN(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/SkullCommand.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/SkullCommand.java index 900eba1..062a466 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/SkullCommand.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/SkullCommand.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.FileChooserResult; -import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client.CPacketInstallSkinSPEAG; -import net.minecraft.client.Minecraft; -import net.minecraft.util.ChatComponentTranslation; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.minecraft.util.ChatComponentTranslation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.FileChooserResult; +import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client.CPacketInstallSkinSPEAG; +import net.minecraft.client.Minecraft; +import net.minecraft.util.ChatComponentTranslation; + public class SkullCommand { private final Minecraft mc; @@ -65,4 +66,4 @@ public class SkullCommand { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/WorkerStartupFailedException.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/WorkerStartupFailedException.java index 5f3e9b8..a7f22c0 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/WorkerStartupFailedException.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/WorkerStartupFailedException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,10 +13,13 @@ package net.lax1dude.eaglercraft.v1_8.sp; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp; + public class WorkerStartupFailedException extends RuntimeException { public WorkerStartupFailedException(String msg) { super(msg); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/CrashScreen.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/CrashScreen.java index e19bcd0..792e50e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/CrashScreen.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/CrashScreen.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.sp.internal.ClientPlatformSingleplayer; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.sp.internal.ClientPlatformSingleplayer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.sp.internal.ClientPlatformSingleplayer; + public class CrashScreen { public static void showCrashReportOverlay(String report, int x, int y, int w, int h) { @@ -27,4 +28,4 @@ public class CrashScreen { ClientPlatformSingleplayer.hideCrashReportOverlay(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiNetworkSettingsButton.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiNetworkSettingsButton.java index 4d72bd6..1e491d4 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiNetworkSettingsButton.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiNetworkSettingsButton.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.Mouse; -import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType; -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController; -import net.minecraft.client.Minecraft; -import net.minecraft.client.audio.PositionedSoundRecord; -import net.minecraft.client.gui.Gui; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.ResourceLocation; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.minecraft.util.ResourceLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.Mouse; +import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController; +import net.minecraft.client.Minecraft; +import net.minecraft.client.audio.PositionedSoundRecord; +import net.minecraft.client.gui.Gui; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.ResourceLocation; + public class GuiNetworkSettingsButton extends Gui { private final GuiScreen screen; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenAddRelay.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenAddRelay.java index 9ec28a8..4f70349 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenAddRelay.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenAddRelay.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.Keyboard; -import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent; -import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.gui.GuiTextField; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.Keyboard; +import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent; +import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.resources.I18n; + public class GuiScreenAddRelay extends GuiScreen { /** This GUI's parent GUI. */ diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenBackupWorldSelection.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenBackupWorldSelection.java index 0b8e192..8c4ba50 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenBackupWorldSelection.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenBackupWorldSelection.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.gui; import net.lax1dude.eaglercraft.v1_8.EagRuntime; @@ -14,21 +30,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.util.EnumChatFormatting; import net.minecraft.world.storage.WorldInfo; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 GuiScreenBackupWorldSelection extends GuiScreen { private GuiScreen selectWorld; @@ -136,4 +137,4 @@ public class GuiScreenBackupWorldSelection extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenChangeRelayTimeout.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenChangeRelayTimeout.java index 324258e..6d1df04 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenChangeRelayTimeout.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenChangeRelayTimeout.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenChangeRelayTimeout extends GuiScreen { private GuiScreen parent; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenConnectOption.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenConnectOption.java index 7fed63f..99a40b3 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenConnectOption.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenConnectOption.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiMultiplayer; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.gui.GuiScreenServerList; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiMultiplayer; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.GuiScreenServerList; +import net.minecraft.client.resources.I18n; + public class GuiScreenConnectOption extends GuiScreen { private final GuiMultiplayer guiScreen; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenCreateWorldSelection.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenCreateWorldSelection.java index 1fff1f6..9a75f45 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenCreateWorldSelection.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenCreateWorldSelection.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.FileChooserResult; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiCreateWorld; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.FileChooserResult; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiCreateWorld; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenCreateWorldSelection extends GuiScreen { private GuiScreen mainmenu; @@ -83,4 +84,4 @@ public class GuiScreenCreateWorldSelection extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenDemoIntegratedServerFailed.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenDemoIntegratedServerFailed.java index 5c21f22..1c76bc7 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenDemoIntegratedServerFailed.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenDemoIntegratedServerFailed.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenDemoIntegratedServerFailed extends GuiScreen { private String str1; @@ -35,4 +36,4 @@ public class GuiScreenDemoIntegratedServerFailed extends GuiScreen { super.drawScreen(par1, par2, par3); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenDemoIntegratedServerStartup.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenDemoIntegratedServerStartup.java index 07f40b8..9397f2f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenDemoIntegratedServerStartup.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenDemoIntegratedServerStartup.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; -import net.lax1dude.eaglercraft.v1_8.sp.WorkerStartupFailedException; -import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacket15Crashed; -import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacket1CIssueDetected; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; +import net.lax1dude.eaglercraft.v1_8.sp.WorkerStartupFailedException; +import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacket15Crashed; +import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacket1CIssueDetected; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenDemoIntegratedServerStartup extends GuiScreen { private final GuiScreen contScreen; @@ -99,4 +100,4 @@ public class GuiScreenDemoIntegratedServerStartup extends GuiScreen { return false; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenDemoPlayWorldSelection.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenDemoPlayWorldSelection.java index b2aed38..544ed03 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenDemoPlayWorldSelection.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenDemoPlayWorldSelection.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; -import net.minecraft.world.demo.DemoWorldServer; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.minecraft.world.demo.DemoWorldServer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; +import net.minecraft.world.demo.DemoWorldServer; + public class GuiScreenDemoPlayWorldSelection extends GuiScreen { private GuiScreen mainmenu; @@ -68,4 +69,4 @@ public class GuiScreenDemoPlayWorldSelection extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerBusy.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerBusy.java index 7caf337..10665f7 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerBusy.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerBusy.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import java.util.function.BiConsumer; -import java.util.function.BooleanSupplier; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; -import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacket15Crashed; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiMainMenu; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import java.util.function.BiConsumer; +import java.util.function.BooleanSupplier; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; +import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacket15Crashed; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiMainMenu; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenIntegratedServerBusy extends GuiScreen { public final GuiScreen menu; @@ -168,4 +169,4 @@ public class GuiScreenIntegratedServerBusy extends GuiScreen { return false; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerCrashed.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerCrashed.java index f291c83..53302e6 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerCrashed.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerCrashed.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenIntegratedServerCrashed extends GuiScreen { private GuiScreen mainmenu; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerFailed.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerFailed.java index ac180cc..b2ea619 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerFailed.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerFailed.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; -import net.lax1dude.eaglercraft.v1_8.sp.internal.ClientPlatformSingleplayer; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiMainMenu; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; +import net.lax1dude.eaglercraft.v1_8.sp.internal.ClientPlatformSingleplayer; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiMainMenu; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenIntegratedServerFailed extends GuiScreen { private String str1; @@ -66,4 +67,4 @@ public class GuiScreenIntegratedServerFailed extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerStartup.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerStartup.java index d805c6a..48c2682 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerStartup.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenIntegratedServerStartup.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; -import net.lax1dude.eaglercraft.v1_8.sp.WorkerStartupFailedException; -import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacket15Crashed; -import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacket1CIssueDetected; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiMainMenu; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.gui.GuiSelectWorld; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; +import net.lax1dude.eaglercraft.v1_8.sp.WorkerStartupFailedException; +import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacket15Crashed; +import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacket1CIssueDetected; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiMainMenu; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.GuiSelectWorld; +import net.minecraft.client.resources.I18n; + public class GuiScreenIntegratedServerStartup extends GuiScreen { private final GuiScreen backScreen; @@ -101,4 +102,4 @@ public class GuiScreenIntegratedServerStartup extends GuiScreen { return false; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANConnect.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANConnect.java index 1d6276a..ef843e2 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANConnect.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANConnect.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.Keyboard; -import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.gui.GuiTextField; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.Keyboard; +import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.resources.I18n; + public class GuiScreenLANConnect extends GuiScreen { private final GuiScreen parent; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANConnecting.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANConnecting.java index 02bba8a..6efff00 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANConnecting.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANConnecting.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.gui; import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; @@ -21,21 +37,6 @@ import net.minecraft.util.ChatComponentText; import java.io.IOException; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 GuiScreenLANConnecting extends GuiScreen { private final GuiScreen parent; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANInfo.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANInfo.java index 3057f8c..5b36bf5 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANInfo.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANInfo.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenLANInfo extends GuiScreen { private GuiScreen parent; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANNotSupported.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANNotSupported.java index 5b61570..5854214 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANNotSupported.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenLANNotSupported.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenLANNotSupported extends GuiScreen { private GuiScreen cont; @@ -45,4 +46,4 @@ public class GuiScreenLANNotSupported extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenNameWorldImport.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenNameWorldImport.java index 7414c7c..f67cfce 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenNameWorldImport.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenNameWorldImport.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.Keyboard; -import net.lax1dude.eaglercraft.v1_8.internal.FileChooserResult; -import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent; -import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiCreateWorld; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.gui.GuiTextField; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.Keyboard; +import net.lax1dude.eaglercraft.v1_8.internal.FileChooserResult; +import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent; +import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiCreateWorld; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.resources.I18n; + public class GuiScreenNameWorldImport extends GuiScreen { private GuiScreen parentGuiScreen; private GuiTextField theGuiTextField; @@ -162,4 +163,4 @@ public class GuiScreenNameWorldImport extends GuiScreen { theGuiTextField.fireInputEvent(event, param); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenNoRelays.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenNoRelays.java index fdc4087..7ca05ac 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenNoRelays.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenNoRelays.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenNoRelays extends GuiScreen { private GuiScreen parent; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenOldSeedWarning.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenOldSeedWarning.java index 1ced89b..3a31f08 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenOldSeedWarning.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenOldSeedWarning.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenOldSeedWarning extends GuiScreen { private final GuiScreen cont; @@ -45,4 +46,4 @@ public class GuiScreenOldSeedWarning extends GuiScreen { this.mc.displayGuiScreen(cont); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenRAMDiskModeDetected.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenRAMDiskModeDetected.java index 85eef64..ad70930 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenRAMDiskModeDetected.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenRAMDiskModeDetected.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiMainMenu; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiMainMenu; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenRAMDiskModeDetected extends GuiScreen { private GuiScreen cont; @@ -52,4 +53,4 @@ public class GuiScreenRAMDiskModeDetected extends GuiScreen { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenRelay.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenRelay.java index 25f65c3..8a0742c 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenRelay.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenRelay.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.gui; import net.lax1dude.eaglercraft.v1_8.EagRuntime; @@ -15,21 +31,6 @@ import net.minecraft.util.ResourceLocation; import java.io.IOException; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 GuiScreenRelay extends GuiScreen implements GuiYesNoCallback { private final GuiScreen screen; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenSingleplayerConnecting.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenSingleplayerConnecting.java index b54d823..961070a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenSingleplayerConnecting.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiScreenSingleplayerConnecting.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.gui; import java.io.IOException; @@ -18,21 +34,6 @@ import net.minecraft.network.EnumConnectionState; import net.minecraft.network.login.client.C00PacketLoginStart; import net.minecraft.util.ChatComponentText; -/** - * Copyright (c) 2022-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 GuiScreenSingleplayerConnecting extends GuiScreen { private GuiScreen menu; @@ -134,4 +135,4 @@ public class GuiScreenSingleplayerConnecting extends GuiScreen { return false; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiShareToLan.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiShareToLan.java index 22e4397..455f015 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiShareToLan.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiShareToLan.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.internal.PlatformWebRTC; -import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent; -import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; -import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController; -import net.minecraft.client.LoadingScreenRenderer; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.gui.GuiTextField; -import net.minecraft.client.resources.I18n; -import net.minecraft.util.ChatComponentText; -import net.minecraft.world.WorldSettings; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.minecraft.world.WorldSettings; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.internal.PlatformWebRTC; +import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent; +import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; +import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController; +import net.minecraft.client.LoadingScreenRenderer; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.GuiTextField; +import net.minecraft.client.resources.I18n; +import net.minecraft.util.ChatComponentText; +import net.minecraft.world.WorldSettings; + public class GuiShareToLan extends GuiScreen { /** * A reference to the screen object that created this. Used for navigating diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiSlider2.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiSlider2.java index 2c63698..55f0632 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiSlider2.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiSlider2.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.client.gui.GuiButton; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; + public class GuiSlider2 extends GuiButton { /** The value of this slider control. */ public float sliderValue = 1.0F; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiSlotRelay.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiSlotRelay.java index 44d52c8..efa35bb 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiSlotRelay.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/gui/GuiSlotRelay.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.gui; - -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager; -import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayQuery; -import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayServer; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.Gui; -import net.minecraft.client.gui.GuiSlot; -import net.minecraft.util.ResourceLocation; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import net.minecraft.util.ResourceLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.gui; + +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager; +import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayQuery; +import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayServer; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.Gui; +import net.minecraft.client.gui.GuiSlot; +import net.minecraft.util.ResourceLocation; + class GuiSlotRelay extends GuiSlot { private static final ResourceLocation eaglerGuiTex = new ResourceLocation("eagler:gui/eagler_gui.png"); diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCInputStream.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCInputStream.java index 4949b88..e19834d 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCInputStream.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCInputStream.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.IOException; -import java.io.InputStream; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import java.io.InputStream; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.IOException; +import java.io.InputStream; + public class IPCInputStream extends InputStream { private byte[] currentBuffer = null; @@ -81,4 +82,4 @@ public class IPCInputStream extends InputStream { return currentBuffer.length - idx; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCOutputStream.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCOutputStream.java index b93d35a..aeee6a7 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCOutputStream.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCOutputStream.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.IOException; -import java.io.OutputStream; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import java.io.OutputStream; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.IOException; +import java.io.OutputStream; + public class IPCOutputStream extends OutputStream { private String className = null; @@ -66,4 +67,4 @@ public class IPCOutputStream extends OutputStream { idx += len; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket00StartServer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket00StartServer.java index beb392d..3ca9138 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket00StartServer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket00StartServer.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket00StartServer implements IPCPacketBase { public static final int ID = 0x00; @@ -68,4 +69,4 @@ public class IPCPacket00StartServer implements IPCPacketBase { return IPCPacketBase.strLen(worldName) + IPCPacketBase.strLen(ownerName) + 3; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket01StopServer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket01StopServer.java index d4e679b..66f00ca 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket01StopServer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket01StopServer.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket01StopServer implements IPCPacketBase { public static final int ID = 0x01; @@ -44,4 +45,4 @@ public class IPCPacket01StopServer implements IPCPacketBase { return 0; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket02InitWorld.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket02InitWorld.java index 011213b..9088f34 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket02InitWorld.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket02InitWorld.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket02InitWorld implements IPCPacketBase { public static final int ID = 0x02; @@ -84,4 +85,4 @@ public class IPCPacket02InitWorld implements IPCPacketBase { return IPCPacketBase.strLen(worldName) + 1 + 1 + IPCPacketBase.strLen(worldArgs) + 8 + 4; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket03DeleteWorld.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket03DeleteWorld.java index bec562a..35c8491 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket03DeleteWorld.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket03DeleteWorld.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket03DeleteWorld implements IPCPacketBase { public static final int ID = 0x03; @@ -52,4 +53,4 @@ public class IPCPacket03DeleteWorld implements IPCPacketBase { return IPCPacketBase.strLen(worldName); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket04RenameWorld.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket04RenameWorld.java index 9227edd..7643ea4 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket04RenameWorld.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket04RenameWorld.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket04RenameWorld implements IPCPacketBase { public static final int ID = 0x04; @@ -64,4 +65,4 @@ public class IPCPacket04RenameWorld implements IPCPacketBase { return IPCPacketBase.strLen(worldOldName) + IPCPacketBase.strLen(worldNewName) + IPCPacketBase.strLen(displayName) + 1; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket05RequestData.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket05RequestData.java index 719ae15..f083aca 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket05RequestData.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket05RequestData.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket05RequestData implements IPCPacketBase { public static final int ID = 0x05; @@ -60,4 +61,4 @@ public class IPCPacket05RequestData implements IPCPacketBase { return IPCPacketBase.strLen(worldName) + 1; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket06RenameWorldNBT.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket06RenameWorldNBT.java index 1f28d36..cef826a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket06RenameWorldNBT.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket06RenameWorldNBT.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket06RenameWorldNBT implements IPCPacketBase { public static final int ID = 0x06; @@ -60,4 +61,4 @@ public class IPCPacket06RenameWorldNBT implements IPCPacketBase { return IPCPacketBase.strLen(worldName) + IPCPacketBase.strLen(displayName) + 1; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket07ImportWorld.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket07ImportWorld.java index 36d3204..511af31 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket07ImportWorld.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket07ImportWorld.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket07ImportWorld implements IPCPacketBase { public static final int ID = 0x07; @@ -69,4 +70,4 @@ public class IPCPacket07ImportWorld implements IPCPacketBase { return IPCPacketBase.strLen(worldName) + worldData.length + 6; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket09RequestResponse.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket09RequestResponse.java index aa06668..4b58ae6 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket09RequestResponse.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket09RequestResponse.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket09RequestResponse implements IPCPacketBase { public static final int ID = 0x09; @@ -54,4 +55,4 @@ public class IPCPacket09RequestResponse implements IPCPacketBase { return 4 + response.length; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0ASetWorldDifficulty.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0ASetWorldDifficulty.java index 9179054..c8a91b5 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0ASetWorldDifficulty.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0ASetWorldDifficulty.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket0ASetWorldDifficulty implements IPCPacketBase { public static final int ID = 0x0A; @@ -52,4 +53,4 @@ public class IPCPacket0ASetWorldDifficulty implements IPCPacketBase { return 1; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0BPause.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0BPause.java index 133ddb4..d060f4c 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0BPause.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0BPause.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket0BPause implements IPCPacketBase { public static final int ID = 0x0B; @@ -52,4 +53,4 @@ public class IPCPacket0BPause implements IPCPacketBase { return 1; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0CPlayerChannel.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0CPlayerChannel.java index c5d3ff1..b50b255 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0CPlayerChannel.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0CPlayerChannel.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket0CPlayerChannel implements IPCPacketBase { public static final int ID = 0x0C; @@ -56,4 +57,4 @@ public class IPCPacket0CPlayerChannel implements IPCPacketBase { return IPCPacketBase.strLen(channel) + 1; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0DProgressUpdate.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0DProgressUpdate.java index 0772ead..bd9fe73 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0DProgressUpdate.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0DProgressUpdate.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket0DProgressUpdate implements IPCPacketBase { public static final int ID = 0x0D; @@ -56,4 +57,4 @@ public class IPCPacket0DProgressUpdate implements IPCPacketBase { return IPCPacketBase.strLen(updateMessage) + 4; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0EListWorlds.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0EListWorlds.java index 9b961d2..54ea259 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0EListWorlds.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0EListWorlds.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket0EListWorlds implements IPCPacketBase { public static final int ID = 0x0E; @@ -44,4 +45,4 @@ public class IPCPacket0EListWorlds implements IPCPacketBase { return 0; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0FListFiles.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0FListFiles.java index 35ccbb9..ec62b0c 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0FListFiles.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket0FListFiles.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket0FListFiles implements IPCPacketBase { public static final int ID = 0x0F; @@ -52,4 +53,4 @@ public class IPCPacket0FListFiles implements IPCPacketBase { return IPCPacketBase.strLen(path); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket10FileRead.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket10FileRead.java index 74c10ba..c512d0c 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket10FileRead.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket10FileRead.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket10FileRead implements IPCPacketBase { public static final int ID = 0x10; @@ -52,4 +53,4 @@ public class IPCPacket10FileRead implements IPCPacketBase { return IPCPacketBase.strLen(file); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket12FileWrite.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket12FileWrite.java index 97a6bbb..3c421b2 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket12FileWrite.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket12FileWrite.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket12FileWrite implements IPCPacketBase { public static final int ID = 0x12; @@ -56,4 +57,4 @@ public class IPCPacket12FileWrite implements IPCPacketBase { return IPCPacketBase.strLen(path) + 4 + data.length; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket13FileCopyMove.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket13FileCopyMove.java index 9fbe57b..ae8ffb7 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket13FileCopyMove.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket13FileCopyMove.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket13FileCopyMove implements IPCPacketBase { public static final int ID = 0x13; @@ -60,4 +61,4 @@ public class IPCPacket13FileCopyMove implements IPCPacketBase { return IPCPacketBase.strLen(fileOldName) + IPCPacketBase.strLen(fileNewName) + 1; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket14StringList.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket14StringList.java index bf800a2..3774a0f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket14StringList.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket14StringList.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import java.util.List; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + public class IPCPacket14StringList implements IPCPacketBase { public static final int ID = 0x14; @@ -93,4 +94,4 @@ public class IPCPacket14StringList implements IPCPacketBase { return len; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket15Crashed.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket15Crashed.java index 9cb5aea..09f5d7e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket15Crashed.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket15Crashed.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,14 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; +import java.nio.charset.StandardCharsets; + public class IPCPacket15Crashed implements IPCPacketBase { public static final int ID = 0x15; @@ -34,12 +36,17 @@ public class IPCPacket15Crashed implements IPCPacketBase { @Override public void deserialize(DataInput bin) throws IOException { - crashReport = bin.readUTF(); + int len = bin.readInt(); + byte[] bytes = new byte[len]; + bin.readFully(bytes); + crashReport = new String(bytes, StandardCharsets.UTF_8); } @Override public void serialize(DataOutput bin) throws IOException { - bin.writeUTF(crashReport); + byte[] bytes = crashReport.getBytes(StandardCharsets.UTF_8); + bin.writeInt(bytes.length); + bin.write(bytes); } @Override @@ -49,7 +56,7 @@ public class IPCPacket15Crashed implements IPCPacketBase { @Override public int size() { - return IPCPacketBase.strLen(crashReport); + return IPCPacketBase.strLen(crashReport) + 2; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket16NBTList.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket16NBTList.java index 17c2a42..a47c193 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket16NBTList.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket16NBTList.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.ipc; import java.io.DataInput; @@ -14,21 +30,6 @@ import net.lax1dude.eaglercraft.v1_8.EaglerOutputStream; import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.NBTTagCompound; -/** - * Copyright (c) 2023-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 IPCPacket16NBTList implements IPCPacketBase { public static final int ID = 0x16; @@ -109,4 +110,4 @@ public class IPCPacket16NBTList implements IPCPacketBase { return len; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket17ConfigureLAN.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket17ConfigureLAN.java index 0d1bf6a..403fb92 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket17ConfigureLAN.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket17ConfigureLAN.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import java.util.List; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + public class IPCPacket17ConfigureLAN implements IPCPacketBase { public static final int ID = 0x17; @@ -75,4 +76,4 @@ public class IPCPacket17ConfigureLAN implements IPCPacketBase { return 2 + 1 + s; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket18ClearPlayers.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket18ClearPlayers.java index 8c400ea..2fb72d5 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket18ClearPlayers.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket18ClearPlayers.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket18ClearPlayers implements IPCPacketBase { public static final int ID = 0x18; @@ -52,4 +53,4 @@ public class IPCPacket18ClearPlayers implements IPCPacketBase { return IPCPacketBase.strLen(worldName); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket19Autosave.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket19Autosave.java index 3dfe52a..9197eaa 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket19Autosave.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket19Autosave.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket19Autosave implements IPCPacketBase { public static final int ID = 0x19; @@ -44,4 +45,4 @@ public class IPCPacket19Autosave implements IPCPacketBase { return 0; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket1ALoggerMessage.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket1ALoggerMessage.java index b2ed0e5..25cbc00 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket1ALoggerMessage.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket1ALoggerMessage.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket1ALoggerMessage implements IPCPacketBase { public static final int ID = 0x1A; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket1BEnableLogging.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket1BEnableLogging.java index f97cece..4d815dc 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket1BEnableLogging.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket1BEnableLogging.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket1BEnableLogging implements IPCPacketBase { public static final int ID = 0x1B; @@ -52,4 +53,4 @@ public class IPCPacket1BEnableLogging implements IPCPacketBase { return 1; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket1CIssueDetected.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket1CIssueDetected.java index f4ca120..db302b6 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket1CIssueDetected.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacket1CIssueDetected.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacket1CIssueDetected implements IPCPacketBase { public static final int ID = 0x1C; @@ -54,4 +55,4 @@ public class IPCPacket1CIssueDetected implements IPCPacketBase { return 1; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacketBase.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacketBase.java index 18eb80b..9b6526a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacketBase.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacketBase.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public interface IPCPacketBase { public void deserialize(DataInput bin) throws IOException; @@ -45,4 +46,4 @@ public interface IPCPacketBase { return utflen; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacketFFProcessKeepAlive.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacketFFProcessKeepAlive.java index c779b99..d0a4f03 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacketFFProcessKeepAlive.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacketFFProcessKeepAlive.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.IOException; + public class IPCPacketFFProcessKeepAlive implements IPCPacketBase { public static final int ID = 0xFF; @@ -56,4 +57,4 @@ public class IPCPacketFFProcessKeepAlive implements IPCPacketBase { return 1; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacketManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacketManager.java index d56c248..1ebe076 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacketManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/ipc/IPCPacketManager.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.ipc; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.util.function.Supplier; - -import com.carrotsearch.hppc.IntObjectHashMap; -import com.carrotsearch.hppc.IntObjectMap; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import com.carrotsearch.hppc.IntObjectMap; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.ipc; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.util.function.Supplier; + +import com.carrotsearch.hppc.IntObjectHashMap; +import com.carrotsearch.hppc.IntObjectMap; + public class IPCPacketManager { public static final IntObjectMap> mappings = new IntObjectHashMap<>(); @@ -96,4 +97,4 @@ public class IPCPacketManager { return p; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANClientNetworkManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANClientNetworkManager.java index 8cb9960..1d5be8a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANClientNetworkManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANClientNetworkManager.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.lan; import net.lax1dude.eaglercraft.v1_8.EagRuntime; @@ -22,21 +38,6 @@ import java.io.IOException; import java.util.ArrayList; import java.util.List; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 LANClientNetworkManager extends EaglercraftNetworkManager { private static final Logger logger = LogManager.getLogger("LANClientNetworkManager"); diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANClientPeer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANClientPeer.java index 6b955ca..5c7ed00 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANClientPeer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANClientPeer.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.lan; import java.util.LinkedList; @@ -13,21 +29,6 @@ import net.lax1dude.eaglercraft.v1_8.sp.internal.ClientPlatformSingleplayer; import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket03ICECandidate; import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket04Description; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. - * - */ class LANClientPeer { private static final Logger logger = LogManager.getLogger("LANClientPeer"); diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANPeerEvent.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANPeerEvent.java index 598f5de..a8e1a13 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANPeerEvent.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANPeerEvent.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.lan; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.sp.lan; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.lan; + public interface LANPeerEvent { String getPeerId(); @@ -100,4 +101,4 @@ public interface LANPeerEvent { } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANServerController.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANServerController.java index e03f5bd..82d46ec 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANServerController.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANServerController.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.lan; import java.util.ArrayList; @@ -17,21 +33,6 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager; import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayServerSocket; import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.*; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 LANServerController { public static final Logger logger = LogManager.getLogger("LANServerController"); @@ -211,4 +212,4 @@ public class LANServerController { public static boolean supported() { return PlatformWebRTC.supported(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANServerList.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANServerList.java index 5084fd5..33ea739 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANServerList.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/lan/LANServerList.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.lan; import java.util.HashSet; @@ -17,21 +33,6 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayServer; import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayWorldsQuery; import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket07LocalWorlds; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 LANServerList { private final List lanServersList = new LinkedList<>(); @@ -166,4 +167,4 @@ public class LANServerList { } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayEntry.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayEntry.java index d6bb4d8..da90306 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayEntry.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayEntry.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.sp.relay; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay; + public class RelayEntry { public final String address; @@ -27,4 +28,4 @@ public class RelayEntry { this.primary = primary; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayLoggerImpl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayLoggerImpl.java index 306fd4b..93bc7e5 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayLoggerImpl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayLoggerImpl.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay; - -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.IRelayLogger; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.IRelayLogger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay; + +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.IRelayLogger; + public class RelayLoggerImpl implements IRelayLogger { private final Logger impl; @@ -51,4 +52,4 @@ public class RelayLoggerImpl implements IRelayLogger { impl.error(th); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayManager.java index 29ea993..0b16fb6 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayManager.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.relay; import java.io.IOException; @@ -21,21 +37,6 @@ import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 RelayManager { public static final Logger logger = LogManager.getLogger("RelayManager"); @@ -419,4 +420,4 @@ public class RelayManager { return null; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQuery.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQuery.java index f8c2650..303b610 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQuery.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQuery.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.sp.relay; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay; + public interface RelayQuery { enum RateLimit { @@ -41,4 +42,4 @@ public interface RelayQuery { VersionMismatch getCompatible(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQueryDispatch.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQueryDispatch.java index a6b155f..019c36c 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQueryDispatch.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQueryDispatch.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.sp.relay; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay; + public class RelayQueryDispatch { public static RelayQuery openRelayQuery(String addr) { @@ -41,4 +42,4 @@ public class RelayQueryDispatch { return new RelayServerSocketImpl(addr, timeout); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQueryImpl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQueryImpl.java index 7ec3b58..c4a0743 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQueryImpl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQueryImpl.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.relay; import java.io.DataInputStream; @@ -19,21 +35,6 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket70SpecialUpdate; import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacketFFErrorCode; import net.lax1dude.eaglercraft.v1_8.update.UpdateService; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 RelayQueryImpl implements RelayQuery { private static final Logger logger = LogManager.getLogger("RelayQuery"); @@ -65,6 +66,7 @@ public class RelayQueryImpl implements RelayQuery { try { connectionOpenedAt = EagRuntime.steadyTimeMillis(); s = PlatformNetworking.openWebSocketUnsafe(uri); + s.setEnableStringFrames(false); }catch(Throwable t) { connectionOpenedAt = 0l; sock = null; @@ -78,10 +80,6 @@ public class RelayQueryImpl implements RelayQuery { @Override public void update() { if(sock == null) return; - if(sock.availableStringFrames() > 0) { - logger.warn("[{}] discarding {} string frames recieved on a binary connection", uri, sock.availableStringFrames()); - sock.clearStringFrames(); - } List frames = sock.getNextBinaryFrames(); if(frames != null) { for(int i = 0, l = frames.size(); i < l; ++i) { @@ -222,4 +220,4 @@ public class RelayQueryImpl implements RelayQuery { return versError; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQueryRateLimitDummy.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQueryRateLimitDummy.java index c740fa9..e627e3f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQueryRateLimitDummy.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayQueryRateLimitDummy.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.sp.relay; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay; + public class RelayQueryRateLimitDummy implements RelayQuery { private final RateLimit type; @@ -72,4 +73,4 @@ public class RelayQueryRateLimitDummy implements RelayQuery { return VersionMismatch.COMPATIBLE; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServer.java index c81b4ff..6ba70e6 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServer.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.EagUtils; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformWebRTC; -import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayQuery.VersionMismatch; -import net.minecraft.client.Minecraft; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.minecraft.client.Minecraft; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.EagUtils; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformWebRTC; +import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayQuery.VersionMismatch; +import net.minecraft.client.Minecraft; + public class RelayServer { public final String address; @@ -145,4 +146,4 @@ public class RelayServer { return RelayQueryDispatch.openRelayConnection(address, Minecraft.getMinecraft().gameSettings.relayTimeout * 1000); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerRateLimitTracker.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerRateLimitTracker.java index 0ecca12..4600cb7 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerRateLimitTracker.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerRateLimitTracker.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay; - -import java.util.HashMap; -import java.util.Map; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.EagRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay; + +import java.util.HashMap; +import java.util.Map; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; + public class RelayServerRateLimitTracker { private static final Map relayQueryLimited = new HashMap<>(); @@ -95,4 +96,4 @@ public class RelayServerRateLimitTracker { return RelayQuery.RateLimit.NONE; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerSocket.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerSocket.java index 33fa3e9..9dc6f14 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerSocket.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerSocket.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay; - -import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay; + +import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket; + public interface RelayServerSocket { void update(); @@ -36,4 +37,4 @@ public interface RelayServerSocket { String getURI(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerSocketImpl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerSocketImpl.java index 7c0fb50..fb462e8 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerSocketImpl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerSocketImpl.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.relay; import java.io.DataInputStream; @@ -16,21 +32,6 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket; import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket70SpecialUpdate; import net.lax1dude.eaglercraft.v1_8.update.UpdateService; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 RelayServerSocketImpl implements RelayServerSocket { private static final Logger logger = LogManager.getLogger("RelayServerSocket"); @@ -50,6 +51,7 @@ public class RelayServerSocketImpl implements RelayServerSocket { IWebSocketClient s; try { s = PlatformNetworking.openWebSocketUnsafe(uri); + s.setEnableStringFrames(false); }catch(Throwable t) { exceptions.add(t); sock = null; @@ -62,10 +64,6 @@ public class RelayServerSocketImpl implements RelayServerSocket { @Override public void update() { if(sock == null) return; - if(sock.availableStringFrames() > 0) { - logger.warn("[{}] discarding {} string frames recieved on a binary connection", uri, sock.availableStringFrames()); - sock.clearStringFrames(); - } List frames = sock.getNextBinaryFrames(); if(frames != null) { for(int i = 0, l = frames.size(); i < l; ++i) { @@ -170,4 +168,4 @@ public class RelayServerSocketImpl implements RelayServerSocket { return uri; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerSocketRateLimitDummy.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerSocketRateLimitDummy.java index 6e052e1..64a3295 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerSocketRateLimitDummy.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayServerSocketRateLimitDummy.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay; - -import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay; + +import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket; + public class RelayServerSocketRateLimitDummy implements RelayServerSocket { private final RelayQuery.RateLimit limit; @@ -77,4 +78,4 @@ public class RelayServerSocketRateLimitDummy implements RelayServerSocket { return ""; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayWorldsQuery.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayWorldsQuery.java index e1f1615..403a15a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayWorldsQuery.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayWorldsQuery.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay; - -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayQuery.VersionMismatch; -import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket07LocalWorlds; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket07LocalWorlds; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay; + +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayQuery.VersionMismatch; +import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket07LocalWorlds; + public interface RelayWorldsQuery { void update(); @@ -32,4 +33,4 @@ public interface RelayWorldsQuery { VersionMismatch getCompatible(); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayWorldsQueryImpl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayWorldsQueryImpl.java index d849d12..d4a6b47 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayWorldsQueryImpl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayWorldsQueryImpl.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.relay; import java.io.DataInputStream; @@ -20,21 +36,6 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket70SpecialUpdate; import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacketFFErrorCode; import net.lax1dude.eaglercraft.v1_8.update.UpdateService; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 RelayWorldsQueryImpl implements RelayWorldsQuery { private static final Logger logger = LogManager.getLogger("RelayWorldsQuery"); @@ -61,6 +62,7 @@ public class RelayWorldsQueryImpl implements RelayWorldsQuery { try { openedAt = EagRuntime.steadyTimeMillis(); s = PlatformNetworking.openWebSocketUnsafe(uri); + s.setEnableStringFrames(false); }catch(Throwable t) { sock = null; failed = true; @@ -72,10 +74,6 @@ public class RelayWorldsQueryImpl implements RelayWorldsQuery { @Override public void update() { if(sock == null) return; - if(sock.availableStringFrames() > 0) { - logger.warn("[{}] discarding {} string frames recieved on a binary connection", uri, sock.availableStringFrames()); - sock.clearStringFrames(); - } List frames = sock.getNextBinaryFrames(); if(frames != null) { for(int i = 0, l = frames.size(); i < l; ++i) { @@ -194,4 +192,4 @@ public class RelayWorldsQueryImpl implements RelayWorldsQuery { return versError; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayWorldsQueryRateLimitDummy.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayWorldsQueryRateLimitDummy.java index cb802f3..e4d790a 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayWorldsQueryRateLimitDummy.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/relay/RelayWorldsQueryRateLimitDummy.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay; - -import java.util.ArrayList; -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket07LocalWorlds; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket07LocalWorlds; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay; + +import java.util.ArrayList; +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket07LocalWorlds; + public class RelayWorldsQueryRateLimitDummy implements RelayWorldsQuery { private final RelayQuery.RateLimit rateLimit; @@ -61,4 +62,4 @@ public class RelayWorldsQueryRateLimitDummy implements RelayWorldsQuery { return RelayQuery.VersionMismatch.COMPATIBLE; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/ClientCommandDummy.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/ClientCommandDummy.java index 48ab887..9653903 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/ClientCommandDummy.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/ClientCommandDummy.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server; - -import net.minecraft.command.CommandBase; -import net.minecraft.command.CommandException; -import net.minecraft.command.ICommandSender; -import net.minecraft.util.ChatComponentTranslation; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.minecraft.util.ChatComponentTranslation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server; + +import net.minecraft.command.CommandBase; +import net.minecraft.command.CommandException; +import net.minecraft.command.ICommandSender; +import net.minecraft.util.ChatComponentTranslation; + public class ClientCommandDummy extends CommandBase { private final String commandName; @@ -52,4 +53,4 @@ public class ClientCommandDummy extends CommandBase { var1.addChatMessage(new ChatComponentTranslation("command.clientStub")); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerChunkLoader.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerChunkLoader.java index a10837f..f4a9637 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerChunkLoader.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerChunkLoader.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server; import java.io.IOException; @@ -14,21 +30,6 @@ import net.minecraft.world.chunk.storage.AnvilChunkLoader; import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.NBTTagCompound; -/** - * Copyright (c) 2023-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 EaglerChunkLoader extends AnvilChunkLoader { private static final String hex = "0123456789ABCDEF"; @@ -114,4 +115,4 @@ public class EaglerChunkLoader extends AnvilChunkLoader { // ? } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerIntegratedServerWorker.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerIntegratedServerWorker.java index 0d09532..1f28b08 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerIntegratedServerWorker.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerIntegratedServerWorker.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server; import java.io.IOException; @@ -34,21 +50,6 @@ import net.lax1dude.eaglercraft.v1_8.sp.server.socket.IntegratedServerPlayerNetw import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.NBTTagCompound; -/** - * Copyright (c) 2023-2024 lax1dude, ayunami2000. 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 EaglerIntegratedServerWorker { public static final Logger logger = LogManager.getLogger("EaglerIntegratedServer"); @@ -86,7 +87,8 @@ public class EaglerIntegratedServerWorker { } } } - if(ServerPlatformSingleplayer.isTabAboutToCloseWASM() && !isServerStopped()) { + if (!ServerPlatformSingleplayer.isSingleThreadMode() && ServerPlatformSingleplayer.isTabAboutToCloseWASM() + && !isServerStopped()) { logger.info("Autosaving worlds because the tab is about to close!"); currentProcess.getConfigurationManager().saveAllPlayerData(); currentProcess.saveAllWorlds(false); @@ -539,4 +541,4 @@ public class EaglerIntegratedServerWorker { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerMinecraftServer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerMinecraftServer.java index 14e547b..4a26443 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerMinecraftServer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerMinecraftServer.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server; import java.io.IOException; @@ -21,21 +37,6 @@ import net.lax1dude.eaglercraft.v1_8.sp.server.skins.IntegratedCapeService; import net.lax1dude.eaglercraft.v1_8.sp.server.skins.IntegratedSkinService; import net.lax1dude.eaglercraft.v1_8.sp.server.voice.IntegratedVoiceService; -/** - * Copyright (c) 2023-2024 lax1dude, ayunami2000. 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 EaglerMinecraftServer extends MinecraftServer { public static final Logger logger = EaglerIntegratedServerWorker.logger; @@ -316,4 +317,4 @@ public class EaglerMinecraftServer extends MinecraftServer { return null; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerPlayerList.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerPlayerList.java index d1cd4ce..55572ac 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerPlayerList.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerPlayerList.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server; - -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.server.MinecraftServer; -import net.minecraft.server.management.ServerConfigurationManager; -import net.minecraft.nbt.NBTTagCompound; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.minecraft.nbt.NBTTagCompound; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server; + +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.server.MinecraftServer; +import net.minecraft.server.management.ServerConfigurationManager; +import net.minecraft.nbt.NBTTagCompound; + public class EaglerPlayerList extends ServerConfigurationManager { private NBTTagCompound hostPlayerNBT = null; @@ -47,4 +48,4 @@ public class EaglerPlayerList extends ServerConfigurationManager { svr.skinService.unregisterPlayer(playerIn.getUniqueID()); svr.capeService.unregisterPlayer(playerIn.getUniqueID()); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerSaveFormat.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerSaveFormat.java index 56af6a7..6778d87 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerSaveFormat.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerSaveFormat.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server; import java.util.ArrayList; @@ -13,21 +29,6 @@ import net.minecraft.world.storage.SaveFormatComparator; import net.minecraft.world.storage.SaveFormatOld; import net.minecraft.world.storage.WorldInfo; -/** - * Copyright (c) 2023-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 EaglerSaveFormat extends SaveFormatOld { public EaglerSaveFormat(VFile2 parFile) { @@ -112,4 +113,4 @@ public class EaglerSaveFormat extends SaveFormatOld { worldsList.setAllChars(String.join("\n", worldsTxt)); return renameWorld(newFolderName, displayName); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerSaveHandler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerSaveHandler.java index 449ed9a..53402be 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerSaveHandler.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/EaglerSaveHandler.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server; - -import net.lax1dude.eaglercraft.v1_8.internal.vfs2.VFile2; -import net.minecraft.world.WorldProvider; -import net.minecraft.world.chunk.storage.IChunkLoader; -import net.minecraft.world.storage.SaveHandler; -import net.minecraft.world.storage.WorldInfo; -import net.minecraft.nbt.NBTTagCompound; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.minecraft.nbt.NBTTagCompound; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server; + +import net.lax1dude.eaglercraft.v1_8.internal.vfs2.VFile2; +import net.minecraft.world.WorldProvider; +import net.minecraft.world.chunk.storage.IChunkLoader; +import net.minecraft.world.storage.SaveHandler; +import net.minecraft.world.storage.WorldInfo; +import net.minecraft.nbt.NBTTagCompound; + public class EaglerSaveHandler extends SaveHandler { public EaglerSaveHandler(VFile2 savesDirectory, String directoryName) { @@ -36,4 +37,4 @@ public class EaglerSaveHandler extends SaveHandler { worldInformation.setSaveVersion(19133); super.saveWorldInfoWithPlayer(worldInformation, tagCompound); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/GenLayerEaglerRivers.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/GenLayerEaglerRivers.java index 81946ed..3f6a96e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/GenLayerEaglerRivers.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/GenLayerEaglerRivers.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server; - -import net.minecraft.world.biome.BiomeGenBase; -import net.minecraft.world.gen.layer.GenLayer; -import net.minecraft.world.gen.layer.IntCache; - -/** +/* * Copyright (c) 2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.world.gen.layer.IntCache; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server; + +import net.minecraft.world.biome.BiomeGenBase; +import net.minecraft.world.gen.layer.GenLayer; +import net.minecraft.world.gen.layer.IntCache; + public class GenLayerEaglerRivers extends GenLayer { private static final int[] pattern = new int[] { @@ -104,4 +105,4 @@ public class GenLayerEaglerRivers extends GenLayer { return aint1; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/IWASMCrashCallback.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/IWASMCrashCallback.java index 54eea61..9c72c0f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/IWASMCrashCallback.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/IWASMCrashCallback.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,8 +13,11 @@ package net.lax1dude.eaglercraft.v1_8.sp.server; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server; + public interface IWASMCrashCallback { void callback(String crashReport, boolean terminated); -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/WorldsDB.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/WorldsDB.java index 01aa28d..01fd084 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/WorldsDB.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/WorldsDB.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server; - -import java.util.function.Supplier; - -import net.lax1dude.eaglercraft.v1_8.internal.IEaglerFilesystem; -import net.lax1dude.eaglercraft.v1_8.internal.vfs2.VFile2; -import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplayer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplay * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server; + +import java.util.function.Supplier; + +import net.lax1dude.eaglercraft.v1_8.internal.IEaglerFilesystem; +import net.lax1dude.eaglercraft.v1_8.internal.vfs2.VFile2; +import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplayer; + public class WorldsDB { private static final Supplier fsGetter = ServerPlatformSingleplayer::getWorldsDatabase; @@ -29,4 +30,4 @@ public class WorldsDB { return VFile2.create(fsGetter, path); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/EPKCompiler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/EPKCompiler.java index c0c3cb0..d90f18e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/EPKCompiler.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/EPKCompiler.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.export; - -import java.io.IOException; -import java.io.OutputStream; -import java.nio.charset.StandardCharsets; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.zip.CRC32; - -import net.lax1dude.eaglercraft.v1_8.EaglerOutputStream; -import net.lax1dude.eaglercraft.v1_8.EaglerZLIB; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.lax1dude.eaglercraft.v1_8.EaglerZLIB; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.export; + +import java.io.IOException; +import java.io.OutputStream; +import java.nio.charset.StandardCharsets; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.zip.CRC32; + +import net.lax1dude.eaglercraft.v1_8.EaglerOutputStream; +import net.lax1dude.eaglercraft.v1_8.EaglerZLIB; + public class EPKCompiler { private final EaglerOutputStream os; @@ -181,4 +182,4 @@ public class EPKCompiler { os.write((int)(i & 0xFFl)); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/EPKDecompiler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/EPKDecompiler.java index 0761458..af62c91 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/EPKDecompiler.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/EPKDecompiler.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.export; - -import java.io.ByteArrayInputStream; -import java.io.Closeable; -import java.io.IOException; -import java.io.InputStream; -import java.util.Arrays; -import java.util.zip.CRC32; - -import net.lax1dude.eaglercraft.v1_8.EaglerZLIB; -import net.lax1dude.eaglercraft.v1_8.IOUtils; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.lax1dude.eaglercraft.v1_8.IOUtils; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.export; + +import java.io.ByteArrayInputStream; +import java.io.Closeable; +import java.io.IOException; +import java.io.InputStream; +import java.util.Arrays; +import java.util.zip.CRC32; + +import net.lax1dude.eaglercraft.v1_8.EaglerZLIB; +import net.lax1dude.eaglercraft.v1_8.IOUtils; + public class EPKDecompiler implements Closeable { public static class FileEntry { @@ -184,4 +185,4 @@ public class EPKDecompiler implements Closeable { zis.close(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/RandomAccessMemoryFile.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/RandomAccessMemoryFile.java index 4a0c884..981487d 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/RandomAccessMemoryFile.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/RandomAccessMemoryFile.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.export; - -import java.io.DataInput; -import java.io.DataOutput; -import java.io.EOFException; -import java.io.IOException; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.export; + +import java.io.DataInput; +import java.io.DataOutput; +import java.io.EOFException; +import java.io.IOException; + public class RandomAccessMemoryFile implements DataInput, DataOutput { private byte[] buffer; @@ -307,4 +308,4 @@ public class RandomAccessMemoryFile implements DataInput, DataOutput { public final void writeUTF(String str) throws IOException { throw new IOException("TODO"); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/WorldConverterEPK.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/WorldConverterEPK.java index c1ab282..0824765 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/WorldConverterEPK.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/WorldConverterEPK.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server.export; import java.io.IOException; @@ -15,21 +31,6 @@ import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.storage.WorldInfo; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 WorldConverterEPK { private static final Logger logger = LogManager.getLogger("WorldConverterEPK"); @@ -133,4 +134,4 @@ public class WorldConverterEPK { return r; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/WorldConverterMCA.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/WorldConverterMCA.java index 398b4b4..61ca6b2 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/WorldConverterMCA.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/export/WorldConverterMCA.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server.export; import java.io.DataOutputStream; @@ -25,21 +41,6 @@ import net.minecraft.world.storage.WorldInfo; import net.minecraft.nbt.CompressedStreamTools; import net.minecraft.nbt.NBTTagCompound; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 WorldConverterMCA { private static final Logger logger = LogManager.getLogger("WorldConverterMCA"); @@ -307,4 +308,4 @@ public class WorldConverterMCA { return bao.toByteArray(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/CustomSkullData.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/CustomSkullData.java index 63dda81..9df49ad 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/CustomSkullData.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/CustomSkullData.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.skins; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketOtherSkinCustomV3EAG; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.util.SkinPacketVersionCache; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.util.SkinPacketVersionCache * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.skins; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketOtherSkinCustomV3EAG; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.util.SkinPacketVersionCache; + public class CustomSkullData { public String skinURL; @@ -47,4 +48,4 @@ public class CustomSkullData { return SkinPacketVersionCache.rewriteUUID(skinData.get(protocol), uuid.getMostSignificantBits(), uuid.getLeastSignificantBits()); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedCapePackets.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedCapePackets.java index d5be9fc..57d5dfe 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedCapePackets.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedCapePackets.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.skins; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketOtherCapeCustomEAG; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketOtherCapePresetEAG; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketOtherCape * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.skins; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketOtherCapeCustomEAG; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketOtherCapePresetEAG; + public class IntegratedCapePackets { public static final int PACKET_MY_CAPE_PRESET = 0x01; @@ -58,4 +59,4 @@ public class IntegratedCapePackets { capeService.registerEaglercraftPlayer(clientUUID, new SPacketOtherCapePresetEAG(clientUUID.msb, clientUUID.lsb, 0)); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedCapeService.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedCapeService.java index 84bb813..ce2e37c 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedCapeService.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedCapeService.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.skins; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Map; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketOtherCapePresetEAG; -import net.minecraft.entity.player.EntityPlayerMP; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.minecraft.entity.player.EntityPlayerMP; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.skins; + +import java.io.IOException; +import java.util.HashMap; +import java.util.Map; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketOtherCapePresetEAG; +import net.minecraft.entity.player.EntityPlayerMP; + public class IntegratedCapeService { public static final Logger logger = LogManager.getLogger("IntegratedCapeService"); @@ -61,4 +62,4 @@ public class IntegratedCapeService { capesCache.remove(playerUUID); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedSkinPackets.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedSkinPackets.java index b41a24b..500f3c0 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedSkinPackets.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedSkinPackets.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.skins; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.*; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.util.SkinPacketVersionCache; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.util.SkinPacketVersionCache * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.skins; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.*; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.util.SkinPacketVersionCache; + public class IntegratedSkinPackets { public static final int PACKET_MY_SKIN_PRESET = 0x01; @@ -116,4 +117,4 @@ public class IntegratedSkinPackets { return "slim".equalsIgnoreCase(modelName) ? 1 : 0; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedSkinService.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedSkinService.java index e4a5601..9a62b8d 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedSkinService.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/skins/IntegratedSkinService.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server.skins; import java.io.IOException; @@ -26,21 +42,6 @@ import net.minecraft.nbt.NBTTagCompound; import net.minecraft.nbt.NBTTagList; import net.minecraft.nbt.NBTTagString; -/** - * Copyright (c) 2022-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 IntegratedSkinService { public static final Logger logger = LogManager.getLogger("IntegratedSkinService"); @@ -206,4 +207,4 @@ public class IntegratedSkinService { } } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/IntegratedServerPlayerNetworkManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/IntegratedServerPlayerNetworkManager.java index 56e58f7..fdebb03 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/IntegratedServerPlayerNetworkManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/IntegratedServerPlayerNetworkManager.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server.socket; import java.io.DataOutputStream; @@ -27,21 +43,6 @@ import net.minecraft.util.IChatComponent; import net.minecraft.util.ITickable; import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplayer; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 IntegratedServerPlayerNetworkManager { private INetHandler nethandler = null; @@ -299,4 +300,4 @@ public class IntegratedServerPlayerNetworkManager { ((ITickable)nethandler).update(); } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/NetHandlerHandshakeEagler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/NetHandlerHandshakeEagler.java index 85115b5..d09d5be 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/NetHandlerHandshakeEagler.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/NetHandlerHandshakeEagler.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.socket; - -import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerMinecraftServer; -import net.minecraft.network.handshake.INetHandlerHandshakeServer; -import net.minecraft.network.handshake.client.C00Handshake; -import net.minecraft.server.network.NetHandlerLoginServer; -import net.minecraft.util.IChatComponent; - -/** +/* * Copyright (c) 2023-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.minecraft.util.IChatComponent; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.socket; + +import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerMinecraftServer; +import net.minecraft.network.handshake.INetHandlerHandshakeServer; +import net.minecraft.network.handshake.client.C00Handshake; +import net.minecraft.server.network.NetHandlerLoginServer; +import net.minecraft.util.IChatComponent; + public class NetHandlerHandshakeEagler implements INetHandlerHandshakeServer { private final EaglerMinecraftServer mcServer; @@ -42,4 +43,4 @@ public class NetHandlerHandshakeEagler implements INetHandlerHandshakeServer { this.networkManager.setNetHandler(new NetHandlerLoginServer(this.mcServer, this.networkManager)); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/protocol/ServerV3MessageHandler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/protocol/ServerV3MessageHandler.java index 98f1163..40fa2d3 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/protocol/ServerV3MessageHandler.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/protocol/ServerV3MessageHandler.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.socket.protocol; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client.*; -import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerMinecraftServer; -import net.lax1dude.eaglercraft.v1_8.sp.server.voice.IntegratedVoiceService; -import net.minecraft.network.NetHandlerPlayServer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.minecraft.network.NetHandlerPlayServer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.socket.protocol; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client.*; +import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerMinecraftServer; +import net.lax1dude.eaglercraft.v1_8.sp.server.voice.IntegratedVoiceService; +import net.minecraft.network.NetHandlerPlayServer; + public class ServerV3MessageHandler implements GameMessageHandler { private final NetHandlerPlayServer netHandler; @@ -87,4 +88,4 @@ public class ServerV3MessageHandler implements GameMessageHandler { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/protocol/ServerV4MessageHandler.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/protocol/ServerV4MessageHandler.java index d980fb4..4c0fdef 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/protocol/ServerV4MessageHandler.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/socket/protocol/ServerV4MessageHandler.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.socket.protocol; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client.*; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketOtherPlayerClientUUIDV4EAG; -import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerMinecraftServer; -import net.lax1dude.eaglercraft.v1_8.sp.server.voice.IntegratedVoiceService; -import net.minecraft.entity.player.EntityPlayerMP; -import net.minecraft.network.NetHandlerPlayServer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import net.minecraft.network.NetHandlerPlayServer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.socket.protocol; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client.*; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketOtherPlayerClientUUIDV4EAG; +import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerMinecraftServer; +import net.lax1dude.eaglercraft.v1_8.sp.server.voice.IntegratedVoiceService; +import net.minecraft.entity.player.EntityPlayerMP; +import net.minecraft.network.NetHandlerPlayServer; + public class ServerV4MessageHandler implements GameMessageHandler { private final NetHandlerPlayServer netHandler; @@ -101,4 +102,4 @@ public class ServerV4MessageHandler implements GameMessageHandler { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/voice/IntegratedVoiceService.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/voice/IntegratedVoiceService.java index 443b8fb..db87352 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/voice/IntegratedVoiceService.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/server/voice/IntegratedVoiceService.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server.voice; import java.util.ArrayList; @@ -16,21 +32,6 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.*; import net.lax1dude.eaglercraft.v1_8.voice.ExpiringSet; import net.minecraft.entity.player.EntityPlayerMP; -/** - * 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 IntegratedVoiceService { public static final Logger logger = LogManager.getLogger("IntegratedVoiceService"); @@ -251,4 +252,4 @@ public class IntegratedVoiceService { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/socket/ClientIntegratedServerNetworkManager.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/socket/ClientIntegratedServerNetworkManager.java index c926760..250b723 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/socket/ClientIntegratedServerNetworkManager.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/socket/ClientIntegratedServerNetworkManager.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.socket; import java.io.IOException; @@ -18,21 +34,6 @@ import net.minecraft.network.PacketBuffer; import net.minecraft.util.ChatComponentTranslation; import net.minecraft.util.IChatComponent; -/** - * Copyright (c) 2023-2024 lax1dude, ayunami2000. 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 ClientIntegratedServerNetworkManager extends EaglercraftNetworkManager { private int debugPacketCounter = 0; @@ -167,4 +168,4 @@ public class ClientIntegratedServerNetworkManager extends EaglercraftNetworkMana public void clearRecieveQueue() { recievedPacketBuffer.clear(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/socket/NetHandlerSingleplayerLogin.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/socket/NetHandlerSingleplayerLogin.java index b99bae1..c0d623e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/socket/NetHandlerSingleplayerLogin.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/sp/socket/NetHandlerSingleplayerLogin.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.socket; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; @@ -23,21 +39,6 @@ import net.minecraft.network.play.client.C17PacketCustomPayload; import net.minecraft.util.ChatComponentText; import net.minecraft.util.IChatComponent; -/** - * Copyright (c) 2023-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 NetHandlerSingleplayerLogin implements INetHandlerLoginClient { private final Minecraft mc; @@ -94,4 +95,4 @@ public class NetHandlerSingleplayerLogin implements INetHandlerLoginClient { } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/EnumTouchControl.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/EnumTouchControl.java index 5f4b751..5b2a760 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/EnumTouchControl.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/EnumTouchControl.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.touch_gui; - -import net.lax1dude.eaglercraft.v1_8.Touch; -import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent; -import net.minecraft.client.Minecraft; -import net.minecraft.client.entity.EntityPlayerSP; -import net.minecraft.client.gui.GuiChat; -import net.minecraft.client.gui.GuiMainMenu; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.gui.ScaledResolution; -import net.minecraft.client.settings.GameSettings; - -/** +/* * Copyright (c) 2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.minecraft.client.settings.GameSettings; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.touch_gui; + +import net.lax1dude.eaglercraft.v1_8.Touch; +import net.lax1dude.eaglercraft.v1_8.minecraft.EnumInputEvent; +import net.minecraft.client.Minecraft; +import net.minecraft.client.entity.EntityPlayerSP; +import net.minecraft.client.gui.GuiChat; +import net.minecraft.client.gui.GuiMainMenu; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.gui.ScaledResolution; +import net.minecraft.client.settings.GameSettings; + public enum EnumTouchControl { DPAD_UP(EnumTouchControlPos.BOTTOM_LEFT, 60, 109, 44, null, (enumIn, x, y, pressed, mc, res) -> { diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/EnumTouchControlPos.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/EnumTouchControlPos.java index 0b0771f..59d1b3b 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/EnumTouchControlPos.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/EnumTouchControlPos.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.touch_gui; - -/** +/* * Copyright (c) 2024 ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.touch_gui; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.touch_gui; + public enum EnumTouchControlPos { TOP_LEFT, TOP, TOP_RIGHT, LEFT, RIGHT, BOTTOM_LEFT, BOTTOM, BOTTOM_RIGHT } \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/EnumTouchLayoutState.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/EnumTouchLayoutState.java index 86c7c71..88e3be3 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/EnumTouchLayoutState.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/EnumTouchLayoutState.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.touch_gui; - -/** +/* * Copyright (c) 2024 lax1due. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.touch_gui; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.touch_gui; + public enum EnumTouchLayoutState { IN_GUI, IN_GUI_TYPING, @@ -25,4 +26,4 @@ public enum EnumTouchLayoutState { IN_GAME_WALK_CAN_FLY, IN_GAME_FLYING, IN_GAME_WALK_FLYING; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/TouchControlInput.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/TouchControlInput.java index 29cfd29..2096ee2 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/TouchControlInput.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/TouchControlInput.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.touch_gui; - -/** +/* * Copyright (c) 2024 ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.touch_gui; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.touch_gui; + public class TouchControlInput { public int x; public int y; diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/TouchControls.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/TouchControls.java index 587f8eb..0a5a9b9 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/TouchControls.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/TouchControls.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.touch_gui; - -import net.lax1dude.eaglercraft.v1_8.Touch; -import net.lax1dude.eaglercraft.v1_8.touch_gui.EnumTouchControl.TouchAction; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.ScaledResolution; - -import java.util.*; - -import com.carrotsearch.hppc.IntObjectHashMap; -import com.carrotsearch.hppc.IntObjectMap; -import com.carrotsearch.hppc.cursors.ObjectCursor; - -/** +/* * Copyright (c) 2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import com.carrotsearch.hppc.cursors.ObjectCursor; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.touch_gui; + +import net.lax1dude.eaglercraft.v1_8.Touch; +import net.lax1dude.eaglercraft.v1_8.touch_gui.EnumTouchControl.TouchAction; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.ScaledResolution; + +import java.util.*; + +import com.carrotsearch.hppc.IntObjectHashMap; +import com.carrotsearch.hppc.IntObjectMap; +import com.carrotsearch.hppc.cursors.ObjectCursor; + public class TouchControls { public static final IntObjectMap touchControls = new IntObjectHashMap<>(); @@ -166,4 +167,4 @@ public class TouchControls { return null; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/TouchOverlayRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/TouchOverlayRenderer.java index edb1267..81d6956 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/TouchOverlayRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/touch_gui/TouchOverlayRenderer.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.touch_gui; import net.lax1dude.eaglercraft.v1_8.PointerInputAbstraction; @@ -20,21 +36,6 @@ import java.util.Set; import com.carrotsearch.hppc.cursors.ObjectCursor; import com.google.common.collect.Sets; -/** - * 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 TouchOverlayRenderer { public static final ResourceLocation spriteSheet = new ResourceLocation("eagler:gui/touch_gui.png"); @@ -196,4 +197,4 @@ public class TouchOverlayRenderer { tessellator.draw(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/CertificateInvalidException.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/CertificateInvalidException.java index e05c4d4..766eee9 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/CertificateInvalidException.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/CertificateInvalidException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.update; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.update; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.update; + public class CertificateInvalidException extends RuntimeException { public CertificateInvalidException() { @@ -32,4 +33,4 @@ public class CertificateInvalidException extends RuntimeException { super(cause); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateCheckerOverlay.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateCheckerOverlay.java index b970013..b47f5e0 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateCheckerOverlay.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateCheckerOverlay.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.update; import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; @@ -17,21 +33,6 @@ import java.util.List; import org.apache.commons.lang3.StringUtils; -/** - * 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 GuiUpdateCheckerOverlay extends Gui { private static final ResourceLocation eaglerIcons = new ResourceLocation("eagler:gui/eagler_gui.png"); @@ -258,4 +259,4 @@ public class GuiUpdateCheckerOverlay extends Gui { public int getSharedWorldInfoYOffset() { return totalHeightOffset; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateDownloadSuccess.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateDownloadSuccess.java index c6111e8..7c73ccd 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateDownloadSuccess.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateDownloadSuccess.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.update; - -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.update; + +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiUpdateDownloadSuccess extends GuiScreen { protected final GuiScreen parent; @@ -57,4 +58,4 @@ public class GuiUpdateDownloadSuccess extends GuiScreen { super.drawScreen(par1, par2, par3); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateInstallOptions.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateInstallOptions.java index bcd252d..57c777e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateInstallOptions.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateInstallOptions.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.update; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; -import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.update; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; +import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiUpdateInstallOptions extends GuiScreen { protected final GuiScreen parent; @@ -81,4 +82,4 @@ public class GuiUpdateInstallOptions extends GuiScreen { super.drawScreen(mx, my, partialTicks); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateVersionList.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateVersionList.java index 6b2df74..6ef08c2 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateVersionList.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateVersionList.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.update; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.minecraft.client.Minecraft; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.update; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.minecraft.client.Minecraft; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiUpdateVersionList extends GuiScreen { final GuiScreen back; @@ -99,4 +100,4 @@ public class GuiUpdateVersionList extends GuiScreen { slots.handleTouchInput(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateVersionSlot.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateVersionSlot.java index cf3e26a..765300d 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateVersionSlot.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/GuiUpdateVersionSlot.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.update; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; @@ -15,21 +31,6 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.client.gui.GuiSlot; import net.minecraft.util.ResourceLocation; -/** - * 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 GuiUpdateVersionSlot extends GuiSlot { private static final ResourceLocation eaglerGuiTex = new ResourceLocation("eagler:gui/eagler_gui.png"); @@ -146,4 +147,4 @@ public class GuiUpdateVersionSlot extends GuiSlot { public int getListWidth() { return 250; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/RelayUpdateChecker.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/RelayUpdateChecker.java index 053c291..6e708df 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/RelayUpdateChecker.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/RelayUpdateChecker.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.update; import java.io.DataInputStream; @@ -16,21 +32,6 @@ import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayServerSocket; import net.lax1dude.eaglercraft.v1_8.sp.relay.pkt.RelayPacket00Handshake; import net.minecraft.client.Minecraft; -/** - * 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 RelayUpdateChecker { private static class RelayEntry { @@ -139,4 +140,4 @@ public class RelayUpdateChecker { }catch(Throwable t) { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateCertificate.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateCertificate.java index 479288f..c5e3281 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateCertificate.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateCertificate.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.update; import java.io.DataInputStream; @@ -16,21 +32,6 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; import net.lax1dude.eaglercraft.v1_8.IOUtils; import net.lax1dude.eaglercraft.v1_8.crypto.SHA256Digest; -/** - * 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 UpdateCertificate { public static class DLSource { @@ -233,4 +234,4 @@ public class UpdateCertificate { } return ret; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateDataObj.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateDataObj.java index c6a0648..bc88ab4 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateDataObj.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateDataObj.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.update; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.update; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.update; + public class UpdateDataObj { public final UpdateCertificate clientSignature; @@ -25,4 +26,4 @@ public class UpdateDataObj { this.clientBundle = clientBundle; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateProgressStruct.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateProgressStruct.java index 3e953a4..73dabc0 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateProgressStruct.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateProgressStruct.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.update; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.update; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.update; + public class UpdateProgressStruct { public boolean isBusy = false; @@ -30,4 +31,4 @@ public class UpdateProgressStruct { statusString3 = null; progressBar = -1.0f; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateResultObj.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateResultObj.java index 8113ced..eb81a97 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateResultObj.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateResultObj.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.update; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.update; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.update; + public class UpdateResultObj { private final boolean success; @@ -45,4 +46,4 @@ public class UpdateResultObj { return (String)dataObj; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateService.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateService.java index 2c1b506..384d0d8 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateService.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/update/UpdateService.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.update; import java.util.ArrayList; @@ -14,21 +30,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformUpdateSvc; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 UpdateService { private static final Logger logger = LogManager.getLogger("UpdateService"); @@ -238,4 +239,4 @@ public class UpdateService { return EagRuntime.getConfiguration().getDownloadOfflineButtonLink() == null && (myUpdateCert == null || (getClientBundleData() == null && PlatformUpdateSvc.getUpdatingStatus().isBusy)); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/EnumVoiceChannelReadyState.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/EnumVoiceChannelReadyState.java index e43afc6..4fa195b 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/EnumVoiceChannelReadyState.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/EnumVoiceChannelReadyState.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.voice; - -/** +/* * Copyright (c) 2024 ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.voice; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.voice; + public enum EnumVoiceChannelReadyState { NONE, ABORTED, DEVICE_INITIALIZED; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/EnumVoiceChannelStatus.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/EnumVoiceChannelStatus.java index 66d5333..5671afa 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/EnumVoiceChannelStatus.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/EnumVoiceChannelStatus.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.voice; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.voice; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.voice; + public enum EnumVoiceChannelStatus { DISCONNECTED, CONNECTING, CONNECTED, UNAVAILABLE; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/EnumVoiceChannelType.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/EnumVoiceChannelType.java index 66d4653..0a2459f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/EnumVoiceChannelType.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/EnumVoiceChannelType.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.voice; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.voice; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.voice; + public enum EnumVoiceChannelType { NONE, GLOBAL, PROXIMITY; -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/ExpiringSet.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/ExpiringSet.java index 85f0b07..959f3a1 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/ExpiringSet.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/ExpiringSet.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.voice; - -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.Map; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; - -/** +/* * Copyright (c) 2022 ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.EagRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.voice; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Map; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; + public class ExpiringSet extends HashSet { private final long expiration; private final ExpiringEvent event; @@ -83,4 +84,4 @@ public class ExpiringSet extends HashSet { checkForExpirations(); return super.contains(o); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/GuiVoiceMenu.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/GuiVoiceMenu.java index 3922ee2..1cb21fd 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/GuiVoiceMenu.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/GuiVoiceMenu.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.voice; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; @@ -22,21 +38,6 @@ import net.minecraft.util.EnumChatFormatting; import net.minecraft.util.MathHelper; import net.minecraft.util.ResourceLocation; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 GuiVoiceMenu extends Gui { public class AbortedException extends RuntimeException { @@ -769,4 +770,4 @@ public class GuiVoiceMenu extends Gui { return showSliderBlocks || showSliderVolume || showPTTKeyConfig || showingCompatWarning || showingTrackingWarning; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/GuiVoiceOverlay.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/GuiVoiceOverlay.java index 2b0aeae..8e7759f 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/GuiVoiceOverlay.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/GuiVoiceOverlay.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.voice; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.GL_GREATER; @@ -16,21 +32,6 @@ import net.minecraft.client.gui.GuiChat; import net.minecraft.client.gui.GuiIngameMenu; import net.minecraft.util.ResourceLocation; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 GuiVoiceOverlay extends Gui { public final Minecraft mc; @@ -256,4 +257,4 @@ public class GuiVoiceOverlay extends Gui { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/VoiceClientController.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/VoiceClientController.java index a17eafd..6e8559e 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/VoiceClientController.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/VoiceClientController.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.voice; import java.util.ArrayList; @@ -24,21 +40,6 @@ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController; import net.minecraft.client.Minecraft; import net.minecraft.entity.player.EntityPlayer; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 VoiceClientController { public static final String SIGNAL_CHANNEL = "EAG|Voice-1.8"; @@ -405,4 +406,4 @@ public class VoiceClientController { if(uuid.equals(EaglerProfile.getPlayerUUID())) return; if (!getVoiceListening().contains(uuid)) sendPacketRequest(uuid); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/VoiceTagRenderer.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/VoiceTagRenderer.java index afbfdb1..981e6fd 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/VoiceTagRenderer.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/voice/VoiceTagRenderer.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.voice; import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; @@ -14,21 +30,6 @@ import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.util.ResourceLocation; -/** - * Copyright (c) 2022-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 VoiceTagRenderer { private static final ResourceLocation voiceGuiIcons = new ResourceLocation("eagler:gui/eagler_gui.png"); @@ -115,4 +116,4 @@ public class VoiceTagRenderer { voiceTagsDrawnThisFrame.clear(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenPhishingWarning.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenPhishingWarning.java index 2a111eb..0552ce4 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenPhishingWarning.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenPhishingWarning.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.webview; - -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; -import net.minecraft.client.audio.PositionedSoundRecord; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; -import net.minecraft.util.EnumChatFormatting; -import net.minecraft.util.ResourceLocation; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.minecraft.util.ResourceLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.webview; + +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; +import net.minecraft.client.audio.PositionedSoundRecord; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; +import net.minecraft.util.EnumChatFormatting; +import net.minecraft.util.ResourceLocation; + public class GuiScreenPhishingWarning extends GuiScreen { public static boolean hasShownMessage = false; @@ -101,4 +102,4 @@ public class GuiScreenPhishingWarning extends GuiScreen { super.mouseClicked(mx, my, btn); } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenRecieveServerInfo.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenRecieveServerInfo.java index 42dafd9..3c15233 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenRecieveServerInfo.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenRecieveServerInfo.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.webview; import java.io.DataInputStream; @@ -22,21 +38,6 @@ import net.minecraft.client.renderer.Tessellator; import net.minecraft.client.renderer.vertex.DefaultVertexFormats; import net.minecraft.client.resources.I18n; -/** - * 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 GuiScreenRecieveServerInfo extends GuiScreen { private static final Logger logger = LogManager.getLogger("GuiScreenRecieveServerInfo"); @@ -200,4 +201,4 @@ public class GuiScreenRecieveServerInfo extends GuiScreen { protected boolean isPartOfPauseMenu() { return true; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenServerInfo.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenServerInfo.java index 6da3305..4e74218 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenServerInfo.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenServerInfo.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.webview; import java.net.URI; @@ -15,21 +31,6 @@ import net.minecraft.client.gui.GuiScreen; import net.minecraft.client.gui.ScaledResolution; import net.minecraft.client.resources.I18n; -/** - * 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 GuiScreenServerInfo extends GuiScreen { private static final Logger logger = LogManager.getLogger("GuiScreenServerInfo"); @@ -125,4 +126,4 @@ public class GuiScreenServerInfo extends GuiScreen { protected boolean isPartOfPauseMenu() { return true; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenServerInfoDesktop.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenServerInfoDesktop.java index 6bcd667..2f11bae 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenServerInfoDesktop.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/GuiScreenServerInfoDesktop.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.webview; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.PauseMenuCustomizeState; -import net.lax1dude.eaglercraft.v1_8.internal.WebViewOptions; -import net.minecraft.client.gui.GuiButton; -import net.minecraft.client.gui.GuiScreen; -import net.minecraft.client.resources.I18n; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.minecraft.client.resources.I18n; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.webview; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.PauseMenuCustomizeState; +import net.lax1dude.eaglercraft.v1_8.internal.WebViewOptions; +import net.minecraft.client.gui.GuiButton; +import net.minecraft.client.gui.GuiScreen; +import net.minecraft.client.resources.I18n; + public class GuiScreenServerInfoDesktop extends GuiScreen { private final GuiScreen parent; @@ -89,4 +90,4 @@ public class GuiScreenServerInfoDesktop extends GuiScreen { return true; } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/PermissionsCache.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/PermissionsCache.java index 5892205..d2a67d0 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/PermissionsCache.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/PermissionsCache.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.webview; - -import java.util.HashMap; -import java.util.Map; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.webview; + +import java.util.HashMap; +import java.util.Map; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; + public class PermissionsCache { public static class Permission { @@ -61,4 +62,4 @@ public class PermissionsCache { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/ServerInfoCache.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/ServerInfoCache.java index 018d94e..0c0e7d8 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/ServerInfoCache.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/ServerInfoCache.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.webview; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.HashKey; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketServerInfoDataChunkV4EAG; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketServerInf * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.webview; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.HashKey; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketServerInfoDataChunkV4EAG; + public class ServerInfoCache { public static final int CACHE_MAX_SIZE = 0x200000; // 2 MB @@ -127,4 +128,4 @@ public class ServerInfoCache { } } -} +} \ No newline at end of file diff --git a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/WebViewOverlayController.java b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/WebViewOverlayController.java index 6779441..2029f2b 100755 --- a/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/WebViewOverlayController.java +++ b/src/main/java/net/lax1dude/eaglercraft/v1_8/webview/WebViewOverlayController.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.webview; - -import net.lax1dude.eaglercraft.v1_8.internal.PlatformWebView; -import net.lax1dude.eaglercraft.v1_8.internal.WebViewOptions; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketWebViewMessageV4EAG; -import net.minecraft.client.gui.ScaledResolution; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import net.minecraft.client.gui.ScaledResolution; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.webview; + +import net.lax1dude.eaglercraft.v1_8.internal.PlatformWebView; +import net.lax1dude.eaglercraft.v1_8.internal.WebViewOptions; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketWebViewMessageV4EAG; +import net.minecraft.client.gui.ScaledResolution; + public class WebViewOverlayController { public static boolean supported() { @@ -89,4 +90,4 @@ public class WebViewOverlayController { PlatformWebView.runTick(); } -} +} \ No newline at end of file diff --git a/src/main/java/net/optifine/Config.java b/src/main/java/net/optifine/Config.java index 1482c90..ad4d7b3 100755 --- a/src/main/java/net/optifine/Config.java +++ b/src/main/java/net/optifine/Config.java @@ -65,15 +65,15 @@ public class Config { } public static boolean isTreesFancy() { - return gameSettings.fancyGraphics; + return gameSettings.fancyGraphics || gameSettings.shaders; } public static boolean isTreesSmart() { - return gameSettings.fancyGraphics && gameSettings.smartLeavesOF; + return (gameSettings.fancyGraphics || gameSettings.shaders) && gameSettings.smartLeavesOF; } public static boolean isCullFacesLeaves() { - return !gameSettings.fancyGraphics; + return !gameSettings.fancyGraphics || gameSettings.shaders; } public static boolean isCustomItems() { diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePacketInputBuffer.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePacketInputBuffer.java index bc95f90..6f11372 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePacketInputBuffer.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePacketInputBuffer.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol; - -import java.io.DataInput; -import java.io.IOException; -import java.io.InputStream; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.InputStream; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol; + +import java.io.DataInput; +import java.io.IOException; +import java.io.InputStream; + public interface GamePacketInputBuffer extends DataInput { void skipAllBytes(int n) throws IOException; @@ -41,4 +42,4 @@ public interface GamePacketInputBuffer extends DataInput { byte[] toByteArray() throws IOException; -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePacketOutputBuffer.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePacketOutputBuffer.java index 0f31767..7267c12 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePacketOutputBuffer.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePacketOutputBuffer.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol; - -import java.io.DataOutput; -import java.io.IOException; -import java.io.OutputStream; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.OutputStream; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol; + +import java.io.DataOutput; +import java.io.IOException; +import java.io.OutputStream; + public interface GamePacketOutputBuffer extends DataOutput { void writeVarInt(int i) throws IOException; @@ -58,4 +59,4 @@ public interface GamePacketOutputBuffer extends DataOutput { public static int getArrayMCSize(int len) { return getVarIntSize(len) + len; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePluginMessageConstants.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePluginMessageConstants.java index 9bbf3a9..e43b1af 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePluginMessageConstants.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePluginMessageConstants.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.socket.protocol; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol; + public class GamePluginMessageConstants { public static final String V3_SKIN_CHANNEL = "EAG|Skins-1.8"; @@ -49,4 +50,4 @@ public class GamePluginMessageConstants { throw new IllegalArgumentException("Invalid direction: " + dir); } } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePluginMessageProtocol.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePluginMessageProtocol.java index 51c313a..51e8470 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePluginMessageProtocol.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/GamePluginMessageProtocol.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.socket.protocol; import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; @@ -16,21 +32,6 @@ import java.util.Map; import java.util.Set; import java.util.function.Supplier; -/** - * 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 enum GamePluginMessageProtocol { V3(3, define(V3_SKIN_CHANNEL, 0x03, CLIENT_TO_SERVER, CPacketGetOtherSkinEAG.class, CPacketGetOtherSkinEAG::new), @@ -225,4 +226,4 @@ public enum GamePluginMessageProtocol { protocol.notChannelMap.removeAll(protocol.channelMap[SERVER_TO_CLIENT].keySet()); } } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/GameMessageHandler.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/GameMessageHandler.java index f82abba..4e49632 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/GameMessageHandler.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/GameMessageHandler.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client.*; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.*; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.*; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client.*; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.*; + public interface GameMessageHandler { default void handleClient(CPacketGetOtherCapeEAG packet) { @@ -204,4 +205,4 @@ public interface GameMessageHandler { throw new WrongPacketException(); } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/GameMessagePacket.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/GameMessagePacket.java index 5c2f2f7..b0a2a81 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/GameMessagePacket.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/GameMessagePacket.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; + public interface GameMessagePacket { void readPacket(GamePacketInputBuffer buffer) throws IOException; @@ -30,4 +31,4 @@ public interface GameMessagePacket { int length(); -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/WrongPacketException.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/WrongPacketException.java index fbab52d..1c7cd1e 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/WrongPacketException.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/WrongPacketException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,10 +13,13 @@ package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt; + public class WrongPacketException extends RuntimeException { public WrongPacketException() { super("Wrong packet type recieved for the current handler!"); } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetOtherCapeEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetOtherCapeEAG.java index d94ee04..bca7ffb 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetOtherCapeEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetOtherCapeEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketGetOtherCapeEAG implements GameMessagePacket { public long uuidMost; @@ -57,4 +58,4 @@ public class CPacketGetOtherCapeEAG implements GameMessagePacket { return 16; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetOtherClientUUIDV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetOtherClientUUIDV4EAG.java index 97e7418..d706480 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetOtherClientUUIDV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetOtherClientUUIDV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketGetOtherClientUUIDV4EAG implements GameMessagePacket { public int requestId; @@ -61,4 +62,4 @@ public class CPacketGetOtherClientUUIDV4EAG implements GameMessagePacket { return GamePacketOutputBuffer.getVarIntSize(requestId) + 16; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetOtherSkinEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetOtherSkinEAG.java index 9d61138..c727879 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetOtherSkinEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetOtherSkinEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketGetOtherSkinEAG implements GameMessagePacket { public long uuidMost; @@ -57,4 +58,4 @@ public class CPacketGetOtherSkinEAG implements GameMessagePacket { return 16; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetSkinByURLEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetSkinByURLEAG.java index 7ebca6f..b3714ed 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetSkinByURLEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketGetSkinByURLEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketGetSkinByURLEAG implements GameMessagePacket { public long uuidMost; @@ -61,4 +62,4 @@ public class CPacketGetSkinByURLEAG implements GameMessagePacket { return 18 + url.length(); } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketInstallSkinSPEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketInstallSkinSPEAG.java index 417b603..9e289c5 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketInstallSkinSPEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketInstallSkinSPEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketInstallSkinSPEAG implements GameMessagePacket { public byte[] customSkin; @@ -55,4 +56,4 @@ public class CPacketInstallSkinSPEAG implements GameMessagePacket { return 2 + customSkin.length; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketRequestServerInfoV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketRequestServerInfoV4EAG.java index eec1287..1b92806 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketRequestServerInfoV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketRequestServerInfoV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketRequestServerInfoV4EAG implements GameMessagePacket { public byte[] requestHash; @@ -57,4 +58,4 @@ public class CPacketRequestServerInfoV4EAG implements GameMessagePacket { return 20; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalConnectEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalConnectEAG.java index 873baf4..f0f584c 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalConnectEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalConnectEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketVoiceSignalConnectEAG implements GameMessagePacket { public CPacketVoiceSignalConnectEAG() { @@ -45,4 +46,4 @@ public class CPacketVoiceSignalConnectEAG implements GameMessagePacket { return 0; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDescEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDescEAG.java index 539bd45..b74687a 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDescEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDescEAG.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketVoiceSignalDescEAG implements GameMessagePacket { public long uuidMost; @@ -77,4 +78,4 @@ public class CPacketVoiceSignalDescEAG implements GameMessagePacket { return 16 + GamePacketOutputBuffer.getArrayMCSize(desc.length); } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDisconnectPeerV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDisconnectPeerV4EAG.java index caad482..f9919ab 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDisconnectPeerV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDisconnectPeerV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketVoiceSignalDisconnectPeerV4EAG implements GameMessagePacket { public long uuidMost; @@ -57,4 +58,4 @@ public class CPacketVoiceSignalDisconnectPeerV4EAG implements GameMessagePacket return 16; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDisconnectV3EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDisconnectV3EAG.java index 8c99cdf..c428ab9 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDisconnectV3EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDisconnectV3EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketVoiceSignalDisconnectV3EAG implements GameMessagePacket { public boolean isPeerType; @@ -66,4 +67,4 @@ public class CPacketVoiceSignalDisconnectV3EAG implements GameMessagePacket { return isPeerType ? 16 : 0; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDisconnectV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDisconnectV4EAG.java index c65ced8..f36c1ab 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDisconnectV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalDisconnectV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketVoiceSignalDisconnectV4EAG implements GameMessagePacket { public CPacketVoiceSignalDisconnectV4EAG() { @@ -45,4 +46,4 @@ public class CPacketVoiceSignalDisconnectV4EAG implements GameMessagePacket { return 0; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalICEEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalICEEAG.java index 8de5fca..70c5cd1 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalICEEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalICEEAG.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketVoiceSignalICEEAG implements GameMessagePacket { public long uuidMost; @@ -77,4 +78,4 @@ public class CPacketVoiceSignalICEEAG implements GameMessagePacket { return 16 + GamePacketOutputBuffer.getArrayMCSize(ice.length); } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalRequestEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalRequestEAG.java index 7ccd93f..b97bb56 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalRequestEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketVoiceSignalRequestEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketVoiceSignalRequestEAG implements GameMessagePacket { public long uuidMost; @@ -57,4 +58,4 @@ public class CPacketVoiceSignalRequestEAG implements GameMessagePacket { return 16; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketWebViewMessageEnV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketWebViewMessageEnV4EAG.java index c355c34..3bfa860 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketWebViewMessageEnV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketWebViewMessageEnV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketWebViewMessageEnV4EAG implements GameMessagePacket { public boolean messageChannelOpen; @@ -68,4 +69,4 @@ public class CPacketWebViewMessageEnV4EAG implements GameMessagePacket { return messageChannelOpen ? 2 + (channelName != null ? channelName.length() : 0) : 1; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketWebViewMessageV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketWebViewMessageV4EAG.java index 501390c..01f3136 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketWebViewMessageV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/client/CPacketWebViewMessageV4EAG.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.client; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class CPacketWebViewMessageV4EAG implements GameMessagePacket { public static final int TYPE_STRING = 0; @@ -71,4 +72,4 @@ public class CPacketWebViewMessageV4EAG implements GameMessagePacket { return 1 + GamePacketOutputBuffer.getVarIntSize(data.length) + data.length; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketCustomizePauseMenuV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketCustomizePauseMenuV4EAG.java index be8e07a..e768c24 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketCustomizePauseMenuV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketCustomizePauseMenuV4EAG.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; import java.io.IOException; @@ -13,21 +29,6 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; import net.lax1dude.eaglercraft.v1_8.socket.protocol.util.PacketImageData; -/** - * 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 SPacketCustomizePauseMenuV4EAG implements GameMessagePacket { public static final int SERVER_INFO_MODE_NONE = 0; @@ -190,4 +191,4 @@ public class SPacketCustomizePauseMenuV4EAG implements GameMessagePacket { return -1; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketEnableFNAWSkinsEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketEnableFNAWSkinsEAG.java index a8b7fe6..60ced07 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketEnableFNAWSkinsEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketEnableFNAWSkinsEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketEnableFNAWSkinsEAG implements GameMessagePacket { public boolean enableSkins; @@ -57,4 +58,4 @@ public class SPacketEnableFNAWSkinsEAG implements GameMessagePacket { return 1; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientCapeCustomV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientCapeCustomV4EAG.java index 1b46e5f..4c20b07 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientCapeCustomV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientCapeCustomV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketForceClientCapeCustomV4EAG implements GameMessagePacket { public byte[] customCape; @@ -57,4 +58,4 @@ public class SPacketForceClientCapeCustomV4EAG implements GameMessagePacket { return 1173; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientCapePresetV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientCapePresetV4EAG.java index ed84090..ce95cba 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientCapePresetV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientCapePresetV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketForceClientCapePresetV4EAG implements GameMessagePacket { public int presetCape; @@ -53,4 +54,4 @@ public class SPacketForceClientCapePresetV4EAG implements GameMessagePacket { return 4; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientSkinCustomV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientSkinCustomV4EAG.java index 2488d70..72e1a5b 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientSkinCustomV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientSkinCustomV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketForceClientSkinCustomV4EAG implements GameMessagePacket { public int modelID; @@ -61,4 +62,4 @@ public class SPacketForceClientSkinCustomV4EAG implements GameMessagePacket { return 12289; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientSkinPresetV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientSkinPresetV4EAG.java index d7e8aa7..ccf771b 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientSkinPresetV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketForceClientSkinPresetV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketForceClientSkinPresetV4EAG implements GameMessagePacket { public int presetSkin; @@ -53,4 +54,4 @@ public class SPacketForceClientSkinPresetV4EAG implements GameMessagePacket { return 4; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketInvalidatePlayerCacheV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketInvalidatePlayerCacheV4EAG.java index 414bffb..a22fde6 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketInvalidatePlayerCacheV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketInvalidatePlayerCacheV4EAG.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collection; -import java.util.List; -import java.util.RandomAccess; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collection; +import java.util.List; +import java.util.RandomAccess; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketInvalidatePlayerCacheV4EAG implements GameMessagePacket { public Collection players; @@ -111,4 +112,4 @@ public class SPacketInvalidatePlayerCacheV4EAG implements GameMessagePacket { return GamePacketOutputBuffer.getVarIntSize(cnt) + 17 * cnt; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifBadgeHideV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifBadgeHideV4EAG.java index 2fb67b4..8a84e4e 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifBadgeHideV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifBadgeHideV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketNotifBadgeHideV4EAG implements GameMessagePacket { public long badgeUUIDMost; @@ -57,4 +58,4 @@ public class SPacketNotifBadgeHideV4EAG implements GameMessagePacket { return 16; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifBadgeShowV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifBadgeShowV4EAG.java index 2a22028..f0ad228 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifBadgeShowV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifBadgeShowV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketNotifBadgeShowV4EAG implements GameMessagePacket { public static enum EnumBadgePriority { @@ -169,4 +170,4 @@ public class SPacketNotifBadgeShowV4EAG implements GameMessagePacket { return -1; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifIconsRegisterV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifIconsRegisterV4EAG.java index 5644b2a..0b49bc0 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifIconsRegisterV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifIconsRegisterV4EAG.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.RandomAccess; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.util.PacketImageData; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.util.PacketImageData; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.RandomAccess; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.util.PacketImageData; + public class SPacketNotifIconsRegisterV4EAG implements GameMessagePacket { public static class CreateIcon { @@ -108,4 +109,4 @@ public class SPacketNotifIconsRegisterV4EAG implements GameMessagePacket { return len; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifIconsReleaseV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifIconsReleaseV4EAG.java index 64858fe..6bd0a5f 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifIconsReleaseV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketNotifIconsReleaseV4EAG.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.RandomAccess; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.RandomAccess; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketNotifIconsReleaseV4EAG implements GameMessagePacket { public static class DestroyIcon { @@ -89,4 +90,4 @@ public class SPacketNotifIconsReleaseV4EAG implements GameMessagePacket { return GamePacketOutputBuffer.getVarIntSize(len) + (len << 4); } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherCapeCustomEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherCapeCustomEAG.java index 9526662..1996b0a 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherCapeCustomEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherCapeCustomEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketOtherCapeCustomEAG implements GameMessagePacket { public long uuidMost; @@ -65,4 +66,4 @@ public class SPacketOtherCapeCustomEAG implements GameMessagePacket { return 1189; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherCapePresetEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherCapePresetEAG.java index 1631188..a985892 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherCapePresetEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherCapePresetEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketOtherCapePresetEAG implements GameMessagePacket { public long uuidMost; @@ -61,4 +62,4 @@ public class SPacketOtherCapePresetEAG implements GameMessagePacket { return 20; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherPlayerClientUUIDV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherPlayerClientUUIDV4EAG.java index 70593d8..40bbcf8 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherPlayerClientUUIDV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherPlayerClientUUIDV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketOtherPlayerClientUUIDV4EAG implements GameMessagePacket { public int requestId; @@ -61,4 +62,4 @@ public class SPacketOtherPlayerClientUUIDV4EAG implements GameMessagePacket { return GamePacketOutputBuffer.getVarIntSize(requestId) + 16; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherSkinCustomV3EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherSkinCustomV3EAG.java index 24bf190..ce0e686 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherSkinCustomV3EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherSkinCustomV3EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketOtherSkinCustomV3EAG implements GameMessagePacket { public long uuidMost; @@ -69,4 +70,4 @@ public class SPacketOtherSkinCustomV3EAG implements GameMessagePacket { return 16401; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherSkinCustomV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherSkinCustomV4EAG.java index 2ae61e2..1daf29e 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherSkinCustomV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherSkinCustomV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketOtherSkinCustomV4EAG implements GameMessagePacket { public long uuidMost; @@ -69,4 +70,4 @@ public class SPacketOtherSkinCustomV4EAG implements GameMessagePacket { return 12305; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherSkinPresetEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherSkinPresetEAG.java index 7d6b6f4..97156ec 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherSkinPresetEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketOtherSkinPresetEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketOtherSkinPresetEAG implements GameMessagePacket { public long uuidMost; @@ -61,4 +62,4 @@ public class SPacketOtherSkinPresetEAG implements GameMessagePacket { return 20; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketRedirectClientV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketRedirectClientV4EAG.java index 02bc8ca..40ebeba 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketRedirectClientV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketRedirectClientV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketRedirectClientV4EAG implements GameMessagePacket { public String redirectURI; @@ -53,4 +54,4 @@ public class SPacketRedirectClientV4EAG implements GameMessagePacket { return 2 + redirectURI.length(); } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketServerInfoDataChunkV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketServerInfoDataChunkV4EAG.java index 60e5ba5..a1b0b05 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketServerInfoDataChunkV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketServerInfoDataChunkV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketServerInfoDataChunkV4EAG implements GameMessagePacket { public boolean lastChunk; @@ -76,4 +77,4 @@ public class SPacketServerInfoDataChunkV4EAG implements GameMessagePacket { + GamePacketOutputBuffer.getVarIntSize(data.length) + data.length; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketSetServerCookieV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketSetServerCookieV4EAG.java index cdbc33a..e980915 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketSetServerCookieV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketSetServerCookieV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketSetServerCookieV4EAG implements GameMessagePacket { public boolean revokeQuerySupported; @@ -82,4 +83,4 @@ public class SPacketSetServerCookieV4EAG implements GameMessagePacket { return GamePacketOutputBuffer.getVarLongSize(expires) + 2 + data.length; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketUnforceClientV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketUnforceClientV4EAG.java index a010515..4434d1c 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketUnforceClientV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketUnforceClientV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketUnforceClientV4EAG implements GameMessagePacket { public boolean resetSkin; @@ -60,4 +61,4 @@ public class SPacketUnforceClientV4EAG implements GameMessagePacket { return 1; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketUpdateCertEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketUpdateCertEAG.java index 9e175fe..0af64b2 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketUpdateCertEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketUpdateCertEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketUpdateCertEAG implements GameMessagePacket { public byte[] updateCert; @@ -55,4 +56,4 @@ public class SPacketUpdateCertEAG implements GameMessagePacket { return updateCert.length; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalAllowedEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalAllowedEAG.java index 1a8d267..6f89549 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalAllowedEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalAllowedEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketVoiceSignalAllowedEAG implements GameMessagePacket { public boolean allowed; @@ -76,4 +77,4 @@ public class SPacketVoiceSignalAllowedEAG implements GameMessagePacket { return -1; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalConnectAnnounceV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalConnectAnnounceV4EAG.java index 13d5cdd..ec1712f 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalConnectAnnounceV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalConnectAnnounceV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketVoiceSignalConnectAnnounceV4EAG implements GameMessagePacket { public long uuidMost; @@ -57,4 +58,4 @@ public class SPacketVoiceSignalConnectAnnounceV4EAG implements GameMessagePacket return 16; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalConnectV3EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalConnectV3EAG.java index 2eec170..ab618f3 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalConnectV3EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalConnectV3EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketVoiceSignalConnectV3EAG implements GameMessagePacket { public long uuidMost; @@ -70,4 +71,4 @@ public class SPacketVoiceSignalConnectV3EAG implements GameMessagePacket { return isAnnounceType ? 16 : 17; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalConnectV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalConnectV4EAG.java index 014ec2c..28737fc 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalConnectV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalConnectV4EAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketVoiceSignalConnectV4EAG implements GameMessagePacket { public long uuidMost; @@ -61,4 +62,4 @@ public class SPacketVoiceSignalConnectV4EAG implements GameMessagePacket { return 17; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalDescEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalDescEAG.java index d7db44e..e39748c 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalDescEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalDescEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketVoiceSignalDescEAG implements GameMessagePacket { public long uuidMost; @@ -70,4 +71,4 @@ public class SPacketVoiceSignalDescEAG implements GameMessagePacket { return 16 + GamePacketOutputBuffer.getArrayMCSize(desc.length); } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalDisconnectPeerEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalDisconnectPeerEAG.java index 7534675..0f547cf 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalDisconnectPeerEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalDisconnectPeerEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketVoiceSignalDisconnectPeerEAG implements GameMessagePacket { public long uuidMost; @@ -57,4 +58,4 @@ public class SPacketVoiceSignalDisconnectPeerEAG implements GameMessagePacket { return 16; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalGlobalEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalGlobalEAG.java index dc028db..8f53b52 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalGlobalEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalGlobalEAG.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; -import java.util.RandomAccess; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; +import java.util.RandomAccess; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketVoiceSignalGlobalEAG implements GameMessagePacket { public Collection users; @@ -107,4 +108,4 @@ public class SPacketVoiceSignalGlobalEAG implements GameMessagePacket { return -1; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalICEEAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalICEEAG.java index 91043f8..3378c19 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalICEEAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketVoiceSignalICEEAG.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketVoiceSignalICEEAG implements GameMessagePacket { public long uuidMost; @@ -70,4 +71,4 @@ public class SPacketVoiceSignalICEEAG implements GameMessagePacket { return 16 + GamePacketOutputBuffer.getArrayMCSize(ice.length); } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketWebViewMessageV4EAG.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketWebViewMessageV4EAG.java index 7bc6f66..02efd24 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketWebViewMessageV4EAG.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/pkt/server/SPacketWebViewMessageV4EAG.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server; + +import java.io.IOException; +import java.nio.charset.StandardCharsets; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessageHandler; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; + public class SPacketWebViewMessageV4EAG implements GameMessagePacket { public static final int TYPE_STRING = 0; @@ -71,4 +72,4 @@ public class SPacketWebViewMessageV4EAG implements GameMessagePacket { return 1 + GamePacketOutputBuffer.getVarIntSize(data.length) + data.length; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/PacketImageData.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/PacketImageData.java index 8e9b1a0..681a4ed 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/PacketImageData.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/PacketImageData.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.util; - -import java.io.IOException; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.util; + +import java.io.IOException; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; + public class PacketImageData { public final int width; @@ -76,4 +77,4 @@ public class PacketImageData { } } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/ReusableByteArrayInputStream.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/ReusableByteArrayInputStream.java index 0b6e88f..c4858ad 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/ReusableByteArrayInputStream.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/ReusableByteArrayInputStream.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.util; - -import java.io.IOException; -import java.io.InputStream; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import java.io.InputStream; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.util; + +import java.io.IOException; +import java.io.InputStream; + public class ReusableByteArrayInputStream extends InputStream { private volatile byte[] currentBuffer = null; @@ -77,4 +78,4 @@ public class ReusableByteArrayInputStream extends InputStream { return true; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/ReusableByteArrayOutputStream.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/ReusableByteArrayOutputStream.java index 3392e13..ea10ec6 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/ReusableByteArrayOutputStream.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/ReusableByteArrayOutputStream.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.util; - -import java.io.IOException; -import java.io.OutputStream; -import java.util.Arrays; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.util.Arrays; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.util; + +import java.io.IOException; +import java.io.OutputStream; +import java.util.Arrays; + public class ReusableByteArrayOutputStream extends OutputStream { private volatile byte[] currentBuffer = null; @@ -78,4 +79,4 @@ public class ReusableByteArrayOutputStream extends OutputStream { idx += len; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/SimpleInputBufferImpl.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/SimpleInputBufferImpl.java index 8af6cf7..69b570a 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/SimpleInputBufferImpl.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/SimpleInputBufferImpl.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.util; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.DataInputStream; -import java.io.EOFException; -import java.io.IOException; -import java.io.InputStream; -import java.nio.charset.StandardCharsets; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.util; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.DataInputStream; +import java.io.EOFException; +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.StandardCharsets; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketInputBuffer; + public class SimpleInputBufferImpl extends DataInputStream implements GamePacketInputBuffer { protected byte[] toByteArrayReturns; @@ -206,4 +207,4 @@ public class SimpleInputBufferImpl extends DataInputStream implements GamePacket } } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/SimpleOutputBufferImpl.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/SimpleOutputBufferImpl.java index 7fcd7f1..bce7077 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/SimpleOutputBufferImpl.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/SimpleOutputBufferImpl.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.util; - -import java.io.DataOutputStream; -import java.io.IOException; -import java.io.OutputStream; -import java.nio.charset.StandardCharsets; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.util; + +import java.io.DataOutputStream; +import java.io.IOException; +import java.io.OutputStream; +import java.nio.charset.StandardCharsets; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePacketOutputBuffer; + public class SimpleOutputBufferImpl extends DataOutputStream implements GamePacketOutputBuffer { public SimpleOutputBufferImpl(OutputStream out) { @@ -104,4 +105,4 @@ public class SimpleOutputBufferImpl extends DataOutputStream implements GamePack return out; } -} +} \ No newline at end of file diff --git a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/SkinPacketVersionCache.java b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/SkinPacketVersionCache.java index 945610c..7099bf6 100755 --- a/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/SkinPacketVersionCache.java +++ b/src/protocol-game/java/net/lax1dude/eaglercraft/v1_8/socket/protocol/util/SkinPacketVersionCache.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.socket.protocol.util; - -import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; -import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.*; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.*; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.socket.protocol.util; + +import net.lax1dude.eaglercraft.v1_8.socket.protocol.GamePluginMessageProtocol; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.GameMessagePacket; +import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.*; + public class SkinPacketVersionCache { public GameMessagePacket skinPacketV3; @@ -357,4 +358,4 @@ public class SkinPacketVersionCache { } } -} +} \ No newline at end of file diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/IRelayLogger.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/IRelayLogger.java index f9046e7..cf3708e 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/IRelayLogger.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/IRelayLogger.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + public interface IRelayLogger { void debug(String msg, Object...args); @@ -27,4 +28,4 @@ public interface IRelayLogger { void error(Throwable th); -} +} \ No newline at end of file diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket.java index 8fe7686..c4ff5f9 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -import java.io.ByteArrayOutputStream; -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.EOFException; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.HashMap; -import java.util.Map; -import java.util.function.Supplier; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import java.util.function.Supplier; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + +import java.io.ByteArrayOutputStream; +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.EOFException; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.util.HashMap; +import java.util.Map; +import java.util.function.Supplier; + public class RelayPacket { private static final Map> definedPacketClasses = new HashMap<>(); @@ -205,4 +206,4 @@ public class RelayPacket { } return new String(charRet); } -} +} \ No newline at end of file diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket00Handshake.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket00Handshake.java index d9eac73..487bc97 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket00Handshake.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket00Handshake.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; + public class RelayPacket00Handshake extends RelayPacket { public int connectionType = 0; @@ -54,4 +55,4 @@ public class RelayPacket00Handshake extends RelayPacket { return 1 + 1 + (connectionCode != null ? 1 + connectionCode.length() : 0); } -} +} \ No newline at end of file diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket01ICEServers.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket01ICEServers.java index 5c69882..ca716c1 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket01ICEServers.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket01ICEServers.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import java.util.Iterator; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Iterator; + public class RelayPacket01ICEServers extends RelayPacket { public final Collection servers; @@ -102,4 +103,4 @@ public class RelayPacket01ICEServers extends RelayPacket { )); } } -} +} \ No newline at end of file diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket02NewClient.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket02NewClient.java index 0e715cf..1abe60f 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket02NewClient.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket02NewClient.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; + public class RelayPacket02NewClient extends RelayPacket { public String clientId; @@ -42,4 +43,4 @@ public class RelayPacket02NewClient extends RelayPacket { return 1 + clientId.length(); } -} +} \ No newline at end of file diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket03ICECandidate.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket03ICECandidate.java index ccdd1f1..42934af 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket03ICECandidate.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket03ICECandidate.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; + public class RelayPacket03ICECandidate extends RelayPacket { public String peerId; diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket04Description.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket04Description.java index b46c970..81dc802 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket04Description.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket04Description.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; + public class RelayPacket04Description extends RelayPacket { public String peerId; @@ -55,4 +56,4 @@ public class RelayPacket04Description extends RelayPacket { return 1 + peerId.length() + 2 + description.length; } -} +} \ No newline at end of file diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket05ClientSuccess.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket05ClientSuccess.java index b2e5e9a..476fbec 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket05ClientSuccess.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket05ClientSuccess.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; + public class RelayPacket05ClientSuccess extends RelayPacket { public String clientId; @@ -42,4 +43,4 @@ public class RelayPacket05ClientSuccess extends RelayPacket { return 1 + clientId.length(); } -} +} \ No newline at end of file diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket06ClientFailure.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket06ClientFailure.java index 9b3d948..cf2600e 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket06ClientFailure.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket06ClientFailure.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; + public class RelayPacket06ClientFailure extends RelayPacket { public String clientId; @@ -42,4 +43,4 @@ public class RelayPacket06ClientFailure extends RelayPacket { return 1 + clientId.length(); } -} +} \ No newline at end of file diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket07LocalWorlds.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket07LocalWorlds.java index 3baeee2..3b59f87 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket07LocalWorlds.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket07LocalWorlds.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import java.util.List; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; + public class RelayPacket07LocalWorlds extends RelayPacket { public static class LocalWorld { @@ -83,4 +84,4 @@ public class RelayPacket07LocalWorlds extends RelayPacket { } return accum; } -} +} \ No newline at end of file diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket69Pong.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket69Pong.java index ac43db8..1dbb704 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket69Pong.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket69Pong.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; + public class RelayPacket69Pong extends RelayPacket { public int protcolVersion; @@ -53,4 +54,4 @@ public class RelayPacket69Pong extends RelayPacket { return 3 + comment.length() + brand.length(); } -} +} \ No newline at end of file diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket70SpecialUpdate.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket70SpecialUpdate.java index 9f29948..cc9c3c0 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket70SpecialUpdate.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacket70SpecialUpdate.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; + public class RelayPacket70SpecialUpdate extends RelayPacket { public static final int OPERATION_UPDATE_CERTIFICATE = 0x69; @@ -52,4 +53,4 @@ public class RelayPacket70SpecialUpdate extends RelayPacket { public int packetLength() { return 3 + updatePacket.length; } -} +} \ No newline at end of file diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacketFEDisconnectClient.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacketFEDisconnectClient.java index 51a804a..497f228 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacketFEDisconnectClient.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacketFEDisconnectClient.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; -import java.nio.ByteBuffer; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import java.nio.ByteBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; +import java.nio.ByteBuffer; + public class RelayPacketFEDisconnectClient extends RelayPacket { public static final int TYPE_FINISHED_SUCCESS = 0x00; @@ -64,4 +65,4 @@ public class RelayPacketFEDisconnectClient extends RelayPacket { public static final ByteBuffer ratelimitPacketBlockLock = ByteBuffer.wrap(new byte[] { (byte)0xFC, (byte)0x02 }); public static final ByteBuffer ratelimitPacketLocked = ByteBuffer.wrap(new byte[] { (byte)0xFC, (byte)0x03 }); -} +} \ No newline at end of file diff --git a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacketFFErrorCode.java b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacketFFErrorCode.java index 6027b8a..443f003 100755 --- a/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacketFFErrorCode.java +++ b/src/protocol-relay/java/net/lax1dude/eaglercraft/v1_8/sp/relay/pkt/RelayPacketFFErrorCode.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; - -import java.io.DataInputStream; -import java.io.DataOutputStream; -import java.io.IOException; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import java.io.IOException; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.relay.pkt; + +import java.io.DataInputStream; +import java.io.DataOutputStream; +import java.io.IOException; + public class RelayPacketFFErrorCode extends RelayPacket { public static final int TYPE_INTERNAL_ERROR = 0x00; @@ -79,4 +80,4 @@ public class RelayPacketFFErrorCode extends RelayPacket { return 1 + 2 + desc.length(); } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuAssets.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuAssets.java index 4061a3a..7978985 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuAssets.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuAssets.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformAssets; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformAssets; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformAssets; + public class BootMenuAssets { public static String loadResourceString(String res) { @@ -32,4 +33,4 @@ public class BootMenuAssets { PlatformAssets.freeAssetRepoTeaVM(); } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuConstants.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuConstants.java index ce16955..1fbea37 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuConstants.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuConstants.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; + public class BootMenuConstants { public static final EaglercraftUUID UUID_ORIGIN_UNSIGNED_CLASSES_JS = new EaglercraftUUID(0x738248F88FF1446EL, 0xA834D40120DD8EB5L); @@ -50,4 +51,4 @@ public class BootMenuConstants { return pfx + ".showBootMenu"; } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuDOM.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuDOM.java index 25282e8..4ad51ec 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuDOM.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuDOM.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.util.HashMap; -import java.util.Map; - -import org.teavm.jso.dom.html.HTMLElement; -import org.teavm.jso.dom.html.HTMLInputElement; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import org.teavm.jso.dom.html.HTMLInputElement; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.util.HashMap; +import java.util.Map; + +import org.teavm.jso.dom.html.HTMLElement; +import org.teavm.jso.dom.html.HTMLInputElement; + public class BootMenuDOM { public final HTMLElement content_view_selection; @@ -200,4 +201,4 @@ public class BootMenuDOM { return ret; } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuDataManager.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuDataManager.java index 3d12626..3744dec 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuDataManager.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuDataManager.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; import java.nio.charset.StandardCharsets; @@ -19,21 +35,6 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 BootMenuDataManager { protected static final Logger logger = LogManager.getLogger("BootMenuDataManager"); @@ -461,4 +462,4 @@ public class BootMenuDataManager { } } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuDatastore.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuDatastore.java index 1620c63..c40e9e6 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuDatastore.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuDatastore.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; import java.util.function.Consumer; @@ -27,21 +43,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 BootMenuDatastore { private static final Logger logger = LogManager.getLogger("BootMenuDatastore"); @@ -359,4 +360,4 @@ public class BootMenuDatastore { } } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuEntryPoint.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuEntryPoint.java index 9c11103..8392e54 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuEntryPoint.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuEntryPoint.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; import java.nio.charset.StandardCharsets; @@ -24,21 +40,6 @@ import net.lax1dude.eaglercraft.v1_8.sp.internal.ClientPlatformSingleplayer; import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMClientConfigAdapter; import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; -/** - * 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 BootMenuEntryPoint { @JSBody(params = {}, script = "if((typeof window.__isEaglerX188BootMenuAlreadyShow === \"string\") && window.__isEaglerX188BootMenuAlreadyShow === \"yes\") return true; window.__isEaglerX188BootMenuAlreadyShow = \"yes\"; return false;") @@ -185,4 +186,4 @@ public class BootMenuEntryPoint { ServerCookieDataStore.clearCookiesLow(); } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuFatOfflineLoader.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuFatOfflineLoader.java index 49e8479..0a1726f 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuFatOfflineLoader.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuFatOfflineLoader.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; import java.util.ArrayList; @@ -14,21 +30,6 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 BootMenuFatOfflineLoader { protected static final Logger logger = LogManager.getLogger("BootMenuFatOfflineLoader"); @@ -90,4 +91,4 @@ public class BootMenuFatOfflineLoader { } } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuMain.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuMain.java index f6c1584..c07482d 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuMain.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuMain.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; import java.io.IOException; @@ -22,21 +38,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.LegacyKeycodeTranslator; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 BootMenuMain { private static final Logger logger = LogManager.getLogger("BootMenuMain"); @@ -301,4 +302,4 @@ public class BootMenuMain { } } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuMetadata.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuMetadata.java index a05dc83..bc1f264 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuMetadata.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootMenuMetadata.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; import java.nio.charset.StandardCharsets; @@ -16,21 +32,6 @@ import net.lax1dude.eaglercraft.v1_8.cache.EaglerLoadingCache; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 BootMenuMetadata { protected static final Logger logger = LogManager.getLogger("BootMenuMetadata"); @@ -221,4 +222,4 @@ public class BootMenuMetadata { return new LaunchTemplate(new JSONObject(loadDataFileString(name))); } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootableClientEntry.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootableClientEntry.java index 2dbffe4..cb37daf 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootableClientEntry.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/BootableClientEntry.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.function.Supplier; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.boot_menu.teavm.BootMenuEntryPoint.UnsignedClientEPKLoader; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.lax1dude.eaglercraft.v1_8.boot_menu.teavm.BootMenuEntryPoint.Unsigned * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.function.Supplier; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.boot_menu.teavm.BootMenuEntryPoint.UnsignedClientEPKLoader; + public class BootableClientEntry { public static enum EnumDataType { @@ -363,4 +364,4 @@ public class BootableClientEntry { return flag; } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/CheckboxListController.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/CheckboxListController.java index 7e08f44..4393f94 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/CheckboxListController.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/CheckboxListController.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.util.Arrays; -import java.util.List; - -import org.teavm.jso.dom.html.HTMLElement; - -import com.google.common.collect.Collections2; -import com.google.common.collect.Iterators; -import com.google.common.collect.Lists; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,17 @@ import com.google.common.collect.Lists; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.util.Arrays; +import java.util.List; + +import org.teavm.jso.dom.html.HTMLElement; + +import com.google.common.collect.Iterators; +import com.google.common.collect.Lists; + public abstract class CheckboxListController extends SelectionListController { @@ -67,9 +67,8 @@ public abstract class CheckboxListController getSelectedItems() { - return Lists.newArrayList(Collections2.transform( - Collections2.filter(selectionEnableList, (e) -> (e.userVal && !e.listItem.getAlwaysSelected())), - (e) -> (T) ((ListItemWrapper) e.listItem).parent)); + return selectionEnableList.stream().filter((e) -> (e.userVal && !e.listItem.getAlwaysSelected())) + .map((e) -> (T) ((ListItemWrapper) e.listItem).parent).toList(); } protected void itemSelectedLow(ListItemInstance item) { @@ -105,4 +104,4 @@ public abstract class CheckboxListController selectedItems); -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/ClientBootFactory.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/ClientBootFactory.java index 6811d08..74b59b5 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/ClientBootFactory.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/ClientBootFactory.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; import java.io.DataOutputStream; @@ -32,21 +48,6 @@ import net.minecraft.nbt.JsonToNBT; import net.minecraft.nbt.NBTException; import net.minecraft.nbt.NBTTagCompound; -/** - * 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 ClientBootFactory { private static final Logger logger = LogManager.getLogger("ClientBootFactory"); @@ -722,4 +723,4 @@ public class ClientBootFactory { }, 250); } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/ClientDataEntry.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/ClientDataEntry.java index 6c24a38..6c4f95e 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/ClientDataEntry.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/ClientDataEntry.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.util.ArrayList; -import java.util.Collection; -import java.util.List; - -import org.json.JSONArray; -import org.json.JSONObject; - -import com.google.common.collect.Collections2; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,18 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.util.ArrayList; +import java.util.Collection; +import java.util.List; + +import org.json.JSONArray; +import org.json.JSONObject; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; + public class ClientDataEntry { public final EnumClientFormatType type; @@ -130,12 +129,12 @@ public class ClientDataEntry { case EAGLER_STANDARD_OFFLINE: default: toRet.add(mainPayload); - toRet.addAll(Collections2.transform(epkFiles, (e) -> e.dataUUID)); + epkFiles.stream().map((e) -> e.dataUUID).forEach(toRet::add); break; case EAGLER_STANDARD_1_5_OFFLINE: toRet.add(mainPayload); toRet.add(integratedServer); - toRet.addAll(Collections2.transform(epkFiles, (e) -> e.dataUUID)); + epkFiles.stream().map((e) -> e.dataUUID).forEach(toRet::add); break; case EAGLER_SIGNED_OFFLINE: toRet.add(mainPayload); @@ -149,4 +148,4 @@ public class ClientDataEntry { return new ClientDataEntry(type, rotatedClientUUID, mainPayload, integratedServer, clientSignature, epkFiles); } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/ConfirmationPopupController.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/ConfirmationPopupController.java index 8dd6013..53a4a58 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/ConfirmationPopupController.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/ConfirmationPopupController.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.util.ArrayList; -import java.util.List; - -import org.teavm.jso.dom.html.HTMLElement; - -import com.google.common.escape.Escaper; -import com.google.common.html.HtmlEscapers; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import com.google.common.html.HtmlEscapers; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.util.ArrayList; +import java.util.List; + +import org.teavm.jso.dom.html.HTMLElement; + +import com.google.common.escape.Escaper; +import com.google.common.html.HtmlEscapers; + public abstract class ConfirmationPopupController { public static interface SelectionOption { @@ -188,4 +189,4 @@ public abstract class ConfirmationPopupController extends MenuState { public static enum EnumYesNoHelper { @@ -64,7 +62,7 @@ public abstract class MenuPopupStateConfirmation extends MenuState { this.options = options; this.popupController = new ConfirmationPopupController( BootMenuMain.bootMenuDOM.popup_confirm_opts, - new ArrayList(Collections2.transform(options, SelectionItem::new))) { + options.stream().map(SelectionItem::new).toList()) { @Override protected void optionSelected(SelectionItem item) { MenuPopupStateConfirmation.this.selectCallback(item.enumValue); @@ -138,4 +136,4 @@ public abstract class MenuPopupStateConfirmation extends MenuState { protected abstract void selectCallback(E enumValue); -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateEditInteger.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateEditInteger.java index 1aa60ee..49fcb68 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateEditInteger.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateEditInteger.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import org.teavm.jso.dom.html.HTMLElement; -import org.teavm.jso.dom.html.HTMLInputElement; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.jso.dom.html.HTMLInputElement; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import org.teavm.jso.dom.html.HTMLElement; +import org.teavm.jso.dom.html.HTMLInputElement; + public abstract class MenuPopupStateEditInteger extends MenuState { protected final InputPopupController inputPopupController; @@ -111,4 +112,4 @@ public abstract class MenuPopupStateEditInteger extends MenuState { protected abstract void onCancel(); -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateEditString.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateEditString.java index 5610545..d98f3fe 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateEditString.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateEditString.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import org.teavm.jso.dom.html.HTMLElement; -import org.teavm.jso.dom.html.HTMLInputElement; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.jso.dom.html.HTMLInputElement; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import org.teavm.jso.dom.html.HTMLElement; +import org.teavm.jso.dom.html.HTMLInputElement; + public abstract class MenuPopupStateEditString extends MenuState { protected final InputPopupController inputPopupController; @@ -106,4 +107,4 @@ public abstract class MenuPopupStateEditString extends MenuState { protected abstract void onCancel(); -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateFileChooser.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateFileChooser.java index dcc3293..51ed795 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateFileChooser.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateFileChooser.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import org.teavm.jso.dom.html.HTMLElement; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.FileChooserResult; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.internal.FileChooserResult; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import org.teavm.jso.dom.html.HTMLElement; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.FileChooserResult; + public abstract class MenuPopupStateFileChooser extends MenuState { protected final String text; diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateLoading.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateLoading.java index 236ce42..62458f9 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateLoading.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateLoading.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import org.apache.commons.lang3.StringUtils; -import org.teavm.jso.dom.html.HTMLElement; - -import net.lax1dude.eaglercraft.v1_8.EagUtils; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.EagUtils; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import org.apache.commons.lang3.StringUtils; +import org.teavm.jso.dom.html.HTMLElement; + +import net.lax1dude.eaglercraft.v1_8.EagUtils; + public class MenuPopupStateLoading extends MenuState implements IProgressMsgCallback { protected final String text; @@ -95,4 +96,4 @@ public class MenuPopupStateLoading extends MenuState implements IProgressMsgCall } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateSelection.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateSelection.java index 86ee032..c0c9173 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateSelection.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuPopupStateSelection.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.util.ArrayList; -import java.util.List; -import java.util.function.Consumer; - -import org.teavm.jso.dom.html.HTMLElement; - -import com.google.common.collect.Collections2; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,14 @@ import com.google.common.collect.Collections2; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.util.List; +import java.util.function.Consumer; + +import org.teavm.jso.dom.html.HTMLElement; + public abstract class MenuPopupStateSelection extends MenuState { public static class SelectionItem implements SelectionListController.ListItem { @@ -63,8 +61,7 @@ public abstract class MenuPopupStateSelection extends MenuState { } public static MenuPopupStateSelection createHelper(String title, List items, Consumer selectCallback) { - return new MenuPopupStateSelection(title, - new ArrayList>(Collections2.transform(items, SelectionItem::new))) { + return new MenuPopupStateSelection(title, items.stream().map(SelectionItem::new).toList()) { @Override protected void itemSelected(T item) { selectCallback.accept(item); @@ -138,4 +135,4 @@ public abstract class MenuPopupStateSelection extends MenuState { protected abstract void itemSelected(T item); -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuState.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuState.java index 7ffb7f1..6d2eae1 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuState.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuState.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import org.teavm.jso.dom.html.HTMLElement; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import org.teavm.jso.dom.html.HTMLElement; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import org.teavm.jso.dom.html.HTMLElement; + public abstract class MenuState { protected MenuState currentPopup = null; @@ -132,4 +133,4 @@ public abstract class MenuState { protected abstract void update(); -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateBoot.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateBoot.java index d8fd699..0c9dddd 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateBoot.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateBoot.java @@ -1,26 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.nio.charset.StandardCharsets; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.function.Consumer; - -import org.teavm.jso.dom.html.HTMLElement; - -import com.google.common.collect.Collections2; -import com.google.common.collect.Lists; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.EagUtils; -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; -import net.lax1dude.eaglercraft.v1_8.boot_menu.teavm.BootMenuMetadata.DefaultLaunchTemplate; -import net.lax1dude.eaglercraft.v1_8.boot_menu.teavm.OfflineDownloadParser.ParsedOfflineAdapter; -import net.lax1dude.eaglercraft.v1_8.internal.FileChooserResult; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -35,6 +13,26 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.nio.charset.StandardCharsets; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.function.Consumer; + +import org.teavm.jso.dom.html.HTMLElement; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.EagUtils; +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; +import net.lax1dude.eaglercraft.v1_8.boot_menu.teavm.BootMenuMetadata.DefaultLaunchTemplate; +import net.lax1dude.eaglercraft.v1_8.boot_menu.teavm.OfflineDownloadParser.ParsedOfflineAdapter; +import net.lax1dude.eaglercraft.v1_8.internal.FileChooserResult; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class MenuStateBoot extends MenuState { private static final Logger logger = LogManager.getLogger("MenuStateBoot"); @@ -394,7 +392,7 @@ public class MenuStateBoot extends MenuState { }else if(enumValue2 == EnumImportModeMenu.AUTO_DETECT || enumValue2 == EnumImportModeMenu.EAGLERCRAFT_EPK_FILE) { filteredList = bootableClients; }else { - filteredList = Lists.newArrayList(Collections2.filter(bootableClients, (etr) -> { + filteredList = bootableClients.stream().filter((etr) -> { switch(enumValue2) { case EAGLERCRAFTX_1_8_OFFLINE: case EAGLERCRAFT_1_5_OLD_OFFLINE: @@ -410,7 +408,7 @@ public class MenuStateBoot extends MenuState { default: return false; } - })); + }).toList(); } if(filteredList.size() > 0) { MenuStateBoot.this.changePopupState(null); @@ -580,4 +578,4 @@ public class MenuStateBoot extends MenuState { } } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateClientMultiSelect.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateClientMultiSelect.java index d704131..f9b8e31 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateClientMultiSelect.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateClientMultiSelect.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.util.ArrayList; -import java.util.List; - -import org.teavm.jso.dom.html.HTMLElement; - -import com.google.common.collect.Collections2; -import com.google.common.collect.Lists; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,13 @@ import com.google.common.collect.Lists; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.util.List; + +import org.teavm.jso.dom.html.HTMLElement; + public abstract class MenuStateClientMultiSelect extends MenuState { protected static class BootItem implements SelectionListController.ListItem { @@ -53,7 +50,7 @@ public abstract class MenuStateClientMultiSelect extends MenuState { public MenuStateClientMultiSelect(MenuState parentState, List bootableClients) { this.parentState = parentState; - List list = new ArrayList<>(Collections2.transform(bootableClients, BootItem::new)); + List list = bootableClients.stream().map(BootItem::new).toList(); selectionController = new CheckboxListController(BootMenuMain.bootMenuDOM.content_selection, list) { @Override @@ -63,7 +60,7 @@ public abstract class MenuStateClientMultiSelect extends MenuState { @Override protected void doneSelected(List selectedItems) { - MenuStateClientMultiSelect.this.onDone(Lists.newArrayList(Collections2.transform(selectedItems, (itm) -> itm.bootableClient))); + MenuStateClientMultiSelect.this.onDone(selectedItems.stream().map((itm) -> itm.bootableClient).toList()); } }; @@ -134,4 +131,4 @@ public abstract class MenuStateClientMultiSelect extends MenuState { protected abstract void onDone(List entries); -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateEditBootOrder.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateEditBootOrder.java index d5f60f3..f9bd63f 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateEditBootOrder.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateEditBootOrder.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.teavm.jso.dom.html.HTMLElement; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.teavm.jso.dom.html.HTMLElement; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; + public abstract class MenuStateEditBootOrder extends MenuState { private static final EaglercraftUUID MAGIC_UUID_CANCEL = new EaglercraftUUID(0xD13983F5B764B3DL, 0xBF2C5157DEFDB5F9L); @@ -265,4 +266,4 @@ public abstract class MenuStateEditBootOrder extends MenuState { protected abstract void handleCancel(); -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateEditingLaunch.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateEditingLaunch.java index a5db272..f5e888e 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateEditingLaunch.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateEditingLaunch.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; import java.util.Arrays; @@ -21,21 +37,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.minecraft.nbt.JsonToNBT; import net.minecraft.nbt.NBTException; -/** - * 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 MenuStateEditingLaunch extends MenuState { private static final Logger logger = LogManager.getLogger("MenuStateEditingLaunch"); @@ -671,4 +672,4 @@ public class MenuStateEditingLaunch extends MenuState { } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateEnterSetup.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateEnterSetup.java index 4a8e5e6..3781caf 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateEnterSetup.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateEnterSetup.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import org.apache.commons.lang3.StringUtils; -import org.teavm.jso.dom.html.HTMLElement; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +import org.apache.commons.lang3.StringUtils; +import org.teavm.jso.dom.html.HTMLElement; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; + public class MenuStateEnterSetup extends MenuState { private static enum EnumListMultiSelectType { @@ -258,4 +259,4 @@ public class MenuStateEnterSetup extends MenuState { } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateImportMultiSelect.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateImportMultiSelect.java index 56e8837..c7673fe 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateImportMultiSelect.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateImportMultiSelect.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.util.ArrayList; -import java.util.List; - -import org.teavm.jso.dom.html.HTMLElement; - -import com.google.common.collect.Collections2; - -import net.lax1dude.eaglercraft.v1_8.boot_menu.teavm.OfflineDownloadParser.ParsedOfflineAdapter; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,15 @@ import net.lax1dude.eaglercraft.v1_8.boot_menu.teavm.OfflineDownloadParser.Parse * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.util.List; + +import org.teavm.jso.dom.html.HTMLElement; + +import net.lax1dude.eaglercraft.v1_8.boot_menu.teavm.OfflineDownloadParser.ParsedOfflineAdapter; + public class MenuStateImportMultiSelect extends MenuState { protected static class BootItem implements SelectionListController.ListItem { @@ -51,7 +49,7 @@ public class MenuStateImportMultiSelect extends MenuState { public MenuStateImportMultiSelect(MenuState parentState, List parsedClients) { this.parentState = parentState; - List list = new ArrayList<>(Collections2.transform(parsedClients, BootItem::new)); + List list = parsedClients.stream().map(BootItem::new).toList(); selectionController = new CheckboxListController(BootMenuMain.bootMenuDOM.content_selection, list) { @Override @@ -141,4 +139,4 @@ public class MenuStateImportMultiSelect extends MenuState { } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateSelectExportClients.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateSelectExportClients.java index 97f38a7..17f825b 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateSelectExportClients.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/MenuStateSelectExportClients.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; -import java.util.function.Consumer; - -import org.teavm.jso.dom.html.HTMLElement; - -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.function.Consumer; + +import org.teavm.jso.dom.html.HTMLElement; + +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class MenuStateSelectExportClients extends MenuState { private static final Logger logger = LogManager.getLogger("MenuStateSelectExportClients"); @@ -148,4 +149,4 @@ public class MenuStateSelectExportClients extends MenuState { } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/OfflineDownloadFactory.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/OfflineDownloadFactory.java index 32f8626..4978a87 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/OfflineDownloadFactory.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/OfflineDownloadFactory.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; import java.io.IOException; @@ -24,21 +40,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.update.CertificateInvalidException; import net.lax1dude.eaglercraft.v1_8.update.UpdateCertificate; -/** - * 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 OfflineDownloadFactory { private static final Logger logger = LogManager.getLogger("OfflineDownloadFactory"); @@ -610,4 +611,4 @@ public class OfflineDownloadFactory { } } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/OfflineDownloadParser.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/OfflineDownloadParser.java index 985a6ab..55390ec 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/OfflineDownloadParser.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/OfflineDownloadParser.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; import java.nio.charset.StandardCharsets; @@ -20,21 +36,6 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 OfflineDownloadParser { private static final Logger logger = LogManager.getLogger("OfflineDownloadParser"); @@ -993,4 +994,4 @@ public class OfflineDownloadParser { classesJSUUID, null, null, epks), blobs)); } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/RelayRandomizeHelper.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/RelayRandomizeHelper.java index e053026..2d64932 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/RelayRandomizeHelper.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/RelayRandomizeHelper.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import org.json.JSONArray; -import org.json.JSONObject; - -import net.lax1dude.eaglercraft.v1_8.ThreadLocalRandom; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.ThreadLocalRandom; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import org.json.JSONArray; +import org.json.JSONObject; + +import net.lax1dude.eaglercraft.v1_8.ThreadLocalRandom; + public class RelayRandomizeHelper { public static int countRelayMacro(String launchOpts) { @@ -68,4 +69,4 @@ public class RelayRandomizeHelper { } } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/SelectionListController.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/SelectionListController.java index 0c42f4f..8f31c26 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/SelectionListController.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/SelectionListController.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import org.teavm.jso.dom.html.HTMLElement; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import org.teavm.jso.dom.html.HTMLElement; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + +import org.teavm.jso.dom.html.HTMLElement; + public abstract class SelectionListController { public static interface ListItem { @@ -237,4 +238,4 @@ public abstract class SelectionListController baseGlobals; @@ -74,4 +75,4 @@ public class TemplateLoader { return TemplateParser.loadTemplate(templateContent, basePath, true, globals); } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/TemplateParser.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/TemplateParser.java index 5738f28..7830c20 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/TemplateParser.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/TemplateParser.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -import java.io.IOException; -import java.util.Map; - -import org.apache.commons.lang3.text.StrTokenizer; -import org.json.JSONObject; - -import com.google.common.html.HtmlEscapers; - -import net.lax1dude.eaglercraft.v1_8.Base64; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.lax1dude.eaglercraft.v1_8.Base64; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + +import java.io.IOException; +import java.util.Map; + +import org.apache.commons.lang3.text.StrTokenizer; +import org.json.JSONObject; + +import com.google.common.html.HtmlEscapers; + +import net.lax1dude.eaglercraft.v1_8.Base64; + public class TemplateParser { private static class State { @@ -257,4 +258,4 @@ public class TemplateParser { return res; } -} +} \ No newline at end of file diff --git a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/UnsignedBootException.java b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/UnsignedBootException.java index 1c39eac..e3dae1a 100755 --- a/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/UnsignedBootException.java +++ b/src/teavm-boot-menu/java/net/lax1dude/eaglercraft/v1_8/boot_menu/teavm/UnsignedBootException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,9 +13,12 @@ package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.boot_menu.teavm; + public class UnsignedBootException extends RuntimeException { public UnsignedBootException() { } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/OpenGLObjects.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/OpenGLObjects.java index 1efa253..57a7e62 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/OpenGLObjects.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/OpenGLObjects.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import org.teavm.jso.webgl.WebGLBuffer; -import org.teavm.jso.webgl.WebGLFramebuffer; -import org.teavm.jso.webgl.WebGLProgram; -import org.teavm.jso.webgl.WebGLRenderbuffer; -import org.teavm.jso.webgl.WebGLShader; -import org.teavm.jso.webgl.WebGLTexture; -import org.teavm.jso.webgl.WebGLUniformLocation; - -import net.lax1dude.eaglercraft.v1_8.internal.teavm.WebGLQuery; -import net.lax1dude.eaglercraft.v1_8.internal.teavm.WebGLVertexArray; - -/** +/* * Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.WebGLVertexArray; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import org.teavm.jso.webgl.WebGLBuffer; +import org.teavm.jso.webgl.WebGLFramebuffer; +import org.teavm.jso.webgl.WebGLProgram; +import org.teavm.jso.webgl.WebGLRenderbuffer; +import org.teavm.jso.webgl.WebGLShader; +import org.teavm.jso.webgl.WebGLTexture; +import org.teavm.jso.webgl.WebGLUniformLocation; + +import net.lax1dude.eaglercraft.v1_8.internal.teavm.WebGLQuery; +import net.lax1dude.eaglercraft.v1_8.internal.teavm.WebGLVertexArray; + class OpenGLObjects { static class BufferGL implements IBufferGL { @@ -50,13 +51,13 @@ class OpenGLObjects { } - static class BufferArrayGL implements IBufferArrayGL { + static class VertexArrayGL implements IVertexArrayGL { private static int hashGen = 0; final WebGLVertexArray ptr; final int hash; - BufferArrayGL(WebGLVertexArray ptr) { + VertexArrayGL(WebGLVertexArray ptr) { this.ptr = ptr; this.hash = ++hashGen; } @@ -243,4 +244,4 @@ class OpenGLObjects { } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformApplication.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformApplication.java index 7196d00..2f87387 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformApplication.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformApplication.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.net.URI; @@ -32,21 +48,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMBlobURLHandle; import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMBlobURLManager; import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; -/** - * Copyright (c) 2022-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 PlatformApplication { public static void openLink(String url) { @@ -526,4 +527,4 @@ public class PlatformApplication { @JSBody(params = { "str" }, script = "window.minecraftServer = str;") public static native void setMCServerWindowGlobal(String str); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAssets.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAssets.java index 96b6774..5a452cf 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAssets.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAssets.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2023 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.io.InputStream; @@ -25,21 +41,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMBlobURLManager; import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; -/** - * Copyright (c) 2022-2023 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 PlatformAssets { private static final byte[] MISSING_FILE = new byte[0]; @@ -171,4 +172,4 @@ public class PlatformAssets { public static void freeAssetRepoTeaVM() { assets = new HashMap<>(); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAudio.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAudio.java index c95c10d..ea489a7 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAudio.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAudio.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.util.HashMap; @@ -33,21 +49,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.minecraft.util.MathHelper; -/** - * Copyright (c) 2022-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 PlatformAudio { static final Logger logger = LogManager.getLogger("BrowserAudio"); @@ -587,4 +588,4 @@ public class PlatformAudio { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformFilesystem.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformFilesystem.java index 439b002..6eec0b9 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformFilesystem.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformFilesystem.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import net.lax1dude.eaglercraft.v1_8.internal.teavm.IndexedDBFilesystem; -import net.lax1dude.eaglercraft.v1_8.internal.vfs2.EaglerFileSystemException; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2022-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import net.lax1dude.eaglercraft.v1_8.internal.teavm.IndexedDBFilesystem; +import net.lax1dude.eaglercraft.v1_8.internal.vfs2.EaglerFileSystemException; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class PlatformFilesystem { private static final Logger logger = LogManager.getLogger("PlatformFilesystem"); @@ -46,4 +47,4 @@ public class PlatformFilesystem { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformInput.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformInput.java index bbe1a53..6a6b0f9 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformInput.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformInput.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.util.ArrayList; @@ -44,21 +60,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.OffsetTouch; import net.lax1dude.eaglercraft.v1_8.internal.teavm.SortedTouchEvent; import net.lax1dude.eaglercraft.v1_8.internal.teavm.WebGLBackBuffer; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 PlatformInput { private static Window win = null; @@ -404,7 +405,6 @@ public class PlatformInput { handleWindowFocus(); SortedTouchEvent sorted = new SortedTouchEvent(evt, touchUIDMapperCreate); currentTouchState = sorted; - List lst = sorted.getEventTouches(); synchronized(touchEvents) { touchEvents.add(sorted); if(touchEvents.size() > 64) { @@ -2449,4 +2449,4 @@ public class PlatformInput { visualViewportH = sh; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformNetworking.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformNetworking.java index a41cf1d..7488965 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformNetworking.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformNetworking.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMWebSocketClient; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMWebSocketClient; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class PlatformNetworking { private static final Logger logger = LogManager.getLogger("PlatformNetworking"); @@ -37,4 +38,4 @@ public class PlatformNetworking { return new TeaVMWebSocketClient(socketURI); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformOpenGL.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformOpenGL.java index 7ad8399..51f71b2 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformOpenGL.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformOpenGL.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.util.ArrayList; @@ -20,21 +36,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; -/** - * Copyright (c) 2022-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 PlatformOpenGL { private static final Logger logger = LogManager.getLogger("PlatformOpenGL"); @@ -148,7 +149,7 @@ public class PlatformOpenGL { } } - public static final List dumpActiveExtensions() { + public static List dumpActiveExtensions() { List exts = new ArrayList<>(); if(hasANGLEInstancedArrays) exts.add("ANGLE_instanced_arrays"); if(hasEXTColorBufferFloat) exts.add("EXT_color_buffer_float"); @@ -165,64 +166,64 @@ public class PlatformOpenGL { return exts; } - public static final void _wglEnable(int glEnum) { + public static void _wglEnable(int glEnum) { ctx.enable(glEnum); } - public static final void _wglDisable(int glEnum) { + public static void _wglDisable(int glEnum) { ctx.disable(glEnum); } - public static final void _wglClearColor(float r, float g, float b, float a) { + public static void _wglClearColor(float r, float g, float b, float a) { ctx.clearColor(r, g, b, a); } - public static final void _wglClearDepth(float f) { + public static void _wglClearDepth(float f) { ctx.clearDepth(f); } - public static final void _wglClear(int bits) { + public static void _wglClear(int bits) { ctx.clear(bits); } - public static final void _wglDepthFunc(int glEnum) { + public static void _wglDepthFunc(int glEnum) { ctx.depthFunc(glEnum); } - public static final void _wglDepthMask(boolean mask) { + public static void _wglDepthMask(boolean mask) { ctx.depthMask(mask); } - public static final void _wglCullFace(int glEnum) { + public static void _wglCullFace(int glEnum) { ctx.cullFace(glEnum); } - public static final void _wglViewport(int x, int y, int w, int h) { + public static void _wglViewport(int x, int y, int w, int h) { ctx.viewport(x, y, w, h); } - public static final void _wglBlendFunc(int src, int dst) { + public static void _wglBlendFunc(int src, int dst) { ctx.blendFunc(src, dst); } - public static final void _wglBlendFuncSeparate(int srcColor, int dstColor, + public static void _wglBlendFuncSeparate(int srcColor, int dstColor, int srcAlpha, int dstAlpha) { ctx.blendFuncSeparate(srcColor, dstColor, srcAlpha, dstAlpha); } - public static final void _wglBlendEquation(int glEnum) { + public static void _wglBlendEquation(int glEnum) { ctx.blendEquation(glEnum); } - public static final void _wglBlendColor(float r, float g, float b, float a) { + public static void _wglBlendColor(float r, float g, float b, float a) { ctx.blendColor(r, g, b, a); } - public static final void _wglColorMask(boolean r, boolean g, boolean b, boolean a) { + public static void _wglColorMask(boolean r, boolean g, boolean b, boolean a) { ctx.colorMask(r, g, b, a); } - public static final void _wglDrawBuffers(int buffer) { + public static void _wglDrawBuffers(int buffer) { if(glesVers == 200) { if(buffer != 0x8CE0) { // GL_COLOR_ATTACHMENT0 throw new UnsupportedOperationException(); @@ -232,7 +233,7 @@ public class PlatformOpenGL { } } - public static final void _wglDrawBuffers(int[] buffers) { + public static void _wglDrawBuffers(int[] buffers) { if(glesVers == 200) { if(buffers.length != 1 || buffers[0] != 0x8CE0) { // GL_COLOR_ATTACHMENT0 throw new UnsupportedOperationException(); @@ -242,83 +243,83 @@ public class PlatformOpenGL { } } - public static final void _wglReadBuffer(int buffer) { + public static void _wglReadBuffer(int buffer) { ctx.readBuffer(buffer); } - public static final void _wglReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer data) { + public static void _wglReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer data) { ctx.readPixels(x, y, width, height, format, type, EaglerArrayBufferAllocator.getDataView8Unsigned(data)); } - public static final void _wglReadPixels_u16(int x, int y, int width, int height, int format, int type, ByteBuffer data) { + public static void _wglReadPixels_u16(int x, int y, int width, int height, int format, int type, ByteBuffer data) { ctx.readPixels(x, y, width, height, format, type, EaglerArrayBufferAllocator.getDataView16Unsigned(data)); } - public static final void _wglReadPixels(int x, int y, int width, int height, int format, int type, IntBuffer data) { + public static void _wglReadPixels(int x, int y, int width, int height, int format, int type, IntBuffer data) { ctx.readPixels(x, y, width, height, format, type, EaglerArrayBufferAllocator.getDataView32(data)); } - public static final void _wglReadPixels(int x, int y, int width, int height, int format, int type, FloatBuffer data) { + public static void _wglReadPixels(int x, int y, int width, int height, int format, int type, FloatBuffer data) { ctx.readPixels(x, y, width, height, format, type, EaglerArrayBufferAllocator.getDataView32F(data)); } - public static final void _wglPolygonOffset(float f1, float f2) { + public static void _wglPolygonOffset(float f1, float f2) { ctx.polygonOffset(f1, f2); } - public static final void _wglLineWidth(float width) { + public static void _wglLineWidth(float width) { ctx.lineWidth(width); } - public static final IBufferGL _wglGenBuffers() { + public static IBufferGL _wglGenBuffers() { return new OpenGLObjects.BufferGL(ctx.createBuffer()); } - public static final ITextureGL _wglGenTextures() { + public static ITextureGL _wglGenTextures() { return new OpenGLObjects.TextureGL(ctx.createTexture()); } - public static final IBufferArrayGL _wglGenVertexArrays() { + public static IVertexArrayGL _wglGenVertexArrays() { switch(vertexArrayImpl) { case VAO_IMPL_CORE: - return new OpenGLObjects.BufferArrayGL(ctx.createVertexArray()); + return new OpenGLObjects.VertexArrayGL(ctx.createVertexArray()); case VAO_IMPL_OES: - return new OpenGLObjects.BufferArrayGL(OESVertexArrayObject.createVertexArrayOES()); + return new OpenGLObjects.VertexArrayGL(OESVertexArrayObject.createVertexArrayOES()); default: throw new UnsupportedOperationException(); } } - public static final IProgramGL _wglCreateProgram() { + public static IProgramGL _wglCreateProgram() { return new OpenGLObjects.ProgramGL(ctx.createProgram()); } - public static final IShaderGL _wglCreateShader(int type) { + public static IShaderGL _wglCreateShader(int type) { return new OpenGLObjects.ShaderGL(ctx.createShader(type)); } - public static final IFramebufferGL _wglCreateFramebuffer() { + public static IFramebufferGL _wglCreateFramebuffer() { return new OpenGLObjects.FramebufferGL(ctx.createFramebuffer()); } - public static final IRenderbufferGL _wglCreateRenderbuffer() { + public static IRenderbufferGL _wglCreateRenderbuffer() { return new OpenGLObjects.RenderbufferGL(ctx.createRenderbuffer()); } - public static final IQueryGL _wglGenQueries() { + public static IQueryGL _wglGenQueries() { return new OpenGLObjects.QueryGL(ctx.createQuery()); } - public static final void _wglDeleteBuffers(IBufferGL obj) { + public static void _wglDeleteBuffers(IBufferGL obj) { ctx.deleteBuffer(((OpenGLObjects.BufferGL)obj).ptr); } - public static final void _wglDeleteTextures(ITextureGL obj) { + public static void _wglDeleteTextures(ITextureGL obj) { ctx.deleteTexture(((OpenGLObjects.TextureGL)obj).ptr); } - public static final void _wglDeleteVertexArrays(IBufferArrayGL obj) { - WebGLVertexArray ptr = ((OpenGLObjects.BufferArrayGL)obj).ptr; + public static void _wglDeleteVertexArrays(IVertexArrayGL obj) { + WebGLVertexArray ptr = ((OpenGLObjects.VertexArrayGL)obj).ptr; switch(vertexArrayImpl) { case VAO_IMPL_CORE: ctx.deleteVertexArray(ptr); @@ -331,60 +332,60 @@ public class PlatformOpenGL { } } - public static final void _wglDeleteProgram(IProgramGL obj) { + public static void _wglDeleteProgram(IProgramGL obj) { ctx.deleteProgram(((OpenGLObjects.ProgramGL)obj).ptr); } - public static final void _wglDeleteShader(IShaderGL obj) { + public static void _wglDeleteShader(IShaderGL obj) { ctx.deleteShader(((OpenGLObjects.ShaderGL)obj).ptr); } - public static final void _wglDeleteFramebuffer(IFramebufferGL obj) { + public static void _wglDeleteFramebuffer(IFramebufferGL obj) { ctx.deleteFramebuffer(((OpenGLObjects.FramebufferGL)obj).ptr); } - public static final void _wglDeleteRenderbuffer(IRenderbufferGL obj) { + public static void _wglDeleteRenderbuffer(IRenderbufferGL obj) { ctx.deleteRenderbuffer(((OpenGLObjects.RenderbufferGL)obj).ptr); } - public static final void _wglDeleteQueries(IQueryGL obj) { + public static void _wglDeleteQueries(IQueryGL obj) { ctx.deleteQuery(((OpenGLObjects.QueryGL)obj).ptr); } - public static final void _wglBindBuffer(int target, IBufferGL obj) { + public static void _wglBindBuffer(int target, IBufferGL obj) { ctx.bindBuffer(target, obj != null ? ((OpenGLObjects.BufferGL)obj).ptr : null); } - public static final void _wglBufferData(int target, ByteBuffer data, int usage) { + public static void _wglBufferData(int target, ByteBuffer data, int usage) { ctx.bufferData(target, EaglerArrayBufferAllocator.getDataView8(data), usage); } - public static final void _wglBufferData(int target, IntBuffer data, int usage) { + public static void _wglBufferData(int target, IntBuffer data, int usage) { ctx.bufferData(target, EaglerArrayBufferAllocator.getDataView32(data), usage); } - public static final void _wglBufferData(int target, FloatBuffer data, int usage) { + public static void _wglBufferData(int target, FloatBuffer data, int usage) { ctx.bufferData(target, EaglerArrayBufferAllocator.getDataView32F(data), usage); } - public static final void _wglBufferData(int target, int size, int usage) { + public static void _wglBufferData(int target, int size, int usage) { ctx.bufferData(target, size, usage); } - public static final void _wglBufferSubData(int target, int offset, ByteBuffer data) { + public static void _wglBufferSubData(int target, int offset, ByteBuffer data) { ctx.bufferSubData(target, offset, EaglerArrayBufferAllocator.getDataView8(data)); } - public static final void _wglBufferSubData(int target, int offset, IntBuffer data) { + public static void _wglBufferSubData(int target, int offset, IntBuffer data) { ctx.bufferSubData(target, offset, EaglerArrayBufferAllocator.getDataView32(data)); } - public static final void _wglBufferSubData(int target, int offset, FloatBuffer data) { + public static void _wglBufferSubData(int target, int offset, FloatBuffer data) { ctx.bufferSubData(target, offset, EaglerArrayBufferAllocator.getDataView32F(data)); } - public static final void _wglBindVertexArray(IBufferArrayGL obj) { - WebGLVertexArray ptr = obj != null ? ((OpenGLObjects.BufferArrayGL)obj).ptr : null; + public static void _wglBindVertexArray(IVertexArrayGL obj) { + WebGLVertexArray ptr = obj != null ? ((OpenGLObjects.VertexArrayGL)obj).ptr : null; switch(vertexArrayImpl) { case VAO_IMPL_CORE: ctx.bindVertexArray(ptr); @@ -397,20 +398,20 @@ public class PlatformOpenGL { } } - public static final void _wglEnableVertexAttribArray(int index) { + public static void _wglEnableVertexAttribArray(int index) { ctx.enableVertexAttribArray(index); } - public static final void _wglDisableVertexAttribArray(int index) { + public static void _wglDisableVertexAttribArray(int index) { ctx.disableVertexAttribArray(index); } - public static final void _wglVertexAttribPointer(int index, int size, int type, + public static void _wglVertexAttribPointer(int index, int size, int type, boolean normalized, int stride, int offset) { ctx.vertexAttribPointer(index, size, type, normalized, stride, offset); } - public static final void _wglVertexAttribDivisor(int index, int divisor) { + public static void _wglVertexAttribDivisor(int index, int divisor) { switch(instancingImpl) { case INSTANCE_IMPL_CORE: ctx.vertexAttribDivisor(index, divisor); @@ -423,153 +424,153 @@ public class PlatformOpenGL { } } - public static final void _wglActiveTexture(int texture) { + public static void _wglActiveTexture(int texture) { ctx.activeTexture(texture); } - public static final void _wglBindTexture(int target, ITextureGL obj) { + public static void _wglBindTexture(int target, ITextureGL obj) { ctx.bindTexture(target, obj == null ? null : ((OpenGLObjects.TextureGL)obj).ptr); } - public static final void _wglTexParameterf(int target, int param, float value) { + public static void _wglTexParameterf(int target, int param, float value) { ctx.texParameterf(target, param, value); } - public static final void _wglTexParameteri(int target, int param, int value) { + public static void _wglTexParameteri(int target, int param, int value) { ctx.texParameteri(target, param, value); } - public static final void _wglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, + public static void _wglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ByteBuffer data) { ctx.texImage3D(target, level, internalFormat, width, height, depth, border, format, type, data == null ? null : EaglerArrayBufferAllocator.getDataView8Unsigned(data)); } - public static final void _wglTexImage2D(int target, int level, int internalFormat, int width, + public static void _wglTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ByteBuffer data) { ctx.texImage2D(target, level, internalFormat, width, height, border, format, type, data == null ? null : EaglerArrayBufferAllocator.getDataView8Unsigned(data)); } - public static final void _wglTexImage2Du16(int target, int level, int internalFormat, int width, + public static void _wglTexImage2Du16(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ByteBuffer data) { ctx.texImage2D(target, level, internalFormat, width, height, border, format, type, data == null ? null : EaglerArrayBufferAllocator.getDataView16Unsigned(data)); } - public static final void _wglTexImage2Df32(int target, int level, int internalFormat, int width, + public static void _wglTexImage2Df32(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ByteBuffer data) { ctx.texImage2D(target, level, internalFormat, width, height, border, format, type, data == null ? null : EaglerArrayBufferAllocator.getDataView32F(data)); } - public static final void _wglTexImage2D(int target, int level, int internalFormat, int width, + public static void _wglTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, IntBuffer data) { ctx.texImage2D(target, level, internalFormat, width, height, border, format, type, data == null ? null : EaglerArrayBufferAllocator.getDataView8Unsigned(data)); } - public static final void _wglTexImage2Df32(int target, int level, int internalFormat, int width, + public static void _wglTexImage2Df32(int target, int level, int internalFormat, int width, int height, int border, int format, int type, FloatBuffer data) { ctx.texImage2D(target, level, internalFormat, width, height, border, format, type, data == null ? null : EaglerArrayBufferAllocator.getDataView32F(data)); } - public static final void _wglTexSubImage2D(int target, int level, int xoffset, int yoffset, + public static void _wglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer data) { ctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data == null ? null : EaglerArrayBufferAllocator.getDataView8Unsigned(data)); } - public static final void _wglTexSubImage2Du16(int target, int level, int xoffset, int yoffset, + public static void _wglTexSubImage2Du16(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer data) { ctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data == null ? null : EaglerArrayBufferAllocator.getDataView16Unsigned(data)); } - public static final void _wglTexSubImage2D(int target, int level, int xoffset, int yoffset, + public static void _wglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer data) { ctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data == null ? null : EaglerArrayBufferAllocator.getDataView8Unsigned(data)); } - public static final void _wglTexSubImage2Df32(int target, int level, int xoffset, int yoffset, + public static void _wglTexSubImage2Df32(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, FloatBuffer data) { ctx.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data == null ? null : EaglerArrayBufferAllocator.getDataView32F(data)); } - public static final void _wglCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, + public static void _wglCopyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x, int y, int width, int height) { ctx.copyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); } - public static final void _wglTexStorage2D(int target, int levels, int internalFormat, int w, int h) { + public static void _wglTexStorage2D(int target, int levels, int internalFormat, int w, int h) { ctx.texStorage2D(target, levels, internalFormat, w, h); } - public static final void _wglPixelStorei(int pname, int value) { + public static void _wglPixelStorei(int pname, int value) { ctx.pixelStorei(pname, value); } - public static final void _wglGenerateMipmap(int target) { + public static void _wglGenerateMipmap(int target) { ctx.generateMipmap(target); } - public static final void _wglShaderSource(IShaderGL obj, String source) { + public static void _wglShaderSource(IShaderGL obj, String source) { ctx.shaderSource(((OpenGLObjects.ShaderGL)obj).ptr, source); } - public static final void _wglCompileShader(IShaderGL obj) { + public static void _wglCompileShader(IShaderGL obj) { ctx.compileShader(((OpenGLObjects.ShaderGL)obj).ptr); } - public static final int _wglGetShaderi(IShaderGL obj, int param) { + public static int _wglGetShaderi(IShaderGL obj, int param) { return ctx.getShaderParameteri(((OpenGLObjects.ShaderGL)obj).ptr, param); } - public static final String _wglGetShaderInfoLog(IShaderGL obj) { + public static String _wglGetShaderInfoLog(IShaderGL obj) { return ctx.getShaderInfoLog(((OpenGLObjects.ShaderGL)obj).ptr); } - public static final void _wglUseProgram(IProgramGL obj) { + public static void _wglUseProgram(IProgramGL obj) { ctx.useProgram(obj == null ? null : ((OpenGLObjects.ProgramGL)obj).ptr); } - public static final void _wglAttachShader(IProgramGL obj, IShaderGL shader) { + public static void _wglAttachShader(IProgramGL obj, IShaderGL shader) { ctx.attachShader(((OpenGLObjects.ProgramGL)obj).ptr, ((OpenGLObjects.ShaderGL)shader).ptr); } - public static final void _wglDetachShader(IProgramGL obj, IShaderGL shader) { + public static void _wglDetachShader(IProgramGL obj, IShaderGL shader) { ctx.detachShader(((OpenGLObjects.ProgramGL)obj).ptr, ((OpenGLObjects.ShaderGL)shader).ptr); } - public static final void _wglLinkProgram(IProgramGL obj) { + public static void _wglLinkProgram(IProgramGL obj) { ctx.linkProgram(((OpenGLObjects.ProgramGL)obj).ptr); } - public static final int _wglGetProgrami(IProgramGL obj, int param) { + public static int _wglGetProgrami(IProgramGL obj, int param) { return ctx.getProgramParameteri(((OpenGLObjects.ProgramGL)obj).ptr, param); } - public static final String _wglGetProgramInfoLog(IProgramGL obj) { + public static String _wglGetProgramInfoLog(IProgramGL obj) { return ctx.getProgramInfoLog(((OpenGLObjects.ProgramGL)obj).ptr); } - public static final void _wglBindAttribLocation(IProgramGL obj, int index, String name) { + public static void _wglBindAttribLocation(IProgramGL obj, int index, String name) { ctx.bindAttribLocation(((OpenGLObjects.ProgramGL)obj).ptr, index, name); } - public static final int _wglGetAttribLocation(IProgramGL obj, String name) { + public static int _wglGetAttribLocation(IProgramGL obj, String name) { return ctx.getAttribLocation(((OpenGLObjects.ProgramGL)obj).ptr, name); } - public static final void _wglDrawArrays(int mode, int first, int count) { + public static void _wglDrawArrays(int mode, int first, int count) { ctx.drawArrays(mode, first, count); //checkErr("_wglDrawArrays(" + mode + ", " + first + ", " + count + ");"); } - public static final void _wglDrawArraysInstanced(int mode, int first, int count, int instances) { + public static void _wglDrawArraysInstanced(int mode, int first, int count, int instances) { switch(instancingImpl) { case INSTANCE_IMPL_CORE: ctx.drawArraysInstanced(mode, first, count, instances); @@ -583,12 +584,12 @@ public class PlatformOpenGL { //checkErr("_wglDrawArraysInstanced(" + mode + ", " + first + ", " + count + ", " + instanced + ");"); } - public static final void _wglDrawElements(int mode, int count, int type, int offset) { + public static void _wglDrawElements(int mode, int count, int type, int offset) { ctx.drawElements(mode, count, type, offset); //checkErr("_wglDrawElements(" + mode + ", " + count + ", " + type + ", " + offset + ");"); } - public static final void _wglDrawElementsInstanced(int mode, int count, int type, int offset, int instances) { + public static void _wglDrawElementsInstanced(int mode, int count, int type, int offset, int instances) { switch(instancingImpl) { case INSTANCE_IMPL_CORE: ctx.drawElementsInstanced(mode, count, type, offset, instances); @@ -602,7 +603,7 @@ public class PlatformOpenGL { //checkErr("_wglDrawElementsInstanced(" + mode + ", " + count + ", " + type + ", " + offset + ", " + instanced + ");"); } - public static final IUniformGL _wglGetUniformLocation(IProgramGL obj, String name) { + public static IUniformGL _wglGetUniformLocation(IProgramGL obj, String name) { WebGLUniformLocation loc = ctx.getUniformLocation(((OpenGLObjects.ProgramGL)obj).ptr, name); if(loc != null) { return new OpenGLObjects.UniformGL(loc); @@ -611,7 +612,7 @@ public class PlatformOpenGL { } } - public static final int _wglGetUniformBlockIndex(IProgramGL obj, String name) { + public static int _wglGetUniformBlockIndex(IProgramGL obj, String name) { int i = ctx.getUniformBlockIndex(((OpenGLObjects.ProgramGL)obj).ptr, name); if(i > 2147483647) { i = -1; @@ -619,77 +620,77 @@ public class PlatformOpenGL { return i; } - public static final void _wglBindBufferRange(int target, int index, IBufferGL buffer, int offset, int size) { + public static void _wglBindBufferRange(int target, int index, IBufferGL buffer, int offset, int size) { ctx.bindBufferRange(target, index, ((OpenGLObjects.BufferGL)buffer).ptr, offset, size); } - public static final void _wglUniformBlockBinding(IProgramGL obj, int blockIndex, int bufferIndex) { + public static void _wglUniformBlockBinding(IProgramGL obj, int blockIndex, int bufferIndex) { ctx.uniformBlockBinding(((OpenGLObjects.ProgramGL)obj).ptr, blockIndex, bufferIndex); } - public static final void _wglUniform1f(IUniformGL obj, float x) { + public static void _wglUniform1f(IUniformGL obj, float x) { if(obj != null) ctx.uniform1f(((OpenGLObjects.UniformGL)obj).ptr, x); } - public static final void _wglUniform2f(IUniformGL obj, float x, float y) { + public static void _wglUniform2f(IUniformGL obj, float x, float y) { if(obj != null) ctx.uniform2f(((OpenGLObjects.UniformGL)obj).ptr, x, y); } - public static final void _wglUniform3f(IUniformGL obj, float x, float y, float z) { + public static void _wglUniform3f(IUniformGL obj, float x, float y, float z) { if(obj != null) ctx.uniform3f(((OpenGLObjects.UniformGL)obj).ptr, x, y, z); } - public static final void _wglUniform4f(IUniformGL obj, float x, float y, float z, float w) { + public static void _wglUniform4f(IUniformGL obj, float x, float y, float z, float w) { if(obj != null) ctx.uniform4f(((OpenGLObjects.UniformGL)obj).ptr, x, y, z, w); } - public static final void _wglUniform1i(IUniformGL obj, int x) { + public static void _wglUniform1i(IUniformGL obj, int x) { if(obj != null) ctx.uniform1i(((OpenGLObjects.UniformGL)obj).ptr, x); } - public static final void _wglUniform2i(IUniformGL obj, int x, int y) { + public static void _wglUniform2i(IUniformGL obj, int x, int y) { if(obj != null) ctx.uniform2i(((OpenGLObjects.UniformGL)obj).ptr, x, y); } - public static final void _wglUniform3i(IUniformGL obj, int x, int y, int z) { + public static void _wglUniform3i(IUniformGL obj, int x, int y, int z) { if(obj != null) ctx.uniform3i(((OpenGLObjects.UniformGL)obj).ptr, x, y, z); } - public static final void _wglUniform4i(IUniformGL obj, int x, int y, int z, int w) { + public static void _wglUniform4i(IUniformGL obj, int x, int y, int z, int w) { if(obj != null) ctx.uniform4i(((OpenGLObjects.UniformGL)obj).ptr, x, y, z, w); } - public static final void _wglUniformMatrix2fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { + public static void _wglUniformMatrix2fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { if(obj != null) ctx.uniformMatrix2fv(((OpenGLObjects.UniformGL)obj).ptr, transpose, mat == null ? null : EaglerArrayBufferAllocator.getDataView32F(mat)); } - public static final void _wglUniformMatrix3fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { + public static void _wglUniformMatrix3fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { if(obj != null) ctx.uniformMatrix3fv(((OpenGLObjects.UniformGL)obj).ptr, transpose, mat == null ? null : EaglerArrayBufferAllocator.getDataView32F(mat)); } - public static final void _wglUniformMatrix3x2fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { + public static void _wglUniformMatrix3x2fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { if(obj != null) ctx.uniformMatrix3x2fv(((OpenGLObjects.UniformGL)obj).ptr, transpose, mat == null ? null : EaglerArrayBufferAllocator.getDataView32F(mat)); } - public static final void _wglUniformMatrix4fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { + public static void _wglUniformMatrix4fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { if(obj != null) ctx.uniformMatrix4fv(((OpenGLObjects.UniformGL)obj).ptr, transpose, mat == null ? null : EaglerArrayBufferAllocator.getDataView32F(mat)); } - public static final void _wglUniformMatrix4x2fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { + public static void _wglUniformMatrix4x2fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { if(obj != null) ctx.uniformMatrix4x2fv(((OpenGLObjects.UniformGL)obj).ptr, transpose, mat == null ? null : EaglerArrayBufferAllocator.getDataView32F(mat)); } - public static final void _wglUniformMatrix4x3fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { + public static void _wglUniformMatrix4x3fv(IUniformGL obj, boolean transpose, FloatBuffer mat) { if(obj != null) ctx.uniformMatrix4x3fv(((OpenGLObjects.UniformGL)obj).ptr, transpose, mat == null ? null : EaglerArrayBufferAllocator.getDataView32F(mat)); } - public static final void _wglBindFramebuffer(int target, IFramebufferGL framebuffer) { + public static void _wglBindFramebuffer(int target, IFramebufferGL framebuffer) { if(framebuffer == null) { ctx.bindFramebuffer(target, PlatformRuntime.mainFramebuffer); if(glesVers != 200) { @@ -700,41 +701,41 @@ public class PlatformOpenGL { } } - public static final int _wglCheckFramebufferStatus(int target) { + public static int _wglCheckFramebufferStatus(int target) { return ctx.checkFramebufferStatus(target); } - public static final void _wglFramebufferTexture2D(int target, int attachment, int texTarget, + public static void _wglFramebufferTexture2D(int target, int attachment, int texTarget, ITextureGL texture, int level) { ctx.framebufferTexture2D(target, attachment, texTarget, ((OpenGLObjects.TextureGL)texture).ptr, level); } - public static final void _wglFramebufferTextureLayer(int target, int attachment, ITextureGL texture, int level, int layer) { + public static void _wglFramebufferTextureLayer(int target, int attachment, ITextureGL texture, int level, int layer) { ctx.framebufferTextureLayer(target, attachment, ((OpenGLObjects.TextureGL) texture).ptr, level, layer); } - public static final void _wglBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, + public static void _wglBlitFramebuffer(int srcX0, int srcY0, int srcX1, int srcY1, int dstX0, int dstY0, int dstX1, int dstY1, int bits, int filter) { ctx.blitFramebuffer(srcX0, srcY0, srcX1, srcY1, dstX0, dstY0, dstX1, dstY1, bits, filter); } - public static final void _wglBindRenderbuffer(int target, IRenderbufferGL renderbuffer) { + public static void _wglBindRenderbuffer(int target, IRenderbufferGL renderbuffer) { ctx.bindRenderbuffer(target, renderbuffer == null ? null : ((OpenGLObjects.RenderbufferGL)renderbuffer).ptr); } - public static final void _wglRenderbufferStorage(int target, int internalformat, + public static void _wglRenderbufferStorage(int target, int internalformat, int width, int height) { ctx.renderbufferStorage(target, internalformat, width, height); } - public static final void _wglFramebufferRenderbuffer(int target, int attachment, + public static void _wglFramebufferRenderbuffer(int target, int attachment, int renderbufferTarget, IRenderbufferGL renderbuffer) { ctx.framebufferRenderbuffer(target, attachment, renderbufferTarget, ((OpenGLObjects.RenderbufferGL)renderbuffer).ptr); } - public static final String _wglGetString(int param) { + public static String _wglGetString(int param) { if(hasWEBGLDebugRendererInfo) { String s; switch(param) { @@ -758,47 +759,47 @@ public class PlatformOpenGL { } } - public static final int _wglGetInteger(int param) { + public static int _wglGetInteger(int param) { return ctx.getParameteri(param); } - public static final int _wglGetError() { + public static int _wglGetError() { return ctx.getError(); } - public static final int checkOpenGLESVersion() { + public static int checkOpenGLESVersion() { return glesVers; } - public static final boolean checkEXTGPUShader5Capable() { + public static boolean checkEXTGPUShader5Capable() { return false; } - public static final boolean checkOESGPUShader5Capable() { + public static boolean checkOESGPUShader5Capable() { return false; } - public static final boolean checkFBORenderMipmapCapable() { + public static boolean checkFBORenderMipmapCapable() { return glesVers >= 300 || hasOESFBORenderMipmap; } - public static final boolean checkVAOCapable() { + public static boolean checkVAOCapable() { return vertexArrayImpl != VAO_IMPL_NONE; } - public static final boolean checkInstancingCapable() { + public static boolean checkInstancingCapable() { return instancingImpl != INSTANCE_IMPL_NONE; } - public static final boolean checkTexStorageCapable() { + public static boolean checkTexStorageCapable() { return glesVers >= 300; } - public static final boolean checkTextureLODCapable() { + public static boolean checkTextureLODCapable() { return glesVers >= 300 || hasEXTShaderTextureLOD; } - public static final boolean checkHDRFramebufferSupport(int bits) { + public static boolean checkHDRFramebufferSupport(int bits) { switch(bits) { case 16: return hasFBO16FSupport; @@ -809,7 +810,7 @@ public class PlatformOpenGL { } } - public static final boolean checkLinearHDRFilteringSupport(int bits) { + public static boolean checkLinearHDRFilteringSupport(int bits) { switch(bits) { case 16: return hasLinearHDR16FSupport; @@ -821,19 +822,19 @@ public class PlatformOpenGL { } // legacy - public static final boolean checkLinearHDR32FSupport() { + public static boolean checkLinearHDR32FSupport() { return hasLinearHDR32FSupport; } - public static final boolean checkAnisotropicFilteringSupport() { + public static boolean checkAnisotropicFilteringSupport() { return hasEXTTextureFilterAnisotropic; } - public static final boolean checkNPOTCapable() { + public static boolean checkNPOTCapable() { return glesVers >= 300; } - private static final void checkErr(String name) { + private static void checkErr(String name) { int i = ctx.getError(); if(i != 0) { logger.error("########## GL ERROR ##########"); @@ -850,12 +851,12 @@ public class PlatformOpenGL { } } - public static final String[] getAllExtensions() { + public static String[] getAllExtensions() { return ctx.getSupportedExtensionArray(); } - public static final void enterVAOEmulationHook() { + public static void enterVAOEmulationHook() { WebGLBackBuffer.enterVAOEmulationPhase(); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java index 9b0f996..811ca2a 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.io.IOException; @@ -81,21 +97,6 @@ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; import net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums; import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController; -/** - * Copyright (c) 2022-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 PlatformRuntime { static final Logger logger = LogManager.getLogger("BrowserRuntime"); @@ -1242,4 +1243,4 @@ public class PlatformRuntime { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformScreenRecord.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformScreenRecord.java index fe9e62f..889a3e3 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformScreenRecord.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformScreenRecord.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.text.SimpleDateFormat; @@ -26,21 +42,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile; import net.lax1dude.eaglercraft.v1_8.recording.EnumScreenRecordingCodec; -/** - * Copyright (c) 2024 lax1dude, ayunami2000. 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 PlatformScreenRecord { static final Logger logger = LogManager.getLogger("PlatformScreenRecord"); @@ -274,4 +275,4 @@ public class PlatformScreenRecord { win = null; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformUpdateSvc.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformUpdateSvc.java index c8759d7..0621fd8 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformUpdateSvc.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformUpdateSvc.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import org.teavm.jso.JSBody; @@ -13,21 +29,6 @@ import net.lax1dude.eaglercraft.v1_8.update.UpdateCertificate; import net.lax1dude.eaglercraft.v1_8.update.UpdateProgressStruct; import net.lax1dude.eaglercraft.v1_8.update.UpdateResultObj; -/** - * 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 PlatformUpdateSvc { private static final Logger logger = LogManager.getLogger("PlatformUpdateSvc"); @@ -128,4 +129,4 @@ public class PlatformUpdateSvc { public static void quine(UpdateCertificate clientUpdate, byte[] data) { TeaVMUpdateThread.downloadSignedOffline(clientUpdate, data); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformVoiceClient.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformVoiceClient.java index 068217c..c25e36d 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformVoiceClient.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformVoiceClient.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import net.lax1dude.eaglercraft.v1_8.EaglercraftUUID; @@ -24,21 +40,6 @@ import java.util.HashSet; import java.util.Map; import java.util.Set; -/** - * Copyright (c) 2022-2024 ayunami2000. 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 PlatformVoiceClient { private static final Logger logger = LogManager.getLogger("PlatformVoiceClient"); @@ -472,4 +473,4 @@ public class PlatformVoiceClient { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebRTC.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebRTC.java index bf9548a..aa78965 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebRTC.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebRTC.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import net.lax1dude.eaglercraft.v1_8.EagRuntime; @@ -26,21 +42,6 @@ import com.google.common.collect.ListMultimap; import java.util.*; -/** - * Copyright (c) 2022-2024 lax1dude, ayunami2000. 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 PlatformWebRTC { private static final Logger logger = LogManager.getLogger("PlatformWebRTC"); @@ -1049,4 +1050,4 @@ public class PlatformWebRTC { return rtcLANServer.countPeers(); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebView.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebView.java index 48662c1..678a63e 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebView.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebView.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.net.URI; @@ -32,21 +48,6 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketWebViewMe import net.lax1dude.eaglercraft.v1_8.webview.PermissionsCache; import net.lax1dude.eaglercraft.v1_8.webview.WebViewOverlayController.IPacketSendCallback; -/** - * 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 PlatformWebView { private static final Logger logger = LogManager.getLogger("PlatformWebView"); @@ -635,4 +636,4 @@ public class PlatformWebView { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayBufferAllocator.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayBufferAllocator.java index 907e941..8c8fdaa 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayBufferAllocator.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayBufferAllocator.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.teavm.jso.typedarrays.DataView; -import org.teavm.jso.typedarrays.Float32Array; -import org.teavm.jso.typedarrays.Int32Array; -import org.teavm.jso.typedarrays.Int8Array; -import org.teavm.jso.typedarrays.Uint16Array; -import org.teavm.jso.typedarrays.Uint8Array; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import org.teavm.jso.typedarrays.Uint8Array; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.teavm.jso.typedarrays.DataView; +import org.teavm.jso.typedarrays.Float32Array; +import org.teavm.jso.typedarrays.Int32Array; +import org.teavm.jso.typedarrays.Int8Array; +import org.teavm.jso.typedarrays.Uint16Array; +import org.teavm.jso.typedarrays.Uint8Array; + public class EaglerArrayBufferAllocator { public static class WrongBufferClassType extends RuntimeException { @@ -203,4 +204,4 @@ public class EaglerArrayBufferAllocator { return new WrongBufferClassType("Tried to pass a " + clazz.getClass().getSimpleName() + " which is not a native eagler buffer"); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayByteBuffer.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayByteBuffer.java index 6aa6e49..dcae2aa 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayByteBuffer.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayByteBuffer.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.teavm.jso.typedarrays.DataView; -import org.teavm.jso.typedarrays.Float32Array; -import org.teavm.jso.typedarrays.Int16Array; -import org.teavm.jso.typedarrays.Int32Array; -import org.teavm.jso.typedarrays.Int8Array; - -import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; - -/** +/* * Copyright (c) 2022-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.teavm.jso.typedarrays.DataView; +import org.teavm.jso.typedarrays.Float32Array; +import org.teavm.jso.typedarrays.Int16Array; +import org.teavm.jso.typedarrays.Int32Array; +import org.teavm.jso.typedarrays.Int8Array; + +import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; + public class EaglerArrayByteBuffer extends ByteBuffer { final DataView dataView; @@ -408,4 +409,4 @@ public class EaglerArrayByteBuffer extends ByteBuffer { position = newPosition; return this; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayFloatBuffer.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayFloatBuffer.java index 68ce921..553cdaa 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayFloatBuffer.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayFloatBuffer.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.teavm.jso.typedarrays.Float32Array; - -import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; - -/** +/* * Copyright (c) 2022-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.teavm.jso.typedarrays.Float32Array; + +import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; + public class EaglerArrayFloatBuffer extends FloatBuffer { final Float32Array typedArray; @@ -236,4 +237,4 @@ public class EaglerArrayFloatBuffer extends FloatBuffer { return this; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayIntBuffer.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayIntBuffer.java index 5a4f201..ed99fb7 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayIntBuffer.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayIntBuffer.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.teavm.jso.typedarrays.Int32Array; - -import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; - -/** +/* * Copyright (c) 2022-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.teavm.jso.typedarrays.Int32Array; + +import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; + public class EaglerArrayIntBuffer extends IntBuffer { final Int32Array typedArray; @@ -236,4 +237,4 @@ public class EaglerArrayIntBuffer extends IntBuffer { return this; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayShortBuffer.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayShortBuffer.java index e7e4e12..14e1fa9 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayShortBuffer.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/EaglerArrayShortBuffer.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.teavm.jso.typedarrays.Int16Array; - -import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; - -/** +/* * Copyright (c) 2022-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.teavm.jso.typedarrays.Int16Array; + +import net.lax1dude.eaglercraft.v1_8.internal.teavm.TeaVMUtils; + public class EaglerArrayShortBuffer extends ShortBuffer { final Int16Array typedArray; @@ -236,4 +237,4 @@ public class EaglerArrayShortBuffer extends ShortBuffer { return this; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/AdvancedHTMLIFrameElement.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/AdvancedHTMLIFrameElement.java index f908f98..3d53b4f 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/AdvancedHTMLIFrameElement.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/AdvancedHTMLIFrameElement.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import java.util.Collection; -import java.util.HashSet; -import java.util.Set; - -import org.apache.commons.lang3.StringUtils; -import org.teavm.jso.JSBody; -import org.teavm.jso.JSProperty; -import org.teavm.jso.dom.html.HTMLIFrameElement; -import org.teavm.jso.dom.types.DOMTokenList; - -import com.google.common.collect.Iterators; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import com.google.common.collect.Iterators; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import java.util.Collection; +import java.util.HashSet; +import java.util.Set; + +import org.apache.commons.lang3.StringUtils; +import org.teavm.jso.JSBody; +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.html.HTMLIFrameElement; +import org.teavm.jso.dom.types.DOMTokenList; + +import com.google.common.collect.Iterators; + public abstract class AdvancedHTMLIFrameElement implements HTMLIFrameElement { @JSProperty @@ -117,4 +118,4 @@ public abstract class AdvancedHTMLIFrameElement implements HTMLIFrameElement { @JSBody(params = {}, script = "return (typeof this.csp === \"string\");") public native boolean checkCSPSupported(); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ArrayBufferInputStream.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ArrayBufferInputStream.java index 33cf496..e5edb2d 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ArrayBufferInputStream.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ArrayBufferInputStream.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import java.io.IOException; -import java.io.InputStream; - -import org.teavm.jso.typedarrays.ArrayBuffer; -import org.teavm.jso.typedarrays.Int8Array; -import org.teavm.jso.typedarrays.Uint8Array; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import org.teavm.jso.typedarrays.Uint8Array; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import java.io.IOException; +import java.io.InputStream; + +import org.teavm.jso.typedarrays.ArrayBuffer; +import org.teavm.jso.typedarrays.Int8Array; +import org.teavm.jso.typedarrays.Uint8Array; + public class ArrayBufferInputStream extends InputStream { private int mark = -1; @@ -120,4 +121,4 @@ public class ArrayBufferInputStream extends InputStream { } position = mark; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/Base64VarIntArray.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/Base64VarIntArray.java index e62ac6b..9b199f3 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/Base64VarIntArray.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/Base64VarIntArray.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import java.util.Arrays; -import java.util.List; - -import org.teavm.jso.core.JSString; - -import net.lax1dude.eaglercraft.v1_8.Base64; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.Base64; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import java.util.Arrays; +import java.util.List; + +import org.teavm.jso.core.JSString; + +import net.lax1dude.eaglercraft.v1_8.Base64; + public class Base64VarIntArray { public static String encodeVarIntArray(List values) { @@ -126,4 +127,4 @@ public class Base64VarIntArray { return o != ret.length ? Arrays.copyOf(ret, o) : ret; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/BooleanResult.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/BooleanResult.java index 8cc0d02..2a971ac 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/BooleanResult.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/BooleanResult.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -/** +/* * Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal.teavm; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + public class BooleanResult { public static final BooleanResult TRUE = new BooleanResult(true); diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ClassesJSLocator.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ClassesJSLocator.java index 76268aa..ef43201 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ClassesJSLocator.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ClassesJSLocator.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.dom.html.HTMLScriptElement; -import org.teavm.jso.dom.xml.Element; -import org.teavm.jso.dom.xml.NodeList; - -import net.lax1dude.eaglercraft.v1_8.EagUtils; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.dom.html.HTMLScriptElement; +import org.teavm.jso.dom.xml.Element; +import org.teavm.jso.dom.xml.NodeList; + +import net.lax1dude.eaglercraft.v1_8.EagUtils; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class ClassesJSLocator { private static final Logger logger = LogManager.getLogger("ClassesJSLocator"); @@ -91,4 +92,4 @@ public class ClassesJSLocator { return null; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ClientMain.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ClientMain.java index f6510d7..ac37f88 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ClientMain.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ClientMain.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.teavm; import java.io.PrintStream; @@ -37,21 +53,6 @@ import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile; import net.lax1dude.eaglercraft.v1_8.sp.internal.ClientPlatformSingleplayer; import net.minecraft.client.main.Main; -/** - * Copyright (c) 2022-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 ClientMain { private static final String crashImage = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAATEAAABxCAAAAACYIctsAAAACXBIWXMAAC4jAAAuIwF4pT92AAAAB3RJTUUH6AMMAyAVwaqINwAADutJREFUeNrtXCt75EiWPb1bn4cckRoSIrskRGZIiuySFLfQIv2ALG7zqiGD3HhtXoka6QfIZJYoSS9Rki0ikS2iWLBFdJHJDIgIpZSpfLir3eXqTwHstFKPiBP3ce6JkH/4O+b2rPZPMwQzYjNiM2IzYjNic5sRmxGbEZsRmxGb24zYjNiM2IzYjNiM2NxmxGbEZsRmxGbE5jYj9iu1N7+HQQgAzoidx8l0EAACESBVM2Lnmrk3IpBORAC1mBE729rcOiN/BYcUjj7LCSf/fhETkV/PrJ4B+necK5mFwdej3qcOSP9LABGIO/67sTEmsdTbvP0qTxRQhKAQQqGAguGvV4pY0wUgn88PSBVW7VdYmP1BQCik0FqVEkodgkL3zSjKvQrE8kJIpbL4RePP4bXW/+g+ghYYEUhplgFIIQjuPeUVIGbqFh1qSX9z3lsWRoU6gU0hQhe3TF6xZhIp7qfRV4JYa75FlUABTNEAK6rQWZfv0J0AK0Nla4m9gPYKcuVWvkXeAAAEAJrceAJmDxoQwDpv7Hl7YewVICam/SaAkZAOQLkGSYCgAD6aQVViDwn5yiK/1PhWXun90CZEuGQpMADSaNkfGkH27W2slm8BGATA4m5FpPdKDMShA5GO9wlu0mVgU+geYGdtTM4kcbkwy8vRs5rmUur0qyo6hDBCpbBI6aKVUABKwIXUTRo5doFnsAupTdOKgAy1S7WjCqM1YlpLaUKlDs/YRaq6aUWgQh1xwD9tOVJ3nmWY/ovJy8lQq+g8aiJjmjtJxWzgim4/CAewEIAC4jAD6QLbxZxfTFk2NjYCAamTZFD4NlVTG4HAD/fgjB3dKstG7H2CYfezFcwtAM8t+LB2X2TDQTZVYWTXDZUm5+rvaj2gK+omPlIiWdKgZBfYaPksBZ6fga4kuAAxU64HEbnrUG/KVT/BUt7tnd91qDfFKj6wxDLfdoOTBgPL2FbD013KlGTQQVPmTTd6yHbiIXtd33bDiT8Wxwa1pHVSiI1bhruzDCC8xCulznMLfAC09oquMDfJriMK/QmdY3hduX2fjkdjiofOzleATjiMSgZihBM+1e58ocnzbqobJyEz3eC2k4j1UoWN6fZ0a2OgGXhu0xIBh2cdQ6x6KAkJbaFgysoeLck9E08jRUBM5c7oPmAEmcnvCABhqggxZe2sKHYxI2vq3QQKhKEio4F/5QSQRlSAqUo7kmqtTlWgohJxdikI9bFEQm9jPhN67YJe0yBMVzRZ4pIlT9lY9VASiFaLkARkUeS2r0U8DrxhZmdb6sfcecJaD0YjxT0BIMgyEjCLtUVWX4cAiEQbYwpPYNOYJLkLdhaw4MZ1Y6keOwBgGZ+K/0zi2j5HkkSrcLoyEwa0diQWLaePiQBibFaSEgDaiDKMZFOINeuKgCzdYgMTmsJeUS5Hs6tcRGEctIVjV4+D0dQulnOpAEAllq7yMcg0ACgFMW3t5jhNxhHD5DkBaN+NODDOyvLrU0amxFI8ybLpiCeQbcVIxzBO4BGLHAVADT4uVIg2aMvcrOid+ISNSbEBANk9Lkq2bnaz0ezuztDpxhlZmfWOII/OfHTkp39rOgDdPTPlk39/D6X2cwb3HuK6gW5zyshMsW4B4DbTx2QealOasoFRog1oaBRAsAGlBfJEBeiCrjFODxpG/wnEqqKzA+hPolYOj2YYq4PF7o9YV1670btE5xHvb7QsLfRrnZwjVsYZ6OAhC/bTcvzqpshbAOHqxHqchKwM1gCSBaJ1CYAZ4/LB32Ngj+Ee6z+skmRTu5sOApZ/eDXkdIMYjV1O2D2t9mlH97fyN22Lc7WRFI7dDMYd+c/N8aurj+sWQHSTqeNytepUBgBMlyZ0+ajcWN8aN637svOojdXOWHQwJM4uA1ee6igAwyVCesvq2n4+mkOl1H/i5hxixgXG0epH/8BWH6WvBQAkJ0ibUBBBFAxASdYu6gmgUoWyccFQAKgsQxtxmFInENu6gQ5DRR9tfAWyuJUWyaR+LDtS1x3XlkdkdnLozkBHtVef+I6IkFI9VACC63f6lFpNmFAybKooo1x3jY3ETEVi3FvPzGQNIEoi7Gv9byY05AmxNuj5pRAAkwQyRuIQMXyNKCHemhUnasRuGjEpf2wBhFmmzoljCKMK0DAM7L1MowwIhHE1NI02wp7W/+aohsxRV4NuH4WX3RoijY/RmPJKmagWfIERrVKeF3tUiiZTuVlubb0tZUQ2OvLj4sCqR8ZxaGON41hiiENz+UV2M3FRcGZxdlcqDbqxUyWmfLrJPzreeg4wigDUizCvwIXTTKjRaEhrGdHa68Mh6AnGEcR8r1gMymRpunNzNoFKbxE7TuJPk3NmYPpu1IMzt6fcOM9dBLxW5yVrEIzyCiiKnjADAO4iw6gcZbxRkXSAmBdWdjnzpAuK6cQuuFeHHYuCA/rUC67xhYihrS/oBoBN7YbJMg7PCUIUCkOjazNh3BItyp2iHqqxBDtlY7w0UJm2MW1jRcUp5a4nnE3hIXNESuKElzryhfHyfsdc8kV6NkwIhdplFZ00qvJUKGyUQlp451/wctX6XMRqqqaqBODR7UhR+tE9OKf1QuMJx+qcFfSmLkf86sShbh3p03HM3jcM7M3fXW9F3n2M1YNlNTqJF7biCKLwgDa8OSr5flhMPc2TdimLbX1m6xYz7yn1ulmGlHZjA5Hcnq2ResBul6e6MT7oYa7yG56OYzY4LTKjaNY6ampTibX/HDpKWlojo+LB/By3MR2frHZzp2wFJFVE1PnELW6k8gVTqQBjrHj9LjtrYpd1Y5R9r7Pmg/tcnvFLV/QwFAZCgtKVaKvBCoQV+etckktV69MBxORrO52RjrWNs+UEYojf55vWcXwfwQOdPmfP6qW0L8wyFWauE3V+yi+tlAhhuADZKYFKKWH3o1+yQJAQTQEY407mZWtJxx9ZOsDim/h0nojD+GG05B2q+Dp6Dvm9kADKKiNUtnXzsi1WPAWYQ0F1HyEGEkgCbKFoBFopKIlhtBEUiwSgCHjBWpKcEmLc2k6aXDb/WqxQzFDHis+yrAsR44IAosyt2HTlIjlFx8RW15bFCBRaoEMaFSWSmBQyZZKXgLShwkjp3EeMHFeQ0ybmyC0XZwlIvu4kXsWdCAiGF+/yDTyXe9bGHyaplSFRFZE6OSN2F6K40lUpCNaRXpTgMgABSVgAaLbBngO9OTq75gRivvYKzwJ2R0Q3yfNrUD9c1vKci3XWuNl8jE+VFc7NGNqNA/DcpwCiQLmvF3UDZWMejiuK9CiwOuoPsr0wKkt+T2D1CwDbSRbP3CsVeZzavD7r9iTvYq9lkTfKACv7l0AQB5bnjHtwoMEq7RE7uoWkw4S8MdXK9SWF8fTIe2GnfBZkapm6PRrlozldWpJAeq37mQ8SrJs06cvOEEsFg3BvX+cBYpH2xXJhzqWvQXaQZkpM6PYlwVMGOco1qmcHxfO2MFoREADzSs5mYSs0C0GCDPyQ7AZYFUX3NzF5zsYi75bF2dkdjLEsJmTUrU30VdM3c5CCGUxmRab+eJU/N/j7mvrUhTbu09BvHBYICZS2tBYIBC0YqX3p9JBdJKWv3NfYW7IRIYfasVTa22NeHZFRWa/HMmqo9Ehb8K7NcuS+cS8gFNwrEQYvi0xpTNeuNmNZHK8t7B5+Q4P3OQSiYFTnjisIhQaIA62H+xYBAP/81/17vX36/MV72hcGV75vT/+zyT9HBPD0s/HH/vwWgHxe/1QHf3iyB//4p+DpCgCe8s9OEfq8a82nT9vNz1+CK3/fq8+f7LCv/u9P4RUA+WKF8bf/7cPDp/9/O+jG559/+pvlzfL55//yJyGQH9w9A/FLTZ+e+oMT7QrgE83mX5Po6erp6e3TH55+wn/8e/wvwBWu5O3/fvrybxGvrq6ucHW6SkqNOJrefix1okKgE9NUYrrMeYw3qPIui9Buy6YLU945JvQXFetYYbRuNl4Tqbd51ldKWrundT82ywD1tr5Rtp7w1UKXbxZ9N2ojbWxNeG12ah7ygirJaLvXX1hw8U5fxJVteE8GZWwUTbKBCcS4Yp+Z63ozSJASuFARe0ZWbu1XcZoZ/8JLXZfBfyqAyebYnuCue6j9SKLY715q79cAutAluxT9hqy2LYJBN9y2g1yNJ8K4mK+ypu4PsjsqXROGhovcrXtDkKwWHL5xw6E+dKJKYqaKjdt8tJNdwGjh1qfVDcrB1xJeJwmZ3vcPsNwgafL6WKLscty6/RRpm/se2a1PPrClqtj0e3+6QTdiTlMbHzDj1HSHmeUgkAHKKHls3CsjBlA6VOLZxa6YPK9dMI2Salvv1iSEkVaR9oUH45vYb5ESRss41gAX/dtitEmbmSq37Tg+7579GGfOLd+FReXtRsWLOOzTXhjvdSOMdd8NJntxn32hkNbbg4PT9M3gfWV3QIkS6lDthAoORe7dJT8c+7/WpjZGWmPTGxXVuCY0dWNaA6hQabdJq7kXMrBMxkeDKl9zsOdFYHYyZHKn9m5GFSo1rgdPdEMO0vPu0h0VY3x2TYfKqbLl+n2Mc1XZD38/ySk7AEdeTLPfBrvNOWKcrQ9We8sip9wuhwtojds5h+h9cvxmF3fjlze/mUIIISGQdpvow2D3DMS+upkiryjZrR4vP5V2t1J4k+Fbt/5NCMvsZW/Gpt6wfMl3Rkye15R4NZ43auIDzyhwv1WjzZLcD1YnpIYXfGdEirwlsIoOwu0ifgVgDVyPftH7EvnuBREr8xaQRB/2IlCXKB+/oWvahHjZ2S/nlcZumYsnVMfOcZDXAZgXcy6cwJezsbo5IH87NAFAh/ge28shZsthTuiS0tQEgkR9l4i9eUljB8AiSkeaokCsGpMlmBEbNa1sHX5XJYqE18yNqTctIavs+zSxF2SwsnarmiKiI5sYxVRCEhKuUo0ZsYNkua65p5W6LbZpGn+nFvayVZLUm6LaT9rCKFlGr4aLvS7EAJHaNK0x9s3VAEoz0qH6fuF6ccScnrJ7m5y/4b/v+14R+921+X91zojNiM2IzYjNiM1tRmxGbEZsRmxGbG4zYjNiM2IzYjNiM2JzmxGbEZsR+37bPwAIcCklAqwqLgAAAABJRU5ErkJggg=="; @@ -715,4 +716,4 @@ public class ClientMain { @JSBody(params = { "v" }, script = "try { return (typeof window[v] !== \"undefined\") ? JSON.stringify(window[v]) : \"[\\\"\\\"]\"; } catch(e) { return \"[\\\"\\\"]\"; }") private static native String getArray(String var); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/DebugConsoleWindow.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/DebugConsoleWindow.java index 368a5ba..b3b9386 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/DebugConsoleWindow.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/DebugConsoleWindow.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.teavm; import java.util.LinkedList; @@ -17,21 +33,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -/** - * 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 DebugConsoleWindow { private static class LogMessage { @@ -222,4 +223,4 @@ public class DebugConsoleWindow { return logger != null; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EPKDownloadHelper.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EPKDownloadHelper.java index ac9476e..a84bc18 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EPKDownloadHelper.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EPKDownloadHelper.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.teavm; import java.nio.charset.StandardCharsets; @@ -15,21 +31,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.ClientMain.EPKFileEntry; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 EPKDownloadHelper { private static final Logger logger = LogManager.getLogger("BrowserRuntime"); @@ -157,4 +158,4 @@ public class EPKDownloadHelper { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EPKLoader.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EPKLoader.java index d7e954b..1b2a81b 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EPKLoader.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EPKLoader.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Map; - -import org.teavm.jso.typedarrays.ArrayBuffer; -import org.teavm.jso.typedarrays.Uint8Array; - -import com.jcraft.jzlib.CRC32; -import com.jcraft.jzlib.GZIPInputStream; -import com.jcraft.jzlib.InflaterInputStream; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import com.jcraft.jzlib.InflaterInputStream; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Map; + +import org.teavm.jso.typedarrays.ArrayBuffer; +import org.teavm.jso.typedarrays.Uint8Array; + +import com.jcraft.jzlib.CRC32; +import com.jcraft.jzlib.GZIPInputStream; +import com.jcraft.jzlib.InflaterInputStream; + public class EPKLoader { public static final void loadEPK(ArrayBuffer epkFile, Map loadedFiles) throws IOException { @@ -188,4 +189,4 @@ public class EPKLoader { return new String(charIn); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ES6ShimStatus.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ES6ShimStatus.java index 31b4a02..c9acac3 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ES6ShimStatus.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ES6ShimStatus.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import java.util.EnumSet; -import java.util.Set; - -import org.teavm.jso.JSBody; - -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import java.util.EnumSet; +import java.util.Set; + +import org.teavm.jso.JSBody; + +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class ES6ShimStatus { private static final Logger logger = LogManager.getLogger("ES6ShimStatus"); @@ -79,4 +80,4 @@ public class ES6ShimStatus { return shims; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ES6ShimStatusJS.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ES6ShimStatusJS.java index 49f08be..9f7aadc 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ES6ShimStatusJS.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ES6ShimStatusJS.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSObject; + public interface ES6ShimStatusJS extends JSObject { public static final int INIT_STATUS_ERROR = -1; @@ -49,4 +50,4 @@ public interface ES6ShimStatusJS extends JSObject { int getEnabledShimID(int idx); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EarlyLoadScreen.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EarlyLoadScreen.java index 6b793bc..d4431d3 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EarlyLoadScreen.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EarlyLoadScreen.java @@ -1,6 +1,22 @@ +/* + * Copyright (c) 2022 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.teavm; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; @@ -20,21 +36,6 @@ import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; import net.lax1dude.eaglercraft.v1_8.Base64; import net.lax1dude.eaglercraft.v1_8.EagUtils; -/** - * Copyright (c) 2022 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 EarlyLoadScreen { public static final String loadScreen = "iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAHx0lEQVR42u3da27jIBRAYbfqFp1FuovM/GLEMIDBhsRJviNVapsYY8y5vPz4ut/v9wX4UL4VAQgAEAAgAEAAgAAAAQACAAQACAAQACAAQACAAAABAAIABAAIABAAIABAAIAAAAEAAgAEAAgAEAAgAEAAgAAAAQACAAQACAAQACAAQACAAAABAAIABAAIABAAIABAAIAAAAEAAgAEAAgAEAAgAAgAEAAgAEAAgAAAAQACAAQACAAQACAAQACAAMBr86MI3ovf39/i/9Z1XdZ1VUgEeN/Kf7vdqt8hgC7QW6OCE+CjK/+2bcv9fieCLtDjux9x/1t/u1xOveWSlisBXmQASoB/+fr6+vv7/X7vHteE8hxZrrpAkyo/2mU42soSgAAfN8YZ3aoSQOV/GNu2ZX9vGdjPEuBnVmXIVYqePly8famCne0TtuS1tt/a9kfSbWnqZw2u9yQesc91XZv7/iO2a+I+iG3b7uu63pdl2f1Z17WaTksaaXrbtk3JaynvR/O5l6/WtPaON3d8tf3v7e9d+RkVPeIVyDRKpREtfL+nGdxL7/f3d9m2bTdS5VZL4/Rz0fcRszm32604jZrLUyi/UXlb1/WlunKhTE63iCMif0tkao1IaXqlqFWKlr2RsTUPpXRLrUnYpqVlircfdby9LUCpbHpa1lyeW8tgL51SmZ9N+2dE5GqJlrkI0xJxaumV0ixt0xrd07TDdrl+aDoeGNnfbzne0RE1HqSOaF3SljptyXP7qF3QN3zi4Yw9LdF0r5+Zs7u175mLirU85KJiLbK3pt2bj1qZ1CJaz356WoD0u2ejaq11XNf1708uf73jqqeOAXotbIlgZ/t0tfSPRulZ050j0jubRjz2CGU/clyRRvvwv1LPIR4X5r6TtlJPmwY9W5la54vfea5+Zhm2dnniyj+j3GtdxCsMzL+vWAmuyujK2dLXnVGGYSZsduXPlV0625Vbk0nlnFlXhrYAezdjPFOa2sD4GRetlY5hdhnmpoHjKcXZlb927Llp4JCvWYHy8leDxpHgbCH0zBo9s3vyiLK8QiBIxwiPaHWnjwFGZbjl9r5RAtxut92Fp5GLTqPHP735qpXDrK5QbjFz27b/Wp802IXu2Yz6cGoadDmwCHV0enVJFpbCfkqLQ6Mvg9g7riPToEfyfrYMl4ZLOUadw1rZh33H/ytNjcbnunfavakeX02As3P1rZVoT4KeVdBXESDN05HV4pFXDaQrxqkE6TnISfC0dYAZA5PSSu3orkeYiSil/Sl3cm3b9t+NKbMHxHtTpenvcT7C33Gez+b1e3QFvvrUY2nhZ/Qi0KtMC+f6/KWpytnnsjWoXuKWyNaZkyud/HTh55mVvTYt++h8zDiXlTFnkwS1wfhlBZgxj917acNe9H9mZWuJvjPuez0azJ5RPj1T3kMe/zJyUNMzkMpdJts6MNybyckNXo/cwLI0XtZ8ZkaldBwt2x65RHvGMRwZoO9dWLh3CfqofC0zZhtKU5fpiWkVIE4n3b423Zemf0SA5cQdVenxt9x70FJ+8TEfkbxUuXqDytnp0L2p0kewzJjeOnMSWtKKt92rQCNageXEDTot05xH1iZy5Xf2lsra9iMrZDjW2dG9ha/7wLuNS5ctpDevt9y2WBu0ptvnxh2l75YutOrtu+/1m+N8tw66022PlGHrcfVuP+NCwNrg+2ETFPcPI45yLSu8s1Yg8UY3xb8K6WP2WualrzJjhDl8f2Ll721iPeiWAG8hwMw+LQhw6co/cpWaPO/DR4wBchU23APQMiMy43EhuAZDp0FfaQxwRCJjAQK8xTigp0uk4hPgowbH+vkEAD4GL8gAAQACAAQACAAQACAAQACAAAABAAIABAAIABAAIABAAIAAAAEAAgAEAK7NJR6M9S6PLQzPHZr1sulSuXmCxQu3APHz+sNP6wOspr09/CL76ym3Tzr2t2sBHhk13+UYwgsmnvFeXwI8qUtRinZxZNq27e/3tm3Lvg8gjWRpxc09Rj3eb2l/ufTiZ5CG78Sfn305eO7durX8tH4W8pB+Pz32vTQJcGAcED+0Nv5//Pbw9GTl+sKh8sVRMo2WoWkPJy0WpiRB6XVFpa5IvF28v3RfvX36mpylBwKXPktbkjiI1I69liYBTg6E4wqTkyOWolRB4nTSE5XuszaI3dvfngRppM1F+9auTG4fuW1raeXendYiWk+aBBjQf44jZW/TWoriV3gRddwi9L57IPfY9lA5Q3nF6YZyq33WIkLt/NTSJMCAcUD4/Wzhxt2o3Hjg0a3emSdPt7Q2t9vtn3KrfXY0L7U091rWo599xBggjSgh0pSa79aTl4ugaR8913qU9ld6vWlvd6bn+7mB+96MUHpcLULtHftemlqAAwKEwVd6MtNBbK4C7kWLuMkuDT5zA+za/nKzMC0VOu0CtXQhal2UeKCfG2PUPsvNZrUcey3NV8Dj0Z/cvctNQ77DmogWAM0S7M0gQQvwluS6HFZ0CQA8DJdDgwAAAQACAAQACAAQACAAQACAAAABAAIABAAIABAAIABAAIAAAAEAAgAEAAgAEAAgAEAAgAAAAQACAAQACAAQACAAQACAAAABAAIABAAIABAAIABAAIAAAAEAAgAEAAgAEAAgAEAAgAAAAYBlWf4A1W4Hx65cJAoAAAAASUVORK5CYII="; @@ -183,7 +184,7 @@ public class EarlyLoadScreen { _wglUseProgram(program); _wglUniform2f(_wglGetUniformLocation(program, "aspect"), x, y); - IBufferArrayGL vao = null; + IVertexArrayGL vao = null; if(vaos) { vao = _wglGenVertexArrays(); _wglBindVertexArray(vao); @@ -249,7 +250,7 @@ public class EarlyLoadScreen { _wglUniform2f(_wglGetUniformLocation(program, "aspect"), x, y); - IBufferArrayGL vao = null; + IVertexArrayGL vao = null; if(vaos) { vao = _wglGenVertexArrays(); _wglBindVertexArray(vao); @@ -323,11 +324,11 @@ public class EarlyLoadScreen { _wglUniform2f(_wglGetUniformLocation(program, "aspect"), x, y); - IBufferArrayGL vao = null; + IVertexArrayGL vao = null; if(vaos) { if(softVAOs) { - vao = EaglercraftGPU.createGLBufferArray(); - EaglercraftGPU.bindGLBufferArray(vao); + vao = EaglercraftGPU.createGLVertexArray(); + EaglercraftGPU.bindGLVertexArray(vao); }else { vao = _wglGenVertexArrays(); _wglBindVertexArray(vao); @@ -337,7 +338,7 @@ public class EarlyLoadScreen { EaglercraftGPU.bindVAOGLArrayBuffer(vbo); EaglercraftGPU.enableVertexAttribArray(0); EaglercraftGPU.vertexAttribPointer(0, 2, GL_FLOAT, false, 8, 0); - EaglercraftGPU.doDrawArrays(GL_TRIANGLES, 0, 6); + EaglercraftGPU.drawArrays(GL_TRIANGLES, 0, 6); }else { _wglBindBuffer(GL_ARRAY_BUFFER, vbo); _wglEnableVertexAttribArray(0); @@ -366,7 +367,7 @@ public class EarlyLoadScreen { } if(vaos) { if(softVAOs) { - EaglercraftGPU.destroyGLBufferArray(vao); + EaglercraftGPU.destroyGLVertexArray(vao); }else { _wglDeleteVertexArrays(vao); } @@ -410,4 +411,4 @@ public class EarlyLoadScreen { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EnumES6ShimStatus.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EnumES6ShimStatus.java index 47161cb..2d0a444 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EnumES6ShimStatus.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EnumES6ShimStatus.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal.teavm; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + public enum EnumES6ShimStatus { STATUS_NOT_PRESENT(Integer.MIN_VALUE, "Not present"), STATUS_ERROR(ES6ShimStatusJS.INIT_STATUS_ERROR, "Error, Not initialized"), @@ -53,4 +54,4 @@ public enum EnumES6ShimStatus { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EnumES6Shims.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EnumES6Shims.java index e351846..73b4ee4 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EnumES6Shims.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/EnumES6Shims.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal.teavm; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + public enum EnumES6Shims { SHIM_CLASS_MAP(ES6ShimStatusJS.SHIM_MAP, "Map"), SHIM_CLASS_WEAKMAP(ES6ShimStatusJS.SHIM_WEAKMAP, "WeakMap"), @@ -55,4 +56,4 @@ public enum EnumES6Shims { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/FixWebMDurationJS.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/FixWebMDurationJS.java index 2db972b..3e85244 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/FixWebMDurationJS.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/FixWebMDurationJS.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSFunctor; -import org.teavm.jso.JSObject; -import org.teavm.jso.dom.events.Event; - -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2023-2024 lax1dude, ayunami2000. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSFunctor; +import org.teavm.jso.JSObject; +import org.teavm.jso.dom.events.Event; + +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class FixWebMDurationJS { private static final Logger logger = LogManager.getLogger("FixWebMDurationJS"); @@ -112,4 +113,4 @@ public class FixWebMDurationJS { + "g.setValue(a),d.data.push({id:1161,data:g});f.setValue(1E6);d.updateByData();c.updateByData();this.updateByData();return!0};n.prototype.toBlob=function(a){return new Blob([this.source.buffer],{type:a||\"video/webm\"})};return p.default=p;") private static native JSObject register(); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/IFrameSafetyException.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/IFrameSafetyException.java index 0ab0c26..78dc355 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/IFrameSafetyException.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/IFrameSafetyException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal.teavm; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + public class IFrameSafetyException extends RuntimeException { public IFrameSafetyException() { @@ -32,4 +33,4 @@ public class IFrameSafetyException extends RuntimeException { super(cause); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ImmediateContinue.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ImmediateContinue.java index b8183ae..fd083d2 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ImmediateContinue.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/ImmediateContinue.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,10 +13,15 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSObject; + public interface ImmediateContinue { public boolean isValidToken(JSObject someObject); public void execute(); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/IndexedDBFilesystem.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/IndexedDBFilesystem.java index 351f534..67b458f 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/IndexedDBFilesystem.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/IndexedDBFilesystem.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.teavm; import org.teavm.interop.Async; @@ -31,21 +47,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.EaglerArrayBufferAllocator; import net.lax1dude.eaglercraft.v1_8.internal.vfs2.EaglerFileSystemException; import net.lax1dude.eaglercraft.v1_8.internal.vfs2.VFSIterator2; -/** - * Copyright (c) 2022-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 IndexedDBFilesystem implements IEaglerFilesystem { public static IEaglerFilesystem createFilesystem(String dbName) { @@ -362,4 +363,4 @@ public class IndexedDBFilesystem implements IEaglerFilesystem { } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/InputEvent.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/InputEvent.java index f95ae0a..0678440 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/InputEvent.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/InputEvent.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSProperty; -import org.teavm.jso.dom.events.Event; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.jso.dom.events.Event; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.Event; + public interface InputEvent extends Event { @JSProperty @@ -26,4 +27,4 @@ public interface InputEvent extends Event { @JSProperty String getInputType(); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/JOrbisAudioBufferDecoder.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/JOrbisAudioBufferDecoder.java index 65dccea..7a048e9 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/JOrbisAudioBufferDecoder.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/JOrbisAudioBufferDecoder.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.teavm; import java.io.IOException; @@ -24,21 +40,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.EaglerArrayBufferAllocator; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 JOrbisAudioBufferDecoder { private EaglerInputStream inputStream; @@ -417,4 +418,4 @@ public class JOrbisAudioBufferDecoder { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/LegacyKeycodeTranslator.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/LegacyKeycodeTranslator.java index 2bc135b..f6abc99 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/LegacyKeycodeTranslator.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/LegacyKeycodeTranslator.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -import com.google.common.collect.Sets; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import com.google.common.collect.Sets; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +import com.google.common.collect.Sets; + public class LegacyKeycodeTranslator { public static class LegacyKeycode { @@ -325,4 +326,4 @@ public class LegacyKeycodeTranslator { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/MainClass.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/MainClass.java index 208c623..c8dc897 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/MainClass.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/MainClass.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSBody; - -import net.lax1dude.eaglercraft.v1_8.sp.server.internal.teavm.WorkerMain; - -/** +/* * Copyright (c) 2022-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.sp.server.internal.teavm.WorkerMain; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSBody; + +import net.lax1dude.eaglercraft.v1_8.sp.server.internal.teavm.WorkerMain; + public class MainClass { public static void main(String[] args) { @@ -46,4 +47,4 @@ public class MainClass { @JSBody(script = "Error.stackTraceLimit = 1024;") private static native void setStackTraceLimit(); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/MessageChannel.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/MessageChannel.java index 6ba9db0..ec45b30 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/MessageChannel.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/MessageChannel.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSObject; -import org.teavm.jso.JSProperty; -import org.teavm.jso.workers.MessagePort; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import org.teavm.jso.workers.MessagePort; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; +import org.teavm.jso.workers.MessagePort; + public abstract class MessageChannel implements JSObject { @JSBody(params = { }, script = "return (typeof MessageChannel !== \"undefined\");") @@ -34,4 +35,4 @@ public abstract class MessageChannel implements JSObject { @JSProperty public abstract MessagePort getPort2(); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/OffsetTouch.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/OffsetTouch.java index 6a0dac0..bedfe46 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/OffsetTouch.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/OffsetTouch.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; -import net.lax1dude.eaglercraft.v1_8.internal.teavm.SortedTouchEvent.ITouchUIDMapper; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.SortedTouchEvent.ITouchUIDMa * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; +import net.lax1dude.eaglercraft.v1_8.internal.teavm.SortedTouchEvent.ITouchUIDMapper; + public class OffsetTouch { public final Touch touch; @@ -44,4 +45,4 @@ public class OffsetTouch { return ot; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/PCMToWAVLoader.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/PCMToWAVLoader.java index b3411df..ebe0cc2 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/PCMToWAVLoader.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/PCMToWAVLoader.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; + public class PCMToWAVLoader { public static int getWAVLen(List data, boolean floating) { @@ -115,4 +116,4 @@ public class PCMToWAVLoader { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/SortedTouchEvent.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/SortedTouchEvent.java index fad6aa7..aa5b645 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/SortedTouchEvent.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/SortedTouchEvent.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import java.util.List; - -import net.lax1dude.eaglercraft.v1_8.internal.EnumTouchEvent; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import java.util.List; + +import net.lax1dude.eaglercraft.v1_8.internal.EnumTouchEvent; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; + public class SortedTouchEvent { public static interface ITouchUIDMapper { @@ -82,4 +83,4 @@ public class SortedTouchEvent { return eventTouches; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMBlobURLHandle.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMBlobURLHandle.java index 7c95411..49adeb7 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMBlobURLHandle.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMBlobURLHandle.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal.teavm; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + public interface TeaVMBlobURLHandle { default String toExternalForm() { @@ -25,4 +26,4 @@ public interface TeaVMBlobURLHandle { TeaVMBlobURLManager.releaseURL(this); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMBlobURLManager.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMBlobURLManager.java index 1c97ce2..7cc2e8f 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMBlobURLManager.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMBlobURLManager.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.interop.Async; -import org.teavm.interop.AsyncCallback; -import org.teavm.jso.JSBody; -import org.teavm.jso.JSFunctor; -import org.teavm.jso.JSObject; -import org.teavm.jso.typedarrays.ArrayBuffer; - -import net.lax1dude.eaglercraft.v1_8.Base64; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.interop.Async; +import org.teavm.interop.AsyncCallback; +import org.teavm.jso.JSBody; +import org.teavm.jso.JSFunctor; +import org.teavm.jso.JSObject; +import org.teavm.jso.typedarrays.ArrayBuffer; + +import net.lax1dude.eaglercraft.v1_8.Base64; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class TeaVMBlobURLManager { private static final Logger logger = LogManager.getLogger("TeaVMBlobURLManager"); @@ -185,4 +186,4 @@ public class TeaVMBlobURLManager { handle.release(); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMClientConfigAdapter.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMClientConfigAdapter.java index 1926f68..ac33fd0 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMClientConfigAdapter.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMClientConfigAdapter.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.teavm; import java.util.ArrayList; @@ -21,21 +37,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.opts.JSEaglercraftXOptsRoot; import net.lax1dude.eaglercraft.v1_8.internal.teavm.opts.JSEaglercraftXOptsServer; import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayEntry; -/** - * Copyright (c) 2022-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 TeaVMClientConfigAdapter implements IClientConfigAdapter, IBootMenuConfigAdapter { public static final IClientConfigAdapter instance = new TeaVMClientConfigAdapter(); @@ -639,4 +640,4 @@ public class TeaVMClientConfigAdapter implements IClientConfigAdapter, IBootMenu return toJSONObject().toString(4); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMClientConfigAdapterHooks.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMClientConfigAdapterHooks.java index 1dc12e5..0d5236b 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMClientConfigAdapterHooks.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMClientConfigAdapterHooks.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.teavm; import java.util.function.Consumer; @@ -14,21 +30,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.opts.JSEaglercraftXOptsHooks import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 TeaVMClientConfigAdapterHooks implements IClientConfigAdapterHooks { private static final Logger logger = LogManager.getLogger("TeaVMClientConfigAdapterHooks"); @@ -154,4 +155,4 @@ public class TeaVMClientConfigAdapterHooks implements IClientConfigAdapterHooks screenChangedHook = (ScreenChangeHook)hooks.getScreenChangedHook(); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMDataURLManager.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMDataURLManager.java index a7de655..83916e7 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMDataURLManager.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMDataURLManager.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import java.nio.charset.StandardCharsets; -import java.util.Arrays; - -import org.teavm.interop.Async; -import org.teavm.interop.AsyncCallback; -import org.teavm.jso.browser.Window; - -import net.lax1dude.eaglercraft.v1_8.Base64; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import net.lax1dude.eaglercraft.v1_8.Base64; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import java.nio.charset.StandardCharsets; +import java.util.Arrays; + +import org.teavm.interop.Async; +import org.teavm.interop.AsyncCallback; +import org.teavm.jso.browser.Window; + +import net.lax1dude.eaglercraft.v1_8.Base64; + public class TeaVMDataURLManager { private static void checkDataURLSupport0(boolean fetchBased, final AsyncCallback callback) { @@ -84,4 +85,4 @@ public class TeaVMDataURLManager { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMEnterBootMenuException.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMEnterBootMenuException.java index ce7726f..108bd5b 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMEnterBootMenuException.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMEnterBootMenuException.java @@ -1,6 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -15,6 +13,9 @@ package net.lax1dude.eaglercraft.v1_8.internal.teavm; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + public class TeaVMEnterBootMenuException extends RuntimeException { public final boolean isManual; @@ -23,4 +24,4 @@ public class TeaVMEnterBootMenuException extends RuntimeException { this.isManual = manual; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMFetchJS.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMFetchJS.java index df8c4be..0790745 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMFetchJS.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMFetchJS.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSFunctor; -import org.teavm.jso.JSObject; -import org.teavm.jso.typedarrays.ArrayBuffer; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import org.teavm.jso.typedarrays.ArrayBuffer; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSFunctor; +import org.teavm.jso.JSObject; +import org.teavm.jso.typedarrays.ArrayBuffer; + public class TeaVMFetchJS { @JSFunctor @@ -41,4 +42,4 @@ public class TeaVMFetchJS { + "xhrObj.open(\"GET\", uri, true); xhrObj.send();}; eag(new XMLHttpRequest());") public static native void doXHRDownload(String uri, FetchHandler callback); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMRuntimeDeobfuscator.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMRuntimeDeobfuscator.java index 04bdf82..bde8ac9 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMRuntimeDeobfuscator.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMRuntimeDeobfuscator.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.teavm; import java.util.HashMap; @@ -17,21 +33,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.teavm.generators.TeaVMRuntimeDeobf import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 TeaVMRuntimeDeobfuscator { private static final Logger logger = LogManager.getLogger("TeaVMRuntimeDeobfuscator"); @@ -239,4 +240,4 @@ public class TeaVMRuntimeDeobfuscator { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMUpdateThread.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMUpdateThread.java index 1a22ea8..c66f1b5 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMUpdateThread.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMUpdateThread.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.teavm; import java.nio.charset.StandardCharsets; @@ -32,21 +48,6 @@ import net.lax1dude.eaglercraft.v1_8.update.UpdateProgressStruct; import net.lax1dude.eaglercraft.v1_8.update.UpdateResultObj; import net.lax1dude.eaglercraft.v1_8.update.UpdateService; -/** - * 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 TeaVMUpdateThread implements Runnable { private static final Logger logger = LogManager.getLogger("TeaVMUpdateThread"); @@ -276,4 +277,4 @@ public class TeaVMUpdateThread implements Runnable { templateHtml = templateHtml.replace("${date}", date); return templateHtml.getBytes(StandardCharsets.UTF_8); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMUtils.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMUtils.java index c434f7a..6b2a978 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMUtils.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMUtils.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.teavm; import java.util.ArrayList; @@ -23,21 +39,6 @@ import org.teavm.jso.typedarrays.Uint8Array; import net.lax1dude.eaglercraft.v1_8.internal.teavm.generators.TeaVMUtilsUnwrapGenerator; -/** - * Copyright (c) 2022-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 TeaVMUtils { @JSBody(params = { "url" }, script = "URL.revokeObjectURL(url);") @@ -191,4 +192,4 @@ public class TeaVMUtils { @JSBody(params = { "obj" }, script = "return obj.stack||null;") public static native String getStackSafe(JSObject object); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMWebSocketClient.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMWebSocketClient.java index 832e1d6..fd6ef81 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMWebSocketClient.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMWebSocketClient.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.dom.events.Event; -import org.teavm.jso.dom.events.EventListener; -import org.teavm.jso.dom.events.MessageEvent; -import org.teavm.jso.websocket.WebSocket; - -import net.lax1dude.eaglercraft.v1_8.EagUtils; -import net.lax1dude.eaglercraft.v1_8.internal.AbstractWebSocketClient; -import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.dom.events.Event; +import org.teavm.jso.dom.events.EventListener; +import org.teavm.jso.dom.events.MessageEvent; +import org.teavm.jso.websocket.WebSocket; + +import net.lax1dude.eaglercraft.v1_8.EagUtils; +import net.lax1dude.eaglercraft.v1_8.internal.AbstractWebSocketClient; +import net.lax1dude.eaglercraft.v1_8.internal.EnumEaglerConnectionState; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; + public class TeaVMWebSocketClient extends AbstractWebSocketClient { private final WebSocket sock; @@ -117,4 +118,4 @@ public class TeaVMWebSocketClient extends AbstractWebSocketClient { } } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMWebSocketFrame.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMWebSocketFrame.java index 63f3394..94fead9 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMWebSocketFrame.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TeaVMWebSocketFrame.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import java.io.InputStream; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSObject; -import org.teavm.jso.typedarrays.ArrayBuffer; - -import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketFrame; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import java.io.InputStream; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSObject; +import org.teavm.jso.typedarrays.ArrayBuffer; + +import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketFrame; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; + public class TeaVMWebSocketFrame implements IWebSocketFrame { private JSObject data; @@ -111,4 +112,4 @@ public class TeaVMWebSocketFrame implements IWebSocketFrame { return timestamp; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/Touch.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/Touch.java index ad5154c..96ecf5b 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/Touch.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/Touch.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSObject; -import org.teavm.jso.JSProperty; -import org.teavm.jso.dom.xml.Element; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import org.teavm.jso.dom.xml.Element; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.xml.Element; + public abstract class Touch implements JSObject { @JSProperty @@ -64,4 +65,4 @@ public abstract class Touch implements JSObject { @JSProperty public abstract Element getTarget(); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TouchEvent.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TouchEvent.java index 349faf4..06b5bfc 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TouchEvent.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TouchEvent.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSProperty; -import org.teavm.jso.dom.events.Event; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.jso.dom.events.Event; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.Event; + public interface TouchEvent extends Event { @JSProperty @@ -41,4 +42,4 @@ public interface TouchEvent extends Event { @JSProperty TouchList getTouches(); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TouchList.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TouchList.java index 9708bf8..9b17d24 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TouchList.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/TouchList.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSObject; -import org.teavm.jso.JSProperty; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.jso.JSProperty; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; + public interface TouchList extends JSObject { @JSProperty @@ -25,4 +26,4 @@ public interface TouchList extends JSObject { Touch item(int idx); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/VisualViewport.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/VisualViewport.java index c94212b..c84e3f1 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/VisualViewport.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/VisualViewport.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSObject; -import org.teavm.jso.JSProperty; -import org.teavm.jso.dom.events.EventTarget; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import org.teavm.jso.dom.events.EventTarget; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; +import org.teavm.jso.dom.events.EventTarget; + public interface VisualViewport extends JSObject, EventTarget { @JSProperty @@ -42,4 +43,4 @@ public interface VisualViewport extends JSObject, EventTarget { @JSProperty double getScale(); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGL2RenderingContext.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGL2RenderingContext.java index 0003514..aed57b8 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGL2RenderingContext.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGL2RenderingContext.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.typedarrays.ArrayBufferView; -import org.teavm.jso.typedarrays.Float32Array; -import org.teavm.jso.webgl.WebGLBuffer; -import org.teavm.jso.webgl.WebGLProgram; -import org.teavm.jso.webgl.WebGLRenderingContext; -import org.teavm.jso.webgl.WebGLTexture; -import org.teavm.jso.webgl.WebGLUniformLocation; - -/** +/* * Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import org.teavm.jso.webgl.WebGLUniformLocation; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.typedarrays.ArrayBufferView; +import org.teavm.jso.typedarrays.Float32Array; +import org.teavm.jso.webgl.WebGLBuffer; +import org.teavm.jso.webgl.WebGLProgram; +import org.teavm.jso.webgl.WebGLRenderingContext; +import org.teavm.jso.webgl.WebGLTexture; +import org.teavm.jso.webgl.WebGLUniformLocation; + public interface WebGL2RenderingContext extends WebGLRenderingContext { int TEXTURE_MAX_LEVEL = 0x0000813D; @@ -90,4 +91,4 @@ public interface WebGL2RenderingContext extends WebGLRenderingContext { void framebufferTextureLayer(int target, int attachment, WebGLTexture texture, int level, int layer); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLANGLEInstancedArrays.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLANGLEInstancedArrays.java index f0cd374..33790f7 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLANGLEInstancedArrays.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLANGLEInstancedArrays.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSObject; + public interface WebGLANGLEInstancedArrays extends JSObject { void drawArraysInstancedANGLE(int mode, int first, int count, int instanced); @@ -25,4 +26,4 @@ public interface WebGLANGLEInstancedArrays extends JSObject { void vertexAttribDivisorANGLE(int index, int divisor); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLBackBuffer.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLBackBuffer.java index 8dcdd4e..516b47f 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLBackBuffer.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLBackBuffer.java @@ -1,23 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import org.teavm.jso.webgl.WebGLFramebuffer; - -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; -import net.lax1dude.eaglercraft.v1_8.internal.IRenderbufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; -import net.lax1dude.eaglercraft.v1_8.internal.ITextureGL; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; -import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -32,6 +13,26 @@ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import org.teavm.jso.webgl.WebGLFramebuffer; + +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; +import net.lax1dude.eaglercraft.v1_8.internal.IRenderbufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; +import net.lax1dude.eaglercraft.v1_8.internal.ITextureGL; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; +import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; + public class WebGLBackBuffer { private static int glesVers = -1; @@ -50,7 +51,7 @@ public class WebGLBackBuffer { private static ITextureGL gles2ColorTexture; private static IRenderbufferGL gles2DepthRenderbuffer; private static IProgramGL gles2BlitProgram; - private static IBufferArrayGL gles2BlitVAO; + private static IVertexArrayGL gles2BlitVAO; private static IBufferGL gles2BlitVBO; private static boolean isVAOCapable = false; @@ -60,8 +61,9 @@ public class WebGLBackBuffer { private static final int _GL_RENDERBUFFER = 0x8D41; private static final int _GL_COLOR_ATTACHMENT0 = 0x8CE0; private static final int _GL_DEPTH_ATTACHMENT = 0x8D00; - private static final int _GL_DEPTH_COMPONENT16 = 0x81A5; + private static final int _GL_DEPTH_STENCIL_ATTACHMENT = 0x821A; private static final int _GL_DEPTH_COMPONENT32F = 0x8CAC; + private static final int _GL_DEPTH_STENCIL = 0x84F9; private static final int _GL_READ_FRAMEBUFFER = 0x8CA8; private static final int _GL_DRAW_FRAMEBUFFER = 0x8CA9; @@ -97,8 +99,8 @@ public class WebGLBackBuffer { _wglTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, sw, sh, 0, GL_RGBA, GL_UNSIGNED_BYTE, (ByteBuffer)null); _wglFramebufferTexture2D(_GL_FRAMEBUFFER, _GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, gles2ColorTexture, 0); _wglBindRenderbuffer(_GL_RENDERBUFFER, gles2DepthRenderbuffer); - _wglRenderbufferStorage(_GL_RENDERBUFFER, _GL_DEPTH_COMPONENT16, sw, sh); - _wglFramebufferRenderbuffer(_GL_FRAMEBUFFER, _GL_DEPTH_ATTACHMENT, _GL_RENDERBUFFER, gles2DepthRenderbuffer); + _wglRenderbufferStorage(_GL_RENDERBUFFER, _GL_DEPTH_STENCIL, sw, sh); + _wglFramebufferRenderbuffer(_GL_FRAMEBUFFER, _GL_DEPTH_STENCIL_ATTACHMENT, _GL_RENDERBUFFER, gles2DepthRenderbuffer); ByteBuffer upload = PlatformRuntime.allocateByteBuffer(48); upload.putFloat(0.0f); upload.putFloat(0.0f); @@ -159,8 +161,8 @@ public class WebGLBackBuffer { if(isVAOCapable) { _wglDeleteVertexArrays(gles2BlitVAO); } - gles2BlitVAO = EaglercraftGPU.createGLBufferArray(); - EaglercraftGPU.bindGLBufferArray(gles2BlitVAO); + gles2BlitVAO = EaglercraftGPU.createGLVertexArray(); + EaglercraftGPU.bindGLVertexArray(gles2BlitVAO); EaglercraftGPU.bindVAOGLArrayBuffer(gles2BlitVBO); EaglercraftGPU.enableVertexAttribArray(0); EaglercraftGPU.vertexAttribPointer(0, 2, GL_FLOAT, false, 8, 0); @@ -171,8 +173,8 @@ public class WebGLBackBuffer { private static void drawBlitQuad() { if(isEmulatedVAOPhase) { - EaglercraftGPU.bindGLBufferArray(gles2BlitVAO); - EaglercraftGPU.doDrawArrays(GL_TRIANGLES, 0, 6); + EaglercraftGPU.bindGLVertexArray(gles2BlitVAO); + EaglercraftGPU.drawArrays(GL_TRIANGLES, 0, 6); }else { if(isVAOCapable) { _wglBindVertexArray(gles2BlitVAO); @@ -236,7 +238,7 @@ public class WebGLBackBuffer { _wglTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, windowWidth, windowHeight, 0, GL_RGBA, GL_UNSIGNED_BYTE, (ByteBuffer)null); _wglBindRenderbuffer(_GL_RENDERBUFFER, gles2DepthRenderbuffer); - _wglRenderbufferStorage(_GL_RENDERBUFFER, _GL_DEPTH_COMPONENT16, windowWidth, windowHeight); + _wglRenderbufferStorage(_GL_RENDERBUFFER, _GL_DEPTH_STENCIL, windowWidth, windowHeight); } if(isEmulatedVAOPhase) { @@ -280,7 +282,7 @@ public class WebGLBackBuffer { } if(gles2BlitVAO != null) { if(isEmulatedVAOPhase) { - EaglercraftGPU.destroyGLBufferArray(gles2BlitVAO); + EaglercraftGPU.destroyGLVertexArray(gles2BlitVAO); }else if(isVAOCapable) { _wglDeleteVertexArrays(gles2BlitVAO); } @@ -297,4 +299,4 @@ public class WebGLBackBuffer { isEmulatedVAOPhase = false; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLOESVertexArrayObject.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLOESVertexArrayObject.java index 504f9e3..59cd025 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLOESVertexArrayObject.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLOESVertexArrayObject.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSObject; + public interface WebGLOESVertexArrayObject extends JSObject { WebGLVertexArray createVertexArrayOES(); @@ -25,4 +26,4 @@ public interface WebGLOESVertexArrayObject extends JSObject { void bindVertexArrayOES(WebGLVertexArray obj); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLQuery.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLQuery.java index e5f1924..e7c919d 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLQuery.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLQuery.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,5 +13,10 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSObject; + public interface WebGLQuery extends JSObject { -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLVertexArray.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLVertexArray.java index ffd0098..2544370 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLVertexArray.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/WebGLVertexArray.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm; - -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,5 +13,10 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm; + +import org.teavm.jso.JSObject; + public interface WebGLVertexArray extends JSObject { -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/generators/TeaVMRuntimeDeobfuscatorGenerator.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/generators/TeaVMRuntimeDeobfuscatorGenerator.java index 161f8c2..fe8ff1b 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/generators/TeaVMRuntimeDeobfuscatorGenerator.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/generators/TeaVMRuntimeDeobfuscatorGenerator.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.teavm.generators; import java.io.IOException; @@ -15,21 +31,6 @@ import org.teavm.model.MethodReference; import net.lax1dude.eaglercraft.v1_8.internal.teavm.Base64VarIntArray; -/** - * 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 TeaVMRuntimeDeobfuscatorGenerator implements Generator { private int indexIntoSet(String name, Map namesSet, List namesList) { @@ -105,4 +106,4 @@ public class TeaVMRuntimeDeobfuscatorGenerator implements Generator { writer.ws().append("];").softNewLine(); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/generators/TeaVMUtilsUnwrapGenerator.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/generators/TeaVMUtilsUnwrapGenerator.java index 457e6d7..1d9ec3e 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/generators/TeaVMUtilsUnwrapGenerator.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/generators/TeaVMUtilsUnwrapGenerator.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm.generators; - -import java.io.IOException; - -import org.teavm.backend.javascript.codegen.SourceWriter; -import org.teavm.backend.javascript.spi.Generator; -import org.teavm.backend.javascript.spi.GeneratorContext; -import org.teavm.backend.javascript.spi.Injector; -import org.teavm.backend.javascript.spi.InjectorContext; -import org.teavm.model.MethodReference; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import org.teavm.model.MethodReference; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm.generators; + +import java.io.IOException; + +import org.teavm.backend.javascript.codegen.SourceWriter; +import org.teavm.backend.javascript.spi.Generator; +import org.teavm.backend.javascript.spi.GeneratorContext; +import org.teavm.backend.javascript.spi.Injector; +import org.teavm.backend.javascript.spi.InjectorContext; +import org.teavm.model.MethodReference; + public class TeaVMUtilsUnwrapGenerator { // WARNING: This code uses internal TeaVM APIs that may not have @@ -163,4 +164,4 @@ public class TeaVMUtilsUnwrapGenerator { } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsAssetsURI.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsAssetsURI.java index 15c6cb5..5ec1c2a 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsAssetsURI.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsAssetsURI.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm.opts; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm.opts; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSObject; + public abstract class JSEaglercraftXOptsAssetsURI implements JSObject { @JSBody(script = "return (typeof this.url === \"string\") ? this.url : null;") @@ -26,4 +27,4 @@ public abstract class JSEaglercraftXOptsAssetsURI implements JSObject { @JSBody(params = { "def" }, script = "return (typeof this.path === \"string\") ? this.path : def;") public native String getPath(String defaultValue); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsHooks.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsHooks.java index fe6033e..0e49719 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsHooks.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsHooks.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm.opts; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm.opts; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSObject; + public abstract class JSEaglercraftXOptsHooks implements JSObject { @JSBody(script = "return (typeof this.localStorageSaved === \"function\") ? this.localStorageSaved : null;") @@ -32,4 +33,4 @@ public abstract class JSEaglercraftXOptsHooks implements JSObject { @JSBody(script = "return (typeof this.screenChanged === \"function\") ? this.screenChanged : null;") public native JSObject getScreenChangedHook(); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsRelay.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsRelay.java index 6464c88..dfeceee 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsRelay.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsRelay.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm.opts; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm.opts; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSObject; + public abstract class JSEaglercraftXOptsRelay implements JSObject { @JSBody(script = "return (typeof this.addr === \"string\") ? this.addr : null;") @@ -29,4 +30,4 @@ public abstract class JSEaglercraftXOptsRelay implements JSObject { @JSBody(script = "return (typeof this.primary === \"boolean\") ? this.primary : false;") public native boolean getPrimary(); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsRoot.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsRoot.java index b1574dd..0291edd 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsRoot.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsRoot.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm.opts; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSObject; -import org.teavm.jso.core.JSArrayReader; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import org.teavm.jso.core.JSArrayReader; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm.opts; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSObject; +import org.teavm.jso.core.JSArrayReader; + public abstract class JSEaglercraftXOptsRoot implements JSObject { @JSBody(script = "return (typeof this.container === \"string\") ? this.container : null;") @@ -177,4 +178,4 @@ public abstract class JSEaglercraftXOptsRoot implements JSObject { @JSBody(params = { "def" }, script = "return (typeof this.enableEPKVersionCheck === \"boolean\") ? this.enableEPKVersionCheck : def;") public native boolean getEnableEPKVersionCheck(boolean deobfStackTraces); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsServer.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsServer.java index 4936a2e..06056e0 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsServer.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/internal/teavm/opts/JSEaglercraftXOptsServer.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.teavm.opts; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.teavm.opts; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSObject; + public abstract class JSEaglercraftXOptsServer implements JSObject { @JSBody(script = "return (typeof this.addr === \"string\") ? this.addr : null;") @@ -29,4 +30,4 @@ public abstract class JSEaglercraftXOptsServer implements JSObject { @JSBody(params = { "def" }, script = "return (typeof this.name === \"string\") ? this.name : def;") public native String getName(String defaultValue); -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/internal/ClientPlatformSingleplayer.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/internal/ClientPlatformSingleplayer.java index e1a1f66..fcc020a 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/internal/ClientPlatformSingleplayer.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/internal/ClientPlatformSingleplayer.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.internal; import java.nio.charset.StandardCharsets; @@ -25,21 +41,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.sp.server.internal.teavm.SingleThreadWorker; -/** - * Copyright (c) 2023-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 ClientPlatformSingleplayer { private static final Logger logger = LogManager.getLogger("ClientPlatformSingleplayer"); @@ -341,4 +342,4 @@ public class ClientPlatformSingleplayer { ClientMain.hideIntegratedServerCrashReportOverlay(); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/ServerPlatformSingleplayer.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/ServerPlatformSingleplayer.java index df6b40e..3016126 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/ServerPlatformSingleplayer.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/ServerPlatformSingleplayer.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server.internal; import java.util.ArrayList; @@ -37,21 +53,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.sp.server.IWASMCrashCallback; -/** - * Copyright (c) 2022-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 ServerPlatformSingleplayer { private static final Logger logger = LogManager.getLogger("ServerPlatformSingleplayer"); @@ -300,4 +301,4 @@ public class ServerPlatformSingleplayer { return false; } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/teavm/SingleThreadWorker.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/teavm/SingleThreadWorker.java index 7c60129..2dbac23 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/teavm/SingleThreadWorker.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/teavm/SingleThreadWorker.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.internal.teavm; - -import java.util.function.Consumer; - -import net.lax1dude.eaglercraft.v1_8.internal.IPCPacketData; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerIntegratedServerWorker; -import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplayer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplay * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.internal.teavm; + +import java.util.function.Consumer; + +import net.lax1dude.eaglercraft.v1_8.internal.IPCPacketData; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerIntegratedServerWorker; +import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplayer; + public class SingleThreadWorker { private static final Logger logger = LogManager.getLogger("SingleThreadWorker"); @@ -41,4 +42,4 @@ public class SingleThreadWorker { EaglerIntegratedServerWorker.singleThreadUpdate(); } -} +} \ No newline at end of file diff --git a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/teavm/WorkerMain.java b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/teavm/WorkerMain.java index a6086f3..65d11d5 100755 --- a/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/teavm/WorkerMain.java +++ b/src/teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/teavm/WorkerMain.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2023-2024 lax1dude, ayunami2000. 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server.internal.teavm; import java.io.PrintStream; @@ -17,21 +33,6 @@ import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacketFFProcessKeepAlive; import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerIntegratedServerWorker; import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplayer; -/** - * Copyright (c) 2023-2024 lax1dude, ayunami2000. 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 WorkerMain { public static void _main() { @@ -95,4 +96,4 @@ public class WorkerMain { }); } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm-bootstrap/js/main.js b/src/wasm-gc-teavm-bootstrap/js/main.js index 8aaccc3..9726507 100755 --- a/src/wasm-gc-teavm-bootstrap/js/main.js +++ b/src/wasm-gc-teavm-bootstrap/js/main.js @@ -245,6 +245,10 @@ window.main = async function() { } } + if(assetsURI.startsWith("data:")) { + delete window.eaglercraftXOpts.assetsURI; + } + const rootElement = /** @type {HTMLElement} */ (document.getElementById(containerId)); if(!rootElement) { diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/OpenGLObjects.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/OpenGLObjects.java index ca50268..e861f5a 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/OpenGLObjects.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/OpenGLObjects.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import org.teavm.jso.webgl.WebGLBuffer; -import org.teavm.jso.webgl.WebGLFramebuffer; -import org.teavm.jso.webgl.WebGLProgram; -import org.teavm.jso.webgl.WebGLRenderbuffer; -import org.teavm.jso.webgl.WebGLShader; -import org.teavm.jso.webgl.WebGLTexture; -import org.teavm.jso.webgl.WebGLUniformLocation; - -import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.WebGLQuery; -import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.WebGLVertexArray; - -/** +/* * Copyright (c) 2022-2023 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.WebGLVertexArray; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import org.teavm.jso.webgl.WebGLBuffer; +import org.teavm.jso.webgl.WebGLFramebuffer; +import org.teavm.jso.webgl.WebGLProgram; +import org.teavm.jso.webgl.WebGLRenderbuffer; +import org.teavm.jso.webgl.WebGLShader; +import org.teavm.jso.webgl.WebGLTexture; +import org.teavm.jso.webgl.WebGLUniformLocation; + +import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.WebGLQuery; +import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.WebGLVertexArray; + class OpenGLObjects { static class BufferGL implements IBufferGL { @@ -50,13 +51,13 @@ class OpenGLObjects { } - static class BufferArrayGL implements IBufferArrayGL { + static class VertexArrayGL implements IVertexArrayGL { private static int hashGen = 0; final WebGLVertexArray ptr; final int hash; - BufferArrayGL(WebGLVertexArray ptr) { + VertexArrayGL(WebGLVertexArray ptr) { this.ptr = ptr; this.hash = ++hashGen; } @@ -243,4 +244,4 @@ class OpenGLObjects { } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformApplication.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformApplication.java index b57658f..3ca1bc7 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformApplication.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformApplication.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.net.URI; @@ -29,21 +45,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCDirectArrayConverter; import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.BetterJSStringConverter; import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.TeaVMUtils; -/** - * Copyright (c) 2022-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 PlatformApplication { public static void openLink(String url) { @@ -306,4 +307,4 @@ public class PlatformApplication { @JSBody(params = { "str" }, script = "window.minecraftServer = str;") public static native void setMCServerWindowGlobal(String str); -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAssets.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAssets.java index 6d8274f..5c722a3 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAssets.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAssets.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.io.IOException; @@ -26,21 +42,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; -/** - * Copyright (c) 2022-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 PlatformAssets { static final Logger logger = LogManager.getLogger("PlatformAssets"); @@ -221,4 +222,4 @@ public class PlatformAssets { } } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAudio.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAudio.java index b7b9d1d..489ba00 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAudio.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformAudio.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.util.HashMap; @@ -32,21 +48,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.minecraft.util.MathHelper; -/** - * Copyright (c) 2022-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 PlatformAudio { static final Logger logger = LogManager.getLogger("BrowserAudio"); @@ -516,4 +517,4 @@ public class PlatformAudio { recDestMediaStream = null; } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformFilesystem.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformFilesystem.java index b36d5a3..1e12133 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformFilesystem.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformFilesystem.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import net.lax1dude.eaglercraft.v1_8.internal.vfs2.EaglerFileSystemException; -import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.IndexedDBFilesystem; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import net.lax1dude.eaglercraft.v1_8.internal.vfs2.EaglerFileSystemException; +import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.IndexedDBFilesystem; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class PlatformFilesystem { private static final Logger logger = LogManager.getLogger("PlatformFilesystem"); @@ -46,4 +47,4 @@ public class PlatformFilesystem { } } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformInput.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformInput.java index 5a9de19..8eb9113 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformInput.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformInput.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.util.ArrayList; @@ -31,21 +47,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.WASMGCClientConfigAd import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.TeaVMUtils; import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.WebGLBackBuffer; -/** - * 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 PlatformInput { private static Window win = null; @@ -1313,4 +1314,4 @@ public class PlatformInput { visualViewportH = sh; } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformNetworking.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformNetworking.java index d1387c3..b6a57e4 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformNetworking.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformNetworking.java @@ -1,13 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import org.teavm.interop.Import; -import org.teavm.jso.core.JSString; -import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.BetterJSStringConverter; -import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.WASMGCWebSocketClient; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -22,6 +13,16 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import org.teavm.interop.Import; +import org.teavm.jso.core.JSString; +import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.BetterJSStringConverter; +import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.WASMGCWebSocketClient; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class PlatformNetworking { private static final Logger logger = LogManager.getLogger("PlatformNetworking"); @@ -55,4 +56,4 @@ public class PlatformNetworking { @Import(module = "platformNetworking", name = "createWebSocketHandle") private static native WASMGCWebSocketClient.JSWebSocketClientHandle createWebSocketHandle(JSString socketURI); -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformOpenGL.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformOpenGL.java index 915b770..19bc67b 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformOpenGL.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformOpenGL.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.util.Arrays; @@ -27,21 +43,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.WebGLBackBuffer; import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.WebGLQuery; import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.WebGLVertexArray; -/** - * 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 PlatformOpenGL { static int glesVers = -1; @@ -129,7 +130,7 @@ public class PlatformOpenGL { @JSBody(params = { "arr", "idx", "num" }, script = "arr[idx] = num;") private static native void setArrayInt(JSArray arr, int idx, int num); - public static final void _wglDrawBuffers(int buffer) { + public static void _wglDrawBuffers(int buffer) { if(glesVers == 200) { if(buffer != 0x8CE0) { // GL_COLOR_ATTACHMENT0 throw new UnsupportedOperationException(); @@ -141,7 +142,7 @@ public class PlatformOpenGL { } } - public static final void _wglDrawBuffers(int[] buffers) { + public static void _wglDrawBuffers(int[] buffers) { if(glesVers == 200) { if(buffers.length != 1 || buffers[0] != 0x8CE0) { // GL_COLOR_ATTACHMENT0 throw new UnsupportedOperationException(); @@ -162,19 +163,19 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glReadBuffer") public static native void _wglReadBuffer(int glEnum); - public static final void _wglReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer buffer) { + public static void _wglReadPixels(int x, int y, int width, int height, int format, int type, ByteBuffer buffer) { _wglReadPixelsN(x, y, width, height, format, type, WASMGCBufferAllocator.getUnsignedByteBufferView(buffer)); } - public static final void _wglReadPixels_u16(int x, int y, int width, int height, int format, int type, ByteBuffer buffer) { + public static void _wglReadPixels_u16(int x, int y, int width, int height, int format, int type, ByteBuffer buffer) { _wglReadPixelsN(x, y, width, height, format, type, WASMGCBufferAllocator.getUnsignedShortBufferView(buffer)); } - public static final void _wglReadPixels(int x, int y, int width, int height, int format, int type, IntBuffer buffer) { + public static void _wglReadPixels(int x, int y, int width, int height, int format, int type, IntBuffer buffer) { _wglReadPixelsN(x, y, width, height, format, type, WASMGCBufferAllocator.getIntBufferView(buffer)); } - public static final void _wglReadPixels(int x, int y, int width, int height, int format, int type, FloatBuffer buffer) { + public static void _wglReadPixels(int x, int y, int width, int height, int format, int type, FloatBuffer buffer) { _wglReadPixelsN(x, y, width, height, format, type, WASMGCBufferAllocator.getFloatBufferView(buffer)); } @@ -187,119 +188,119 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glLineWidth") public static native void _wglLineWidth(float width); - public static final IBufferGL _wglGenBuffers() { + public static IBufferGL _wglGenBuffers() { return new OpenGLObjects.BufferGL(_wglGenBuffersN()); } @Import(module = "platformOpenGL", name = "glGenBuffers") static native WebGLBuffer _wglGenBuffersN(); - public static final ITextureGL _wglGenTextures() { + public static ITextureGL _wglGenTextures() { return new OpenGLObjects.TextureGL(_wglGenTexturesN()); } @Import(module = "platformOpenGL", name = "glGenTextures") static native WebGLTexture _wglGenTexturesN(); - public static final IBufferArrayGL _wglGenVertexArrays() { - return new OpenGLObjects.BufferArrayGL(_wglGenVertexArraysN()); + public static IVertexArrayGL _wglGenVertexArrays() { + return new OpenGLObjects.VertexArrayGL(_wglGenVertexArraysN()); } @Import(module = "platformOpenGL", name = "glGenVertexArrays") public static native WebGLVertexArray _wglGenVertexArraysN(); - public static final IProgramGL _wglCreateProgram() { + public static IProgramGL _wglCreateProgram() { return new OpenGLObjects.ProgramGL(_wglCreateProgramN()); } @Import(module = "platformOpenGL", name = "glCreateProgram") static native WebGLProgram _wglCreateProgramN(); - public static final IShaderGL _wglCreateShader(int type) { + public static IShaderGL _wglCreateShader(int type) { return new OpenGLObjects.ShaderGL(_wglCreateShaderN(type)); } @Import(module = "platformOpenGL", name = "glCreateShader") static native WebGLShader _wglCreateShaderN(int type); - public static final IFramebufferGL _wglCreateFramebuffer() { + public static IFramebufferGL _wglCreateFramebuffer() { return new OpenGLObjects.FramebufferGL(_wglCreateFramebufferN()); } @Import(module = "platformOpenGL", name = "glCreateFramebuffer") static native WebGLFramebuffer _wglCreateFramebufferN(); - public static final IRenderbufferGL _wglCreateRenderbuffer() { + public static IRenderbufferGL _wglCreateRenderbuffer() { return new OpenGLObjects.RenderbufferGL(_wglCreateRenderbufferN()); } @Import(module = "platformOpenGL", name = "glCreateRenderbuffer") static native WebGLRenderbuffer _wglCreateRenderbufferN(); - public static final IQueryGL _wglGenQueries() { + public static IQueryGL _wglGenQueries() { return new OpenGLObjects.QueryGL(_wglGenQueriesN()); } @Import(module = "platformOpenGL", name = "glGenQueries") static native WebGLQuery _wglGenQueriesN(); - public static final void _wglDeleteBuffers(IBufferGL objId) { + public static void _wglDeleteBuffers(IBufferGL objId) { _wglDeleteBuffersN(((OpenGLObjects.BufferGL)objId).ptr); } @Import(module = "platformOpenGL", name = "glDeleteBuffers") static native void _wglDeleteBuffersN(WebGLBuffer objId); - public static final void _wglDeleteTextures(ITextureGL objId) { + public static void _wglDeleteTextures(ITextureGL objId) { _wglDeleteTexturesN(((OpenGLObjects.TextureGL)objId).ptr); } @Import(module = "platformOpenGL", name = "glDeleteTextures") static native void _wglDeleteTexturesN(WebGLTexture objId); - public static final void _wglDeleteVertexArrays(IBufferArrayGL objId) { - _wglDeleteVertexArraysN(((OpenGLObjects.BufferArrayGL)objId).ptr); + public static void _wglDeleteVertexArrays(IVertexArrayGL objId) { + _wglDeleteVertexArraysN(((OpenGLObjects.VertexArrayGL)objId).ptr); } @Import(module = "platformOpenGL", name = "glDeleteVertexArrays") static native void _wglDeleteVertexArraysN(WebGLVertexArray objId); - public static final void _wglDeleteProgram(IProgramGL objId) { + public static void _wglDeleteProgram(IProgramGL objId) { _wglDeleteProgramN(((OpenGLObjects.ProgramGL)objId).ptr); } @Import(module = "platformOpenGL", name = "glDeleteProgram") static native void _wglDeleteProgramN(WebGLProgram objId); - public static final void _wglDeleteShader(IShaderGL objId) { + public static void _wglDeleteShader(IShaderGL objId) { _wglDeleteShaderN(((OpenGLObjects.ShaderGL)objId).ptr); } @Import(module = "platformOpenGL", name = "glDeleteShader") static native void _wglDeleteShaderN(WebGLShader objId); - public static final void _wglDeleteFramebuffer(IFramebufferGL objId) { + public static void _wglDeleteFramebuffer(IFramebufferGL objId) { _wglDeleteFramebufferN(((OpenGLObjects.FramebufferGL)objId).ptr); } @Import(module = "platformOpenGL", name = "glDeleteFramebuffer") static native void _wglDeleteFramebufferN(WebGLFramebuffer objId); - public static final void _wglDeleteRenderbuffer(IRenderbufferGL objId) { + public static void _wglDeleteRenderbuffer(IRenderbufferGL objId) { _wglDeleteRenderbufferN(((OpenGLObjects.RenderbufferGL)objId).ptr); } @Import(module = "platformOpenGL", name = "glDeleteRenderbuffer") static native void _wglDeleteRenderbufferN(WebGLRenderbuffer objId); - public static final void _wglDeleteQueries(IQueryGL objId) { + public static void _wglDeleteQueries(IQueryGL objId) { _wglDeleteQueriesN(((OpenGLObjects.QueryGL)objId).ptr); } @Import(module = "platformOpenGL", name = "glDeleteQueries") static native void _wglDeleteQueriesN(WebGLQuery objId); - public static final void _wglBindBuffer(int target, IBufferGL bufObj) { + public static void _wglBindBuffer(int target, IBufferGL bufObj) { _wglBindBufferN(target, bufObj != null ? ((OpenGLObjects.BufferGL)bufObj).ptr : null); } @@ -309,38 +310,38 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glBufferData") public static native void _wglBufferData(int target, int size, int usage); - public static final void _wglBufferData(int target, ByteBuffer buffer, int usage) { + public static void _wglBufferData(int target, ByteBuffer buffer, int usage) { _wglBufferDataN(target, WASMGCBufferAllocator.getUnsignedByteBufferView(buffer), usage); } - public static final void _wglBufferData(int target, IntBuffer buffer, int usage) { + public static void _wglBufferData(int target, IntBuffer buffer, int usage) { _wglBufferDataN(target, WASMGCBufferAllocator.getIntBufferView(buffer), usage); } - public static final void _wglBufferData(int target, FloatBuffer buffer, int usage) { + public static void _wglBufferData(int target, FloatBuffer buffer, int usage) { _wglBufferDataN(target, WASMGCBufferAllocator.getFloatBufferView(buffer), usage); } @Import(module = "platformOpenGL", name = "glBufferData") static native void _wglBufferDataN(int target, ArrayBufferView typedArray, int usage); - public static final void _wglBufferSubData(int target, int dstOffset, ByteBuffer buffer) { + public static void _wglBufferSubData(int target, int dstOffset, ByteBuffer buffer) { _wglBufferSubDataN(target, dstOffset, WASMGCBufferAllocator.getUnsignedByteBufferView(buffer)); } - public static final void _wglBufferSubData(int target, int dstOffset, IntBuffer buffer) { + public static void _wglBufferSubData(int target, int dstOffset, IntBuffer buffer) { _wglBufferSubDataN(target, dstOffset, WASMGCBufferAllocator.getIntBufferView(buffer)); } - public static final void _wglBufferSubData(int target, int dstOffset, FloatBuffer buffer) { + public static void _wglBufferSubData(int target, int dstOffset, FloatBuffer buffer) { _wglBufferSubDataN(target, dstOffset, WASMGCBufferAllocator.getFloatBufferView(buffer)); } @Import(module = "platformOpenGL", name = "glBufferSubData") static native void _wglBufferSubDataN(int target, int dstOffset, ArrayBufferView typedArray); - public static final void _wglBindVertexArray(IBufferArrayGL objId) { - _wglBindVertexArrayN(objId != null ? ((OpenGLObjects.BufferArrayGL)objId).ptr : null); + public static void _wglBindVertexArray(IVertexArrayGL objId) { + _wglBindVertexArrayN(objId != null ? ((OpenGLObjects.VertexArrayGL)objId).ptr : null); } @Import(module = "platformOpenGL", name = "glBindVertexArray") @@ -362,7 +363,7 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glActiveTexture") public static native void _wglActiveTexture(int texture); - public static final void _wglBindTexture(int target, ITextureGL objId) { + public static void _wglBindTexture(int target, ITextureGL objId) { _wglBindTextureN(target, objId != null ? ((OpenGLObjects.TextureGL)objId).ptr : null); } @@ -375,7 +376,7 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glTexParameteri") public static native void _wglTexParameteri(int target, int param, int value); - public static final void _wglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, + public static void _wglTexImage3D(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ByteBuffer data) { _wglTexImage3DN(target, level, internalFormat, width, height, depth, border, format, type, data != null ? WASMGCBufferAllocator.getUnsignedByteBufferView(data) : null); @@ -385,31 +386,31 @@ public class PlatformOpenGL { static native void _wglTexImage3DN(int target, int level, int internalFormat, int width, int height, int depth, int border, int format, int type, ArrayBufferView typedArray); - public static final void _wglTexImage2D(int target, int level, int internalFormat, int width, int height, int border, + public static void _wglTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ByteBuffer data) { _wglTexImage2DN(target, level, internalFormat, width, height, border, format, type, data != null ? WASMGCBufferAllocator.getUnsignedByteBufferView(data) : null); } - public static final void _wglTexImage2Du16(int target, int level, int internalFormat, int width, int height, int border, + public static void _wglTexImage2Du16(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ByteBuffer data) { _wglTexImage2DN(target, level, internalFormat, width, height, border, format, type, data != null ? WASMGCBufferAllocator.getUnsignedShortBufferView(data) : null); } - public static final void _wglTexImage2Df32(int target, int level, int internalFormat, int width, int height, int border, + public static void _wglTexImage2Df32(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ByteBuffer data) { _wglTexImage2DN(target, level, internalFormat, width, height, border, format, type, data != null ? WASMGCBufferAllocator.getFloatBufferView(data) : null); } - public static final void _wglTexImage2D(int target, int level, int internalFormat, int width, + public static void _wglTexImage2D(int target, int level, int internalFormat, int width, int height, int border, int format, int type, IntBuffer data) { _wglTexImage2DN(target, level, internalFormat, width, height, border, format, type, data != null ? WASMGCBufferAllocator.getUnsignedByteBufferView(data) : null); } - public static final void _wglTexImage2Df32(int target, int level, int internalFormat, int width, + public static void _wglTexImage2Df32(int target, int level, int internalFormat, int width, int height, int border, int format, int type, FloatBuffer data) { _wglTexImage2DN(target, level, internalFormat, width, height, border, format, type, data != null ? WASMGCBufferAllocator.getFloatBufferView(data) : null); @@ -419,25 +420,25 @@ public class PlatformOpenGL { static native void _wglTexImage2DN(int target, int level, int internalFormat, int width, int height, int border, int format, int type, ArrayBufferView typedArray); - public static final void _wglTexSubImage2D(int target, int level, int xoffset, int yoffset, + public static void _wglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer data) { _wglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data != null ? WASMGCBufferAllocator.getUnsignedByteBufferView(data) : null); } - public static final void _wglTexSubImage2Du16(int target, int level, int xoffset, int yoffset, + public static void _wglTexSubImage2Du16(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, ByteBuffer data) { _wglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data != null ? WASMGCBufferAllocator.getUnsignedShortBufferView(data) : null); } - public static final void _wglTexSubImage2D(int target, int level, int xoffset, int yoffset, + public static void _wglTexSubImage2D(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, IntBuffer data) { _wglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data != null ? WASMGCBufferAllocator.getUnsignedByteBufferView(data) : null); } - public static final void _wglTexSubImage2Df32(int target, int level, int xoffset, int yoffset, + public static void _wglTexSubImage2Df32(int target, int level, int xoffset, int yoffset, int width, int height, int format, int type, FloatBuffer data) { _wglTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, data != null ? WASMGCBufferAllocator.getFloatBufferView(data) : null); @@ -460,70 +461,70 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glGenerateMipmap") public static native void _wglGenerateMipmap(int target); - public static final void _wglShaderSource(IShaderGL shader, String str) { + public static void _wglShaderSource(IShaderGL shader, String str) { _wglShaderSourceN(((OpenGLObjects.ShaderGL)shader).ptr, BetterJSStringConverter.stringToJS(str)); } @Import(module = "platformOpenGL", name = "glShaderSource") static native void _wglShaderSourceN(WebGLShader shader, JSString str); - public static final void _wglCompileShader(IShaderGL shader) { + public static void _wglCompileShader(IShaderGL shader) { _wglCompileShaderN(((OpenGLObjects.ShaderGL)shader).ptr); } @Import(module = "platformOpenGL", name = "glCompileShader") static native void _wglCompileShaderN(WebGLShader shader); - public static final int _wglGetShaderi(IShaderGL shader, int param) { + public static int _wglGetShaderi(IShaderGL shader, int param) { return _wglGetShaderiN(((OpenGLObjects.ShaderGL)shader).ptr, param); } @Import(module = "platformOpenGL", name = "glGetShaderi") static native int _wglGetShaderiN(WebGLShader shader, int param); - public static final String _wglGetShaderInfoLog(IShaderGL shader) { + public static String _wglGetShaderInfoLog(IShaderGL shader) { return BetterJSStringConverter.stringFromJS(_wglGetShaderInfoLogN(((OpenGLObjects.ShaderGL)shader).ptr)); } @Import(module = "platformOpenGL", name = "glGetShaderInfoLog") static native JSString _wglGetShaderInfoLogN(WebGLShader shader); - public static final void _wglUseProgram(IProgramGL prog) { + public static void _wglUseProgram(IProgramGL prog) { _wglUseProgramN(prog != null ? ((OpenGLObjects.ProgramGL)prog).ptr : null); } @Import(module = "platformOpenGL", name = "glUseProgram") static native void _wglUseProgramN(WebGLProgram prog); - public static final void _wglAttachShader(IProgramGL prog, IShaderGL shader) { + public static void _wglAttachShader(IProgramGL prog, IShaderGL shader) { _wglAttachShaderN(((OpenGLObjects.ProgramGL)prog).ptr, ((OpenGLObjects.ShaderGL)shader).ptr); } @Import(module = "platformOpenGL", name = "glAttachShader") static native void _wglAttachShaderN(WebGLProgram prog, WebGLShader shader); - public static final void _wglDetachShader(IProgramGL prog, IShaderGL shader) { + public static void _wglDetachShader(IProgramGL prog, IShaderGL shader) { _wglDetachShaderN(((OpenGLObjects.ProgramGL)prog).ptr, ((OpenGLObjects.ShaderGL)shader).ptr); } @Import(module = "platformOpenGL", name = "glDetachShader") public static native void _wglDetachShaderN(WebGLProgram prog, WebGLShader shader); - public static final void _wglLinkProgram(IProgramGL prog) { + public static void _wglLinkProgram(IProgramGL prog) { _wglLinkProgramN(((OpenGLObjects.ProgramGL)prog).ptr); } @Import(module = "platformOpenGL", name = "glLinkProgram") static native void _wglLinkProgramN(WebGLProgram prog); - public static final int _wglGetProgrami(IProgramGL prog, int param) { + public static int _wglGetProgrami(IProgramGL prog, int param) { return _wglGetProgramiN(((OpenGLObjects.ProgramGL)prog).ptr, param); } @Import(module = "platformOpenGL", name = "glGetProgrami") static native int _wglGetProgramiN(WebGLProgram prog, int param); - public static final String _wglGetProgramInfoLog(IProgramGL prog) { + public static String _wglGetProgramInfoLog(IProgramGL prog) { return BetterJSStringConverter.stringFromJS(_wglGetProgramInfoLogN(((OpenGLObjects.ProgramGL)prog).ptr)); } @@ -542,21 +543,21 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glDrawElementsInstanced") public static native void _wglDrawElementsInstanced(int mode, int count, int type, int offset, int instanced); - public static final void _wglBindAttribLocation(IProgramGL prog, int index, String str) { + public static void _wglBindAttribLocation(IProgramGL prog, int index, String str) { _wglBindAttribLocationN(((OpenGLObjects.ProgramGL)prog).ptr, index, BetterJSStringConverter.stringToJS(str)); } @Import(module = "platformOpenGL", name = "glBindAttribLocation") static native void _wglBindAttribLocationN(WebGLProgram prog, int index, JSString str); - public static final int _wglGetAttribLocation(IProgramGL prog, String str) { + public static int _wglGetAttribLocation(IProgramGL prog, String str) { return _wglGetAttribLocationN(((OpenGLObjects.ProgramGL)prog).ptr, BetterJSStringConverter.stringToJS(str)); } @Import(module = "platformOpenGL", name = "glGetAttribLocation") static native int _wglGetAttribLocationN(WebGLProgram prog, JSString str); - public static final IUniformGL _wglGetUniformLocation(IProgramGL prog, String str) { + public static IUniformGL _wglGetUniformLocation(IProgramGL prog, String str) { WebGLUniformLocation ret = _wglGetUniformLocationN(((OpenGLObjects.ProgramGL)prog).ptr, BetterJSStringConverter.stringToJS(str)); return ret != null ? new OpenGLObjects.UniformGL(ret) : null; } @@ -564,84 +565,84 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glGetUniformLocation") static native WebGLUniformLocation _wglGetUniformLocationN(WebGLProgram prog, JSString str); - public static final int _wglGetUniformBlockIndex(IProgramGL prog, String str) { + public static int _wglGetUniformBlockIndex(IProgramGL prog, String str) { return _wglGetUniformBlockIndexN(((OpenGLObjects.ProgramGL)prog).ptr, BetterJSStringConverter.stringToJS(str)); } @Import(module = "platformOpenGL", name = "glGetUniformBlockIndex") static native int _wglGetUniformBlockIndexN(WebGLProgram prog, JSString str); - public static final void _wglBindBufferRange(int target, int index, IBufferGL bufferId, int offset, int size) { + public static void _wglBindBufferRange(int target, int index, IBufferGL bufferId, int offset, int size) { _wglBindBufferRangeN(target, index, ((OpenGLObjects.BufferGL)bufferId).ptr, offset, size); } @Import(module = "platformOpenGL", name = "glBindBufferRange") static native void _wglBindBufferRangeN(int target, int index, WebGLBuffer bufferId, int offset, int size); - public static final void _wglUniformBlockBinding(IProgramGL prog, int blockIndex, int bufferIndex) { + public static void _wglUniformBlockBinding(IProgramGL prog, int blockIndex, int bufferIndex) { _wglUniformBlockBindingN(((OpenGLObjects.ProgramGL)prog).ptr, blockIndex, bufferIndex); } @Import(module = "platformOpenGL", name = "glUniformBlockBinding") static native void _wglUniformBlockBindingN(WebGLProgram prog, int blockIndex, int bufferIndex); - public static final void _wglUniform1f(IUniformGL uniformIndex, float x) { + public static void _wglUniform1f(IUniformGL uniformIndex, float x) { if(uniformIndex != null) _wglUniform1fN(((OpenGLObjects.UniformGL)uniformIndex).ptr, x); } @Import(module = "platformOpenGL", name = "glUniform1f") public static native void _wglUniform1fN(WebGLUniformLocation uniformIndex, float x); - public static final void _wglUniform2f(IUniformGL uniformIndex, float x, float y) { + public static void _wglUniform2f(IUniformGL uniformIndex, float x, float y) { if(uniformIndex != null) _wglUniform2fN(((OpenGLObjects.UniformGL)uniformIndex).ptr, x, y); } @Import(module = "platformOpenGL", name = "glUniform2f") public static native void _wglUniform2fN(WebGLUniformLocation uniformIndex, float x, float y); - public static final void _wglUniform3f(IUniformGL uniformIndex, float x, float y, float z) { + public static void _wglUniform3f(IUniformGL uniformIndex, float x, float y, float z) { if(uniformIndex != null) _wglUniform3fN(((OpenGLObjects.UniformGL)uniformIndex).ptr, x, y, z); } @Import(module = "platformOpenGL", name = "glUniform3f") public static native void _wglUniform3fN(WebGLUniformLocation uniformIndex, float x, float y, float z); - public static final void _wglUniform4f(IUniformGL uniformIndex, float x, float y, float z, float w) { + public static void _wglUniform4f(IUniformGL uniformIndex, float x, float y, float z, float w) { if(uniformIndex != null) _wglUniform4fN(((OpenGLObjects.UniformGL)uniformIndex).ptr, x, y, z, w); } @Import(module = "platformOpenGL", name = "glUniform4f") public static native void _wglUniform4fN(WebGLUniformLocation uniformIndex, float x, float y, float z, float w); - public static final void _wglUniform1i(IUniformGL uniformIndex, int x) { + public static void _wglUniform1i(IUniformGL uniformIndex, int x) { if(uniformIndex != null) _wglUniform1iN(((OpenGLObjects.UniformGL)uniformIndex).ptr, x); } @Import(module = "platformOpenGL", name = "glUniform1i") public static native void _wglUniform1iN(WebGLUniformLocation uniformIndex, int x); - public static final void _wglUniform2i(IUniformGL uniformIndex, int x, int y) { + public static void _wglUniform2i(IUniformGL uniformIndex, int x, int y) { if(uniformIndex != null) _wglUniform2iN(((OpenGLObjects.UniformGL)uniformIndex).ptr, x, y); } @Import(module = "platformOpenGL", name = "glUniform2i") public static native void _wglUniform2iN(WebGLUniformLocation uniformIndex, int x, int y); - public static final void _wglUniform3i(IUniformGL uniformIndex, int x, int y, int z) { + public static void _wglUniform3i(IUniformGL uniformIndex, int x, int y, int z) { if(uniformIndex != null) _wglUniform3iN(((OpenGLObjects.UniformGL)uniformIndex).ptr, x, y, z); } @Import(module = "platformOpenGL", name = "glUniform3i") public static native void _wglUniform3iN(WebGLUniformLocation uniformIndex, int x, int y, int z); - public static final void _wglUniform4i(IUniformGL uniformIndex, int x, int y, int z, int w) { + public static void _wglUniform4i(IUniformGL uniformIndex, int x, int y, int z, int w) { if(uniformIndex != null) _wglUniform4iN(((OpenGLObjects.UniformGL)uniformIndex).ptr, x, y, z, w); } @Import(module = "platformOpenGL", name = "glUniform4i") public static native void _wglUniform4iN(WebGLUniformLocation uniformIndex, int x, int y, int z, int w); - public static final void _wglUniformMatrix2fv(IUniformGL uniformIndex, boolean transpose, FloatBuffer buffer) { + public static void _wglUniformMatrix2fv(IUniformGL uniformIndex, boolean transpose, FloatBuffer buffer) { if (uniformIndex != null) _wglUniformMatrix2fvN(((OpenGLObjects.UniformGL) uniformIndex).ptr, transpose, WASMGCBufferAllocator.getFloatBufferView(buffer)); @@ -650,7 +651,7 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glUniformMatrix2fv") static native void _wglUniformMatrix2fvN(WebGLUniformLocation uniformIndex, boolean transpose, Float32Array typedArray); - public static final void _wglUniformMatrix3fv(IUniformGL uniformIndex, boolean transpose, FloatBuffer buffer) { + public static void _wglUniformMatrix3fv(IUniformGL uniformIndex, boolean transpose, FloatBuffer buffer) { if (uniformIndex != null) _wglUniformMatrix3fvN(((OpenGLObjects.UniformGL) uniformIndex).ptr, transpose, WASMGCBufferAllocator.getFloatBufferView(buffer)); @@ -659,7 +660,7 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glUniformMatrix3fv") static native void _wglUniformMatrix3fvN(WebGLUniformLocation uniformIndex, boolean transpose, Float32Array typedArray); - public static final void _wglUniformMatrix4fv(IUniformGL uniformIndex, boolean transpose, FloatBuffer buffer) { + public static void _wglUniformMatrix4fv(IUniformGL uniformIndex, boolean transpose, FloatBuffer buffer) { if (uniformIndex != null) _wglUniformMatrix4fvN(((OpenGLObjects.UniformGL) uniformIndex).ptr, transpose, WASMGCBufferAllocator.getFloatBufferView(buffer)); @@ -668,7 +669,7 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glUniformMatrix4fv") static native void _wglUniformMatrix4fvN(WebGLUniformLocation uniformIndex, boolean transpose, Float32Array typedArray); - public static final void _wglUniformMatrix3x2fv(IUniformGL uniformIndex, boolean transpose, FloatBuffer buffer) { + public static void _wglUniformMatrix3x2fv(IUniformGL uniformIndex, boolean transpose, FloatBuffer buffer) { if (uniformIndex != null) _wglUniformMatrix3x2fvN(((OpenGLObjects.UniformGL) uniformIndex).ptr, transpose, WASMGCBufferAllocator.getFloatBufferView(buffer)); @@ -677,7 +678,7 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glUniformMatrix3x2fv") static native void _wglUniformMatrix3x2fvN(WebGLUniformLocation uniformIndex, boolean transpose, Float32Array typedArray); - public static final void _wglUniformMatrix4x2fv(IUniformGL uniformIndex, boolean transpose, FloatBuffer buffer) { + public static void _wglUniformMatrix4x2fv(IUniformGL uniformIndex, boolean transpose, FloatBuffer buffer) { if (uniformIndex != null) _wglUniformMatrix4x2fvN(((OpenGLObjects.UniformGL) uniformIndex).ptr, transpose, WASMGCBufferAllocator.getFloatBufferView(buffer)); @@ -686,7 +687,7 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glUniformMatrix4x2fv") static native void _wglUniformMatrix4x2fvN(WebGLUniformLocation uniformIndex, boolean transpose, Float32Array typedArray); - public static final void _wglUniformMatrix4x3fv(IUniformGL uniformIndex, boolean transpose, FloatBuffer buffer) { + public static void _wglUniformMatrix4x3fv(IUniformGL uniformIndex, boolean transpose, FloatBuffer buffer) { if (uniformIndex != null) _wglUniformMatrix4x3fvN(((OpenGLObjects.UniformGL) uniformIndex).ptr, transpose, WASMGCBufferAllocator.getFloatBufferView(buffer)); @@ -695,14 +696,14 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glUniformMatrix4x3fv") static native void _wglUniformMatrix4x3fvN(WebGLUniformLocation uniformIndex, boolean transpose, Float32Array typedArray); - public static final void _wglBindFramebuffer(int target, IFramebufferGL framebuffer) { + public static void _wglBindFramebuffer(int target, IFramebufferGL framebuffer) { if(framebuffer == null) { framebuffer = WebGLBackBuffer.getBackBuffer(); } _wglBindFramebufferN(target, ((OpenGLObjects.FramebufferGL)framebuffer).ptr); } - public static final void _wglBindFramebufferLow(int target, IFramebufferGL framebuffer) { + public static void _wglBindFramebufferLow(int target, IFramebufferGL framebuffer) { _wglBindFramebufferN(target, framebuffer != null ? ((OpenGLObjects.FramebufferGL)framebuffer).ptr : null); } @@ -719,28 +720,28 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glRenderbufferStorage") public static native void _wglRenderbufferStorage(int target, int internalformat, int width, int height); - public static final void _wglFramebufferTexture2D(int target, int attachment, int texTarget, ITextureGL texObj, int level) { + public static void _wglFramebufferTexture2D(int target, int attachment, int texTarget, ITextureGL texObj, int level) { _wglFramebufferTexture2DN(target, attachment, texTarget, ((OpenGLObjects.TextureGL)texObj).ptr, level); } @Import(module = "platformOpenGL", name = "glFramebufferTexture2D") static native void _wglFramebufferTexture2DN(int target, int attachment, int texTarget, WebGLTexture texObj, int level); - public static final void _wglFramebufferTextureLayer(int target, int attachment, ITextureGL texObj, int level, int layer) { + public static void _wglFramebufferTextureLayer(int target, int attachment, ITextureGL texObj, int level, int layer) { _wglFramebufferTextureLayerN(target, attachment, ((OpenGLObjects.TextureGL)texObj).ptr, level, layer); } @Import(module = "platformOpenGL", name = "glFramebufferTextureLayer") static native void _wglFramebufferTextureLayerN(int target, int attachment, WebGLTexture texObj, int level, int layer); - public static final void _wglBindRenderbuffer(int target, IRenderbufferGL renderbuffer) { + public static void _wglBindRenderbuffer(int target, IRenderbufferGL renderbuffer) { _wglBindRenderbufferN(target, renderbuffer != null ? ((OpenGLObjects.RenderbufferGL)renderbuffer).ptr : null); } @Import(module = "platformOpenGL", name = "glBindRenderbuffer") static native void _wglBindRenderbufferN(int target, WebGLRenderbuffer renderbuffer); - public static final void _wglFramebufferRenderbuffer(int target, int attachment, int renderbufferTarget, + public static void _wglFramebufferRenderbuffer(int target, int attachment, int renderbufferTarget, IRenderbufferGL renderbufferId) { _wglFramebufferRenderbufferN(target, attachment, renderbufferTarget, renderbufferId != null ? ((OpenGLObjects.RenderbufferGL) renderbufferId).ptr : null); @@ -749,7 +750,7 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glFramebufferRenderbuffer") static native void _wglFramebufferRenderbufferN(int target, int attachment, int renderbufferTarget, WebGLRenderbuffer renderbufferId); - public static final String _wglGetString(int param) { + public static String _wglGetString(int param) { return BetterJSStringConverter.stringFromJS(_wglGetStringN(param)); } @@ -762,43 +763,43 @@ public class PlatformOpenGL { @Import(module = "platformOpenGL", name = "glGetError") public static native int _wglGetError(); - public static final int checkOpenGLESVersion() { + public static int checkOpenGLESVersion() { return glesVers; } - public static final boolean checkEXTGPUShader5Capable() { + public static boolean checkEXTGPUShader5Capable() { return (capABits & CAP_A_BIT_EXT_GPU_SHADER5) != 0; } - public static final boolean checkOESGPUShader5Capable() { + public static boolean checkOESGPUShader5Capable() { return (capABits & CAP_A_BIT_OES_GPU_SHADER5) != 0; } - public static final boolean checkFBORenderMipmapCapable() { + public static boolean checkFBORenderMipmapCapable() { return (capABits & CAP_A_BIT_FBO_RENDER_MIPMAP) != 0; } - public static final boolean checkVAOCapable() { + public static boolean checkVAOCapable() { return vertexArrayImpl != VAO_IMPL_NONE; } - public static final boolean checkInstancingCapable() { + public static boolean checkInstancingCapable() { return instancingImpl != INSTANCE_IMPL_NONE; } - public static final boolean checkTexStorageCapable() { + public static boolean checkTexStorageCapable() { return glesVers >= 300; } - public static final boolean checkTextureLODCapable() { + public static boolean checkTextureLODCapable() { return (capABits & CAP_A_BIT_TEXTURE_LOD_CAPABLE) != 0; } - public static final boolean checkNPOTCapable() { + public static boolean checkNPOTCapable() { return (capABits & CAP_A_BIT_NPOT_CAPABLE) != 0; } - public static final boolean checkHDRFramebufferSupport(int bits) { + public static boolean checkHDRFramebufferSupport(int bits) { switch(bits) { case 16: return (capABits & CAP_A_BIT_HDR_FBO16F) != 0; @@ -809,7 +810,7 @@ public class PlatformOpenGL { } } - public static final boolean checkLinearHDRFilteringSupport(int bits) { + public static boolean checkLinearHDRFilteringSupport(int bits) { switch(bits) { case 16: return (capBBits & CAP_B_BIT_HDR_LINEAR16F) != 0; @@ -821,30 +822,30 @@ public class PlatformOpenGL { } // legacy - public static final boolean checkLinearHDR32FSupport() { + public static boolean checkLinearHDR32FSupport() { return (capBBits & CAP_B_BIT_HDR_LINEAR32F) != 0; } - public static final boolean checkAnisotropicFilteringSupport() { + public static boolean checkAnisotropicFilteringSupport() { return (capABits & CAP_A_BIT_ANISOTROPIC) != 0; } - public static final String[] getAllExtensions() { + public static String[] getAllExtensions() { return BetterJSStringConverter.stringArrayFromJS(getAllExtensions0()); } @Import(module = "platformOpenGL", name = "getAllExtensions") static native JSArray getAllExtensions0(); - public static final List dumpActiveExtensions() { + public static List dumpActiveExtensions() { return Arrays.asList(BetterJSStringConverter.stringArrayFromJS(dumpActiveExtensions0())); } @Import(module = "platformOpenGL", name = "dumpActiveExtensions") static native JSArray dumpActiveExtensions0(); - public static final void enterVAOEmulationHook() { + public static void enterVAOEmulationHook() { WebGLBackBuffer.enterVAOEmulationPhase(); } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java index 53a750b..49425f8 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformRuntime.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.io.IOException; @@ -27,9 +43,11 @@ import com.jcraft.jzlib.Inflater; import com.jcraft.jzlib.InflaterInputStream; import net.lax1dude.eaglercraft.v1_8.Filesystem; +import net.lax1dude.eaglercraft.v1_8.HString; import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; import net.lax1dude.eaglercraft.v1_8.internal.buffer.IntBuffer; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.MemoryStack; import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCBufferAllocator; import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCDirectArrayConverter; import net.lax1dude.eaglercraft.v1_8.internal.vfs2.VFile2; @@ -42,21 +60,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFolderResourcePack; import net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums; -/** - * Copyright (c) 2022-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 PlatformRuntime { static final Logger logger = LogManager.getLogger("RuntimeWASMGC"); @@ -74,6 +77,7 @@ public class PlatformRuntime { root = getRootElement(); parent = getParentElement(); canvas = getCanvasElement(); + printMemoryStackAddrWASMGC(); PlatformApplication.setMCServerWindowGlobal(null); PlatformOpenGL.initContext(); PlatformInput.initContext(win, parent, canvas); @@ -83,29 +87,27 @@ public class PlatformRuntime { WebGLBackBuffer.initBackBuffer(PlatformInput.getWindowWidth(), PlatformInput.getWindowHeight()); - HTMLElement el = parent.querySelector("._eaglercraftX_early_splash_element"); - if(el != null) { - el.delete(); - } - - EarlyLoadScreen.extractingAssetsScreen(); - sleep(20); - PlatformAssets.readAssetsTeaVM(); byte[] finalLoadScreen = PlatformAssets.getResourceBytes("/assets/eagler/eagtek.png"); if(finalLoadScreen != null) { + EarlyLoadScreen.initialize(); EarlyLoadScreen.loadFinal(finalLoadScreen); EarlyLoadScreen.paintFinal(false); + EarlyLoadScreen.destroy(); }else { PlatformOpenGL._wglClearColor(1.0f, 0.0f, 1.0f, 1.0f); PlatformOpenGL._wglClear(RealOpenGLEnums.GL_COLOR_BUFFER_BIT); PlatformInput.update(); } - sleep(20); - EarlyLoadScreen.destroy(); + HTMLElement el = parent.querySelector("._eaglercraftX_early_splash_element"); + if(el != null) { + el.delete(); + } + + sleep(20); logger.info("Initializing filesystem..."); @@ -536,4 +538,9 @@ public class PlatformRuntime { return new GZIPInputStream(is); } -} + public static void printMemoryStackAddrWASMGC() { + logger.info("MemoryStack base: 0x{}, limit: 0x{}", HString.format("%08x", MemoryStack.stackBase.toInt()), + HString.format("%08x", MemoryStack.stackMax.toInt())); + } + +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformScreenRecord.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformScreenRecord.java index 1a19077..61d9ad7 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformScreenRecord.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformScreenRecord.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.util.EnumSet; @@ -19,21 +35,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile; import net.lax1dude.eaglercraft.v1_8.recording.EnumScreenRecordingCodec; -/** - * 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 PlatformScreenRecord { static final Logger logger = LogManager.getLogger("PlatformScreenRecord"); @@ -203,4 +204,4 @@ public class PlatformScreenRecord { return mediaRec != null && currentParameters != null && currentParameters.captureFrameRate == -1; } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformUpdateSvc.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformUpdateSvc.java index cde10ff..6e8a39f 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformUpdateSvc.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformUpdateSvc.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal; - -import net.lax1dude.eaglercraft.v1_8.update.UpdateCertificate; -import net.lax1dude.eaglercraft.v1_8.update.UpdateProgressStruct; -import net.lax1dude.eaglercraft.v1_8.update.UpdateResultObj; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import net.lax1dude.eaglercraft.v1_8.update.UpdateResultObj; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal; + +import net.lax1dude.eaglercraft.v1_8.update.UpdateCertificate; +import net.lax1dude.eaglercraft.v1_8.update.UpdateProgressStruct; +import net.lax1dude.eaglercraft.v1_8.update.UpdateResultObj; + public class PlatformUpdateSvc { private static final UpdateProgressStruct dummyStruct = new UpdateProgressStruct(); @@ -64,4 +65,4 @@ public class PlatformUpdateSvc { } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformVoiceClient.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformVoiceClient.java index 10454ef..2853c0c 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformVoiceClient.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformVoiceClient.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.util.HashMap; @@ -31,21 +47,6 @@ import net.lax1dude.eaglercraft.v1_8.voice.EnumVoiceChannelReadyState; import net.lax1dude.eaglercraft.v1_8.voice.EnumVoiceChannelType; import net.lax1dude.eaglercraft.v1_8.voice.VoiceClientController; -/** - * 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 PlatformVoiceClient { private static final Logger logger = LogManager.getLogger("PlatformVoiceClient"); @@ -473,4 +474,4 @@ public class PlatformVoiceClient { } } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebRTC.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebRTC.java index ea2d3b4..478bb99 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebRTC.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebRTC.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.util.Arrays; @@ -19,21 +35,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.sp.lan.LANPeerEvent; -/** - * 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 PlatformWebRTC { private static final Logger logger = LogManager.getLogger("PlatformWebRTC"); @@ -356,4 +357,4 @@ public class PlatformWebRTC { return lanServerPeers.size(); } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebView.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebView.java index bcdb694..5b9cf74 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebView.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/PlatformWebView.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal; import java.nio.charset.StandardCharsets; @@ -25,21 +41,6 @@ import net.lax1dude.eaglercraft.v1_8.socket.protocol.pkt.server.SPacketWebViewMe import net.lax1dude.eaglercraft.v1_8.webview.PermissionsCache; import net.lax1dude.eaglercraft.v1_8.webview.WebViewOverlayController.IPacketSendCallback; -/** - * 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 PlatformWebView { private static final Logger logger = LogManager.getLogger("PlatformWebView"); @@ -422,4 +423,4 @@ public class PlatformWebView { } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocByteBuffer.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocByteBuffer.java index 6cc0d7d..54afee5 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocByteBuffer.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocByteBuffer.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.teavm.interop.Address; -import org.teavm.interop.DirectMalloc; - -/** +/* * Copyright (c) 2024-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.interop.DirectMalloc; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.teavm.interop.Address; +import org.teavm.interop.DirectMalloc; + public class DirectMallocByteBuffer extends ByteBuffer { final Address address; @@ -382,4 +383,4 @@ public class DirectMallocByteBuffer extends ByteBuffer { return this; } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocFloatBuffer.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocFloatBuffer.java index 831bf04..3d2953e 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocFloatBuffer.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocFloatBuffer.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.teavm.interop.Address; -import org.teavm.interop.DirectMalloc; - -/** +/* * Copyright (c) 2024-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.interop.DirectMalloc; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.teavm.interop.Address; +import org.teavm.interop.DirectMalloc; + public class DirectMallocFloatBuffer extends FloatBuffer { final Address address; @@ -235,4 +236,4 @@ public class DirectMallocFloatBuffer extends FloatBuffer { return this; } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocIntBuffer.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocIntBuffer.java index f333ddc..9adbf2d 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocIntBuffer.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocIntBuffer.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.teavm.interop.Address; -import org.teavm.interop.DirectMalloc; - -/** +/* * Copyright (c) 2024-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.interop.DirectMalloc; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.teavm.interop.Address; +import org.teavm.interop.DirectMalloc; + public class DirectMallocIntBuffer extends IntBuffer { final Address address; @@ -236,4 +237,4 @@ public class DirectMallocIntBuffer extends IntBuffer { return this; } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocShortBuffer.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocShortBuffer.java index 39e892c..00150ba 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocShortBuffer.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/DirectMallocShortBuffer.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.teavm.interop.Address; -import org.teavm.interop.DirectMalloc; - -/** +/* * Copyright (c) 2024-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.interop.DirectMalloc; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.teavm.interop.Address; +import org.teavm.interop.DirectMalloc; + public class DirectMallocShortBuffer extends ShortBuffer { final Address address; @@ -236,4 +237,4 @@ public class DirectMallocShortBuffer extends ShortBuffer { return this; } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/MemoryStack.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/MemoryStack.java index f4dee24..e463406 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/MemoryStack.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/MemoryStack.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.teavm.interop.Address; -import org.teavm.interop.DirectMalloc; - -/** +/* * Copyright (c) 2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.interop.DirectMalloc; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.teavm.interop.Address; +import org.teavm.interop.DirectMalloc; + public class MemoryStack { public static final int STACK_SIZE = 2 * 1024 * 1024; @@ -43,26 +44,28 @@ public class MemoryStack { } public static void push() { + Address addr = stackTopPointer.add(8); + if(addr.toInt() > stackMax.toInt()) { + throw new StackOverflowError(); + } stackTopPointer.putAddress(stackBottomPointer); stackTopPointer.add(4).putInt(0); stackBottomPointer = stackTopPointer; - stackTopPointer = stackBottomPointer.add(8); - if(stackTopPointer.toInt() > stackMax.toInt()) { - throw new StackOverflowError(); - } + stackTopPointer = addr; } public static void pop() { + Address addr = stackBottomPointer.getAddress(); + if(addr.toInt() == 0) { + throw new IllegalStateException("MemoryStack underflow"); + } stackTopPointer = stackBottomPointer; - stackBottomPointer = stackTopPointer.getAddress(); + stackBottomPointer = addr; Address cleanup = stackTopPointer.add(4).getAddress(); while(cleanup.toInt() != 0) { WASMGCBufferAllocator.free(cleanup.getAddress()); cleanup = cleanup.add(4).getAddress(); } - if(stackBottomPointer.toInt() == 0) { - throw new IllegalStateException("MemoryStack underflow"); - } } public static Address malloc(int length) { @@ -97,7 +100,7 @@ public class MemoryStack { } public static Address calloc(int length) { - if(length > MALLOC_THRESHOLD || (stackMax.toInt() - stackTopPointer.toInt()) < RESERVE_SIZE) { + if(length > MALLOC_THRESHOLD || (stackMax.toInt() - stackTopPointer.toInt() - length) < RESERVE_SIZE) { if(stackTopPointer.toInt() + 8 > stackMax.toInt()) { throw new StackOverflowError(); } @@ -128,4 +131,4 @@ public class MemoryStack { return new DirectMallocFloatBuffer(calloc(length << 2), length, false); } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/WASMGCBufferAllocator.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/WASMGCBufferAllocator.java index b3b97bd..f573569 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/WASMGCBufferAllocator.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/WASMGCBufferAllocator.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.teavm.interop.Address; -import org.teavm.interop.DirectMalloc; -import org.teavm.interop.Import; -import org.teavm.jso.typedarrays.Float32Array; -import org.teavm.jso.typedarrays.Int16Array; -import org.teavm.jso.typedarrays.Int32Array; -import org.teavm.jso.typedarrays.Int8Array; -import org.teavm.jso.typedarrays.Uint16Array; -import org.teavm.jso.typedarrays.Uint8Array; -import org.teavm.jso.typedarrays.Uint8ClampedArray; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import org.teavm.jso.typedarrays.Uint8ClampedArray; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.teavm.interop.Address; +import org.teavm.interop.DirectMalloc; +import org.teavm.interop.Import; +import org.teavm.jso.typedarrays.Float32Array; +import org.teavm.jso.typedarrays.Int16Array; +import org.teavm.jso.typedarrays.Int32Array; +import org.teavm.jso.typedarrays.Int8Array; +import org.teavm.jso.typedarrays.Uint16Array; +import org.teavm.jso.typedarrays.Uint8Array; +import org.teavm.jso.typedarrays.Uint8ClampedArray; + public class WASMGCBufferAllocator { private static final boolean enableBufferOverflowCheck = false; @@ -288,4 +289,4 @@ public class WASMGCBufferAllocator { return new WrongBufferClassType("Tried to pass a " + clazz.getClass().getSimpleName() + " which was not the original buffer"); } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/WASMGCDirectArrayConverter.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/WASMGCDirectArrayConverter.java index c7df41b..6df559c 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/WASMGCDirectArrayConverter.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/WASMGCDirectArrayConverter.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.teavm.interop.Address; -import org.teavm.jso.typedarrays.Float32Array; -import org.teavm.jso.typedarrays.Int16Array; -import org.teavm.jso.typedarrays.Int32Array; -import org.teavm.jso.typedarrays.Int8Array; -import org.teavm.jso.typedarrays.Uint16Array; -import org.teavm.jso.typedarrays.Uint8Array; -import org.teavm.jso.typedarrays.Uint8ClampedArray; - -/** +/* * Copyright (c) 2024-2025 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import org.teavm.jso.typedarrays.Uint8ClampedArray; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.teavm.interop.Address; +import org.teavm.jso.typedarrays.Float32Array; +import org.teavm.jso.typedarrays.Int16Array; +import org.teavm.jso.typedarrays.Int32Array; +import org.teavm.jso.typedarrays.Int8Array; +import org.teavm.jso.typedarrays.Uint16Array; +import org.teavm.jso.typedarrays.Uint8Array; +import org.teavm.jso.typedarrays.Uint8ClampedArray; + public class WASMGCDirectArrayConverter { public static ByteBuffer byteArrayToBuffer(byte[] byteArray) { @@ -585,4 +586,4 @@ public class WASMGCDirectArrayConverter { return ret; } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/WASMGCDirectArrayCopy.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/WASMGCDirectArrayCopy.java index 76cf0ab..1c23e9f 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/WASMGCDirectArrayCopy.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/buffer/WASMGCDirectArrayCopy.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.buffer; - -import org.teavm.interop.Address; -import org.teavm.interop.Unmanaged; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.interop.Unmanaged; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.buffer; + +import org.teavm.interop.Address; +import org.teavm.interop.Unmanaged; + public class WASMGCDirectArrayCopy { @Unmanaged @@ -120,4 +121,4 @@ public class WASMGCDirectArrayCopy { } } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/BetterJSStringConverter.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/BetterJSStringConverter.java index bea7fb6..508f703 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/BetterJSStringConverter.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/BetterJSStringConverter.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import org.teavm.interop.Address; -import org.teavm.interop.Import; -import org.teavm.interop.Unmanaged; -import org.teavm.jso.core.JSArray; -import org.teavm.jso.core.JSString; - -import net.lax1dude.eaglercraft.v1_8.internal.buffer.MemoryStack; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCBufferAllocator; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCBufferAllocator; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import org.teavm.interop.Address; +import org.teavm.interop.Import; +import org.teavm.interop.Unmanaged; +import org.teavm.jso.core.JSArray; +import org.teavm.jso.core.JSString; + +import net.lax1dude.eaglercraft.v1_8.internal.buffer.MemoryStack; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCBufferAllocator; + public class BetterJSStringConverter { private static final TextDecoder textDecoder = new TextDecoder("utf-16"); @@ -78,4 +79,4 @@ public class BetterJSStringConverter { return ret; } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/ClientMain.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/ClientMain.java index 688f4da..3c4ef95 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/ClientMain.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/ClientMain.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import java.io.PrintStream; - -import org.teavm.interop.Import; -import org.teavm.jso.JSObject; -import org.teavm.jso.browser.Window; - -import net.lax1dude.eaglercraft.v1_8.EagRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; -import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts.JSEaglercraftXOptsRoot; -import net.minecraft.client.main.Main; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.minecraft.client.main.Main; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import java.io.PrintStream; + +import org.teavm.interop.Import; +import org.teavm.jso.JSObject; +import org.teavm.jso.browser.Window; + +import net.lax1dude.eaglercraft.v1_8.EagRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; +import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts.JSEaglercraftXOptsRoot; +import net.minecraft.client.main.Main; + public class ClientMain { private static final PrintStream systemOut = System.out; @@ -93,4 +94,4 @@ public class ClientMain { @Import(module = "platformRuntime", name = "getEaglercraftXOpts") private static native JSObject getEaglerXOpts(); -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/EPKLoader.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/EPKLoader.java index 6aa4d19..d4955ab 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/EPKLoader.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/EPKLoader.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Map; - -import com.jcraft.jzlib.CRC32; -import com.jcraft.jzlib.GZIPInputStream; -import com.jcraft.jzlib.InflaterInputStream; - -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.EaglerBufferInputStream; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.EaglerBufferInputStream; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Map; + +import com.jcraft.jzlib.CRC32; +import com.jcraft.jzlib.GZIPInputStream; +import com.jcraft.jzlib.InflaterInputStream; + +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.EaglerBufferInputStream; + public class EPKLoader { public static final void loadEPK(ByteBuffer epkFile, Map loadedFiles) throws IOException { @@ -188,4 +189,4 @@ public class EPKLoader { return new String(charIn); } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/EarlyLoadScreen.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/EarlyLoadScreen.java index 2cdb44f..99c93dc 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/EarlyLoadScreen.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/EarlyLoadScreen.java @@ -1,24 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import net.lax1dude.eaglercraft.v1_8.Base64; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; -import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; -import net.lax1dude.eaglercraft.v1_8.internal.ITextureGL; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformAssets; -import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.IntBuffer; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.MemoryStack; -import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; -import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -33,40 +13,37 @@ import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; * POSSIBILITY OF SUCH DAMAGE. * */ -public class EarlyLoadScreen { - public static final String loadScreen = "iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAYAAABS3GwHAAAACXBIWXMAAAsTAAALEwEAmpwYAAAHx0lEQVR42u3da27jIBRAYbfqFp1FuovM/GLEMIDBhsRJviNVapsYY8y5vPz4ut/v9wX4UL4VAQgAEAAgAEAAgAAAAQACAAQACAAQACAAQACAAAABAAIABAAIABAAIABAAIAAAAEAAgAEAAgAEAAgAEAAgAAAAQACAAQACAAQACAAQACAAAABAAIABAAIABAAIABAAIAAAAEAAgAEAAgAEAAgAAgAEAAgAEAAgAAAAQACAAQACAAQACAAQACAAMBr86MI3ovf39/i/9Z1XdZ1VUgEeN/Kf7vdqt8hgC7QW6OCE+CjK/+2bcv9fieCLtDjux9x/1t/u1xOveWSlisBXmQASoB/+fr6+vv7/X7vHteE8hxZrrpAkyo/2mU42soSgAAfN8YZ3aoSQOV/GNu2ZX9vGdjPEuBnVmXIVYqePly8famCne0TtuS1tt/a9kfSbWnqZw2u9yQesc91XZv7/iO2a+I+iG3b7uu63pdl2f1Z17WaTksaaXrbtk3JaynvR/O5l6/WtPaON3d8tf3v7e9d+RkVPeIVyDRKpREtfL+nGdxL7/f3d9m2bTdS5VZL4/Rz0fcRszm32604jZrLUyi/UXlb1/WlunKhTE63iCMif0tkao1IaXqlqFWKlr2RsTUPpXRLrUnYpqVlircfdby9LUCpbHpa1lyeW8tgL51SmZ9N+2dE5GqJlrkI0xJxaumV0ixt0xrd07TDdrl+aDoeGNnfbzne0RE1HqSOaF3SljptyXP7qF3QN3zi4Yw9LdF0r5+Zs7u175mLirU85KJiLbK3pt2bj1qZ1CJaz356WoD0u2ejaq11XNf1708uf73jqqeOAXotbIlgZ/t0tfSPRulZ050j0jubRjz2CGU/clyRRvvwv1LPIR4X5r6TtlJPmwY9W5la54vfea5+Zhm2dnniyj+j3GtdxCsMzL+vWAmuyujK2dLXnVGGYSZsduXPlV0625Vbk0nlnFlXhrYAezdjPFOa2sD4GRetlY5hdhnmpoHjKcXZlb927Llp4JCvWYHy8leDxpHgbCH0zBo9s3vyiLK8QiBIxwiPaHWnjwFGZbjl9r5RAtxut92Fp5GLTqPHP735qpXDrK5QbjFz27b/Wp802IXu2Yz6cGoadDmwCHV0enVJFpbCfkqLQ6Mvg9g7riPToEfyfrYMl4ZLOUadw1rZh33H/ytNjcbnunfavakeX02As3P1rZVoT4KeVdBXESDN05HV4pFXDaQrxqkE6TnISfC0dYAZA5PSSu3orkeYiSil/Sl3cm3b9t+NKbMHxHtTpenvcT7C33Gez+b1e3QFvvrUY2nhZ/Qi0KtMC+f6/KWpytnnsjWoXuKWyNaZkyud/HTh55mVvTYt++h8zDiXlTFnkwS1wfhlBZgxj917acNe9H9mZWuJvjPuez0azJ5RPj1T3kMe/zJyUNMzkMpdJts6MNybyckNXo/cwLI0XtZ8ZkaldBwt2x65RHvGMRwZoO9dWLh3CfqofC0zZhtKU5fpiWkVIE4n3b423Zemf0SA5cQdVenxt9x70FJ+8TEfkbxUuXqDytnp0L2p0kewzJjeOnMSWtKKt92rQCNageXEDTot05xH1iZy5Xf2lsra9iMrZDjW2dG9ha/7wLuNS5ctpDevt9y2WBu0ptvnxh2l75YutOrtu+/1m+N8tw66022PlGHrcfVuP+NCwNrg+2ETFPcPI45yLSu8s1Yg8UY3xb8K6WP2WualrzJjhDl8f2Ll721iPeiWAG8hwMw+LQhw6co/cpWaPO/DR4wBchU23APQMiMy43EhuAZDp0FfaQxwRCJjAQK8xTigp0uk4hPgowbH+vkEAD4GL8gAAQACAAQACAAQACAAQACAAAABAAIABAAIABAAIABAAIAAAAEAAgAEAK7NJR6M9S6PLQzPHZr1sulSuXmCxQu3APHz+sNP6wOspr09/CL76ym3Tzr2t2sBHhk13+UYwgsmnvFeXwI8qUtRinZxZNq27e/3tm3Lvg8gjWRpxc09Rj3eb2l/ufTiZ5CG78Sfn305eO7durX8tH4W8pB+Pz32vTQJcGAcED+0Nv5//Pbw9GTl+sKh8sVRMo2WoWkPJy0WpiRB6XVFpa5IvF28v3RfvX36mpylBwKXPktbkjiI1I69liYBTg6E4wqTkyOWolRB4nTSE5XuszaI3dvfngRppM1F+9auTG4fuW1raeXendYiWk+aBBjQf44jZW/TWoriV3gRddwi9L57IPfY9lA5Q3nF6YZyq33WIkLt/NTSJMCAcUD4/Wzhxt2o3Hjg0a3emSdPt7Q2t9vtn3KrfXY0L7U091rWo599xBggjSgh0pSa79aTl4ugaR8913qU9ld6vWlvd6bn+7mB+96MUHpcLULtHftemlqAAwKEwVd6MtNBbK4C7kWLuMkuDT5zA+za/nKzMC0VOu0CtXQhal2UeKCfG2PUPsvNZrUcey3NV8Dj0Z/cvctNQ77DmogWAM0S7M0gQQvwluS6HFZ0CQA8DJdDgwAAAQACAAQACAAQACAAQACAAAABAAIABAAIABAAIABAAIAAAAEAAgAEAAgAEAAgAEAAgAAAAQACAAQACAAQACAAQACAAAABAAIABAAIABAAIABAAIAAAAEAAgAEAAgAEAAgAEAAgAAAAYBlWf4A1W4Hx65cJAoAAAAASUVORK5CYII="; +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; +import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; +import net.lax1dude.eaglercraft.v1_8.internal.ITextureGL; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformAssets; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.FloatBuffer; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.IntBuffer; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.MemoryStack; +import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; +import net.lax1dude.eaglercraft.v1_8.opengl.ImageData; + +public class EarlyLoadScreen { private static IBufferGL vbo = null; private static IProgramGL program = null; private static ITextureGL finalTexture = null; - public static void extractingAssetsScreen() { + public static void initialize() { boolean gles3 = checkOpenGLESVersion() >= 300; - boolean vaos = checkVAOCapable(); - // create textures: - - ITextureGL tex = _wglGenTextures(); - _wglActiveTexture(GL_TEXTURE0); - _wglBindTexture(GL_TEXTURE_2D, tex); - _wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - _wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - _wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE); - _wglTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE); - - ImageData img = PlatformAssets.loadImageFile(Base64.decodeBase64(loadScreen)); MemoryStack.push(); try { - ByteBuffer upload = MemoryStack.mallocByteBuffer(192*192*4); - IntBuffer pixelUpload = upload.asIntBuffer(); - pixelUpload.put(img.pixels); - pixelUpload.flip(); - _wglTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 192, 192, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixelUpload); - - // create vertex buffer: - - FloatBuffer vertexUpload = upload.asFloatBuffer(); + FloatBuffer vertexUpload = MemoryStack.mallocFloatBuffer(12); vertexUpload.clear(); vertexUpload.put(0.0f); vertexUpload.put(0.0f); vertexUpload.put(0.0f); vertexUpload.put(1.0f); @@ -82,8 +59,6 @@ public class EarlyLoadScreen { }finally { MemoryStack.pop(); } - - // compile the splash shader: IShaderGL vert = _wglCreateShader(GL_VERTEX_SHADER); _wglShaderSource(vert, gles3 @@ -112,48 +87,6 @@ public class EarlyLoadScreen { _wglUseProgram(program); _wglUniform1i(_wglGetUniformLocation(program, "tex"), 0); - - int width = PlatformInput.getWindowWidth(); - int height = PlatformInput.getWindowHeight(); - float x, y; - if(width > height) { - x = (float)width / (float)height; - y = 1.0f; - }else { - x = 1.0f; - y = (float)height / (float)width; - } - - _wglActiveTexture(GL_TEXTURE0); - _wglBindTexture(GL_TEXTURE_2D, tex); - - _wglViewport(0, 0, width, height); - _wglClearColor(1.0f, 1.0f, 1.0f, 1.0f); - _wglClear(GL_COLOR_BUFFER_BIT); - - _wglUseProgram(program); - _wglUniform2f(_wglGetUniformLocation(program, "aspect"), x, y); - - IBufferArrayGL vao = null; - if(vaos) { - vao = _wglGenVertexArrays(); - _wglBindVertexArray(vao); - } - _wglEnableVertexAttribArray(0); - _wglVertexAttribPointer(0, 2, GL_FLOAT, false, 8, 0); - _wglDrawArrays(GL_TRIANGLES, 0, 6); - - _wglDisableVertexAttribArray(0); - - PlatformInput.update(); - - _wglUseProgram(null); - _wglBindBuffer(GL_ARRAY_BUFFER, null); - _wglBindTexture(GL_TEXTURE_2D, null); - _wglDeleteTextures(tex); - if(vaos) { - _wglDeleteVertexArrays(vao); - } } public static void loadFinal(byte[] finalLoadScreen) { @@ -206,11 +139,11 @@ public class EarlyLoadScreen { _wglUniform2f(_wglGetUniformLocation(program, "aspect"), x, y); - IBufferArrayGL vao = null; + IVertexArrayGL vao = null; if(vaos) { if(softVAOs) { - vao = EaglercraftGPU.createGLBufferArray(); - EaglercraftGPU.bindGLBufferArray(vao); + vao = EaglercraftGPU.createGLVertexArray(); + EaglercraftGPU.bindGLVertexArray(vao); }else { vao = _wglGenVertexArrays(); _wglBindVertexArray(vao); @@ -220,7 +153,7 @@ public class EarlyLoadScreen { EaglercraftGPU.bindVAOGLArrayBuffer(vbo); EaglercraftGPU.enableVertexAttribArray(0); EaglercraftGPU.vertexAttribPointer(0, 2, GL_FLOAT, false, 8, 0); - EaglercraftGPU.doDrawArrays(GL_TRIANGLES, 0, 6); + EaglercraftGPU.drawArrays(GL_TRIANGLES, 0, 6); }else { _wglBindBuffer(GL_ARRAY_BUFFER, vbo); _wglEnableVertexAttribArray(0); @@ -244,7 +177,7 @@ public class EarlyLoadScreen { } if(vaos) { if(softVAOs) { - EaglercraftGPU.destroyGLBufferArray(vao); + EaglercraftGPU.destroyGLVertexArray(vao); }else { _wglDeleteVertexArrays(vao); } @@ -266,4 +199,4 @@ public class EarlyLoadScreen { } } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/IndexedDBFilesystem.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/IndexedDBFilesystem.java index bc2c8c9..b0d7ba8 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/IndexedDBFilesystem.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/IndexedDBFilesystem.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; import org.teavm.interop.Import; @@ -17,21 +33,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.vfs2.EaglerFileSystemException; import net.lax1dude.eaglercraft.v1_8.internal.PlatformFilesystem.FilesystemDatabaseInitializationException; import net.lax1dude.eaglercraft.v1_8.internal.PlatformFilesystem.FilesystemDatabaseLockedException; -/** - * 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 IndexedDBFilesystem implements IEaglerFilesystem { public static IEaglerFilesystem createFilesystem(String dbName) { @@ -196,4 +197,4 @@ public class IndexedDBFilesystem implements IEaglerFilesystem { } } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/JOrbisAudioBufferDecoder.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/JOrbisAudioBufferDecoder.java index 1f1543a..c157975 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/JOrbisAudioBufferDecoder.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/JOrbisAudioBufferDecoder.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; import java.io.IOException; @@ -23,21 +39,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCBufferAllocator; import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -/** - * 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 JOrbisAudioBufferDecoder { private EaglerInputStream inputStream; @@ -382,4 +383,4 @@ public class JOrbisAudioBufferDecoder { } } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/LegacyKeycodeTranslator.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/LegacyKeycodeTranslator.java index a5c1dcf..ee645e3 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/LegacyKeycodeTranslator.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/LegacyKeycodeTranslator.java @@ -1,12 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import java.util.HashMap; -import java.util.Map; -import java.util.Set; - -import com.google.common.collect.Sets; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -21,6 +13,15 @@ import com.google.common.collect.Sets; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import java.util.HashMap; +import java.util.Map; +import java.util.Set; + +import com.google.common.collect.Sets; + public class LegacyKeycodeTranslator { public static class LegacyKeycode { @@ -325,4 +326,4 @@ public class LegacyKeycodeTranslator { } } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/MainClass.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/MainClass.java index 0d5f03d..2a15301 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/MainClass.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/MainClass.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import net.lax1dude.eaglercraft.v1_8.sp.server.internal.wasm_gc_teavm.WorkerMain; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,6 +13,11 @@ import net.lax1dude.eaglercraft.v1_8.sp.server.internal.wasm_gc_teavm.WorkerMain * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import net.lax1dude.eaglercraft.v1_8.sp.server.internal.wasm_gc_teavm.WorkerMain; + public class MainClass { public static void main(String[] args) { @@ -41,4 +42,4 @@ public class MainClass { WorkerMain._main(); } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/SortedTouchEvent.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/SortedTouchEvent.java index 16affab..fda4a24 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/SortedTouchEvent.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/SortedTouchEvent.java @@ -1,17 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.List; - -import org.teavm.jso.JSObject; -import org.teavm.jso.JSProperty; -import org.teavm.jso.core.JSArrayReader; - -import net.lax1dude.eaglercraft.v1_8.internal.EnumTouchEvent; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -26,6 +13,20 @@ import net.lax1dude.eaglercraft.v1_8.internal.EnumTouchEvent; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.Comparator; +import java.util.List; + +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; +import org.teavm.jso.core.JSArrayReader; + +import net.lax1dude.eaglercraft.v1_8.internal.EnumTouchEvent; + public class SortedTouchEvent { public interface ITouchUIDMapper { @@ -143,4 +144,4 @@ public class SortedTouchEvent { return eventTouchesList; } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/TeaVMUtils.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/TeaVMUtils.java index bee3bbf..61be476 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/TeaVMUtils.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/TeaVMUtils.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSObject; + public class TeaVMUtils { @JSBody(params = { "obj" }, script = "return !!obj;") @@ -29,4 +30,4 @@ public class TeaVMUtils { @JSBody(params = { "obj" }, script = "return obj === undefined;") public static native boolean isUndefined(JSObject object); -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/TextDecoder.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/TextDecoder.java index e3398c2..cc2caba 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/TextDecoder.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/TextDecoder.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import org.teavm.jso.JSClass; -import org.teavm.jso.JSObject; -import org.teavm.jso.core.JSString; -import org.teavm.jso.typedarrays.Uint8Array; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import org.teavm.jso.typedarrays.Uint8Array; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import org.teavm.jso.JSClass; +import org.teavm.jso.JSObject; +import org.teavm.jso.core.JSString; +import org.teavm.jso.typedarrays.Uint8Array; + @JSClass public class TextDecoder implements JSObject { @@ -28,4 +29,4 @@ public class TextDecoder implements JSObject { public native JSString decode(Uint8Array buffer); -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCClientConfigAdapter.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCClientConfigAdapter.java index 976d182..8f3df8d 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCClientConfigAdapter.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCClientConfigAdapter.java @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2022-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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; import java.util.ArrayList; @@ -20,21 +36,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts.JSEaglercraftXO import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts.JSEaglercraftXOptsServer; import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayEntry; -/** - * Copyright (c) 2022-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 WASMGCClientConfigAdapter implements IClientConfigAdapter { public static final IClientConfigAdapter instance = new WASMGCClientConfigAdapter(); @@ -477,4 +478,4 @@ public class WASMGCClientConfigAdapter implements IClientConfigAdapter { return toJSONObject().toString(4); } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCClientConfigAdapterHooks.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCClientConfigAdapterHooks.java index 4cb8eca..50ecc0a 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCClientConfigAdapterHooks.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCClientConfigAdapterHooks.java @@ -1,16 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import java.util.function.Consumer; - -import org.teavm.jso.JSFunctor; -import org.teavm.jso.JSObject; - -import net.lax1dude.eaglercraft.v1_8.internal.IClientConfigAdapterHooks; -import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts.JSEaglercraftXOptsHooks; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -25,6 +13,19 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import java.util.function.Consumer; + +import org.teavm.jso.JSFunctor; +import org.teavm.jso.JSObject; + +import net.lax1dude.eaglercraft.v1_8.internal.IClientConfigAdapterHooks; +import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts.JSEaglercraftXOptsHooks; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; + public class WASMGCClientConfigAdapterHooks implements IClientConfigAdapterHooks { private static final Logger logger = LogManager.getLogger("TeaVMClientConfigAdapterHooks"); @@ -119,4 +120,4 @@ public class WASMGCClientConfigAdapterHooks implements IClientConfigAdapterHooks screenChangedHook = (ScreenChangeHook)hooks.getScreenChangedHook(); } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCCrashReportStrings.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCCrashReportStrings.java index 6278ded..68ff75b 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCCrashReportStrings.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCCrashReportStrings.java @@ -1,11 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import org.teavm.interop.Import; -import org.teavm.jso.core.JSString; - -import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -20,6 +13,14 @@ import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import org.teavm.interop.Import; +import org.teavm.jso.core.JSString; + +import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion; + public class WASMGCCrashReportStrings { private static final int CRASH_REPORT_EAGLER_VERSION = 0; @@ -35,4 +36,4 @@ public class WASMGCCrashReportStrings { setCrashReportString(CRASH_REPORT_MINECRAFT_VERSION, JSString.valueOf("1.8.8")); } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCWebSocketClient.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCWebSocketClient.java index 4eabd44..0cfb996 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCWebSocketClient.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCWebSocketClient.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; import java.util.Arrays; @@ -16,21 +32,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; import net.lax1dude.eaglercraft.v1_8.internal.buffer.MemoryStack; import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCDirectArrayConverter; -/** - * 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 WASMGCWebSocketClient implements IWebSocketClient { public interface JSWebSocketClientHandle extends JSObject { @@ -68,6 +69,10 @@ public class WASMGCWebSocketClient implements IWebSocketClient { void clearBinaryFrames(); + void setEnableStringFrames(boolean enable); + + void setEnableBinaryFrames(boolean enable); + } private final JSWebSocketClientHandle handle; @@ -238,4 +243,14 @@ public class WASMGCWebSocketClient implements IWebSocketClient { return uri; } -} + @Override + public void setEnableStringFrames(boolean enable) { + handle.setEnableStringFrames(enable); + } + + @Override + public void setEnableBinaryFrames(boolean enable) { + handle.setEnableBinaryFrames(enable); + } + +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCWebSocketFrame.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCWebSocketFrame.java index b2328de..fe672bf 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCWebSocketFrame.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WASMGCWebSocketFrame.java @@ -1,18 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import java.io.InputStream; - -import org.teavm.jso.JSObject; -import org.teavm.jso.JSProperty; -import org.teavm.jso.core.JSString; -import org.teavm.jso.typedarrays.ArrayBuffer; -import org.teavm.jso.typedarrays.Uint8Array; - -import net.lax1dude.eaglercraft.v1_8.EaglerInputStream; -import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketFrame; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCDirectArrayConverter; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -27,6 +13,21 @@ import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCDirectArrayConverter; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import java.io.InputStream; + +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; +import org.teavm.jso.core.JSString; +import org.teavm.jso.typedarrays.ArrayBuffer; +import org.teavm.jso.typedarrays.Uint8Array; + +import net.lax1dude.eaglercraft.v1_8.EaglerInputStream; +import net.lax1dude.eaglercraft.v1_8.internal.IWebSocketFrame; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCDirectArrayConverter; + public class WASMGCWebSocketFrame implements IWebSocketFrame { public interface JSWebSocketFrame extends JSObject { @@ -113,4 +114,4 @@ public class WASMGCWebSocketFrame implements IWebSocketFrame { return (long)handle.getTimestamp(); } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WebGLBackBuffer.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WebGLBackBuffer.java index 62ee0fd..d6d7a98 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WebGLBackBuffer.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WebGLBackBuffer.java @@ -1,21 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; -import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; - -import net.lax1dude.eaglercraft.v1_8.internal.IBufferArrayGL; -import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; -import net.lax1dude.eaglercraft.v1_8.internal.IRenderbufferGL; -import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; -import net.lax1dude.eaglercraft.v1_8.internal.ITextureGL; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.MemoryStack; -import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; -import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; - -/** +/* * Copyright (c) 2022-2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -30,6 +13,24 @@ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL.*; +import static net.lax1dude.eaglercraft.v1_8.opengl.RealOpenGLEnums.*; + +import net.lax1dude.eaglercraft.v1_8.internal.IBufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.IFramebufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.IProgramGL; +import net.lax1dude.eaglercraft.v1_8.internal.IRenderbufferGL; +import net.lax1dude.eaglercraft.v1_8.internal.IShaderGL; +import net.lax1dude.eaglercraft.v1_8.internal.ITextureGL; +import net.lax1dude.eaglercraft.v1_8.internal.IVertexArrayGL; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.ByteBuffer; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.MemoryStack; +import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU; +import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager; + public class WebGLBackBuffer { private static int glesVers = -1; @@ -46,7 +47,7 @@ public class WebGLBackBuffer { private static ITextureGL gles2ColorTexture; private static IRenderbufferGL gles2DepthRenderbuffer; private static IProgramGL gles2BlitProgram; - private static IBufferArrayGL gles2BlitVAO; + private static IVertexArrayGL gles2BlitVAO; private static IBufferGL gles2BlitVBO; private static boolean isVAOCapable = false; @@ -160,8 +161,8 @@ public class WebGLBackBuffer { if(isVAOCapable) { _wglDeleteVertexArrays(gles2BlitVAO); } - gles2BlitVAO = EaglercraftGPU.createGLBufferArray(); - EaglercraftGPU.bindGLBufferArray(gles2BlitVAO); + gles2BlitVAO = EaglercraftGPU.createGLVertexArray(); + EaglercraftGPU.bindGLVertexArray(gles2BlitVAO); EaglercraftGPU.bindVAOGLArrayBuffer(gles2BlitVBO); EaglercraftGPU.enableVertexAttribArray(0); EaglercraftGPU.vertexAttribPointer(0, 2, GL_FLOAT, false, 8, 0); @@ -172,8 +173,8 @@ public class WebGLBackBuffer { private static void drawBlitQuad() { if(isEmulatedVAOPhase) { - EaglercraftGPU.bindGLBufferArray(gles2BlitVAO); - EaglercraftGPU.doDrawArrays(GL_TRIANGLES, 0, 6); + EaglercraftGPU.bindGLVertexArray(gles2BlitVAO); + EaglercraftGPU.drawArrays(GL_TRIANGLES, 0, 6); }else { if(isVAOCapable) { _wglBindVertexArray(gles2BlitVAO); @@ -281,7 +282,7 @@ public class WebGLBackBuffer { } if(gles2BlitVAO != null) { if(isEmulatedVAOPhase) { - EaglercraftGPU.destroyGLBufferArray(gles2BlitVAO); + EaglercraftGPU.destroyGLVertexArray(gles2BlitVAO); }else if(isVAOCapable) { _wglDeleteVertexArrays(gles2BlitVAO); } @@ -297,4 +298,4 @@ public class WebGLBackBuffer { isEmulatedVAOPhase = false; } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WebGLQuery.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WebGLQuery.java index 317acef..5a836a8 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WebGLQuery.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WebGLQuery.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,5 +13,10 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import org.teavm.jso.JSObject; + public interface WebGLQuery extends JSObject { -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WebGLVertexArray.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WebGLVertexArray.java index 4d7b8a4..123fb46 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WebGLVertexArray.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/WebGLVertexArray.java @@ -1,8 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; - -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2022 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -17,5 +13,10 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm; + +import org.teavm.jso.JSObject; + public interface WebGLVertexArray extends JSObject { -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsHooks.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsHooks.java index 9a33836..11d4c69 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsHooks.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsHooks.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSObject; + public interface JSEaglercraftXOptsHooks extends JSObject { @JSBody(script = "return (typeof this.localStorageSaved === \"function\") ? this.localStorageSaved : null;") @@ -32,4 +33,4 @@ public interface JSEaglercraftXOptsHooks extends JSObject { @JSBody(script = "return (typeof this.screenChanged === \"function\") ? this.screenChanged : null;") JSObject getScreenChangedHook(); -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsRelay.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsRelay.java index 0c44893..02ed21b 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsRelay.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsRelay.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSObject; + public interface JSEaglercraftXOptsRelay extends JSObject { @JSBody(script = "return (typeof this.addr === \"string\") ? this.addr : null;") @@ -29,4 +30,4 @@ public interface JSEaglercraftXOptsRelay extends JSObject { @JSBody(script = "return (typeof this.primary === \"boolean\") ? this.primary : false;") boolean getPrimary(); -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsRoot.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsRoot.java index e58cf6e..6064fc3 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsRoot.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsRoot.java @@ -1,10 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSObject; -import org.teavm.jso.core.JSArrayReader; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -19,6 +13,13 @@ import org.teavm.jso.core.JSArrayReader; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSObject; +import org.teavm.jso.core.JSArrayReader; + public interface JSEaglercraftXOptsRoot extends JSObject { @JSBody(params = { "def" }, script = "return (typeof this.lang === \"string\") ? this.lang : def;") @@ -171,4 +172,4 @@ public interface JSEaglercraftXOptsRoot extends JSObject { @JSBody(params = { "def" }, script = "return (typeof this.enableEPKVersionCheck === \"boolean\") ? this.enableEPKVersionCheck : def;") boolean getEnableEPKVersionCheck(boolean deobfStackTraces); -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsServer.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsServer.java index 89a411a..1855e5a 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsServer.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/internal/wasm_gc_teavm/opts/JSEaglercraftXOptsServer.java @@ -1,9 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts; - -import org.teavm.jso.JSBody; -import org.teavm.jso.JSObject; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -18,6 +13,12 @@ import org.teavm.jso.JSObject; * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.opts; + +import org.teavm.jso.JSBody; +import org.teavm.jso.JSObject; + public interface JSEaglercraftXOptsServer extends JSObject { @JSBody(script = "return (typeof this.addr === \"string\") ? this.addr : null;") @@ -29,4 +30,4 @@ public interface JSEaglercraftXOptsServer extends JSObject { @JSBody(params = { "def" }, script = "return (typeof this.name === \"string\") ? this.name : def;") String getName(String defaultValue); -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/internal/ClientPlatformSingleplayer.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/internal/ClientPlatformSingleplayer.java index 961172a..151b208 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/internal/ClientPlatformSingleplayer.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/internal/ClientPlatformSingleplayer.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.internal; import java.util.ArrayList; @@ -20,21 +36,6 @@ import net.lax1dude.eaglercraft.v1_8.log4j.Logger; import net.lax1dude.eaglercraft.v1_8.sp.server.internal.wasm_gc_teavm.JS_IPCPacketData; import net.lax1dude.eaglercraft.v1_8.sp.server.internal.wasm_gc_teavm.SingleThreadWorker; -/** - * 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 ClientPlatformSingleplayer { private static final Logger logger = LogManager.getLogger("ClientPlatformSingleplayer"); @@ -140,4 +141,4 @@ public class ClientPlatformSingleplayer { @Import(module = "clientPlatformSingleplayer", name = "hideCrashReportOverlay") public static native void hideCrashReportOverlay(); -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/ServerPlatformSingleplayer.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/ServerPlatformSingleplayer.java index cb7d4e5..40b5b7d 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/ServerPlatformSingleplayer.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/ServerPlatformSingleplayer.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server.internal; import java.util.ArrayList; @@ -16,6 +32,7 @@ import net.lax1dude.eaglercraft.v1_8.Filesystem; import net.lax1dude.eaglercraft.v1_8.internal.IClientConfigAdapter; import net.lax1dude.eaglercraft.v1_8.internal.IEaglerFilesystem; import net.lax1dude.eaglercraft.v1_8.internal.IPCPacketData; +import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime; import net.lax1dude.eaglercraft.v1_8.internal.buffer.MemoryStack; import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCDirectArrayConverter; import net.lax1dude.eaglercraft.v1_8.internal.vfs2.VFile2; @@ -24,21 +41,6 @@ import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.WASMGCClientConfigAd import net.lax1dude.eaglercraft.v1_8.sp.server.IWASMCrashCallback; import net.lax1dude.eaglercraft.v1_8.sp.server.internal.wasm_gc_teavm.JS_IPCPacketData; -/** - * 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 ServerPlatformSingleplayer { private static final List messageQueue = new LinkedList<>(); @@ -49,6 +51,7 @@ public class ServerPlatformSingleplayer { private static IEaglerFilesystem filesystem = null; public static void initializeContext() { + PlatformRuntime.printMemoryStackAddrWASMGC(); singleThreadMode = false; singleThreadCB = null; filesystem = Filesystem.getHandleFor(getClientConfigAdapter().getWorldsDB()); @@ -144,4 +147,4 @@ public class ServerPlatformSingleplayer { @Import(module = "serverPlatformSingleplayer", name = "isTabAboutToClose") public static native boolean isTabAboutToCloseWASM(); -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/wasm_gc_teavm/JS_IPCPacketData.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/wasm_gc_teavm/JS_IPCPacketData.java index a9fb29c..91699ad 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/wasm_gc_teavm/JS_IPCPacketData.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/wasm_gc_teavm/JS_IPCPacketData.java @@ -1,15 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.internal.wasm_gc_teavm; - -import org.teavm.jso.JSObject; -import org.teavm.jso.JSProperty; -import org.teavm.jso.core.JSString; -import org.teavm.jso.typedarrays.Uint8Array; - -import net.lax1dude.eaglercraft.v1_8.internal.IPCPacketData; -import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCDirectArrayConverter; -import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.BetterJSStringConverter; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -24,6 +13,18 @@ import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.BetterJSStringConver * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.internal.wasm_gc_teavm; + +import org.teavm.jso.JSObject; +import org.teavm.jso.JSProperty; +import org.teavm.jso.core.JSString; +import org.teavm.jso.typedarrays.Uint8Array; + +import net.lax1dude.eaglercraft.v1_8.internal.IPCPacketData; +import net.lax1dude.eaglercraft.v1_8.internal.buffer.WASMGCDirectArrayConverter; +import net.lax1dude.eaglercraft.v1_8.internal.wasm_gc_teavm.BetterJSStringConverter; + public interface JS_IPCPacketData extends JSObject { @JSProperty @@ -37,4 +38,4 @@ public interface JS_IPCPacketData extends JSObject { WASMGCDirectArrayConverter.externU8ArrayToByteArray(getData())); } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/wasm_gc_teavm/SingleThreadWorker.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/wasm_gc_teavm/SingleThreadWorker.java index a0dd5df..f1c317d 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/wasm_gc_teavm/SingleThreadWorker.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/wasm_gc_teavm/SingleThreadWorker.java @@ -1,14 +1,4 @@ -package net.lax1dude.eaglercraft.v1_8.sp.server.internal.wasm_gc_teavm; - -import java.util.function.Consumer; - -import net.lax1dude.eaglercraft.v1_8.internal.IPCPacketData; -import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; -import net.lax1dude.eaglercraft.v1_8.log4j.Logger; -import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerIntegratedServerWorker; -import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplayer; - -/** +/* * Copyright (c) 2024 lax1dude. All Rights Reserved. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND @@ -23,6 +13,17 @@ import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplay * POSSIBILITY OF SUCH DAMAGE. * */ + +package net.lax1dude.eaglercraft.v1_8.sp.server.internal.wasm_gc_teavm; + +import java.util.function.Consumer; + +import net.lax1dude.eaglercraft.v1_8.internal.IPCPacketData; +import net.lax1dude.eaglercraft.v1_8.log4j.LogManager; +import net.lax1dude.eaglercraft.v1_8.log4j.Logger; +import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerIntegratedServerWorker; +import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplayer; + public class SingleThreadWorker { private static final Logger logger = LogManager.getLogger("SingleThreadWorker"); @@ -41,4 +42,4 @@ public class SingleThreadWorker { EaglerIntegratedServerWorker.singleThreadUpdate(); } -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/wasm_gc_teavm/WorkerMain.java b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/wasm_gc_teavm/WorkerMain.java index 6731831..4004938 100755 --- a/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/wasm_gc_teavm/WorkerMain.java +++ b/src/wasm-gc-teavm/java/net/lax1dude/eaglercraft/v1_8/sp/server/internal/wasm_gc_teavm/WorkerMain.java @@ -1,3 +1,19 @@ +/* + * 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. + * + */ + package net.lax1dude.eaglercraft.v1_8.sp.server.internal.wasm_gc_teavm; import java.io.PrintStream; @@ -13,27 +29,13 @@ import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacketFFProcessKeepAlive; import net.lax1dude.eaglercraft.v1_8.sp.server.EaglerIntegratedServerWorker; import net.lax1dude.eaglercraft.v1_8.sp.server.internal.ServerPlatformSingleplayer; -/** - * 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 WorkerMain { public static void _main() { PrintStream systemOut = System.out; PrintStream systemErr = System.err; try { + PlatformRuntime.setThreadName("IntegratedServer"); systemOut.println("WorkerMain: [INFO] eaglercraftx worker thread is starting..."); JSObject startArgs = getEaglerXOpts(); systemOut.println("WorkerMain: [INFO] reading configuration"); @@ -41,7 +43,6 @@ public class WorkerMain { systemOut.println("WorkerMain: [INFO] initializing server runtime"); ServerPlatformSingleplayer.initializeContext(); systemOut.println("WorkerMain: [INFO] starting worker thread"); - PlatformRuntime.setThreadName("IntegratedServer"); EaglerIntegratedServerWorker.serverMain(); }catch(Throwable t) { System.setOut(systemOut); @@ -58,4 +59,4 @@ public class WorkerMain { @Import(module = "platformRuntime", name = "getEaglercraftXOpts") private static native JSObject getEaglerXOpts(); -} +} \ No newline at end of file diff --git a/src/wasm-gc-teavm/js/clientPlatformSingleplayer.js b/src/wasm-gc-teavm/js/clientPlatformSingleplayer.js index 4bc8ae9..b81d329 100755 --- a/src/wasm-gc-teavm/js/clientPlatformSingleplayer.js +++ b/src/wasm-gc-teavm/js/clientPlatformSingleplayer.js @@ -140,7 +140,7 @@ function initializeClientPlatfSP(spImports) { workerObj.postMessage({ "ch": channel, "dat": copiedArray.buffer - }); + }, [copiedArray.buffer]); } }; @@ -153,7 +153,7 @@ function initializeClientPlatfSP(spImports) { workerObj.postMessage({ "ch": channel, "dat": arr - }); + }, [arr]); } }; diff --git a/src/wasm-gc-teavm/js/platformNetworking.js b/src/wasm-gc-teavm/js/platformNetworking.js index f40ecb7..7648c54 100755 --- a/src/wasm-gc-teavm/js/platformNetworking.js +++ b/src/wasm-gc-teavm/js/platformNetworking.js @@ -270,8 +270,29 @@ const platfNetworkingName = "platformNetworking"; this["_frameCountBin"] = 0; } + /** + * @param {boolean} enable + */ + function setEnableStringFramesImpl(enable) { + this["_enableStringFrames"] = enable; + } + + /** + * @param {boolean} enable + */ + function setEnableBinaryFramesImpl(enable) { + this["_enableBinaryFrames"] = enable; + } + function addRecievedFrameImpl(dat) { const isStr = (typeof dat === "string"); + if(isStr) { + if(!this["_enableStringFrames"]) + return; + }else { + if(!this["_enableBinaryFrames"]) + return; + } const itm = { "type": (isStr ? 0 : 1), "data": dat, @@ -322,6 +343,8 @@ const platfNetworkingName = "platformNetworking"; "_frameCountStr": 0, "_frameCountBin": 0, "_addRecievedFrame": addRecievedFrameImpl, + "_enableStringFrames": true, + "_enableBinaryFrames": true, "closeSocket": closeSocketImpl, "sendStringFrame": sendStringFrameImpl, "sendBinaryFrame": sendBinaryFrameImpl, @@ -336,7 +359,9 @@ const platfNetworkingName = "platformNetworking"; "availableBinaryFrames": availableBinaryFramesImpl, "getNextBinaryFrame": getNextBinaryFrameImpl, "getAllBinaryFrames": getAllBinaryFramesImpl, - "clearBinaryFrames": clearBinaryFramesImpl + "clearBinaryFrames": clearBinaryFramesImpl, + "setEnableStringFrames": setEnableStringFramesImpl, + "setEnableBinaryFrames": setEnableBinaryFramesImpl }; sock.addEventListener("open", function(evt) { diff --git a/src/wasm-gc-teavm/js/serverPlatformSingleplayer.js b/src/wasm-gc-teavm/js/serverPlatformSingleplayer.js index 6f7fb95..b10ce74 100755 --- a/src/wasm-gc-teavm/js/serverPlatformSingleplayer.js +++ b/src/wasm-gc-teavm/js/serverPlatformSingleplayer.js @@ -65,7 +65,7 @@ function initializeServerPlatfSP(spImports) { postMessage({ "ch": channel, "dat": copiedArray.buffer - }); + }, [copiedArray.buffer]); }; spImports["getAvailablePackets"] = serverMessageQueue.getLength.bind(serverMessageQueue); diff --git a/wasm_gc_teavm/build.gradle b/wasm_gc_teavm/build.gradle index ded028b..3bc1189 100755 --- a/wasm_gc_teavm/build.gradle +++ b/wasm_gc_teavm/build.gradle @@ -38,6 +38,7 @@ def folder = "javascript" def name = "classes.wasm" teavm.wasmGC { + compileJava.options.encoding = "UTF-8" targetFileName = "../" + name optimization = OptimizationLevel.AGGRESSIVE outOfProcess = false @@ -51,6 +52,6 @@ teavm.wasmGC { debugInfoLevel = WasmDebugInfoLevel.DEOBFUSCATION; directMallocSupport = true minHeapSize = 32 - maxHeapSize = 384 + maxHeapSize = 512 disassembly = true } diff --git a/wasm_gc_teavm/javascript/epw_meta.txt b/wasm_gc_teavm/javascript/epw_meta.txt index 8320dba..394aa5b 100755 --- a/wasm_gc_teavm/javascript/epw_meta.txt +++ b/wasm_gc_teavm/javascript/epw_meta.txt @@ -1,8 +1,8 @@ -client-version-integer=49 +client-version-integer=50 client-package-name=net.lax1dude.eaglercraft.v1_8.client client-origin-name=EaglercraftX -client-origin-version=u49 +client-origin-version=u50 client-origin-vendor=lax1dude client-fork-name=EaglercraftX -client-fork-version=u49 +client-fork-version=u50 client-fork-vendor=lax1dude diff --git a/wasm_gc_teavm/javascript_dist/bootstrap.js b/wasm_gc_teavm/javascript_dist/bootstrap.js index 1c94eac..ee532c5 100755 --- a/wasm_gc_teavm/javascript_dist/bootstrap.js +++ b/wasm_gc_teavm/javascript_dist/bootstrap.js @@ -1,13 +1,13 @@ -(function(){'use strict';function g(a){console.log("LoaderBootstrap: [INFO] "+a)}function n(a){console.log("LoaderBootstrap: [WARN] "+a)}function q(a){console.error("LoaderBootstrap: [ERROR] "+a)}var r=null; -function u(){const a=[];for(var c=0;64>c;++c)a["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(c)]=c;a[45]=62;a[95]=63;return function(b,d){var e=b.length-d;if(0>16&255,f[h++]=d>>8&255,f[h++]=d&255;2===e?(d=a[b.charCodeAt(k)]<<2|a[b.charCodeAt(k+1)]>>4,f[h++]=d&255):1===e&&(d=a[b.charCodeAt(k)]<<10|a[b.charCodeAt(k+1)]<<4|a[b.charCodeAt(k+2)]>>2,f[h++]=d>>8&255,f[h++]=d&255);return f.buffer}}function v(){return new Promise(function(a){setTimeout(a,20)})} -function w(a){return new Promise(function(c){const b=new Image;b.addEventListener("load",c);b.addEventListener("error",function(){n("Failed to preload image: "+a);c()});b.src=a;setTimeout(c,50)})}function x(a){return new Promise(function(c){fetch(a,{cache:"force-cache"}).then(function(b){return b.arrayBuffer()}).then(c).catch(function(b){q("Failed to fetch URL! "+b);c(null)})})} -function y(a){return a.startsWith("data:application/octet-stream;base64,")?new Promise(function(c){x(a).then(function(b){if(b)c(b);else{n("Failed to decode base64 via fetch, doing it the slow way instead...");try{r||=u();var d=r(a,37);c(d)}catch(e){q("Failed to decode base64! "+e),c(null)}}})}):x(a)} -function z(a,c){const b=document.createElement("h2");b.style.color="#AA0000";b.style.padding="25px";b.style.fontFamily="sans-serif";b.style.marginBlock="0px";b.appendChild(document.createTextNode(c));a.appendChild(b);c=document.createElement("h4");c.style.color="#AA0000";c.style.padding="25px";c.style.fontFamily="sans-serif";c.style.marginBlock="0px";c.appendChild(document.createTextNode("Try again later"));a.style.backgroundColor="white";a.appendChild(c)} -window.main=async function(){if("undefined"===typeof window.eaglercraftXOpts)q("window.eaglercraftXOpts is not defined!"),alert("window.eaglercraftXOpts is not defined!");else{var a=window.eaglercraftXOpts.container;if("string"!==typeof a)q("window.eaglercraftXOpts.container is not a string!"),alert("window.eaglercraftXOpts.container is not a string!");else{var c=window.eaglercraftXOpts.assetsURI;if("string"!==typeof c)if("object"===typeof c&&"object"===typeof c[0]&&"string"===typeof c[0].url)c=c[0].url; -else{q("window.eaglercraftXOpts.assetsURI is not a string!");alert("window.eaglercraftXOpts.assetsURI is not a string!");return}var b=document.getElementById(a);if(b){for(;a=b.lastChild;)b.removeChild(a);a=document.createElement("div");a.style.width="100%";a.style.height="100%";a.style.setProperty("image-rendering","pixelated");a.style.background='center / contain no-repeat url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAAAAAB3tzPbAAAACXBIWXMAAC4jAAAuIwF4pT92AAAG+UlEQVR42u2cy23jOhRATwbTwGwFvAJoF6BFGjColcGkASNuIPA6C68DN+BADZiCVxLSQBYqIGYBAbSdEvwWkvUzZWfymwlwCQwQUZeXPOT9URPkYs/3bj8QAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAH4x9vPvzFpAhAzM98UILmqfjDf1YT0N/cBk+71v+wDSczHmDeJ6TqO+SIfyD7IvC9g33Yc7dP6CQDxB+q62Hc2xnyJD2Sf5vuzL3Hi5MM0WbCN51u/Y/30ryEGmDVHlhwsY9Y7xlq0CuzVc4lh2n7NkGsnQ1nB7IefmrY/araJcbrq6Ryk9YqW4l3J/dHww1jdej+8kte042EW0Nba1hyWdl+9irq/FNXaD6BbQoexuvf+tQC2vX1+AFvP0kxiuyidfWwEbOtQtK0n0r6xbYCKsLcM21+pLZX3u4984Kq2xlnWDimllRudAXEpkGSHfqMzsmxfWnLWNf9aQznW4wMZWOMJxvGs/Ff5X+yPcD0g3dqZesdsI2f7Z2/73W2JSok9Gqu7P1q/I2qtj0qn/ZkTaCPWO2a0VyjrxY7sNUG1LxRlaE90MpDpGVeAxpaGobN2XPWH0aQVE1stfXPAj0+XzUmcob3aTRdVZ2+tRv+gMNBDaTkZ4k6uhtYPaK7iUkUcx9lgij92gZ6aXmxoDeK8D1hPfm18oBvTfPGwXoVG+4VfXcwl8dEOtCJS7De9M0VTqTA2p081O3kJ+uk5cU/RVN8C262Ms9HMlLHSmhNFTcc9u1uQRX4jMhqyNIk1GRk69a6hb0IDZ3pITnbfNqFuJWE9gbYrfmSqen/SiKy27G0VS20VWc+UEn59/YDPkc+0EunrAXQ/JXucYL+3VutyAqvP5wFvtEoyQPsMJMpKc3v7/Su9ALLkhAJDPCObGTDmonfNHAij3sg5866fmTHGnFt/crroh6vEv/Rq6vhEoP7hWWb2ylSQZP5zOVrDqVxSZnm/xL6OFnZwF3/4JoyGjyXu1X3n0rEFyE5Jzc5KEDfT7s2ZYs52s5e1HU88hB17nKTqAroXWPpXiHbN7R3Q8fVDbjzU6vb8hUbX67FWN8Xo4U5SIWjbukr1knY9XrcwS30aOuTatqa0vkA6cI05dyPrzWBbj7ZZrPUT2O7pdpKFtp4rph0E0AxtfN0u9kNVg25d4BPiDF0+R83dPol7/l4m4yQmQzdX+ISewqTnc8ngp94yaCan4vT+Hc228q8/T35+e8+XueSqCaPmEz9ofdbX6eSqE5iN/m4A8Qd9w/1bAEl2fPmafT3Axdv/ytlFeXUwTZyyf+NA3hWDGPrm+HXtHSdQ7nrz7fvv+MPFe/9Q3nAS+iYA3zcKCYAACIAACIAACIAACIAACIAACIAA1C2Komh++r9cogdv90M0+GoZAVHkSiGSaFmOmJdTRdESiKJ5Je4eovnSldoGNJ44gTBNbx+XH7tDYxwOniAPgEdygGWxTm/jBCAHV0u7xa90PV64IW0uOWdCapK7t600vfF2j4Ad5FCE4IopCSWMSg0Q4NgRVNKrwIBJ1ZDGxXO/5+fxhDvFQ87EsHxZMy9Sli/raMbjf9eqMpiciQG3yYOJwW1eQoBoesNBzG3yKdvqNwie1HMwiXFcwo7L7aMBtlSrC7c79RzyUm5w0f66Gk1vcJs8vFYHxUvy/u8leJz4N8t8vX5ccl04Chz5BOLR+mVVWXX5lsU4ncSOFevL7WFsJbYiPfQpcvJwhNsBxKiwcHDPNnoojzp8Jh8PnusiSMcLd1B8R5i+Igq5/BZKU3IEO8cIpoqw6L5NR8kjuOIaFR6GlmKdvmnhuFTsfqNwTBnzBOo+ZFua+jh3jAZtnksMu/b850wIfh1sVwVPhMEzKK9lz/+7Hi3Kx8CjOajVbVCEz3kIT1wyYnsD6s5t8tUaGLFpTfC7q2TH4rjzHMCoGgqTOJiMFi/TY5kduOJWHfzdtzdFrS4PYBwzhi0LAKcAdTcvKhur+VWQ3/TWcq/+LJG5VahUsILHUDGiGCmKy26cOrxlxwZUsMHlvVDW7lMQwghGOGZpmt6zcdFD47EhtQVyWySQRHUgVDzhmkeClyZFlGmiA5BH0WpyB+twPp/cgQpQBH0Lqt6qaTwfs+OW6Kl/RrdET/WqQi5BgWLDqNxmdV/Mo1X1QX5Ms0Pq/jmaP7d2/b6IVq3HW+a9qT7v6/TDNv2+tVA0hzz8klroc07AbXKmN98YQMppARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARCAD2//A2iD9ZsgY5XpAAAAAElFTkSuQmCC") white'; -b.appendChild(a);await v();c.startsWith("data:")?(g('Downloading EPW file ""...'),c=await y(c)):(g('Downloading EPW file "'+c+'"...'),c=await x(c));var d=!1;c?384>c.byteLength&&(q("The EPW file is too short"),d=!0):d=!0;if(d)b.removeChild(a),z(b,"Failed to download EPW file!"),q("Failed to download EPW file!");else{var e=new DataView(c);if(608649541!==e.getUint32(0,!0)||1297301847!==e.getUint32(4,!0))q("The file is not an EPW file"),d=!0;var f=c.byteLength;e.getUint32(8, -!0)!==f&&(q("The EPW file is the wrong length"),d=!0);if(d)b.removeChild(a),z(b,"EPW file is invalid!"),q("EPW file is invalid!");else{var l=new TextDecoder("utf-8"),h=e.getUint32(100,!0),k=e.getUint32(104,!0),m=e.getUint32(108,!0),p=e.getUint32(112,!0);if(0>h||h+k>f||0>m||m+p>f)q("The EPW file contains an invalid offset (component: splash)"),d=!0;if(d)b.removeChild(a),z(b,"EPW file is invalid!"),q("EPW file is invalid!");else{h=new Uint8Array(c,h,k);m=new Uint8Array(c,m,p);l=URL.createObjectURL(new Blob([h], -{type:l.decode(m)}));await w(l);g("Loaded splash img: "+l);a.style.background='center / contain no-repeat url("'+l+'"), 0px 0px / 1000000% 1000000% no-repeat url("'+l+'") white';await v();p=e.getUint32(164,!0);h=e.getUint32(168,!0);m=e.getUint32(180,!0);e=e.getUint32(184,!0);if(0>p||p+h>f||0>m||m+e>f)q("The EPW file contains an invalid offset (component: loader)"),d=!0;if(d)b.removeChild(a),z(b,"EPW file is invalid!"),q("EPW file is invalid!");else{a=new Uint8Array(c,p,h);a=URL.createObjectURL(new Blob([a], -{type:"text/javascript;charset=utf-8"}));g("Loaded loader.js: "+l);d=new Uint8Array(c,m,e);d=URL.createObjectURL(new Blob([d],{type:"application/wasm"}));g("Loaded loader.wasm: "+d);f={};for(const [t,A]of Object.entries(window.eaglercraftXOpts))"container"!==t&&"assetsURI"!==t&&(f[t]=A);window.__eaglercraftXLoaderContextPre={rootElement:b,eaglercraftXOpts:f,theEPWFileBuffer:c,loaderWASMURL:d,splashURL:l};g("Appending loader.js to document...");b=document.createElement("script");b.type="text/javascript"; -b.src=a;document.head.appendChild(b)}}}}}else b='window.eaglercraftXOpts.container "'+a+'" is not a known element id!',q(b),alert(b)}}};}).call(this); +(function(){'use strict';function g(a){console.log("LoaderBootstrap: [INFO] "+a)}function n(a){console.log("LoaderBootstrap: [WARN] "+a)}function q(a){console.error("LoaderBootstrap: [ERROR] "+a)}var r=null; +function u(){const a=[];for(var c=0;64>c;++c)a["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(c)]=c;a[45]=62;a[95]=63;return function(b,d){var e=b.length-d;if(0>16&255,f[h++]=d>>8&255,f[h++]=d&255;2===e?(d=a[b.charCodeAt(k)]<<2|a[b.charCodeAt(k+1)]>>4,f[h++]=d&255):1===e&&(d=a[b.charCodeAt(k)]<<10|a[b.charCodeAt(k+1)]<<4|a[b.charCodeAt(k+2)]>>2,f[h++]=d>>8&255,f[h++]=d&255);return f.buffer}}function v(){return new Promise(function(a){setTimeout(a,20)})} +function w(a){return new Promise(function(c){const b=new Image;b.addEventListener("load",c);b.addEventListener("error",function(){n("Failed to preload image: "+a);c()});b.src=a;setTimeout(c,50)})}function x(a){return new Promise(function(c){fetch(a,{cache:"force-cache"}).then(function(b){return b.arrayBuffer()}).then(c).catch(function(b){q("Failed to fetch URL! "+b);c(null)})})} +function y(a){return a.startsWith("data:application/octet-stream;base64,")?new Promise(function(c){x(a).then(function(b){if(b)c(b);else{n("Failed to decode base64 via fetch, doing it the slow way instead...");try{r||=u();var d=r(a,37);c(d)}catch(e){q("Failed to decode base64! "+e),c(null)}}})}):x(a)} +function z(a,c){const b=document.createElement("h2");b.style.color="#AA0000";b.style.padding="25px";b.style.fontFamily="sans-serif";b.style.marginBlock="0px";b.appendChild(document.createTextNode(c));a.appendChild(b);c=document.createElement("h4");c.style.color="#AA0000";c.style.padding="25px";c.style.fontFamily="sans-serif";c.style.marginBlock="0px";c.appendChild(document.createTextNode("Try again later"));a.style.backgroundColor="white";a.appendChild(c)} +window.main=async function(){if("undefined"===typeof window.eaglercraftXOpts)q("window.eaglercraftXOpts is not defined!"),alert("window.eaglercraftXOpts is not defined!");else{var a=window.eaglercraftXOpts.container;if("string"!==typeof a)q("window.eaglercraftXOpts.container is not a string!"),alert("window.eaglercraftXOpts.container is not a string!");else{var c=window.eaglercraftXOpts.assetsURI;if("string"!==typeof c)if("object"===typeof c&&"object"===typeof c[0]&&"string"===typeof c[0].url)c=c[0].url; +else{q("window.eaglercraftXOpts.assetsURI is not a string!");alert("window.eaglercraftXOpts.assetsURI is not a string!");return}c.startsWith("data:")&&delete window.eaglercraftXOpts.assetsURI;var b=document.getElementById(a);if(b){for(;a=b.lastChild;)b.removeChild(a);a=document.createElement("div");a.style.width="100%";a.style.height="100%";a.style.setProperty("image-rendering","pixelated");a.style.background='center / contain no-repeat url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAAAAAB3tzPbAAAACXBIWXMAAC4jAAAuIwF4pT92AAAG+UlEQVR42u2cy23jOhRATwbTwGwFvAJoF6BFGjColcGkASNuIPA6C68DN+BADZiCVxLSQBYqIGYBAbSdEvwWkvUzZWfymwlwCQwQUZeXPOT9URPkYs/3bj8QAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAEQAAH4x9vPvzFpAhAzM98UILmqfjDf1YT0N/cBk+71v+wDSczHmDeJ6TqO+SIfyD7IvC9g33Yc7dP6CQDxB+q62Hc2xnyJD2Sf5vuzL3Hi5MM0WbCN51u/Y/30ryEGmDVHlhwsY9Y7xlq0CuzVc4lh2n7NkGsnQ1nB7IefmrY/araJcbrq6Ryk9YqW4l3J/dHww1jdej+8kte042EW0Nba1hyWdl+9irq/FNXaD6BbQoexuvf+tQC2vX1+AFvP0kxiuyidfWwEbOtQtK0n0r6xbYCKsLcM21+pLZX3u4984Kq2xlnWDimllRudAXEpkGSHfqMzsmxfWnLWNf9aQznW4wMZWOMJxvGs/Ff5X+yPcD0g3dqZesdsI2f7Z2/73W2JSok9Gqu7P1q/I2qtj0qn/ZkTaCPWO2a0VyjrxY7sNUG1LxRlaE90MpDpGVeAxpaGobN2XPWH0aQVE1stfXPAj0+XzUmcob3aTRdVZ2+tRv+gMNBDaTkZ4k6uhtYPaK7iUkUcx9lgij92gZ6aXmxoDeK8D1hPfm18oBvTfPGwXoVG+4VfXcwl8dEOtCJS7De9M0VTqTA2p081O3kJ+uk5cU/RVN8C262Ms9HMlLHSmhNFTcc9u1uQRX4jMhqyNIk1GRk69a6hb0IDZ3pITnbfNqFuJWE9gbYrfmSqen/SiKy27G0VS20VWc+UEn59/YDPkc+0EunrAXQ/JXucYL+3VutyAqvP5wFvtEoyQPsMJMpKc3v7/Su9ALLkhAJDPCObGTDmonfNHAij3sg5866fmTHGnFt/crroh6vEv/Rq6vhEoP7hWWb2ylSQZP5zOVrDqVxSZnm/xL6OFnZwF3/4JoyGjyXu1X3n0rEFyE5Jzc5KEDfT7s2ZYs52s5e1HU88hB17nKTqAroXWPpXiHbN7R3Q8fVDbjzU6vb8hUbX67FWN8Xo4U5SIWjbukr1knY9XrcwS30aOuTatqa0vkA6cI05dyPrzWBbj7ZZrPUT2O7pdpKFtp4rph0E0AxtfN0u9kNVg25d4BPiDF0+R83dPol7/l4m4yQmQzdX+ISewqTnc8ngp94yaCan4vT+Hc228q8/T35+e8+XueSqCaPmEz9ofdbX6eSqE5iN/m4A8Qd9w/1bAEl2fPmafT3Axdv/ytlFeXUwTZyyf+NA3hWDGPrm+HXtHSdQ7nrz7fvv+MPFe/9Q3nAS+iYA3zcKCYAACIAACIAACIAACIAACIAACIAA1C2Komh++r9cogdv90M0+GoZAVHkSiGSaFmOmJdTRdESiKJ5Je4eovnSldoGNJ44gTBNbx+XH7tDYxwOniAPgEdygGWxTm/jBCAHV0u7xa90PV64IW0uOWdCapK7t600vfF2j4Ad5FCE4IopCSWMSg0Q4NgRVNKrwIBJ1ZDGxXO/5+fxhDvFQ87EsHxZMy9Sli/raMbjf9eqMpiciQG3yYOJwW1eQoBoesNBzG3yKdvqNwie1HMwiXFcwo7L7aMBtlSrC7c79RzyUm5w0f66Gk1vcJs8vFYHxUvy/u8leJz4N8t8vX5ccl04Chz5BOLR+mVVWXX5lsU4ncSOFevL7WFsJbYiPfQpcvJwhNsBxKiwcHDPNnoojzp8Jh8PnusiSMcLd1B8R5i+Igq5/BZKU3IEO8cIpoqw6L5NR8kjuOIaFR6GlmKdvmnhuFTsfqNwTBnzBOo+ZFua+jh3jAZtnksMu/b850wIfh1sVwVPhMEzKK9lz/+7Hi3Kx8CjOajVbVCEz3kIT1wyYnsD6s5t8tUaGLFpTfC7q2TH4rjzHMCoGgqTOJiMFi/TY5kduOJWHfzdtzdFrS4PYBwzhi0LAKcAdTcvKhur+VWQ3/TWcq/+LJG5VahUsILHUDGiGCmKy26cOrxlxwZUsMHlvVDW7lMQwghGOGZpmt6zcdFD47EhtQVyWySQRHUgVDzhmkeClyZFlGmiA5BH0WpyB+twPp/cgQpQBH0Lqt6qaTwfs+OW6Kl/RrdET/WqQi5BgWLDqNxmdV/Mo1X1QX5Ms0Pq/jmaP7d2/b6IVq3HW+a9qT7v6/TDNv2+tVA0hzz8klroc07AbXKmN98YQMppARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARAAARCAD2//A2iD9ZsgY5XpAAAAAElFTkSuQmCC") white'; +b.appendChild(a);await v();c.startsWith("data:")?(g('Downloading EPW file ""...'),c=await y(c)):(g('Downloading EPW file "'+c+'"...'),c=await x(c));var d=!1;c?384>c.byteLength&&(q("The EPW file is too short"),d=!0):d=!0;if(d)b.removeChild(a),z(b,"Failed to download EPW file!"),q("Failed to download EPW file!");else{var e=new DataView(c);if(608649541!==e.getUint32(0,!0)||1297301847!==e.getUint32(4,!0))q("The file is not an EPW file"),d=!0;var f=c.byteLength;e.getUint32(8, +!0)!==f&&(q("The EPW file is the wrong length"),d=!0);if(d)b.removeChild(a),z(b,"EPW file is invalid!"),q("EPW file is invalid!");else{var l=new TextDecoder("utf-8"),h=e.getUint32(100,!0),k=e.getUint32(104,!0),m=e.getUint32(108,!0),p=e.getUint32(112,!0);if(0>h||h+k>f||0>m||m+p>f)q("The EPW file contains an invalid offset (component: splash)"),d=!0;if(d)b.removeChild(a),z(b,"EPW file is invalid!"),q("EPW file is invalid!");else{h=new Uint8Array(c,h,k);m=new Uint8Array(c,m,p);l=URL.createObjectURL(new Blob([h], +{type:l.decode(m)}));await w(l);g("Loaded splash img: "+l);a.style.background='center / contain no-repeat url("'+l+'"), 0px 0px / 1000000% 1000000% no-repeat url("'+l+'") white';await v();p=e.getUint32(164,!0);h=e.getUint32(168,!0);m=e.getUint32(180,!0);e=e.getUint32(184,!0);if(0>p||p+h>f||0>m||m+e>f)q("The EPW file contains an invalid offset (component: loader)"),d=!0;if(d)b.removeChild(a),z(b,"EPW file is invalid!"),q("EPW file is invalid!");else{a=new Uint8Array(c,p,h);a=URL.createObjectURL(new Blob([a], +{type:"text/javascript;charset=utf-8"}));g("Loaded loader.js: "+l);d=new Uint8Array(c,m,e);d=URL.createObjectURL(new Blob([d],{type:"application/wasm"}));g("Loaded loader.wasm: "+d);f={};for(const [t,A]of Object.entries(window.eaglercraftXOpts))"container"!==t&&"assetsURI"!==t&&(f[t]=A);window.__eaglercraftXLoaderContextPre={rootElement:b,eaglercraftXOpts:f,theEPWFileBuffer:c,loaderWASMURL:d,splashURL:l};g("Appending loader.js to document...");b=document.createElement("script");b.type="text/javascript"; +b.src=a;document.head.appendChild(b)}}}}}else b='window.eaglercraftXOpts.container "'+a+'" is not a known element id!',q(b),alert(b)}}};}).call(this);