Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-17 00:20:09 +01:00
History: Read change positions at once (#2542)
Dieser Commit ist enthalten in:
Ursprung
de49924c85
Commit
5c975eda3c
@ -24,9 +24,9 @@ import com.sk89q.worldedit.world.World;
|
|||||||
import com.sk89q.worldedit.world.biome.BiomeType;
|
import com.sk89q.worldedit.world.biome.BiomeType;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
import org.jetbrains.annotations.ApiStatus;
|
import org.jetbrains.annotations.ApiStatus;
|
||||||
import org.jetbrains.annotations.NotNull;
|
|
||||||
import org.jetbrains.annotations.Nullable;
|
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
|
import javax.annotation.Nullable;
|
||||||
import java.io.EOFException;
|
import java.io.EOFException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
@ -758,7 +758,7 @@ public abstract class FaweStreamChangeSet extends AbstractChangeSet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @Nullable C populate(final @NotNull C change) {
|
public @Nullable C populate(final @Nonnull C change) {
|
||||||
try {
|
try {
|
||||||
write(change, (CompoundTag) inputStream.readTag());
|
write(change, (CompoundTag) inputStream.readTag());
|
||||||
return change;
|
return change;
|
||||||
@ -786,7 +786,7 @@ public abstract class FaweStreamChangeSet extends AbstractChangeSet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull MutableTileChange create() {
|
public @Nonnull MutableTileChange create() {
|
||||||
return new MutableTileChange(null, create);
|
return new MutableTileChange(null, create);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -814,7 +814,7 @@ public abstract class FaweStreamChangeSet extends AbstractChangeSet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull MutableEntityChange create() {
|
public @Nonnull MutableEntityChange create() {
|
||||||
return new MutableEntityChange(null, create);
|
return new MutableEntityChange(null, create);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -841,12 +841,12 @@ public abstract class FaweStreamChangeSet extends AbstractChangeSet {
|
|||||||
class Populator implements ChangePopulator<MutableFullBlockChange> {
|
class Populator implements ChangePopulator<MutableFullBlockChange> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull MutableFullBlockChange create() {
|
public @Nonnull MutableFullBlockChange create() {
|
||||||
return new MutableFullBlockChange(blockBag, mode, dir);
|
return new MutableFullBlockChange(blockBag, mode, dir);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @Nullable MutableFullBlockChange populate(@NotNull final MutableFullBlockChange change) {
|
public @Nullable MutableFullBlockChange populate(@Nonnull final MutableFullBlockChange change) {
|
||||||
try {
|
try {
|
||||||
idDel.readCombined(is, change);
|
idDel.readCombined(is, change);
|
||||||
change.x += originX;
|
change.x += originX;
|
||||||
@ -882,12 +882,12 @@ public abstract class FaweStreamChangeSet extends AbstractChangeSet {
|
|||||||
class Populator implements ChangePopulator<MutableBlockChange> {
|
class Populator implements ChangePopulator<MutableBlockChange> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull MutableBlockChange create() {
|
public @Nonnull MutableBlockChange create() {
|
||||||
return new MutableBlockChange(0, 0, 0, BlockTypes.AIR.getInternalId());
|
return new MutableBlockChange(0, 0, 0, BlockTypes.AIR.getInternalId());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @Nullable MutableBlockChange populate(@NotNull final MutableBlockChange change) {
|
public @Nullable MutableBlockChange populate(@Nonnull final MutableBlockChange change) {
|
||||||
try {
|
try {
|
||||||
idDel.readCombined(is, change, dir);
|
idDel.readCombined(is, change, dir);
|
||||||
change.x += originX;
|
change.x += originX;
|
||||||
@ -922,12 +922,12 @@ public abstract class FaweStreamChangeSet extends AbstractChangeSet {
|
|||||||
class Populator implements ChangePopulator<MutableBiomeChange> {
|
class Populator implements ChangePopulator<MutableBiomeChange> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @NotNull MutableBiomeChange create() {
|
public @Nonnull MutableBiomeChange create() {
|
||||||
return new MutableBiomeChange();
|
return new MutableBiomeChange();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public @Nullable MutableBiomeChange populate(@NotNull final MutableBiomeChange change) {
|
public @Nullable MutableBiomeChange populate(@Nonnull final MutableBiomeChange change) {
|
||||||
try {
|
try {
|
||||||
int int1 = is.read();
|
int int1 = is.read();
|
||||||
if (int1 != -1) {
|
if (int1 != -1) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren