Closed sicklyFoxJay closed 1 year ago
Same
What does "testmap" mean. Why searching for testmap?
Sorry it was supposed to say "testwap". The log repeated issues with that several times after multiple attempts to launch with ae2.
On Sat, Aug 5, 2023, 11:58 AM Markus Günzler @.***> wrote:
What does "testmap" mean. Why searching for testmap?
— Reply to this email directly, view it on GitHub https://github.com/Hexeption/AEInfinityBooster/issues/12#issuecomment-1666554097, or unsubscribe https://github.com/notifications/unsubscribe-auth/BBXTEBIRIGTZDP7HF7TNVWLXTZ3T3ANCNFSM6AAAAAA3FIKDXA . You are receiving this because you authored the thread.Message ID: @.***>
Yes. Sorry testWap
Yes. Sorry testWap
testWap i presume would mean test wireless access point, as that is what some of the items of the mod interact with. but from what i can tell, ae2 may have changed the way wireless access points work coding wise, as i couldn't find testwap within their code on github. i could only find mywap as an identifier.
The files aeifinitybooster.mixins.MixinWirelessTerminalMenuHost.java and appeng.helpers.WirelessTerminalMenuHost.java cannot communicate with each other because it is not testWap but bestWap. It's just a typo.
appeng.helpers.WirelessTerminalMenuHost.java [Applied-Energistics-2]
public boolean rangeCheck() {
this.currentDistanceFromGrid = Double.MAX_VALUE;
if (this.targetGrid != null) {
@Nullable
IWirelessAccessPoint bestWap = null;
double bestSqDistance = Double.MAX_VALUE;
// Find closest WAP
for (var wap : this.targetGrid.getMachines(WirelessAccessPointBlockEntity.class)) {
double sqDistance = getWapSqDistance(wap);
// If the WAP is not suitable then MAX_VALUE will be returned and the check will fail
if (sqDistance < bestSqDistance) {
bestSqDistance = sqDistance;
bestWap = wap;
}
}
// If no WAP is found this will work too
this.myWap = bestWap;
this.currentDistanceFromGrid = Math.sqrt(bestSqDistance);
return this.myWap != null;
}
return false;
instead of
aeifinitybooster.mixins.MixinWirelessTerminalMenuHost.java AEInfinityBooster
@Mixin(value = WirelessTerminalMenuHost.class, remap = false)
public class MixinWirelessTerminalMenuHost extends ItemMenuHost {
@Shadow
private double currentDistanceFromGrid;
public MixinWirelessTerminalMenuHost(Player player, int slot, ItemStack itemStack) {
super(player, slot, itemStack);
}
@Inject(method = "testWap", at = @At("HEAD"), cancellable = true)
private void testWap(IWirelessAccessPoint wirelessAccessPoint, CallbackInfoReturnable<Boolean> cir) {
wirelessAccessPoint.getGrid().getMachines(WirelessAccessPointBlockEntity.class).forEach(wirelessBlockEntity -> {
if (wirelessBlockEntity.getInternalInventory().getStackInSlot(0).is(ModItems.DIMENSION_CARD.get())) {
currentDistanceFromGrid = 32;
cir.setReturnValue(true);
}
if (!this.getPlayer().level().dimension().location().toString().equals(wirelessAccessPoint.getLocation().getLevel().dimension().location().toString())) {
return;
}
if (wirelessBlockEntity.getInternalInventory().getStackInSlot(0).is(ModItems.INFINITY_CARD.get())) {
currentDistanceFromGrid = 16;
cir.setReturnValue(true);
}
});
}
}
thank you very much ErythroCraft. this was alot of help
latest.log AE Infinity Booster crashes on start up with ae2 installed. It seems to be running into an error due to the injection method of MixinWirelessTerminalHost.java . This is on forge v47.1.0. Not sure if the issue has to do with ae2 itself and the mixin file error is a byproduct, or if the mixin file error is the only issue, but ae2, with it's dependencies, seems to work fine. I've included my log file for the crash.