Added localization for the cover items and filtered out transparent blocks from being a cover
This commit is contained in:
@@ -37,26 +37,6 @@ public class CoverManager {
|
|||||||
this.node = node;
|
this.node = node;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean canConduct(Direction direction) {
|
|
||||||
Cover cover = getCover(direction);
|
|
||||||
if (cover != null && cover.getType() != CoverType.HOLLOW) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (node.getWorld() instanceof ServerWorld){
|
|
||||||
INetworkNode neighbor = API.instance().getNetworkNodeManager((ServerWorld) node.getWorld()).getNode(node.getPos().offset(direction));
|
|
||||||
if (neighbor instanceof ICoverable) {
|
|
||||||
cover = ((ICoverable) neighbor).getCoverManager().getCover(direction.getOpposite());
|
|
||||||
|
|
||||||
if (cover != null && cover.getType() != CoverType.HOLLOW) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
public Cover getCover(Direction facing) {
|
public Cover getCover(Direction facing) {
|
||||||
return covers.get(facing);
|
return covers.get(facing);
|
||||||
@@ -154,7 +134,7 @@ public class CoverManager {
|
|||||||
|
|
||||||
BlockState state = getBlockState(item);
|
BlockState state = getBlockState(item);
|
||||||
|
|
||||||
return block != null && state != null && ((isModelSupported(state) && !block.ticksRandomly(state) && !block.hasTileEntity(state)) || block instanceof GlassBlock || block instanceof StainedGlassBlock); //Removed is top solid as it needs world param
|
return block != null && state != null && ((isModelSupported(state) && !block.ticksRandomly(state) && !block.hasTileEntity(state) && !state.isTransparent())); //Removed is top solid as it needs world param
|
||||||
}
|
}
|
||||||
|
|
||||||
private static boolean isModelSupported(BlockState state) {
|
private static boolean isModelSupported(BlockState state) {
|
||||||
|
@@ -301,6 +301,8 @@
|
|||||||
"item.refinedstorage.security_card": "Security Card",
|
"item.refinedstorage.security_card": "Security Card",
|
||||||
"item.refinedstorage.security_card.owner": "Bound to: %s",
|
"item.refinedstorage.security_card.owner": "Bound to: %s",
|
||||||
"item.refinedstorage.processor_binding": "Processor Binding",
|
"item.refinedstorage.processor_binding": "Processor Binding",
|
||||||
|
"item.refinedstorage.cover": "Cover",
|
||||||
|
"item.refinedstorage.hollow_cover": "Hollow Cover",
|
||||||
"commands.refinedstorage.disk.create.error.disk_not_found": "Disk %s was not found.",
|
"commands.refinedstorage.disk.create.error.disk_not_found": "Disk %s was not found.",
|
||||||
"commands.refinedstorage.disk.create.success": "Successfully gave disk %s to %s.",
|
"commands.refinedstorage.disk.create.success": "Successfully gave disk %s to %s.",
|
||||||
"commands.refinedstorage.network.list.pos": "Network at X: %d, Y: %d, Z: %d",
|
"commands.refinedstorage.network.list.pos": "Network at X: %d, Y: %d, Z: %d",
|
||||||
|
Reference in New Issue
Block a user