/*
* This file is part of SpoutcraftPlugin.
*
* Copyright (c) 2011 SpoutcraftDev <http://spoutcraft.org//>
* SpoutcraftPlugin is licensed under the GNU Lesser General Public License.
*
* SpoutcraftPlugin is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* SpoutcraftPlugin is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.getspout.spoutapi.packet;
import java.io.IOException;
import org.getspout.spoutapi.io.SpoutInputStream;
import org.getspout.spoutapi.io.SpoutOutputStream;
public class PacketAllowVisualCheats implements SpoutPacket {
private boolean cheatsky = false;
private boolean forcesky = false;
private boolean showsky = false;
private boolean cheatclearwater = false;
private boolean forceclearwater = false;
private boolean showclearwater = false;
private boolean cheatstars = false;
private boolean forcestars = false;
private boolean showstars = false;
private boolean cheatweather = false;
private boolean forceweather = false;
private boolean showweather = false;
private boolean time = false;
private boolean coords = false;
private boolean entitylabel = false;
private boolean cheatvoidfog = false;
private boolean forcevoidfog = false;
private boolean showvoidfog = false;
private boolean flightspeed = false;
public PacketAllowVisualCheats() {
}
public PacketAllowVisualCheats(boolean tsky, boolean fsky, boolean ssky, boolean tclearwater, boolean fclearwater, boolean sclearwater, boolean tstars, boolean fstars, boolean sstars, boolean tweather, boolean fweather, boolean sweather, boolean ttime, boolean tcoords, boolean tentitylabel, boolean tvoidfog, boolean fvoidfog, boolean svoidfog, boolean tflightspeed) {
this.cheatsky = tsky;
this.forcesky = fsky;
this.showsky = ssky;
this.cheatclearwater = tclearwater;
this.forceclearwater = fclearwater;
this.showclearwater = sclearwater;
this.cheatstars = tstars;
this.forcestars = fstars;
this.showstars = sstars;
this.cheatweather = tweather;
this.forceweather = fweather;
this.showweather = sweather;
this.time = ttime;
this.coords = tcoords;
this.entitylabel = tentitylabel;
this.cheatvoidfog = tvoidfog;
this.forcevoidfog = fvoidfog;
this.showvoidfog = svoidfog;
this.flightspeed = tflightspeed;
}
@Override
public void readData(SpoutInputStream input) throws IOException {
cheatsky = input.readBoolean();
forcesky = input.readBoolean();
showsky = input.readBoolean();
cheatclearwater = input.readBoolean();
forceclearwater = input.readBoolean();
showclearwater = input.readBoolean();
cheatstars = input.readBoolean();
forcestars = input.readBoolean();
showstars = input.readBoolean();
cheatweather = input.readBoolean();
forceweather = input.readBoolean();
showweather = input.readBoolean();
time = input.readBoolean();
coords = input.readBoolean();
entitylabel = input.readBoolean();
cheatvoidfog = input.readBoolean();
forcevoidfog = input.readBoolean();
showvoidfog = input.readBoolean();
flightspeed = input.readBoolean();
}
@Override
public void writeData(SpoutOutputStream output) throws IOException {
output.writeBoolean(cheatsky);
output.writeBoolean(forcesky);
output.writeBoolean(showsky);
output.writeBoolean(cheatclearwater);
output.writeBoolean(forceclearwater);
output.writeBoolean(showclearwater);
output.writeBoolean(cheatstars);
output.writeBoolean(forcestars);
output.writeBoolean(showstars);
output.writeBoolean(cheatweather);
output.writeBoolean(forceweather);
output.writeBoolean(showweather);
output.writeBoolean(time);
output.writeBoolean(coords);
output.writeBoolean(entitylabel);
output.writeBoolean(cheatvoidfog);
output.writeBoolean(forcevoidfog);
output.writeBoolean(showvoidfog);
output.writeBoolean(flightspeed);
}
@Override
public void run(int playerId) {
}
@Override
public void failure(int id) {
}
@Override
public PacketType getPacketType() {
return PacketType.PacketAllowVisualCheats;
}
@Override
public int getVersion() {
return 4;
}
}