mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-06-11 20:13:55 +00:00
This does something idk.
This commit is contained in:
@ -345,9 +345,9 @@ public class CuboidRegion extends AbstractRegion implements FlatRegion {
|
||||
BlockVector3 answer = BlockVector3.at(nextX, nextY, nextZ);
|
||||
if (++nextX > max.getBlockX()) {
|
||||
nextX = min.getBlockX();
|
||||
if (++nextY > max.getBlockY()) {
|
||||
nextY = min.getBlockY();
|
||||
if (++nextZ > max.getBlockZ()) {
|
||||
if (++nextZ > max.getBlockZ()) {
|
||||
nextZ = min.getBlockZ();
|
||||
if (++nextY > max.getBlockY()) {
|
||||
nextX = Integer.MIN_VALUE;
|
||||
}
|
||||
}
|
||||
|
@ -46,7 +46,7 @@ import java.util.Set;
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public class BlockState implements BlockStateHolder<BlockState> {
|
||||
|
||||
|
||||
static {
|
||||
BlockStateIdAccess.setBlockStateStateId(x -> x.internalId);
|
||||
}
|
||||
@ -86,13 +86,14 @@ public class BlockState implements BlockStateHolder<BlockState> {
|
||||
List<List<Object>> valueLists = Lists.cartesianProduct(separatedValues);
|
||||
for (List<Object> valueList : valueLists) {
|
||||
Map<Property<?>, Object> valueMap = Maps.newTreeMap(Comparator.comparing(Property::getName));
|
||||
BlockState stateMaker = new BlockState(blockType).initializeId(registry);
|
||||
BlockState stateMaker = new BlockState(blockType);
|
||||
for (int i = 0; i < valueList.size(); i++) {
|
||||
Property<?> property = properties.get(i);
|
||||
Object value = valueList.get(i);
|
||||
valueMap.put(property, value);
|
||||
stateMaker.setState(property, value);
|
||||
}
|
||||
stateMaker.initializeId(registry);
|
||||
stateMap.put(valueMap, stateMaker);
|
||||
}
|
||||
}
|
||||
|
@ -67,4 +67,11 @@ public interface BlockRegistry {
|
||||
*/
|
||||
OptionalInt getInternalBlockStateId(BlockState state);
|
||||
|
||||
/**
|
||||
* Retrieve a block state by its internal ID, if possible.
|
||||
*
|
||||
* @param id The internal ID
|
||||
* @return the block state, if available
|
||||
*/
|
||||
BlockState getBlockStateByInternalId(int id);
|
||||
}
|
||||
|
@ -59,4 +59,9 @@ public class BundledBlockRegistry implements BlockRegistry {
|
||||
return OptionalInt.empty();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getBlockStateByInternalId(int id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user