|
1 | 1 | --- before/net/minecraft/client/renderer/EntityRenderer.java |
2 | 2 | +++ after/net/minecraft/client/renderer/EntityRenderer.java |
3 | | -@@ -235,6 +235,7 @@ |
| 3 | +@@ -13,7 +13,6 @@ |
| 4 | + import javax.annotation.Nullable; |
| 5 | + import javax.imageio.ImageIO; |
| 6 | + import net.minecraft.block.Block; |
| 7 | +-import net.minecraft.block.BlockBed; |
| 8 | + import net.minecraft.block.material.Material; |
| 9 | + import net.minecraft.block.state.IBlockState; |
| 10 | + import net.minecraft.client.Minecraft; |
| 11 | +@@ -235,6 +234,7 @@ |
4 | 12 | { |
5 | 13 | this.loadShader(new ResourceLocation("shaders/post/invert.json")); |
6 | 14 | } |
7 | 15 | + else net.minecraftforge.client.ForgeHooksClient.loadEntityShader(entityIn, this); |
8 | 16 | } |
9 | 17 | } |
10 | 18 |
|
11 | | -@@ -315,7 +316,7 @@ |
| 19 | +@@ -315,7 +315,7 @@ |
12 | 20 | this.mc.setRenderViewEntity(this.mc.player); |
13 | 21 | } |
14 | 22 |
|
|
17 | 25 | float f4 = (float)this.mc.gameSettings.renderDistanceChunks / 32.0F; |
18 | 26 | float f2 = f3 * (1.0F - f4) + f4; |
19 | 27 | this.fogColor1 = this.fogColor1 + (f2 - this.fogColor1) * 0.1F; |
20 | | -@@ -445,7 +446,7 @@ |
| 28 | +@@ -445,7 +445,7 @@ |
21 | 29 |
|
22 | 30 | if (d3 < d2 || d2 == 0.0) |
23 | 31 | { |
|
26 | 34 | { |
27 | 35 | if (d2 == 0.0) |
28 | 36 | { |
29 | | -@@ -538,7 +539,7 @@ |
| 37 | +@@ -538,7 +538,7 @@ |
30 | 38 | f = f * 60.0F / 70.0F; |
31 | 39 | } |
32 | 40 |
|
|
35 | 43 | } |
36 | 44 | } |
37 | 45 |
|
38 | | -@@ -604,13 +605,7 @@ |
| 46 | +@@ -604,13 +604,7 @@ |
39 | 47 | { |
40 | 48 | BlockPos blockpos = new BlockPos(entity); |
41 | 49 | IBlockState iblockstate = this.mc.world.getBlockState(blockpos); |
|
50 | 58 |
|
51 | 59 | GlStateManager.rotate(entity.prevRotationYaw + (entity.rotationYaw - entity.prevRotationYaw) * partialTicks + 180.0F, 0.0F, -1.0F, 0.0F); |
52 | 60 | GlStateManager.rotate(entity.prevRotationPitch + (entity.rotationPitch - entity.prevRotationPitch) * partialTicks, -1.0F, 0.0F, 0.0F); |
53 | | -@@ -683,19 +678,20 @@ |
| 61 | +@@ -683,19 +677,20 @@ |
54 | 62 |
|
55 | 63 | if (!this.mc.gameSettings.debugCamEnable) |
56 | 64 | { |
|
81 | 89 | } |
82 | 90 |
|
83 | 91 | GlStateManager.translate(0.0F, -f, 0.0F); |
84 | | -@@ -825,6 +821,7 @@ |
| 92 | +@@ -825,6 +820,7 @@ |
85 | 93 | boolean flag = this.mc.getRenderViewEntity() instanceof EntityLivingBase |
86 | 94 | && ((EntityLivingBase)this.mc.getRenderViewEntity()).isPlayerSleeping(); |
87 | 95 |
|
88 | 96 | + if (!net.minecraftforge.client.ForgeHooksClient.renderFirstPersonHand(mc.renderGlobal, partialTicks, pass)) |
89 | 97 | if (this.mc.gameSettings.thirdPersonView == 0 |
90 | 98 | && !flag |
91 | 99 | && !this.mc.gameSettings.hideGUI |
92 | | -@@ -932,6 +929,15 @@ |
| 100 | +@@ -932,6 +928,15 @@ |
93 | 101 | f10 = 0.25F + f7 * 0.75F; |
94 | 102 | } |
95 | 103 |
|
|
105 | 113 | if (this.mc.player.isPotionActive(MobEffects.NIGHT_VISION)) |
106 | 114 | { |
107 | 115 | float f15 = this.getNightVisionBrightness(this.mc.player, partialTicks); |
108 | | -@@ -1108,7 +1114,17 @@ |
| 116 | +@@ -1108,7 +1113,17 @@ |
109 | 117 | j = Math.max(j, 60); |
110 | 118 | long k = System.nanoTime() - nanoTime; |
111 | 119 | long l = Math.max((long)(1000000000 / j / 4) - k, 0L); |
112 | 120 | - this.renderWorld(partialTicks, System.nanoTime() + l); |
113 | 121 | + |
114 | | -+ if (com.cleanroommc.kirino.KirinoCore.KIRINO_CONFIG_HUB.isEnable() |
115 | | -+ && com.cleanroommc.kirino.KirinoCore.KIRINO_CONFIG_HUB.isEnableRenderDelegate() |
116 | | -+ && !com.cleanroommc.kirino.KirinoCore.isRenderUnsupported()) |
| 122 | ++ if (com.cleanroommc.kirino.KirinoCommonCore.KIRINO_CONFIG_HUB.isEnable() |
| 123 | ++ && com.cleanroommc.kirino.KirinoCommonCore.KIRINO_CONFIG_HUB.isEnableRenderDelegate() |
| 124 | ++ && !com.cleanroommc.kirino.KirinoClientCore.isRenderUnsupported()) |
117 | 125 | + { |
118 | | -+ com.cleanroommc.kirino.KirinoCore.EntityRenderer$renderWorld(System.nanoTime() + l); |
| 126 | ++ com.cleanroommc.kirino.KirinoClientCore.EntityRenderer$renderWorld(System.nanoTime() + l); |
119 | 127 | + } |
120 | 128 | + else |
121 | 129 | + { |
|
124 | 132 |
|
125 | 133 | if (this.mc.isSingleplayer() && this.timeWorldIcon < Minecraft.getSystemTime() - 1000L) |
126 | 134 | { |
127 | | -@@ -1158,6 +1174,10 @@ |
| 135 | +@@ -1158,6 +1173,10 @@ |
128 | 136 | GlStateManager.loadIdentity(); |
129 | 137 | this.setupOverlayRendering(); |
130 | 138 | this.renderEndNanoTime = System.nanoTime(); |
|
135 | 143 | } |
136 | 144 |
|
137 | 145 | if (this.mc.currentScreen != null) |
138 | | -@@ -1166,7 +1186,7 @@ |
| 146 | +@@ -1166,7 +1185,7 @@ |
139 | 147 |
|
140 | 148 | try |
141 | 149 | { |
|
144 | 152 | } |
145 | 153 | catch (Throwable throwable) |
146 | 154 | { |
147 | | -@@ -1275,7 +1295,7 @@ |
| 155 | +@@ -1275,7 +1294,7 @@ |
148 | 156 |
|
149 | 157 | if (this.mc.playerController.getCurrentGameType() == GameType.SPECTATOR) |
150 | 158 | { |
|
153 | 161 | } |
154 | 162 | else |
155 | 163 | { |
156 | | -@@ -1323,6 +1343,17 @@ |
| 164 | +@@ -1323,6 +1342,17 @@ |
157 | 165 |
|
158 | 166 | private void renderWorldPass(int pass, float partialTicks, long finishTimeNano) |
159 | 167 | { |
160 | | -+ if (com.cleanroommc.kirino.KirinoCore.KIRINO_CONFIG_HUB.isEnable() |
161 | | -+ && (!com.cleanroommc.kirino.KirinoCore.KIRINO_CONFIG_HUB.isEnableRenderDelegate() |
162 | | -+ || com.cleanroommc.kirino.KirinoCore.isRenderUnsupported())) |
| 168 | ++ if (com.cleanroommc.kirino.KirinoCommonCore.KIRINO_CONFIG_HUB.isEnable() |
| 169 | ++ && (!com.cleanroommc.kirino.KirinoCommonCore.KIRINO_CONFIG_HUB.isEnableRenderDelegate() |
| 170 | ++ || com.cleanroommc.kirino.KirinoClientCore.isRenderUnsupported())) |
163 | 171 | + { |
164 | | -+ if (com.cleanroommc.kirino.KirinoCore.KIRINO_ENGINE.nextExpectedPhase() == com.cleanroommc.kirino.engine.FramePhase.PREPARE) |
| 172 | ++ if (com.cleanroommc.kirino.KirinoCommonCore.KIRINO_ENGINE.nextExpectedPhase() == com.cleanroommc.kirino.engine.FramePhase.PREPARE) |
165 | 173 | + { |
166 | | -+ com.cleanroommc.kirino.KirinoCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.PREPARE); |
| 174 | ++ com.cleanroommc.kirino.KirinoClientCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.PREPARE); |
167 | 175 | + } |
168 | | -+ com.cleanroommc.kirino.KirinoCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.PRE_UPDATE); |
| 176 | ++ com.cleanroommc.kirino.KirinoClientCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.PRE_UPDATE); |
169 | 177 | + } |
170 | 178 | + |
171 | 179 | RenderGlobal renderglobal = this.mc.renderGlobal; |
172 | 180 | ParticleManager particlemanager = this.mc.effectRenderer; |
173 | 181 | boolean flag = this.isDrawBlockOutline(); |
174 | | -@@ -1333,7 +1364,7 @@ |
| 182 | +@@ -1333,7 +1363,7 @@ |
175 | 183 | GlStateManager.clear(16640); |
176 | 184 | this.mc.profiler.endStartSection("camera"); |
177 | 185 | this.setupCameraTransform(partialTicks, pass); |
|
180 | 188 | this.mc.profiler.endStartSection("frustum"); |
181 | 189 | ClippingHelperImpl.getInstance(); |
182 | 190 | this.mc.profiler.endStartSection("culling"); |
183 | | -@@ -1377,6 +1408,14 @@ |
| 191 | +@@ -1377,6 +1407,14 @@ |
184 | 192 | this.renderCloudsCheck(renderglobal, partialTicks, pass, d0, d1, d2); |
185 | 193 | } |
186 | 194 |
|
187 | | -+ if (com.cleanroommc.kirino.KirinoCore.KIRINO_CONFIG_HUB.isEnable() |
188 | | -+ && (!com.cleanroommc.kirino.KirinoCore.KIRINO_CONFIG_HUB.isEnableRenderDelegate() |
189 | | -+ || com.cleanroommc.kirino.KirinoCore.isRenderUnsupported())) |
| 195 | ++ if (com.cleanroommc.kirino.KirinoCommonCore.KIRINO_CONFIG_HUB.isEnable() |
| 196 | ++ && (!com.cleanroommc.kirino.KirinoCommonCore.KIRINO_CONFIG_HUB.isEnableRenderDelegate() |
| 197 | ++ || com.cleanroommc.kirino.KirinoClientCore.isRenderUnsupported())) |
190 | 198 | + { |
191 | | -+ com.cleanroommc.kirino.KirinoCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.UPDATE); |
192 | | -+ com.cleanroommc.kirino.KirinoCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.RENDER_OPAQUE); |
| 199 | ++ com.cleanroommc.kirino.KirinoClientCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.UPDATE); |
| 200 | ++ com.cleanroommc.kirino.KirinoClientCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.RENDER_OPAQUE); |
193 | 201 | + } |
194 | 202 | + |
195 | 203 | this.mc.profiler.endStartSection("prepareterrain"); |
196 | 204 | this.setupFog(0, partialTicks); |
197 | 205 | this.mc.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); |
198 | | -@@ -1396,7 +1435,9 @@ |
| 206 | +@@ -1396,7 +1434,9 @@ |
199 | 207 | GlStateManager.disableAlpha(); |
200 | 208 | renderglobal.renderBlockLayer(BlockRenderLayer.SOLID, (double)partialTicks, pass, entity); |
201 | 209 | GlStateManager.enableAlpha(); |
|
205 | 213 | this.mc.getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).setBlurMipmap(false, false); |
206 | 214 | renderglobal.renderBlockLayer(BlockRenderLayer.CUTOUT, (double)partialTicks, pass, entity); |
207 | 215 | this.mc.getTextureManager().getTexture(TextureMap.LOCATION_BLOCKS_TEXTURE).restoreLastBlurMipmap(); |
208 | | -@@ -1410,7 +1451,9 @@ |
| 216 | +@@ -1410,7 +1450,9 @@ |
209 | 217 | GlStateManager.pushMatrix(); |
210 | 218 | RenderHelper.enableStandardItemLighting(); |
211 | 219 | this.mc.profiler.endStartSection("entities"); |
|
215 | 223 | RenderHelper.disableStandardItemLighting(); |
216 | 224 | this.disableLightmap(); |
217 | 225 | } |
218 | | -@@ -1423,6 +1466,7 @@ |
| 226 | +@@ -1423,6 +1465,7 @@ |
219 | 227 | EntityPlayer entityplayer = (EntityPlayer)entity; |
220 | 228 | GlStateManager.disableAlpha(); |
221 | 229 | this.mc.profiler.endStartSection("outline"); |
222 | 230 | + if (!net.minecraftforge.client.ForgeHooksClient.onDrawBlockHighlight(renderglobal, entityplayer, mc.objectMouseOver, 0, partialTicks)) |
223 | 231 | renderglobal.drawSelectionBox(entityplayer, this.mc.objectMouseOver, 0, partialTicks); |
224 | 232 | GlStateManager.enableAlpha(); |
225 | 233 | } |
226 | | -@@ -1471,8 +1515,27 @@ |
| 234 | +@@ -1471,8 +1514,27 @@ |
227 | 235 | GlStateManager.depthMask(false); |
228 | 236 | this.mc.getTextureManager().bindTexture(TextureMap.LOCATION_BLOCKS_TEXTURE); |
229 | 237 | GlStateManager.shadeModel(7425); |
230 | 238 | + |
231 | | -+ if (com.cleanroommc.kirino.KirinoCore.KIRINO_CONFIG_HUB.isEnable() |
232 | | -+ && (!com.cleanroommc.kirino.KirinoCore.KIRINO_CONFIG_HUB.isEnableRenderDelegate() |
233 | | -+ || com.cleanroommc.kirino.KirinoCore.isRenderUnsupported())) |
| 239 | ++ if (com.cleanroommc.kirino.KirinoCommonCore.KIRINO_CONFIG_HUB.isEnable() |
| 240 | ++ && (!com.cleanroommc.kirino.KirinoCommonCore.KIRINO_CONFIG_HUB.isEnableRenderDelegate() |
| 241 | ++ || com.cleanroommc.kirino.KirinoClientCore.isRenderUnsupported())) |
234 | 242 | + { |
235 | | -+ com.cleanroommc.kirino.KirinoCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.RENDER_TRANSPARENT); |
| 243 | ++ com.cleanroommc.kirino.KirinoClientCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.RENDER_TRANSPARENT); |
236 | 244 | + } |
237 | 245 | + |
238 | 246 | this.mc.profiler.endStartSection("translucent"); |
|
251 | 259 | GlStateManager.shadeModel(7424); |
252 | 260 | GlStateManager.depthMask(true); |
253 | 261 | GlStateManager.enableCull(); |
254 | | -@@ -1485,6 +1548,9 @@ |
| 262 | +@@ -1485,6 +1547,9 @@ |
255 | 263 | this.renderCloudsCheck(renderglobal, partialTicks, pass, d0, d1, d2); |
256 | 264 | } |
257 | 265 |
|
|
261 | 269 | this.mc.profiler.endStartSection("hand"); |
262 | 270 |
|
263 | 271 | if (this.renderHand) |
264 | | -@@ -1492,6 +1558,14 @@ |
| 272 | +@@ -1492,6 +1557,14 @@ |
265 | 273 | GlStateManager.clear(256); |
266 | 274 | this.renderHand(partialTicks, pass); |
267 | 275 | } |
268 | 276 | + |
269 | | -+ if (com.cleanroommc.kirino.KirinoCore.KIRINO_CONFIG_HUB.isEnable() |
270 | | -+ && (!com.cleanroommc.kirino.KirinoCore.KIRINO_CONFIG_HUB.isEnableRenderDelegate() |
271 | | -+ || com.cleanroommc.kirino.KirinoCore.isRenderUnsupported())) |
| 277 | ++ if (com.cleanroommc.kirino.KirinoCommonCore.KIRINO_CONFIG_HUB.isEnable() |
| 278 | ++ && (!com.cleanroommc.kirino.KirinoCommonCore.KIRINO_CONFIG_HUB.isEnableRenderDelegate() |
| 279 | ++ || com.cleanroommc.kirino.KirinoClientCore.isRenderUnsupported())) |
272 | 280 | + { |
273 | | -+ com.cleanroommc.kirino.KirinoCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.POST_UPDATE); |
274 | | -+ com.cleanroommc.kirino.KirinoCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.RENDER_OVERLAY); |
| 281 | ++ com.cleanroommc.kirino.KirinoClientCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.POST_UPDATE); |
| 282 | ++ com.cleanroommc.kirino.KirinoClientCore.runHeadlessly(com.cleanroommc.kirino.engine.FramePhase.RENDER_OVERLAY); |
275 | 283 | + } |
276 | 284 | } |
277 | 285 |
|
278 | 286 | private void renderCloudsCheck(RenderGlobal renderGlobalIn, float partialTicks, int pass, double x, double y, double z) |
279 | | -@@ -1635,6 +1709,13 @@ |
| 287 | +@@ -1635,6 +1708,13 @@ |
280 | 288 |
|
281 | 289 | protected void renderRainSnow(float partialTicks) |
282 | 290 | { |
|
290 | 298 | float f = this.mc.world.getRainStrength(partialTicks); |
291 | 299 |
|
292 | 300 | if (!(f <= 0.0F)) |
293 | | -@@ -1908,29 +1989,16 @@ |
| 301 | +@@ -1908,29 +1988,16 @@ |
294 | 302 | this.fogColorGreen = (float)vec3d3.y; |
295 | 303 | this.fogColorBlue = (float)vec3d3.z; |
296 | 304 | } |
|
330 | 338 | } |
331 | 339 |
|
332 | 340 | float f13 = this.fogColor2 + (this.fogColor1 - this.fogColor2) * partialTicks; |
333 | | -@@ -1989,6 +2057,9 @@ |
| 341 | +@@ -1989,6 +2056,9 @@ |
334 | 342 | f6 = 1.0F / this.fogColorBlue; |
335 | 343 | } |
336 | 344 |
|
|
340 | 348 | this.fogColorRed = this.fogColorRed * (1.0F - f15) + this.fogColorRed * f6 * f15; |
341 | 349 | this.fogColorGreen = this.fogColorGreen * (1.0F - f15) + this.fogColorGreen * f6 * f15; |
342 | 350 | this.fogColorBlue = this.fogColorBlue * (1.0F - f15) + this.fogColorBlue * f6 * f15; |
343 | | -@@ -2004,6 +2075,13 @@ |
| 351 | +@@ -2004,6 +2074,13 @@ |
344 | 352 | this.fogColorBlue = f7; |
345 | 353 | } |
346 | 354 |
|
|
354 | 362 | GlStateManager.clearColor(this.fogColorRed, this.fogColorGreen, this.fogColorBlue, 0.0F); |
355 | 363 | } |
356 | 364 |
|
357 | | -@@ -2014,7 +2092,9 @@ |
| 365 | +@@ -2014,7 +2091,9 @@ |
358 | 366 | GlStateManager.glNormal3f(0.0F, -1.0F, 0.0F); |
359 | 367 | GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); |
360 | 368 | IBlockState iblockstate = ActiveRenderInfo.getBlockStateAtEntityViewpoint(this.mc.world, entity, partialTicks); |
|
365 | 373 | if (entity instanceof EntityLivingBase && ((EntityLivingBase)entity).isPotionActive(MobEffects.BLINDNESS)) |
366 | 374 | { |
367 | 375 | float f1 = 5.0F; |
368 | | -@@ -2100,6 +2180,7 @@ |
| 376 | +@@ -2100,6 +2179,7 @@ |
369 | 377 | GlStateManager.setFogStart(f * 0.05F); |
370 | 378 | GlStateManager.setFogEnd(Math.min(f, 192.0F) * 0.5F); |
371 | 379 | } |
|
0 commit comments