Signed-off-by: Lixfel <agga-games@gmx.de>
Dieser Commit ist enthalten in:
Ursprung
6941cc98f0
Commit
4531816792
@ -32,6 +32,9 @@ public class BlockIdWrapper8 implements BlockIdWrapper {
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setBlock(World world, int x, int y, int z, int blockState) {
|
||||
if((blockState >> 4) > 256) // Illegal blockstate / corrupted replay
|
||||
blockState = 0;
|
||||
|
||||
world.getBlockAt(x, y, z).setTypeIdAndData(blockState >> 4, (byte)(blockState & 0b1111), false);
|
||||
}
|
||||
|
||||
|
@ -45,6 +45,7 @@ import org.bukkit.entity.EntityType;
|
||||
import org.bukkit.scheduler.BukkitTask;
|
||||
|
||||
import java.io.EOFException;
|
||||
import java.io.FilterInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
@ -217,7 +218,11 @@ public class PacketProcessor {
|
||||
float yaw = source.readFloat() + (rotateZ ? 180 : 0);
|
||||
byte headYaw = (byte)((source.readByte() + (rotateZ ? 128 : 0)) % 256);
|
||||
|
||||
execSync(() -> REntity.getEntity(entityId).move(locX, locY, locZ, pitch, yaw, headYaw));
|
||||
execSync(() -> {
|
||||
REntity entity = REntity.getEntity(entityId);
|
||||
if(entity != null)
|
||||
entity.move(locX, locY, locZ, pitch, yaw, headYaw);
|
||||
});
|
||||
}
|
||||
|
||||
private void entityDespawns() throws IOException {
|
||||
@ -410,7 +415,12 @@ public class PacketProcessor {
|
||||
|
||||
private void pasteEmbeddedSchem(FightTeam team) throws IOException {
|
||||
int schemId = source.readInt();
|
||||
Clipboard clipboard = SchematicNode.clipboardFromStream(source, Core.getVersion() > 12);
|
||||
Clipboard clipboard = SchematicNode.clipboardFromStream(new FilterInputStream(source) {
|
||||
@Override
|
||||
public void close() {
|
||||
// FAWE 1.12 calls close...
|
||||
}
|
||||
}, Core.getVersion() > 12);
|
||||
|
||||
execSync(() -> team.pasteSchem(schemId, clipboard));
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren