Commits

md_5 authored 570526c2b48
Add limits to item interactions as well
No tags

CraftBukkit-Patches/0003-mc-dev-imports.patch

Modified
1 -From 9cc906c7892b928cb1b7895fab0aacad410070e8 Mon Sep 17 00:00:00 2001
1 +From cb4ce7e7bc18279c245e8a5aabc35b8fbfff1403 Mon Sep 17 00:00:00 2001
2 2 From: md_5 <md_5@live.com.au>
3 3 Date: Sun, 1 Dec 2013 15:10:48 +1100
4 4 Subject: [PATCH] mc-dev imports
5 5
6 6 Imported files which are only modified by Spigot, not upstream. Files here should be completely unmodified aside from trivial changes such as adding throws statements to ensure proper compilation. You may need to add unrelated files in order to ensure a compilable result in the face of synthetic methods.
7 7
8 8 diff --git a/src/main/java/net/minecraft/server/AttributeRanged.java b/src/main/java/net/minecraft/server/AttributeRanged.java
9 9 new file mode 100644
10 10 index 0000000..130597c
11 11 --- /dev/null
888 888 + }
889 889 +
890 890 + public void a(PacketListenerPlayIn packetlistenerplayin) {
891 891 + packetlistenerplayin.a(this);
892 892 + }
893 893 +
894 894 + public EnumHand a() {
895 895 + return this.a;
896 896 + }
897 897 +}
898 +diff --git a/src/main/java/net/minecraft/server/PacketPlayInBlockPlace.java b/src/main/java/net/minecraft/server/PacketPlayInBlockPlace.java
899 +new file mode 100644
900 +index 0000000..43310e8
901 +--- /dev/null
902 ++++ b/src/main/java/net/minecraft/server/PacketPlayInBlockPlace.java
903 +@@ -0,0 +1,30 @@
904 ++package net.minecraft.server;
905 ++
906 ++import java.io.IOException;
907 ++
908 ++public class PacketPlayInBlockPlace implements Packet<PacketListenerPlayIn> {
909 ++
910 ++ private EnumHand a;
911 ++
912 ++ public PacketPlayInBlockPlace() {}
913 ++
914 ++ public PacketPlayInBlockPlace(EnumHand enumhand) {
915 ++ this.a = enumhand;
916 ++ }
917 ++
918 ++ public void a(PacketDataSerializer packetdataserializer) throws IOException {
919 ++ this.a = (EnumHand) packetdataserializer.a(EnumHand.class);
920 ++ }
921 ++
922 ++ public void b(PacketDataSerializer packetdataserializer) throws IOException {
923 ++ packetdataserializer.a((Enum) this.a);
924 ++ }
925 ++
926 ++ public void a(PacketListenerPlayIn packetlistenerplayin) {
927 ++ packetlistenerplayin.a(this);
928 ++ }
929 ++
930 ++ public EnumHand a() {
931 ++ return this.a;
932 ++ }
933 ++}
898 934 diff --git a/src/main/java/net/minecraft/server/PacketPlayInChat.java b/src/main/java/net/minecraft/server/PacketPlayInChat.java
899 935 new file mode 100644
900 936 index 0000000..2e7d61a
901 937 --- /dev/null
902 938 +++ b/src/main/java/net/minecraft/server/PacketPlayInChat.java
903 939 @@ -0,0 +1,34 @@
904 940 +package net.minecraft.server;
905 941 +
906 942 +import java.io.IOException;
907 943 +
928 964 + }
929 965 +
930 966 + public void a(PacketListenerPlayIn packetlistenerplayin) {
931 967 + packetlistenerplayin.a(this);
932 968 + }
933 969 +
934 970 + public String a() {
935 971 + return this.a;
936 972 + }
937 973 +}
974 +diff --git a/src/main/java/net/minecraft/server/PacketPlayInUseItem.java b/src/main/java/net/minecraft/server/PacketPlayInUseItem.java
975 +new file mode 100644
976 +index 0000000..82e09c1
977 +--- /dev/null
978 ++++ b/src/main/java/net/minecraft/server/PacketPlayInUseItem.java
979 +@@ -0,0 +1,61 @@
980 ++package net.minecraft.server;
981 ++
982 ++import java.io.IOException;
983 ++
984 ++public class PacketPlayInUseItem implements Packet<PacketListenerPlayIn> {
985 ++
986 ++ private BlockPosition a;
987 ++ private EnumDirection b;
988 ++ private EnumHand c;
989 ++ private float d;
990 ++ private float e;
991 ++ private float f;
992 ++
993 ++ public PacketPlayInUseItem() {}
994 ++
995 ++ public void a(PacketDataSerializer packetdataserializer) throws IOException {
996 ++ this.a = packetdataserializer.e();
997 ++ this.b = (EnumDirection) packetdataserializer.a(EnumDirection.class);
998 ++ this.c = (EnumHand) packetdataserializer.a(EnumHand.class);
999 ++ this.d = (float) packetdataserializer.readUnsignedByte() / 16.0F;
1000 ++ this.e = (float) packetdataserializer.readUnsignedByte() / 16.0F;
1001 ++ this.f = (float) packetdataserializer.readUnsignedByte() / 16.0F;
1002 ++ }
1003 ++
1004 ++ public void b(PacketDataSerializer packetdataserializer) throws IOException {
1005 ++ packetdataserializer.a(this.a);
1006 ++ packetdataserializer.a((Enum) this.b);
1007 ++ packetdataserializer.a((Enum) this.c);
1008 ++ packetdataserializer.writeByte((int) (this.d * 16.0F));
1009 ++ packetdataserializer.writeByte((int) (this.e * 16.0F));
1010 ++ packetdataserializer.writeByte((int) (this.f * 16.0F));
1011 ++ }
1012 ++
1013 ++ public void a(PacketListenerPlayIn packetlistenerplayin) {
1014 ++ packetlistenerplayin.a(this);
1015 ++ }
1016 ++
1017 ++ public BlockPosition a() {
1018 ++ return this.a;
1019 ++ }
1020 ++
1021 ++ public EnumDirection b() {
1022 ++ return this.b;
1023 ++ }
1024 ++
1025 ++ public EnumHand c() {
1026 ++ return this.c;
1027 ++ }
1028 ++
1029 ++ public float d() {
1030 ++ return this.d;
1031 ++ }
1032 ++
1033 ++ public float e() {
1034 ++ return this.e;
1035 ++ }
1036 ++
1037 ++ public float f() {
1038 ++ return this.f;
1039 ++ }
1040 ++}
938 1041 diff --git a/src/main/java/net/minecraft/server/PacketPlayOutChat.java b/src/main/java/net/minecraft/server/PacketPlayOutChat.java
939 1042 new file mode 100644
940 1043 index 0000000..c5147b6
941 1044 --- /dev/null
942 1045 +++ b/src/main/java/net/minecraft/server/PacketPlayOutChat.java
943 1046 @@ -0,0 +1,38 @@
944 1047 +package net.minecraft.server;
945 1048 +
946 1049 +import java.io.IOException;
947 1050 +

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut