From ced6369b254a4061f0e44cda8b3821c182898cc2 Mon Sep 17 00:00:00 2001 From: Leonwang4234 <62972692+Leonwang4234@users.noreply.github.com> Date: Thu, 26 Nov 2020 23:28:05 -0800 Subject: [PATCH 1/3] Update Router.java --- core/src/mindustry/world/blocks/distribution/Router.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/src/mindustry/world/blocks/distribution/Router.java b/core/src/mindustry/world/blocks/distribution/Router.java index 141f188446..bfa6d8fba0 100644 --- a/core/src/mindustry/world/blocks/distribution/Router.java +++ b/core/src/mindustry/world/blocks/distribution/Router.java @@ -23,6 +23,11 @@ public class Router extends Block{ noUpdateDisabled = true; } + public boolean canReplace(Block other){ + if(other.alwaysReplace) return true; + return (other != this || rotate) && this.group != BlockGroup.none && other.group == this.group; + } + public class RouterBuild extends Building implements ControlBlock{ public Item lastItem; public Tile lastInput; From ab8a381ad95aba6a75b4e5c2169b373b78781625 Mon Sep 17 00:00:00 2001 From: Leonwang4234 <62972692+Leonwang4234@users.noreply.github.com> Date: Thu, 26 Nov 2020 23:33:18 -0800 Subject: [PATCH 2/3] Lol how did it compile without the @Override --- core/src/mindustry/world/blocks/distribution/Router.java | 1 + 1 file changed, 1 insertion(+) diff --git a/core/src/mindustry/world/blocks/distribution/Router.java b/core/src/mindustry/world/blocks/distribution/Router.java index bfa6d8fba0..09b70624e2 100644 --- a/core/src/mindustry/world/blocks/distribution/Router.java +++ b/core/src/mindustry/world/blocks/distribution/Router.java @@ -23,6 +23,7 @@ public class Router extends Block{ noUpdateDisabled = true; } + @Override public boolean canReplace(Block other){ if(other.alwaysReplace) return true; return (other != this || rotate) && this.group != BlockGroup.none && other.group == this.group; From 4cda52caf77b6b5296060b48b9fb948582d144f3 Mon Sep 17 00:00:00 2001 From: Leonwang4234 <62972692+Leonwang4234@users.noreply.github.com> Date: Fri, 27 Nov 2020 21:15:33 -0800 Subject: [PATCH 3/3] size >= other.size --- core/src/mindustry/world/blocks/distribution/Router.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/mindustry/world/blocks/distribution/Router.java b/core/src/mindustry/world/blocks/distribution/Router.java index 09b70624e2..169f3b4e60 100644 --- a/core/src/mindustry/world/blocks/distribution/Router.java +++ b/core/src/mindustry/world/blocks/distribution/Router.java @@ -26,7 +26,7 @@ public class Router extends Block{ @Override public boolean canReplace(Block other){ if(other.alwaysReplace) return true; - return (other != this || rotate) && this.group != BlockGroup.none && other.group == this.group; + return (other != this || rotate) && this.group != BlockGroup.none && other.group == this.group && size >= other.size; } public class RouterBuild extends Building implements ControlBlock{