Initial 1.11.2 update

This commit is contained in:
Electroblob
2018-02-07 21:15:50 +00:00
parent 67f6be0671
commit 3df5597dcc
368 changed files with 17234 additions and 15082 deletions
@@ -7,13 +7,14 @@ import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;
/** <b>[Server -> Client]</b> This packet is sent when a player is teleported due to the transportation spell to spawn
* the particles. */
/**
* <b>[Server -> Client]</b> This packet is sent when a player is teleported due to the transportation spell to spawn
* the particles.
*/
public class PacketTransportation implements IMessageHandler<Message, IMessage> {
@Override
public IMessage onMessage(Message message, MessageContext ctx)
{
public IMessage onMessage(Message message, MessageContext ctx){
// Just to make sure that the side is correct
if(ctx.side.isClient()){
// Using a fully qualified name is a good course of action here; we don't really want to clutter the proxy
@@ -29,29 +30,26 @@ public class PacketTransportation implements IMessageHandler<Message, IMessage>
return null;
}
public static class Message implements IMessage
{
public static class Message implements IMessage {
/** EntityID of the caster */
public int casterID;
// This constructor is required otherwise you'll get errors (used somewhere in fml through reflection)
public Message() {}
public Message(){
}
public Message(int casterID)
{
public Message(int casterID){
this.casterID = casterID;
}
@Override
public void fromBytes(ByteBuf buf)
{
public void fromBytes(ByteBuf buf){
// The order is important
this.casterID = buf.readInt();
}
@Override
public void toBytes(ByteBuf buf)
{
public void toBytes(ByteBuf buf){
buf.writeInt(casterID);
}
}