Commit 44a45235b08f1558277c3b1ca6c3e621bf6a9906
1 parent
9eca984c
Initial work to switch implemention to mixins
Showing
65 changed files
with
2108 additions
and
924 deletions
.gitignore
... | ... | @@ -2,7 +2,6 @@ |
2 | 2 | ######### |
3 | 3 | MANIFEST.MF |
4 | 4 | dependency-reduced-pom.xml |
5 | -.checkstyle | |
6 | 5 | |
7 | 6 | # Compiled # |
8 | 7 | ############ |
... | ... | @@ -19,7 +18,6 @@ target |
19 | 18 | *.exe |
20 | 19 | *.o |
21 | 20 | *.so |
22 | -*.launch | |
23 | 21 | |
24 | 22 | # Databases # |
25 | 23 | ############# |
... | ... | @@ -55,9 +53,12 @@ target |
55 | 53 | .DS_Store |
56 | 54 | ehthumbs.db |
57 | 55 | Thumbs.db |
56 | +*.bat | |
57 | +*.sh | |
58 | 58 | |
59 | 59 | # Project # |
60 | 60 | ########### |
61 | +.checkstyle | |
61 | 62 | .classpath |
62 | 63 | .externalToolBuilders |
63 | 64 | .gradle |
... | ... | @@ -73,4 +74,5 @@ nb-configuration.xml |
73 | 74 | *.iml |
74 | 75 | *.ipr |
75 | 76 | *.iws |
77 | +*.launch | |
76 | 78 | ... | ... |
build.gradle
... | ... | @@ -15,6 +15,7 @@ buildscript { |
15 | 15 | dependencies { |
16 | 16 | classpath 'net.minecraftforge.gradle:ForgeGradle:2.0-SNAPSHOT' |
17 | 17 | classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.0' |
18 | + classpath 'org.spongepowered:mixingradle:0.1-SNAPSHOT' | |
18 | 19 | } |
19 | 20 | } |
20 | 21 | |
... | ... | @@ -22,10 +23,15 @@ apply plugin: 'net.minecraftforge.gradle.tweaker-client' |
22 | 23 | apply plugin: 'checkstyle' |
23 | 24 | apply plugin: 'maven' |
24 | 25 | apply plugin: 'com.github.johnrengelman.shadow' |
26 | +apply plugin: 'org.spongepowered.mixin' | |
27 | + | |
28 | +// Default tasks | |
29 | +defaultTasks 'build' | |
25 | 30 | |
26 | 31 | ext { |
27 | 32 | // Artefact details |
28 | 33 | buildNumber = project.hasProperty("buildNumber") ? buildNumber : '0' |
34 | + buildVersion = project.hasProperty("buildVersion") ? buildVersion : '0.0' | |
29 | 35 | ciSystem = project.hasProperty("ciSystem") ? ciSystem : 'unknown' |
30 | 36 | commit = project.hasProperty("commit") ? commit : 'unknown' |
31 | 37 | classifier = project.hasProperty("buildType") ? buildType : 'SNAPSHOT' |
... | ... | @@ -39,9 +45,6 @@ ext { |
39 | 45 | |
40 | 46 | startClass = 'com.mumfrey.liteloader.debug.Start' |
41 | 47 | tweakClass = 'com.mumfrey.liteloader.launch.LiteLoaderTweaker' |
42 | - | |
43 | - mixinSrg = new File(project.buildDir, 'tmp/mixins.liteloader/mixins.srg') | |
44 | - mixinRefMap = new File(project.buildDir, "tmp/mixins.liteloader/mixins.liteloader.refmap.json") | |
45 | 48 | } |
46 | 49 | |
47 | 50 | // Basic project information |
... | ... | @@ -61,7 +64,7 @@ repositories { |
61 | 64 | } |
62 | 65 | |
63 | 66 | dependencies { |
64 | - compile('org.spongepowered:mixin:0.4.7-SNAPSHOT') { | |
67 | + compile('org.spongepowered:mixin:0.4.10-SNAPSHOT') { | |
65 | 68 | exclude module: 'launchwrapper' |
66 | 69 | exclude module: 'guava' |
67 | 70 | } |
... | ... | @@ -75,20 +78,28 @@ minecraft { |
75 | 78 | } |
76 | 79 | |
77 | 80 | sourceSets { |
81 | + main { | |
82 | + refMap = "mixins.liteloader.core.refmap.json" | |
83 | + } | |
78 | 84 | client { |
79 | 85 | compileClasspath += main.compileClasspath + main.output |
86 | + refMap = "mixins.liteloader.client.refmap.json" | |
80 | 87 | } |
81 | 88 | debug { |
82 | 89 | compileClasspath += client.compileClasspath + client.output |
83 | 90 | } |
84 | 91 | } |
85 | 92 | |
93 | +mixin { | |
94 | + defaultObfuscationEnv notch | |
95 | +} | |
96 | + | |
86 | 97 | checkstyle { |
87 | 98 | configProperties = [ |
88 | - "name" : project.name, | |
89 | - "organization": project.organization, | |
90 | - "url" : project.url, | |
91 | - "year" : project.inceptionYear | |
99 | + "name" : project.name, | |
100 | + "organization": project.organization, | |
101 | + "url" : project.url, | |
102 | + "year" : project.inceptionYear | |
92 | 103 | ] |
93 | 104 | configFile = file("checkstyle.xml") |
94 | 105 | toolVersion = '6.13' |
... | ... | @@ -99,8 +110,19 @@ javadoc { |
99 | 110 | source sourceSets.debug.allJava |
100 | 111 | } |
101 | 112 | |
102 | -// hacks for run configs | |
103 | 113 | afterEvaluate { |
114 | + logger.lifecycle '=================================================' | |
115 | + logger.lifecycle ' LiteLoader' | |
116 | + logger.lifecycle ' Copyright (C) 2011-2015 Adam Mummery-Smith' | |
117 | + logger.lifecycle ' Running in {} mode', (project.isReleaseBuild ? "RELEASE" : "SNAPSHOT") | |
118 | + logger.lifecycle '=================================================' | |
119 | + | |
120 | + makeEclipseCleanRunClient { | |
121 | + arguments = "" | |
122 | + jvmArguments = "-Dliteloader.debug=true -Dmixin.debug.verbose=true -Dmixin.debug.verify=true" | |
123 | + } | |
124 | + | |
125 | + // hacks for run configs | |
104 | 126 | def mc = plugins.getPlugin 'net.minecraftforge.gradle.tweaker-client' |
105 | 127 | mc.replacer.putReplacement '{RUN_CLIENT_MAIN}', project.startClass |
106 | 128 | mc.replacer.putReplacement '{RUN_CLIENT_TWEAKER}', minecraft.tweakClass |
... | ... | @@ -118,6 +140,14 @@ def jarManifest = { |
118 | 140 | } |
119 | 141 | |
120 | 142 | jar { |
143 | + doFirst { | |
144 | + // Seriously forge? | |
145 | + ant.replace( | |
146 | + file: sourceSets.main.refMapFile, | |
147 | + token: "func_72355_a(Lnet/minecraft/network/NetworkManager;Lnet/minecraft/entity/player/EntityPlayerMP;)V", | |
148 | + value: "initializeConnectionToPlayer(Lnet/minecraft/network/NetworkManager;Lnet/minecraft/entity/player/EntityPlayerMP;Lnet/minecraft/network/NetHandlerPlayServer;)V" | |
149 | + ) | |
150 | + } | |
121 | 151 | from sourceSets.client.output |
122 | 152 | from sourceSets.debug.output |
123 | 153 | manifest jarManifest |
... | ... | @@ -126,7 +156,6 @@ jar { |
126 | 156 | task releaseJar(type: Jar) { |
127 | 157 | from sourceSets.main.output |
128 | 158 | from sourceSets.client.output |
129 | - from project.mixinRefMap | |
130 | 159 | |
131 | 160 | manifest jarManifest |
132 | 161 | classifier = 'staging' |
... | ... | @@ -138,7 +167,6 @@ shadowJar { |
138 | 167 | |
139 | 168 | from sourceSets.main.output |
140 | 169 | from sourceSets.client.output |
141 | - from project.mixinRefMap | |
142 | 170 | |
143 | 171 | exclude 'META-INF/*.DSA' |
144 | 172 | exclude 'META-INF/*.RSA' |
... | ... | @@ -170,10 +198,7 @@ tasks.withType(JavaCompile) { |
170 | 198 | '-Xlint:all', |
171 | 199 | '-Xlint:-path', |
172 | 200 | '-Xlint:-rawtypes', |
173 | - '-Xlint:-processing', | |
174 | - "-AoutSrgFile=${project.mixinSrg.canonicalPath}", | |
175 | - "-AoutRefMapFile=${project.mixinRefMap.canonicalPath}", | |
176 | - "-AreobfSrgFile=${genSrgs.mcpToNotch.canonicalPath}" | |
201 | + '-Xlint:-processing' | |
177 | 202 | ] |
178 | 203 | options.deprecation = true |
179 | 204 | options.encoding = 'utf8' |
... | ... | @@ -188,35 +213,22 @@ if (JavaVersion.current().isJava8Compatible()) { |
188 | 213 | |
189 | 214 | reobf { |
190 | 215 | jar { |
191 | - useSrgSrg() | |
216 | + mappingType = 'SEARGE' | |
192 | 217 | } |
193 | 218 | releaseJar { |
194 | - useNotchSrg() | |
219 | + mappingType = 'NOTCH' | |
195 | 220 | classpath = sourceSets.main.compileClasspath |
196 | - extraFiles([ | |
197 | - project.mixinSrg | |
198 | - ]) | |
199 | 221 | } |
200 | 222 | shadowJar { |
201 | - useNotchSrg() | |
223 | + mappingType = 'NOTCH' | |
202 | 224 | classpath = sourceSets.main.compileClasspath |
203 | - extraFiles([ | |
204 | - project.mixinSrg | |
205 | - ]) | |
206 | 225 | } |
207 | 226 | } |
208 | 227 | |
209 | -compileJava.doFirst { | |
210 | - println '------------------------------------------------------------' | |
211 | - println 'Running ' + (project.isReleaseBuild ? "RELEASE" : "SNAPSHOT") + ' build' | |
212 | - println '------------------------------------------------------------' | |
213 | -} | |
214 | - | |
215 | 228 | build.dependsOn {[ |
216 | 229 | 'reobfReleaseJar', |
217 | 230 | 'reobfShadowJar' |
218 | - ] | |
219 | -} | |
231 | +]} | |
220 | 232 | |
221 | 233 | artifacts { |
222 | 234 | if (project.isReleaseBuild) { | ... | ... |
extra/formatter.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8" standalone="no"?> | |
2 | +<profiles version="12"> | |
3 | +<profile kind="CodeFormatterProfile" name="LiteLoader" version="12"> | |
4 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_ellipsis" value="insert"/> | |
5 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations" value="insert"/> | |
6 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration" value="insert"/> | |
7 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression" value="do not insert"/> | |
8 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration" value="insert"/> | |
9 | +<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries" value="true"/> | |
10 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters" value="insert"/> | |
11 | +<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter" value="insert"/> | |
12 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package" value="insert"/> | |
13 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant" value="do not insert"/> | |
14 | +<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_imports" value="1"/> | |
15 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while" value="do not insert"/> | |
16 | +<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/> | |
17 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration" value="do not insert"/> | |
18 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws" value="do not insert"/> | |
19 | +<setting id="org.eclipse.jdt.core.formatter.comment.format_javadoc_comments" value="false"/> | |
20 | +<setting id="org.eclipse.jdt.core.formatter.indentation.size" value="4"/> | |
21 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator" value="do not insert"/> | |
22 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments" value="insert"/> | |
23 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments" value="insert"/> | |
24 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits" value="do not insert"/> | |
25 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration" value="insert"/> | |
26 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for" value="insert"/> | |
27 | +<setting id="org.eclipse.jdt.core.formatter.disabling_tag" value="@formatter:off"/> | |
28 | +<setting id="org.eclipse.jdt.core.formatter.continuation_indentation" value="2"/> | |
29 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_enum_constants" value="0"/> | |
30 | +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_imports" value="1"/> | |
31 | +<setting id="org.eclipse.jdt.core.formatter.blank_lines_after_package" value="1"/> | |
32 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_binary_operator" value="insert"/> | |
33 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations" value="insert"/> | |
34 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant" value="16"/> | |
35 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/> | |
36 | +<setting id="org.eclipse.jdt.core.formatter.comment.indent_root_tags" value="true"/> | |
37 | +<setting id="org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch" value="true"/> | |
38 | +<setting id="org.eclipse.jdt.core.formatter.enabling_tag" value="@formatter:on"/> | |
39 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block" value="insert"/> | |
40 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return" value="insert"/> | |
41 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration" value="16"/> | |
42 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter" value="do not insert"/> | |
43 | +<setting id="org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line" value="false"/> | |
44 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field" value="insert"/> | |
45 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments" value="insert"/> | |
46 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block" value="insert"/> | |
47 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator" value="do not insert"/> | |
48 | +<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations" value="1"/> | |
49 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer" value="insert"/> | |
50 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for" value="do not insert"/> | |
51 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch" value="do not insert"/> | |
52 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments" value="do not insert"/> | |
53 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method" value="insert"/> | |
54 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch" value="do not insert"/> | |
55 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration" value="insert"/> | |
56 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression" value="do not insert"/> | |
57 | +<setting id="org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column" value="true"/> | |
58 | +<setting id="org.eclipse.jdt.core.compiler.problem.enumIdentifier" value="error"/> | |
59 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter" value="insert"/> | |
60 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits" value="insert"/> | |
61 | +<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_block" value="true"/> | |
62 | +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration" value="next_line"/> | |
63 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard" value="do not insert"/> | |
64 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation" value="do not insert"/> | |
65 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments" value="do not insert"/> | |
66 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch" value="insert"/> | |
67 | +<setting id="org.eclipse.jdt.core.formatter.comment.line_length" value="80"/> | |
68 | +<setting id="org.eclipse.jdt.core.formatter.use_on_off_tags" value="true"/> | |
69 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression" value="do not insert"/> | |
70 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant" value="insert"/> | |
71 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation" value="do not insert"/> | |
72 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator" value="insert"/> | |
73 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration" value="insert"/> | |
74 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for" value="do not insert"/> | |
75 | +<setting id="org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments" value="true"/> | |
76 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable" value="insert"/> | |
77 | +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_method_declaration" value="next_line"/> | |
78 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation" value="do not insert"/> | |
79 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch" value="16"/> | |
80 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for" value="insert"/> | |
81 | +<setting id="org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body" value="0"/> | |
82 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments" value="insert"/> | |
83 | +<setting id="org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line" value="false"/> | |
84 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_binary_expression" value="16"/> | |
85 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference" value="insert"/> | |
86 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer" value="do not insert"/> | |
87 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations" value="insert"/> | |
88 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation" value="do not insert"/> | |
89 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call" value="16"/> | |
90 | +<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header" value="true"/> | |
91 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces" value="insert"/> | |
92 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default" value="do not insert"/> | |
93 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional" value="insert"/> | |
94 | +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block" value="next_line"/> | |
95 | +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration" value="next_line"/> | |
96 | +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_lambda_body" value="end_of_line"/> | |
97 | +<setting id="org.eclipse.jdt.core.formatter.compact_else_if" value="true"/> | |
98 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/> | |
99 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch" value="insert"/> | |
100 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation" value="do not insert"/> | |
101 | +<setting id="org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line" value="true"/> | |
102 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration" value="16"/> | |
103 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments" value="insert"/> | |
104 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation" value="16"/> | |
105 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration" value="16"/> | |
106 | +<setting id="org.eclipse.jdt.core.compiler.problem.assertIdentifier" value="error"/> | |
107 | +<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment" value="false"/> | |
108 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement" value="insert"/> | |
109 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try" value="insert"/> | |
110 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing" value="do not insert"/> | |
111 | +<setting id="org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment" value="false"/> | |
112 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer" value="insert"/> | |
113 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_binary_operator" value="insert"/> | |
114 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_unary_operator" value="do not insert"/> | |
115 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer" value="16"/> | |
116 | +<setting id="org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column" value="true"/> | |
117 | +<setting id="org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve" value="1"/> | |
118 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case" value="insert"/> | |
119 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_ellipsis" value="do not insert"/> | |
120 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources" value="do not insert"/> | |
121 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert" value="insert"/> | |
122 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if" value="do not insert"/> | |
123 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments" value="do not insert"/> | |
124 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter" value="insert"/> | |
125 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration" value="insert"/> | |
126 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression" value="do not insert"/> | |
127 | +<setting id="org.eclipse.jdt.core.formatter.comment.format_line_comments" value="false"/> | |
128 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement" value="insert"/> | |
129 | +<setting id="org.eclipse.jdt.core.formatter.align_type_members_on_columns" value="false"/> | |
130 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_assignment" value="0"/> | |
131 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body" value="insert"/> | |
132 | +<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header" value="true"/> | |
133 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration" value="do not insert"/> | |
134 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant" value="do not insert"/> | |
135 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration" value="16"/> | |
136 | +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration" value="0"/> | |
137 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_conditional_expression" value="80"/> | |
138 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer" value="do not insert"/> | |
139 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters" value="do not insert"/> | |
140 | +<setting id="org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line" value="false"/> | |
141 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if" value="insert"/> | |
142 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type" value="insert"/> | |
143 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block" value="insert"/> | |
144 | +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration" value="next_line"/> | |
145 | +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_block_in_case" value="next_line"/> | |
146 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration" value="do not insert"/> | |
147 | +<setting id="org.eclipse.jdt.core.formatter.comment.format_header" value="false"/> | |
148 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression" value="16"/> | |
149 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation" value="do not insert"/> | |
150 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while" value="insert"/> | |
151 | +<setting id="org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode" value="enabled"/> | |
152 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch" value="do not insert"/> | |
153 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_method_declaration" value="0"/> | |
154 | +<setting id="org.eclipse.jdt.core.formatter.join_wrapped_lines" value="false"/> | |
155 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration" value="do not insert"/> | |
156 | +<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases" value="true"/> | |
157 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression" value="do not insert"/> | |
158 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized" value="do not insert"/> | |
159 | +<setting id="org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries" value="true"/> | |
160 | +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration" value="next_line"/> | |
161 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for" value="insert"/> | |
162 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_resources_in_try" value="80"/> | |
163 | +<setting id="org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations" value="true"/> | |
164 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation" value="16"/> | |
165 | +<setting id="org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column" value="false"/> | |
166 | +<setting id="org.eclipse.jdt.core.compiler.source" value="1.8"/> | |
167 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized" value="do not insert"/> | |
168 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws" value="insert"/> | |
169 | +<setting id="org.eclipse.jdt.core.formatter.tabulation.size" value="4"/> | |
170 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant" value="insert"/> | |
171 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression" value="insert"/> | |
172 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference" value="do not insert"/> | |
173 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional" value="insert"/> | |
174 | +<setting id="org.eclipse.jdt.core.formatter.comment.format_source_code" value="true"/> | |
175 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer" value="insert"/> | |
176 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try" value="do not insert"/> | |
177 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources" value="insert"/> | |
178 | +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_field" value="0"/> | |
179 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation" value="do not insert"/> | |
180 | +<setting id="org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer" value="2"/> | |
181 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard" value="do not insert"/> | |
182 | +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_method" value="1"/> | |
183 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration" value="16"/> | |
184 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration" value="16"/> | |
185 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw" value="insert"/> | |
186 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement" value="do not insert"/> | |
187 | +<setting id="org.eclipse.jdt.core.compiler.codegen.targetPlatform" value="1.8"/> | |
188 | +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_switch" value="next_line"/> | |
189 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces" value="do not insert"/> | |
190 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters" value="insert"/> | |
191 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation" value="do not insert"/> | |
192 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer" value="insert"/> | |
193 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression" value="do not insert"/> | |
194 | +<setting id="org.eclipse.jdt.core.formatter.comment.format_html" value="true"/> | |
195 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration" value="do not insert"/> | |
196 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters" value="insert"/> | |
197 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_compact_if" value="16"/> | |
198 | +<setting id="org.eclipse.jdt.core.formatter.indent_empty_lines" value="true"/> | |
199 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference" value="do not insert"/> | |
200 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_unary_operator" value="do not insert"/> | |
201 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant" value="do not insert"/> | |
202 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation" value="16"/> | |
203 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations" value="do not insert"/> | |
204 | +<setting id="org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line" value="false"/> | |
205 | +<setting id="org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch" value="true"/> | |
206 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement" value="insert"/> | |
207 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator" value="insert"/> | |
208 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration" value="do not insert"/> | |
209 | +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk" value="1"/> | |
210 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_label" value="do not insert"/> | |
211 | +<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header" value="true"/> | |
212 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression" value="do not insert"/> | |
213 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration" value="do not insert"/> | |
214 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional" value="insert"/> | |
215 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference" value="do not insert"/> | |
216 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters" value="do not insert"/> | |
217 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments" value="do not insert"/> | |
218 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast" value="do not insert"/> | |
219 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert" value="insert"/> | |
220 | +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_member_type" value="1"/> | |
221 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement" value="do not insert"/> | |
222 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference" value="do not insert"/> | |
223 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference" value="do not insert"/> | |
224 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression" value="16"/> | |
225 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer" value="do not insert"/> | |
226 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration" value="insert"/> | |
227 | +<setting id="org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases" value="true"/> | |
228 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration" value="do not insert"/> | |
229 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if" value="do not insert"/> | |
230 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon" value="do not insert"/> | |
231 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator" value="do not insert"/> | |
232 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try" value="do not insert"/> | |
233 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments" value="do not insert"/> | |
234 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast" value="do not insert"/> | |
235 | +<setting id="org.eclipse.jdt.core.formatter.comment.format_block_comments" value="false"/> | |
236 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow" value="insert"/> | |
237 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration" value="do not insert"/> | |
238 | +<setting id="org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line" value="true"/> | |
239 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration" value="insert"/> | |
240 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration" value="0"/> | |
241 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference" value="do not insert"/> | |
242 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters" value="do not insert"/> | |
243 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for" value="do not insert"/> | |
244 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws" value="insert"/> | |
245 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression" value="do not insert"/> | |
246 | +<setting id="org.eclipse.jdt.core.formatter.indent_statements_compare_to_body" value="true"/> | |
247 | +<setting id="org.eclipse.jdt.core.formatter.alignment_for_multiple_fields" value="16"/> | |
248 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments" value="insert"/> | |
249 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator" value="do not insert"/> | |
250 | +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_array_initializer" value="end_of_line"/> | |
251 | +<setting id="org.eclipse.jdt.core.formatter.wrap_before_binary_operator" value="true"/> | |
252 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration" value="insert"/> | |
253 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters" value="insert"/> | |
254 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch" value="do not insert"/> | |
255 | +<setting id="org.eclipse.jdt.core.compiler.compliance" value="1.8"/> | |
256 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference" value="do not insert"/> | |
257 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/> | |
258 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments" value="do not insert"/> | |
259 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer" value="do not insert"/> | |
260 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case" value="do not insert"/> | |
261 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations" value="do not insert"/> | |
262 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration" value="insert"/> | |
263 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference" value="do not insert"/> | |
264 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration" value="do not insert"/> | |
265 | +<setting id="org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested" value="true"/> | |
266 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast" value="do not insert"/> | |
267 | +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_enum_constant" value="next_line"/> | |
268 | +<setting id="org.eclipse.jdt.core.formatter.brace_position_for_type_declaration" value="next_line"/> | |
269 | +<setting id="org.eclipse.jdt.core.formatter.blank_lines_before_package" value="0"/> | |
270 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for" value="insert"/> | |
271 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized" value="insert"/> | |
272 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments" value="do not insert"/> | |
273 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration" value="do not insert"/> | |
274 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while" value="do not insert"/> | |
275 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant" value="do not insert"/> | |
276 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments" value="do not insert"/> | |
277 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation" value="do not insert"/> | |
278 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters" value="do not insert"/> | |
279 | +<setting id="org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header" value="true"/> | |
280 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow" value="insert"/> | |
281 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration" value="insert"/> | |
282 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws" value="do not insert"/> | |
283 | +<setting id="org.eclipse.jdt.core.formatter.join_lines_in_comments" value="true"/> | |
284 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters" value="do not insert"/> | |
285 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional" value="insert"/> | |
286 | +<setting id="org.eclipse.jdt.core.formatter.comment.indent_parameter_description" value="true"/> | |
287 | +<setting id="org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement" value="insert"/> | |
288 | +<setting id="org.eclipse.jdt.core.formatter.tabulation.char" value="space"/> | |
289 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations" value="do not insert"/> | |
290 | +<setting id="org.eclipse.jdt.core.formatter.blank_lines_between_import_groups" value="1"/> | |
291 | +<setting id="org.eclipse.jdt.core.formatter.lineSplit" value="150"/> | |
292 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation" value="do not insert"/> | |
293 | +<setting id="org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch" value="insert"/> | |
294 | +</profile> | |
295 | +</profiles> | ... | ... |
extra/liteloader.importorder
0 → 100644
src/client/java/com/mumfrey/liteloader/client/CallbackProxyClient.java deleted
100644 → 0
1 | -package com.mumfrey.liteloader.client; | |
2 | - | |
3 | -import java.io.File; | |
4 | -import java.util.UUID; | |
5 | - | |
6 | -import net.minecraft.client.Minecraft; | |
7 | -import net.minecraft.client.entity.EntityPlayerSP; | |
8 | -import net.minecraft.client.gui.GuiIngame; | |
9 | -import net.minecraft.client.renderer.EntityRenderer; | |
10 | -import net.minecraft.client.renderer.OpenGlHelper; | |
11 | -import net.minecraft.client.renderer.RenderGlobal; | |
12 | -import net.minecraft.client.renderer.entity.Render; | |
13 | -import net.minecraft.client.renderer.entity.RenderManager; | |
14 | -import net.minecraft.client.shader.Framebuffer; | |
15 | -import net.minecraft.entity.Entity; | |
16 | -import net.minecraft.entity.player.EntityPlayer; | |
17 | -import net.minecraft.server.integrated.IntegratedServer; | |
18 | -import net.minecraft.util.IChatComponent; | |
19 | -import net.minecraft.util.ScreenShotHelper; | |
20 | -import net.minecraft.util.Session; | |
21 | -import net.minecraft.world.WorldSettings; | |
22 | - | |
23 | -import com.mojang.authlib.GameProfile; | |
24 | -import com.mumfrey.liteloader.core.CallbackProxyCommon; | |
25 | -import com.mumfrey.liteloader.transformers.event.EventInfo; | |
26 | -import com.mumfrey.liteloader.transformers.event.ReturnEventInfo; | |
27 | - | |
28 | -/** | |
29 | - * Proxy class which handles the redirected calls from the injected callbacks | |
30 | - * and routes them to the relevant liteloader handler classes. We do this rather | |
31 | - * than patching a bunch of bytecode into the packet classes themselves because | |
32 | - * this is easier to maintain. | |
33 | - * | |
34 | - * @author Adam Mummery-Smith | |
35 | - */ | |
36 | -public abstract class CallbackProxyClient extends CallbackProxyCommon | |
37 | -{ | |
38 | - private static LiteLoaderEventBrokerClient clientEventBroker; | |
39 | - | |
40 | - private static boolean fboEnabled; | |
41 | - | |
42 | - private static boolean renderingFBO; | |
43 | - | |
44 | - private CallbackProxyClient() {} | |
45 | - | |
46 | - public static void onStartupComplete(EventInfo<Minecraft> e) | |
47 | - { | |
48 | - CallbackProxyCommon.onStartupComplete(); | |
49 | - | |
50 | - CallbackProxyClient.clientEventBroker = LiteLoaderEventBrokerClient.getInstance(); | |
51 | - | |
52 | - if (CallbackProxyClient.clientEventBroker == null) | |
53 | - { | |
54 | - throw new RuntimeException("LiteLoader failed to start up properly." | |
55 | - + " The game is in an unstable state and must shut down now. Check the developer log for startup errors"); | |
56 | - } | |
57 | - | |
58 | - CallbackProxyClient.clientEventBroker.onStartupComplete(); | |
59 | - } | |
60 | - | |
61 | - public static void onTimerUpdate(EventInfo<Minecraft> e) | |
62 | - { | |
63 | - CallbackProxyClient.clientEventBroker.onTimerUpdate(); | |
64 | - } | |
65 | - | |
66 | - public static void newTick(EventInfo<Minecraft> e) | |
67 | - { | |
68 | - } | |
69 | - | |
70 | - public static void onTick(EventInfo<Minecraft> e) | |
71 | - { | |
72 | - CallbackProxyClient.clientEventBroker.onTick(); | |
73 | - } | |
74 | - | |
75 | - public static void onRender(EventInfo<Minecraft> e) | |
76 | - { | |
77 | - CallbackProxyClient.clientEventBroker.onRender(); | |
78 | - } | |
79 | - | |
80 | - public static void preRenderGUI(EventInfo<EntityRenderer> e, float partialTicks) | |
81 | - { | |
82 | - CallbackProxyClient.clientEventBroker.preRenderGUI(partialTicks); | |
83 | - } | |
84 | - | |
85 | - public static void onSetupCameraTransform(EventInfo<EntityRenderer> e, int pass, float partialTicks, long timeSlice) | |
86 | - { | |
87 | - CallbackProxyClient.clientEventBroker.onSetupCameraTransform(pass, partialTicks, timeSlice); | |
88 | - } | |
89 | - | |
90 | - public static void postRenderEntities(EventInfo<EntityRenderer> e, int pass, float partialTicks, long timeSlice) | |
91 | - { | |
92 | - CallbackProxyClient.clientEventBroker.postRenderEntities(partialTicks, timeSlice); | |
93 | - } | |
94 | - | |
95 | - public static void postRender(EventInfo<EntityRenderer> e, float partialTicks, long timeSlice) | |
96 | - { | |
97 | - CallbackProxyClient.clientEventBroker.postRender(partialTicks, timeSlice); | |
98 | - } | |
99 | - | |
100 | - public static void onRenderHUD(EventInfo<EntityRenderer> e, float partialTicks) | |
101 | - { | |
102 | - CallbackProxyClient.clientEventBroker.onRenderHUD(partialTicks); | |
103 | - } | |
104 | - | |
105 | - public static void onRenderChat(EventInfo<GuiIngame> e, float partialTicks) | |
106 | - { | |
107 | - CallbackProxyClient.clientEventBroker.onRenderChat(e.getSource().getChatGUI(), partialTicks); | |
108 | - } | |
109 | - | |
110 | - public static void postRenderChat(EventInfo<GuiIngame> e, float partialTicks) | |
111 | - { | |
112 | - CallbackProxyClient.clientEventBroker.postRenderChat(e.getSource().getChatGUI(), partialTicks); | |
113 | - } | |
114 | - | |
115 | - public static void postRenderHUD(EventInfo<EntityRenderer> e, float partialTicks) | |
116 | - { | |
117 | - CallbackProxyClient.clientEventBroker.postRenderHUD(partialTicks); | |
118 | - } | |
119 | - | |
120 | - public static void IntegratedServerCtor(EventInfo<IntegratedServer> e, Minecraft minecraft, String folderName, String worldName, | |
121 | - WorldSettings worldSettings) | |
122 | - { | |
123 | - CallbackProxyClient.clientEventBroker.onStartServer(e.getSource(), folderName, worldName, worldSettings); | |
124 | - } | |
125 | - | |
126 | - public static void onOutboundChat(EventInfo<EntityPlayerSP> e, String message) | |
127 | - { | |
128 | - CallbackProxyClient.clientEventBroker.onSendChatMessage(e, message); | |
129 | - } | |
130 | - | |
131 | - public static void onResize(EventInfo<Minecraft> e) | |
132 | - { | |
133 | - if (CallbackProxyClient.clientEventBroker == null) return; | |
134 | - CallbackProxyClient.clientEventBroker.onResize(e.getSource()); | |
135 | - } | |
136 | - | |
137 | - public static void preRenderFBO(EventInfo<Minecraft> e) | |
138 | - { | |
139 | - if (CallbackProxyClient.clientEventBroker == null) return; | |
140 | - CallbackProxyClient.fboEnabled = OpenGlHelper.isFramebufferEnabled(); | |
141 | - | |
142 | - if (CallbackProxyClient.fboEnabled) | |
143 | - { | |
144 | - CallbackProxyClient.renderingFBO = true; | |
145 | - CallbackProxyClient.clientEventBroker.preRenderFBO(e.getSource().getFramebuffer()); | |
146 | - } | |
147 | - } | |
148 | - | |
149 | - public static void postRenderFBO(EventInfo<Minecraft> e) | |
150 | - { | |
151 | - if (CallbackProxyClient.clientEventBroker == null) return; | |
152 | - CallbackProxyClient.renderingFBO = false; | |
153 | - | |
154 | - if (CallbackProxyClient.fboEnabled) | |
155 | - { | |
156 | - CallbackProxyClient.clientEventBroker.postRenderFBO(e.getSource().getFramebuffer()); | |
157 | - } | |
158 | - } | |
159 | - | |
160 | - public static void renderFBO(EventInfo<Framebuffer> e, int width, int height, boolean flag) | |
161 | - { | |
162 | - if (CallbackProxyClient.clientEventBroker == null) return; | |
163 | - if (CallbackProxyClient.renderingFBO) | |
164 | - { | |
165 | - CallbackProxyClient.clientEventBroker.onRenderFBO(e.getSource(), width, height); | |
166 | - } | |
167 | - | |
168 | - CallbackProxyClient.renderingFBO = false; | |
169 | - } | |
170 | - | |
171 | - public static void onRenderWorld(EventInfo<EntityRenderer> e, float partialTicks, long timeSlice) | |
172 | - { | |
173 | - CallbackProxyClient.clientEventBroker.onRenderWorld(partialTicks, timeSlice); | |
174 | - } | |
175 | - | |
176 | - public static void onRenderSky(EventInfo<EntityRenderer> e, int pass, float partialTicks, long timeSlice) | |
177 | - { | |
178 | - CallbackProxyClient.clientEventBroker.onRenderSky(partialTicks, pass, timeSlice); | |
179 | - } | |
180 | - | |
181 | - public static void onRenderClouds(EventInfo<EntityRenderer> e, RenderGlobal renderGlobalIn, float partialTicks, int pass) | |
182 | - { | |
183 | - CallbackProxyClient.clientEventBroker.onRenderClouds(partialTicks, pass, renderGlobalIn); | |
184 | - } | |
185 | - | |
186 | - public static void onRenderTerrain(EventInfo<EntityRenderer> e, int pass, float partialTicks, long timeSlice) | |
187 | - { | |
188 | - CallbackProxyClient.clientEventBroker.onRenderTerrain(partialTicks, pass, timeSlice); | |
189 | - } | |
190 | - | |
191 | - public static void onSaveScreenshot(ReturnEventInfo<ScreenShotHelper, IChatComponent> e, File gameDir, String name, int width, int height, | |
192 | - Framebuffer fbo) | |
193 | - { | |
194 | - CallbackProxyClient.clientEventBroker.onScreenshot(e, name, width, height, fbo); | |
195 | - } | |
196 | - | |
197 | - public static void onRenderEntity(ReturnEventInfo<RenderManager, Boolean> e, Entity entity, double xPos, double yPos, double zPos, float yaw, | |
198 | - float partialTicks, boolean hideBoundingBox, Render render) | |
199 | - { | |
200 | - CallbackProxyClient.clientEventBroker.onRenderEntity(e.getSource(), entity, xPos, yPos, zPos, yaw, partialTicks, render); | |
201 | - } | |
202 | - | |
203 | - public static void onPostRenderEntity(ReturnEventInfo<RenderManager, Boolean> e, Entity entity, double xPos, double yPos, double zPos, float yaw, | |
204 | - float partialTicks, boolean hideBoundingBox, Render render) | |
205 | - { | |
206 | - CallbackProxyClient.clientEventBroker.onPostRenderEntity(e.getSource(), entity, xPos, yPos, zPos, yaw, partialTicks, render); | |
207 | - } | |
208 | - | |
209 | - /** | |
210 | - * Compatiblbe behaviour with FML, this method is called to generate a | |
211 | - * consistent offline UUID between client and server for a given username. | |
212 | - */ | |
213 | - public static void generateOfflineUUID(ReturnEventInfo<Session, GameProfile> e) | |
214 | - { | |
215 | - Session session = e.getSource(); | |
216 | - UUID uuid = EntityPlayer.getUUID(new GameProfile((UUID)null, session.getUsername())); | |
217 | - e.setReturnValue(new GameProfile(uuid, session.getUsername())); | |
218 | - } | |
219 | -} |
src/client/java/com/mumfrey/liteloader/client/ClientPluginChannelsClient.java
1 | 1 | package com.mumfrey.liteloader.client; |
2 | 2 | |
3 | +import com.mumfrey.liteloader.client.ducks.IClientNetLoginHandler; | |
4 | +import com.mumfrey.liteloader.core.ClientPluginChannels; | |
5 | +import com.mumfrey.liteloader.core.exceptions.UnregisteredChannelException; | |
6 | + | |
3 | 7 | import net.minecraft.client.Minecraft; |
4 | -import net.minecraft.client.network.NetHandlerLoginClient; | |
5 | 8 | import net.minecraft.network.INetHandler; |
6 | 9 | import net.minecraft.network.NetworkManager; |
7 | 10 | import net.minecraft.network.PacketBuffer; |
... | ... | @@ -12,10 +15,6 @@ import net.minecraft.network.play.client.C17PacketCustomPayload; |
12 | 15 | import net.minecraft.network.play.server.S01PacketJoinGame; |
13 | 16 | import net.minecraft.network.play.server.S3FPacketCustomPayload; |
14 | 17 | |
15 | -import com.mumfrey.liteloader.client.util.PrivateFieldsClient; | |
16 | -import com.mumfrey.liteloader.core.ClientPluginChannels; | |
17 | -import com.mumfrey.liteloader.core.exceptions.UnregisteredChannelException; | |
18 | - | |
19 | 18 | /** |
20 | 19 | * Handler for client plugin channels |
21 | 20 | * |
... | ... | @@ -67,7 +66,7 @@ public class ClientPluginChannelsClient extends ClientPluginChannels |
67 | 66 | { |
68 | 67 | if (netHandler instanceof INetHandlerLoginClient) |
69 | 68 | { |
70 | - NetworkManager networkManager = PrivateFieldsClient.netManager.get(((NetHandlerLoginClient)netHandler)); | |
69 | + NetworkManager networkManager = ((IClientNetLoginHandler)netHandler).getNetMgr(); | |
71 | 70 | networkManager.sendPacket(new C17PacketCustomPayload(CHANNEL_REGISTER, registrationData)); |
72 | 71 | } |
73 | 72 | else if (netHandler instanceof INetHandlerPlayClient) | ... | ... |
src/client/java/com/mumfrey/liteloader/client/ClientProxy.java
0 → 100644
1 | +package com.mumfrey.liteloader.client; | |
2 | + | |
3 | +import java.io.File; | |
4 | + | |
5 | +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | |
6 | +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | |
7 | + | |
8 | +import com.mumfrey.liteloader.client.ducks.IFramebuffer; | |
9 | +import com.mumfrey.liteloader.core.Proxy; | |
10 | + | |
11 | +import net.minecraft.client.Minecraft; | |
12 | +import net.minecraft.client.gui.GuiNewChat; | |
13 | +import net.minecraft.client.renderer.RenderGlobal; | |
14 | +import net.minecraft.client.renderer.entity.Render; | |
15 | +import net.minecraft.client.renderer.entity.RenderManager; | |
16 | +import net.minecraft.client.shader.Framebuffer; | |
17 | +import net.minecraft.entity.Entity; | |
18 | +import net.minecraft.server.integrated.IntegratedServer; | |
19 | +import net.minecraft.util.IChatComponent; | |
20 | +import net.minecraft.world.WorldSettings; | |
21 | + | |
22 | +/** | |
23 | + * Proxy class which handles the redirected calls from the injected callbacks | |
24 | + * and routes them to the relevant liteloader handler classes. We do this rather | |
25 | + * than patching a bunch of bytecode into the packet classes themselves because | |
26 | + * this is easier to maintain. | |
27 | + * | |
28 | + * @author Adam Mummery-Smith | |
29 | + */ | |
30 | +public abstract class ClientProxy extends Proxy | |
31 | +{ | |
32 | + private static LiteLoaderEventBrokerClient broker; | |
33 | + | |
34 | + private ClientProxy() {} | |
35 | + | |
36 | + public static void onStartupComplete() | |
37 | + { | |
38 | + Proxy.onStartupComplete(); | |
39 | + | |
40 | + ClientProxy.broker = LiteLoaderEventBrokerClient.getInstance(); | |
41 | + | |
42 | + if (ClientProxy.broker == null) | |
43 | + { | |
44 | + throw new RuntimeException("LiteLoader failed to start up properly." | |
45 | + + " The game is in an unstable state and must shut down now. Check the developer log for startup errors"); | |
46 | + } | |
47 | + | |
48 | + ClientProxy.broker.onStartupComplete(); | |
49 | + } | |
50 | + | |
51 | + public static void onTimerUpdate() | |
52 | + { | |
53 | + ClientProxy.broker.onTimerUpdate(); | |
54 | + } | |
55 | + | |
56 | + public static void newTick() | |
57 | + { | |
58 | + } | |
59 | + | |
60 | + public static void onTick() | |
61 | + { | |
62 | + ClientProxy.broker.onTick(); | |
63 | + } | |
64 | + | |
65 | + public static void onRender() | |
66 | + { | |
67 | + ClientProxy.broker.onRender(); | |
68 | + } | |
69 | + | |
70 | + public static void preRenderGUI(float partialTicks) | |
71 | + { | |
72 | + ClientProxy.broker.preRenderGUI(partialTicks); | |
73 | + } | |
74 | + | |
75 | + public static void onSetupCameraTransform(int pass, float partialTicks, long timeSlice) | |
76 | + { | |
77 | + ClientProxy.broker.onSetupCameraTransform(pass, partialTicks, timeSlice); | |
78 | + } | |
79 | + | |
80 | + public static void postRenderEntities(int pass, float partialTicks, long timeSlice) | |
81 | + { | |
82 | + ClientProxy.broker.postRenderEntities(partialTicks, timeSlice); | |
83 | + } | |
84 | + | |
85 | + public static void postRender(float partialTicks, long timeSlice) | |
86 | + { | |
87 | + ClientProxy.broker.postRender(partialTicks, timeSlice); | |
88 | + } | |
89 | + | |
90 | + public static void onRenderHUD(float partialTicks) | |
91 | + { | |
92 | + ClientProxy.broker.onRenderHUD(partialTicks); | |
93 | + } | |
94 | + | |
95 | + public static void onRenderChat(GuiNewChat chatGui, float partialTicks) | |
96 | + { | |
97 | + ClientProxy.broker.onRenderChat(chatGui, partialTicks); | |
98 | + } | |
99 | + | |
100 | + public static void postRenderChat(GuiNewChat chatGui, float partialTicks) | |
101 | + { | |
102 | + ClientProxy.broker.postRenderChat(chatGui, partialTicks); | |
103 | + } | |
104 | + | |
105 | + public static void postRenderHUD(float partialTicks) | |
106 | + { | |
107 | + ClientProxy.broker.postRenderHUD(partialTicks); | |
108 | + } | |
109 | + | |
110 | + public static void onCreateIntegratedServer(IntegratedServer server, String folderName, String worldName, WorldSettings worldSettings) | |
111 | + { | |
112 | + ClientProxy.broker.onStartServer(server, folderName, worldName, worldSettings); | |
113 | + } | |
114 | + | |
115 | + public static void onOutboundChat(CallbackInfo e, String message) | |
116 | + { | |
117 | + ClientProxy.broker.onSendChatMessage(e, message); | |
118 | + } | |
119 | + | |
120 | + public static void onResize(Minecraft mc) | |
121 | + { | |
122 | + if (ClientProxy.broker == null) return; | |
123 | + ClientProxy.broker.onResize(mc); | |
124 | + } | |
125 | + | |
126 | + public static void preRenderFBO(Framebuffer frameBufferMc) | |
127 | + { | |
128 | + if (ClientProxy.broker == null) return; | |
129 | + if (frameBufferMc instanceof IFramebuffer) | |
130 | + { | |
131 | + ((IFramebuffer)frameBufferMc).setDispatchRenderEvent(true); | |
132 | + } | |
133 | + ClientProxy.broker.preRenderFBO(frameBufferMc); | |
134 | + } | |
135 | + | |
136 | + public static void postRenderFBO(Framebuffer frameBufferMc) | |
137 | + { | |
138 | + if (ClientProxy.broker == null) return; | |
139 | + ClientProxy.broker.postRenderFBO(frameBufferMc); | |
140 | + } | |
141 | + | |
142 | + public static void renderFBO(Framebuffer frameBufferMc, int width, int height, boolean flag) | |
143 | + { | |
144 | + if (ClientProxy.broker == null) return; | |
145 | + ClientProxy.broker.onRenderFBO(frameBufferMc, width, height); | |
146 | + } | |
147 | + | |
148 | + public static void onRenderWorld(float partialTicks, long timeSlice) | |
149 | + { | |
150 | + ClientProxy.broker.onRenderWorld(partialTicks, timeSlice); | |
151 | + } | |
152 | + | |
153 | + public static void onRenderSky(int pass, float partialTicks, long timeSlice) | |
154 | + { | |
155 | + ClientProxy.broker.onRenderSky(partialTicks, pass, timeSlice); | |
156 | + } | |
157 | + | |
158 | + public static void onRenderClouds(RenderGlobal renderGlobalIn, float partialTicks, int pass) | |
159 | + { | |
160 | + ClientProxy.broker.onRenderClouds(partialTicks, pass, renderGlobalIn); | |
161 | + } | |
162 | + | |
163 | + public static void onRenderTerrain(int pass, float partialTicks, long timeSlice) | |
164 | + { | |
165 | + ClientProxy.broker.onRenderTerrain(partialTicks, pass, timeSlice); | |
166 | + } | |
167 | + | |
168 | + public static void onSaveScreenshot(CallbackInfoReturnable<IChatComponent> ci, File gameDir, String name, int width, int height, | |
169 | + Framebuffer fbo) | |
170 | + { | |
171 | + ClientProxy.broker.onScreenshot(ci, name, width, height, fbo); | |
172 | + } | |
173 | + | |
174 | + public static void onRenderEntity(RenderManager source, Render render, Entity entity, double x, double y, double z, float yaw, float pTicks) | |
175 | + { | |
176 | + ClientProxy.broker.onRenderEntity(source, entity, x, y, z, yaw, pTicks, render); | |
177 | + } | |
178 | + | |
179 | + public static void onPostRenderEntity(RenderManager source, Render render, Entity entity, double x, double y, double z, float yaw, float pTicks) | |
180 | + { | |
181 | + ClientProxy.broker.onPostRenderEntity(source, entity, x, y, z, yaw, pTicks, render); | |
182 | + } | |
183 | +} | ... | ... |
src/client/java/com/mumfrey/liteloader/client/LiteLoaderEventBrokerClient.java
1 | 1 | package com.mumfrey.liteloader.client; |
2 | 2 | |
3 | -import net.minecraft.client.Minecraft; | |
4 | -import net.minecraft.client.entity.EntityPlayerSP; | |
5 | -import net.minecraft.client.gui.GuiNewChat; | |
6 | -import net.minecraft.client.gui.ScaledResolution; | |
7 | -import net.minecraft.client.renderer.RenderGlobal; | |
8 | -import net.minecraft.client.renderer.entity.Render; | |
9 | -import net.minecraft.client.renderer.entity.RenderManager; | |
10 | -import net.minecraft.client.resources.IResourceManager; | |
11 | -import net.minecraft.client.resources.IResourceManagerReloadListener; | |
12 | -import net.minecraft.client.shader.Framebuffer; | |
13 | -import net.minecraft.entity.Entity; | |
14 | -import net.minecraft.network.play.client.C01PacketChatMessage; | |
15 | -import net.minecraft.server.integrated.IntegratedServer; | |
16 | -import net.minecraft.util.IChatComponent; | |
17 | -import net.minecraft.util.ScreenShotHelper; | |
18 | -import net.minecraft.util.Timer; | |
19 | - | |
20 | 3 | import org.lwjgl.input.Mouse; |
4 | +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | |
5 | +import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; | |
21 | 6 | |
22 | 7 | import com.mumfrey.liteloader.*; |
23 | 8 | import com.mumfrey.liteloader.client.overlays.IEntityRenderer; |
... | ... | @@ -31,12 +16,28 @@ import com.mumfrey.liteloader.core.event.HandlerList.ReturnLogicOp; |
31 | 16 | import com.mumfrey.liteloader.core.event.ProfilingHandlerList; |
32 | 17 | import com.mumfrey.liteloader.interfaces.FastIterableDeque; |
33 | 18 | import com.mumfrey.liteloader.launch.LoaderProperties; |
34 | -import com.mumfrey.liteloader.transformers.event.EventInfo; | |
35 | -import com.mumfrey.liteloader.transformers.event.ReturnEventInfo; | |
36 | 19 | import com.mumfrey.liteloader.util.log.LiteLoaderLogger; |
37 | 20 | |
21 | +import net.minecraft.client.Minecraft; | |
22 | +import net.minecraft.client.gui.GuiNewChat; | |
23 | +import net.minecraft.client.gui.ScaledResolution; | |
24 | +import net.minecraft.client.renderer.RenderGlobal; | |
25 | +import net.minecraft.client.renderer.entity.Render; | |
26 | +import net.minecraft.client.renderer.entity.RenderManager; | |
27 | +import net.minecraft.client.resources.IResourceManager; | |
28 | +import net.minecraft.client.resources.IResourceManagerReloadListener; | |
29 | +import net.minecraft.client.shader.Framebuffer; | |
30 | +import net.minecraft.entity.Entity; | |
31 | +import net.minecraft.network.play.client.C01PacketChatMessage; | |
32 | +import net.minecraft.server.integrated.IntegratedServer; | |
33 | +import net.minecraft.util.IChatComponent; | |
34 | +import net.minecraft.util.Timer; | |
35 | + | |
38 | 36 | public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker<Minecraft, IntegratedServer> implements IResourceManagerReloadListener |
39 | 37 | { |
38 | + /** | |
39 | + * Singleton | |
40 | + */ | |
40 | 41 | private static LiteLoaderEventBrokerClient instance; |
41 | 42 | |
42 | 43 | /** |
... | ... | @@ -93,7 +94,7 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker<Minecraft |
93 | 94 | this.tickListeners = new ProfilingHandlerList<Tickable>(Tickable.class, this.engineClient.getProfiler()); |
94 | 95 | } |
95 | 96 | |
96 | - static LiteLoaderEventBrokerClient getInstance() | |
97 | + public static LiteLoaderEventBrokerClient getInstance() | |
97 | 98 | { |
98 | 99 | return LiteLoaderEventBrokerClient.instance; |
99 | 100 | } |
... | ... | @@ -363,8 +364,7 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker<Minecraft |
363 | 364 | */ |
364 | 365 | void postRenderChat(GuiNewChat chatGui, float partialTicks) |
365 | 366 | { |
366 | - GuiNewChat chat = this.engineClient.getChatGUI(); | |
367 | - this.chatRenderListeners.all().onPostRenderChat(this.screenWidth, this.screenHeight, chat); | |
367 | + this.chatRenderListeners.all().onPostRenderChat(this.screenWidth, this.screenHeight, chatGui); | |
368 | 368 | } |
369 | 369 | |
370 | 370 | /** |
... | ... | @@ -442,7 +442,7 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker<Minecraft |
442 | 442 | /** |
443 | 443 | * @param message |
444 | 444 | */ |
445 | - void onSendChatMessage(EventInfo<EntityPlayerSP> e, String message) | |
445 | + void onSendChatMessage(CallbackInfo e, String message) | |
446 | 446 | { |
447 | 447 | if (!this.outboundChatFilters.all().onSendChatMessage(message)) |
448 | 448 | { |
... | ... | @@ -523,13 +523,13 @@ public class LiteLoaderEventBrokerClient extends LiteLoaderEventBroker<Minecraft |
523 | 523 | * @param height |
524 | 524 | * @param fbo |
525 | 525 | */ |
526 | - void onScreenshot(ReturnEventInfo<ScreenShotHelper, IChatComponent> e, String name, int width, int height, Framebuffer fbo) | |
526 | + void onScreenshot(CallbackInfoReturnable<IChatComponent> ci, String name, int width, int height, Framebuffer fbo) | |
527 | 527 | { |
528 | - ReturnValue<IChatComponent> ret = new ReturnValue<IChatComponent>(e.getReturnValue()); | |
528 | + ReturnValue<IChatComponent> ret = new ReturnValue<IChatComponent>(ci.getReturnValue()); | |
529 | 529 | |
530 | 530 | if (!this.screenshotListeners.all().onSaveScreenshot(name, width, height, fbo, ret)) |
531 | 531 | { |
532 | - e.setReturnValue(ret.get()); | |
532 | + ci.setReturnValue(ret.get()); | |
533 | 533 | } |
534 | 534 | } |
535 | 535 | ... | ... |
src/client/java/com/mumfrey/liteloader/client/PacketEventsClient.java
1 | 1 | package com.mumfrey.liteloader.client; |
2 | 2 | |
3 | -import net.minecraft.client.Minecraft; | |
4 | -import net.minecraft.network.INetHandler; | |
5 | -import net.minecraft.network.Packet; | |
6 | -import net.minecraft.network.login.INetHandlerLoginClient; | |
7 | -import net.minecraft.network.login.server.S02PacketLoginSuccess; | |
8 | -import net.minecraft.network.play.INetHandlerPlayClient; | |
9 | -import net.minecraft.network.play.server.S01PacketJoinGame; | |
10 | -import net.minecraft.network.play.server.S02PacketChat; | |
11 | -import net.minecraft.server.MinecraftServer; | |
12 | -import net.minecraft.util.ChatComponentText; | |
13 | -import net.minecraft.util.IChatComponent; | |
14 | -import net.minecraft.util.IThreadListener; | |
15 | - | |
16 | -import com.mojang.realmsclient.RealmsMainScreen; | |
17 | 3 | import com.mojang.realmsclient.dto.RealmsServer; |
18 | -import com.mumfrey.liteloader.ChatFilter; | |
19 | -import com.mumfrey.liteloader.ChatListener; | |
20 | -import com.mumfrey.liteloader.JoinGameListener; | |
21 | -import com.mumfrey.liteloader.PostLoginListener; | |
22 | -import com.mumfrey.liteloader.PreJoinGameListener; | |
23 | -import com.mumfrey.liteloader.client.util.PrivateFieldsClient; | |
4 | +import com.mumfrey.liteloader.*; | |
5 | +import com.mumfrey.liteloader.common.ducks.IChatPacket; | |
24 | 6 | import com.mumfrey.liteloader.common.transformers.PacketEventInfo; |
25 | 7 | import com.mumfrey.liteloader.core.ClientPluginChannels; |
26 | 8 | import com.mumfrey.liteloader.core.InterfaceRegistrationDelegate; |
... | ... | @@ -32,10 +14,22 @@ import com.mumfrey.liteloader.core.event.HandlerList; |
32 | 14 | import com.mumfrey.liteloader.core.event.HandlerList.ReturnLogicOp; |
33 | 15 | import com.mumfrey.liteloader.core.runtime.Packets; |
34 | 16 | import com.mumfrey.liteloader.interfaces.FastIterableDeque; |
35 | -import com.mumfrey.liteloader.transformers.event.EventInfo; | |
36 | 17 | import com.mumfrey.liteloader.util.ChatUtilities; |
37 | 18 | import com.mumfrey.liteloader.util.log.LiteLoaderLogger; |
38 | 19 | |
20 | +import net.minecraft.client.Minecraft; | |
21 | +import net.minecraft.network.INetHandler; | |
22 | +import net.minecraft.network.Packet; | |
23 | +import net.minecraft.network.login.INetHandlerLoginClient; | |
24 | +import net.minecraft.network.login.server.S02PacketLoginSuccess; | |
25 | +import net.minecraft.network.play.INetHandlerPlayClient; | |
26 | +import net.minecraft.network.play.server.S01PacketJoinGame; | |
27 | +import net.minecraft.network.play.server.S02PacketChat; | |
28 | +import net.minecraft.server.MinecraftServer; | |
29 | +import net.minecraft.util.ChatComponentText; | |
30 | +import net.minecraft.util.IChatComponent; | |
31 | +import net.minecraft.util.IThreadListener; | |
32 | + | |
39 | 33 | /** |
40 | 34 | * Client-side packet event handlers |
41 | 35 | * |
... | ... | @@ -113,7 +107,7 @@ public class PacketEventsClient extends PacketEvents |
113 | 107 | this.postLoginListeners.add(postLoginListener); |
114 | 108 | } |
115 | 109 | |
116 | - public static void onJoinRealm(EventInfo<RealmsMainScreen> e, long arg1, RealmsServer server) | |
110 | + public static void onJoinRealm(long serverId, RealmsServer server) | |
117 | 111 | { |
118 | 112 | PacketEventsClient.joiningRealm = server; |
119 | 113 | } |
... | ... | @@ -254,7 +248,7 @@ public class PacketEventsClient extends PacketEvents |
254 | 248 | try |
255 | 249 | { |
256 | 250 | chat = ChatUtilities.convertLegacyCodes(chat); |
257 | - PrivateFieldsClient.chatMessage.set(packet, chat); | |
251 | + ((IChatPacket)packet).setChatComponent(chat); | |
258 | 252 | } |
259 | 253 | catch (Exception ex) |
260 | 254 | { | ... | ... |
src/client/java/com/mumfrey/liteloader/client/SoundHandlerReloadInhibitor.java
... | ... | @@ -2,13 +2,13 @@ package com.mumfrey.liteloader.client; |
2 | 2 | |
3 | 3 | import java.util.List; |
4 | 4 | |
5 | +import com.mumfrey.liteloader.client.ducks.IReloadable; | |
6 | +import com.mumfrey.liteloader.util.log.LiteLoaderLogger; | |
7 | + | |
5 | 8 | import net.minecraft.client.audio.SoundHandler; |
6 | 9 | import net.minecraft.client.resources.IResourceManagerReloadListener; |
7 | 10 | import net.minecraft.client.resources.SimpleReloadableResourceManager; |
8 | 11 | |
9 | -import com.mumfrey.liteloader.client.util.PrivateFieldsClient; | |
10 | -import com.mumfrey.liteloader.util.log.LiteLoaderLogger; | |
11 | - | |
12 | 12 | /** |
13 | 13 | * Manager object which handles inhibiting the sound handler's reload |
14 | 14 | * notification at startup. |
... | ... | @@ -55,7 +55,7 @@ public class SoundHandlerReloadInhibitor |
55 | 55 | { |
56 | 56 | if (!this.inhibited) |
57 | 57 | { |
58 | - List<IResourceManagerReloadListener> reloadListeners = PrivateFieldsClient.reloadListeners.get(this.resourceManager); | |
58 | + List<IResourceManagerReloadListener> reloadListeners = ((IReloadable)this.resourceManager).getReloadListeners(); | |
59 | 59 | if (reloadListeners != null) |
60 | 60 | { |
61 | 61 | this.storedIndex = reloadListeners.indexOf(this.soundHandler); |
... | ... | @@ -89,7 +89,7 @@ public class SoundHandlerReloadInhibitor |
89 | 89 | { |
90 | 90 | if (this.inhibited) |
91 | 91 | { |
92 | - List<IResourceManagerReloadListener> reloadListeners = PrivateFieldsClient.reloadListeners.get(this.resourceManager); | |
92 | + List<IResourceManagerReloadListener> reloadListeners = ((IReloadable)this.resourceManager).getReloadListeners(); | |
93 | 93 | if (reloadListeners != null) |
94 | 94 | { |
95 | 95 | if (this.storedIndex > -1) | ... | ... |
src/client/java/com/mumfrey/liteloader/client/api/LiteLoaderCoreAPIClient.java
... | ... | @@ -6,6 +6,7 @@ import net.minecraft.client.Minecraft; |
6 | 6 | import net.minecraft.server.integrated.IntegratedServer; |
7 | 7 | |
8 | 8 | import com.google.common.collect.ImmutableList; |
9 | +import com.google.common.collect.ObjectArrays; | |
9 | 10 | import com.mumfrey.liteloader.api.CoreProvider; |
10 | 11 | import com.mumfrey.liteloader.api.CustomisationProvider; |
11 | 12 | import com.mumfrey.liteloader.api.InterfaceProvider; |
... | ... | @@ -36,12 +37,20 @@ public class LiteLoaderCoreAPIClient extends LiteLoaderCoreAPI |
36 | 37 | |
37 | 38 | private static final String[] requiredDownstreamTransformers = { |
38 | 39 | LiteLoaderCoreAPI.PKG_LITELOADER_COMMON + ".transformers.LiteLoaderPacketTransformer", |
39 | - LiteLoaderCoreAPIClient.PKG_LITELOADER_CLIENT + ".transformers.LiteLoaderEventInjectionTransformer", | |
40 | 40 | LiteLoaderCoreAPIClient.PKG_LITELOADER_CLIENT + ".transformers.MinecraftTransformer", |
41 | 41 | LiteLoaderCoreAPI.PKG_LITELOADER + ".transformers.event.json.ModEventInjectionTransformer" |
42 | 42 | }; |
43 | 43 | |
44 | 44 | private ObjectFactory<Minecraft, IntegratedServer> objectFactory; |
45 | + | |
46 | + @Override | |
47 | + public String[] getMixinConfigs() | |
48 | + { | |
49 | + String[] commonConfigs = super.getMixinConfigs(); | |
50 | + return ObjectArrays.concat(commonConfigs, new String[] { | |
51 | + "mixins.liteloader.client.json" | |
52 | + }, String.class); | |
53 | + } | |
45 | 54 | |
46 | 55 | /* (non-Javadoc) |
47 | 56 | * @see com.mumfrey.liteloader.api.LiteAPI#getRequiredTransformers() |
... | ... | @@ -69,11 +78,11 @@ public class LiteLoaderCoreAPIClient extends LiteLoaderCoreAPI |
69 | 78 | public List<CustomisationProvider> getCustomisationProviders() |
70 | 79 | { |
71 | 80 | return ImmutableList.<CustomisationProvider>of |
72 | - ( | |
73 | - new LiteLoaderBrandingProvider(), | |
74 | - new LiteLoaderModInfoDecorator(), | |
75 | - new Translator() | |
76 | - ); | |
81 | + ( | |
82 | + new LiteLoaderBrandingProvider(), | |
83 | + new LiteLoaderModInfoDecorator(), | |
84 | + new Translator() | |
85 | + ); | |
77 | 86 | } |
78 | 87 | |
79 | 88 | /* (non-Javadoc) |
... | ... | @@ -83,10 +92,10 @@ public class LiteLoaderCoreAPIClient extends LiteLoaderCoreAPI |
83 | 92 | public List<CoreProvider> getCoreProviders() |
84 | 93 | { |
85 | 94 | return ImmutableList.<CoreProvider>of |
86 | - ( | |
87 | - new LiteLoaderCoreProviderClient(this.properties), | |
88 | - LiteLoader.getInput() | |
89 | - ); | |
95 | + ( | |
96 | + new LiteLoaderCoreProviderClient(this.properties), | |
97 | + LiteLoader.getInput() | |
98 | + ); | |
90 | 99 | } |
91 | 100 | |
92 | 101 | |
... | ... | @@ -99,13 +108,13 @@ public class LiteLoaderCoreAPIClient extends LiteLoaderCoreAPI |
99 | 108 | ObjectFactory<?, ?> objectFactory = this.getObjectFactory(); |
100 | 109 | |
101 | 110 | return ImmutableList.<InterfaceProvider>of |
102 | - ( | |
103 | - objectFactory.getEventBroker(), | |
104 | - objectFactory.getPacketEventBroker(), | |
105 | - objectFactory.getClientPluginChannels(), | |
106 | - objectFactory.getServerPluginChannels(), | |
107 | - MessageBus.getInstance() | |
108 | - ); | |
111 | + ( | |
112 | + objectFactory.getEventBroker(), | |
113 | + objectFactory.getPacketEventBroker(), | |
114 | + objectFactory.getClientPluginChannels(), | |
115 | + objectFactory.getServerPluginChannels(), | |
116 | + MessageBus.getInstance() | |
117 | + ); | |
109 | 118 | } |
110 | 119 | |
111 | 120 | /* (non-Javadoc) |
... | ... | @@ -115,9 +124,9 @@ public class LiteLoaderCoreAPIClient extends LiteLoaderCoreAPI |
115 | 124 | public List<Observer> getPreInitObservers() |
116 | 125 | { |
117 | 126 | return ImmutableList.<Observer>of |
118 | - ( | |
119 | - new ModEvents() | |
120 | - ); | |
127 | + ( | |
128 | + new ModEvents() | |
129 | + ); | |
121 | 130 | } |
122 | 131 | |
123 | 132 | /* (non-Javadoc) |
... | ... | @@ -129,11 +138,11 @@ public class LiteLoaderCoreAPIClient extends LiteLoaderCoreAPI |
129 | 138 | ObjectFactory<?, ?> objectFactory = this.getObjectFactory(); |
130 | 139 | |
131 | 140 | return ImmutableList.<Observer>of |
132 | - ( | |
133 | - new ResourceObserver(), | |
134 | - objectFactory.getPanelManager(), | |
135 | - objectFactory.getEventBroker() | |
136 | - ); | |
141 | + ( | |
142 | + new ResourceObserver(), | |
143 | + objectFactory.getPanelManager(), | |
144 | + objectFactory.getEventBroker() | |
145 | + ); | |
137 | 146 | } |
138 | 147 | |
139 | 148 | /* (non-Javadoc) | ... | ... |
src/client/java/com/mumfrey/liteloader/client/ducks/IClientNetLoginHandler.java
0 → 100644
src/client/java/com/mumfrey/liteloader/client/ducks/IFramebuffer.java
0 → 100644
src/client/java/com/mumfrey/liteloader/client/ducks/INamespacedRegistry.java
0 → 100644
src/client/java/com/mumfrey/liteloader/client/ducks/IObjectIntIdentityMap.java
0 → 100644
1 | +package com.mumfrey.liteloader.client.ducks; | |
2 | + | |
3 | +import java.util.IdentityHashMap; | |
4 | +import java.util.List; | |
5 | + | |
6 | +public interface IObjectIntIdentityMap | |
7 | +{ | |
8 | + public abstract <V> IdentityHashMap<V, Integer> getIdentityMap(); | |
9 | + | |
10 | + public abstract <V> List<V> getObjectList(); | |
11 | +} | ... | ... |
src/client/java/com/mumfrey/liteloader/client/ducks/IRegistrySimple.java
0 → 100644
src/client/java/com/mumfrey/liteloader/client/ducks/IReloadable.java
0 → 100644
src/client/java/com/mumfrey/liteloader/client/ducks/IRenderManager.java
0 → 100644
1 | +package com.mumfrey.liteloader.client.ducks; | |
2 | + | |
3 | +import java.util.Map; | |
4 | + | |
5 | +import net.minecraft.client.renderer.entity.Render; | |
6 | +import net.minecraft.entity.Entity; | |
7 | + | |
8 | +public interface IRenderManager | |
9 | +{ | |
10 | + public abstract Map<Class<? extends Entity>, Render> getRenderMap(); | |
11 | +} | ... | ... |
src/client/java/com/mumfrey/liteloader/client/ducks/ITileEntityRendererDispatcher.java
0 → 100644
1 | +package com.mumfrey.liteloader.client.ducks; | |
2 | + | |
3 | +import java.util.Map; | |
4 | + | |
5 | +import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; | |
6 | +import net.minecraft.tileentity.TileEntity; | |
7 | + | |
8 | +public interface ITileEntityRendererDispatcher | |
9 | +{ | |
10 | + public abstract Map<Class<? extends TileEntity>, TileEntitySpecialRenderer> getSpecialRenderMap(); | |
11 | +} | ... | ... |
src/client/java/com/mumfrey/liteloader/client/mixin/MixinEntityPlayerSP.java
0 → 100644
1 | +package com.mumfrey.liteloader.client.mixin; | |
2 | + | |
3 | +import org.spongepowered.asm.mixin.Mixin; | |
4 | +import org.spongepowered.asm.mixin.injection.At; | |
5 | +import org.spongepowered.asm.mixin.injection.Inject; | |
6 | +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | |
7 | + | |
8 | +import com.mumfrey.liteloader.client.ClientProxy; | |
9 | + | |
10 | +import net.minecraft.client.entity.AbstractClientPlayer; | |
11 | +import net.minecraft.client.entity.EntityPlayerSP; | |
12 | + | |
13 | +@Mixin(EntityPlayerSP.class) | |
14 | +public abstract class MixinEntityPlayerSP extends AbstractClientPlayer | |
15 | +{ | |
16 | + public MixinEntityPlayerSP() | |
17 | + { | |
18 | + super(null, null); | |
19 | + } | |
20 | + | |
21 | + @Inject(method = "sendChatMessage(Ljava/lang/String;)V", at = { @At("HEAD") }, cancellable = true) | |
22 | + public void onSendChatMessage(String message, CallbackInfo ci) | |
23 | + { | |
24 | + ClientProxy.onOutboundChat(ci, message); | |
25 | + } | |
26 | +} | ... | ... |
src/client/java/com/mumfrey/liteloader/client/mixin/MixinEntityRenderer.java
0 → 100644
1 | +package com.mumfrey.liteloader.client.mixin; | |
2 | + | |
3 | +import org.spongepowered.asm.mixin.Mixin; | |
4 | +import org.spongepowered.asm.mixin.injection.At; | |
5 | +import org.spongepowered.asm.mixin.injection.Inject; | |
6 | +import org.spongepowered.asm.mixin.injection.At.Shift; | |
7 | +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | |
8 | + | |
9 | +import com.mumfrey.liteloader.client.ClientProxy; | |
10 | + | |
11 | +import net.minecraft.client.renderer.EntityRenderer; | |
12 | +import net.minecraft.client.renderer.RenderGlobal; | |
13 | + | |
14 | +@Mixin(EntityRenderer.class) | |
15 | +public abstract class MixinEntityRenderer | |
16 | +{ | |
17 | + @Inject(method = "updateCameraAndRender(F)V", at = @At( | |
18 | + value = "INVOKE", | |
19 | + shift = Shift.AFTER, | |
20 | + target = "Lnet/minecraft/client/renderer/GlStateManager;clear(I)V" | |
21 | + )) | |
22 | + private void onPreRenderGUI(float partialTicks, CallbackInfo ci) | |
23 | + { | |
24 | + ClientProxy.preRenderGUI(partialTicks); | |
25 | + } | |
26 | + | |
27 | + @Inject(method = "updateCameraAndRender(F)V", at = @At( | |
28 | + value = "INVOKE", | |
29 | + target = "Lnet/minecraft/client/gui/GuiIngame;renderGameOverlay(F)V" | |
30 | + )) | |
31 | + private void onRenderHUD(float partialTicks, CallbackInfo ci) | |
32 | + { | |
33 | + ClientProxy.onRenderHUD(partialTicks); | |
34 | + } | |
35 | + | |
36 | + @Inject(method = "updateCameraAndRender(F)V", at = @At( | |
37 | + value = "INVOKE", | |
38 | + shift = Shift.AFTER, | |
39 | + target = "Lnet/minecraft/client/gui/GuiIngame;renderGameOverlay(F)V" | |
40 | + )) | |
41 | + private void onPostRenderHUD(float partialTicks, CallbackInfo ci) | |
42 | + { | |
43 | + ClientProxy.postRenderHUD(partialTicks); | |
44 | + } | |
45 | + | |
46 | + @Inject(method = "renderWorld(FJ)V", at = @At( | |
47 | + value = "INVOKE", | |
48 | + target = "Lnet/minecraft/profiler/Profiler;startSection(Ljava/lang/String;)V", | |
49 | + ordinal = 0 | |
50 | + )) | |
51 | + private void onRenderWorld(float partialTicks, long timeSlice, CallbackInfo ci) | |
52 | + { | |
53 | + ClientProxy.onRenderWorld(partialTicks, timeSlice); | |
54 | + } | |
55 | + | |
56 | + @Inject(method = "renderWorld(FJ)V", at = @At( | |
57 | + value = "INVOKE", | |
58 | + target = "Lnet/minecraft/profiler/Profiler;endSection()V", | |
59 | + ordinal = 0 | |
60 | + )) | |
61 | + private void onPostRender(float partialTicks, long timeSlice, CallbackInfo ci) | |
62 | + { | |
63 | + ClientProxy.postRender(partialTicks, timeSlice); | |
64 | + } | |
65 | + | |
66 | + @Inject(method = "renderWorldPass(IFJ)V", at = @At( | |
67 | + value = "INVOKE_STRING", | |
68 | + target = "Lnet/minecraft/profiler/Profiler;endStartSection(Ljava/lang/String;)V", | |
69 | + args = "ldc=frustum" | |
70 | + )) | |
71 | + private void onSetupCameraTransform(int pass, float partialTicks, long timeSlice, CallbackInfo ci) | |
72 | + { | |
73 | + ClientProxy.onSetupCameraTransform(pass, partialTicks, timeSlice); | |
74 | + } | |
75 | + | |
76 | + @Inject(method = "renderWorldPass(IFJ)V", at = @At( | |
77 | + value = "INVOKE_STRING", | |
78 | + target = "Lnet/minecraft/profiler/Profiler;endStartSection(Ljava/lang/String;)V", | |
79 | + args = "ldc=sky" | |
80 | + )) | |
81 | + private void onRenderSky(int pass, float partialTicks, long timeSlice, CallbackInfo ci) | |
82 | + { | |
83 | + ClientProxy.onRenderSky(pass, partialTicks, timeSlice); | |
84 | + } | |
85 | + | |
86 | + @Inject(method = "renderWorldPass(IFJ)V", at = @At( | |
87 | + value = "INVOKE_STRING", | |
88 | + target = "Lnet/minecraft/profiler/Profiler;endStartSection(Ljava/lang/String;)V", | |
89 | + args = "ldc=terrain" | |
90 | + )) | |
91 | + private void onRenderTerrain(int pass, float partialTicks, long timeSlice, CallbackInfo ci) | |
92 | + { | |
93 | + ClientProxy.onRenderTerrain(pass, partialTicks, timeSlice); | |
94 | + | |
95 | + } | |
96 | + | |
97 | + @Inject(method = "renderWorldPass(IFJ)V", at = @At( | |
98 | + value = "INVOKE_STRING", | |
99 | + target = "Lnet/minecraft/profiler/Profiler;endStartSection(Ljava/lang/String;)V", | |
100 | + args = "ldc=litParticles" | |
101 | + )) | |
102 | + private void onPostRenderEntities(int pass, float partialTicks, long timeSlice, CallbackInfo ci) | |
103 | + { | |
104 | + ClientProxy.postRenderEntities(pass, partialTicks, timeSlice); | |
105 | + } | |
106 | + | |
107 | + @Inject(method = "renderCloudsCheck(Lnet/minecraft/client/renderer/RenderGlobal;FI)V", at = @At( | |
108 | + value = "INVOKE", | |
109 | + target = "Lnet/minecraft/profiler/Profiler;endStartSection(Ljava/lang/String;)V" | |
110 | + )) | |
111 | + private void onRenderClouds(RenderGlobal renderGlobalIn, float partialTicks, int pass, CallbackInfo ci) | |
112 | + { | |
113 | + ClientProxy.onRenderClouds(renderGlobalIn, partialTicks, pass); | |
114 | + } | |
115 | +} | ... | ... |
src/client/java/com/mumfrey/liteloader/client/mixin/MixinFramebuffer.java
0 → 100644
1 | +package com.mumfrey.liteloader.client.mixin; | |
2 | + | |
3 | +import org.spongepowered.asm.mixin.Mixin; | |
4 | +import org.spongepowered.asm.mixin.injection.At; | |
5 | +import org.spongepowered.asm.mixin.injection.Inject; | |
6 | +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | |
7 | + | |
8 | +import com.mumfrey.liteloader.client.ClientProxy; | |
9 | +import com.mumfrey.liteloader.client.ducks.IFramebuffer; | |
10 | + | |
11 | +import net.minecraft.client.shader.Framebuffer; | |
12 | + | |
13 | +@Mixin(Framebuffer.class) | |
14 | +public abstract class MixinFramebuffer implements IFramebuffer | |
15 | +{ | |
16 | + private boolean dispatchRenderEvent; | |
17 | + | |
18 | + @Override | |
19 | + public IFramebuffer setDispatchRenderEvent(boolean dispatchRenderEvent) | |
20 | + { | |
21 | + this.dispatchRenderEvent = dispatchRenderEvent; | |
22 | + return this; | |
23 | + } | |
24 | + | |
25 | + @Override | |
26 | + public boolean isDispatchRenderEvent() | |
27 | + { | |
28 | + return this.dispatchRenderEvent; | |
29 | + } | |
30 | + | |
31 | + @Inject(method = "framebufferRenderExt(IIZ)V", at = @At( | |
32 | + value = "INVOKE", | |
33 | + target = "Lnet/minecraft/client/shader/Framebuffer;bindFramebufferTexture()V" | |
34 | + )) | |
35 | + private void onRenderFBO(int width, int height, boolean flag, CallbackInfo ci) | |
36 | + { | |
37 | + if (this.dispatchRenderEvent) | |
38 | + { | |
39 | + ClientProxy.renderFBO((Framebuffer)(Object)this, width, height, flag); | |
40 | + this.dispatchRenderEvent = false; | |
41 | + } | |
42 | + } | |
43 | +} | ... | ... |
src/client/java/com/mumfrey/liteloader/client/mixin/MixinGuiIngame.java
0 → 100644
1 | +package com.mumfrey.liteloader.client.mixin; | |
2 | + | |
3 | +import org.spongepowered.asm.mixin.Mixin; | |
4 | +import org.spongepowered.asm.mixin.Shadow; | |
5 | +import org.spongepowered.asm.mixin.injection.At; | |
6 | +import org.spongepowered.asm.mixin.injection.At.Shift; | |
7 | +import org.spongepowered.asm.mixin.injection.Inject; | |
8 | +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | |
9 | + | |
10 | +import com.mumfrey.liteloader.client.ClientProxy; | |
11 | + | |
12 | +import net.minecraft.client.gui.Gui; | |
13 | +import net.minecraft.client.gui.GuiIngame; | |
14 | +import net.minecraft.client.gui.GuiNewChat; | |
15 | + | |
16 | +@Mixin(GuiIngame.class) | |
17 | +public abstract class MixinGuiIngame extends Gui | |
18 | +{ | |
19 | + @Shadow private GuiNewChat persistantChatGUI; | |
20 | + | |
21 | + @Inject(method = "renderGameOverlay(F)V", at = @At( | |
22 | + value = "INVOKE", | |
23 | + target = "Lnet/minecraft/client/gui/GuiNewChat;drawChat(I)V" | |
24 | + )) | |
25 | + private void onRenderChat(float partialTicks, CallbackInfo ci) | |
26 | + { | |
27 | + ClientProxy.onRenderChat(this.persistantChatGUI, partialTicks); | |
28 | + } | |
29 | + | |
30 | + @Inject(method = "renderGameOverlay(F)V", at = @At( | |
31 | + value = "INVOKE", | |
32 | + shift = Shift.AFTER, | |
33 | + target = "Lnet/minecraft/client/gui/GuiNewChat;drawChat(I)V" | |
34 | + )) | |
35 | + private void postRenderChat(float partialTicks, CallbackInfo ci) | |
36 | + { | |
37 | + ClientProxy.postRenderChat(this.persistantChatGUI, partialTicks); | |
38 | + } | |
39 | +} | ... | ... |
src/client/java/com/mumfrey/liteloader/client/mixin/MixinIntegratedServer.java
0 → 100644
1 | +package com.mumfrey.liteloader.client.mixin; | |
2 | + | |
3 | +import org.spongepowered.asm.mixin.Mixin; | |
4 | +import org.spongepowered.asm.mixin.injection.At; | |
5 | +import org.spongepowered.asm.mixin.injection.Inject; | |
6 | +import org.spongepowered.asm.mixin.injection.Surrogate; | |
7 | +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | |
8 | + | |
9 | +import com.mumfrey.liteloader.client.ClientProxy; | |
10 | + | |
11 | +import net.minecraft.client.Minecraft; | |
12 | +import net.minecraft.server.MinecraftServer; | |
13 | +import net.minecraft.server.integrated.IntegratedServer; | |
14 | +import net.minecraft.world.WorldSettings; | |
15 | + | |
16 | +@Mixin(IntegratedServer.class) | |
17 | +public abstract class MixinIntegratedServer extends MinecraftServer | |
18 | +{ | |
19 | + public MixinIntegratedServer() | |
20 | + { | |
21 | + super(null, null); | |
22 | + } | |
23 | + | |
24 | + @Inject( | |
25 | + method = "<init>*", //(Lnet/minecraft/client/Minecraft;Ljava/lang/String;Ljava/lang/String;Lnet/minecraft/world/WorldSettings;)V", | |
26 | + at = @At("RETURN"), | |
27 | + remap = false | |
28 | + ) | |
29 | + private void onConstructed(Minecraft mcIn, String folderName, String worldName, WorldSettings settings, CallbackInfo ci) | |
30 | + { | |
31 | + ClientProxy.onCreateIntegratedServer((IntegratedServer)(Object)this, folderName, worldName, settings); | |
32 | + } | |
33 | + | |
34 | + @Surrogate | |
35 | + private void onConstructed(Minecraft mcIn, CallbackInfo ci) | |
36 | + { | |
37 | +// ClientProxy.onCreateIntegratedServer((IntegratedServer)(Object)this, folderName, worldName, settings); | |
38 | + } | |
39 | +} | ... | ... |
src/client/java/com/mumfrey/liteloader/client/mixin/MixinMinecraft.java
0 → 100644
1 | +package com.mumfrey.liteloader.client.mixin; | |
2 | + | |
3 | +import org.spongepowered.asm.mixin.Mixin; | |
4 | +import org.spongepowered.asm.mixin.injection.At; | |
5 | +import org.spongepowered.asm.mixin.injection.At.Shift; | |
6 | +import org.spongepowered.asm.mixin.injection.Inject; | |
7 | +import org.spongepowered.asm.mixin.injection.Redirect; | |
8 | +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; | |
9 | + | |
10 | +import com.mumfrey.liteloader.client.ClientProxy; | |
11 | + | |
12 | +import net.minecraft.client.Minecraft; | |
13 | +import net.minecraft.client.renderer.OpenGlHelper; | |
14 | +import net.minecraft.client.shader.Framebuffer; | |
15 | + | |
16 | +@Mixin(Minecraft.class) | |
17 | +public abstract class MixinMinecraft | |
18 | +{ | |
19 | + @Inject(method = "startGame()V", at = @At("RETURN")) | |
20 | + private void onStartupComplete(CallbackInfo ci) | |
21 | + { | |
22 | + ClientProxy.onStartupComplete(); | |
23 | + } | |
24 | + | |
25 | + @Inject(method = "updateFramebufferSize()V", at = @At("HEAD")) | |
26 | + private void onResize(CallbackInfo ci) | |
27 | + { | |
28 | + ClientProxy.onResize((Minecraft)(Object)this); | |
29 | + } | |
30 | + | |
31 | + @Inject(method = "runTick()V", at = @At("HEAD")) | |
32 | + private void newTick(CallbackInfo ci) | |
33 | + { | |
34 | + ClientProxy.newTick(); | |
35 | + } | |
36 | + | |
37 | + @Inject(method = "runGameLoop()V", at = @At( | |
38 | + value = "INVOKE", | |
39 | + shift = Shift.AFTER, | |
40 | + target = "Lnet/minecraft/client/renderer/EntityRenderer;updateCameraAndRender(F)V" | |
41 | + )) | |
42 | + private void onTick(CallbackInfo ci) | |
43 | + { | |
44 | + ClientProxy.onTick(); | |
45 | + } | |
46 | + | |
47 | + @Redirect(method = "runGameLoop()V", at = @At( | |
48 | + value = "INVOKE", | |
49 | + target = "Lnet/minecraft/client/shader/Framebuffer;framebufferRender(II)V" | |
50 | + )) | |
51 | + private void renderFBO(Framebuffer framebufferMc, int width, int height) | |
52 | + { | |
53 | + boolean fboEnabled = OpenGlHelper.isFramebufferEnabled(); | |
54 | + if (fboEnabled) | |
55 | + { | |