use of forestry.core.network.packets.PacketErrorUpdateEntity in project ForestryMC by ForestryMC.
the class ContainerEntity method detectAndSendChanges.
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
if (entity instanceof IErrorLogicSource) {
IErrorLogicSource errorLogicSource = (IErrorLogicSource) entity;
ImmutableSet<IErrorState> errorStates = errorLogicSource.getErrorLogic().getErrorStates();
if (previousErrorStates == null || !errorStates.equals(previousErrorStates)) {
PacketErrorUpdateEntity packet = new PacketErrorUpdateEntity(entity, errorLogicSource);
sendPacketToListeners(packet);
}
previousErrorStates = errorStates;
}
}
Aggregations