Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-05 19:10:07 +01:00
Merge branch 'main' of https://github.com/IntellectualSites/FastAsyncWorldEdit
Dieser Commit ist enthalten in:
Commit
d691cf40f3
@ -112,7 +112,7 @@ public class BlockBagChangeSet extends AbstractDelegateChangeSet {
|
||||
@Override
|
||||
public void addTileCreate(CompoundTag nbt) {
|
||||
if (nbt.containsKey("items")) {
|
||||
Map<String, Tag> map = nbt.getValue();
|
||||
Map<String, Tag> map = new HashMap<>(nbt.getValue());
|
||||
map.remove("items");
|
||||
}
|
||||
super.addTileCreate(nbt);
|
||||
|
@ -13,6 +13,7 @@ import com.sk89q.worldedit.world.NbtValued;
|
||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import javax.annotation.Nullable;
|
||||
@ -55,10 +56,11 @@ public class StripNBTExtent extends AbstractDelegateExtent {
|
||||
return block;
|
||||
}
|
||||
CompoundTag nbt = localBlock.getNbtData();
|
||||
Map<String, Tag> value = nbt.getValue();
|
||||
Map<String, Tag> value = new HashMap<>(nbt.getValue());
|
||||
for (String key : strip) {
|
||||
value.remove(key);
|
||||
}
|
||||
localBlock.toBaseBlock(new CompoundTag(value));
|
||||
return (B) localBlock;
|
||||
}
|
||||
|
||||
@ -67,10 +69,11 @@ public class StripNBTExtent extends AbstractDelegateExtent {
|
||||
return entity;
|
||||
}
|
||||
CompoundTag nbt = entity.getNbtData();
|
||||
Map<String, Tag> value = nbt.getValue();
|
||||
Map<String, Tag> value = new HashMap<>(nbt.getValue());
|
||||
for (String key : strip) {
|
||||
value.remove(key);
|
||||
}
|
||||
entity.setNbtData(new CompoundTag(value));
|
||||
return entity;
|
||||
}
|
||||
}
|
||||
|
@ -46,6 +46,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
@ -336,8 +337,9 @@ public class BlockTransformExtent extends ResettableExtent {
|
||||
Direction newDirection = Direction.findClosest(applyAbsolute, Direction.Flag.CARDINAL | Direction.Flag.ORDINAL | Direction.Flag.SECONDARY_ORDINAL);
|
||||
|
||||
if (newDirection != null) {
|
||||
Map<String, Tag> values = tag.getValue();
|
||||
Map<String, Tag> values = new HashMap<>(tag.getValue());
|
||||
values.put("Rot", new ByteTag((byte) MCDirections.toRotation(newDirection)));
|
||||
tag = new CompoundTag(values);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren