mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-13 15:08:35 +00:00
Revert migration of FaweCache to Kotlin
This commit is contained in:
@ -457,7 +457,7 @@ public interface Extent extends InputExtent, OutputExtent {
|
||||
default boolean cancel() {
|
||||
ExtentTraverser<Extent> traverser = new ExtentTraverser<>(this);
|
||||
|
||||
NullExtent nullExtent = new NullExtent(this, FaweCache.INSTANCE.getMANUAL());
|
||||
NullExtent nullExtent = new NullExtent(this, FaweCache.MANUAL);
|
||||
|
||||
ExtentTraverser<Extent> next = traverser.next();
|
||||
if (next != null) {
|
||||
|
@ -51,7 +51,7 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
public class MaskingExtent extends AbstractDelegateExtent implements IBatchProcessor, Filter {
|
||||
|
||||
private Mask mask;
|
||||
private LoadingCache<Long, ChunkFilterBlock> threadIdToFilter = FaweCache.INSTANCE.createCache(() -> new CharFilterBlock(getExtent()));
|
||||
private LoadingCache<Long, ChunkFilterBlock> threadIdToFilter = FaweCache.IMP.createCache(() -> new CharFilterBlock(getExtent()));
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
|
@ -268,7 +268,7 @@ public class FastSchematicReader extends NBTSchematicReader {
|
||||
// tiles
|
||||
if (tiles != null && !tiles.isEmpty()) {
|
||||
for (Map<String, Object> tileRaw : tiles) {
|
||||
CompoundTag tile = FaweCache.INSTANCE.asTag(tileRaw);
|
||||
CompoundTag tile = FaweCache.IMP.asTag(tileRaw);
|
||||
|
||||
int[] pos = tile.getIntArray("Pos");
|
||||
int x,y,z;
|
||||
@ -303,7 +303,7 @@ public class FastSchematicReader extends NBTSchematicReader {
|
||||
// entities
|
||||
if (entities != null && !entities.isEmpty()) {
|
||||
for (Map<String, Object> entRaw : entities) {
|
||||
CompoundTag ent = FaweCache.INSTANCE.asTag(entRaw);
|
||||
CompoundTag ent = FaweCache.IMP.asTag(entRaw);
|
||||
|
||||
Map<String, Tag> value = ent.getValue();
|
||||
StringTag id = (StringTag) value.get("Id");
|
||||
|
@ -322,7 +322,7 @@ public class SchematicReader implements ClipboardReader {
|
||||
if (tiles != null && !tiles.isEmpty()) {
|
||||
outer:
|
||||
for (Map<String, Object> tileRaw : tiles) {
|
||||
CompoundTag tile = FaweCache.INSTANCE.asTag(tileRaw);
|
||||
CompoundTag tile = FaweCache.IMP.asTag(tileRaw);
|
||||
int x = (int) tileRaw.get("x");
|
||||
int y = (int) tileRaw.get("y");
|
||||
int z = (int) tileRaw.get("z");
|
||||
@ -350,7 +350,7 @@ public class SchematicReader implements ClipboardReader {
|
||||
entRaw.put("Id", id);
|
||||
EntityType type = EntityTypes.parse(id);
|
||||
if (type != null) {
|
||||
CompoundTag ent = FaweCache.INSTANCE.asTag(entRaw);
|
||||
CompoundTag ent = FaweCache.IMP.asTag(entRaw);
|
||||
for (EntityNBTCompatibilityHandler compat : ENTITY_COMPATIBILITY_HANDLERS) {
|
||||
if (compat.isAffectedEntity(type, ent)) {
|
||||
ent = compat.updateNBT(type, ent);
|
||||
|
@ -107,10 +107,10 @@ public class BlockBagExtent extends AbstractDelegateExtent {
|
||||
try {
|
||||
blockBag.fetchPlacedBlock(block.toImmutableState());
|
||||
} catch (UnplaceableBlockException e) {
|
||||
throw FaweCache.INSTANCE.getBLOCK_BAG();
|
||||
throw FaweCache.BLOCK_BAG;
|
||||
} catch (BlockBagException e) {
|
||||
missingBlocks[block.getBlockType().getInternalId()]++;
|
||||
throw FaweCache.INSTANCE.getBLOCK_BAG();
|
||||
throw FaweCache.BLOCK_BAG;
|
||||
}
|
||||
}
|
||||
if (mine) {
|
||||
|
Reference in New Issue
Block a user