forked from Camotoy/Minecraft1.12.2-PowerPC
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path0001-Compiles-on-Java-8.patch
More file actions
1697 lines (1527 loc) · 70.9 KB
/
Copy path0001-Compiles-on-Java-8.patch
File metadata and controls
1697 lines (1527 loc) · 70.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
From a294cadbe69848221060daba90544a4ad15d7564 Mon Sep 17 00:00:00 2001
From: Camotoy <20743703+Camotoy@users.noreply.github.com>
Date: Tue, 16 Aug 2022 19:02:43 -0400
Subject: [PATCH] Compiles on Java 8
---
.../minecraft/block/state/BlockStateBase.java | 4 +-
.../minecraft/client/gui/GuiOverlayDebug.java | 2 +-
.../client/renderer/RenderGlobal.java | 6 +-
.../client/renderer/chunk/RenderChunk.java | 2 +-
.../renderer/entity/RenderLivingBase.java | 2 +-
.../client/renderer/entity/RenderManager.java | 4 +-
.../renderer/texture/TextureManager.java | 2 +-
.../client/renderer/texture/TextureMap.java | 6 +-
.../client/renderer/texture/TextureUtil.java | 6 +-
.../TileEntityRendererDispatcher.java | 2 +-
src/minecraft/net/minecraft/src/Config.java | 10 +-
src/minecraft/net/optifine/BlockPosM.java | 2 +-
.../net/optifine/ConnectedProperties.java | 2 +-
.../net/optifine/ConnectedTextures.java | 36 +++--
.../net/optifine/CustomBlockLayers.java | 2 +-
src/minecraft/net/optifine/CustomColors.java | 56 ++++----
.../net/optifine/CustomGuiProperties.java | 3 +-
src/minecraft/net/optifine/CustomGuis.java | 2 +-
.../net/optifine/CustomItemProperties.java | 12 +-
src/minecraft/net/optifine/CustomItems.java | 40 +++---
.../net/optifine/CustomLoadingScreens.java | 2 +-
.../net/optifine/CustomPanorama.java | 30 ++--
src/minecraft/net/optifine/Mipmaps.java | 8 +-
src/minecraft/net/optifine/SmartLeaves.java | 2 +-
.../net/optifine/TextureAnimation.java | 29 ++--
.../net/optifine/config/ConnectedParser.java | 2 +-
.../entity/model/CustomEntityModels.java | 22 +--
.../net/optifine/expr/ExpressionParser.java | 129 ++++++++----------
.../net/optifine/gui/GuiMessage.java | 2 +-
.../net/optifine/http/HttpPipeline.java | 2 +-
.../net/optifine/http/HttpUtils.java | 2 +-
.../net/optifine/model/ModelUtils.java | 10 +-
.../net/optifine/shaders/BlockAliases.java | 5 +-
.../net/optifine/shaders/EntityAliases.java | 3 +-
.../net/optifine/shaders/ItemAliases.java | 3 +-
.../net/optifine/shaders/SVertexBuilder.java | 6 +-
.../net/optifine/shaders/Shaders.java | 28 ++--
.../net/optifine/shaders/ShadersTex.java | 2 +-
.../shaders/config/ShaderPackParser.java | 25 ++--
.../net/optifine/util/ArrayUtils.java | 8 +-
.../net/optifine/util/CacheObjectArray.java | 2 +-
.../net/optifine/util/ChunkUtils.java | 2 +-
.../net/optifine/util/FontUtils.java | 3 +-
.../net/optifine/util/IteratorCache.java | 4 +-
.../net/optifine/util/LinkedList.java | 54 ++++----
.../net/optifine/util/LinkedListTest.java | 3 +-
.../net/optifine/util/NativeMemory.java | 7 +-
47 files changed, 299 insertions(+), 297 deletions(-)
diff --git a/src/minecraft/net/minecraft/block/state/BlockStateBase.java b/src/minecraft/net/minecraft/block/state/BlockStateBase.java
index 9b605df..aa77cee 100644
--- a/src/minecraft/net/minecraft/block/state/BlockStateBase.java
+++ b/src/minecraft/net/minecraft/block/state/BlockStateBase.java
@@ -32,7 +32,7 @@ public abstract class BlockStateBase implements IBlockState
}
private <T extends Comparable<T>> String getPropertyName(IProperty<T> property, Comparable<?> entry)
{
- return property.getName(entry);
+ return property.getName((T)entry); // Compile error
}
};
private int blockId = -1;
@@ -87,7 +87,7 @@ public abstract class BlockStateBase implements IBlockState
public <T extends Comparable<T>> IBlockState cycleProperty(IProperty<T> property)
{
- return this.withProperty(property, (Comparable)cyclePropertyValue(property.getAllowedValues(), this.getValue(property)));
+ return this.withProperty(property, cyclePropertyValue(property.getAllowedValues(), this.getValue(property))); //
}
protected static <T> T cyclePropertyValue(Collection<T> values, T currentValue)
diff --git a/src/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java b/src/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java
index 5576045..dc34800 100644
--- a/src/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java
+++ b/src/minecraft/net/minecraft/client/gui/GuiOverlayDebug.java
@@ -315,7 +315,7 @@ public class GuiOverlayDebug extends Gui
{
Entry < IProperty<?>, Comparable<? >> entry = (Entry)unmodifiableiterator.next();
iproperty = (IProperty)entry.getKey();
- T t = entry.getValue();
+ T t = (T) entry.getValue(); //
s1 = iproperty.getName(t);
if (Boolean.TRUE.equals(t))
diff --git a/src/minecraft/net/minecraft/client/renderer/RenderGlobal.java b/src/minecraft/net/minecraft/client/renderer/RenderGlobal.java
index fb0b6db..36c9ae8 100644
--- a/src/minecraft/net/minecraft/client/renderer/RenderGlobal.java
+++ b/src/minecraft/net/minecraft/client/renderer/RenderGlobal.java
@@ -209,8 +209,8 @@ public class RenderGlobal implements IWorldEventListener, IResourceManagerReload
public Set chunksToUpdateForced = new LinkedHashSet();
private Set<RenderChunk> chunksToUpdatePrev = new ObjectLinkedOpenHashSet<RenderChunk>();
private Deque visibilityDeque = new ArrayDeque();
- private List renderInfosEntities = new ArrayList(1024);
- private List renderInfosTileEntities = new ArrayList(1024);
+ private List<RenderGlobal.ContainerLocalRenderInformation> renderInfosEntities = new ArrayList<RenderGlobal.ContainerLocalRenderInformation>(1024); // Compile
+ private List<RenderGlobal.ContainerLocalRenderInformation> renderInfosTileEntities = new ArrayList<RenderGlobal.ContainerLocalRenderInformation>(1024); // Compile
private List renderInfosNormal = new ArrayList(1024);
private List renderInfosEntitiesNormal = new ArrayList(1024);
private List renderInfosTileEntitiesNormal = new ArrayList(1024);
@@ -1573,7 +1573,7 @@ public class RenderGlobal implements IWorldEventListener, IResourceManagerReload
this.mc.profiler.func_194339_b(() ->
{
- return "render_" + p_lambda$renderBlockLayer$0_0_;
+ return "render_" + blockLayerIn; // Compile error
});
this.renderBlockLayer(blockLayerIn);
this.mc.profiler.endSection();
diff --git a/src/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java b/src/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java
index b620e81..994b0c1 100644
--- a/src/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java
+++ b/src/minecraft/net/minecraft/client/renderer/chunk/RenderChunk.java
@@ -205,7 +205,7 @@ public class RenderChunk
boolean flag = Reflector.ForgeBlock_canRenderInLayer.exists();
boolean flag1 = Reflector.ForgeHooksClient_setRenderLayer.exists();
- for (BlockPosM blockposm : BlockPosM.getAllInBoxMutable(blockpos, blockpos1))
+ for (BlockPosM blockposm : BlockPosM.getAllInBoxMutableOptifine(blockpos, blockpos1)) // Name change for compile error
{
IBlockState iblockstate = chunkcacheof.getBlockState(blockposm);
Block block = iblockstate.getBlock();
diff --git a/src/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java b/src/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java
index 4f01737..4a72ee5 100644
--- a/src/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java
+++ b/src/minecraft/net/minecraft/client/renderer/entity/RenderLivingBase.java
@@ -58,7 +58,7 @@ public abstract class RenderLivingBase<T extends EntityLivingBase> extends Rende
public <V extends EntityLivingBase, U extends LayerRenderer<V>> boolean addLayer(U layer)
{
- return this.layerRenderers.add(layer);
+ return this.layerRenderers.add((LayerRenderer<T>) layer); //
}
public ModelBase getMainModel()
diff --git a/src/minecraft/net/minecraft/client/renderer/entity/RenderManager.java b/src/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
index 8f2abc5..49ef239 100644
--- a/src/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
+++ b/src/minecraft/net/minecraft/client/renderer/entity/RenderManager.java
@@ -261,7 +261,7 @@ public class RenderManager
if (render == null && entityClass != Entity.class)
{
- render = this.<T>getEntityClassRenderObject(entityClass.getSuperclass());
+ render = this.getEntityClassRenderObject((Class <? extends Entity >)entityClass.getSuperclass()); //
this.entityRenderMap.put(entityClass, render);
}
@@ -570,7 +570,7 @@ public class RenderManager
this.renderOutlines = renderOutlinesIn;
}
- public Map<Class, Render> getEntityRenderMap()
+ public Map<Class<? extends Entity>, Render<? extends Entity>> getEntityRenderMap() // Decompile error
{
return this.entityRenderMap;
}
diff --git a/src/minecraft/net/minecraft/client/renderer/texture/TextureManager.java b/src/minecraft/net/minecraft/client/renderer/texture/TextureManager.java
index d58ad3a..9b2ed32 100644
--- a/src/minecraft/net/minecraft/client/renderer/texture/TextureManager.java
+++ b/src/minecraft/net/minecraft/client/renderer/texture/TextureManager.java
@@ -225,7 +225,7 @@ public class TextureManager implements ITickable, IResourceManagerReloadListener
public void reloadBannerTextures()
{
- for (Entry<ResourceLocation, ITextureObject> entry : new HashSet(this.mapTextureObjects.entrySet()))
+ for (Entry<ResourceLocation, ITextureObject> entry : new HashSet<Entry<ResourceLocation, ITextureObject>>(this.mapTextureObjects.entrySet())) // Decompile error
{
ResourceLocation resourcelocation = entry.getKey();
ITextureObject itextureobject = entry.getValue();
diff --git a/src/minecraft/net/minecraft/client/renderer/texture/TextureMap.java b/src/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
index 5c5b347..58514cf 100644
--- a/src/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
+++ b/src/minecraft/net/minecraft/client/renderer/texture/TextureMap.java
@@ -109,7 +109,7 @@ public class TextureMap extends AbstractTexture implements ITickableTextureObjec
this.missingImage.setIconHeight(i);
int[][] aint1 = new int[this.mipmapLevels + 1][];
aint1[0] = aint;
- this.missingImage.setFramesTextureData(Lists.newArrayList(aint1));
+ this.missingImage.setFramesTextureData(Lists.<int[][]>newArrayList(aint1)); // Compile error
this.missingImage.setIndexInMap(this.counterIndexInMap.nextValue());
}
@@ -774,7 +774,7 @@ public class TextureMap extends AbstractTexture implements ITickableTextureObjec
return this.counterIndexInMap.getValue();
}
- private int detectMaxMipmapLevel(Map p_detectMaxMipmapLevel_1_, IResourceManager p_detectMaxMipmapLevel_2_)
+ private int detectMaxMipmapLevel(Map<String, TextureAtlasSprite> p_detectMaxMipmapLevel_1_, IResourceManager p_detectMaxMipmapLevel_2_) //
{
int i4 = this.detectMinimumSpriteSize(p_detectMaxMipmapLevel_1_, p_detectMaxMipmapLevel_2_, 20);
@@ -800,7 +800,7 @@ public class TextureMap extends AbstractTexture implements ITickableTextureObjec
return j4;
}
- private int detectMinimumSpriteSize(Map p_detectMinimumSpriteSize_1_, IResourceManager p_detectMinimumSpriteSize_2_, int p_detectMinimumSpriteSize_3_)
+ private int detectMinimumSpriteSize(Map<String, TextureAtlasSprite> p_detectMinimumSpriteSize_1_, IResourceManager p_detectMinimumSpriteSize_2_, int p_detectMinimumSpriteSize_3_) // Compile error
{
Map map1 = new HashMap();
diff --git a/src/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java b/src/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java
index 518e97d..b04fa85 100644
--- a/src/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java
+++ b/src/minecraft/net/minecraft/client/renderer/texture/TextureUtil.java
@@ -273,7 +273,7 @@ public class TextureUtil
public static int[] readImageData(IResourceManager resourceManager, ResourceLocation imageLocation) throws IOException
{
IResource iresource = null;
- Object i;
+ //Object i;
try
{
@@ -290,14 +290,14 @@ public class TextureUtil
return aint;
}
- i = null;
+ //i = null;
}
finally
{
IOUtils.closeQuietly((Closeable)iresource);
}
- return (int[])i;
+ return null; // Compile error
}
public static BufferedImage readBufferedImage(InputStream imageStream) throws IOException
diff --git a/src/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java b/src/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java
index 0cf312c..e4ce4ea 100644
--- a/src/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java
+++ b/src/minecraft/net/minecraft/client/renderer/tileentity/TileEntityRendererDispatcher.java
@@ -95,7 +95,7 @@ public class TileEntityRendererDispatcher
if (tileentityspecialrenderer == null && teClass != TileEntity.class)
{
- tileentityspecialrenderer = this.<T>getRenderer(teClass.getSuperclass());
+ tileentityspecialrenderer = this.<T>getRenderer((Class <? extends TileEntity >) teClass.getSuperclass()); // Fix compile error
this.renderers.put(teClass, tileentityspecialrenderer);
}
diff --git a/src/minecraft/net/minecraft/src/Config.java b/src/minecraft/net/minecraft/src/Config.java
index b14d477..142e5a3 100644
--- a/src/minecraft/net/minecraft/src/Config.java
+++ b/src/minecraft/net/minecraft/src/Config.java
@@ -1136,7 +1136,7 @@ public class Config
public static IResourcePack[] getResourcePacks()
{
ResourcePackRepository resourcepackrepository = minecraft.getResourcePackRepository();
- List list = resourcepackrepository.getRepositoryEntries();
+ List<ResourcePackRepository.Entry> list = resourcepackrepository.getRepositoryEntries(); // Compile error
List list1 = new ArrayList();
for (ResourcePackRepository.Entry resourcepackrepository$entry : list)
@@ -2292,7 +2292,7 @@ public class Config
{
int i = p_addObjectToArray_0_.length;
int j = i + 1;
- Object[] aobject = Array.newInstance(p_addObjectToArray_0_.getClass().getComponentType(), j);
+ Object[] aobject = (Object[]) Array.newInstance(p_addObjectToArray_0_.getClass().getComponentType(), j); //
System.arraycopy(p_addObjectToArray_0_, 0, aobject, 0, i);
aobject[i] = p_addObjectToArray_1_;
return aobject;
@@ -2303,7 +2303,7 @@ public class Config
{
List list = new ArrayList(Arrays.asList(p_addObjectToArray_0_));
list.add(p_addObjectToArray_2_, p_addObjectToArray_1_);
- Object[] aobject = Array.newInstance(p_addObjectToArray_0_.getClass().getComponentType(), list.size());
+ Object[] aobject = (Object[]) Array.newInstance(p_addObjectToArray_0_.getClass().getComponentType(), list.size()); //
return list.toArray(aobject);
}
@@ -2321,7 +2321,7 @@ public class Config
{
int i = p_addObjectsToArray_0_.length;
int j = i + p_addObjectsToArray_1_.length;
- Object[] aobject = Array.newInstance(p_addObjectsToArray_0_.getClass().getComponentType(), j);
+ Object[] aobject = (Object[]) Array.newInstance(p_addObjectsToArray_0_.getClass().getComponentType(), j); //
System.arraycopy(p_addObjectsToArray_0_, 0, aobject, 0, i);
System.arraycopy(p_addObjectsToArray_1_, 0, aobject, i, p_addObjectsToArray_1_.length);
return aobject;
@@ -2352,7 +2352,7 @@ public class Config
}
else
{
- Object[] aobject = Array.newInstance(p_collectionToArray_1_, p_collectionToArray_0_.size());
+ Object[] aobject = (Object[]) Array.newInstance(p_collectionToArray_1_, p_collectionToArray_0_.size()); //
return p_collectionToArray_0_.toArray(aobject);
}
}
diff --git a/src/minecraft/net/optifine/BlockPosM.java b/src/minecraft/net/optifine/BlockPosM.java
index 767feb5..9ffe82c 100644
--- a/src/minecraft/net/optifine/BlockPosM.java
+++ b/src/minecraft/net/optifine/BlockPosM.java
@@ -146,7 +146,7 @@ public class BlockPosM extends BlockPos
return new BlockPos(this.mx, this.my, this.mz);
}
- public static Iterable getAllInBoxMutable(BlockPos from, BlockPos to)
+ public static Iterable<BlockPosM> getAllInBoxMutableOptifine(BlockPos from, BlockPos to) // Name change for compile error
{
final BlockPos blockpos = new BlockPos(Math.min(from.getX(), to.getX()), Math.min(from.getY(), to.getY()), Math.min(from.getZ(), to.getZ()));
final BlockPos blockpos1 = new BlockPos(Math.max(from.getX(), to.getX()), Math.max(from.getY(), to.getY()), Math.max(from.getZ(), to.getZ()));
diff --git a/src/minecraft/net/optifine/ConnectedProperties.java b/src/minecraft/net/optifine/ConnectedProperties.java
index efac46c..50c0848 100644
--- a/src/minecraft/net/optifine/ConnectedProperties.java
+++ b/src/minecraft/net/optifine/ConnectedProperties.java
@@ -471,7 +471,7 @@ public class ConnectedProperties
}
}
- public static IProperty getProperty(String key, Collection properties)
+ public static IProperty getProperty(String key, Collection<IProperty> properties) // Decompile error
{
for (IProperty iproperty : properties)
{
diff --git a/src/minecraft/net/optifine/ConnectedTextures.java b/src/minecraft/net/optifine/ConnectedTextures.java
index a8d3057..09f898c 100644
--- a/src/minecraft/net/optifine/ConnectedTextures.java
+++ b/src/minecraft/net/optifine/ConnectedTextures.java
@@ -2405,20 +2405,19 @@ public class ConnectedTextures
private static ConnectedProperties[][] propertyListToArray(List list)
{
- ConnectedProperties[][] aconnectedproperties = new ConnectedProperties[list.size()][];
+ // Paste in properly decompiled method
+ ConnectedProperties[][] propArr = new ConnectedProperties[list.size()][];
- for (int i = 0; i < list.size(); ++i)
- {
- List list = (List)list.get(i);
-
- if (list != null)
- {
- ConnectedProperties[] aconnectedproperties1 = (ConnectedProperties[])list.toArray(new ConnectedProperties[list.size()]);
- aconnectedproperties[i] = aconnectedproperties1;
+ for(int i = 0; i < list.size(); ++i) {
+ List subList = (List)list.get(i);
+ if (subList != null) {
+ ConnectedProperties[] subArr = (ConnectedProperties[])((ConnectedProperties[])subList.toArray(new ConnectedProperties[subList.size()]));
+ propArr[i] = subArr;
}
}
- return aconnectedproperties;
+ return propArr;
+ // End
}
private static void addToTileList(ConnectedProperties cp, List tileList)
@@ -2472,20 +2471,19 @@ public class ConnectedTextures
private static void addToList(ConnectedProperties cp, List list, int id)
{
- while (id >= list.size())
- {
+ // Paste in properly decompiled method
+ while(id >= list.size()) {
list.add((Object)null);
}
- List list = (List)list.get(id);
-
- if (list == null)
- {
- list = new ArrayList();
- list.set(id, list);
+ List subList = (List)list.get(id);
+ if (subList == null) {
+ subList = new ArrayList();
+ list.set(id, subList);
}
- list.add(cp);
+ ((List)subList).add(cp);
+ // End
}
private static String[] getDefaultCtmPaths()
diff --git a/src/minecraft/net/optifine/CustomBlockLayers.java b/src/minecraft/net/optifine/CustomBlockLayers.java
index 370d5c2..28ff8c3 100644
--- a/src/minecraft/net/optifine/CustomBlockLayers.java
+++ b/src/minecraft/net/optifine/CustomBlockLayers.java
@@ -101,7 +101,7 @@ public class CustomBlockLayers
{
while (listLayers.size() < j + 1)
{
- listLayers.add((Object)null);
+ listLayers.add(null); //
}
if (listLayers.get(j) != null)
diff --git a/src/minecraft/net/optifine/CustomColors.java b/src/minecraft/net/optifine/CustomColors.java
index 89ae88d..da753c2 100644
--- a/src/minecraft/net/optifine/CustomColors.java
+++ b/src/minecraft/net/optifine/CustomColors.java
@@ -331,7 +331,7 @@ public class CustomColors
if (ainteger.length <= 0)
{
- return new ImmutablePair<LightMapPack[], Integer>((Object)null, Integer.valueOf(0));
+ return new ImmutablePair<LightMapPack[], Integer>(null, Integer.valueOf(0)); // Decompile error
}
else
{
@@ -469,8 +469,9 @@ public class CustomColors
String s = "palette.block.";
Map map = new HashMap();
- for (String s1 : props.keySet())
+ for (Object o : props.keySet()) //
{
+ String s1 = (String) o; //
String s2 = props.getProperty(s1);
if (s1.startsWith(s))
@@ -619,38 +620,36 @@ public class CustomColors
private static void addToList(CustomColormap cm, List list, int id)
{
- while (id >= list.size())
- {
+ // Paste in proper method
+ while(id >= list.size()) {
list.add((Object)null);
}
- List list = (List)list.get(id);
-
- if (list == null)
- {
- list = new ArrayList();
- list.set(id, list);
+ List subList = (List)list.get(id);
+ if (subList == null) {
+ subList = new ArrayList();
+ list.set(id, subList);
}
- list.add(cm);
+ ((List)subList).add(cm);
+ // End
}
private static CustomColormap[][] blockListToArray(List list)
{
- CustomColormap[][] acustomcolormap = new CustomColormap[list.size()][];
+ // Paste in proper method
+ CustomColormap[][] colArr = new CustomColormap[list.size()][];
- for (int i = 0; i < list.size(); ++i)
- {
- List list = (List)list.get(i);
-
- if (list != null)
- {
- CustomColormap[] acustomcolormap1 = (CustomColormap[])list.toArray(new CustomColormap[list.size()]);
- acustomcolormap[i] = acustomcolormap1;
+ for(int i = 0; i < list.size(); ++i) {
+ List subList = (List)list.get(i);
+ if (subList != null) {
+ CustomColormap[] subArr = (CustomColormap[])((CustomColormap[])subList.toArray(new CustomColormap[subList.size()]));
+ colArr[i] = subArr;
}
}
- return acustomcolormap;
+ return colArr;
+ // End
}
private static int readColor(Properties props, String[] names)
@@ -1377,8 +1376,9 @@ public class CustomColors
Set set = props.keySet();
int i = 0;
- for (String s : set)
+ for (Object o : set) //
{
+ String s = (String) o; //
String s1 = props.getProperty(s);
if (s.startsWith(prefix))
@@ -1516,8 +1516,9 @@ public class CustomColors
float[][] afloat1 = new float[aenumdyecolor.length][];
int k = 0;
- for (String s : props.keySet())
+ for (Object o : props.keySet()) //
{
+ String s = (String) o; //
String s1 = props.getProperty(s);
if (s.startsWith(prefix))
@@ -1589,8 +1590,9 @@ public class CustomColors
Arrays.fill(aint, -1);
int i = 0;
- for (String s : props.keySet())
+ for (Object o : props.keySet()) //
{
+ String s = (String) o; //
String s1 = props.getProperty(s);
if (s.startsWith(prefix))
@@ -1645,8 +1647,9 @@ public class CustomColors
Arrays.fill(aint, -1);
int i = 0;
- for (String s : props.keySet())
+ for (Object o : props.keySet()) //
{
+ String s = (String) o; //
String s1 = props.getProperty(s);
if (s.startsWith(prefix))
@@ -1684,8 +1687,9 @@ public class CustomColors
Arrays.fill(aint, -1);
int i = 0;
- for (String s : props.keySet())
+ for (Object o : props.keySet()) //
{
+ String s = (String) o; //
String s1 = props.getProperty(s);
if (s.startsWith(prefix))
diff --git a/src/minecraft/net/optifine/CustomGuiProperties.java b/src/minecraft/net/optifine/CustomGuiProperties.java
index 6aa761a..3efe6f1 100644
--- a/src/minecraft/net/optifine/CustomGuiProperties.java
+++ b/src/minecraft/net/optifine/CustomGuiProperties.java
@@ -209,8 +209,9 @@ public class CustomGuiProperties
String s5 = property + ".";
- for (String s1 : props.keySet())
+ for (Object o : props.keySet()) //
{
+ String s1 = (String) o; //
if (s1.startsWith(s5))
{
String s2 = s1.substring(s5.length());
diff --git a/src/minecraft/net/optifine/CustomGuis.java b/src/minecraft/net/optifine/CustomGuis.java
index 0797389..bedab60 100644
--- a/src/minecraft/net/optifine/CustomGuis.java
+++ b/src/minecraft/net/optifine/CustomGuis.java
@@ -310,7 +310,7 @@ public class CustomGuis
while (listProps.size() <= i)
{
- listProps.add((Object)null);
+ listProps.add(null); //
}
List<CustomGuiProperties> list = (List)listProps.get(i);
diff --git a/src/minecraft/net/optifine/CustomItemProperties.java b/src/minecraft/net/optifine/CustomItemProperties.java
index 3b2f0c3..0cda20f 100644
--- a/src/minecraft/net/optifine/CustomItemProperties.java
+++ b/src/minecraft/net/optifine/CustomItemProperties.java
@@ -350,8 +350,9 @@ public class CustomItemProperties
Set set = map.keySet();
Map map1 = new LinkedHashMap();
- for (String s1 : set)
+ for (Object o : set) //
{
+ String s1 = (String) o; //
String s2 = (String)map.get(s1);
s2 = fixTextureName(s2, basePath);
map1.put(s1, s2);
@@ -431,8 +432,9 @@ public class CustomItemProperties
Set set = map.keySet();
Map map1 = new LinkedHashMap();
- for (String s1 : set)
+ for (Object o : set) //
{
+ String s1 = (String) o; //
String s2 = (String)map.get(s1);
s2 = fixModelName(s2, basePath);
map1.put(s1, s2);
@@ -639,8 +641,9 @@ public class CustomItemProperties
{
List list = new ArrayList();
- for (String s1 : map.keySet())
+ for (Object o : map.keySet()) //
{
+ String s1 = (String) o; //
String s2 = (String)map.get(s1);
String s3 = s1.substring(s.length());
NbtTagValue nbttagvalue = new NbtTagValue(s3, s2);
@@ -656,8 +659,9 @@ public class CustomItemProperties
{
Map map = new LinkedHashMap();
- for (String s : props.keySet())
+ for (Object o : props.keySet()) //
{
+ String s = (String) o; //
String s1 = props.getProperty(s);
if (s.startsWith(keyPrefix))
diff --git a/src/minecraft/net/optifine/CustomItems.java b/src/minecraft/net/optifine/CustomItems.java
index 6e782ac..df17e2b 100644
--- a/src/minecraft/net/optifine/CustomItems.java
+++ b/src/minecraft/net/optifine/CustomItems.java
@@ -503,21 +503,20 @@ public class CustomItems
private static CustomItemProperties[][] propertyListToArray(List list)
{
- CustomItemProperties[][] acustomitemproperties = new CustomItemProperties[list.size()][];
-
- for (int i = 0; i < list.size(); ++i)
- {
- List list = (List)list.get(i);
-
- if (list != null)
- {
- CustomItemProperties[] acustomitemproperties1 = (CustomItemProperties[])list.toArray(new CustomItemProperties[list.size()]);
- Arrays.sort(acustomitemproperties1, new CustomItemsComparator());
- acustomitemproperties[i] = acustomitemproperties1;
+ // Copy a properly decompiled method
+ CustomItemProperties[][] propArr = new CustomItemProperties[list.size()][];
+
+ for(int i = 0; i < list.size(); ++i) {
+ List subList = (List)list.get(i);
+ if (subList != null) {
+ CustomItemProperties[] subArr = (CustomItemProperties[])((CustomItemProperties[])subList.toArray(new CustomItemProperties[subList.size()]));
+ Arrays.sort(subArr, new CustomItemsComparator());
+ propArr[i] = subArr;
}
}
- return acustomitemproperties;
+ return propArr;
+ // End
}
private static void addToItemList(CustomItemProperties cp, List itemList)
@@ -559,20 +558,19 @@ public class CustomItems
private static void addToList(CustomItemProperties cp, List list, int id)
{
- while (id >= list.size())
- {
+ // Properly decompiled
+ while(id >= list.size()) {
list.add((Object)null);
}
- List list = (List)list.get(id);
-
- if (list == null)
- {
- list = new ArrayList();
- list.set(id, list);
+ List subList = (List)list.get(id);
+ if (subList == null) {
+ subList = new ArrayList();
+ list.set(id, subList);
}
- list.add(cp);
+ ((List)subList).add(cp);
+ // End
}
public static IBakedModel getCustomItemModel(ItemStack itemStack, IBakedModel model, ResourceLocation modelLocation, boolean fullModel)
diff --git a/src/minecraft/net/optifine/CustomLoadingScreens.java b/src/minecraft/net/optifine/CustomLoadingScreens.java
index 1a53ca6..032fcb9 100644
--- a/src/minecraft/net/optifine/CustomLoadingScreens.java
+++ b/src/minecraft/net/optifine/CustomLoadingScreens.java
@@ -76,7 +76,7 @@ public class CustomLoadingScreens
if (ainteger.length <= 0)
{
- return new ImmutablePair<CustomLoadingScreen[], Integer>((Object)null, Integer.valueOf(0));
+ return new ImmutablePair<CustomLoadingScreen[], Integer>(null, Integer.valueOf(0)); // Decompile error
}
else
{
diff --git a/src/minecraft/net/optifine/CustomPanorama.java b/src/minecraft/net/optifine/CustomPanorama.java
index eb080d1..cbd8f79 100644
--- a/src/minecraft/net/optifine/CustomPanorama.java
+++ b/src/minecraft/net/optifine/CustomPanorama.java
@@ -113,29 +113,25 @@ public class CustomPanorama
private static int[] getWeights(Properties[] properties)
{
- int[] aint = new int[properties.length];
+ // Paste in properly decompiled method
+ int[] weights = new int[properties.length];
- for (int i = 0; i < aint.length; ++i)
- {
- Properties properties = properties[i];
-
- if (properties == null)
- {
- properties = properties[0];
+ for(int i = 0; i < weights.length; ++i) {
+ Properties prop = properties[i];
+ if (prop == null) {
+ prop = properties[0];
}
- if (properties == null)
- {
- aint[i] = 1;
- }
- else
- {
- String s = properties.getProperty("weight", (String)null);
- aint[i] = Config.parseInt(s, 1);
+ if (prop == null) {
+ weights[i] = 1;
+ } else {
+ String str = prop.getProperty("weight", (String)null);
+ weights[i] = Config.parseInt(str, 1);
}
}
- return aint;
+ return weights;
+ // End
}
private static int getRandomIndex(int[] weights)
diff --git a/src/minecraft/net/optifine/Mipmaps.java b/src/minecraft/net/optifine/Mipmaps.java
index 5bd332f..1453370 100644
--- a/src/minecraft/net/optifine/Mipmaps.java
+++ b/src/minecraft/net/optifine/Mipmaps.java
@@ -173,9 +173,11 @@ public class Mipmaps
private int averageColor(int i, int j)
{
- int i = (i & -16777216) >> 24 & 255;
- int j = (j & -16777216) >> 24 & 255;
- return (i + j >> 1 << 24) + ((i & 16711422) + (j & 16711422) >> 1);
+ // Properly decompiled methods
+ int k = (i & -16777216) >> 24 & 255;
+ int l = (j & -16777216) >> 24 & 255;
+ return (k + l >> 1 << 24) + ((i & 16711422) + (j & 16711422) >> 1);
+ // End
}
public static IntBuffer[] makeMipmapBuffers(Dimension[] mipmapDimensions, int[][] mipmapDatas)
diff --git a/src/minecraft/net/optifine/SmartLeaves.java b/src/minecraft/net/optifine/SmartLeaves.java
index 0db83a9..2ad9a7e 100644
--- a/src/minecraft/net/optifine/SmartLeaves.java
+++ b/src/minecraft/net/optifine/SmartLeaves.java
@@ -164,7 +164,7 @@ public class SmartLeaves
if (ibakedmodel != null && ibakedmodel != modelmanager.getMissingModel())
{
- List list = ibakedmodel.getQuads((IBlockState)null, (EnumFacing)null, 0L);
+ List<BakedQuad> list = ibakedmodel.getQuads((IBlockState)null, (EnumFacing)null, 0L); // Decompile error
if (list.size() == 0)
{
diff --git a/src/minecraft/net/optifine/TextureAnimation.java b/src/minecraft/net/optifine/TextureAnimation.java
index 9ccab7b..c8802d9 100644
--- a/src/minecraft/net/optifine/TextureAnimation.java
+++ b/src/minecraft/net/optifine/TextureAnimation.java
@@ -203,25 +203,22 @@ public class TextureAnimation
private void updateTextureInerpolate(TextureAnimationFrame frame1, TextureAnimationFrame frame2, double k)
{
- int i = this.frameWidth * this.frameHeight * 4;
- int j = i * frame1.index;
-
- if (j + i <= this.imageData.limit())
- {
- int k = i * frame2.index;
-
- if (k + i <= this.imageData.limit())
- {
+ // Paste in properly decompiled method
+ int frameLen = this.frameWidth * this.frameHeight * 4;
+ int offset1 = frameLen * frame1.index;
+ if (offset1 + frameLen <= this.imageData.limit()) {
+ int offset2 = frameLen * frame2.index;
+ if (offset2 + frameLen <= this.imageData.limit()) {
this.interpolateData.clear();
- for (int l = 0; l < i; ++l)
- {
- int i1 = this.imageData.get(j + l) & 255;
- int j1 = this.imageData.get(k + l) & 255;
- int k1 = this.mix(i1, j1, k);
- byte b0 = (byte)k1;
- this.interpolateData.put(b0);
+ for(int i = 0; i < frameLen; ++i) {
+ int c1 = this.imageData.get(offset1 + i) & 255;
+ int c2 = this.imageData.get(offset2 + i) & 255;
+ int c = this.mix(c1, c2, k);
+ byte b = (byte)c;
+ this.interpolateData.put(b);
}
+ // End
this.interpolateData.flip();
GlStateManager.bindTexture(this.dstTextId);
diff --git a/src/minecraft/net/optifine/config/ConnectedParser.java b/src/minecraft/net/optifine/config/ConnectedParser.java
index 3945435..f8eee3c 100644
--- a/src/minecraft/net/optifine/config/ConnectedParser.java
+++ b/src/minecraft/net/optifine/config/ConnectedParser.java
@@ -448,7 +448,7 @@ public class ConnectedParser
return comparable;
}
- public static Comparable getPropertyValue(String value, Collection propertyValues)
+ public static Comparable getPropertyValue(String value, Collection<Comparable> propertyValues) // Decompile error
{
for (Comparable comparable : propertyValues)
{
diff --git a/src/minecraft/net/optifine/entity/model/CustomEntityModels.java b/src/minecraft/net/optifine/entity/model/CustomEntityModels.java
index 3e1e539..a4201b7 100644
--- a/src/minecraft/net/optifine/entity/model/CustomEntityModels.java
+++ b/src/minecraft/net/optifine/entity/model/CustomEntityModels.java
@@ -19,7 +19,9 @@ import net.minecraft.client.renderer.entity.Render;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer;
+import net.minecraft.entity.Entity;
import net.minecraft.src.Config;
+import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.ResourceLocation;
import net.optifine.entity.model.anim.ModelResolver;
import net.optifine.entity.model.anim.ModelUpdater;
@@ -27,13 +29,13 @@ import net.optifine.entity.model.anim.ModelUpdater;
public class CustomEntityModels
{
private static boolean active = false;
- private static Map<Class, Render> originalEntityRenderMap = null;
- private static Map<Class, TileEntitySpecialRenderer> originalTileEntityRenderMap = null;
+ private static Map<Class<? extends Entity>, Render<? extends Entity>> originalEntityRenderMap = null; //
+ private static Map<Class<? extends TileEntity>, TileEntitySpecialRenderer<? extends TileEntity>> originalTileEntityRenderMap = null; // Decompile error
public static void update()
{
- Map<Class, Render> map = getEntityRenderMap();
- Map<Class, TileEntitySpecialRenderer> map1 = getTileEntityRenderMap();
+ Map<Class<? extends Entity>, Render<? extends Entity>> map = getEntityRenderMap(); //
+ Map<Class<? extends TileEntity>, TileEntitySpecialRenderer<? extends TileEntity>> map1 = getTileEntityRenderMap(); // Decompile error
if (map == null)
{
@@ -88,10 +90,10 @@ public class CustomEntityModels
}
}
- private static Map<Class, Render> getEntityRenderMap()
+ private static Map<Class<? extends Entity>, Render<? extends Entity>> getEntityRenderMap() //
{
RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
- Map<Class, Render> map = rendermanager.getEntityRenderMap();
+ Map<Class<? extends Entity>, Render<? extends Entity>> map = rendermanager.getEntityRenderMap(); //
if (map == null)
{
@@ -101,20 +103,20 @@ public class CustomEntityModels
{
if (originalEntityRenderMap == null)
{
- originalEntityRenderMap = new HashMap<Class, Render>(map);
+ originalEntityRenderMap = new HashMap<Class<? extends Entity>, Render<? extends Entity>>(map); //
}
return map;
}
}
- private static Map<Class, TileEntitySpecialRenderer> getTileEntityRenderMap()
+ private static Map<Class<? extends TileEntity>, TileEntitySpecialRenderer<? extends TileEntity>> getTileEntityRenderMap() // Decompile error
{
- Map<Class, TileEntitySpecialRenderer> map = TileEntityRendererDispatcher.instance.renderers;
+ Map<Class<? extends TileEntity>, TileEntitySpecialRenderer<? extends TileEntity>> map = TileEntityRendererDispatcher.instance.renderers; // Decompile error
if (originalTileEntityRenderMap == null)
{
- originalTileEntityRenderMap = new HashMap<Class, TileEntitySpecialRenderer>(map);
+ originalTileEntityRenderMap = new HashMap<Class<? extends TileEntity>, TileEntitySpecialRenderer<? extends TileEntity>>(map); // Decompile error
}
return map;
diff --git a/src/minecraft/net/optifine/expr/ExpressionParser.java b/src/minecraft/net/optifine/expr/ExpressionParser.java
index d967cc4..c547677 100644
--- a/src/minecraft/net/optifine/expr/ExpressionParser.java
+++ b/src/minecraft/net/optifine/expr/ExpressionParser.java
@@ -244,68 +244,60 @@ public class ExpressionParser
private FunctionType getFunctionType(Token token, Deque<Token> deque) throws ParseException
{
- Token token = deque.peek();
-
- if (token != null && token.getType() == TokenType.BRACKET_OPEN)
- {
- FunctionType functiontype1 = FunctionType.parse(token.getText());
- checkNull(functiontype1, "Unknown function: " + token);
- return functiontype1;
- }
- else
- {
- FunctionType functiontype = FunctionType.parse(token.getText());
-
- if (functiontype == null)
- {
+ // Just copy the entire method decompiled properly
+ Token tokenNext = deque.peek();
+ FunctionType type;
+ if (tokenNext != null && tokenNext.getType() == TokenType.BRACKET_OPEN) {
+ type = FunctionType.parse(token.getText());
+ checkNull(type, "Unknown function: " + token);
+ return type;
+ } else {
+ type = FunctionType.parse(token.getText());
+ if (type == null) {
return null;
- }
- else if (functiontype.getParameterCount(new IExpression[0]) > 0)
- {
- throw new ParseException("Missing arguments: " + functiontype);
- }
- else
- {
- return functiontype;
+ } else if (type.getParameterCount(new IExpression[0]) > 0) {
+ throw new ParseException("Missing arguments: " + type);
+ } else {
+ return type;
}
}
+ // End
}
private IExpression makeFunction(FunctionType type, Deque<Token> deque) throws ParseException
{
- if (type.getParameterCount(new IExpression[0]) == 0)
- {
- Token token = deque.peek();
-
- if (token == null || token.getType() != TokenType.BRACKET_OPEN)
- {
+ // Just copy the entire method decompiled properly
+ Token tokenNext;
+ if (type.getParameterCount(new IExpression[0]) == 0) {
+ tokenNext = (Token)deque.peek();
+ if (tokenNext == null || tokenNext.getType() != TokenType.BRACKET_OPEN) {
return makeFunction(type, new IExpression[0]);
}
}
- Token token1 = deque.poll();
- Deque<Token> deque = getGroup(deque, TokenType.BRACKET_CLOSE, true);
- IExpression[] aiexpression = this.parseExpressions(deque);
- return makeFunction(type, aiexpression);
+ tokenNext = (Token)deque.poll();
+ Deque<Token> dequeBracketed = getGroup(deque, TokenType.BRACKET_CLOSE, true);
+ IExpression[] exprs = this.parseExpressions(dequeBracketed);
+ return makeFunction(type, exprs);
+ // End
}
private IExpression[] parseExpressions(Deque<Token> deque) throws ParseException
{
- List<IExpression> list = new ArrayList<IExpression>();
-
- while (true)
- {
- Deque<Token> deque = getGroup(deque, TokenType.COMMA, false);
- IExpression iexpression = this.parseInfix(deque);
-
- if (iexpression == null)
- {
- IExpression[] aiexpression = (IExpression[])list.toArray(new IExpression[list.size()]);
- return aiexpression;
+ // Just copy the entire method decompiled properly
+ ArrayList list = new ArrayList();
+
+ while(true) {
+ Deque<Token> dequeArg = getGroup(deque, TokenType.COMMA, false);
+ IExpression expr = this.parseInfix(dequeArg);
+ if (expr == null) {
+ IExpression[] exprs = (IExpression[])((IExpression[])list.toArray(new IExpression[list.size()]));
+ return exprs;
}
- list.add(iexpression);
+ list.add(expr);
}