mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-11-14 01:14:11 +00:00
Fix Amode Wireless Kit Crash (#1315)
This commit is contained in:
1 parent
8b7eec8934
commit
a4accd2862
1 file changed
+11
-6
@@ -505,10 +505,10 @@ public class WireLessToolHelper {
|
||||
int i = 0;
|
||||
int ii = 0;
|
||||
toBind: while (twToBind.size() > i && twTarget.size() > ii) {
|
||||
while (twTarget.get(ii).getFreeSlots() > 0) {
|
||||
final TileWirelessBase source = twToBind.get(ii);
|
||||
final TileWirelessBase target = twTarget.get(i);
|
||||
switch (WireLessToolHelper.performConnection(source, target, new PlayerSource(p, null))) {
|
||||
while (twToBind.size() > i && twTarget.size() > ii && twTarget.get(ii).getFreeSlots() > 0) {
|
||||
final TileWirelessBase source = twToBind.get(i);
|
||||
final TileWirelessBase target = twTarget.get(ii);
|
||||
switch (WireLessToolHelper.performConnection(target, source, new PlayerSource(p, null))) {
|
||||
case SUCCESS -> {
|
||||
p.addChatMessage(
|
||||
WirelessMessages.rowBindSuccess.toChat(
|
||||
@@ -527,15 +527,20 @@ public class WireLessToolHelper {
|
||||
case INVALID_SOURCE -> {
|
||||
p.addChatMessage(
|
||||
WirelessMessages.rowBindInvalidSource
|
||||
.toChat(target.getLocation().getGuiTextShortNoDim()));
|
||||
.toChat(source.getLocation().getGuiTextShortNoDim()));
|
||||
i++;
|
||||
}
|
||||
case FAILED -> {
|
||||
p.addChatMessage(
|
||||
WirelessMessages.rowBindFailed.toChat(target.getLocation().getGuiTextShortNoDim()));
|
||||
WirelessMessages.rowBindFailed.toChat(
|
||||
source.getLocation().getGuiTextShortNoDim(),
|
||||
target.getLocation().getGuiTextShortNoDim()));
|
||||
i++;
|
||||
ii++;
|
||||
}
|
||||
case ALREADY_BIND -> {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
ii++;
|
||||
|
||||
Reference in new issue
Block a user