mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
Fix craftbook
This commit is contained in:
@ -40,8 +40,8 @@ public interface IDelegateChunk<U extends IQueueChunk> extends IQueueChunk {
|
||||
}
|
||||
|
||||
@Override
|
||||
default CompoundTag getTag(int x, int y, int z) {
|
||||
return getParent().getTag(x, y, z);
|
||||
default CompoundTag getTile(int x, int y, int z) {
|
||||
return getParent().getTile(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -54,11 +54,6 @@ public interface IDelegateChunk<U extends IQueueChunk> extends IQueueChunk {
|
||||
// getParent().flood(flood, mask, block);
|
||||
// }
|
||||
|
||||
@Override
|
||||
default CompoundTag getTile(int x, int y, int z) {
|
||||
return getParent().getTile(x, y, z);
|
||||
}
|
||||
|
||||
@Override
|
||||
default boolean setTile(int x, int y, int z, CompoundTag 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, );
|
||||
// }
|
||||
|
||||
@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
|
||||
public Map<BlockVector3, CompoundTag> getTiles() {
|
||||
return delegate.get(this).getTiles();
|
||||
|
@ -112,11 +112,6 @@ public enum NullChunk implements IQueueChunk {
|
||||
return BlockTypes.__RESERVED__.getDefaultState().toBaseBlock();
|
||||
}
|
||||
|
||||
@Override
|
||||
public CompoundTag getTag(int x, int y, int z) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<BlockVector3, CompoundTag> getTiles() {
|
||||
return Collections.emptyMap();
|
||||
|
@ -346,23 +346,23 @@ public class DefaultBlockParser extends InputParser<BaseBlock> {
|
||||
|
||||
if (stateString != null) {
|
||||
state = BlockState.get(state.getBlockType(), "[" + stateString + "]", state);
|
||||
if (context.isPreferringWildcard()) {
|
||||
if (stateString.isEmpty()) {
|
||||
state = new FuzzyBlockState(state);
|
||||
} else {
|
||||
BlockType type = state.getBlockType();
|
||||
FuzzyBlockState.Builder fuzzyBuilder = FuzzyBlockState.builder();
|
||||
fuzzyBuilder.type(type);
|
||||
String[] entries = stateString.split(",");
|
||||
for (String entry : entries) {
|
||||
String[] split = entry.split("=");
|
||||
String key = split[0];
|
||||
String val = split[1];
|
||||
Property<Object> prop = type.getProperty(key);
|
||||
fuzzyBuilder.withProperty(prop, prop.getValueFor(val));
|
||||
}
|
||||
state = fuzzyBuilder.build();
|
||||
}
|
||||
if (context.isPreferringWildcard()) {
|
||||
if (stateString == null || stateString.isEmpty()) {
|
||||
state = new FuzzyBlockState(state);
|
||||
} else {
|
||||
BlockType type = state.getBlockType();
|
||||
FuzzyBlockState.Builder fuzzyBuilder = FuzzyBlockState.builder();
|
||||
fuzzyBuilder.type(type);
|
||||
String[] entries = stateString.split(",");
|
||||
for (String entry : entries) {
|
||||
String[] split = entry.split("=");
|
||||
String key = split[0];
|
||||
String val = split[1];
|
||||
Property<Object> prop = type.getProperty(key);
|
||||
fuzzyBuilder.withProperty(prop, prop.getValueFor(val));
|
||||
}
|
||||
state = fuzzyBuilder.build();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,7 +7,7 @@ public enum CompoundInput {
|
||||
CONTAINER() {
|
||||
@Override
|
||||
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
|
||||
public BaseBlock toBaseBlock() {
|
||||
return new BaseBlock();
|
||||
return new BaseBlock(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Reference in New Issue
Block a user