From 2f90b6b592263c3cde832adc759128d6afb8ddd7 Mon Sep 17 00:00:00 2001 From: Buuz135 Date: Sat, 11 Sep 2021 12:50:43 +0200 Subject: [PATCH] Added localization for the cover items and filtered out transparent blocks from being a cover --- .../network/node/cover/CoverManager.java | 22 +------------------ .../assets/refinedstorage/lang/en_us.json | 2 ++ 2 files changed, 3 insertions(+), 21 deletions(-) diff --git a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/cover/CoverManager.java b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/cover/CoverManager.java index f78320724..0e81cc9d9 100644 --- a/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/cover/CoverManager.java +++ b/src/main/java/com/refinedmods/refinedstorage/apiimpl/network/node/cover/CoverManager.java @@ -37,26 +37,6 @@ public class CoverManager { 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 public Cover getCover(Direction facing) { return covers.get(facing); @@ -154,7 +134,7 @@ public class CoverManager { 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) { diff --git a/src/main/resources/assets/refinedstorage/lang/en_us.json b/src/main/resources/assets/refinedstorage/lang/en_us.json index ac71499b3..0a6a8244a 100644 --- a/src/main/resources/assets/refinedstorage/lang/en_us.json +++ b/src/main/resources/assets/refinedstorage/lang/en_us.json @@ -301,6 +301,8 @@ "item.refinedstorage.security_card": "Security Card", "item.refinedstorage.security_card.owner": "Bound to: %s", "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.success": "Successfully gave disk %s to %s.", "commands.refinedstorage.network.list.pos": "Network at X: %d, Y: %d, Z: %d",