generated from calmilamsy/stationapi-example-mod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
merged.patch
18411 lines (17418 loc) · 758 KB
/
merged.patch
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
--- net/minecraft/game/world/block/RedstoneOreBlock.java
+++ net/minecraft/game/world/block/RedstoneOreBlock.java
@@ -7,6 +7,8 @@
import net.minecraft.game.world.World;
import net.minecraft.game.world.material.Material;
+import static net.minecraft.util.SharedConstants.getAtlasTexture;
+
public class RedstoneOreBlock extends Block {
private boolean glowing;
@@ -23,6 +25,10 @@
return 30;
}
+ public int getBlockTextureFromSideAndMetadata(int var1, int var2) {
+ return this.textureIndex + (var2 & 3);
+ }
+
public void onBlockClicked(World var1, int var2, int var3, int var4, PlayerEntity var5) {
this.glow(var1, var2, var3, var4);
super.onBlockClicked(var1, var2, var3, var4, var5);
@@ -41,14 +47,14 @@
private void glow(World var1, int var2, int var3, int var4) {
this.activateGlow(var1, var2, var3, var4);
if(this.blockID == Block.redstoneOre.blockID) {
- var1.setBlockWithNotify(var2, var3, var4, Block.glowingRedstoneOre.blockID);
+ var1.setBlockAndMetadataWithNotify(var2, var3, var4, Block.glowingRedstoneOre.blockID, var1.getBlockMetadata(var2,var3,var4));
}
}
public void updateTick(World var1, int var2, int var3, int var4, Random var5) {
if(this.blockID == Block.glowingRedstoneOre.blockID) {
- var1.setBlockWithNotify(var2, var3, var4, Block.redstoneOre.blockID);
+ var1.setBlockAndMetadataWithNotify(var2, var3, var4, Block.redstoneOre.blockID, var1.getBlockMetadata(var2,var3,var4));
}
}
--- /dev/null
+++ net/minecraft/game/world/biome/categories/tropical/SwamplandBiome.java
@@ -1,0 +1,19 @@
+package net.minecraft.game.world.biome.categories.tropical;
+
+import net.minecraft.game.world.biome.Biome;
+import net.minecraft.game.world.terrain.feature.Feature;
+import net.minecraft.game.world.terrain.feature.TreeFeature;
+
+import java.util.Random;
+
+public class SwamplandBiome extends Biome {
+ @Override
+ public Feature getRandomTreeFeature(Random rand) {
+ return new TreeFeature();
+ }
+
+ @Override
+ public int getTreeCount(int treeNoise, int treeBonus) {
+ return treeNoise + treeBonus + 5;
+ }
+}
--- net/minecraft/game/world/terrain/generate/TerrainGenNetherCaves.java
+++ net/minecraft/game/world/terrain/generate/TerrainGenNetherCaves.java
@@ -4,13 +4,14 @@
import net.minecraft.game.world.World;
import net.minecraft.game.world.block.Block;
import net.minecraft.util.MathHelper;
+import net.minecraft.util.SharedConstants;
public class TerrainGenNetherCaves extends TerrainGenerator {
- protected void generateLargeCaveNode(int var1, int var2, byte[] var3, double var4, double var6, double var8) {
+ protected void generateLargeCaveNode(int var1, int var2, short[] var3, double var4, double var6, double var8) {
this.generateCaveNode(var1, var2, var3, var4, var6, var8, 1.0F + this.rand.nextFloat() * 6.0F, 0.0F, 0.0F, -1, -1, 0.5D);
}
- protected void generateCaveNode(int var1, int var2, byte[] var3, double var4, double var6, double var8, float var10, float var11, float var12, int var13, int var14, double var15) {
+ protected void generateCaveNode(int var1, int var2, short[] var3, double var4, double var6, double var8, float var10, float var11, float var12, int var13, int var14, double var15) {
double var17 = (double)(var1 * 16 + 8);
double var19 = (double)(var2 * 16 + 8);
float var21 = 0.0F;
@@ -102,7 +103,7 @@
for(var40 = var52; !var55 && var40 < var34; ++var40) {
for(int var41 = var54; !var55 && var41 < var38; ++var41) {
for(int var42 = var36 + 1; !var55 && var42 >= var53 - 1; --var42) {
- var43 = (var40 * 16 + var41) * 128 + var42;
+ var43 = (var40 * 16 + var41) * SharedConstants.CHUNK_HEIGHT + var42;
if(var42 >= 0 && var42 < 128) {
if(var3[var43] == Block.flowingLava.blockID || var3[var43] == Block.stillLava.blockID) {
var55 = true;
@@ -122,12 +123,12 @@
for(var43 = var54; var43 < var38; ++var43) {
double var44 = ((double)(var43 + var2 * 16) + 0.5D - var8) / var27;
- int var46 = (var40 * 16 + var43) * 128 + var36;
+ int var46 = (var40 * 16 + var43) * SharedConstants.CHUNK_HEIGHT + var36;
for(int var47 = var36 - 1; var47 >= var53; --var47) {
double var48 = ((double)var47 + 0.5D - var6) / var29;
if(var48 > -0.7D && var56 * var56 + var48 * var48 + var44 * var44 < 1.0D) {
- byte var50 = var3[var46];
+ short var50 = var3[var46];
if(var50 == Block.netherrack.blockID || var50 == Block.dirt.blockID || var50 == Block.grass.blockID) {
var3[var46] = 0;
}
@@ -148,7 +149,7 @@
}
- protected void generateRecursive(World var1, int var2, int var3, int var4, int var5, byte[] var6) {
+ protected void generateRecursive(World var1, int var2, int var3, int var4, int var5, short[] var6) {
int var7 = this.rand.nextInt(this.rand.nextInt(this.rand.nextInt(10) + 1) + 1);
if(this.rand.nextInt(5) != 0) {
var7 = 0;
--- /dev/null
+++ net/minecraft/game/world/biome/categories/temperate_forest/SeasonalWoods.java
@@ -1,0 +1,26 @@
+package net.minecraft.game.world.biome.categories.temperate_forest;
+
+import net.minecraft.game.world.biome.Biome;
+import net.minecraft.game.world.terrain.feature.BigTreeFeature;
+import net.minecraft.game.world.terrain.feature.BirchTreeFeature;
+import net.minecraft.game.world.terrain.feature.Feature;
+import net.minecraft.game.world.terrain.feature.TreeFeature;
+
+import java.util.Random;
+
+public class SeasonalWoods extends Biome {
+ @Override
+ public int getTreeCount(int treeNoise, int treeBonus) {
+ return treeNoise + treeBonus + 5;
+ }
+
+ @Override
+ public Feature getRandomTreeFeature(Random var1) {
+ return (Feature)(var1.nextInt(5) == 0 ? new BirchTreeFeature() : new BigTreeFeature());
+ }
+
+ @Override
+ public int getFlowerCount() {
+ return 4;
+ }
+}
--- net/minecraft/game/world/biome/SwamplandBiome.java
+++ /dev/null
@@ -1,4 +1,0 @@
-package net.minecraft.game.world.biome;
-
-public class SwamplandBiome extends Biome {
-}
--- net/minecraft/game/world/chunk/ChunkBlockMap.java
+++ net/minecraft/game/world/chunk/ChunkBlockMap.java
@@ -3,20 +3,20 @@
import net.minecraft.game.world.block.Block;
public class ChunkBlockMap {
- private static byte[] blocks = new byte[256];
+ private static short[] blocks = new short[16*16*256];
- public static void setBlockData(byte[] var0) {
+ public static void setBlockData(short[] var0) {
for(int var1 = 0; var1 < var0.length; ++var1) {
- var0[var1] = blocks[var0[var1] & 255];
+ var0[var1] = blocks[var0[var1]];
}
}
static {
try {
- for(int var0 = 0; var0 < 256; ++var0) {
- byte var1 = (byte)var0;
- if(var1 != 0 && Block.blocksList[var1 & 255] == null) {
+ for(int var0 = 0; var0 < 16384; ++var0) {
+ short var1 = (short)var0;
+ if(var1 != 0 && Block.blocksList[var1] == null) {
var1 = 0;
}
--- net/minecraft/game/world/save/SaveConverterMcRegion.java
+++ net/minecraft/game/world/save/SaveConverterMcRegion.java
@@ -10,6 +10,8 @@
import java.util.Iterator;
import java.util.List;
import java.util.zip.GZIPInputStream;
+
+import com.mojang.nbt.CompoundTag;
import net.minecraft.game.world.WorldInfo;
import net.minecraft.game.world.chunk.loader.region.RegionFile;
import net.minecraft.game.world.chunk.loader.region.RegionFileCache;
@@ -43,7 +45,7 @@
var10 = var7;
}
- var1.add(new SaveFormatComparator(var7, var10, var8.getLastTimePlayed(), var8.getSizeOnDisk(), var9));
+ var1.add(new SaveFormatComparator(var7, var10, var8.getLastTimePlayed(), var8.getSizeOnDisk(), var9,var8.isCreative()));
}
}
}
--- net/minecraft/client/render/entity/RenderPlayer.java
+++ net/minecraft/client/render/entity/RenderPlayer.java
@@ -3,6 +3,7 @@
import net.minecraft.client.Minecraft;
import net.minecraft.client.gui.FontRenderer;
import net.minecraft.client.model.BipedModel;
+import net.minecraft.client.model.PlayerModel;
import net.minecraft.client.player.ClientPlayerEntity;
import net.minecraft.client.render.RenderBlocks;
import net.minecraft.client.render.Tessellator;
@@ -14,16 +15,19 @@
import net.minecraft.game.item.ItemStack;
import net.minecraft.game.world.block.Block;
import net.minecraft.util.MathHelper;
+import net.minecraft.util.SharedConstants;
import org.lwjgl.opengl.GL11;
public class RenderPlayer extends RenderLiving {
- private BipedModel modelBipedMain = (BipedModel)this.mainModel;
+ private PlayerModel modelBipedMain = (PlayerModel)this.mainModel;
+ private PlayerModel modelClassic = new PlayerModel(0.0F,false);
+ private PlayerModel modelSlim = new PlayerModel(0.0F,true);
private BipedModel modelArmorChestplate = new BipedModel(1.0F);
private BipedModel modelArmor = new BipedModel(0.5F);
private static final String[] armorFilenamePrefix = new String[]{"cloth", "chain", "iron", "diamond", "gold"};
public RenderPlayer() {
- super(new BipedModel(0.0F), 0.5F);
+ super(new PlayerModel(0.0F,false), 0.5F);
}
protected boolean setArmorModel(PlayerEntity var1, int var2, float var3) {
@@ -50,15 +54,22 @@
}
public void renderPlayer(PlayerEntity var1, double var2, double var4, double var6, float var8, float var9) {
+ this.mainModel = var1.isSlim ? this.modelSlim : this.modelClassic;
+ this.modelBipedMain = var1.isSlim ? this.modelSlim : this.modelClassic;
ItemStack var10 = var1.inventory.getCurrentItem();
this.modelArmorChestplate.field_1278_i = this.modelArmor.field_1278_i = this.modelBipedMain.field_1278_i = var10 != null;
this.modelArmorChestplate.isSneak = this.modelArmor.isSneak = this.modelBipedMain.isSneak = var1.isSneaking();
double var11 = var4 - (double)var1.yOffset;
- if(var1.isSneaking() && !(var1 instanceof ClientPlayerEntity)) {
- var11 -= 0.125D;
+ if(var1.isSneaking()) {
+ var11 -= 0.1D;
}
+ GL11.glDisable(GL11.GL_CULL_FACE);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
super.doRenderLiving(var1, var2, var11, var6, var8, var9);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_CULL_FACE);
this.modelArmorChestplate.isSneak = this.modelArmor.isSneak = this.modelBipedMain.isSneak = false;
this.modelArmorChestplate.field_1278_i = this.modelArmor.field_1278_i = this.modelBipedMain.field_1278_i = false;
}
@@ -115,7 +126,7 @@
protected void renderSpecials(PlayerEntity var1, float var2) {
ItemStack var3 = var1.inventory.armorItemInSlot(3);
- if(var3 != null && var3.getItem().itemID < 256) {
+ if(var3 != null && var3.getItem().itemID < SharedConstants.BLOCK_LIMIT) {
GL11.glPushMatrix();
this.modelBipedMain.bipedHead.postRender(1.0F / 16.0F);
if(RenderBlocks.renderItemIn3d(Block.blocksList[var3.id].getRenderType())) {
@@ -148,7 +159,7 @@
}
}
- if(this.loadDownloadableImageTexture(var1.playerCloakUrl, (String)null)) {
+ if(this.loadDownloadableImageTexture(var1.cloakUrl, (String)null)) {
GL11.glPushMatrix();
GL11.glTranslatef(0.0F, 0.0F, 2.0F / 16.0F);
double var20 = var1.posX2 + (var1.posX1 - var1.posX2) * (double)var2 - (var1.prevPosX + (var1.posX - var1.prevPosX) * (double)var2);
@@ -195,7 +206,7 @@
var21 = new ItemStack(Item.stick);
}
- if(var21.id < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[var21.id].getRenderType())) {
+ if(var21.id < SharedConstants.BLOCK_LIMIT && RenderBlocks.renderItemIn3d(Block.blocksList[var21.id].getRenderType())) {
var5 = 0.5F;
GL11.glTranslatef(0.0F, 3.0F / 16.0F, -(5.0F / 16.0F));
var5 *= 12.0F / 16.0F;
@@ -233,10 +244,18 @@
GL11.glScalef(var3, var3, var3);
}
- public void drawFirstPersonHand() {
+ public void drawFirstPersonHand(PlayerEntity player) {
+ this.mainModel = player.isSlim ? this.modelSlim : this.modelClassic;
+ this.modelBipedMain = player.isSlim ? this.modelSlim : this.modelClassic;
this.modelBipedMain.onGround = 0.0F;
this.modelBipedMain.setRotationAngles(0.0F, 0.0F, 0.0F, 0.0F, 0.0F, 1.0F / 16.0F);
this.modelBipedMain.bipedRightArm.render(1.0F / 16.0F);
+ GL11.glDisable(GL11.GL_CULL_FACE);
+ GL11.glEnable(GL11.GL_BLEND);
+ GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
+ this.modelBipedMain.rightSleeve.render(0.0625F);
+ GL11.glDisable(GL11.GL_BLEND);
+ GL11.glEnable(GL11.GL_CULL_FACE);
}
protected void func_22016_b(PlayerEntity var1, double var2, double var4, double var6) {
--- net/minecraft/util/MathHelper.java
+++ net/minecraft/util/MathHelper.java
@@ -2,6 +2,7 @@
public class MathHelper {
private static float[] SIN_TABLE = new float[65536];
+ private static final int[] MULTIPLY_DE_BRUIJN_BIT_POSITION = new int[]{0, 1, 28, 2, 29, 14, 24, 3, 30, 22, 20, 15, 25, 17, 4, 8, 31, 27, 13, 23, 21, 19, 16, 7, 26, 12, 18, 6, 11, 5, 10, 9};
public static final float sin(float var0) {
return SIN_TABLE[(int)(var0 * 10430.378F) & '\uffff'];
@@ -51,6 +52,37 @@
public static boolean isStringEmpty(String var0) {
return var0 == null || var0.length() == 0;
+ }
+
+ public static int smallestEncompassingPowerOfTwo(int value) {
+ int i = value - 1;
+ i |= i >> 1;
+ i |= i >> 2;
+ i |= i >> 4;
+ i |= i >> 8;
+ i |= i >> 16;
+ return i + 1;
+ }
+
+ public static boolean isPowerOfTwo(int i) {
+ return i != 0 && (i & i - 1) == 0;
+ }
+
+ public static int ceilLog2(int value) {
+ value = MathHelper.isPowerOfTwo(value) ? value : MathHelper.smallestEncompassingPowerOfTwo(value);
+ return MULTIPLY_DE_BRUIJN_BIT_POSITION[(int)((long)value * 125613361L >> 27) & 0x1F];
+ }
+
+ public static int lerp(double delta, int start, int end) {
+ return (int) Math.round(start + (end - start) * delta);
+ }
+
+ public static float lerp(double delta, float start, float end) {
+ return (float)(((end - start) * delta) + start);
+ }
+
+ public static double lerp(double delta, double start, double end) {
+ return start + delta * (end - start);
}
static {
--- net/minecraft/game/world/biome/ForestBiome.java
+++ /dev/null
@@ -1,19 +1,0 @@
-package net.minecraft.game.world.biome;
-
-import java.util.Random;
-import net.minecraft.game.entity.animal.WolfEntity;
-import net.minecraft.game.world.SpawnListEntry;
-import net.minecraft.game.world.terrain.feature.BigTreeFeature;
-import net.minecraft.game.world.terrain.feature.BirchTreeFeature;
-import net.minecraft.game.world.terrain.feature.Feature;
-import net.minecraft.game.world.terrain.feature.TreeFeature;
-
-public class ForestBiome extends Biome {
- public ForestBiome() {
- this.spawnableCreatureList.add(new SpawnListEntry(WolfEntity.class, 2));
- }
-
- public Feature getRandomTreeFeature(Random var1) {
- return (Feature)(var1.nextInt(5) == 0 ? new BirchTreeFeature() : (var1.nextInt(3) == 0 ? new BigTreeFeature() : new TreeFeature()));
- }
-}
--- net/minecraft/game/item/recipe/RecipesTools.java
+++ net/minecraft/game/item/recipe/RecipesTools.java
@@ -9,7 +9,7 @@
private Object[][] recipeItems = new Object[][]{{Block.planks, Block.cobblestone, Item.ironIngot, Item.diamond, Item.goldIngot}, {Item.woodPickaxe, Item.stonePickaxe, Item.ironPickaxe, Item.diamondPickaxe, Item.goldPickaxe}, {Item.woodShovel, Item.stoneShovel, Item.ironShovel, Item.diamondShovel, Item.goldShovel}, {Item.woodAxe, Item.stoneAxe, Item.ironAxe, Item.diamondAxe, Item.goldAxe}, {Item.woodHoe, Item.stoneHoe, Item.ironHoe, Item.diamondHoe, Item.goldHoe}};
public void addRecipes(CraftingManager var1) {
- for(int var2 = 0; var2 < this.recipeItems[0].length; ++var2) {
+ /*for(int var2 = 0; var2 < this.recipeItems[0].length; ++var2) {
Object var3 = this.recipeItems[0][var2];
for(int var4 = 0; var4 < this.recipeItems.length - 1; ++var4) {
@@ -18,6 +18,6 @@
}
}
- var1.addRecipe(new ItemStack(Item.shears), new Object[]{" #", "# ", Character.valueOf('#'), Item.ironIngot});
+ var1.addRecipe(new ItemStack(Item.shears), new Object[]{" #", "# ", Character.valueOf('#'), Item.ironIngot});*/
}
}
--- /dev/null
+++ net/minecraft/game/world/block/mechanical/GearboxBlock.java
@@ -1,0 +1,157 @@
+package net.minecraft.game.world.block.mechanical;
+
+import net.minecraft.game.item.Item;
+import net.minecraft.game.item.ItemStack;
+import net.minecraft.game.world.BlockAccess;
+import net.minecraft.game.world.BlockPos;
+import net.minecraft.game.world.World;
+import net.minecraft.game.world.block.Block;
+import net.minecraft.game.world.block.Direction;
+import net.minecraft.game.world.material.Material;
+
+import java.util.Random;
+
+import static net.minecraft.util.SharedConstants.getAtlasTexture;
+
+public class GearboxBlock extends Block {
+ public GearboxBlock(int var1) {
+ super(var1, Material.wood);
+ this.setTickOnLoad(true);
+ }
+
+ @Override
+ public int getBlockTexture(BlockAccess var1, int var2, int var3, int var4, int var5) {
+ int facing = var1.getBlockMetadata(var2,var3,var4);
+ if(facing == var5) {
+ return getAtlasTexture(26,8);
+ }
+ BlockPos sideBlockPos = addFacingAsOffset(new BlockPos(var2,var3,var4),var5);
+ if(var1.getBlockId(sideBlockPos.x,sideBlockPos.y,sideBlockPos.z) == Block.axle.blockID && ((AxleBlock)Block.axle).isAxleTowardsFacing(var1,sideBlockPos.x,sideBlockPos.y,sideBlockPos.z,var5))
+ return getAtlasTexture(27,9);
+ return getAtlasTexture(27,8);
+ }
+
+ @Override
+ public int getBlockTextureFromSide(int var1) {
+ if(var1 == 3)
+ return getAtlasTexture(26,8);
+ return getAtlasTexture(27,8);
+ }
+
+ public static BlockPos addFacingAsOffset(BlockPos pos, int iFacing)
+ {
+ switch (iFacing) {
+ case 0: {
+ return new BlockPos(pos.x, pos.y - 1, pos.z);
+ }
+ case 1: {
+ return new BlockPos(pos.x,pos.y+1,pos.z);
+ }
+ case 2: {
+ return new BlockPos(pos.x,pos.y,pos.z-1);
+ }
+ case 3: {
+ return new BlockPos(pos.x,pos.y,pos.z+1);
+ }
+ case 4: {
+ return new BlockPos(pos.x-1,pos.y,pos.z);
+ }
+ default: {
+ return new BlockPos(pos.x+1,pos.y,pos.z);
+ }
+ }
+ }
+
+ public void onNeighborBlockChange(World world, int i, int j, int k, int iid) {
+ world.scheduleUpdateTick(i, j, k, Block.gearbox.blockID, tickRate());
+ }
+
+ @Override
+ public void updateTick(World world, int i, int j, int k, Random random) {
+ super.updateTick(world, i, j, k, random);
+ boolean powered = isGettingMechanicalPower(world,i,j,k);
+ boolean bIsRedstonePowered = world.isBlockGettingPowered(i,j,k) || world.isBlockGettingPowered(i,j+1,k) || world.isBlockIndirectlyGettingPowered(i,j,k) || world.isBlockIndirectlyGettingPowered(i,j+1,k);
+ if(bIsRedstonePowered)
+ {
+ powered = false;
+ }
+ if(powered) {
+ world.playSoundEffect((double) i + 0.5D, (double) j + 0.5D, (double) k + 0.5D, "random.explode", 0.05F, 1.0F);
+ }
+ int iFacing = world.getBlockMetadata(i, j, k) & 7;
+ for(int f=0; f < 6; f++) {
+ if(f == iFacing)
+ continue;
+ BlockPos target = addFacingAsOffset(new BlockPos(i, j, k),f);
+ if(world.getBlockId(target.x, target.y, target.z) != Block.axle.blockID)
+ continue;
+ AxleBlock axleBlock = (AxleBlock)Block.axle;
+ if(!axleBlock.isAxleTowardsFacing(world, target.x, target.y, target.z, f))
+ continue;
+ int power = axleBlock.getPowerLevel(world, target.x, target.y, target.z);
+ if(powered) {
+ if (power != 5)
+ axleBlock.setPowerLevel(world, target.x, target.y, target.z, 5);
+ continue;
+ }
+ if(power != 0)
+ axleBlock.setPowerLevel(world, target.x, target.y, target.z, 0);
+ }
+ }
+
+ public boolean isGettingMechanicalPower(World world, int i, int j, int k)
+ {
+ int iFacing = world.getBlockMetadata(i, j, k) & 7;
+ BlockPos targetBlockPos = addFacingAsOffset(new BlockPos(i, j, k),iFacing);
+ int iTargetid = world.getBlockId(targetBlockPos.x, targetBlockPos.y, targetBlockPos.z);
+ return iTargetid == Block.axle.blockID && ((AxleBlock)Block.axle).isAxleTowardsFacing(world, targetBlockPos.x, targetBlockPos.y, targetBlockPos.z, iFacing) && ((AxleBlock)Block.axle).getPowerLevel(world, targetBlockPos.x, targetBlockPos.y, targetBlockPos.z) > 0;
+ }
+
+ public void onBlockPlaced(World var1, int var2, int var3, int var4, int var5) {
+ var1.setBlockMetadata(var2, var3, var4, Direction.oppositeFace[var5]);
+ }
+
+ public void onBlockAdded(World var1, int var2, int var3, int var4) {
+ var1.scheduleUpdateTick(var2, var3, var4, blockID, tickRate());
+ }
+
+ public void overpower(World w, int x, int y, int z) {
+ if(w.isBlockGettingPowered(x,y,z) || w.isBlockGettingPowered(x,y+1,z) || w.isBlockIndirectlyGettingPowered(x,y,z) || w.isBlockIndirectlyGettingPowered(x,y+1,z)) return;
+ for(int iTemp = 0; iTemp < 4; iTemp++)
+ {
+ AxleBlock.ejectStackWithRandomOffset(w,x,y,z, new ItemStack(Block.planks,1,0));
+ }
+
+ for(int iTemp = 0; iTemp < 4; iTemp++)
+ {
+ AxleBlock.ejectStackWithRandomOffset(w,x,y,z, new ItemStack(Item.gear,1,0));
+ }
+
+ AxleBlock.ejectStackWithRandomOffset(w,x,y,z, new ItemStack(Item.redstone,1,0));
+ w.playSoundEffect((double)x + 0.5D, (double)y + 0.5D, (double)z + 0.5D, "random.explode", 0.2F, 1.25F);
+ w.setBlock(x, y, z, 0);
+ }
+
+ public void onBlockRemoval(World world, int i, int j, int k) {
+ int iFacing = world.getBlockMetadata(i, j, k) & 7;
+ for(int f=0; f < 6; f++) {
+ if(f == iFacing)
+ continue;
+ BlockPos target = addFacingAsOffset(new BlockPos(i, j, k),f);
+ if(world.getBlockId(target.x, target.y, target.z) != Block.axle.blockID)
+ continue;
+ AxleBlock axleBlock = (AxleBlock)Block.axle;
+ if(!axleBlock.isAxleTowardsFacing(world, target.x, target.y, target.z, f))
+ continue;
+ int power = axleBlock.getPowerLevel(world, target.x, target.y, target.z);
+ if(power != 0)
+ axleBlock.setPowerLevel(world, target.x, target.y, target.z, 0);
+ }
+ super.onBlockRemoval(world, i, j, k);
+ }
+
+ public int tickRate()
+ {
+ return 10;
+ }
+}
--- net/minecraft/game/world/MetadataChunkBlock.java
+++ net/minecraft/game/world/MetadataChunkBlock.java
@@ -2,6 +2,7 @@
import net.minecraft.game.world.block.Block;
import net.minecraft.game.world.chunk.Chunk;
+import net.minecraft.util.SharedConstants;
public class MetadataChunkBlock {
public final LightType lightType;
@@ -61,8 +62,8 @@
this.minY = 0;
}
- if(this.maxY >= 128) {
- this.maxY = 127;
+ if(this.maxY >= SharedConstants.CHUNK_HEIGHT) {
+ this.maxY = SharedConstants.CHUNK_HEIGHT - 1;
}
for(int var27 = this.minY; var27 <= this.maxY; ++var27) {
--- /dev/null
+++ net/minecraft/game/item/CobblestoneItem.java
@@ -1,0 +1,13 @@
+package net.minecraft.game.item;
+
+public class CobblestoneItem extends BlockItem {
+ public CobblestoneItem(int var1) {
+ super(var1);
+ this.setMaxDamage(0);
+ this.setHasSubtypes(true);
+ }
+
+ public int getPlacedBlockMetadata(int var1) {
+ return var1;
+ }
+}
--- /dev/null
+++ net/minecraft/game/world/block/mechanical/WeatherSensor.java
@@ -1,0 +1,34 @@
+package net.minecraft.game.world.block.mechanical;
+
+import net.minecraft.game.world.BlockAccess;
+import net.minecraft.game.world.World;
+import net.minecraft.game.world.block.Block;
+import net.minecraft.game.world.block.ContainerBlock;
+import net.minecraft.game.world.block.tileentity.TileEntity;
+import net.minecraft.game.world.material.Material;
+
+import java.util.Random;
+
+import static net.minecraft.util.SharedConstants.getAtlasTexture;
+
+public class WeatherSensor extends ContainerBlock {
+ public WeatherSensor(int var1) {
+ super(var1, Material.circuits);
+ this.textureIndex = getAtlasTexture(26,9);
+ }
+
+ @Override
+ public boolean isPoweringTo(BlockAccess var1, int var2, int var3, int var4, int var5) {
+ return var1.getBlockMetadata(var2,var3,var4) > 0;
+ }
+
+ @Override
+ public boolean canProvidePower() {
+ return true;
+ }
+
+ @Override
+ protected TileEntity getTileEntity() {
+ return new WeatherSensorTileEntity();
+ }
+}
--- net/minecraft/client/render/texture/TextureWaterFlowFX.java
+++ net/minecraft/client/render/texture/TextureWaterFlowFX.java
@@ -78,9 +78,11 @@
var7 = var11;
}
- this.imageData[var2 * 4 + 0] = (byte)var5;
- this.imageData[var2 * 4 + 1] = (byte)var6;
- this.imageData[var2 * 4 + 2] = (byte)var7;
+ int average = (var5 + var6 + var7)/3;
+
+ this.imageData[var2 * 4 + 0] = (byte)Math.min(255,average*2);
+ this.imageData[var2 * 4 + 1] = (byte)Math.min(255,average*2);
+ this.imageData[var2 * 4 + 2] = (byte)Math.min(255,average*2);
this.imageData[var2 * 4 + 3] = (byte)var8;
}
--- net/minecraft/game/entity/monster/CreeperEntity.java
+++ net/minecraft/game/entity/monster/CreeperEntity.java
@@ -13,6 +13,7 @@
public CreeperEntity(World var1) {
super(var1);
this.texture = "/mob/creeper.png";
+ this.scoreValue = 30;
}
protected void entityInit() {
--- net/minecraft/client/gui/stats/GeneralStatsSlot.java
+++ net/minecraft/client/gui/stats/GeneralStatsSlot.java
@@ -29,8 +29,8 @@
return this.getSize() * 10;
}
- protected void drawBackground() {
- this.field_27276_a.drawDefaultBackground();
+ protected void drawBackground(float delta) {
+ this.field_27276_a.drawDefaultBackground(delta);
}
protected void drawSlot(int var1, int var2, int var3, int var4, Tessellator var5) {
--- net/minecraft/game/item/SignItem.java
+++ net/minecraft/game/item/SignItem.java
@@ -47,7 +47,8 @@
var3.setBlockAndMetadataWithNotify(var4, var5, var6, Block.wallSign.blockID, var7);
}
- --var1.count;
+ if(!var3.isCreativeWorld())
+ --var1.count;
SignTileEntity var8 = (SignTileEntity)var3.getBlockTileEntity(var4, var5, var6);
if(var8 != null) {
var2.displayGUIEditSign(var8);
--- net/minecraft/game/item/BowItem.java
+++ net/minecraft/game/item/BowItem.java
@@ -11,7 +11,7 @@
}
public ItemStack onItemRightClick(ItemStack var1, World var2, PlayerEntity var3) {
- if(var3.inventory.consumeInventoryItem(Item.arrow.itemID)) {
+ if(var2.isCreativeWorld() || var3.inventory.consumeInventoryItem(Item.arrow.itemID)) {
var2.playSoundAtEntity(var3, "random.bow", 1.0F, 1.0F / (random.nextFloat() * 0.4F + 0.8F));
if(!var2.remoteWorld) {
var2.entityJoinedWorld(new ArrowEntity(var2, var3));
--- /dev/null
+++ net/minecraft/game/world/block/PlanksBlock.java
@@ -1,0 +1,52 @@
+package net.minecraft.game.world.block;
+
+import net.minecraft.game.entity.animal.SheepEntity;
+import net.minecraft.game.item.DyeItem;
+import net.minecraft.game.world.BlockAccess;
+import net.minecraft.game.world.material.Material;
+
+import java.awt.*;
+
+import static net.minecraft.util.SharedConstants.getAtlasTexture;
+
+public class PlanksBlock extends Block {
+ protected PlanksBlock(int var1, Material var2) {
+ super(var1, var2);
+ this.textureIndex = getAtlasTexture(16,0);
+ }
+
+ public static int getPlankColor(float r, float g, float b) {
+ float[] hsb = Color.RGBtoHSB((int)(r*255F),(int)(g*255F),(int)(b*255F),null);
+ hsb[1] *= 0.5F;
+ return Color.HSBtoRGB(hsb[0],hsb[1],hsb[2]);
+ }
+
+ protected int damageDropped(int var1) {
+ return var1;
+ }
+
+ public int getColorMultiplier(BlockAccess var1, int var2, int var3, int var4) {
+ int metadata = var1.getBlockMetadata(var2,var3,var4);
+ if(metadata == 0)
+ return 16777215;
+ float[] color = SheepEntity.fleeceColorTable[16-metadata];
+ return getPlankColor(color[0],color[1],color[2]);
+ }
+
+ public int getInventoryColor(int metadata) {
+ if(metadata == 0)
+ return 16777215;
+ float[] color = SheepEntity.fleeceColorTable[16-metadata];
+ return getPlankColor(color[0],color[1],color[2]);
+ }
+
+ @Override
+ public int getBlockTextureFromSide(int var1) {
+ return getAtlasTexture(16,0);
+ }
+
+ @Override
+ public int getBlockTextureFromSideAndMetadata(int var1, int var2) {
+ return getAtlasTexture(16,var2 > 0 ? 1 : 0);
+ }
+}
--- /dev/null
+++ net/minecraft/client/model/PlayerModel.java
@@ -1,0 +1,89 @@
+package net.minecraft.client.model;
+
+import org.lwjgl.opengl.GL11;
+
+public class PlayerModel extends BipedModel {
+ public final ModelRenderer leftSleeve;
+ public final ModelRenderer rightSleeve;
+ public final ModelRenderer leftPantLeg;
+ public final ModelRenderer rightPantLeg;
+ public final ModelRenderer jacket;
+
+ public PlayerModel(float scale, boolean thinArms) {
+ super(scale);
+ if (thinArms) {
+ this.bipedLeftArm = this.createModelPart(32, 48);
+ this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 3, 12, 4, scale);
+ this.bipedLeftArm.setRotationPoint(5.0F, 2.5F, 0.0F);
+ this.bipedRightArm = this.createModelPart(40, 16);
+ this.bipedRightArm.addBox(-2.0F, -2.0F, -2.0F, 3, 12, 4, scale);
+ this.bipedRightArm.setRotationPoint(-5.0F, 2.5F, 0.0F);
+ this.leftSleeve = this.createModelPart(48, 48);
+ this.leftSleeve.addBox(-1.0F, -2.0F, -2.0F, 3, 12, 4, scale + 0.25F);
+ this.leftSleeve.setRotationPoint(5.0F, 2.5F, 0.0F);
+ this.rightSleeve = this.createModelPart(40, 32);
+ this.rightSleeve.addBox(-2.0F, -2.0F, -2.0F, 3, 12, 4, scale + 0.25F);
+ this.rightSleeve.setRotationPoint(-5.0F, 2.5F, 10.0F);
+ } else {
+ //this.bipedLeftArm = this.createModelPart(32, 48);
+ //this.bipedLeftArm.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, scale);
+ //this.bipedLeftArm.setRotationPoint(5.0F, 2.0F, 0.0F);
+ this.leftSleeve = this.createModelPart(48, 48);
+ this.leftSleeve.addBox(-1.0F, -2.0F, -2.0F, 4, 12, 4, scale + 0.25F);
+ this.leftSleeve.setRotationPoint(5.0F, 2.0F, 0.0F);
+ this.rightSleeve = this.createModelPart(40, 32);
+ this.rightSleeve.addBox(-3.0F, -2.0F, -2.0F, 4, 12, 4, scale + 0.25F);
+ this.rightSleeve.setRotationPoint(-5.0F, 2.0F, 10.0F);
+ }
+
+ //this.bipedLeftLeg = this.createModelPart(16, 48);
+ //this.bipedLeftLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, scale);
+ //this.bipedLeftLeg.setRotationPoint(2.0F, 12.0F, 0.0F);
+ this.leftPantLeg = this.createModelPart(0, 48);
+ this.leftPantLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, scale + 0.25F);
+ this.leftPantLeg.setRotationPoint(1.9F, 12.0F, 0.0F);
+ this.rightPantLeg = this.createModelPart(0, 32);
+ this.rightPantLeg.addBox(-2.0F, 0.0F, -2.0F, 4, 12, 4, scale + 0.25F);
+ this.rightPantLeg.setRotationPoint(-1.9F, 12.0F, 0.0F);
+ this.jacket = this.createModelPart(16, 32);
+ this.jacket.addBox(-4.0F, 0.0F, -2.0F, 8, 12, 4, scale + 0.25F);
+ this.jacket.setRotationPoint(0.0F, 0.0F, 0.0F);
+ }
+
+ private ModelRenderer createModelPart(int x, int y) {
+ ModelRenderer modelRenderer = new ModelRenderer(x, y);
+ modelRenderer.textureHeight = 64;
+ return modelRenderer;
+ }
+
+ @Override
+ public void render(float limbAngle, float limbDistance, float animationProgress, float headYaw, float headPitch, float scale) {
+ super.render(limbAngle, limbDistance, animationProgress, headYaw, headPitch, scale);
+
+ GL11.glPushMatrix();
+ this.leftPantLeg.render(scale);
+ this.rightPantLeg.render(scale);
+ this.leftSleeve.render(scale);
+ this.rightSleeve.render(scale);
+ this.jacket.render(scale);
+ GL11.glPopMatrix();
+ }
+
+ public void copyPositionAndRotation(ModelRenderer from, ModelRenderer to) {
+ to.setRotationPoint(from.rotationPointX, from.rotationPointY, from.rotationPointZ);
+ to.rotateAngleX = from.rotateAngleX;
+ to.rotateAngleY = from.rotateAngleY;
+ to.rotateAngleZ = from.rotateAngleZ;
+ }
+
+ @Override
+ public void setRotationAngles(float limbAngle, float limbDistance, float animationProgress, float headYaw, float headPitch, float scale) {
+ super.setRotationAngles(limbAngle, limbDistance, animationProgress, headYaw, headPitch, scale);
+ this.copyPositionAndRotation(this.bipedLeftLeg, this.leftPantLeg);
+ this.copyPositionAndRotation(this.bipedRightLeg, this.rightPantLeg);
+ this.copyPositionAndRotation(this.bipedLeftArm, this.leftSleeve);
+ this.copyPositionAndRotation(this.bipedRightArm, this.rightSleeve);
+ this.copyPositionAndRotation(this.bipedBody, this.jacket);
+ this.copyPositionAndRotation(this.bipedHead, this.bipedHeadwear);
+ }
+}
--- net/minecraft/game/world/block/TrapDoorBlock.java
+++ net/minecraft/game/world/block/TrapDoorBlock.java
@@ -8,12 +8,14 @@
import net.minecraft.game.world.World;
import net.minecraft.game.world.material.Material;
+import static net.minecraft.util.SharedConstants.getAtlasTexture;
+
public class TrapDoorBlock extends Block {
protected TrapDoorBlock(int var1, Material var2) {
super(var1, var2);
- this.textureIndex = 84;
+ this.textureIndex = getAtlasTexture(30,6);
if(var2 == Material.iron) {
- ++this.textureIndex;
+ this.textureIndex = getAtlasTexture(30,0);
}
float var3 = 0.5F;
--- /dev/null
+++ net/minecraft/util/DoubleArray3D.java
@@ -1,0 +1,30 @@
+package net.minecraft.util;
+
+public class DoubleArray3D {
+ private final double[] array;
+ public final int width, length, height;
+ public DoubleArray3D(int width, int height, int length) {
+ this(null, width, height, length);
+ }
+
+ public DoubleArray3D(double[] array, int width, int height, int length) {
+ if (array == null) {
+ array = new double[width * height * length];
+ } else if (array.length < width * height * length) {
+ throw new IllegalArgumentException("Array is too small!");
+ }
+ this.array = array;
+ this.width = width;
+ this.height = height;
+ this.length = length;
+ }
+ public double get(int x, int y, int z) {
+ return this.array[(x * this.length + z) * this.height + y];
+ }
+ public void set(int x, int y, int z, double value) {
+ this.array[(x * this.length + z) * this.height + y] = value;
+ }
+ public double[] getArray() {
+ return array;
+ }
+}
--- net/minecraft/client/player/ClientNetPlayerEntity.java
+++ net/minecraft/client/player/ClientNetPlayerEntity.java
@@ -140,7 +140,7 @@
public void respawnPlayer() {
this.sendInventoryChanged();
- this.sendQueue.addToSendQueue(new Packet9Respawn((byte)this.dimension));
+ this.sendQueue.addToSendQueue(new Packet9Respawn((byte)this.dimension, this.worldObj.isCreativeWorld()));
}
protected void damageEntity(int var1) {
--- net/minecraft/game/world/save/SaveFormatComparator.java
+++ net/minecraft/game/world/save/SaveFormatComparator.java
@@ -6,13 +6,15 @@
private final long field_22169_c;
private final long field_22168_d;
private final boolean field_22167_e;
+ private final Boolean creative;
- public SaveFormatComparator(String var1, String var2, long var3, long var5, boolean var7) {
+ public SaveFormatComparator(String var1, String var2, long var3, long var5, boolean var7, Boolean var8) {
this.fileName = var1;
this.displayName = var2;
this.field_22169_c = var3;
this.field_22168_d = var5;
this.field_22167_e = var7;
+ this.creative = var8;
}
public String getFileName() {
@@ -37,6 +39,10 @@
public int func_22160_a(SaveFormatComparator var1) {
return this.field_22169_c < var1.field_22169_c ? 1 : (this.field_22169_c > var1.field_22169_c ? -1 : this.fileName.compareTo(var1.fileName));
+ }
+
+ public Boolean isCreative() {
+ return this.creative;
}
public int compareTo(Object var1) {
--- net/minecraft/client/render/ItemRenderer.java
+++ net/minecraft/client/render/ItemRenderer.java
@@ -12,6 +12,7 @@
import net.minecraft.game.world.map.MapData;
import net.minecraft.game.world.material.Material;
import net.minecraft.util.MathHelper;
+import net.minecraft.util.SharedConstants;
import org.lwjgl.opengl.GL11;
import org.lwjgl.opengl.GL12;
@@ -31,11 +32,11 @@
public void renderItem(LivingEntity var1, ItemStack var2) {
GL11.glPushMatrix();
- if(var2.id < 256 && RenderBlocks.renderItemIn3d(Block.blocksList[var2.id].getRenderType())) {
+ if(var2.id < SharedConstants.BLOCK_LIMIT && RenderBlocks.renderItemIn3d(Block.blocksList[var2.id].getRenderType())) {
GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.textureRegistry.getTexture("/terrain.png"));
this.renderBlocksInstance.renderBlockOnInventory(Block.blocksList[var2.id], var2.getItemDamage(), var1.getEntityBrightness(1.0F));
} else {
- if(var2.id < 256) {
+ if(var2.id < SharedConstants.BLOCK_LIMIT) {
GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.textureRegistry.getTexture("/terrain.png"));
} else {
GL11.glBindTexture(GL11.GL_TEXTURE_2D, this.mc.textureRegistry.getTexture("/gui/items.png"));
@@ -43,10 +44,10 @@
Tessellator var3 = Tessellator.instance;
int var4 = var1.getItemIcon(var2);
- float var5 = ((float)(var4 % 16 * 16) + 0.0F) / 256.0F;
- float var6 = ((float)(var4 % 16 * 16) + 15.99F) / 256.0F;
- float var7 = ((float)(var4 / 16 * 16) + 0.0F) / 256.0F;
- float var8 = ((float)(var4 / 16 * 16) + 15.99F) / 256.0F;
+ float var5 = ((float)(var4 % ((int)SharedConstants.ATLAS_SIZE/16) * 16) + 0.0F) / SharedConstants.ATLAS_SIZE;
+ float var6 = ((float)(var4 % ((int)SharedConstants.ATLAS_SIZE/16) * 16) + 15.99F) / SharedConstants.ATLAS_SIZE;
+ float var7 = ((float)(var4 / ((int)SharedConstants.ATLAS_SIZE/16) * 16) + 0.0F) / SharedConstants.ATLAS_SIZE;
+ float var8 = ((float)(var4 / ((int)SharedConstants.ATLAS_SIZE/16) * 16) + 15.99F) / SharedConstants.ATLAS_SIZE;
float var9 = 1.0F;
float var10 = 0.0F;
float var11 = 0.3F;
@@ -81,7 +82,7 @@
float var17;
for(var14 = 0; var14 < 16; ++var14) {
var15 = (float)var14 / 16.0F;
- var16 = var6 + (var5 - var6) * var15 - 0.001953125F;
+ var16 = var6 + (var5 - var6) * var15 - (1F / SharedConstants.ATLAS_SIZE / SharedConstants.ATLAS_SIZE / 2F);
var17 = var9 * var15;
var3.addVertexWithUV((double)var17, 0.0D, (double)(0.0F - var13), (double)var16, (double)var8);
var3.addVertexWithUV((double)var17, 0.0D, 0.0D, (double)var16, (double)var8);
@@ -95,7 +96,7 @@
for(var14 = 0; var14 < 16; ++var14) {
var15 = (float)var14 / 16.0F;
- var16 = var6 + (var5 - var6) * var15 - 0.001953125F;
+ var16 = var6 + (var5 - var6) * var15 - (1F / SharedConstants.ATLAS_SIZE / SharedConstants.ATLAS_SIZE / 2F);
var17 = var9 * var15 + 1.0F / 16.0F;
var3.addVertexWithUV((double)var17, 1.0D, (double)(0.0F - var13), (double)var16, (double)var7);
var3.addVertexWithUV((double)var17, 1.0D, 0.0D, (double)var16, (double)var7);
@@ -109,7 +110,7 @@
for(var14 = 0; var14 < 16; ++var14) {
var15 = (float)var14 / 16.0F;
- var16 = var8 + (var7 - var8) * var15 - 0.001953125F;
+ var16 = var8 + (var7 - var8) * var15 - (1F / SharedConstants.ATLAS_SIZE / SharedConstants.ATLAS_SIZE / 2F);
var17 = var9 * var15 + 1.0F / 16.0F;
var3.addVertexWithUV(0.0D, (double)var17, 0.0D, (double)var6, (double)var16);
var3.addVertexWithUV((double)var9, (double)var17, 0.0D, (double)var5, (double)var16);
@@ -123,7 +124,7 @@
for(var14 = 0; var14 < 16; ++var14) {
var15 = (float)var14 / 16.0F;
- var16 = var8 + (var7 - var8) * var15 - 0.001953125F;
+ var16 = var8 + (var7 - var8) * var15 - (1F / SharedConstants.ATLAS_SIZE / SharedConstants.ATLAS_SIZE / 2F);