forked from Wurst-Imperium/Wurst-MC-1.10
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathminecraft.patch
4481 lines (4262 loc) · 189 KB
/
minecraft.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
From 0b6ca97b506fcfd326da41eb0a8f1eb524fdf3cb Mon Sep 17 00:00:00 2001
From: Alexander01998 <[email protected]>
Date: Mon, 21 Nov 2016 13:34:09 +0100
Subject: [PATCH] mod
---
net/minecraft/block/Block.java | 20 +-
net/minecraft/block/BlockCactus.java | 7 +
net/minecraft/block/BlockChest.java | 4 +
net/minecraft/block/BlockLiquid.java | 15 +-
net/minecraft/block/BlockSlab.java | 6 +-
net/minecraft/block/BlockSoulSand.java | 6 +
net/minecraft/client/Minecraft.java | 229 +++++++++++----------
net/minecraft/client/entity/EntityPlayerSP.java | 158 ++++++++++++--
net/minecraft/client/gui/FontRenderer.java | 2 +-
net/minecraft/client/gui/GuiButton.java | 14 +-
net/minecraft/client/gui/GuiDisconnected.java | 87 ++++++++
net/minecraft/client/gui/GuiGameOver.java | 14 +-
net/minecraft/client/gui/GuiIngame.java | 39 +++-
net/minecraft/client/gui/GuiIngameMenu.java | 55 ++++-
net/minecraft/client/gui/GuiMainMenu.java | 27 ++-
net/minecraft/client/gui/GuiMemoryErrorScreen.java | 4 +-
net/minecraft/client/gui/GuiMultiplayer.java | 95 ++++++++-
net/minecraft/client/gui/GuiNewChat.java | 15 ++
net/minecraft/client/gui/GuiScreen.java | 6 +-
net/minecraft/client/gui/GuiScreenBook.java | 71 +++++++
net/minecraft/client/gui/GuiScreenServerList.java | 9 +
.../client/gui/ServerListEntryLanDetected.java | 2 +-
.../client/gui/ServerListEntryNormal.java | 13 +-
net/minecraft/client/gui/achievement/GuiStats.java | 16 ++
net/minecraft/client/gui/inventory/GuiChest.java | 78 +++++++
.../client/gui/inventory/GuiContainer.java | 5 +
.../client/gui/inventory/GuiEditSign.java | 18 ++
net/minecraft/client/main/Main.java | 13 +-
.../client/multiplayer/PlayerControllerMP.java | 39 +++-
net/minecraft/client/multiplayer/ServerList.java | 6 +
net/minecraft/client/multiplayer/WorldClient.java | 8 +-
.../client/network/NetHandlerPlayClient.java | 167 ++-------------
.../client/network/NetworkPlayerInfo.java | 11 +
net/minecraft/client/particle/ParticleManager.java | 8 +-
.../client/renderer/BlockFluidRenderer.java | 8 +
.../client/renderer/BlockModelRenderer.java | 17 +-
net/minecraft/client/renderer/EntityRenderer.java | 70 +++++--
net/minecraft/client/renderer/ItemRenderer.java | 10 +-
net/minecraft/client/renderer/RenderGlobal.java | 2 +-
net/minecraft/client/renderer/RenderItem.java | 8 +-
net/minecraft/client/renderer/chunk/VisGraph.java | 9 +-
net/minecraft/client/renderer/entity/Render.java | 23 +++
.../client/renderer/entity/RenderManager.java | 6 +-
.../renderer/texture/TextureAtlasSprite.java | 2 +-
.../client/renderer/texture/TextureManager.java | 2 +-
.../client/renderer/texture/TextureMap.java | 6 +-
.../client/renderer/texture/TextureUtil.java | 2 +-
net/minecraft/client/resources/SkinManager.java | 7 +
net/minecraft/client/settings/KeyBinding.java | 2 +-
net/minecraft/crash/CrashReport.java | 79 ++++++-
net/minecraft/crash/CrashReportCategory.java | 12 +-
net/minecraft/entity/Entity.java | 57 +++--
net/minecraft/entity/EntityLivingBase.java | 19 +-
net/minecraft/entity/EntityTracker.java | 2 +-
net/minecraft/entity/player/EntityPlayer.java | 15 +-
net/minecraft/entity/player/InventoryPlayer.java | 2 +-
net/minecraft/nbt/NBTTagCompound.java | 4 +-
net/minecraft/network/NetHandlerPlayServer.java | 2 +-
net/minecraft/network/NetworkManager.java | 32 +++
net/minecraft/network/NetworkSystem.java | 2 +-
.../network/play/server/SPacketJoinGame.java | 2 +
net/minecraft/realms/Realms.java | 12 +-
net/minecraft/server/MinecraftServer.java | 4 +-
.../server/integrated/IntegratedServer.java | 4 +-
.../tileentity/CommandBlockBaseLogic.java | 4 +-
net/minecraft/tileentity/TileEntity.java | 6 +-
net/minecraft/tileentity/TileEntitySign.java | 2 +-
net/minecraft/util/Timer.java | 6 +
net/minecraft/util/text/TextComponentBase.java | 17 +-
net/minecraft/world/World.java | 62 ++++--
net/minecraft/world/chunk/Chunk.java | 2 +-
.../world/gen/structure/MapGenStructure.java | 6 +-
net/minecraft/world/storage/WorldInfo.java | 18 +-
73 files changed, 1366 insertions(+), 446 deletions(-)
diff --git a/net/minecraft/block/Block.java b/net/minecraft/block/Block.java
index 25c6330..00426a2 100644
--- a/net/minecraft/block/Block.java
+++ b/net/minecraft/block/Block.java
@@ -1,10 +1,15 @@
package net.minecraft.block;
import com.google.common.collect.Sets;
+
import java.util.List;
import java.util.Random;
import java.util.Set;
+
import javax.annotation.Nullable;
+
+import tk.wurst_client.WurstClient;
+import tk.wurst_client.utils.XRayUtils;
import net.minecraft.block.material.EnumPushReaction;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
@@ -370,7 +375,12 @@ public class Block
@Deprecated
public boolean isFullCube(IBlockState state)
{
- return true;
+ // TODO: Client
+ if(WurstClient.INSTANCE.mods.xRayMod.isActive())
+ return XRayUtils.isXRayBlock(this);
+ else
+ return !WurstClient.INSTANCE.mods.freecamMod.isActive()
+ && !WurstClient.INSTANCE.mods.noClipMod.isActive();
}
public boolean isPassable(IBlockAccess worldIn, BlockPos pos)
@@ -472,6 +482,10 @@ public class Block
@Deprecated
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
{
+ // TODO: Client
+ if(WurstClient.INSTANCE.mods.xRayMod.isEnabled())
+ return true;
+
AxisAlignedBB axisalignedbb = blockState.getBoundingBox(blockAccess, pos);
switch (side)
@@ -578,6 +592,10 @@ public class Block
public boolean canCollideCheck(IBlockState state, boolean hitIfLiquid)
{
+ // TODO: Client
+ if(WurstClient.INSTANCE.mods.ghostHandMod.isActive())
+ return state.getBlock() == getBlockById(WurstClient.INSTANCE.options.ghostHandID);
+
return this.isCollidable();
}
diff --git a/net/minecraft/block/BlockCactus.java b/net/minecraft/block/BlockCactus.java
index 3bba9ae..91f155d 100644
--- a/net/minecraft/block/BlockCactus.java
+++ b/net/minecraft/block/BlockCactus.java
@@ -1,6 +1,8 @@
package net.minecraft.block;
import java.util.Random;
+
+import tk.wurst_client.WurstClient;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyInteger;
@@ -64,6 +66,11 @@ public class BlockCactus extends Block
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos)
{
+ // TODO: Client
+ if(WurstClient.INSTANCE.mods.antiCactusMod.isActive())
+ return new AxisAlignedBB(pos.getX(), pos.getY(), pos.getZ(),
+ pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1);
+
return CACTUS_AABB;
}
diff --git a/net/minecraft/block/BlockChest.java b/net/minecraft/block/BlockChest.java
index c2f89f3..c441aaa 100644
--- a/net/minecraft/block/BlockChest.java
+++ b/net/minecraft/block/BlockChest.java
@@ -30,6 +30,7 @@ import net.minecraft.util.math.MathHelper;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.ILockableContainer;
import net.minecraft.world.World;
+import tk.wurst_client.WurstClient;
public class BlockChest extends BlockContainer
{
@@ -413,6 +414,9 @@ public class BlockChest extends BlockContainer
if (ilockablecontainer != null)
{
+ // TODO: Client
+ WurstClient.INSTANCE.mods.chestEspMod.openChest(pos);
+
playerIn.displayGUIChest(ilockablecontainer);
if (this.chestType == BlockChest.Type.BASIC)
diff --git a/net/minecraft/block/BlockLiquid.java b/net/minecraft/block/BlockLiquid.java
index c079ffc..ed8463f 100644
--- a/net/minecraft/block/BlockLiquid.java
+++ b/net/minecraft/block/BlockLiquid.java
@@ -1,7 +1,10 @@
package net.minecraft.block;
import java.util.Random;
+
import javax.annotation.Nullable;
+
+import tk.wurst_client.WurstClient;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyInteger;
@@ -43,12 +46,16 @@ public abstract class BlockLiquid extends Block
@Nullable
public AxisAlignedBB getCollisionBoundingBox(IBlockState blockState, World worldIn, BlockPos pos)
{
- return NULL_AABB;
+ // TODO: Client
+ return WurstClient.INSTANCE.mods.jesusMod.shouldBeSolid()
+ ? FULL_BLOCK_AABB : NULL_AABB;
}
public boolean isPassable(IBlockAccess worldIn, BlockPos pos)
{
- return this.blockMaterial != Material.LAVA;
+ // TODO: Client
+ return WurstClient.INSTANCE.mods.xRayMod.isEnabled() ? true
+ : this.blockMaterial != Material.LAVA;
}
/**
@@ -90,7 +97,9 @@ public abstract class BlockLiquid extends Block
public boolean canCollideCheck(IBlockState state, boolean hitIfLiquid)
{
- return hitIfLiquid && ((Integer)state.getValue(LEVEL)).intValue() == 0;
+ // TODO: Client
+ return (hitIfLiquid && ((Integer)state.getValue(LEVEL)).intValue() == 0)
+ || WurstClient.INSTANCE.mods.liquidsMod.isActive();
}
/**
diff --git a/net/minecraft/block/BlockSlab.java b/net/minecraft/block/BlockSlab.java
index 26dbcd0..f33452b 100644
--- a/net/minecraft/block/BlockSlab.java
+++ b/net/minecraft/block/BlockSlab.java
@@ -1,6 +1,8 @@
package net.minecraft.block;
import java.util.Random;
+
+import tk.wurst_client.WurstClient;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.IProperty;
import net.minecraft.block.properties.PropertyEnum;
@@ -74,7 +76,9 @@ public abstract class BlockSlab extends Block
public boolean isFullCube(IBlockState state)
{
- return this.isDouble();
+ // TODO: Client
+ return this.isDouble()
+ && !WurstClient.INSTANCE.mods.freecamMod.isActive();
}
public boolean shouldSideBeRendered(IBlockState blockState, IBlockAccess blockAccess, BlockPos pos, EnumFacing side)
diff --git a/net/minecraft/block/BlockSoulSand.java b/net/minecraft/block/BlockSoulSand.java
index 7b841d2..1930d3e 100644
--- a/net/minecraft/block/BlockSoulSand.java
+++ b/net/minecraft/block/BlockSoulSand.java
@@ -1,6 +1,8 @@
package net.minecraft.block;
import javax.annotation.Nullable;
+
+import tk.wurst_client.WurstClient;
import net.minecraft.block.material.MapColor;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
@@ -31,6 +33,10 @@ public class BlockSoulSand extends Block
*/
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
{
+ // TODO: Client
+ if(WurstClient.INSTANCE.mods.noSlowdownMod.isActive())
+ return;
+
entityIn.motionX *= 0.4D;
entityIn.motionZ *= 0.4D;
}
diff --git a/net/minecraft/client/Minecraft.java b/net/minecraft/client/Minecraft.java
index ad84c84..9d5ef0c 100644
--- a/net/minecraft/client/Minecraft.java
+++ b/net/minecraft/client/Minecraft.java
@@ -1,18 +1,5 @@
package net.minecraft.client;
-import com.google.common.collect.Lists;
-import com.google.common.collect.Queues;
-import com.google.common.collect.Sets;
-import com.google.common.hash.Hashing;
-import com.google.common.util.concurrent.Futures;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.google.common.util.concurrent.ListenableFutureTask;
-import com.mojang.authlib.AuthenticationService;
-import com.mojang.authlib.GameProfile;
-import com.mojang.authlib.GameProfileRepository;
-import com.mojang.authlib.minecraft.MinecraftSessionService;
-import com.mojang.authlib.properties.PropertyMap;
-import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
@@ -25,38 +12,21 @@ import java.nio.IntBuffer;
import java.text.DecimalFormat;
import java.text.MessageFormat;
import java.text.SimpleDateFormat;
-import java.util.Collections;
-import java.util.Date;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Queue;
-import java.util.Set;
-import java.util.UUID;
+import java.util.*;
import java.util.concurrent.Callable;
import java.util.concurrent.Executors;
import java.util.concurrent.FutureTask;
+
import javax.annotation.Nullable;
import javax.imageio.ImageIO;
+
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.audio.MusicTicker;
import net.minecraft.client.audio.SoundHandler;
import net.minecraft.client.entity.EntityPlayerSP;
-import net.minecraft.client.gui.FontRenderer;
-import net.minecraft.client.gui.GuiChat;
-import net.minecraft.client.gui.GuiControls;
-import net.minecraft.client.gui.GuiGameOver;
-import net.minecraft.client.gui.GuiIngame;
-import net.minecraft.client.gui.GuiIngameMenu;
-import net.minecraft.client.gui.GuiMainMenu;
-import net.minecraft.client.gui.GuiMemoryErrorScreen;
-import net.minecraft.client.gui.GuiMultiplayer;
-import net.minecraft.client.gui.GuiNewChat;
-import net.minecraft.client.gui.GuiScreen;
-import net.minecraft.client.gui.GuiScreenWorking;
-import net.minecraft.client.gui.GuiSleepMP;
-import net.minecraft.client.gui.ScaledResolution;
+import net.minecraft.client.gui.*;
import net.minecraft.client.gui.achievement.GuiAchievement;
import net.minecraft.client.gui.inventory.GuiInventory;
import net.minecraft.client.main.GameConfiguration;
@@ -67,15 +37,7 @@ import net.minecraft.client.multiplayer.WorldClient;
import net.minecraft.client.network.NetHandlerLoginClient;
import net.minecraft.client.network.NetHandlerPlayClient;
import net.minecraft.client.particle.ParticleManager;
-import net.minecraft.client.renderer.BlockRendererDispatcher;
-import net.minecraft.client.renderer.EntityRenderer;
-import net.minecraft.client.renderer.GlStateManager;
-import net.minecraft.client.renderer.ItemRenderer;
-import net.minecraft.client.renderer.OpenGlHelper;
-import net.minecraft.client.renderer.RenderGlobal;
-import net.minecraft.client.renderer.RenderItem;
-import net.minecraft.client.renderer.Tessellator;
-import net.minecraft.client.renderer.VertexBuffer;
+import net.minecraft.client.renderer.*;
import net.minecraft.client.renderer.block.model.ModelManager;
import net.minecraft.client.renderer.chunk.RenderChunk;
import net.minecraft.client.renderer.color.BlockColors;
@@ -87,28 +49,8 @@ import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.tileentity.TileEntityRendererDispatcher;
import net.minecraft.client.renderer.vertex.DefaultVertexFormats;
-import net.minecraft.client.resources.DefaultResourcePack;
-import net.minecraft.client.resources.FoliageColorReloadListener;
-import net.minecraft.client.resources.GrassColorReloadListener;
-import net.minecraft.client.resources.I18n;
-import net.minecraft.client.resources.IReloadableResourceManager;
-import net.minecraft.client.resources.IResourceManager;
-import net.minecraft.client.resources.IResourcePack;
-import net.minecraft.client.resources.LanguageManager;
-import net.minecraft.client.resources.ResourcePackRepository;
-import net.minecraft.client.resources.SimpleReloadableResourceManager;
-import net.minecraft.client.resources.SkinManager;
-import net.minecraft.client.resources.data.AnimationMetadataSection;
-import net.minecraft.client.resources.data.AnimationMetadataSectionSerializer;
-import net.minecraft.client.resources.data.FontMetadataSection;
-import net.minecraft.client.resources.data.FontMetadataSectionSerializer;
-import net.minecraft.client.resources.data.LanguageMetadataSection;
-import net.minecraft.client.resources.data.LanguageMetadataSectionSerializer;
-import net.minecraft.client.resources.data.MetadataSerializer;
-import net.minecraft.client.resources.data.PackMetadataSection;
-import net.minecraft.client.resources.data.PackMetadataSectionSerializer;
-import net.minecraft.client.resources.data.TextureMetadataSection;
-import net.minecraft.client.resources.data.TextureMetadataSectionSerializer;
+import net.minecraft.client.resources.*;
+import net.minecraft.client.resources.data.*;
import net.minecraft.client.settings.GameSettings;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.client.shader.Framebuffer;
@@ -151,20 +93,8 @@ import net.minecraft.stats.IStatStringFormat;
import net.minecraft.stats.StatisticsManager;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.tileentity.TileEntitySkull;
-import net.minecraft.util.EnumActionResult;
-import net.minecraft.util.EnumFacing;
-import net.minecraft.util.EnumHand;
-import net.minecraft.util.FrameTimer;
-import net.minecraft.util.IThreadListener;
-import net.minecraft.util.MinecraftError;
-import net.minecraft.util.MouseHelper;
-import net.minecraft.util.MovementInputFromOptions;
-import net.minecraft.util.ReportedException;
-import net.minecraft.util.ResourceLocation;
-import net.minecraft.util.ScreenShotHelper;
-import net.minecraft.util.Session;
+import net.minecraft.util.*;
import net.minecraft.util.Timer;
-import net.minecraft.util.Util;
import net.minecraft.util.datafix.DataFixer;
import net.minecraft.util.datafix.DataFixesManager;
import net.minecraft.util.math.BlockPos;
@@ -182,6 +112,7 @@ import net.minecraft.world.chunk.storage.AnvilSaveConverter;
import net.minecraft.world.storage.ISaveFormat;
import net.minecraft.world.storage.ISaveHandler;
import net.minecraft.world.storage.WorldInfo;
+
import org.apache.commons.io.Charsets;
import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.Validate;
@@ -199,10 +130,35 @@ import org.lwjgl.opengl.OpenGLException;
import org.lwjgl.opengl.PixelFormat;
import org.lwjgl.util.glu.GLU;
+import tk.wurst_client.WurstClient;
+import tk.wurst_client.bot.WurstBot;
+import tk.wurst_client.events.LeftClickEvent;
+import tk.wurst_client.gui.main.GuiWurstMainMenu;
+import tk.wurst_client.hooks.FrameHook;
+import tk.wurst_client.spam.SpamProcessor;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Queues;
+import com.google.common.collect.Sets;
+import com.google.common.hash.Hashing;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.ListenableFutureTask;
+import com.mojang.authlib.AuthenticationService;
+import com.mojang.authlib.GameProfile;
+import com.mojang.authlib.GameProfileRepository;
+import com.mojang.authlib.minecraft.MinecraftSessionService;
+import com.mojang.authlib.properties.PropertyMap;
+import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService;
+
public class Minecraft implements IThreadListener, ISnooperInfo
{
private static final Logger LOGGER = LogManager.getLogger();
- private static final ResourceLocation LOCATION_MOJANG_PNG = new ResourceLocation("textures/gui/title/mojang.png");
+
+ // TODO: Client
+ private static final ResourceLocation LOCATION_MOJANG_PNG =
+ new ResourceLocation("wurst/wurst_loading.png");
+
public static final boolean IS_RUNNING_ON_MAC = Util.getOSType() == Util.EnumOS.OSX;
/** A 10MiB preallocation to ensure the heap is reasonably sized. */
@@ -236,7 +192,7 @@ public class Minecraft implements IThreadListener, ISnooperInfo
/** True if the player is connected to a realms server */
private boolean connectedToRealms;
- private final Timer timer = new Timer(20.0F);
+ public final Timer timer = new Timer(20.0F);
/** Instance of PlayerUsageSnooper. */
private final Snooper usageSnooper = new Snooper("client", this, MinecraftServer.getCurrentTimeMillis());
@@ -250,7 +206,7 @@ public class Minecraft implements IThreadListener, ISnooperInfo
private Entity renderViewEntity;
public Entity pointedEntity;
public ParticleManager effectRenderer;
- private final Session session;
+ public Session session;
private boolean isGamePaused;
/** The font renderer used for displaying and measuring text */
@@ -308,7 +264,7 @@ public class Minecraft implements IThreadListener, ISnooperInfo
/**
* When you place a block, it's set to 6, decremented once per tick, when it's 0, you can place another block.
*/
- private int rightClickDelayTimer;
+ public int rightClickDelayTimer;
private String serverName;
private int serverPort;
@@ -591,13 +547,16 @@ public class Minecraft implements IThreadListener, ISnooperInfo
this.checkGLError("Post startup");
this.ingameGUI = new GuiIngame(this);
+ // TODO: Client
+ WurstClient.INSTANCE.startClient();
+
if (this.serverName != null)
{
- this.displayGuiScreen(new GuiConnecting(new GuiMainMenu(), this, this.serverName, this.serverPort));
+ this.displayGuiScreen(new GuiConnecting(new GuiWurstMainMenu(), this, this.serverName, this.serverPort));
}
else
{
- this.displayGuiScreen(new GuiMainMenu());
+ this.displayGuiScreen(new GuiWurstMainMenu());
}
this.renderEngine.deleteTexture(this.mojangLogo);
@@ -621,6 +580,10 @@ public class Minecraft implements IThreadListener, ISnooperInfo
}
this.renderGlobal.makeEntityOutlineShader();
+
+ // TODO: Client
+ if(WurstBot.isEnabled())
+ WurstBot.getBot().start();
}
private void registerMetadataSerializers()
@@ -675,6 +638,9 @@ public class Minecraft implements IThreadListener, ISnooperInfo
else
{
Display.setDisplayMode(new DisplayMode(this.displayWidth, this.displayHeight));
+
+ // TODO: Client
+ FrameHook.createFrame(mcDefaultResourcePack, LOGGER);
}
}
@@ -781,12 +747,26 @@ public class Minecraft implements IThreadListener, ISnooperInfo
if (crashReportIn.getFile() != null)
{
- Bootstrap.printToSYSOUT("#@!@# Game crashed! Crash report saved to: #@!@# " + crashReportIn.getFile());
+
+ // TODO: Client
+ Bootstrap
+ .printToSYSOUT("#@!@# Game crashed! Crash report saved to: "
+ + crashReportIn.getFile());
+ Bootstrap
+ .printToSYSOUT("#@!@# Please report this crash at: https://www.wurst-client.tk/bugs/");
+
System.exit(-1);
}
else if (crashReportIn.saveToFile(file2))
{
- Bootstrap.printToSYSOUT("#@!@# Game crashed! Crash report saved to: #@!@# " + file2.getAbsolutePath());
+
+ // TODO: Client
+ Bootstrap
+ .printToSYSOUT("#@!@# Game crashed! Crash report saved to: "
+ + file2.getAbsolutePath());
+ Bootstrap
+ .printToSYSOUT("#@!@# Please report this crash at: https://www.wurst-client.tk/bugs/");
+
System.exit(-1);
}
else
@@ -1002,14 +982,14 @@ public class Minecraft implements IThreadListener, ISnooperInfo
if (guiScreenIn == null && this.theWorld == null)
{
- guiScreenIn = new GuiMainMenu();
+ guiScreenIn = new GuiWurstMainMenu();
}
else if (guiScreenIn == null && this.thePlayer.getHealth() <= 0.0F)
{
guiScreenIn = new GuiGameOver((ITextComponent)null);
}
- if (guiScreenIn instanceof GuiMainMenu || guiScreenIn instanceof GuiMultiplayer)
+ if (guiScreenIn instanceof GuiWurstMainMenu || guiScreenIn instanceof GuiMultiplayer)
{
this.gameSettings.showDebugInfo = false;
this.ingameGUI.getChatGUI().clearChatMessages();
@@ -1535,6 +1515,10 @@ public class Minecraft implements IThreadListener, ISnooperInfo
{
if (this.leftClickCounter <= 0)
{
+
+ // TODO: Client
+ WurstClient.INSTANCE.events.fire(LeftClickEvent.INSTANCE);
+
if (this.objectMouseOver == null)
{
LOGGER.error("Null returned as \'hitResult\', this shouldn\'t happen!");
@@ -1576,11 +1560,11 @@ public class Minecraft implements IThreadListener, ISnooperInfo
}
@SuppressWarnings("incomplete-switch")
+ public
/**
* Called when user clicked he's mouse right button (place)
- */
- private void rightClickMouse()
+ */ void rightClickMouse()
{
if (!this.playerController.getIsHittingBlock())
{
@@ -1807,8 +1791,11 @@ public class Minecraft implements IThreadListener, ISnooperInfo
this.leftClickCounter = 10000;
}
- if (this.currentScreen != null)
+ // TODO: Client
+ if(this.currentScreen != null
+ && !WurstClient.INSTANCE.mods.menuWalkMod.shouldAllowWalking())
{
+
try
{
this.currentScreen.handleInput();
@@ -1817,7 +1804,7 @@ public class Minecraft implements IThreadListener, ISnooperInfo
{
CrashReport crashreport = CrashReport.makeCrashReport(throwable1, "Updating screen events");
CrashReportCategory crashreportcategory = crashreport.makeCategory("Affected screen");
- crashreportcategory.func_189529_a("Screen name", new ICrashReportDetail<String>()
+ crashreportcategory.addCrashSectionCallable("Screen name", new ICrashReportDetail<String>()
{
public String call() throws Exception
{
@@ -1837,7 +1824,7 @@ public class Minecraft implements IThreadListener, ISnooperInfo
{
CrashReport crashreport1 = CrashReport.makeCrashReport(throwable, "Ticking screen");
CrashReportCategory crashreportcategory1 = crashreport1.makeCategory("Affected screen");
- crashreportcategory1.func_189529_a("Screen name", new ICrashReportDetail<String>()
+ crashreportcategory1.addCrashSectionCallable("Screen name", new ICrashReportDetail<String>()
{
public String call() throws Exception
{
@@ -1849,8 +1836,11 @@ public class Minecraft implements IThreadListener, ISnooperInfo
}
}
- if (this.currentScreen == null || this.currentScreen.allowUserInput)
+ // TODO: Client
+ if(this.currentScreen == null || this.currentScreen.allowUserInput
+ || WurstClient.INSTANCE.mods.menuWalkMod.shouldAllowWalking())
{
+
this.mcProfiler.endStartSection("mouse");
this.runTickMouse();
@@ -1943,8 +1933,11 @@ public class Minecraft implements IThreadListener, ISnooperInfo
this.mcProfiler.endStartSection("animateTick");
- if (!this.isGamePaused && this.theWorld != null)
+ // TODO: Client
+ if(!this.isGamePaused && this.theWorld != null
+ && !WurstClient.INSTANCE.mods.freecamMod.isActive())
{
+
this.theWorld.doVoidFogParticles(MathHelper.floor_double(this.thePlayer.posX), MathHelper.floor_double(this.thePlayer.posY), MathHelper.floor_double(this.thePlayer.posZ));
}
@@ -2009,6 +2002,19 @@ public class Minecraft implements IThreadListener, ISnooperInfo
if (this.currentScreen == null)
{
+
+ // TODO: Client
+ if(Keyboard.getEventKey() != 0
+ && WurstClient.INSTANCE.isEnabled())
+ {
+ TreeSet<String> eventCommands =
+ WurstClient.INSTANCE.keybinds.get(
+ Keyboard.getKeyName(Keyboard.getEventKey()));
+ if(eventCommands != null)
+ eventCommands.forEach((cmd) -> thePlayer
+ .sendAutomaticChatMessage(cmd));
+ }
+
if (i == 1)
{
this.displayInGameMenu();
@@ -2451,6 +2457,12 @@ public class Minecraft implements IThreadListener, ISnooperInfo
networkmanager.sendPacket(new C00Handshake(210, socketaddress.toString(), 0, EnumConnectionState.LOGIN));
networkmanager.sendPacket(new CPacketLoginStart(this.getSession().getProfile()));
this.myNetworkManager = networkmanager;
+
+ // TODO: Client
+ SpamProcessor.runScript("joinworld",
+ "Runs whenever you join a singleplayer world.");
+ WurstClient.INSTANCE.analytics.trackPageView("/play/singleplayer",
+ "Singleplayer");
}
/**
@@ -2656,6 +2668,11 @@ public class Minecraft implements IThreadListener, ISnooperInfo
}
else
{
+
+ // TODO: Client
+ WurstClient.INSTANCE.friends
+ .middleClick(objectMouseOver.entityHit);
+
if (this.objectMouseOver.typeOfHit != RayTraceResult.Type.ENTITY || this.objectMouseOver.entityHit == null || !flag)
{
return;
@@ -2817,42 +2834,42 @@ public class Minecraft implements IThreadListener, ISnooperInfo
*/
public CrashReport addGraphicsAndWorldToCrashReport(CrashReport theCrash)
{
- theCrash.getCategory().func_189529_a("Launched Version", new ICrashReportDetail<String>()
+ theCrash.getCategory().addCrashSectionCallable("Launched Version", new ICrashReportDetail<String>()
{
public String call() throws Exception
{
return Minecraft.this.launchedVersion;
}
});
- theCrash.getCategory().func_189529_a("LWJGL", new ICrashReportDetail<String>()
+ theCrash.getCategory().addCrashSectionCallable("LWJGL", new ICrashReportDetail<String>()
{
public String call()
{
return Sys.getVersion();
}
});
- theCrash.getCategory().func_189529_a("OpenGL", new ICrashReportDetail<String>()
+ theCrash.getCategory().addCrashSectionCallable("OpenGL", new ICrashReportDetail<String>()
{
public String call()
{
return GlStateManager.glGetString(7937) + " GL version " + GlStateManager.glGetString(7938) + ", " + GlStateManager.glGetString(7936);
}
});
- theCrash.getCategory().func_189529_a("GL Caps", new ICrashReportDetail<String>()
+ theCrash.getCategory().addCrashSectionCallable("GL Caps", new ICrashReportDetail<String>()
{
public String call()
{
return OpenGlHelper.getLogText();
}
});
- theCrash.getCategory().func_189529_a("Using VBOs", new ICrashReportDetail<String>()
+ theCrash.getCategory().addCrashSectionCallable("Using VBOs", new ICrashReportDetail<String>()
{
public String call()
{
return Minecraft.this.gameSettings.useVbo ? "Yes" : "No";
}
});
- theCrash.getCategory().func_189529_a("Is Modded", new ICrashReportDetail<String>()
+ theCrash.getCategory().addCrashSectionCallable("Is Modded", new ICrashReportDetail<String>()
{
public String call() throws Exception
{
@@ -2860,14 +2877,14 @@ public class Minecraft implements IThreadListener, ISnooperInfo
return !"vanilla".equals(s) ? "Definitely; Client brand changed to \'" + s + "\'" : (Minecraft.class.getSigners() == null ? "Very likely; Jar signature invalidated" : "Probably not. Jar signature remains and client brand is untouched.");
}
});
- theCrash.getCategory().func_189529_a("Type", new ICrashReportDetail<String>()
+ theCrash.getCategory().addCrashSectionCallable("Type", new ICrashReportDetail<String>()
{
public String call() throws Exception
{
return "Client (map_client.txt)";
}
});
- theCrash.getCategory().func_189529_a("Resource Packs", new ICrashReportDetail<String>()
+ theCrash.getCategory().addCrashSectionCallable("Resource Packs", new ICrashReportDetail<String>()
{
public String call() throws Exception
{
@@ -2891,21 +2908,21 @@ public class Minecraft implements IThreadListener, ISnooperInfo
return stringbuilder.toString();
}
});
- theCrash.getCategory().func_189529_a("Current Language", new ICrashReportDetail<String>()
+ theCrash.getCategory().addCrashSectionCallable("Current Language", new ICrashReportDetail<String>()
{
public String call() throws Exception
{
return Minecraft.this.mcLanguageManager.getCurrentLanguage().toString();
}
});
- theCrash.getCategory().func_189529_a("Profiler Position", new ICrashReportDetail<String>()
+ theCrash.getCategory().addCrashSectionCallable("Profiler Position", new ICrashReportDetail<String>()
{
public String call() throws Exception
{
return Minecraft.this.mcProfiler.profilingEnabled ? Minecraft.this.mcProfiler.getNameOfLastSection() : "N/A (disabled)";
}
});
- theCrash.getCategory().func_189529_a("CPU", new ICrashReportDetail<String>()
+ theCrash.getCategory().addCrashSectionCallable("CPU", new ICrashReportDetail<String>()
{
public String call()
{
diff --git a/net/minecraft/client/entity/EntityPlayerSP.java b/net/minecraft/client/entity/EntityPlayerSP.java
index 38f8c49..770436b 100644
--- a/net/minecraft/client/entity/EntityPlayerSP.java
+++ b/net/minecraft/client/entity/EntityPlayerSP.java
@@ -1,7 +1,16 @@
package net.minecraft.client.entity;
import java.util.List;
+
import javax.annotation.Nullable;
+
+import tk.wurst_client.WurstClient;
+import tk.wurst_client.events.ChatOutputEvent;
+import tk.wurst_client.events.UpdateEvent;
+import tk.wurst_client.mods.JesusMod;
+import tk.wurst_client.special.YesCheatSpf.BypassLevel;
+import tk.wurst_client.utils.EntityUtils;
+import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.client.audio.ElytraSound;
@@ -41,16 +50,8 @@ import net.minecraft.item.Item;
import net.minecraft.item.ItemElytra;
import net.minecraft.item.ItemStack;
import net.minecraft.network.datasync.DataParameter;
-import net.minecraft.network.play.client.CPacketAnimation;
-import net.minecraft.network.play.client.CPacketChatMessage;
-import net.minecraft.network.play.client.CPacketClientStatus;
-import net.minecraft.network.play.client.CPacketCloseWindow;
-import net.minecraft.network.play.client.CPacketEntityAction;
-import net.minecraft.network.play.client.CPacketInput;
-import net.minecraft.network.play.client.CPacketPlayer;
-import net.minecraft.network.play.client.CPacketPlayerAbilities;
-import net.minecraft.network.play.client.CPacketPlayerDigging;
-import net.minecraft.network.play.client.CPacketVehicleMove;
+import net.minecraft.network.play.client.*;
+import net.minecraft.network.play.client.CPacketEntityAction.Action;
import net.minecraft.potion.Potion;
import net.minecraft.potion.PotionEffect;
import net.minecraft.stats.StatBase;
@@ -151,7 +152,7 @@ public class EntityPlayerSP extends AbstractClientPlayer
private boolean handActive;
private EnumHand activeHand;
private boolean rowingBoat;
- private boolean field_189811_cr = true;
+ private boolean autoJumpEnabled = true;
private int field_189812_cs;
private boolean field_189813_ct;
@@ -216,6 +217,10 @@ public class EntityPlayerSP extends AbstractClientPlayer
{
if (this.worldObj.isBlockLoaded(new BlockPos(this.posX, 0.0D, this.posZ)))
{
+ //TODO: Client
+ WurstClient wurst = WurstClient.INSTANCE;
+ wurst.events.fire(UpdateEvent.INSTANCE);
+
super.onUpdate();
if (this.isRiding())
@@ -233,6 +238,18 @@ public class EntityPlayerSP extends AbstractClientPlayer
{
this.onUpdateWalkingPlayer();
}
+
+ // TODO: Client
+ // TODO: Event management for this
+ if(wurst.mods.sneakMod.isActive())
+ {
+ NetHandlerPlayClient connection =
+ Minecraft.getMinecraft().thePlayer.connection;
+ connection.sendPacket(new CPacketEntityAction(Minecraft
+ .getMinecraft().thePlayer, Action.STOP_SNEAKING));
+ connection.sendPacket(new CPacketEntityAction(Minecraft
+ .getMinecraft().thePlayer, Action.START_SNEAKING));
+ }
}
}
@@ -275,24 +292,98 @@ public class EntityPlayerSP extends AbstractClientPlayer
if (this.isCurrentViewEntity())
{
+ // TODO: Client
+ float yaw;
+ float pitch;
+ if(EntityUtils.lookChanged)
+ {
+ yaw = EntityUtils.yaw;
+ pitch = EntityUtils.pitch;
+ }else
+ {
+ EntityUtils.yaw = EntityUtils.limitAngleChange(EntityUtils.yaw, rotationYaw, 30);
+ EntityUtils.pitch = rotationPitch;
+
+ yaw = EntityUtils.yaw;
+ pitch = EntityUtils.pitch;
+ }
+
AxisAlignedBB axisalignedbb = this.getEntityBoundingBox();
double d0 = this.posX - this.lastReportedPosX;
double d1 = axisalignedbb.minY - this.lastReportedPosY;
double d2 = this.posZ - this.lastReportedPosZ;
- double d3 = (double)(this.rotationYaw - this.lastReportedYaw);
- double d4 = (double)(this.rotationPitch - this.lastReportedPitch);
+ double d3 = (double)(yaw - this.lastReportedYaw);
+ double d4 = (double)(pitch - this.lastReportedPitch);
++this.positionUpdateTicks;
boolean flag2 = d0 * d0 + d1 * d1 + d2 * d2 > 9.0E-4D || this.positionUpdateTicks >= 20;
boolean flag3 = d3 != 0.0D || d4 != 0.0D;
- if (this.isRiding())
+
+ // TODO: Client
+ // Stops motion updates
+ if(WurstClient.INSTANCE.mods.remoteViewMod.isActive()
+ || WurstClient.INSTANCE.mods.freecamMod.isActive()
+ || (WurstClient.INSTANCE.mods.potionSaverMod.isActive()
+ && !getActivePotionEffects().isEmpty() && motionX == 0
+ && motionZ == 0))
+ {
+
+ }else if(WurstClient.INSTANCE.mods.jesusMod.isActive()
+ && WurstClient.INSTANCE.mods.jesusMod.isOverWater()
+ && !mc.thePlayer.isInWater()
+ && !(mc.thePlayer.fallDistance > 3F))
+ {
+ if(!flag2)
+ if(flag3)
+ this.connection.sendPacket(new CPacketPlayer.Rotation(
+ yaw, pitch, this.onGround));
+ else
+ this.connection
+ .sendPacket(new CPacketPlayer(this.onGround));
+ else if(mc.thePlayer.movementInput == null)
+ {
+
+ }else
{
- this.connection.sendPacket(new CPacketPlayer.PositionRotation(this.motionX, -999.0D, this.motionZ, this.rotationYaw, this.rotationPitch, this.onGround));
+ JesusMod jesusMod = WurstClient.INSTANCE.mods.jesusMod;
+ jesusMod.time++;
+ if(jesusMod.time >= jesusMod.delay)
+ {
+ final double x = mc.thePlayer.posX;
+ final double y = mc.thePlayer.posY;
+ final double z = mc.thePlayer.posZ;
+ final float pitch2 = mc.thePlayer.rotationPitch;
+ final float yaw2 = mc.thePlayer.rotationYaw;
+
+ if(mc.thePlayer.ticksExisted % 2 == 0)
+ mc.thePlayer.connection.sendPacket(
+ new CPacketPlayer.PositionRotation(x, y - 0.05,
+ z, yaw2, pitch2, true));
+ else
+ mc.thePlayer.connection.sendPacket(
+ new CPacketPlayer.PositionRotation(x, y + 0.05,
+ z, yaw2, pitch2, true));
+ }else if(flag2 && flag3)
+ {
+ this.connection.sendPacket(
+ new CPacketPlayer.PositionRotation(this.posX,
+ this.getEntityBoundingBox().minY, this.posZ,
+ yaw, pitch, this.onGround));
+ }else
+ {
+ this.connection.sendPacket(new CPacketPlayer.Position(
+ this.posX, this.getEntityBoundingBox().minY,
+ this.posZ, this.onGround));
+ }
+ }
+ }else if (this.isRiding())
+ {
+ this.connection.sendPacket(new CPacketPlayer.PositionRotation(this.motionX, -999.0D, this.motionZ, yaw, pitch, this.onGround));
flag2 = false;
}
else if (flag2 && flag3)
{
- this.connection.sendPacket(new CPacketPlayer.PositionRotation(this.posX, axisalignedbb.minY, this.posZ, this.rotationYaw, this.rotationPitch, this.onGround));
+ this.connection.sendPacket(new CPacketPlayer.PositionRotation(this.posX, axisalignedbb.minY, this.posZ, yaw, pitch, this.onGround));
}
else if (flag2)
{
@@ -300,7 +391,7 @@ public class EntityPlayerSP extends AbstractClientPlayer
}
else if (flag3)
{
- this.connection.sendPacket(new CPacketPlayer.Rotation(this.rotationYaw, this.rotationPitch, this.onGround));
+ this.connection.sendPacket(new CPacketPlayer.Rotation(yaw, pitch, this.onGround));
}
else if (this.prevOnGround != this.onGround)
{
@@ -322,7 +413,7 @@ public class EntityPlayerSP extends AbstractClientPlayer
}
this.prevOnGround = this.onGround;
- this.field_189811_cr = this.mc.gameSettings.field_189989_R;
+ this.autoJumpEnabled = this.mc.gameSettings.field_189989_R;
}
}
@@ -350,9 +441,31 @@ public class EntityPlayerSP extends AbstractClientPlayer
*/
public void sendChatMessage(String message)
{
+ //TODO: Client
+ ChatOutputEvent event = new ChatOutputEvent(message, false);
+ WurstClient.INSTANCE.commands.onSentMessage(event);
+ WurstClient.INSTANCE.events.fire(event);
+ if(event.isCancelled())
+ return;