mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-28 07:35:47 +00:00
Fix #1171 Bee life cycle indicator desync
This commit is contained in:
1 parent
ae7ec5c782
commit
fb523c2064
4 files changed
+13
-5
No files matched your search
@@ -14,6 +14,7 @@ import net.minecraft.entity.player.InventoryPlayer;
|
||||
|
||||
import forestry.apiculture.multiblock.TileAlveary;
|
||||
import forestry.core.gui.ContainerTile;
|
||||
import forestry.core.network.IForestryPacketClient;
|
||||
import forestry.core.network.packets.PacketGuiUpdate;
|
||||
|
||||
public class ContainerAlveary extends ContainerTile<TileAlveary> {
|
||||
@@ -23,10 +24,17 @@ public class ContainerAlveary extends ContainerTile<TileAlveary> {
|
||||
ContainerBeeHelper.addSlots(this, tile, false);
|
||||
}
|
||||
|
||||
private int beeProgress = -1;
|
||||
|
||||
@Override
|
||||
public void detectAndSendChanges() {
|
||||
super.detectAndSendChanges();
|
||||
PacketGuiUpdate packet = new PacketGuiUpdate(tile);
|
||||
sendPacketToListeners(packet);
|
||||
|
||||
int beeProgress = tile.getBeekeepingLogic().getBeeProgressPercent();
|
||||
if (this.beeProgress != beeProgress) {
|
||||
this.beeProgress = beeProgress;
|
||||
IForestryPacketClient packet = new PacketGuiUpdate(tile);
|
||||
sendPacketToListeners(packet);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user