Dev imports
This commit is contained in:
103
src/main/java/net/minecraft/server/PacketPlayOutAbilities.java
Normal file
103
src/main/java/net/minecraft/server/PacketPlayOutAbilities.java
Normal file
@@ -0,0 +1,103 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class PacketPlayOutAbilities implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
private boolean a;
|
||||
private boolean b;
|
||||
private boolean c;
|
||||
private boolean d;
|
||||
private float e;
|
||||
private float f;
|
||||
|
||||
public PacketPlayOutAbilities() {}
|
||||
|
||||
public PacketPlayOutAbilities(PlayerAbilities playerabilities) {
|
||||
this.a(playerabilities.isInvulnerable);
|
||||
this.b(playerabilities.isFlying);
|
||||
this.c(playerabilities.canFly);
|
||||
this.d(playerabilities.canInstantlyBuild);
|
||||
this.a(playerabilities.a());
|
||||
this.b(playerabilities.b());
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
byte b0 = packetdataserializer.readByte();
|
||||
|
||||
this.a((b0 & 1) > 0);
|
||||
this.b((b0 & 2) > 0);
|
||||
this.c((b0 & 4) > 0);
|
||||
this.d((b0 & 8) > 0);
|
||||
this.a(packetdataserializer.readFloat());
|
||||
this.b(packetdataserializer.readFloat());
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
byte b0 = 0;
|
||||
|
||||
if (this.b()) {
|
||||
b0 = (byte) (b0 | 1);
|
||||
}
|
||||
|
||||
if (this.c()) {
|
||||
b0 = (byte) (b0 | 2);
|
||||
}
|
||||
|
||||
if (this.d()) {
|
||||
b0 = (byte) (b0 | 4);
|
||||
}
|
||||
|
||||
if (this.e()) {
|
||||
b0 = (byte) (b0 | 8);
|
||||
}
|
||||
|
||||
packetdataserializer.writeByte(b0);
|
||||
packetdataserializer.writeFloat(this.e);
|
||||
packetdataserializer.writeFloat(this.f);
|
||||
}
|
||||
|
||||
public void a(PacketListenerPlayOut packetlistenerplayout) {
|
||||
packetlistenerplayout.a(this);
|
||||
}
|
||||
|
||||
public boolean b() {
|
||||
return this.a;
|
||||
}
|
||||
|
||||
public void a(boolean flag) {
|
||||
this.a = flag;
|
||||
}
|
||||
|
||||
public boolean c() {
|
||||
return this.b;
|
||||
}
|
||||
|
||||
public void b(boolean flag) {
|
||||
this.b = flag;
|
||||
}
|
||||
|
||||
public boolean d() {
|
||||
return this.c;
|
||||
}
|
||||
|
||||
public void c(boolean flag) {
|
||||
this.c = flag;
|
||||
}
|
||||
|
||||
public boolean e() {
|
||||
return this.d;
|
||||
}
|
||||
|
||||
public void d(boolean flag) {
|
||||
this.d = flag;
|
||||
}
|
||||
|
||||
public void a(float f) {
|
||||
this.e = f;
|
||||
}
|
||||
|
||||
public void b(float f) {
|
||||
this.f = f;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
import java.io.IOException;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
public class PacketPlayOutAdvancements implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
private boolean a;
|
||||
private Map<MinecraftKey, Advancement.SerializedAdvancement> b;
|
||||
private Set<MinecraftKey> c;
|
||||
private Map<MinecraftKey, AdvancementProgress> d;
|
||||
|
||||
public PacketPlayOutAdvancements() {}
|
||||
|
||||
public PacketPlayOutAdvancements(boolean flag, Collection<Advancement> collection, Set<MinecraftKey> set, Map<MinecraftKey, AdvancementProgress> map) {
|
||||
this.a = flag;
|
||||
this.b = Maps.newHashMap();
|
||||
Iterator iterator = collection.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
Advancement advancement = (Advancement) iterator.next();
|
||||
|
||||
this.b.put(advancement.getName(), advancement.a());
|
||||
}
|
||||
|
||||
this.c = set;
|
||||
this.d = Maps.newHashMap(map);
|
||||
}
|
||||
|
||||
public void a(PacketListenerPlayOut packetlistenerplayout) {
|
||||
packetlistenerplayout.a(this);
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
this.a = packetdataserializer.readBoolean();
|
||||
this.b = Maps.newHashMap();
|
||||
this.c = Sets.newLinkedHashSet();
|
||||
this.d = Maps.newHashMap();
|
||||
int i = packetdataserializer.g();
|
||||
|
||||
MinecraftKey minecraftkey;
|
||||
int j;
|
||||
|
||||
for (j = 0; j < i; ++j) {
|
||||
minecraftkey = packetdataserializer.l();
|
||||
Advancement.SerializedAdvancement advancement_serializedadvancement = Advancement.SerializedAdvancement.b(packetdataserializer);
|
||||
|
||||
this.b.put(minecraftkey, advancement_serializedadvancement);
|
||||
}
|
||||
|
||||
i = packetdataserializer.g();
|
||||
|
||||
for (j = 0; j < i; ++j) {
|
||||
minecraftkey = packetdataserializer.l();
|
||||
this.c.add(minecraftkey);
|
||||
}
|
||||
|
||||
i = packetdataserializer.g();
|
||||
|
||||
for (j = 0; j < i; ++j) {
|
||||
minecraftkey = packetdataserializer.l();
|
||||
this.d.put(minecraftkey, AdvancementProgress.b(packetdataserializer));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
packetdataserializer.writeBoolean(this.a);
|
||||
packetdataserializer.d(this.b.size());
|
||||
Iterator iterator = this.b.entrySet().iterator();
|
||||
|
||||
Entry entry;
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
entry = (Entry) iterator.next();
|
||||
MinecraftKey minecraftkey = (MinecraftKey) entry.getKey();
|
||||
Advancement.SerializedAdvancement advancement_serializedadvancement = (Advancement.SerializedAdvancement) entry.getValue();
|
||||
|
||||
packetdataserializer.a(minecraftkey);
|
||||
advancement_serializedadvancement.a(packetdataserializer);
|
||||
}
|
||||
|
||||
packetdataserializer.d(this.c.size());
|
||||
iterator = this.c.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
MinecraftKey minecraftkey1 = (MinecraftKey) iterator.next();
|
||||
|
||||
packetdataserializer.a(minecraftkey1);
|
||||
}
|
||||
|
||||
packetdataserializer.d(this.d.size());
|
||||
iterator = this.d.entrySet().iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
entry = (Entry) iterator.next();
|
||||
packetdataserializer.a((MinecraftKey) entry.getKey());
|
||||
((AdvancementProgress) entry.getValue()).a(packetdataserializer);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class PacketPlayOutAnimation implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
private int a;
|
||||
private int b;
|
||||
|
||||
public PacketPlayOutAnimation() {}
|
||||
|
||||
public PacketPlayOutAnimation(Entity entity, int i) {
|
||||
this.a = entity.getId();
|
||||
this.b = i;
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
this.a = packetdataserializer.g();
|
||||
this.b = packetdataserializer.readUnsignedByte();
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
packetdataserializer.d(this.a);
|
||||
packetdataserializer.writeByte(this.b);
|
||||
}
|
||||
|
||||
public void a(PacketListenerPlayOut packetlistenerplayout) {
|
||||
packetlistenerplayout.a(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import java.io.IOException;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class PacketPlayOutAttachEntity implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
private int a;
|
||||
private int b;
|
||||
|
||||
public PacketPlayOutAttachEntity() {}
|
||||
|
||||
public PacketPlayOutAttachEntity(Entity entity, @Nullable Entity entity1) {
|
||||
this.a = entity.getId();
|
||||
this.b = entity1 != null ? entity1.getId() : -1;
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
this.a = packetdataserializer.readInt();
|
||||
this.b = packetdataserializer.readInt();
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
packetdataserializer.writeInt(this.a);
|
||||
packetdataserializer.writeInt(this.b);
|
||||
}
|
||||
|
||||
public void a(PacketListenerPlayOut packetlistenerplayout) {
|
||||
packetlistenerplayout.a(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class PacketPlayOutAutoRecipe implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
private int a;
|
||||
private MinecraftKey b;
|
||||
|
||||
public PacketPlayOutAutoRecipe() {}
|
||||
|
||||
public PacketPlayOutAutoRecipe(int i, IRecipe irecipe) {
|
||||
this.a = i;
|
||||
this.b = irecipe.getKey();
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
this.a = packetdataserializer.readByte();
|
||||
this.b = packetdataserializer.l();
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
packetdataserializer.writeByte(this.a);
|
||||
packetdataserializer.a(this.b);
|
||||
}
|
||||
|
||||
public void a(PacketListenerPlayOut packetlistenerplayout) {
|
||||
packetlistenerplayout.a(this);
|
||||
}
|
||||
}
|
||||
30
src/main/java/net/minecraft/server/PacketPlayOutBed.java
Normal file
30
src/main/java/net/minecraft/server/PacketPlayOutBed.java
Normal file
@@ -0,0 +1,30 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class PacketPlayOutBed implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
private int a;
|
||||
private BlockPosition b;
|
||||
|
||||
public PacketPlayOutBed() {}
|
||||
|
||||
public PacketPlayOutBed(EntityHuman entityhuman, BlockPosition blockposition) {
|
||||
this.a = entityhuman.getId();
|
||||
this.b = blockposition;
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
this.a = packetdataserializer.g();
|
||||
this.b = packetdataserializer.e();
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
packetdataserializer.d(this.a);
|
||||
packetdataserializer.a(this.b);
|
||||
}
|
||||
|
||||
public void a(PacketListenerPlayOut packetlistenerplayout) {
|
||||
packetlistenerplayout.a(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class PacketPlayOutBlockAction implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
private BlockPosition a;
|
||||
private int b;
|
||||
private int c;
|
||||
private Block d;
|
||||
|
||||
public PacketPlayOutBlockAction() {}
|
||||
|
||||
public PacketPlayOutBlockAction(BlockPosition blockposition, Block block, int i, int j) {
|
||||
this.a = blockposition;
|
||||
this.d = block;
|
||||
this.b = i;
|
||||
this.c = j;
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
this.a = packetdataserializer.e();
|
||||
this.b = packetdataserializer.readUnsignedByte();
|
||||
this.c = packetdataserializer.readUnsignedByte();
|
||||
this.d = (Block) IRegistry.BLOCK.fromId(packetdataserializer.g());
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
packetdataserializer.a(this.a);
|
||||
packetdataserializer.writeByte(this.b);
|
||||
packetdataserializer.writeByte(this.c);
|
||||
packetdataserializer.d(IRegistry.BLOCK.a(this.d)); // Akarin - fixes decompile error
|
||||
}
|
||||
|
||||
public void a(PacketListenerPlayOut packetlistenerplayout) {
|
||||
packetlistenerplayout.a(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class PacketPlayOutBlockBreakAnimation implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
private int a;
|
||||
private BlockPosition b;
|
||||
private int c;
|
||||
|
||||
public PacketPlayOutBlockBreakAnimation() {}
|
||||
|
||||
public PacketPlayOutBlockBreakAnimation(int i, BlockPosition blockposition, int j) {
|
||||
this.a = i;
|
||||
this.b = blockposition;
|
||||
this.c = j;
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
this.a = packetdataserializer.g();
|
||||
this.b = packetdataserializer.e();
|
||||
this.c = packetdataserializer.readUnsignedByte();
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
packetdataserializer.d(this.a);
|
||||
packetdataserializer.a(this.b);
|
||||
packetdataserializer.writeByte(this.c);
|
||||
}
|
||||
|
||||
public void a(PacketListenerPlayOut packetlistenerplayout) {
|
||||
packetlistenerplayout.a(this);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package net.minecraft.server;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class PacketPlayOutBlockChange implements Packet<PacketListenerPlayOut> {
|
||||
|
||||
private BlockPosition a;
|
||||
public IBlockData block;
|
||||
|
||||
public PacketPlayOutBlockChange() {}
|
||||
|
||||
public PacketPlayOutBlockChange(IBlockAccess iblockaccess, BlockPosition blockposition) {
|
||||
this.a = blockposition;
|
||||
this.block = iblockaccess.getType(blockposition);
|
||||
}
|
||||
|
||||
public void a(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
this.a = packetdataserializer.e();
|
||||
this.block = (IBlockData) Block.REGISTRY_ID.fromId(packetdataserializer.g());
|
||||
}
|
||||
|
||||
public void b(PacketDataSerializer packetdataserializer) throws IOException {
|
||||
packetdataserializer.a(this.a);
|
||||
packetdataserializer.d(Block.getCombinedId(this.block));
|
||||
}
|
||||
|
||||
public void a(PacketListenerPlayOut packetlistenerplayout) {
|
||||
packetlistenerplayout.a(this);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user