SolarGeneration

SolarGeneration

3M Downloads

[1.14.4] Display issue on the client side in the solar panel container with a dedicated server

HyCraftHD opened this issue ยท 4 comments

commented

The value wrappes around at 32000 into the minus values and up again.
grafik

This is due to the trackInt method that casts the integer to a short value:

trackInt(new IntReferenceHolder() {
@Override
public int get()
{
return getEnergy();
}
@Override
public void set(int value)
{
tileEntitySolarPanel.getCapability(CapabilityEnergy.ENERGY).ifPresent(h -> ((MyEnergyStorage) h).setEnergy(value));
}
});

To fix this you must use custom packets like this custom tracker here:
https://github.com/MC-U-Team/U-Team-Core/blob/153fd57f88a0d2d71a8f69072f86dc57a89970de/src/main/java/info/u_team/u_team_core/container/UContainer.java#L97-L103

commented

No problem.
I make a pr soon.

commented

Hi, I tried to look at your code, but since I'm still inexperienced, I can't understand much of it. If you want to help me it would be great.

commented

Done. Your build system seems to bug though

commented

Thanks fixed with #15