GTNewHorizons / GT-New-Horizons-Modpack

New Modpack with Gregtech, Thaumcraft and Witchery
https://www.gtnewhorizons.com/
Other
887 stars 275 forks source link

Serious lag caused by Drone Center #16506

Closed skyinr closed 5 days ago

skyinr commented 3 weeks ago

Your GTNH Discord Username

No response

Your Pack Version

2.6.0

Your Server

private server

Java Version

Java 17

Type of Server

None

Your Expectation

no lag

The Reality

I forgot to load chunk for Drone Centre. When Drone Centre is not loaded

Drone DownLink Module has become lagging behind. Drone DownLink Module is also unable to maintain the machine. Drone Centre cannot find Drone DownLink Module.

Rebuild Drone DownLink Module or Drone Centre is also invalid

I checked the lag using LagGoggles 2024-06-10_22 44 58 2024-06-10_22 44 19 2024-06-10_22 44 39 2024-06-10_22 54 08

Your Proposal

fix

Final Checklist

skyinr commented 3 weeks ago

I remove the Drone Center And I have rebuild the Drone downlink module. but drone downlink module reconnect to old Drone Center. 2024-06-11_13 52 45 2024-06-11_13 52 47

Dream-Master commented 3 weeks ago

Update to 2.6.1. and try again .

skyinr commented 3 weeks ago

Can be replicated in the GTNewHorizons/GT5-Unofficial@master latest testing environment

Restart world can run

Perhaps it's because of this? When the controller coordinates are the same but the content is different, it will repeat the put GT-MetaTileEntity-DroneCentre

 //gregtech.common.tileentities.machines.multi.drone.GT_MetaTileEntity_DroneCentre#onFirstTick

 public void onFirstTick(IGregTechTileEntity aBaseMetaTileEntity) {
        super.onFirstTick(aBaseMetaTileEntity);
        if (aBaseMetaTileEntity.isServerSide()) {
            if (droneMap.containsValue(this)) return;
            centreCoord = new Vec3Impl(
                getBaseMetaTileEntity().getXCoord(),
                getBaseMetaTileEntity().getYCoord(),
                getBaseMetaTileEntity().getZCoord());
            droneMap.put(getBaseMetaTileEntity().getWorld().provider.dimensionId, this);
        }
    }