private void updateOtherDoubleChestBlocks() {
if (cachedInv.getHolder() instanceof DoubleChest) {
Material chestMaterial = block.getType();
Location otherChestLoc = null;
for (WrappedDirection pd : WrappedDirection.values()) {
if (pd.isSide()) {
if (block.getRelative(pd.getX(), pd.getY(), pd.getZ()).getType() == chestMaterial) {
otherChestLoc = block.getRelative(pd.getX(), pd.getY(), pd.getZ()).getLocation();
}
}
}
Map<BlockLoc, TransportPipesContainer> containerMap = TransportPipes.instance
.getContainerMap(block.getWorld());
if (containerMap != null) {
BlockLoc bl = BlockLoc.convertBlockLoc(otherChestLoc);
if (containerMap.containsKey(bl)) {
TransportPipesContainer tpc = containerMap.get(bl);
if (tpc instanceof SimpleInventoryContainer) {
SimpleInventoryContainer sic = (SimpleInventoryContainer) tpc;
if (!(sic.cachedInv instanceof DoubleChestInventory)) {
sic.updateBlock();
}
}
}
}
}
}
SimpleInventoryContainer.java 文件源码
java
阅读 20
收藏 0
点赞 0
评论 0
项目:Transport-Pipes
作者:
评论列表
文章目录