mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Fix craftbook
This commit is contained in:
parent
f37bc9417c
commit
c2cc4f5aeb
@ -12,7 +12,6 @@ import com.boydti.fawe.bukkit.listener.CFIPacketListener;
|
|||||||
import com.boydti.fawe.bukkit.listener.ChunkListener_8;
|
import com.boydti.fawe.bukkit.listener.ChunkListener_8;
|
||||||
import com.boydti.fawe.bukkit.listener.ChunkListener_9;
|
import com.boydti.fawe.bukkit.listener.ChunkListener_9;
|
||||||
import com.boydti.fawe.bukkit.listener.RenderListener;
|
import com.boydti.fawe.bukkit.listener.RenderListener;
|
||||||
import com.boydti.fawe.bukkit.regions.ASkyBlockHook;
|
|
||||||
import com.boydti.fawe.bukkit.regions.FactionsUUIDFeature;
|
import com.boydti.fawe.bukkit.regions.FactionsUUIDFeature;
|
||||||
import com.boydti.fawe.bukkit.regions.FreeBuildRegion;
|
import com.boydti.fawe.bukkit.regions.FreeBuildRegion;
|
||||||
import com.boydti.fawe.bukkit.regions.GriefPreventionFeature;
|
import com.boydti.fawe.bukkit.regions.GriefPreventionFeature;
|
||||||
|
@ -80,7 +80,7 @@ public class BukkitGetBlocks_1_15 extends CharGetBlocks {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public CompoundTag getTag(int x, int y, int z) {
|
public CompoundTag getTile(int x, int y, int z) {
|
||||||
TileEntity tileEntity = getChunk().getTileEntity(new BlockPosition((x & 15) + (X << 4), y, (z & 15) + (Z << 4)));
|
TileEntity tileEntity = getChunk().getTileEntity(new BlockPosition((x & 15) + (X << 4), y, (z & 15) + (Z << 4)));
|
||||||
return new LazyCompoundTag_1_15(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
return new LazyCompoundTag_1_15(Suppliers.memoize(() -> tileEntity.save(new NBTTagCompound())));
|
||||||
}
|
}
|
||||||
|
@ -40,8 +40,8 @@ public interface IDelegateChunk<U extends IQueueChunk> extends IQueueChunk {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default CompoundTag getTag(int x, int y, int z) {
|
default CompoundTag getTile(int x, int y, int z) {
|
||||||
return getParent().getTag(x, y, z);
|
return getParent().getTile(x, y, z);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -54,11 +54,6 @@ public interface IDelegateChunk<U extends IQueueChunk> extends IQueueChunk {
|
|||||||
// getParent().flood(flood, mask, block);
|
// getParent().flood(flood, mask, block);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@Override
|
|
||||||
default CompoundTag getTile(int x, int y, int z) {
|
|
||||||
return getParent().getTile(x, y, z);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
default boolean setTile(int x, int y, int z, CompoundTag tag) {
|
default boolean setTile(int x, int y, int z, CompoundTag tag) {
|
||||||
return getParent().setTile(x, y, z, tag);
|
return getParent().setTile(x, y, z, tag);
|
||||||
|
@ -293,12 +293,6 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk {
|
|||||||
//// block.flood(get, set, mask, block, );
|
//// block.flood(get, set, mask, block, );
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@Override
|
|
||||||
public CompoundTag getTag(int x, int y, int z) {
|
|
||||||
return delegate.getFullBlock(this, x, y, z)
|
|
||||||
.getNbtData(); // TODO NOT IMPLEMENTED (add getTag delegate)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<BlockVector3, CompoundTag> getTiles() {
|
public Map<BlockVector3, CompoundTag> getTiles() {
|
||||||
return delegate.get(this).getTiles();
|
return delegate.get(this).getTiles();
|
||||||
|
@ -112,11 +112,6 @@ public enum NullChunk implements IQueueChunk {
|
|||||||
return BlockTypes.__RESERVED__.getDefaultState().toBaseBlock();
|
return BlockTypes.__RESERVED__.getDefaultState().toBaseBlock();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public CompoundTag getTag(int x, int y, int z) {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<BlockVector3, CompoundTag> getTiles() {
|
public Map<BlockVector3, CompoundTag> getTiles() {
|
||||||
return Collections.emptyMap();
|
return Collections.emptyMap();
|
||||||
|
@ -346,23 +346,23 @@ public class DefaultBlockParser extends InputParser<BaseBlock> {
|
|||||||
|
|
||||||
if (stateString != null) {
|
if (stateString != null) {
|
||||||
state = BlockState.get(state.getBlockType(), "[" + stateString + "]", state);
|
state = BlockState.get(state.getBlockType(), "[" + stateString + "]", state);
|
||||||
if (context.isPreferringWildcard()) {
|
}
|
||||||
if (stateString.isEmpty()) {
|
if (context.isPreferringWildcard()) {
|
||||||
state = new FuzzyBlockState(state);
|
if (stateString == null || stateString.isEmpty()) {
|
||||||
} else {
|
state = new FuzzyBlockState(state);
|
||||||
BlockType type = state.getBlockType();
|
} else {
|
||||||
FuzzyBlockState.Builder fuzzyBuilder = FuzzyBlockState.builder();
|
BlockType type = state.getBlockType();
|
||||||
fuzzyBuilder.type(type);
|
FuzzyBlockState.Builder fuzzyBuilder = FuzzyBlockState.builder();
|
||||||
String[] entries = stateString.split(",");
|
fuzzyBuilder.type(type);
|
||||||
for (String entry : entries) {
|
String[] entries = stateString.split(",");
|
||||||
String[] split = entry.split("=");
|
for (String entry : entries) {
|
||||||
String key = split[0];
|
String[] split = entry.split("=");
|
||||||
String val = split[1];
|
String key = split[0];
|
||||||
Property<Object> prop = type.getProperty(key);
|
String val = split[1];
|
||||||
fuzzyBuilder.withProperty(prop, prop.getValueFor(val));
|
Property<Object> prop = type.getProperty(key);
|
||||||
}
|
fuzzyBuilder.withProperty(prop, prop.getValueFor(val));
|
||||||
state = fuzzyBuilder.build();
|
|
||||||
}
|
}
|
||||||
|
state = fuzzyBuilder.build();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ public enum CompoundInput {
|
|||||||
CONTAINER() {
|
CONTAINER() {
|
||||||
@Override
|
@Override
|
||||||
public BaseBlock get(BlockState state, ITileInput input, int x, int y, int z) {
|
public BaseBlock get(BlockState state, ITileInput input, int x, int y, int z) {
|
||||||
return state.toBaseBlock(input.getTag(x, y, z));
|
return state.toBaseBlock(input.getTile(x, y, z));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -91,7 +91,7 @@ public class FuzzyBlockState extends BlockState {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BaseBlock toBaseBlock() {
|
public BaseBlock toBaseBlock() {
|
||||||
return new BaseBlock();
|
return new BaseBlock(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user